diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/batching_util/adaptive_shared_batch_scheduler.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/batching_util/adaptive_shared_batch_scheduler.h new file mode 100644 index 0000000000000000000000000000000000000000..b9ca84b3bef2b6c10896a2e3573145b1cfc2c557 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/batching_util/adaptive_shared_batch_scheduler.h @@ -0,0 +1,870 @@ +/* Copyright 2017 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_KERNELS_BATCHING_UTIL_ADAPTIVE_SHARED_BATCH_SCHEDULER_H_ +#define TENSORFLOW_CORE_KERNELS_BATCHING_UTIL_ADAPTIVE_SHARED_BATCH_SCHEDULER_H_ + +#include +#include +#include +#include +#include +#include +#include + +#include "absl/types/optional.h" +#include "tensorflow/core/kernels/batching_util/batch_scheduler.h" +#include "tensorflow/core/kernels/batching_util/periodic_function.h" +#include "tensorflow/core/lib/core/errors.h" +#include "tensorflow/core/lib/core/status.h" +#include "tensorflow/core/lib/core/threadpool.h" +#include "tensorflow/core/platform/byte_order.h" +#include "tensorflow/core/platform/cpu_info.h" +#include "tensorflow/core/platform/env.h" +#include "tensorflow/core/platform/errors.h" +#include "tensorflow/core/platform/thread_annotations.h" +#include "tensorflow/core/platform/threadpool_interface.h" +#include "tensorflow/core/platform/types.h" +#include "tensorflow/core/profiler/lib/connected_traceme.h" + +namespace tensorflow { +namespace serving { +namespace internal { +template +class ASBSBatch; + +template +class ASBSQueue; +} // namespace internal + +// Shared batch scheduler designed to minimize latency. The scheduler keeps +// track of a number of queues (one per model or model version) which are +// continuously enqueuing requests. The scheduler groups the requests into +// batches which it periodically sends off for processing (see +// shared_batch_scheduler.h for more details). AdaptiveSharedBatchScheduler +// (ASBS) prioritizes batches primarily by age (i.e. the batch's oldest request) +// along with a configurable preference for scheduling larger batches first. +// +// +// ASBS tries to keep the system busy by maintaining an adjustable number of +// concurrently processed batches. If a new batch is created, and the number of +// in flight batches is below the target, the next (i.e. oldest) batch is +// immediately scheduled. Similarly, when a batch finishes processing, the +// target is rechecked, and another batch may be scheduled. To avoid the need +// to carefully tune the target for workload, model type, platform, etc, it is +// dynamically adjusted in order to provide the lowest average latency. +// +// Some potential use cases: +// Hardware Accelerators (GPUs & TPUs) - If some phase of batch processing +// involves serial processing by a device, from a latency perspective it is +// desirable to keep the device evenly loaded, avoiding the need to wait for +// the device to process prior batches. +// CPU utilization - If the batch processing is cpu dominated, you can reap +// latency gains when underutilized by increasing the processing rate, but +// back the rate off when the load increases to avoid overload. + +template +class AdaptiveSharedBatchScheduler + : public std::enable_shared_from_this< + AdaptiveSharedBatchScheduler> { + public: + ~AdaptiveSharedBatchScheduler() { + // Finish processing batches before destroying other class members. + if (owned_batch_thread_pool_) { + delete batch_thread_pool_; + } + } + + struct Options { + // The name to use for the pool of batch threads. + string thread_pool_name = {"batch_threads"}; + // Number of batch processing threads - the maximum value of + // in_flight_batches_limit_. It is recommended that this value be set by + // running the system under load, observing the learned value for + // in_flight_batches_limit_, and setting this maximum to ~ 2x the value. + // Under low load, in_flight_batches_limit_ has no substantial effect on + // latency and therefore undergoes a random walk. Unreasonably large values + // for num_batch_threads allows for large in_flight_batches_limit_, which + // will harm latency for some time once load increases again. + int64_t num_batch_threads = port::MaxParallelism(); + // You can pass a ThreadPool directly rather than the above two + // parameters. If given, the above two parameers are ignored. Ownership of + // the threadpool is not transferred. + thread::ThreadPool* thread_pool = nullptr; + + // Lower bound for in_flight_batches_limit_. As discussed above, can be used + // to minimize the damage caused by the random walk under low load. + int64_t min_in_flight_batches_limit = 1; + // Although batch selection is primarily based on age, this parameter + // specifies a preference for larger batches. A full batch will be + // scheduled before an older, nearly empty batch as long as the age gap is + // less than full_batch_scheduling_boost_micros. The optimal value for this + // parameter should be of order the batch processing latency, but must be + // chosen carefully, as too large a value will harm tail latency. + int64_t full_batch_scheduling_boost_micros = 0; + // The environment to use (typically only overridden by test code). + Env* env = Env::Default(); + // Initial limit for number of batches being concurrently processed. + // Non-integer values correspond to probabilistic limits - i.e. a value of + // 3.2 results in an actual cap of 3 80% of the time, and 4 20% of the time. + double initial_in_flight_batches_limit = 3; + // Number of batches between adjustments of in_flight_batches_limit. Larger + // numbers will give less noisy latency measurements, but will be less + // responsive to changes in workload. + int64_t batches_to_average_over = 1000; + + // If true, schedule batches using FIFO policy. + // Requires that `full_batch_scheduling_boost_micros` is zero. + // NOTE: + // A new parameter is introduced (not re-using + // full_batch_scheduling_boost_micros==zero) for backward compatibility of + // API. + bool fifo_scheduling = false; + }; + + // Ownership is shared between the caller of Create() and any queues created + // via AddQueue(). + static Status Create( + const Options& options, + std::shared_ptr>* scheduler); + + struct QueueOptions { + // Maximum size of a batch that's formed within + // `ASBSQueue::Schedule`. + int max_batch_size = 1000; + // Maximum size of input task, which is submitted to the queue by + // calling `ASBSQueue::Schedule` and used to form batches. + // + // If specified, it should be larger than or equal to 'max_batch_size'. + absl::optional max_input_task_size = absl::nullopt; + // Maximum number of tasks to add to a specific batch. + absl::optional max_tasks_per_batch = absl::nullopt; + // Maximum number of enqueued (i.e. non-scheduled) batches. + int max_enqueued_batches = 10; + // Amount of time non-full batches must wait before becoming schedulable. + // A non-zero value can improve performance by limiting the scheduling of + // nearly empty batches. + int64_t batch_timeout_micros = 0; + // If non nullptr, split_input_task_func should split input_task into + // multiple tasks, the first of which has size first_size and the remaining + // not exceeding max_size. This function may acquire ownership of input_task + // and should return a status indicating if the split was successful. Upon + // success, the caller can assume that all output_tasks will be scheduled. + // Including this option allows the scheduler to pack batches better and + // should usually improve overall throughput. + std::function* input_task, int first_size, + int max_batch_size, + std::vector>* output_tasks)> + split_input_task_func; + + // If true, the padding will not be appended. + bool disable_padding = false; + }; + + using BatchProcessor = std::function>)>; + + // Adds queue (and its callback) to be managed by this scheduler. + Status AddQueue(const QueueOptions& options, + BatchProcessor process_batch_callback, + std::unique_ptr>* queue); + + double in_flight_batches_limit() { + mutex_lock l(mu_); + return in_flight_batches_limit_; + } + + private: + // access to AddBatch, MaybeScheduleClosedBatches, RemoveQueue, GetEnv. + friend class internal::ASBSQueue; + + explicit AdaptiveSharedBatchScheduler(const Options& options); + + // Tracks processing latency and adjusts in_flight_batches_limit to minimize. + void CallbackWrapper(const internal::ASBSBatch* batch, + BatchProcessor callback, bool is_express); + + // Schedules batch if in_flight_batches_limit_ is not met. + void MaybeScheduleNextBatch() TF_EXCLUSIVE_LOCKS_REQUIRED(mu_); + + // Schedules batch using FIFO policy if in_flight_batches_limit_ is not met. + void MaybeScheduleNextBatchFIFO() TF_EXCLUSIVE_LOCKS_REQUIRED(mu_); + + // Schedules all closed batches in batches_ for which an idle thread is + // available in batch_thread_pool_. + // Batches scheduled this way are called express batches. + // Express batches are not limited by in_flight_batches_limit_, and + // their latencies will not affect in_flight_batches_limit_. + void MaybeScheduleClosedBatches(); + + void MaybeScheduleClosedBatchesLocked() TF_EXCLUSIVE_LOCKS_REQUIRED(mu_); + + void MaybeScheduleClosedBatchesLockedFIFO() TF_EXCLUSIVE_LOCKS_REQUIRED(mu_); + + void MaybeAdjustInflightLimit() TF_EXCLUSIVE_LOCKS_REQUIRED(mu_); + + // Notifies scheduler of non-empty batch which is eligible for processing. + void AddBatch(const internal::ASBSBatch* batch); + + // Removes queue from scheduler. + void RemoveQueue(const internal::ASBSQueue* queue); + + Env* GetEnv() const { return options_.env; } + + const Options options_; + + // Collection of batches added by AddBatch, ordered by age. Owned by scheduler + // until they are released for processing. + std::vector*> batches_ TF_GUARDED_BY(mu_); + + // Collection of batches added by AddBatch, ordered by age. Owned by + // scheduler until they are released for processing. + std::deque*> fifo_batches_ + TF_GUARDED_BY(mu_); + + // Unowned queues and callbacks added by AddQueue. + std::unordered_map*, BatchProcessor> + queues_and_callbacks_ TF_GUARDED_BY(mu_); + + mutex mu_; + + // Responsible for running the batch processing callbacks. + thread::ThreadPool* batch_thread_pool_; + + bool owned_batch_thread_pool_ = false; + + // Limit on number of batches which can be concurrently processed. + // Non-integer values correspond to probabilistic limits - i.e. a value of 3.2 + // results in an actual cap of 3 80% of the time, and 4 20% of the time. + double in_flight_batches_limit_ TF_GUARDED_BY(mu_); + + // Number of regular batches currently being processed. + int64_t in_flight_batches_ TF_GUARDED_BY(mu_) = 0; + // Number of express batches currently being processed. + int64_t in_flight_express_batches_ TF_GUARDED_BY(mu_) = 0; + + // RNG engine and distribution. + std::default_random_engine rand_engine_; + std::uniform_real_distribution rand_double_; + + // Fields controlling the dynamic adjustment of in_flight_batches_limit_. + // Number of batches since the last in_flight_batches_limit_ adjustment. + int64_t batch_count_ TF_GUARDED_BY(mu_) = 0; + + struct DelayStats { + // Sum of processing latency for batches counted by batch_count_. + int64_t batch_latency_sum = 0; + // Average batch latency for previous value of in_flight_batches_limit_. + double last_avg_latency_ms = 0; + // Did last_avg_latency_ms decrease from the previous last_avg_latency_ms? + bool last_latency_decreased = false; + // Current direction (+-) to adjust in_flight_batches_limit_ + int step_direction = 1; + }; + + // Delay stats between the creation of a batch and the completion of a + // batch. + DelayStats batch_delay_stats_ TF_GUARDED_BY(mu_); + + // Max adjustment size (as a fraction of in_flight_batches_limit_). + constexpr static double kMaxStepSizeMultiplier = 0.125; // 1/8; + // Min adjustment size (as a fraction of in_flight_batches_limit_). + constexpr static double kMinStepSizeMultiplier = 0.0078125; // 1/128 + // Current adjustment size (as a fraction of in_flight_batches_limit_). + double step_size_multiplier_ TF_GUARDED_BY(mu_) = kMaxStepSizeMultiplier; + + AdaptiveSharedBatchScheduler(const AdaptiveSharedBatchScheduler&) = delete; + void operator=(const AdaptiveSharedBatchScheduler&) = delete; +}; + +////////////////////////////////////////////////////////// +// Implementation details follow. API users need not read. + +namespace internal { +// Consolidates tasks into batches, passing them off to the +// AdaptiveSharedBatchScheduler for processing. +template +class ASBSQueue : public BatchScheduler { + public: + using QueueOptions = + typename AdaptiveSharedBatchScheduler::QueueOptions; + + ASBSQueue(std::shared_ptr> scheduler, + const QueueOptions& options); + + ~ASBSQueue() override; + + // Adds task to current batch. Fails if the task size is larger than the batch + // size or if the current batch is full and this queue's number of outstanding + // batches is at its maximum. + Status Schedule(std::unique_ptr* task) override; + + // Number of tasks waiting to be scheduled. + size_t NumEnqueuedTasks() const override; + + // Number of size 1 tasks which could currently be scheduled without failing. + size_t SchedulingCapacity() const override; + + // Notifies queue that a batch is about to be scheduled; the queue should not + // place any more tasks in this batch. + void ReleaseBatch(const ASBSBatch* batch); + + size_t max_task_size() const override { return options_.max_batch_size; } + + private: + // Number of size 1 tasks which could currently be scheduled without failing. + size_t SchedulingCapacityLocked() const TF_EXCLUSIVE_LOCKS_REQUIRED(mu_); + + // Returns uint64 one greater than was returned by the previous call. + // Context id is reused after std::numeric_limits::max is exhausted. + static uint64 NewTraceMeContextIdForBatch(); + + std::shared_ptr> scheduler_; + const QueueOptions options_; + // Owned by scheduler_. + ASBSBatch* current_batch_ TF_GUARDED_BY(mu_) = nullptr; + int64_t num_enqueued_batches_ TF_GUARDED_BY(mu_) = 0; + int64_t num_enqueued_tasks_ TF_GUARDED_BY(mu_) = 0; + mutable mutex mu_; + ASBSQueue(const ASBSQueue&) = delete; + void operator=(const ASBSQueue&) = delete; +}; + +// Batch which remembers when and by whom it was created. +template +class ASBSBatch : public Batch { + public: + ASBSBatch(ASBSQueue* queue, int64_t creation_time_micros, + int64_t batch_timeout_micros, uint64 traceme_context_id) + : queue_(queue), + creation_time_micros_(creation_time_micros), + schedulable_time_micros_(creation_time_micros + batch_timeout_micros), + traceme_context_id_(traceme_context_id) {} + + ~ASBSBatch() override {} + + ASBSQueue* queue() const { return queue_; } + + int64_t creation_time_micros() const { return creation_time_micros_; } + + int64_t schedulable_time_micros() const { return schedulable_time_micros_; } + + uint64 traceme_context_id() const { return traceme_context_id_; } + + private: + ASBSQueue* queue_; + const int64_t creation_time_micros_; + const int64_t schedulable_time_micros_; + const uint64 traceme_context_id_; + ASBSBatch(const ASBSBatch&) = delete; + void operator=(const ASBSBatch&) = delete; +}; +} // namespace internal + +// ---------------- AdaptiveSharedBatchScheduler ---------------- + +template +constexpr double AdaptiveSharedBatchScheduler::kMaxStepSizeMultiplier; + +template +constexpr double AdaptiveSharedBatchScheduler::kMinStepSizeMultiplier; + +template +Status AdaptiveSharedBatchScheduler::Create( + const Options& options, + std::shared_ptr>* scheduler) { + if (options.num_batch_threads < 1) { + return errors::InvalidArgument("num_batch_threads must be positive; was ", + options.num_batch_threads); + } + if (options.min_in_flight_batches_limit < 1) { + return errors::InvalidArgument( + "min_in_flight_batches_limit must be >= 1; was ", + options.min_in_flight_batches_limit); + } + if (options.min_in_flight_batches_limit > options.num_batch_threads) { + return errors::InvalidArgument( + "min_in_flight_batches_limit (", options.min_in_flight_batches_limit, + ") must be <= num_batch_threads (", options.num_batch_threads, ")"); + } + if (options.full_batch_scheduling_boost_micros < 0) { + return errors::InvalidArgument( + "full_batch_scheduling_boost_micros can't be negative; was ", + options.full_batch_scheduling_boost_micros); + } + if (options.initial_in_flight_batches_limit > options.num_batch_threads) { + return errors::InvalidArgument( + "initial_in_flight_batches_limit (", + options.initial_in_flight_batches_limit, + ") should not be larger than num_batch_threads (", + options.num_batch_threads, ")"); + } + if (options.initial_in_flight_batches_limit < + options.min_in_flight_batches_limit) { + return errors::InvalidArgument("initial_in_flight_batches_limit (", + options.initial_in_flight_batches_limit, + "must be >= min_in_flight_batches_limit (", + options.min_in_flight_batches_limit, ")"); + } + if (options.batches_to_average_over < 1) { + return errors::InvalidArgument( + "batches_to_average_over should be " + "greater than or equal to 1; was ", + options.batches_to_average_over); + } + scheduler->reset(new AdaptiveSharedBatchScheduler(options)); + return OkStatus(); +} + +template +AdaptiveSharedBatchScheduler::AdaptiveSharedBatchScheduler( + const Options& options) + : options_(options), + in_flight_batches_limit_(options.initial_in_flight_batches_limit), + rand_double_(0.0, 1.0) { + std::random_device device; + rand_engine_.seed(device()); + if (options.thread_pool == nullptr) { + owned_batch_thread_pool_ = true; + batch_thread_pool_ = new thread::ThreadPool( + GetEnv(), options.thread_pool_name, options.num_batch_threads); + } else { + owned_batch_thread_pool_ = false; + batch_thread_pool_ = options.thread_pool; + } +} + +template +Status AdaptiveSharedBatchScheduler::AddQueue( + const QueueOptions& options, BatchProcessor process_batch_callback, + std::unique_ptr>* queue) { + if (options.max_batch_size <= 0) { + return errors::InvalidArgument("max_batch_size must be positive; was ", + options.max_batch_size); + } + if (options.max_enqueued_batches <= 0) { + return errors::InvalidArgument( + "max_enqueued_batches must be positive; was ", + options.max_enqueued_batches); + } + if (options.max_input_task_size.has_value()) { + if (options.max_input_task_size.value() < options.max_batch_size) { + return errors::InvalidArgument( + "max_input_task_size must be larger than or equal to max_batch_size;" + "got max_input_task_size as ", + options.max_input_task_size.value(), " and max_batch_size as ", + options.max_batch_size); + } + } + internal::ASBSQueue* asbs_queue_raw; + queue->reset(asbs_queue_raw = new internal::ASBSQueue( + this->shared_from_this(), options)); + mutex_lock l(mu_); + queues_and_callbacks_[asbs_queue_raw] = process_batch_callback; + return OkStatus(); +} + +template +void AdaptiveSharedBatchScheduler::AddBatch( + const internal::ASBSBatch* batch) { + mutex_lock l(mu_); + if (options_.fifo_scheduling) { + fifo_batches_.push_back(batch); + } else { + batches_.push_back(batch); + } + int64_t delay_micros = + batch->schedulable_time_micros() - GetEnv()->NowMicros(); + if (delay_micros <= 0) { + MaybeScheduleNextBatch(); + return; + } + // Try to schedule batch once it becomes schedulable. Although scheduler waits + // for all batches to finish processing before allowing itself to be deleted, + // MaybeScheduleNextBatch() is called in other places, and therefore it's + // possible the scheduler could be deleted by the time this closure runs. + // Grab a shared_ptr reference to prevent this from happening. + GetEnv()->SchedClosureAfter( + delay_micros, [this, lifetime_preserver = this->shared_from_this()] { + mutex_lock l(mu_); + MaybeScheduleNextBatch(); + }); +} + +template +void AdaptiveSharedBatchScheduler::RemoveQueue( + const internal::ASBSQueue* queue) { + mutex_lock l(mu_); + queues_and_callbacks_.erase(queue); +} + +template +void AdaptiveSharedBatchScheduler::MaybeScheduleNextBatchFIFO() { + const internal::ASBSBatch* batch = *fifo_batches_.begin(); + if (batch->schedulable_time_micros() > GetEnv()->NowMicros()) { + return; + } + fifo_batches_.pop_front(); + // Queue may destroy itself after ReleaseBatch is called. + batch->queue()->ReleaseBatch(batch); + batch_thread_pool_->Schedule(std::bind( + &AdaptiveSharedBatchScheduler::CallbackWrapper, this, batch, + queues_and_callbacks_[batch->queue()], false /* is express */)); + in_flight_batches_++; +} + +template +void AdaptiveSharedBatchScheduler< + TaskType>::MaybeScheduleClosedBatchesLockedFIFO() { + // Only schedule closed batches if we have spare capacity. + int available_threads = + static_cast(options_.num_batch_threads - in_flight_batches_ - + in_flight_express_batches_); + for (auto it = fifo_batches_.begin(); + it != fifo_batches_.end() && available_threads > 0; + it = fifo_batches_.begin()) { + if ((*it)->IsClosed()) { + const internal::ASBSBatch* batch = *it; + fifo_batches_.pop_front(); + batch->queue()->ReleaseBatch(batch); + batch_thread_pool_->Schedule( + std::bind(&AdaptiveSharedBatchScheduler::CallbackWrapper, + this, batch, queues_and_callbacks_[batch->queue()], true)); + in_flight_express_batches_++; + available_threads--; + } else { + // Batches are FIFO, so stop iteration after finding the first non-closed + // batches. + break; + } + } +} + +template +void AdaptiveSharedBatchScheduler::MaybeScheduleNextBatch() { + bool batch_empty = + options_.fifo_scheduling ? fifo_batches_.empty() : batches_.empty(); + if (batch_empty || in_flight_batches_ >= in_flight_batches_limit_) return; + // Non-integer limit handled probabilistically. + if (in_flight_batches_limit_ - in_flight_batches_ < 1 && + rand_double_(rand_engine_) > + in_flight_batches_limit_ - in_flight_batches_) { + return; + } + + if (options_.fifo_scheduling) { + MaybeScheduleNextBatchFIFO(); + return; + } + + auto best_it = batches_.end(); + double best_score = (std::numeric_limits::max)(); + int64_t now_micros = GetEnv()->NowMicros(); + for (auto it = batches_.begin(); it != batches_.end(); it++) { + if ((*it)->schedulable_time_micros() > now_micros) continue; + const double score = + (*it)->creation_time_micros() - + options_.full_batch_scheduling_boost_micros * (*it)->size() / + static_cast((*it)->queue()->max_task_size()); + if (best_it == batches_.end() || score < best_score) { + best_score = score; + best_it = it; + } + } + // No schedulable batches. + if (best_it == batches_.end()) return; + const internal::ASBSBatch* batch = *best_it; + batches_.erase(best_it); + // Queue may destroy itself after ReleaseBatch is called. + batch->queue()->ReleaseBatch(batch); + batch_thread_pool_->Schedule( + std::bind(&AdaptiveSharedBatchScheduler::CallbackWrapper, this, + batch, queues_and_callbacks_[batch->queue()], false)); + in_flight_batches_++; +} + +template +void AdaptiveSharedBatchScheduler::MaybeScheduleClosedBatches() { + mutex_lock l(mu_); + MaybeScheduleClosedBatchesLocked(); +} + +template +void AdaptiveSharedBatchScheduler< + TaskType>::MaybeScheduleClosedBatchesLocked() { + if (options_.fifo_scheduling) { + MaybeScheduleClosedBatchesLockedFIFO(); + return; + } + // Only schedule closed batches if we have spare capacity. + int available_threads = + static_cast(options_.num_batch_threads - in_flight_batches_ - + in_flight_express_batches_); + for (auto it = batches_.begin(); + it != batches_.end() && available_threads > 0;) { + if ((*it)->IsClosed()) { + const internal::ASBSBatch* batch = *it; + it = batches_.erase(it); + batch->queue()->ReleaseBatch(batch); + batch_thread_pool_->Schedule( + std::bind(&AdaptiveSharedBatchScheduler::CallbackWrapper, + this, batch, queues_and_callbacks_[batch->queue()], true)); + in_flight_express_batches_++; + available_threads--; + } else { + ++it; + } + } +} + +template +void AdaptiveSharedBatchScheduler::CallbackWrapper( + const internal::ASBSBatch* batch, + AdaptiveSharedBatchScheduler::BatchProcessor callback, + bool is_express) { + profiler::TraceMeConsumer trace_me( + [&] { + return profiler::TraceMeEncode( + "ProcessBatch", {{"batch_size_before_padding", batch->size()}, + {"_r", 2} /*root_event*/}); + }, + profiler::ContextType::kAdaptiveSharedBatchScheduler, + batch->traceme_context_id()); + const int64_t start_time = batch->creation_time_micros(); + callback(std::unique_ptr>( + const_cast*>(batch))); + int64_t end_time = GetEnv()->NowMicros(); + mutex_lock l(mu_); + if (is_express) { + in_flight_express_batches_--; + MaybeScheduleClosedBatchesLocked(); + return; + } + in_flight_batches_--; + batch_count_++; + batch_delay_stats_.batch_latency_sum += end_time - start_time; + + MaybeAdjustInflightLimit(); + + MaybeScheduleNextBatch(); +} + +template +void AdaptiveSharedBatchScheduler::MaybeAdjustInflightLimit() { + // Occasionally adjust in_flight_batches_limit_ to minimize average latency. + // Although the optimal value may depend on the workload, the latency should + // be a simple convex function of in_flight_batches_limit_, allowing us to + // locate the global minimum relatively quickly. + if (batch_count_ == options_.batches_to_average_over) { + double current_avg_latency_ms = + (batch_delay_stats_.batch_latency_sum / 1000.) / batch_count_; + bool current_latency_decreased = + current_avg_latency_ms < batch_delay_stats_.last_avg_latency_ms; + if (current_latency_decreased) { + // If latency improvement was because we're moving in the correct + // direction, increase step_size so that we can get to the minimum faster. + // If latency improvement was due to backtracking from a previous failure, + // decrease step_size in order to refine our location. + step_size_multiplier_ *= + (batch_delay_stats_.last_latency_decreased ? 2 : 0.5); + step_size_multiplier_ = + std::min(step_size_multiplier_, kMaxStepSizeMultiplier); + step_size_multiplier_ = + std::max(step_size_multiplier_, kMinStepSizeMultiplier); + } else { + // Return (nearly) to previous position and confirm that latency is better + // there before decreasing step size. + batch_delay_stats_.step_direction = -batch_delay_stats_.step_direction; + } + in_flight_batches_limit_ += batch_delay_stats_.step_direction * + in_flight_batches_limit_ * + step_size_multiplier_; + in_flight_batches_limit_ = + std::min(in_flight_batches_limit_, + static_cast(options_.num_batch_threads)); + in_flight_batches_limit_ = + std::max(in_flight_batches_limit_, + static_cast(options_.min_in_flight_batches_limit)); + batch_delay_stats_.last_avg_latency_ms = current_avg_latency_ms; + batch_delay_stats_.last_latency_decreased = current_latency_decreased; + batch_count_ = 0; + batch_delay_stats_.batch_latency_sum = 0; + } +} + +// ---------------- ASBSQueue ---------------- + +namespace internal { +template +ASBSQueue::ASBSQueue( + std::shared_ptr> scheduler, + const QueueOptions& options) + : scheduler_(scheduler), options_(options) {} + +template +ASBSQueue::~ASBSQueue() { + // Wait until last batch has been scheduled. + const int kSleepMicros = 1000; + for (;;) { + { + mutex_lock l(mu_); + if (num_enqueued_batches_ == 0) { + break; + } + } + scheduler_->GetEnv()->SleepForMicroseconds(kSleepMicros); + } + scheduler_->RemoveQueue(this); +} + +template +Status ASBSQueue::Schedule(std::unique_ptr* task) { + size_t size = (*task)->size(); + if (options_.split_input_task_func == nullptr && + size > options_.max_batch_size) { + return errors::InvalidArgument("Task size ", size, + " is larger than maximum batch size ", + options_.max_batch_size); + } + if (options_.max_input_task_size.has_value() && + (size > options_.max_input_task_size.value())) { + return errors::InvalidArgument("Task size ", size, + " is larger than max input task size ", + options_.max_input_task_size.value()); + } + + std::vector> tasks_to_schedule; + std::vector*> new_batches; + bool closed_batch = false; + { + mutex_lock l(mu_); + if (size > SchedulingCapacityLocked()) { + return errors::Unavailable("The batch scheduling queue is full"); + } + + int remaining_batch_size = + current_batch_ == nullptr + ? options_.max_batch_size + : options_.max_batch_size - current_batch_->size(); + if (options_.split_input_task_func == nullptr || + size <= remaining_batch_size) { + // Either we don't allow task splitting or task fits within the current + // batch. + tasks_to_schedule.push_back(std::move(*task)); + } else { + // Split task in order to completely fill the current batch. + // Beyond this point Schedule should not fail, as the caller has been + // promised that all of the split tasks will be scheduled. + TF_RETURN_IF_ERROR(options_.split_input_task_func( + task, remaining_batch_size, options_.max_batch_size, + &tasks_to_schedule)); + } + for (auto& task : tasks_to_schedule) { + // Can't fit within current batch, close it off and try to create another. + if (current_batch_ && + current_batch_->size() + task->size() > options_.max_batch_size) { + current_batch_->Close(); + closed_batch = true; + current_batch_ = nullptr; + } + if (!current_batch_) { + num_enqueued_batches_++; + // batch.traceme_context_id connects TraceMeProducer and + // TraceMeConsumer. + // When multiple calls to "ASBS::Schedule" accumulate to one batch, they + // are processed in the same batch and should share traceme_context_id. + current_batch_ = new ASBSBatch( + this, scheduler_->GetEnv()->NowMicros(), + options_.batch_timeout_micros, NewTraceMeContextIdForBatch()); + new_batches.push_back(current_batch_); + } + + // Annotate each task (corresponds to one call of schedule) with a + // TraceMeProducer. + profiler::TraceMeProducer trace_me( + [task_size = task->size()] { + return profiler::TraceMeEncode( + "ASBSQueue::Schedule", + {{"batching_input_task_size", task_size}}); + }, + profiler::ContextType::kAdaptiveSharedBatchScheduler, + this->current_batch_->traceme_context_id()); + current_batch_->AddTask(std::move(task)); + num_enqueued_tasks_++; + // If current_batch_ is now full, allow it to be processed immediately. + bool reached_max_tasks = + (options_.max_tasks_per_batch.has_value() && + current_batch_->num_tasks() >= options_.max_tasks_per_batch.value()); + if (current_batch_->size() == options_.max_batch_size || + reached_max_tasks) { + current_batch_->Close(); + closed_batch = true; + current_batch_ = nullptr; + } + } + } + // Scheduler functions must be called outside of lock, since they may call + // ReleaseBatch. + for (auto* batch : new_batches) { + scheduler_->AddBatch(batch); + } + if (closed_batch) { + scheduler_->MaybeScheduleClosedBatches(); + } + return OkStatus(); +} + +template +void ASBSQueue::ReleaseBatch(const ASBSBatch* batch) { + mutex_lock l(mu_); + num_enqueued_batches_--; + num_enqueued_tasks_ -= batch->num_tasks(); + if (batch == current_batch_) { + current_batch_->Close(); + current_batch_ = nullptr; + } +} + +template +size_t ASBSQueue::NumEnqueuedTasks() const { + mutex_lock l(mu_); + return num_enqueued_tasks_; +} + +template +size_t ASBSQueue::SchedulingCapacity() const { + mutex_lock l(mu_); + return SchedulingCapacityLocked(); +} + +template +size_t ASBSQueue::SchedulingCapacityLocked() const { + const int current_batch_capacity = + current_batch_ ? options_.max_batch_size - current_batch_->size() : 0; + const int spare_batches = + options_.max_enqueued_batches - num_enqueued_batches_; + return spare_batches * options_.max_batch_size + current_batch_capacity; +} + +template +// static +uint64 ASBSQueue::NewTraceMeContextIdForBatch() { + static std::atomic traceme_context_id(0); + return traceme_context_id.fetch_add(1, std::memory_order_relaxed); +} +} // namespace internal +} // namespace serving +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_BATCHING_UTIL_ADAPTIVE_SHARED_BATCH_SCHEDULER_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/batching_util/batch_input_task.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/batching_util/batch_input_task.h new file mode 100644 index 0000000000000000000000000000000000000000..908393008b41c1555540f662d1ea0de9f4fa771a --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/batching_util/batch_input_task.h @@ -0,0 +1,266 @@ +/* Copyright 2021 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_KERNELS_BATCHING_UTIL_BATCH_INPUT_TASK_H_ +#define TENSORFLOW_CORE_KERNELS_BATCHING_UTIL_BATCH_INPUT_TASK_H_ + +#include +#include +#include +#include +#include + +#include "absl/base/call_once.h" +#include "absl/container/fixed_array.h" +#include "absl/synchronization/mutex.h" +#include "tensorflow/core/kernels/batching_util/batch_scheduler.h" +#include "tensorflow/core/kernels/batching_util/concat_split_util.h" +#include "tensorflow/core/kernels/batching_util/input_split_metadata.h" +#include "tensorflow/core/platform/errors.h" +#include "tensorflow/core/platform/thread_annotations.h" +#include "tensorflow/core/util/incremental_barrier.h" + +namespace tensorflow { +namespace serving { + +namespace internal { +template +class BatchInputTaskHandleTestAccess; + +template +class BatchInputTaskTestAccess; + +template +class BatchInputTask; + +// A RAII-style object that holds a ref-counted batch-input-task, and +// represents a slice of batch-input-task. + +// To be handed out to callers of `BatchInputTask::ToTaskHandles` quickly +// (i.e. not necessarily waiting for input split) +// +// `BatchInputTaskHandle::GetSplitTask` evaluates to the slice of task. +template +class BatchInputTaskHandle : public BatchTask { + public: + BatchInputTaskHandle( + std::shared_ptr> batch_input_task, int split_id, + size_t task_size); + + // Should be called once. Returns nullptr on subsequent calls. + std::unique_ptr GetSplitTask(); + + // Returns the size of this task. + size_t size() const override { return task_size_; } + + private: + template + friend class internal::BatchInputTaskHandleTestAccess; + + int split_id() const { return split_id_; } + + std::shared_ptr> batch_input_task_; + + // The handle evaluates to the N-th slice of original task, and + // N is `split_id_`. + const int split_id_; + + const size_t task_size_; + + std::atomic once_{false}; +}; + +// BatchInputTask encapsulates a input (`input_task`) to be batched and the +// information to get task splits after it's enqueued, so as to support lazy +// split of a task. +// +// Input split could reduce excessive padding for efficiency; lazy split +// moves task-split out of the critical path of enqueue and dequeue and reduces +// contention. +// +// BatchInputTask is thread safe. +// +// Usage +// +// ... a deque with frequent enqueue and dequeue operations ... +// ... Note, a deque of Batch of BatchInputTaskHandle is used to form batches +// at enqueue time (split is lazy at deque time); +// ... For use cases to form batches at dequeue time, we can use a deque of +// BatchInputTaskHandle directly, and "peek" metadata to form a batch by +// then. +// std::deque>>> deque_ +// TF_GUARDED_BY(mu_); +// +// std::unique_ptr input_task; +// +// ... Enqueue path ... +// +// { +// mutex_lock l(mu_); +// std::shared_ptr> batch_input_task = +// ConstructLazyBatchWithoutSplit(input_task); +// +// std::vector>> task_handles; +// input_batch->ToTaskHandles(&task_handles); +// for (int i = 0; i < task_handles.size(); ++i) { +// EnqueueTaskHandleIntoDeque(deque_); +// } +// +// ... Dequeue path ... +// std::unique_ptr>> handles_to_schedule; +// { +// mutex_lock l(mu_); +// ... HasBatchToSchedule could be customized or specialized +// ... (e.g., readiness depending on enqueue time) +// if (HasBatchToSchedule(deque_)) { +// handles_to_schedule = std::move(deque_.front()); +// deque_.pop_front(); +// } +// } +// ...... `mu_` is released ...... +// +// std::vector>> tasks_in_batch = +// RemoveAllTasksFromBatch(handles_to_schedule); +// +// std::unique_ptr> batch_to_schedule; +// for (int i = 0; i < tasks_in_batch.size(); i++) { +// batch_to_schedule->AddTask(std::move(tasks_in_batch[i]->GetSplitTask())); +// } +// batch_to_schedule->Close(); +// +// `batch_to_schedule` is ready for schedule. +template +class BatchInputTask + : public std::enable_shared_from_this> { + public: + using SplitInputFunc = std::function* input_task, int first_output_task_size, + int input_batch_size_limit, + std::vector>* output_tasks)>; + + BatchInputTask(std::unique_ptr input_task, + int open_batch_remaining_slot, int batch_size_limit, + SplitInputFunc split_input_func); + + // Outputs the task handles for the input task. + // Each task handle represents a slice of task after input task is split, and + // could evaluate to that slice. + // + // NOTE: + // Each task handle in `output_task_handles` takes ownership of a reference of + // this BatchInputTask. + void ToTaskHandles( + std::vector>>* + output_task_handles); + + private: + friend class BatchInputTaskHandle; + template + friend class internal::BatchInputTaskTestAccess; + + std::unique_ptr GetSplitTask(int split_id); + + Status SplitBatches(std::vector>* output_tasks); + + std::unique_ptr input_task_; + + const int input_task_size_ = 0; + const int open_batch_remaining_slot_; + + const int batch_size_limit_; + const SplitInputFunc split_func_; + + const InputSplitMetadata input_split_metadata_; + + mutable absl::once_flag once_; + + std::vector> task_splits_; + Status split_status_; +}; + +// +// Implementation details. API readers may skip. +// + +template +BatchInputTaskHandle::BatchInputTaskHandle( + std::shared_ptr> batch_input_task, int split_id, + size_t task_size) + : batch_input_task_(batch_input_task), + split_id_(split_id), + task_size_(task_size) {} + +template +std::unique_ptr BatchInputTaskHandle::GetSplitTask() { + if (once_.load(std::memory_order_acquire)) { + return nullptr; + } + once_.store(true, std::memory_order_release); + return batch_input_task_->GetSplitTask(split_id_); +} + +template +BatchInputTask::BatchInputTask(std::unique_ptr input_task, + int open_batch_remaining_slot, + int batch_size_limit, + SplitInputFunc split_input_func) + : input_task_(std::move(input_task)), + input_task_size_(input_task_->size()), + open_batch_remaining_slot_(open_batch_remaining_slot), + batch_size_limit_(batch_size_limit), + split_func_(split_input_func), + input_split_metadata_(input_task_size_, open_batch_remaining_slot, + batch_size_limit) {} + +template +void BatchInputTask::ToTaskHandles( + std::vector>>* + task_handles) { + const absl::FixedArray& task_sizes = input_split_metadata_.task_sizes(); + task_handles->resize(task_sizes.size()); + for (int i = 0; i < task_handles->size(); i++) { + (*task_handles)[i] = std::make_unique>( + this->shared_from_this(), i, task_sizes[i]); + } +} + +template +std::unique_ptr BatchInputTask::GetSplitTask(int split_id) { + absl::call_once(once_, + [this]() { split_status_ = SplitBatches(&task_splits_); }); + if (!split_status_.ok()) { + LOG_EVERY_N_SEC(WARNING, 60 /* seconds */) + << "Split task with error: " << split_status_ << " split metadata is " + << input_split_metadata_.DebugString(); + return nullptr; + } + if (split_id >= 0 && split_id < task_splits_.size()) { + return std::move(task_splits_[split_id]); + } + return nullptr; +} + +template +Status BatchInputTask::SplitBatches( + std::vector>* output_tasks) { + return split_func_(&input_task_, open_batch_remaining_slot_, + batch_size_limit_, output_tasks); +} + +} // namespace internal +} // namespace serving +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_BATCHING_UTIL_BATCH_INPUT_TASK_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/batching_util/batch_resource_base.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/batching_util/batch_resource_base.h new file mode 100644 index 0000000000000000000000000000000000000000..b7e634f8f95a1d7997cc4c161e31f33909d93b6f --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/batching_util/batch_resource_base.h @@ -0,0 +1,317 @@ +/* Copyright 2020 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_KERNELS_BATCHING_UTIL_BATCH_RESOURCE_BASE_H_ +#define TENSORFLOW_CORE_KERNELS_BATCHING_UTIL_BATCH_RESOURCE_BASE_H_ + +#include +#include +#include +#include +#include +#include + +#include "absl/strings/str_join.h" +#include "absl/synchronization/blocking_counter.h" +#include "tensorflow/core/common_runtime/cost_measurement_registry.h" +#include "tensorflow/core/common_runtime/request_cost.h" +#include "tensorflow/core/framework/op_kernel.h" +#include "tensorflow/core/framework/resource_mgr.h" +#include "tensorflow/core/framework/tensor.h" +#include "tensorflow/core/framework/tensor_shape.h" +#include "tensorflow/core/kernels/batching_util/adaptive_shared_batch_scheduler.h" +#include "tensorflow/core/kernels/batching_util/batch_scheduler.h" +#include "tensorflow/core/kernels/batching_util/shared_batch_scheduler.h" +#include "tensorflow/core/kernels/batching_util/threadsafe_status.h" +#include "tensorflow/core/platform/context.h" +#include "tensorflow/core/platform/status.h" +#include "tensorflow/core/platform/thread_annotations.h" +#include "tensorflow/core/protobuf/config.pb.h" +#include "tsl/platform/criticality.h" + +namespace tensorflow { +namespace serving { + +// Base class for resource that encapsulating the state and logic for batching +// tensors. +class BatchResourceBase : public ResourceBase { + public: + // Given a BatchTask (from one op invocation) with 'num_outputs'== M and + // splitted into N sub tasks, TensorMatrix is a N X M matrix. + // Namely, TensorMatrix[i][j] indicates the i-th split tensor of j-th output; + // concatenating tensors along the 2nd dimension gives a output tensor. + typedef std::vector> TensorMatrix; + + // One task to be batched, corresponds to a `slice` of input from one batch-op + // invocation. + // + // Given input from one batch-op invocation, a `slice` of this input is: + // 1) Split each Tensor in `BatchTask::inputs` along the 0th dimension. + // 2) 'split_index' is calculated along the 0-th dimension. + // + // Note input from one batch-op invocation is valid and considered a + // specialized `slice`. + struct BatchTask : public tensorflow::serving::BatchTask { + // A unique ID to identify this invocation of Batch. + int64_t guid; + + Context propagated_context; + + std::vector inputs; + std::vector captured_inputs; + OpKernelContext* context; + AsyncOpKernel::DoneCallback done_callback; + + // The index of this split, along the 0-th dimension of input from op + // invocation. + int split_index = 0; + + // Two-dimensional tensor matrix, ownership shared by: + // 1) each split of task (to fill one row in this matrix) + // and + // 2) callback that runs to merge output of individual splits for an op + // invocation, after all splits complete. + std::shared_ptr output; + + // 'status' records error (could be from any split) if at least one split + // returns error, OK otherwise. + // Ownership is shared by individual splits and callback. + std::shared_ptr status; + + bool is_partial = false; + + uint64 start_time; + + size_t size() const override { return inputs[0].shape().dim_size(0); } + + // Create a split task from this one. The caller needs to setup the inputs + // of the new task + std::unique_ptr CreateSplitTask( + int split_index, AsyncOpKernel::DoneCallback done_callback); + + // RequestCost is for collecting the cost and must outlive the batching + // processing. + // + // For example, to collect cost in rpc processing, `request_cost` is owned + // by rpc handler and points to the RequestCost of an rpc which provides + // the inputs to this BatchTask. + // + // After the batch processing, the request cost will be incremented with + // this task's processing costs. + RequestCost* request_cost = nullptr; + + tsl::criticality::Criticality criticality; + + // If nonzero, make a batch of this size entirely out of padding. This + // batch is processed, but is not propagated to the kernel outputs. + int forced_warmup_batch_size = 0; + + protected: + virtual std::unique_ptr CreateDerivedTask() { + return std::make_unique(); + } + }; + + // Appending a T suffix to make the type alias different to those in + // tensorflow::serving namespace, because some versions of compiler complain + // about changing meaning of the symbols. + using BatcherT = SharedBatchScheduler; + using AdaptiveBatcherT = + AdaptiveSharedBatchScheduler; + using BatcherQueueT = BatchScheduler; + using BatchT = Batch; + + BatchResourceBase(bool has_process_batch_function, + std::shared_ptr batcher, + const BatcherT::QueueOptions& batcher_queue_options, + std::vector allowed_batch_sizes) + : has_process_batch_function_(has_process_batch_function), + batcher_(std::move(batcher)), + batcher_queue_options_(batcher_queue_options), + allowed_batch_sizes_(std::move(allowed_batch_sizes)), + allowed_batch_sizes_str_(absl::StrJoin(allowed_batch_sizes_, ",")) {} + + BatchResourceBase(bool has_process_batch_function, + std::shared_ptr batcher, + const AdaptiveBatcherT::QueueOptions& batcher_queue_options, + std::vector allowed_batch_sizes) + : has_process_batch_function_(has_process_batch_function), + adaptive_batcher_(std::move(batcher)), + adaptive_batcher_queue_options_(batcher_queue_options), + allowed_batch_sizes_(std::move(allowed_batch_sizes)), + allowed_batch_sizes_str_(absl::StrJoin(allowed_batch_sizes_, ",")) {} + + void set_session_metadata(tensorflow::SessionMetadata session_metadata) { + session_metadata_ = std::move(session_metadata); + } + + const SessionMetadata& session_metadata() const { return session_metadata_; } + + using CreateBatchTaskFn = + std::function>()>; + + // Like `RegisterInput`, but extra "dummy" batches are processed for each + // batch size. Only the real request's outputs are propagated to the caller. + Status RegisterWarmupInputs(int64_t guid, OpKernelContext* context, + const string& batcher_queue_name, + const CreateBatchTaskFn& create_batch_task_fn, + AsyncOpKernel::DoneCallback done); + // Ingests data from one invocation of the batch op. The data is enqueued to + // be combined with others into a batch, asynchronously. + Status RegisterInput(int64_t guid, OpKernelContext* context, + const string& batcher_queue_name, + const CreateBatchTaskFn& create_batch_task_fn, + AsyncOpKernel::DoneCallback done_callback, + int forced_warmup_batch_size = 0); + + static BatcherT::QueueOptions GetBatcherQueueOptions( + int32_t num_batch_threads, int32_t max_batch_size, + int32_t batch_timeout_micros, int32_t max_enqueued_batches, + const std::vector& allowed_batch_sizes, + bool enable_large_batch_splitting, bool disable_padding); + + static BatcherT::QueueOptions GetBatcherQueueOptions( + int32_t num_batch_threads, int32_t max_batch_size, + int32_t batch_timeout_micros, int32_t max_enqueued_batches, + const std::vector& allowed_batch_sizes, + bool enable_large_batch_splitting, bool disable_padding, + int32_t low_priority_max_batch_size, + int32_t low_priority_batch_timeout_micros, + int32_t low_priority_max_enqueued_batches, + const std::vector& low_priority_allowed_batch_sizes); + + static AdaptiveBatcherT::QueueOptions GetAdaptiveBatcherQueueOptions( + int32_t max_batch_size, int32_t batch_timeout_micros, + int32_t max_enqueued_batches, bool enable_large_batch_splitting, + const std::vector& allowed_batch_sizes, bool disable_padding); + + // Split 'input' of 'input_task_ptr' along 0th dimension, into a list of + // 'output_tasks'. + // Task sizes are determined by + // 1) open_batch_remaining_slot + // 2) max_batch_size + // 3) size-of-input-task + // in a way that + // 1) Task sizes add up to `size-of-input-task`. + // 2) Task sizes from left to right are like + // [open_batch_remaining_slot, max_batch_size, max_batch_size, ..., + // `size-of-input-task` - `sum-of-previous-elements`]. + // + // REQUIRES: + // Caller should make sure size-of-input-task is greater than + // open_batch_remaining_slot. + static Status SplitInputTask( + std::unique_ptr* input_task_ptr, int open_batch_remaining_slot, + int max_batch_size, + std::vector>* output_tasks); + + // Splits the batch costs to each task. + // + // Inputs: + // 1) batch_cost_measurements, which provides the total cost of each type; + // 2) processed_size, it's the batch size plus the padding amount; + // 3) batch, provides the batch size and input sizes. + // + // Outputs: + // The request_cost in each batch task will be updated. + // - This function will use two approaches to split the batch cost (if it's + // non-zero), thus two costs will be output. + // 1) smeared cost: batch cost is split proportionally to each task's size, + // and paddings do not share any cost; + // 2) non-smeared cost: batch cost is split proportionally to each task or + // padding's size. Here padding's cost is not assigned to any tasks. + // - This function will also record the metrics of this batch in each task, + // including: + // 1) the batch size; + // 2) the input size from this task; + // 3) the padding amount. + static void SplitBatchCostsAndRecordMetrics( + std::vector>& batch_cost_measurements, + int64_t processed_size, BatchT& batch); + + private: + // Implementation of calling the process batch function. + virtual void ProcessFuncBatchImpl( + const BatchResourceBase::BatchTask& last_task, + absl::Span inputs, std::vector* combined_outputs, + std::function done) const = 0; + + // Validates that it's legal to combine the tasks in 'batch' into a batch. + // Assumes the batch is non-empty. + static Status ValidateBatch(const BatchT& batch); + + // Returns the smallest entry in 'allowed_batch_sizes_' that is greater than + // or equal to 'batch_size'. If 'allowed_batch_sizes_' is empty, simply + // returns 'batch_size'. + int RoundToLowestAllowedBatchSize(int batch_size) const; + + Status ConcatInputTensors(const BatchT& batch, OpKernelContext* context, + std::vector* concatenated_tensors) const; + + Status SplitOutputTensors(const std::vector& combined_outputs, + BatchT* batch) const; + + void ProcessFuncBatch(std::unique_ptr batch) const; + + // Processes a batch of one or more BatchTask entries. + void ProcessBatch(std::unique_ptr batch) const; + + // Emits an index tensor, which the Unbatch op will use to un-concatenate + // the tensor and attribute the pieces to the right batch keys. The index + // tensor contains, for each input: [batch_key, start_offset, end_offset] + // where start_offset and end_offset represent the range of entries in the + // concatenated tensors that belong to that input. + // + // Emits the result to the output at 'output_index' using 'context'. + static Status EmitIndexTensor(OpKernelContext* context, const BatchT& batch, + int output_index); + + // Looks up the batcher queue for 'queue_name'. If it did't previously exist, + // creates it. + Status LookupOrCreateBatcherQueue(const string& queue_name, + BatcherQueueT** queue); + + SessionMetadata session_metadata_; + + absl::Mutex outstanding_batch_mu_; + int num_outstanding_batched_items_ TF_GUARDED_BY(outstanding_batch_mu_) = 0; + + // True if user specified a batch processing function for this resource. + const bool has_process_batch_function_; + // A batch scheduler, and options for creating queues. + std::shared_ptr batcher_; + BatcherT::QueueOptions batcher_queue_options_; + + // A batch scheduler, and options for creating queues. + std::shared_ptr adaptive_batcher_; + AdaptiveBatcherT::QueueOptions adaptive_batcher_queue_options_; + + // A collection of batcher queues, keyed on queue name. + // TODO(olston): Garbage-collect unused queues (perhaps simply remove empty + // ones (with a time delay?); it's okay if they get recreated later). + mutable mutex batcher_queues_mu_; + std::map> batcher_queues_ + TF_GUARDED_BY(batcher_queues_mu_); + + std::vector allowed_batch_sizes_; + // A concatenated string of , separated by ",". This is + // used to record batching parameter. + string allowed_batch_sizes_str_; +}; + +} // namespace serving +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_BATCHING_UTIL_BATCH_RESOURCE_BASE_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/batching_util/batch_scheduler.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/batching_util/batch_scheduler.h new file mode 100644 index 0000000000000000000000000000000000000000..2baff4ec9cfa57cde82ecb83ca65ef05ac505a25 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/batching_util/batch_scheduler.h @@ -0,0 +1,332 @@ +/* Copyright 2016 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +// Abstractions for processing small tasks in a batched fashion, to reduce +// processing times and costs that can be amortized across multiple tasks. +// +// The core class is BatchScheduler, which groups tasks into batches. +// +// BatchScheduler encapsulates logic for aggregating multiple tasks into a +// batch, and kicking off processing of a batch on a thread pool it manages. +// +// This file defines an abstract BatchScheduler class. + +#ifndef TENSORFLOW_CORE_KERNELS_BATCHING_UTIL_BATCH_SCHEDULER_H_ +#define TENSORFLOW_CORE_KERNELS_BATCHING_UTIL_BATCH_SCHEDULER_H_ + +#include + +#include +#include +#include +#include +#include + +#include "tensorflow/core/lib/core/notification.h" +#include "tensorflow/core/lib/core/status.h" +#include "tensorflow/core/platform/logging.h" +#include "tensorflow/core/platform/macros.h" +#include "tensorflow/core/platform/mutex.h" +#include "tensorflow/core/platform/thread_annotations.h" +#include "tensorflow/core/platform/types.h" +#include "tensorflow/core/profiler/lib/traceme.h" + +namespace tensorflow { +namespace serving { + +// The abstract superclass for a unit of work to be done as part of a batch. +// +// An implementing subclass typically contains (or points to): +// (a) input data; +// (b) a thread-safe completion signal (e.g. a Notification); +// (c) a place to store the outcome (success, or some error), upon completion; +// (d) a place to store the output data, upon success. +// +// Items (b), (c) and (d) are typically non-owned pointers to data homed +// elsewhere, because a task's ownership gets transferred to a BatchScheduler +// (see below) and it may be deleted as soon as it is done executing. +class BatchTask { + public: + virtual ~BatchTask() = default; + + // Returns the size of the task, in terms of how much it contributes to the + // size of a batch. (A batch's size is the sum of its task sizes.) + virtual size_t size() const = 0; +}; + +// A thread-safe collection of BatchTasks, to be executed together in some +// fashion. +// +// At a given time, a batch is either "open" or "closed": an open batch can +// accept new tasks; a closed one cannot. A batch is monotonic: initially it is +// open and tasks can be added to it; then it is closed and its set of tasks +// remains fixed for the remainder of its life. A closed batch cannot be re- +// opened. Tasks can never be removed from a batch. +// +// Type parameter TaskType must be a subclass of BatchTask. +template +class Batch { + public: + Batch(); + explicit Batch(uint64 traceme_context_id); + virtual ~Batch(); // Blocks until the batch is closed. + + // Appends 'task' to the batch. After calling AddTask(), the newly-added task + // can be accessed via task(num_tasks()-1) or mutable_task(num_tasks()-1). + // Dies if the batch is closed. + void AddTask(std::unique_ptr task); + + // Removes the most recently added task. Returns nullptr if the batch is + // empty. + std::unique_ptr RemoveTask(); + + // Caller takes ownership of returned tasks. + // Must be called after a batch is closed. + std::vector> RemoveAllTasks(); + + // Returns the number of tasks in the batch. + int num_tasks() const; + + // Returns true iff the batch contains 0 tasks. + bool empty() const; + + // Returns a reference to the ith task (in terms of insertion order). + const TaskType& task(int i) const; + + // Returns a pointer to the ith task (in terms of insertion order). + // + // Caller doesn't take ownership. + TaskType* mutable_task(int i); + + // Returns the sum of the task sizes. + size_t size() const; + + // Returns true iff the batch is currently closed. + bool IsClosed() const; + + // Blocks until the batch is closed. + void WaitUntilClosed() const; + + // Marks the batch as closed. Dies if called more than once. + void Close(); + + // Returns the TraceMe context id of this batch. + uint64 traceme_context_id() const; + + private: + mutable mutex mu_; + + // The tasks in the batch. + std::vector> tasks_ TF_GUARDED_BY(mu_); + + // The sum of the sizes of the tasks in 'tasks_'. + size_t size_ TF_GUARDED_BY(mu_) = 0; + + std::atomic empty_ TF_GUARDED_BY(mu_){true}; + + // Whether the batch has been closed. + Notification closed_; + + // The TracMe context id. + const uint64 traceme_context_id_; + + Batch(const Batch&) = delete; + void operator=(const Batch&) = delete; +}; + +// An abstract batch scheduler class. Collects individual tasks into batches, +// and processes each batch on a pool of "batch threads" that it manages. The +// actual logic for processing a batch is accomplished via a callback. +// +// Type parameter TaskType must be a subclass of BatchTask. +template +class BatchScheduler { + public: + virtual ~BatchScheduler() = default; + + // Submits a task to be processed as part of a batch. + // + // Ownership of '*task' is transferred to the callee iff the method returns + // Status::OK. In that case, '*task' is left as nullptr. Otherwise, '*task' is + // left as-is. + // + // If no batch processing capacity is available to process this task at the + // present time, and any task queue maintained by the implementing subclass is + // full, this method returns an UNAVAILABLE error code. The client may retry + // later. + // + // Other problems, such as the task size being larger than the maximum batch + // size, yield other, permanent error types. + // + // In all cases, this method returns "quickly" without blocking for any + // substantial amount of time. If the method returns Status::OK, the task is + // processed asynchronously, and any errors that occur during the processing + // of the batch that includes the task can be reported to 'task'. + virtual Status Schedule(std::unique_ptr* task) = 0; + + // Returns the number of tasks that have been scheduled (i.e. accepted by + // Schedule()), but have yet to be handed to a thread for execution as part of + // a batch. Note that this returns the number of tasks, not the aggregate task + // size (so if there is one task of size 3 and one task of size 5, this method + // returns 2 rather than 8). + virtual size_t NumEnqueuedTasks() const = 0; + + // Returns a guaranteed number of size 1 tasks that can be Schedule()d without + // getting an UNAVAILABLE error. In a typical implementation, returns the + // available space on a queue. + // + // There are two important caveats: + // 1. The guarantee does not extend to varying-size tasks due to possible + // internal fragmentation of batches. + // 2. The guarantee only holds in a single-thread environment or critical + // section, i.e. if an intervening thread cannot call Schedule(). + // + // This method is useful for monitoring, or for guaranteeing a future slot in + // the schedule (but being mindful about the caveats listed above). + virtual size_t SchedulingCapacity() const = 0; + + // Returns the maximum allowed size of tasks submitted to the scheduler. (This + // is typically equal to a configured maximum batch size.) + virtual size_t max_task_size() const = 0; +}; + +////////// +// Implementation details follow. API users need not read. + +template +Batch::Batch() : Batch(0) {} + +template +Batch::Batch(uint64 traceme_context_id) + : traceme_context_id_(traceme_context_id) {} + +template +Batch::~Batch() { + WaitUntilClosed(); +} + +template +void Batch::AddTask(std::unique_ptr task) { + DCHECK(!IsClosed()); + { + mutex_lock l(mu_); + size_ += task->size(); + tasks_.push_back(std::move(task)); + empty_.store(false); + } +} + +template +std::vector> Batch::RemoveAllTasks() { + DCHECK(IsClosed()); + { + mutex_lock l(mu_); + size_ = 0; + empty_.store(true); + std::vector> tasks_to_return; + + // Swapping vector takes constant time. + tasks_to_return.swap(tasks_); + return std::move(tasks_to_return); + } +} + +template +std::unique_ptr Batch::RemoveTask() { + { + mutex_lock l(mu_); + if (tasks_.empty()) { + return nullptr; + } + std::unique_ptr task = std::move(tasks_.back()); + size_ -= task->size(); + tasks_.pop_back(); + if (tasks_.empty()) { + empty_.store(true); + } + return task; + } +} + +template +int Batch::num_tasks() const { + { + mutex_lock l(mu_); + return tasks_.size(); + } +} + +template +bool Batch::empty() const TF_NO_THREAD_SAFETY_ANALYSIS { + // tracer is added to zoom in about this method. + // TODO(b/160249203): Remove tracer after evaluating a change to reduce + // lock contention and cpu usage (which is observed in profiler and + // very data-driven). + tensorflow::profiler::TraceMe tracer("BatchTask::empty"); + return empty_.load(); +} + +template +const TaskType& Batch::task(int i) const { + DCHECK_GE(i, 0); + { + mutex_lock l(mu_); + DCHECK_LT(i, tasks_.size()); + return *tasks_[i].get(); + } +} + +template +TaskType* Batch::mutable_task(int i) { + DCHECK_GE(i, 0); + { + mutex_lock l(mu_); + DCHECK_LT(i, tasks_.size()); + return tasks_[i].get(); + } +} + +template +size_t Batch::size() const { + { + mutex_lock l(mu_); + return size_; + } +} + +template +bool Batch::IsClosed() const { + return const_cast(&closed_)->HasBeenNotified(); +} + +template +void Batch::WaitUntilClosed() const { + const_cast(&closed_)->WaitForNotification(); +} + +template +void Batch::Close() { + closed_.Notify(); +} + +template +uint64 Batch::traceme_context_id() const { + return traceme_context_id_; +} + +} // namespace serving +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_BATCHING_UTIL_BATCH_SCHEDULER_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/batching_util/bounded_executor.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/batching_util/bounded_executor.h new file mode 100644 index 0000000000000000000000000000000000000000..7f36fe4d70960a36e416c40d1f6cf5bbd97af48a --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/batching_util/bounded_executor.h @@ -0,0 +1,80 @@ +/* Copyright 2021 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_KERNELS_BATCHING_UTIL_BOUNDED_EXECUTOR_H_ +#define TENSORFLOW_CORE_KERNELS_BATCHING_UTIL_BOUNDED_EXECUTOR_H_ + +#include + +#include "tensorflow/core/platform/status.h" +#include "tensorflow/core/platform/statusor.h" +#include "tensorflow/core/platform/thread_annotations.h" +#include "tensorflow/core/platform/threadpool.h" +#include "tensorflow/core/platform/threadpool_interface.h" + +namespace tensorflow { +namespace serving { +// BoundedExecutor has a bounded number of threads and unlimited queue length, +// scheduled tasks are executed in a FIFO way. +class BoundedExecutor : public thread::ThreadPoolInterface { + public: + struct Options { + Env* env = Env::Default(); + ThreadOptions thread_options; + std::string thread_name; + int num_threads = -1; + }; + + static StatusOr> Create( + const Options& options); + + // Destructor. All threads will be joined. + ~BoundedExecutor() override; + + // Enqueue a function to be executed. + // + // Callers are responsible to guarantee `func` is not nullptr. + void Schedule(std::function func) override; + + // Returns the number of threads. + int NumThreads() const override; + + int CurrentThreadId() const override; + + private: + explicit BoundedExecutor(const Options& options); + + // Starts N workers (N == num_threads), polling tasks from `work_queue_`. + void InitWorker(); + + // A loop to fetch task from `work_queue_` and execute task. + void Run(); + + const Options& options_; + + mutex work_queue_mu_; + std::deque> work_queue_ TF_GUARDED_BY(work_queue_mu_); + condition_variable work_queue_cv_ TF_GUARDED_BY(work_queue_mu_); + + // A fixed number of threads. + std::vector> threads_; + BoundedExecutor(const BoundedExecutor&) = delete; + void operator=(const BoundedExecutor&) = delete; +}; + +} // namespace serving +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_BATCHING_UTIL_BOUNDED_EXECUTOR_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/batching_util/concat_split_util.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/batching_util/concat_split_util.h new file mode 100644 index 0000000000000000000000000000000000000000..77a2b16340dd081bf6182bcfa2fec4a4bad0016a --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/batching_util/concat_split_util.h @@ -0,0 +1,252 @@ +/* Copyright 2020 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_KERNELS_BATCHING_UTIL_CONCAT_SPLIT_UTIL_H_ +#define TENSORFLOW_CORE_KERNELS_BATCHING_UTIL_CONCAT_SPLIT_UTIL_H_ + +#include "tensorflow/core/framework/op_kernel.h" +#include "tensorflow/core/framework/ops_util.h" +#include "tensorflow/core/framework/tensor.h" +#include "tensorflow/core/framework/tensor_shape.h" +#include "tensorflow/core/kernels/concat_lib.h" +#include "tensorflow/core/kernels/split_lib.h" +#include "tensorflow/core/platform/status.h" + +namespace tensorflow { +namespace concat_split_util { + +typedef Eigen::ThreadPoolDevice CPUDevice; +typedef Eigen::GpuDevice GPUDevice; + +// Concatenates 'inputs' into a single tensor along the zeroth dimension. +// Requires that all elements of 'inputs' have element type T. Writes to +// 'output' using 'context' for the allocation to ensure proper device +// placement. +template +Status Concat(OpKernelContext* context, const gtl::ArraySlice inputs, + Tensor* output) { + const int input_dims = inputs[0].dims(); + const TensorShape& input_shape = inputs[0].shape(); + + // Note that we reduce the concat of k-dimensional tensors into a two + // dimensional concat. Assuming the dimensions of any input tensor are + // {y0, y1,...,ym-1}, we flatten it to {1, y}, where y = Prod_i(yi). + std::vector::ConstMatrix>> inputs_flat; + inputs_flat.reserve(inputs.size()); + int64_t output_dim0 = 0; + for (size_t i = 0; i < inputs.size(); ++i) { + const Tensor& input = inputs[i]; + if (input.dims() != input_dims) { + return errors::InvalidArgument( + "Ranks of all input tensors should match: shape[0] = ", + input_shape.DebugString(), " vs. shape[", i, + "] = ", input.shape().DebugString()); + } + for (int j = 1; j < input_dims; ++j) { + if (input.dim_size(j) != input_shape.dim_size(j)) { + return errors::InvalidArgument( + "Dimensions of inputs should match: shape[0] = ", + input_shape.DebugString(), " vs. shape[", i, + "] = ", input.shape().DebugString()); + } + } + if (input.NumElements() > 0) { + inputs_flat.emplace_back(new typename TTypes::ConstMatrix( + input.shaped({1, input.NumElements()}))); + } + output_dim0 += input.dim_size(0); + } + + TensorShape output_shape(input_shape); + output_shape.set_dim(0, output_dim0); + AllocatorAttributes attr; + attr.set_on_host(true); + TF_RETURN_IF_ERROR(context->allocate_temp(DataTypeToEnum::value, + output_shape, output, attr)); + if (output->NumElements() > 0) { + auto output_flat = output->shaped({1, output->NumElements()}); +#if (defined(GOOGLE_CUDA) && GOOGLE_CUDA) || \ + (defined(TENSORFLOW_USE_ROCM) && TENSORFLOW_USE_ROCM) + if (std::is_same::value) { + ConcatGPU(context, inputs_flat, output, &output_flat); + return OkStatus(); + } +#endif // GOOGLE_CUDA || TENSORFLOW_USE_ROCM + ConcatCPU(context->device(), inputs_flat, &output_flat); + } + + return OkStatus(); +} + +// Same as 'Concat' above, but handles Tensor dtype deduction automatically. +inline Status Concat(OpKernelContext* context, + const gtl::ArraySlice inputs, Tensor* output) { + const DataType type = inputs[0].dtype(); + Status concat_status; + switch (type) { +#define CASE(type) \ + case DataTypeToEnum::value: \ + concat_status = Concat(context, inputs, output); \ + break; + TF_CALL_ALL_TYPES(CASE); +#undef CASE + default: + concat_status = errors::InvalidArgument("Unsupported data type: ", type); + break; + } + return concat_status; +} + +// The Split*() functions split 'input' with element type T into 'sizes.size()' +// tensors along the zeroth dimension, with the ith split having zeroth- +// dimension size 'sizes[i]'. They allocate the output tensors using 'context', +// for proper device placement. + +// Handles special cases that are cheap. Sets 'done==true' iff it found an +// applicable special case and wrote to the outputs. Otherwise acts as a no-op. +template +Status SplitEasyCases(OpKernelContext* context, const Tensor& input, + const gtl::ArraySlice sizes, + std::vector* outputs, bool* done) { + *done = false; + + int64_t total_size = 0; + for (const int64_t size : sizes) { + total_size += size; + } + if (total_size > input.shape().dim_size(0)) { + return errors::InvalidArgument( + "Sum of split sizes must not exceed dim0-size of input tensor"); + } + + // Special case 0: trivial 1-way split. + if (sizes.size() == 1 && sizes.at(0) == input.shape().dim_size(0)) { + outputs->push_back(input); + *done = true; + return OkStatus(); + } + + // Special case 1: input is aligned. + if (IsInnerDimsSizeAligned(input.shape())) { + int64_t position = 0; + for (const int64_t size : sizes) { + outputs->emplace_back(input.Slice(position, position + size)); + position += size; + } + *done = true; + return OkStatus(); + } + + return OkStatus(); +} + +// Handles the general case, on CPU. +template +Status SplitCPU(OpKernelContext* context, const Tensor& input, + const gtl::ArraySlice sizes, + std::vector* outputs) { + int64_t suffix_dim_size = 1; + for (int i = 1; i < input.shape().dims(); ++i) { + suffix_dim_size *= input.shape().dim_size(i); + } + auto input_reshaped = + input.shaped({input.shape().dim_size(0), suffix_dim_size}); + + int64_t position = 0; + for (const int64_t size : sizes) { + TensorShape output_shape = input.shape(); + output_shape.set_dim(0, size); + Tensor output; + AllocatorAttributes attr; + attr.set_on_host(true); + TF_RETURN_IF_ERROR( + context->allocate_temp(input.dtype(), output_shape, &output, attr)); + auto output_shaped = output.shaped({size, suffix_dim_size}); + + Eigen::DSizes slice_indices{ + static_cast(position), 0}; + Eigen::DSizes slice_sizes{ + static_cast(size), + static_cast(suffix_dim_size)}; + functor::Split()(context->eigen_device(), + output_shaped, input_reshaped, + slice_indices, slice_sizes); + + outputs->emplace_back(output); + + position += size; + } + + return OkStatus(); +} + +#if (defined(GOOGLE_CUDA) && GOOGLE_CUDA) || \ + (defined(TENSORFLOW_USE_ROCM) && TENSORFLOW_USE_ROCM) + +// Handles the general case, on GPU. +template +Status SplitGPU(OpKernelContext* context, const Tensor& input, + const gtl::ArraySlice& sizes, + std::vector* outputs) { + // TODO(olston, apassos): Implement this. + LOG(FATAL) << "Not yet implemented"; // Crash ok +} + +#endif // GOOGLE_CUDA || TENSORFLOW_USE_ROCM + +// The outer function that dispatches to the various Split*() functions above. +template +Status Split(OpKernelContext* context, const Tensor& input, + const gtl::ArraySlice sizes, + std::vector* outputs) { + bool easy_cases_done; + TF_RETURN_IF_ERROR( + SplitEasyCases(context, input, sizes, outputs, &easy_cases_done)); + if (easy_cases_done) { + return OkStatus(); + } + +#if (defined(GOOGLE_CUDA) && GOOGLE_CUDA) || \ + (defined(TENSORFLOW_USE_ROCM) && TENSORFLOW_USE_ROCM) +// TODO(olston, apassos): Handle non-CPU cases. +// return SplitGPU(context, input, sizes, outputs); +#endif // GOOGLE_CUDA || TENSORFLOW_USE_ROCM + return SplitCPU(context, input, sizes, outputs); +} + +// Same as 'Split' above, but handles Tensor dtype automatically. +inline Status Split(OpKernelContext* context, const Tensor& input, + const gtl::ArraySlice sizes, + std::vector* outputs) { + const DataType type = input.dtype(); + Status split_status; + switch (type) { +#define CASE(type) \ + case DataTypeToEnum::value: \ + split_status = Split(context, input, sizes, outputs); \ + break; + TF_CALL_ALL_TYPES(CASE); +#undef CASE + default: + split_status = errors::InvalidArgument("Unsupported data type: ", type); + break; + } + return split_status; +} + +} // namespace concat_split_util +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_BATCHING_UTIL_CONCAT_SPLIT_UTIL_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/batching_util/input_split_metadata.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/batching_util/input_split_metadata.h new file mode 100644 index 0000000000000000000000000000000000000000..429858d318a98e4500273866309adbefa05ab6ae --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/batching_util/input_split_metadata.h @@ -0,0 +1,55 @@ +/* Copyright 2021 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_KERNELS_BATCHING_UTIL_INPUT_SPLIT_METADATA_H_ +#define TENSORFLOW_CORE_KERNELS_BATCHING_UTIL_INPUT_SPLIT_METADATA_H_ + +#include + +#include "absl/container/fixed_array.h" + +namespace tensorflow { +namespace serving { +namespace internal { +// InputSplitMetadata represents the task sizes of an batch-task after it's +// tailored according to queue status (`open_batch_remaining_slot` and +// `batch_size_limit`). +// +// This is an internal helper class, and the implementation is shared +// shared across different instantiations of internal::Queue +// in input-split mode (QueueOptions.enable_large_batch_splitting is true). +class InputSplitMetadata { + public: + InputSplitMetadata(int input_task_size, int open_batch_remaining_slot, + int batch_size_limit); + + // Returns underlying task sizes. + const absl::FixedArray& task_sizes() const; + + // Serializes task split metadata into a string for debugging. + std::string DebugString() const; + + private: + absl::FixedArray generate_task_sizes(int input_task_size, + int open_batch_remaining_slot, + int batch_size_limit) const; + + const absl::FixedArray task_sizes_; +}; +} // namespace internal +} // namespace serving +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_BATCHING_UTIL_INPUT_SPLIT_METADATA_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/batching_util/periodic_function.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/batching_util/periodic_function.h new file mode 100644 index 0000000000000000000000000000000000000000..278cfac246495dcc19a276fafb7924b291518f7e --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/batching_util/periodic_function.h @@ -0,0 +1,130 @@ +/* Copyright 2016 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +// PeriodicFunction will periodically call the given function with a specified +// period in a background thread. After Start() returns, the thread is +// guaranteed to have started. The destruction of the class causes the +// background thread to be destroyed as well. Start() should not be called more +// than once. +// +// PeriodicFunction runs the function as soon as any previous run both is +// complete and was started more than "interval_micros" earlier. Thus, runs are +// both serialized, and normally have a period of "interval_micros" if no run +// exceeds the time. +// +// Note that, if the function takes longer than two interval_micross to finish, +// then PeriodicFunction will "skip" at least one call to the function. For +// instance, if the period is 50ms and the function starts runs at time 0 for +// 150ms, then the function will immediately start executing again at time 150, +// but there will be no function runs corresponding to times 50 or 100. This is +// especially important to remember when using an environment with a simulated +// clock: advancing simulated time atomically over N interval_micross will not +// cause the function to be called N times. +// +// This object is thread-safe. +// +// Example: +// +// class Foo { +// public: +// Foo() : periodic_function_([this]() { Bar(); }, +// 1000 /* 1000us == 1ms*/) { +// } +// +// private: +// void Bar() { ... } +// +// PeriodicFunction periodic_function_; +// }; + +#ifndef TENSORFLOW_CORE_KERNELS_BATCHING_UTIL_PERIODIC_FUNCTION_H_ +#define TENSORFLOW_CORE_KERNELS_BATCHING_UTIL_PERIODIC_FUNCTION_H_ + +#include +#include +#include + +#include "absl/functional/any_invocable.h" +#include "tensorflow/core/lib/core/notification.h" +#include "tensorflow/core/platform/env.h" +#include "tensorflow/core/platform/macros.h" +#include "tensorflow/core/platform/types.h" + +namespace tensorflow { +namespace serving { + +namespace internal { +class PeriodicFunctionTestAccess; +} + +class PeriodicFunction { + public: + // Provides the ability to customize several aspects of the PeriodicFunction. + // Passed to constructor of PeriodicFunction. + struct Options { + Options() {} + + // Any standard thread options, such as stack size, should + // be passed via "thread_options". + ThreadOptions thread_options; + + // Specifies the thread name prefix (see the description in class + // Thread). + string thread_name_prefix = "periodic_function"; + + // The environment to use. Does not take ownership, but must remain alive + // for as long as the PeriodicFunction exists. + Env* env = Env::Default(); + + // Specifies the length of sleep before the first invocation of the + // function. + // This can be used for adding a random jitter to avoid synchronous behavior + // across multiple periodic functions. + int64_t startup_delay_micros = 0; + }; + + // Also starts the background thread which will be calling the function. + PeriodicFunction(absl::AnyInvocable function, int64_t interval_micros, + const Options& options = Options()); + + ~PeriodicFunction(); + + private: + friend class internal::PeriodicFunctionTestAccess; + + // Notifies the background thread to stop. + void NotifyStop(); + + // (Blocking.) Loops forever calling "function_" every "interval_micros_". + void RunLoop(int64_t start); + + absl::AnyInvocable function_; // Actual client function + const int64_t interval_micros_; // Interval between calls. + const Options options_; + + // Used to notify the thread to stop. + Notification stop_thread_; + + // Thread for running "function_" + std::unique_ptr thread_ = nullptr; + + PeriodicFunction(const PeriodicFunction&) = delete; + void operator=(const PeriodicFunction&) = delete; +}; + +} // namespace serving +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_BATCHING_UTIL_PERIODIC_FUNCTION_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/batching_util/shared_batch_scheduler.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/batching_util/shared_batch_scheduler.h new file mode 100644 index 0000000000000000000000000000000000000000..2b95b91b8f103e2c372dbbd5fa545de90affda60 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/batching_util/shared_batch_scheduler.h @@ -0,0 +1,1290 @@ +/* Copyright 2016 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_KERNELS_BATCHING_UTIL_SHARED_BATCH_SCHEDULER_H_ +#define TENSORFLOW_CORE_KERNELS_BATCHING_UTIL_SHARED_BATCH_SCHEDULER_H_ + +#include + +#include +#include +#include +#include +#include +#include + +#include "absl/time/clock.h" +#include "absl/types/variant.h" +#include "tensorflow/core/kernels/batching_util/batch_input_task.h" +#include "tensorflow/core/kernels/batching_util/batch_scheduler.h" +#include "tensorflow/core/kernels/batching_util/periodic_function.h" +#include "tensorflow/core/lib/core/errors.h" +#include "tensorflow/core/lib/core/status.h" +#include "tensorflow/core/lib/strings/strcat.h" +#include "tensorflow/core/platform/cpu_info.h" +#include "tensorflow/core/platform/env.h" +#include "tensorflow/core/platform/errors.h" +#include "tensorflow/core/platform/thread_annotations.h" +#include "tensorflow/core/platform/types.h" +#include "tensorflow/core/profiler/lib/connected_traceme.h" +#include "tensorflow/core/profiler/lib/traceme.h" +#include "tensorflow/core/profiler/lib/traceme_encode.h" + +namespace tensorflow { +namespace serving { +namespace internal { +template +class Queue; +} // namespace internal +} // namespace serving +} // namespace tensorflow + +namespace tensorflow { +namespace serving { + +// A batch scheduler for server instances that service multiple request types +// (e.g. multiple machine-learned models, or multiple versions of a model served +// concurrently), or even multiple distinct tasks for a given request. The +// scheduler multiplexes batches of different kinds of tasks onto a fixed-size +// thread pool (each batch contains tasks of a single type), in a carefully +// controlled manner. A common configuration is to set the number of threads +// equal to the number of hardware accelerator units, in which case the +// scheduler takes care of multiplexing the task types onto the shared hardware, +// in a manner that is both fair and efficient. +// +// Semantically, SharedBatchScheduler behaves like having N instances of +// BasicBatchScheduler (see basic_batch_scheduler.h), one per task type. The +// difference is that under the covers there is a single shared thread pool, +// instead of N independent ones, with their sharing deliberately coordinated. +// +// SharedBatchScheduler does not implement the BatchScheduler API; rather, it +// presents an abstraction of "queues", where each queue corresponds to one type +// of task. Tasks submitted to a given queue are placed in their own batches, +// and cannot be mixed with other tasks. Queues can be added and deleted +// dynamically, to accommodate e.g. versions of a model being brought up and +// down over the lifetime of a server. +// +// The batch thread pool round-robins through the queues, running one batch +// from a queue and then moving to the next queue. Each queue behaves like a +// BasicBatchScheduler instance, in the sense that it has maximum batch size and +// timeout parameters, which govern when a batch is eligible to be processed. +// +// Each queue is independently configured with a maximum size (in terms of the +// maximum number of batches worth of enqueued tasks). For online serving, it is +// recommended that the queue sizes be configured such that the sum of the sizes +// of the active queues roughly equal the number of batch threads. (The idea is +// that if all threads become available at roughly the same time, there will be +// enough enqueued work for them to take on, but no more.) +// +// If queue sizes are configured in the manner suggested above, the maximum time +// a task can spend in a queue before being placed in a batch and assigned to a +// thread for processing, is the greater of: +// - the maximum time to process one batch of tasks from any active queue +// - the configured timeout parameter for the task's queue (which can be 0) +// +// For bulk processing jobs and throughput-oriented benchmarks, you may want to +// set the maximum queue size to a large value. +// +// TODO(b/26539183): Support queue servicing policies other than round-robin. +// E.g. let each queue specify a "share" (an int >= 1), so e.g. with queues A +// and B having shares 1 and 2 respectively, the servicing pattern is ABBABB... +// +// +// PERFORMANCE TUNING: See README.md. +// +template +class SharedBatchScheduler + : public std::enable_shared_from_this> { + public: + using BatchTaskHandleUniquePtr = + std::unique_ptr>>; + using BatchTaskUniqueptr = std::unique_ptr>; + using BatchUniquePtr = + absl::variant; + // TODO(b/25089730): Tune defaults based on best practices as they develop. + struct Options { + // The name to use for the pool of batch threads. + string thread_pool_name = {"batch_threads"}; + + // The number of threads to use to process batches. + // Must be >= 1, and should be tuned carefully. + int num_batch_threads = port::MaxParallelism(); + + // The environment to use. + // (Typically only overridden by test code.) + Env* env = Env::Default(); + }; + // Ownership is shared between the caller of Create() and any queues created + // via AddQueue(). + static Status Create( + const Options& options, + std::shared_ptr>* scheduler); + + ~SharedBatchScheduler(); + + // Adds a queue to which tasks may be submitted. The returned queue implements + // the BatchScheduler API. Each queue has its own set of scheduling options, + // and its own callback to process batches of tasks submitted to the queue. + // + // The returned queue's destructor blocks until all tasks submitted to it have + // been processed. + struct QueueOptions { + // The size limit of an input batch to the queue. + // + // If `enable_large_batch_splitting` is True, 'input_batch_size_limit' + // should be greater or equal than `max_execution_batch_size`; otherwise + // `input_batch_size_limit` should be equal to `max_execution_batch_size`. + size_t input_batch_size_limit = 1000; + + // If a task has been enqueued for this amount of time (in microseconds), + // and a thread is available, the scheduler will immediately form a batch + // from enqueued tasks and assign the batch to the thread for processing, + // even if the batch's size is below 'input_batch_size_limit'. + // + // This parameter offers a way to bound queue latency, so that a task isn't + // stuck in the queue indefinitely waiting for enough tasks to arrive to + // make a full batch. (The latency bound is given in the class documentation + // above.) + // + // The goal is to smooth out batch sizes under low request rates, and thus + // avoid latency spikes. + int64_t batch_timeout_micros = 0; + + // The maximum allowable number of enqueued (accepted by Schedule() but + // not yet being processed on a batch thread) tasks in terms of batches. + // If this limit is reached, Schedule() will return an UNAVAILABLE error. + // See the class documentation above for guidelines on how to tune this + // parameter. + // + // Must be positive, or else invalid argument error will be returned at + // queue creation time. + size_t max_enqueued_batches = 10; + + // If true, queue implementation would split one input batch task into + // subtasks (as specified by `split_input_task_func` below) and fit subtasks + // into different batches. + // + // For usage of `split_input_task_func`, please see its comment. + bool enable_large_batch_splitting = false; + + // `input_task`: a unit of task to be split. + // `first_output_task_size`: task size of first output. + // `max_execution_batch_size`: Maximum size of each batch. + // `output_tasks`: A list of output tasks after split. + // + // REQUIRED: + // 1) All `output_tasks` should be non-empty tasks. + // 2) Sizes of `output_tasks` add up to size of `input_task`. + // + // NOTE: + // Instantiations of `TaskType` may vary, so it's up to caller to define + // how (e.g., which members to access) to split input tasks. + std::function* input_task, + int first_output_task_size, int input_batch_size_limit, + std::vector>* output_tasks)> + split_input_task_func; + + // If true, batch input tasks are split lazily after dequeue and not on the + // critical path of enqueue operations. + // + // Must be false if `enable_large_batch_splitting` is false; elsewise errors + // will be returned at queue creation time. + // + // TODO(b/194294263): + // Make `enable_lazy_split` a template parameter of queue, and adapts + // `high_priority_batches_` and `task_handle_batches_` into one deque of + // tensorflow::serving::Batch. + bool enable_lazy_split = false; + + // The maximum size of each enqueued batch (i.e., in + // `high_priority_batches_`). + // + // The scheduler may form batches of any size between 1 and this number + // (inclusive). If there is a need to quantize the batch sizes, i.e. only + // submit batches whose size is in a small set of allowed sizes, that can be + // done by adding padding in the process-batch callback. + size_t max_execution_batch_size = 1000; + + // If true, the padding will not be appended. + bool disable_padding = false; + + // If true, queue implementation would split high priority and low priority + // inputs into two sub queues. + bool enable_priority_queue = false; + + // A separate set of queue options for different priority inputs. + // Use iff `enable_priority_queue` is true. + struct PriorityQueueOptions { + // See QueueOptions.max_execution_batch_size + size_t max_execution_batch_size = 0; + // See QueueOptions.batch_timeout_micros + int64_t batch_timeout_micros = 0; + // See QueueOptions.input_batch_size_limit + size_t input_batch_size_limit = 0; + // See QueueOptions.max_enqueued_batches + size_t max_enqueued_batches = 0; + }; + // A subset of queue options for high priority input. + PriorityQueueOptions high_priority_queue_options; + // A subset of queue options for low priority input. + PriorityQueueOptions low_priority_queue_options; + }; + Status AddQueue(const QueueOptions& options, + std::function>)> + process_batch_callback, + std::unique_ptr>* queue); + + private: + explicit SharedBatchScheduler(const Options& options); + + void GetNextWorkItem_Locked(internal::Queue** queue_for_batch_out, + BatchUniquePtr* batch_to_process_out) + TF_EXCLUSIVE_LOCKS_REQUIRED(mu_); + + // The code executed in 'batch_threads_'. Obtains a batch to process from the + // queue pointed to by 'next_queue_to_schedule_', and processes it. If that + // queue declines to provide a batch to process, moves onto the next queue. If + // no queues provide a batch to process, just sleeps briefly and exits. + void ThreadLogic(); + + // Called by `AddQueue`. + Status AddQueueAfterRewritingOptions( + const QueueOptions& options, + std::function>)> + process_batch_callback, + std::unique_ptr>* queue); + + static bool BatchExists(const BatchUniquePtr& batch_to_process); + + const Options options_; + + mutex mu_; + + // A list of queues. (We use std::list instead of std::vector to ensure that + // iterators are not invalidated by adding/removing elements. It also offers + // efficient removal of elements from the middle.) + using QueueList = std::list>>; + + // All "active" queues, i.e. ones that either: + // - have not been removed, or + // - have been removed but are not yet empty. + QueueList queues_ TF_GUARDED_BY(mu_); + + // An iterator over 'queues_', pointing to the queue from which the next + // available batch thread should grab work. + typename QueueList::iterator next_queue_to_schedule_ TF_GUARDED_BY(mu_); + + // Used by idle batch threads to wait for work to enter the system. Notified + // whenever a batch becomes schedulable. + condition_variable schedulable_batch_cv_; + + // Threads that process batches obtained from the queues. + std::vector> batch_threads_; + + SharedBatchScheduler(const SharedBatchScheduler&) = delete; + void operator=(const SharedBatchScheduler&) = delete; +}; + +////////// +// Implementation details follow. API users need not read. + +namespace internal { + +// A task queue for SharedBatchScheduler. Accepts tasks and accumulates them +// into batches, and dispenses those batches to be processed via a "pull" +// interface. The queue's behavior is governed by maximum batch size, timeout +// and maximum queue length parameters; see their documentation in +// SharedBatchScheduler. +// +// The queue is implemented as a deque of batches, with these invariants: +// - The number of batches is between 1 and 'options_.max_enqueued_batches'. +// - The back-most batch is open; the rest are closed. +// +// Submitted tasks are added to the open batch. If that batch doesn't have room +// but the queue isn't full, then that batch is closed and a new open batch is +// started. +// +// Batch pull requests are handled by dequeuing the front-most batch if it is +// closed. If the front-most batch is open (i.e. the queue contains only one +// batch) and has reached the timeout, it is immediately closed and returned; +// otherwise no batch is returned for the request. +template +class Queue { + public: + using ProcessBatchCallback = + std::function>)>; + using SchedulableBatchCallback = std::function; + using SplitInputTaskIntoSubtasksCallback = std::function* input_task, int open_batch_remaining_slot, + int max_execution_batch_size, + std::vector>* output_tasks)>; + Queue(const typename SharedBatchScheduler::QueueOptions& options, + Env* env, ProcessBatchCallback process_batch_callback, + SchedulableBatchCallback schedulable_batch_callback); + + // Illegal to destruct unless the queue is empty. + ~Queue(); + + // Submits a task to the queue, with the same semantics as + // BatchScheduler::Schedule(). + Status Schedule(std::unique_ptr* task); + + // Enqueue `task` as it is OR split it inline (eagerly) to form batches to be + // processed by `Queue::ProcessBatch` + Status ScheduleWithoutOrEagerSplit(std::unique_ptr* task); + + // Enqueue `task` along with the batch queue metadata. + // Batches are formed by the time `ScheduleWithLazySplit` returns; and each + // batch in the deque could evaluate to a batch to be processed after it's + // dequeued (out of mutex-protected area). + Status ScheduleWithLazySplit(std::unique_ptr* task); + + // Returns the number of enqueued tasks, with the same semantics as + // BatchScheduler::NumEnqueuedTasks(). + size_t NumEnqueuedTasks() const; + + // Returns the queue capacity, with the same semantics as + // BatchScheduler::SchedulingCapacity(). + size_t SchedulingCapacity() const; + + // Returns the maximum allowed size of tasks submitted to the queue. + size_t max_task_size() const { return options_.input_batch_size_limit; } + + // Returns the maximum allowed size of tasks to be executed. + // Returned value would be less than or equal to the maximum allowed input + // size that's provided by caller of batch scheduler. + size_t max_execution_batch_size() const { return max_execution_batch_size_; } + + // Called by a thread that is ready to process a batch, to request one from + // this queue. Either returns a batch that is ready to be processed, or + // nullptr if the queue declines to schedule a batch at this time. If it + // returns a batch, the batch is guaranteed to be closed. + typename SharedBatchScheduler::BatchUniquePtr ScheduleBatch(); + + // A variant of `ScheduleBatch`. + // Batches are guaranteed to form at task enqueue time. + std::unique_ptr> ScheduleBatchWithEagerSplit(); + + // Processes a batch that has been returned earlier by ScheduleBatch(). + void ProcessBatch(std::unique_ptr> batch); + + // Determines whether the queue is empty, i.e. has no tasks waiting or being + // processed. + bool IsEmpty() const; + + // Marks the queue closed, and waits until it is empty. + void CloseAndWaitUntilEmpty(); + + bool closed() const TF_NO_THREAD_SAFETY_ANALYSIS { return closed_.load(); } + + private: + // Computes the max_execution_batch_size of the queue based on queue options. + static size_t GetMaxExecutionBatchSize( + const typename SharedBatchScheduler::QueueOptions& options) { + // If `enable_large_batch_splitting`, returns `max_execution_batch_size` + // configured by user options directly; returns `input_batch_size_limit` + // otherwise. + // + // Note `input_batch_size_limit` is used for backward compatibitliy -> + // users may not specify `max_execution_batch_size` explicitly. + if (options.enable_large_batch_splitting) { + return options.max_execution_batch_size; + } else { + return options.input_batch_size_limit; + } + } + + // Same as IsEmpty(), but assumes the caller already holds a lock on 'mu_'. + bool IsEmptyInternal() const TF_EXCLUSIVE_LOCKS_REQUIRED(mu_); + + // Closes the open batch residing at the back of std::deque, and inserts a + // fresh open batch behind it. + void StartNewBatch() TF_EXCLUSIVE_LOCKS_REQUIRED(mu_); + + // Split `input task` into `output_tasks` according to 'task_sizes'. + Status SplitInputBatchIntoSubtasks( + std::unique_ptr* input_task, + std::vector>* output_tasks) + TF_EXCLUSIVE_LOCKS_REQUIRED(mu_); + + // Determines whether the open batch residing at the back of + // 'high_priority_batches_' is currently schedulable. + bool IsOpenBatchSchedulable() const TF_EXCLUSIVE_LOCKS_REQUIRED(mu_); + + // A variant of `IsOpenBatchSchedulable`; used when batches are formed at + // task enqueue time, and open batch is `high_priority_batches_.back()`. + bool IsOpenBatchSchedulableAfterEagerSplit() const + TF_EXCLUSIVE_LOCKS_REQUIRED(mu_); + + // Same as SchedulingCapacity(), but assumes the caller already holds a + // lock on 'mu_'. + size_t SchedulingCapacityInternal() const TF_EXCLUSIVE_LOCKS_REQUIRED(mu_); + + // Returns an error if queue doesn't have capacity for this task. + // + // `task` must outlive this method. + Status ValidateBatchTaskQueueCapacity(TaskType* task) const + TF_EXCLUSIVE_LOCKS_REQUIRED(mu_); + + // The task size of the last batch in the queue. + size_t tail_batch_task_size() const TF_EXCLUSIVE_LOCKS_REQUIRED(mu_); + + // Returns the number of enqueued batches. + int64 num_enqueued_batches() const TF_EXCLUSIVE_LOCKS_REQUIRED(mu_); + + // Gets the appropriate batches. + std::deque>>& GetBatches() + TF_EXCLUSIVE_LOCKS_REQUIRED(mu_); + + // Gets the appropriate batches (const version). + const std::deque>>& GetBatches() const + TF_EXCLUSIVE_LOCKS_REQUIRED(mu_); + + const typename SharedBatchScheduler::QueueOptions options_; + + // The environment to use. + Env* env_; + + // The maximum batch size to be executed by `Queue::ProcessBatch`. + // See the comment of QueueOptions and helper function + // `GetMaxExecutionBatchSize` for more details on what it means. + const size_t max_execution_batch_size_; + + // A callback invoked to processes a batch of work units. Always invoked + // from a batch thread. + ProcessBatchCallback process_batch_callback_; + + // A callback invoked to notify the scheduler that a new batch has become + // schedulable. + SchedulableBatchCallback schedulable_batch_callback_; + + mutable mutex mu_; + + // Whether this queue can accept new tasks. This variable is monotonic: it + // starts as false, and then at some point gets set to true and remains true + // for the duration of this object's life. + std::atomic closed_ TF_GUARDED_BY(mu_){false}; + + // The enqueued batches. + // + // Each element corresponds to the `task` enqueued in `Queue::Schedule`; the + // element could be split and processed in batches at dequeue time. + // + // Used iff `QueueOptions.enable_lazy_split` is true. + std::deque>>> + task_handle_batches_ TF_GUARDED_BY(mu_); + + // The enqueued batches for low priority input. + // Each element corresponds to a task to be dequeued and processed by + // `Queue::ProcessBatch`. + // + // Used iff `QueueOptions.enable_lazy_split` is false. + std::deque>> low_priority_batches_ + TF_GUARDED_BY(mu_); + + // The enqueued batches for high priority input. + // Each element corresponds to a task to be dequeued and processed by + // `Queue::ProcessBatch`. + // + // Used iff `QueueOptions.enable_lazy_split` is false. + std::deque>> high_priority_batches_ + TF_GUARDED_BY(mu_); + + // The counter of the TraceMe context ids. + uint64 traceme_context_id_counter_ TF_GUARDED_BY(mu_) = 0; + + // The time at which the first task was added to the open (back-most) batch + // in 'high_priority_batches_'. Valid iff that batch contains at least one + // task. + uint64 open_batch_start_time_micros_ TF_GUARDED_BY(mu_); + + // Whether this queue contains a batch that is eligible to be scheduled. + // Used to keep track of when to call 'schedulable_batch_callback_'. + bool schedulable_batch_ TF_GUARDED_BY(mu_) = false; + + // The number of batches currently being processed by batch threads. + // Incremented in ScheduleBatch() and decremented in ProcessBatch(). + int num_batches_being_processed_ TF_GUARDED_BY(mu_) = 0; + + // Used by CloseAndWaitUntilEmpty() to wait until the queue is empty, for + // the case in which the queue is not empty when CloseAndWaitUntilEmpty() + // starts. When ProcessBatch() dequeues the last batch and makes the queue + // empty, if 'empty_notification_' is non-null it calls + // 'empty_notification_->Notify()'. + Notification* empty_notification_ TF_GUARDED_BY(mu_) = nullptr; + + Queue(const Queue&) = delete; + void operator=(const Queue&) = delete; +}; + +// A RAII-style object that points to a Queue and implements +// the BatchScheduler API. To be handed out to clients who call AddQueue(). +template +class QueueHandle : public BatchScheduler { + public: + QueueHandle(std::shared_ptr> scheduler, + Queue* queue); + ~QueueHandle() override; + + Status Schedule(std::unique_ptr* task) override; + size_t NumEnqueuedTasks() const override; + size_t SchedulingCapacity() const override; + + size_t max_task_size() const override { return queue_->max_task_size(); } + + private: + // The scheduler that owns 'queue_'. + std::shared_ptr> scheduler_; + + // The queue this handle wraps. Owned by 'scheduler_', which keeps it alive at + // least until this class's destructor closes it. + Queue* queue_; + + QueueHandle(const QueueHandle&) = delete; + void operator=(const QueueHandle&) = delete; +}; + +} // namespace internal + +template +Status SharedBatchScheduler::Create( + const Options& options, + std::shared_ptr>* scheduler) { + if (options.num_batch_threads < 1) { + return errors::InvalidArgument("num_batch_threads must be positive; was ", + options.num_batch_threads); + } + scheduler->reset(new SharedBatchScheduler(options)); + return OkStatus(); +} + +template +SharedBatchScheduler::~SharedBatchScheduler() { + // Wait until the batch threads finish clearing out and deleting the closed + // queues. + for (;;) { + { + mutex_lock l(mu_); + if (queues_.empty()) { + break; + } + } + const int64_t kSleepTimeMicros = 100; + options_.env->SleepForMicroseconds(kSleepTimeMicros); + } + // Delete the batch threads before allowing state the threads may access (e.g. + // 'mu_') to be deleted. + batch_threads_.clear(); +} + +template +Status SharedBatchScheduler::AddQueue( + const QueueOptions& options, + std::function>)> + process_batch_callback, + std::unique_ptr>* queue) { + QueueOptions rewrite_options = options; + if ((!rewrite_options.enable_large_batch_splitting) && + rewrite_options.max_enqueued_batches == 0) { + // Many existing models (with very low QPS) rely on this option to be >0. + // Rewrite and set this to one and retain old behavior to allow such models + // to continue to work. + // + // Note, technically an invalid-argument error should be returned, but + // that may break such models. + rewrite_options.max_enqueued_batches = 1; + } + return AddQueueAfterRewritingOptions(rewrite_options, process_batch_callback, + queue); +} + +template +Status SharedBatchScheduler::AddQueueAfterRewritingOptions( + const QueueOptions& options, + std::function>)> + process_batch_callback, + std::unique_ptr>* queue) { + if (options.input_batch_size_limit == 0) { + return errors::InvalidArgument( + "input_batch_size_limit must be positive; was ", + options.input_batch_size_limit); + } + if (options.batch_timeout_micros < 0) { + return errors::InvalidArgument( + "batch_timeout_micros must be non-negative; was ", + options.batch_timeout_micros); + } + if (options.max_enqueued_batches == 0) { + return errors::InvalidArgument( + "max_enqueued_batches must be positive; was ", + options.max_enqueued_batches); + } + + if (options.enable_large_batch_splitting && + options.split_input_task_func == nullptr) { + return errors::InvalidArgument( + "split_input_task_func must be specified when split_input_task is " + "true: ", + options.enable_large_batch_splitting); + } + + if (options.enable_lazy_split && (!options.enable_large_batch_splitting)) { + return errors::InvalidArgument( + "enable_lazy_split should be enabled only if " + "enable_large_batch_splitting is enabled."); + } + + if (options.enable_large_batch_splitting && + (options.input_batch_size_limit < options.max_execution_batch_size)) { + return errors::InvalidArgument( + "When enable_large_batch_splitting is true, input_batch_size_limit " + "must be " + "greater than or equal to max_execution_batch_size.", + options.enable_large_batch_splitting, options.input_batch_size_limit, + options.max_execution_batch_size); + } + + auto schedulable_batch_callback = [this] { + mutex_lock l(mu_); + schedulable_batch_cv_.notify_one(); + }; + auto internal_queue = + std::unique_ptr>(new internal::Queue( + options, options_.env, process_batch_callback, + schedulable_batch_callback)); + auto handle = std::unique_ptr>( + new internal::QueueHandle(this->shared_from_this(), + internal_queue.get())); + { + mutex_lock l(mu_); + queues_.push_back(std::move(internal_queue)); + if (next_queue_to_schedule_ == queues_.end()) { + next_queue_to_schedule_ = queues_.begin(); + } + } + *queue = std::move(handle); + return OkStatus(); +} + +template +SharedBatchScheduler::SharedBatchScheduler(const Options& options) + : options_(options), next_queue_to_schedule_(queues_.end()) { + // Kick off the batch threads. + PeriodicFunction::Options periodic_fn_options; + periodic_fn_options.thread_name_prefix = + strings::StrCat(options.thread_pool_name, "_"); + for (int i = 0; i < options.num_batch_threads; ++i) { + std::unique_ptr thread(new PeriodicFunction( + [this] { this->ThreadLogic(); }, + 0 /* function invocation interval time */, periodic_fn_options)); + batch_threads_.push_back(std::move(thread)); + } +} + +template +bool SharedBatchScheduler::BatchExists( + const BatchUniquePtr& batch_to_process) { + if (absl::holds_alternative(batch_to_process)) { + return absl::get(batch_to_process) != nullptr; + } + return absl::get(batch_to_process) != nullptr; +} + +template +void SharedBatchScheduler::GetNextWorkItem_Locked( + internal::Queue** queue_for_batch_out, + BatchUniquePtr* batch_to_process_out) { + BatchUniquePtr batch_to_process; + internal::Queue* queue_for_batch = nullptr; + const int num_queues = queues_.size(); + for (int num_queues_tried = 0; + !BatchExists(batch_to_process) && num_queues_tried < num_queues; + ++num_queues_tried) { + DCHECK(next_queue_to_schedule_ != queues_.end()); + + // If a closed queue responds to ScheduleBatch() with nullptr, the queue + // will never yield any further batches so we can drop it. To avoid a + // race, we take a snapshot of the queue's closedness state *before* + // calling ScheduleBatch(). + const bool queue_closed = (*next_queue_to_schedule_)->closed(); + + // Ask '*next_queue_to_schedule_' if it wants us to process a batch. + batch_to_process = (*next_queue_to_schedule_)->ScheduleBatch(); + + if (BatchExists(batch_to_process)) { + queue_for_batch = next_queue_to_schedule_->get(); + } + + // Advance 'next_queue_to_schedule_'. + if (queue_closed && (*next_queue_to_schedule_)->IsEmpty() && + !BatchExists(batch_to_process)) { + // We've encountered a closed queue with no work to do. Drop it. + DCHECK_NE(queue_for_batch, next_queue_to_schedule_->get()); + next_queue_to_schedule_ = queues_.erase(next_queue_to_schedule_); + } else { + ++next_queue_to_schedule_; + } + if (next_queue_to_schedule_ == queues_.end() && !queues_.empty()) { + // We've hit the end. Wrap to the first queue. + next_queue_to_schedule_ = queues_.begin(); + } + } + *queue_for_batch_out = queue_for_batch; + *batch_to_process_out = std::move(batch_to_process); +} + +template +void SharedBatchScheduler::ThreadLogic() { + // A batch to process next (or nullptr if no work to do). + BatchUniquePtr batch_to_process; + // The queue with which 'batch_to_process' is associated. + internal::Queue* queue_for_batch = nullptr; + { + mutex_lock l(mu_); + while (true) { + GetNextWorkItem_Locked(&queue_for_batch, &batch_to_process); + if (BatchExists(batch_to_process)) break; + // We couldn't find any work to do. Wait until a new batch becomes + // schedulable, or some time has elapsed, before checking again. + const int64_t kTimeoutMillis = + 1; // The smallest accepted granule of time. + WaitForMilliseconds(&l, &schedulable_batch_cv_, kTimeoutMillis); + if (queues_.empty()) return; + } + } + + std::unique_ptr> batch_to_schedule; + if (absl::holds_alternative(batch_to_process)) { + // The corresponding `queue_for_batch` must be created with + // `enable_lazy_split=true`. + BatchTaskHandleUniquePtr ptr = + std::move(absl::get(batch_to_process)); + batch_to_schedule = std::make_unique>(); + std::vector>> + task_handles = ptr->RemoveAllTasks(); + + // TODO(b/194294263): + // Handle the batch-kernel callback properly when lazy split returns + // error. + for (int i = 0; i < task_handles.size(); i++) { + batch_to_schedule->AddTask(std::move(task_handles[i]->GetSplitTask())); + } + batch_to_schedule->Close(); + + } else { + // The corresponding `queue_for_batch` must be created with + // `enable_lazy_split=false`. + batch_to_schedule = + std::move(absl::get(batch_to_process)); + } + + queue_for_batch->ProcessBatch(std::move(batch_to_schedule)); +} + +namespace internal { + +template +Queue::Queue( + const typename SharedBatchScheduler::QueueOptions& options, + Env* env, ProcessBatchCallback process_batch_callback, + SchedulableBatchCallback schedulable_batch_callback) + : options_(options), + env_(env), + max_execution_batch_size_(GetMaxExecutionBatchSize(options_)), + process_batch_callback_(process_batch_callback), + schedulable_batch_callback_(schedulable_batch_callback) { + // Set the higher 32 bits of traceme_context_id_counter_ to be the creation + // time of the queue. This prevents the batches in different queues to have + // the same traceme_context_id_counter_. + traceme_context_id_counter_ = (absl::GetCurrentTimeNanos() & 0xFFFFFFFF) + << 32; + // Create an initial, open batch. + if (options_.enable_lazy_split) { + task_handle_batches_.emplace_back( + new Batch>); + } else { + GetBatches().emplace_back(new Batch); + } +} + +template +Queue::~Queue() { + mutex_lock l(mu_); + DCHECK(IsEmptyInternal()); + + // Close the (empty) open batch, so its destructor doesn't block. + if (options_.enable_lazy_split) { + task_handle_batches_.back()->Close(); + } else { + GetBatches().back()->Close(); + } +} + +template +Status Queue::Schedule(std::unique_ptr* task) { + if ((*task)->size() > options_.input_batch_size_limit) { + return errors::InvalidArgument("Task size ", (*task)->size(), + " is larger than maximum input batch size ", + options_.input_batch_size_limit); + } + if (options_.enable_lazy_split) { + return ScheduleWithLazySplit(std::move(task)); + } + return ScheduleWithoutOrEagerSplit(std::move(task)); +} + +template +Status Queue::ScheduleWithLazySplit(std::unique_ptr* task) { + profiler::TraceMe trace_me([task] { + return profiler::TraceMeEncode( + "ScheduleWithLazySplit", + {{"batching_input_task_size", (*task)->size()}}); + }); + // The max size to be enqueued. + const int max_execution_batch_size = options_.max_execution_batch_size; + + bool notify_of_schedulable_batch = false; + { + mutex_lock l(mu_); + + DCHECK(!closed_); + + TF_RETURN_IF_ERROR(ValidateBatchTaskQueueCapacity((*task).get())); + + const int64 open_batch_capacity = + max_execution_batch_size - this->tail_batch_task_size(); + + auto input_batch = std::make_shared>( + std::move(*task), open_batch_capacity, max_execution_batch_size, + options_.split_input_task_func); + std::vector>> task_handles; + + input_batch->ToTaskHandles(&task_handles); + + for (int i = 0; i < task_handles.size(); ++i) { + if (task_handle_batches_.back()->size() + task_handles[i]->size() > + options_.max_execution_batch_size) { + StartNewBatch(); + } + if (task_handle_batches_.back()->empty()) { + open_batch_start_time_micros_ = env_->NowMicros(); + } + profiler::TraceMeProducer trace_me( + [&task_handles, i] { + return profiler::TraceMeEncode("ScheduleOutputTask", + {{"size", task_handles[i]->size()}}); + }, + profiler::ContextType::kSharedBatchScheduler, + task_handle_batches_.back()->traceme_context_id()); + + task_handle_batches_.back()->AddTask(std::move(task_handles[i])); + } + + if (!schedulable_batch_) { + if (GetBatches().size() > 1 || IsOpenBatchSchedulable()) { + schedulable_batch_ = true; + notify_of_schedulable_batch = true; + } + } + } + // TODO(b/194294263): + // Add unit tests to verify that `schedulable_batch_callback_` could be + // triggered when batches are scheduled. + if (notify_of_schedulable_batch) { + schedulable_batch_callback_(); + } + + return OkStatus(); +} + +// TODO(b/194294263): +// Merge `ScheduleWithoutOrEagerSplit` and `ScheduleWithLazySplit` into +// `Schedule`. +template +Status Queue::ScheduleWithoutOrEagerSplit( + std::unique_ptr* task) { + const bool large_batch_splitting = options_.enable_large_batch_splitting; + profiler::TraceMe trace_me([task, large_batch_splitting] { + return profiler::TraceMeEncode( + large_batch_splitting ? "ScheduleWithEagerSplit" + : "ScheduleWithoutSplit", + {{"batching_input_task_size", (*task)->size()}}); + }); + + bool notify_of_schedulable_batch = false; + { + mutex_lock l(mu_); + + DCHECK(!closed_); + + // TODO(b/161857471): + // Add test coverage when when concurrent incoming batches arrives and + // use up all queue capacity. + TF_RETURN_IF_ERROR(ValidateBatchTaskQueueCapacity((*task).get())); + + std::deque>>& batches = GetBatches(); + + const int64_t open_batch_remaining_slot = + max_execution_batch_size() - batches.back()->size(); + + const int64_t input_task_size = (*task)->size(); + + std::vector> output_tasks; + + if (input_task_size <= open_batch_remaining_slot || + !large_batch_splitting) { + // This is the fast path when input doesn't need to be split. + output_tasks.push_back(std::move(*task)); + } else { + TF_RETURN_IF_ERROR(SplitInputBatchIntoSubtasks(task, &output_tasks)); + } + + for (int i = 0; i < output_tasks.size(); ++i) { + if (batches.back()->size() + output_tasks[i]->size() > + max_execution_batch_size()) { + StartNewBatch(); + } + if (batches.back()->empty()) { + open_batch_start_time_micros_ = env_->NowMicros(); + } + profiler::TraceMeProducer trace_me( + [&output_tasks, i] { + return profiler::TraceMeEncode("ScheduleOutputTask", + {{"size", output_tasks[i]->size()}}); + }, + profiler::ContextType::kSharedBatchScheduler, + batches.back()->traceme_context_id()); + batches.back()->AddTask(std::move(output_tasks[i])); + } + + if (!schedulable_batch_) { + if (batches.size() > 1 || IsOpenBatchSchedulable()) { + schedulable_batch_ = true; + notify_of_schedulable_batch = true; + } + } + } + + if (notify_of_schedulable_batch) { + schedulable_batch_callback_(); + } + + return OkStatus(); +} + +template +size_t Queue::NumEnqueuedTasks() const { + size_t num_enqueued_tasks = 0; + mutex_lock l(mu_); + if (options_.enable_lazy_split) { + for (const auto& batch : task_handle_batches_) { + num_enqueued_tasks += batch->num_tasks(); + } + return num_enqueued_tasks; + } + + for (const auto& batch : GetBatches()) { + num_enqueued_tasks += batch->num_tasks(); + } + return num_enqueued_tasks; +} + +template +size_t Queue::SchedulingCapacity() const { + mutex_lock l(mu_); + return SchedulingCapacityInternal(); +} + +template +size_t Queue::SchedulingCapacityInternal() const { + const int64 num_new_batches_schedulable = + static_cast(options_.max_enqueued_batches) - + this->num_enqueued_batches(); + const int64 execution_batch_size_limit = max_execution_batch_size(); + const int64 open_batch_capacity = + execution_batch_size_limit - this->tail_batch_task_size(); + // Note the returned value is guaranteed to be not negative, since + // enqueue operation could only happen if queue has enough capacity. + return (num_new_batches_schedulable * execution_batch_size_limit) + + open_batch_capacity; +} + +template +Status Queue::ValidateBatchTaskQueueCapacity(TaskType* task) const { + // Queue creation requires that `enable_large_batch_splitting` is true + // when `enable_lazy_split` is true, so this covers both eager split and + // lazy split. + if (options_.enable_large_batch_splitting) { + if (task->size() > SchedulingCapacityInternal()) { + return errors::Unavailable( + "The batch scheduling queue to which this task was submitted is " + "full; task size is ", + task->size(), " but scheduling capacity is only ", + SchedulingCapacityInternal(), + " (num_enqueued_batches=", num_enqueued_batches(), + ", max_enqueued_batches=", options_.max_enqueued_batches, + ", open_batch_size=", tail_batch_task_size(), + ", max_execution_batch_size=", max_execution_batch_size(), ")"); + } + return OkStatus(); + } + + // NOTE, the capacity checking below is loose and is retained + // for backward compatibility that was broken due to the merge of no-split + // and eager split. + // There are existing clients/models that rely on the loose check + // and can get errors after the merge. Retaining the old behavior + // allows such models to continue to work. + // + // We need to revisit/remove this check after we fix model configs. + const std::deque>>& batches = GetBatches(); + if (batches.back()->size() + task->size() > options_.input_batch_size_limit) { + if (batches.size() >= options_.max_enqueued_batches) { + return errors::Unavailable( + "The batch scheduling queue to which this task was submitted is " + "full; currently ", + batches.size(), " batches enqueued and max_enqueued_batches is ", + options_.max_enqueued_batches); + } + } + return OkStatus(); +} + +template +std::unique_ptr> +Queue::ScheduleBatchWithEagerSplit() { + // The batch to schedule, which we may populate below. (If left as nullptr, + // that means we are electing not to schedule a batch at this time.) + std::unique_ptr> batch_to_schedule; + + { + mutex_lock l(mu_); + + std::deque>>& batches = GetBatches(); + // Consider closing the open batch at this time, to schedule it. + if (batches.size() == 1 && IsOpenBatchSchedulable()) { + StartNewBatch(); + } + + if (batches.size() >= 2) { + // There is at least one closed batch that is ready to be scheduled. + ++num_batches_being_processed_; + batch_to_schedule = std::move(batches.front()); + batches.pop_front(); + } else { + schedulable_batch_ = false; + } + } + + return batch_to_schedule; +} + +template +typename SharedBatchScheduler::BatchUniquePtr +Queue::ScheduleBatch() { + if (!options_.enable_lazy_split) { + return ScheduleBatchWithEagerSplit(); + } + // The batch to schedule, which we may populate below. (If left as nullptr, + // that means we are electing not to schedule a batch at this time.) + std::unique_ptr>> + task_handles_to_schedule; + + { + mutex_lock l(mu_); + + // Consider closing the open batch at this time, to schedule it. + if (task_handle_batches_.size() == 1 && IsOpenBatchSchedulable()) { + StartNewBatch(); + } + + if (task_handle_batches_.size() >= 2) { + // There is at least one closed batch that is ready to be scheduled. + ++num_batches_being_processed_; + task_handles_to_schedule = std::move(task_handle_batches_.front()); + task_handle_batches_.pop_front(); + } else { + schedulable_batch_ = false; + } + } + + return std::move(task_handles_to_schedule); +} + +template +void Queue::ProcessBatch(std::unique_ptr> batch) { + profiler::TraceMeConsumer trace_me( + [&] { + return profiler::TraceMeEncode( + "ProcessBatch", {{"batch_size_before_padding", batch->size()}, + {"_r", 2} /*root_event*/}); + }, + profiler::ContextType::kSharedBatchScheduler, + batch->traceme_context_id()); + process_batch_callback_(std::move(batch)); + + { + mutex_lock l(mu_); + --num_batches_being_processed_; + if (empty_notification_ != nullptr && IsEmptyInternal()) { + empty_notification_->Notify(); + } + } +} + +template +bool Queue::IsEmpty() const { + mutex_lock l(mu_); + return IsEmptyInternal(); +} + +template +void Queue::CloseAndWaitUntilEmpty() { + Notification empty; + { + mutex_lock l(mu_); + closed_ = true; + if (IsEmptyInternal()) { + empty.Notify(); + } else { + // Arrange for ProcessBatch() to notify when the queue becomes empty. + empty_notification_ = ∅ + } + } + empty.WaitForNotification(); +} + +template +bool Queue::IsEmptyInternal() const { + if (options_.enable_lazy_split) { + return num_batches_being_processed_ == 0 && + task_handle_batches_.size() == 1 && + task_handle_batches_.back()->empty(); + } + const std::deque>>& batches = GetBatches(); + return num_batches_being_processed_ == 0 && batches.size() == 1 && + batches.back()->empty(); +} + +template +void Queue::StartNewBatch() { + if (options_.enable_lazy_split) { + task_handle_batches_.back()->Close(); + task_handle_batches_.emplace_back(new Batch>( + ++traceme_context_id_counter_)); + return; + } + std::deque>>& batches = GetBatches(); + batches.back()->Close(); + batches.emplace_back(new Batch(++traceme_context_id_counter_)); +} + +template +Status Queue::SplitInputBatchIntoSubtasks( + std::unique_ptr* input_task, + std::vector>* output_tasks) { + const int open_batch_remaining_slot = + max_execution_batch_size() - this->tail_batch_task_size(); + return options_.split_input_task_func( + std::move(input_task), open_batch_remaining_slot, + max_execution_batch_size(), std::move(output_tasks)); +} + +template +bool Queue::IsOpenBatchSchedulableAfterEagerSplit() const { + Batch* open_batch = GetBatches().back().get(); + if (open_batch->empty()) { + return false; + } + return closed_ || open_batch->size() >= max_execution_batch_size() || + env_->NowMicros() >= + open_batch_start_time_micros_ + options_.batch_timeout_micros; +} + +template +bool Queue::IsOpenBatchSchedulable() const { + if (!options_.enable_lazy_split) { + return IsOpenBatchSchedulableAfterEagerSplit(); + } + Batch>* open_batch = + task_handle_batches_.back().get(); + if (open_batch->empty()) { + return false; + } + return closed_ || open_batch->size() >= max_execution_batch_size() || + env_->NowMicros() >= + open_batch_start_time_micros_ + options_.batch_timeout_micros; +} + +template +size_t Queue::tail_batch_task_size() const { + if (options_.enable_lazy_split) { + return task_handle_batches_.back()->size(); + } + + return GetBatches().back()->size(); +} + +template +int64 Queue::num_enqueued_batches() const { + if (options_.enable_lazy_split) { + return task_handle_batches_.size(); + } + return GetBatches().size(); +} + +template +std::deque>>& Queue::GetBatches() { + return high_priority_batches_; +} + +template +const std::deque>>& +Queue::GetBatches() const { + return high_priority_batches_; +} + +template +QueueHandle::QueueHandle( + std::shared_ptr> scheduler, + Queue* queue) + : scheduler_(scheduler), queue_(queue) {} + +template +QueueHandle::~QueueHandle() { + queue_->CloseAndWaitUntilEmpty(); +} + +template +Status QueueHandle::Schedule(std::unique_ptr* task) { + return queue_->Schedule(task); +} + +template +size_t QueueHandle::NumEnqueuedTasks() const { + return queue_->NumEnqueuedTasks(); +} + +template +size_t QueueHandle::SchedulingCapacity() const { + return queue_->SchedulingCapacity(); +} + +} // namespace internal + +} // namespace serving +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_BATCHING_UTIL_SHARED_BATCH_SCHEDULER_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/batching_util/threadsafe_status.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/batching_util/threadsafe_status.h new file mode 100644 index 0000000000000000000000000000000000000000..c14a8a907147bdda9bdae2cc2df4df611d259355 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/batching_util/threadsafe_status.h @@ -0,0 +1,57 @@ +/* Copyright 2020 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_KERNELS_BATCHING_UTIL_THREADSAFE_STATUS_H_ +#define TENSORFLOW_CORE_KERNELS_BATCHING_UTIL_THREADSAFE_STATUS_H_ + +#include "tensorflow/core/platform/mutex.h" +#include "tensorflow/core/platform/status.h" +#include "tensorflow/core/platform/thread_annotations.h" + +namespace tensorflow { +// Wrapper class to allow both lock-free construction and concurrent updates on +// a 'status'. +// +// Example Usage: +// std::thread threads[2]; +// ThreadSafeStatus thread_safe_status; +// threads[0] = std::thread([&]() { +// status.Update(errors::Internal("internal error")); +// }); +// threads[1] = std::thread([&]() { +// status.Update(errors::InvalidArgument("invalid argument")); +// }); +// threads[0].Join(); +// threads[1].Join(); +// +// NOTE: +// When updated in a multi-threading setup, only the first error is retained. +class ThreadSafeStatus { + public: + const Status& status() const& TF_LOCKS_EXCLUDED(mutex_); + Status status() && TF_LOCKS_EXCLUDED(mutex_); + + // Retains the first error status: replaces the current status with + // `new_status` if `new_status` is not OK and the previous status is OK. + void Update(const Status& new_status) TF_LOCKS_EXCLUDED(mutex_); + void Update(Status&& new_status) TF_LOCKS_EXCLUDED(mutex_); + + private: + mutable mutex mutex_; + Status status_ TF_GUARDED_BY(mutex_); +}; +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_BATCHING_UTIL_THREADSAFE_STATUS_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/batching_util/warmup.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/batching_util/warmup.h new file mode 100644 index 0000000000000000000000000000000000000000..30e64795b678889a05bc27bfb3f7a2e192432b52 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/batching_util/warmup.h @@ -0,0 +1,132 @@ +/* Copyright 2023 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_KERNELS_BATCHING_UTIL_WARMUP_H_ +#define TENSORFLOW_CORE_KERNELS_BATCHING_UTIL_WARMUP_H_ + +#include +#include +#include +#include + +#include "absl/container/flat_hash_map.h" +#include "absl/hash/hash.h" +#include "absl/status/statusor.h" +#include "absl/synchronization/mutex.h" +#include "tensorflow/core/framework/op_kernel.h" +#include "tensorflow/core/protobuf/config.pb.h" +#include "tsl/platform/logging.h" + +namespace tensorflow { +namespace serving { + +// Global registry for model's warm-up states. Before a model executes warm-up +// requests, it is registered here so that the runtime can distinguish demand +// requests vs. warm-up requests and apply warm-up specific optimizations. +class WarmupStateRegistry { + public: + struct Key { + std::string name; + int64_t version; + + Key(std::string name, int64_t version) + : name(std::move(name)), version(version) {} + + template + friend H AbslHashValue(H state, const Key& key) { + return H::combine(std::move(state), key.name, key.version); + } + + friend bool operator==(const Key& x, const Key& y) { + return x.name == y.name && x.version == y.version; + } + }; + // Data stored per key. + struct PerModelData { + // If true, supported batch ops will execute the model on dummy batches + // for all `allowed_batch_sizes` of that batch op. This removes the + // need to issue separate warmup requests for each batch size. + bool warmup_all_batch_sizes = false; + }; + + // RAII handle for registered models. + class Handle { + public: + Handle() = default; + + Handle(const Handle& other) = delete; + Handle& operator=(const Handle& other) = delete; + Handle(Handle&& other) + : key_(std::move(other.key_)), registry_(other.registry_) { + other.key_.reset(); + } + Handle& operator=(Handle&& other) { + if (key_.has_value()) { + Release(); + } + + key_ = std::move(other.key_); + other.key_.reset(); + registry_ = other.registry_; + return *this; + } + + ~Handle() { Release(); } + + void Release(); + + private: + friend class WarmupStateRegistry; + + // Can only be constructed by `WarmupStateRegistry::Register()`. + Handle(const Key& key, WarmupStateRegistry* registry) + : key_(key), registry_(registry) { + DCHECK(registry_); + } + + std::optional key_; + WarmupStateRegistry* registry_ = nullptr; + }; + + // Registers the given model to be in a warm-up state and associates the given + // metadata with the model. Returns an RAII handle that unregisters the model + // at its destruction. + absl::StatusOr Register(const Key& model_key, + std::unique_ptr per_model_data); + + // Return model data. A nullptr indicates the key was not present. + const PerModelData* Lookup(const Key& model_key); + + private: + friend class Handle; + + void Unregister(const Key& model_key); + + absl::Mutex mu_; + // Map of model names/versions to miscellaneous data. + absl::flat_hash_map> states_ + ABSL_GUARDED_BY(&mu_); +}; + +WarmupStateRegistry& GetGlobalWarmupStateRegistry(); + +// Utility function that returns whether or not to warmup all batch sizes, +// based on the state of WarmupStateRegistry. +bool ShouldWarmupAllBatchSizes(const OpKernelContext* c); + +} // namespace serving +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_BATCHING_UTIL_WARMUP_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/batch_dataset_op.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/batch_dataset_op.h new file mode 100644 index 0000000000000000000000000000000000000000..4be07effe868a3af4d91ffc8514dae64e54f4a5a --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/batch_dataset_op.h @@ -0,0 +1,48 @@ +/* Copyright 2019 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ +#ifndef TENSORFLOW_CORE_KERNELS_DATA_BATCH_DATASET_OP_H_ +#define TENSORFLOW_CORE_KERNELS_DATA_BATCH_DATASET_OP_H_ + +#include "tensorflow/core/framework/dataset.h" + +namespace tensorflow { +namespace data { + +class BatchDatasetOp : public UnaryDatasetOpKernel { + public: + static constexpr const char* const kDatasetType = "Batch"; + static constexpr const char* const kInputDataset = "input_dataset"; + static constexpr const char* const kBatchSize = "batch_size"; + static constexpr const char* const kDropRemainder = "drop_remainder"; + static constexpr const char* const kParallelCopy = "parallel_copy"; + static constexpr const char* const kOutputTypes = "output_types"; + static constexpr const char* const kOutputShapes = "output_shapes"; + + explicit BatchDatasetOp(OpKernelConstruction* ctx); + + protected: + void MakeDataset(OpKernelContext* ctx, DatasetBase* input, + DatasetBase** output) override; + + private: + class Dataset; + const int op_version_; + bool parallel_copy_ = false; +}; + +} // namespace data +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_DATA_BATCH_DATASET_OP_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/cache_dataset_ops.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/cache_dataset_ops.h new file mode 100644 index 0000000000000000000000000000000000000000..e0ceee2a25393381f28c603e1b4b4c7883facf0b --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/cache_dataset_ops.h @@ -0,0 +1,52 @@ +/* Copyright 2019 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ +#ifndef TENSORFLOW_CORE_KERNELS_DATA_CACHE_DATASET_OPS_H_ +#define TENSORFLOW_CORE_KERNELS_DATA_CACHE_DATASET_OPS_H_ + +#include "tensorflow/core/framework/dataset.h" + +namespace tensorflow { +namespace data { + +class CacheDatasetOp : public UnaryDatasetOpKernel { + public: + class FileDatasetBase; + class MemoryDatasetBase; + + static constexpr const char* const kDatasetType = "Cache"; + static constexpr const char* const kInputDataset = "input_dataset"; + static constexpr const char* const kFileName = "filename"; + static constexpr const char* const kOutputTypes = "output_types"; + static constexpr const char* const kOutputShapes = "output_shapes"; + + explicit CacheDatasetOp(OpKernelConstruction* ctx); + + protected: + void MakeDataset(OpKernelContext* ctx, DatasetBase* input, + DatasetBase** output) override; + + private: + class FileDataset; + class FileDatasetV2; + class MemoryDataset; + class MemoryDatasetV2; + + const int op_version_; +}; + +} // namespace data +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_DATA_CACHE_DATASET_OPS_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/cache_ops.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/cache_ops.h new file mode 100644 index 0000000000000000000000000000000000000000..523b5ee2343e06b4321684643ab078ee79072b90 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/cache_ops.h @@ -0,0 +1,99 @@ +/* Copyright 2019 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_KERNELS_DATA_CACHE_OPS_H_ +#define TENSORFLOW_CORE_KERNELS_DATA_CACHE_OPS_H_ + +#include "tensorflow/core/data/dataset_utils.h" +#include "tensorflow/core/framework/resource_mgr.h" + +namespace tensorflow { +namespace data { + +// A thread-safe data structure for caching dataset elements. +// +// The expected use is that a single `MemoryWriterIterator` populates the +// cache with dataset elements. Once all elements are cached, the cache can +// be used by one or more `MemoryReaderIterator`s. +class MemoryCache { + public: + MemoryCache() = default; + + // Marks the cache as completed. + void Complete(std::vector>&& cache); + + // Returns whether the cache is completed. + bool IsCompleted(); + + // Resets the cache. + void Reset(); + + // Returns the element at the given index. + const std::vector& at(int64_t index); + + // Returns the size of the cache. + size_t size(); + + // Returns a reference to the cache's data. The returned reference will be + // invalidated by any call to Reset(). + const std::vector>& data(); + + private: + mutex mu_; + // Determines whether all elements of the dataset have been cached. + bool completed_ TF_GUARDED_BY(mu_) = false; + std::vector> cache_ TF_GUARDED_BY(mu_); +}; + +// A resource wrapping a shared instance of a memory cache. +class MemoryCacheManager : public ResourceBase { + public: + MemoryCacheManager() : cache_(std::make_shared()) {} + + string DebugString() const override; + + std::shared_ptr get() { return cache_; } + + private: + std::shared_ptr cache_; +}; + +// Creates an instance of cache resource and transfers ownership to the caller. +class AnonymousMemoryCacheHandleOp + : public AnonymousResourceOp { + public: + explicit AnonymousMemoryCacheHandleOp(OpKernelConstruction* ctx); + + private: + string name() override; + Status CreateResource(OpKernelContext* ctx, + std::unique_ptr flib_def, + std::unique_ptr pflr, + FunctionLibraryRuntime* lib, + MemoryCacheManager** manager) override; +}; + +// Deletes an instance of cache resource. +class DeleteMemoryCacheOp : public OpKernel { + public: + explicit DeleteMemoryCacheOp(OpKernelConstruction* ctx) : OpKernel(ctx) {} + + void Compute(OpKernelContext* ctx) override; +}; + +} // namespace data +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_DATA_CACHE_OPS_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/concatenate_dataset_op.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/concatenate_dataset_op.h new file mode 100644 index 0000000000000000000000000000000000000000..a40e71fc0c7a9653adf9954e03e6657f6e144e51 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/concatenate_dataset_op.h @@ -0,0 +1,44 @@ +/* Copyright 2019 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ +#ifndef TENSORFLOW_CORE_KERNELS_DATA_CONCATENATE_DATASET_OP_H_ +#define TENSORFLOW_CORE_KERNELS_DATA_CONCATENATE_DATASET_OP_H_ + +#include "tensorflow/core/framework/dataset.h" + +namespace tensorflow { +namespace data { + +class ConcatenateDatasetOp : public BinaryDatasetOpKernel { + public: + static constexpr const char* const kDatasetType = "Concatenate"; + static constexpr const char* const kInputDataset = "input_dataset"; + static constexpr const char* const kAnotherDataset = "another_dataset"; + static constexpr const char* const kOutputTypes = "output_types"; + static constexpr const char* const kOutputShapes = "output_shapes"; + + explicit ConcatenateDatasetOp(OpKernelConstruction* ctx); + + protected: + void MakeDataset(OpKernelContext* ctx, DatasetBase* input, + DatasetBase* to_concatenate, DatasetBase** output) override; + + private: + class Dataset; +}; + +} // namespace data +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_DATA_CONCATENATE_DATASET_OP_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/dataset_ops.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/dataset_ops.h new file mode 100644 index 0000000000000000000000000000000000000000..fa91fcc91717852c424dfa3ac1f4b75bf42663d9 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/dataset_ops.h @@ -0,0 +1,74 @@ +/* Copyright 2019 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ +#ifndef TENSORFLOW_CORE_KERNELS_DATA_DATASET_OPS_H_ +#define TENSORFLOW_CORE_KERNELS_DATA_DATASET_OPS_H_ + +#include + +#include "tensorflow/core/platform/platform.h" + +// On mobile we do not provide this functionality because not all of its +// dependencies are available there. +#if !defined(IS_MOBILE_PLATFORM) +#include "tensorflow/core/framework/dataset.h" +#include "tensorflow/core/framework/op_kernel.h" + +namespace tensorflow { +namespace data { + +class DatasetToGraphOp : public OpKernel { + public: + static constexpr const char* const kAllowStateful = "allow_stateful"; + static constexpr const char* const kStripDeviceAssignment = + "strip_device_assignment"; + static constexpr const char* const kExternalStatePolicy = + "external_state_policy"; + static constexpr const char* const kDatasetToGraph = "DatasetToGraph"; + + explicit DatasetToGraphOp(OpKernelConstruction* ctx); + + void Compute(OpKernelContext* ctx) override; + + private: + const int op_version_; + ExternalStatePolicy external_state_policy_ = ExternalStatePolicy::POLICY_WARN; + bool strip_device_assignment_ = false; +}; + +class DatasetCardinalityOp : public OpKernel { + public: + explicit DatasetCardinalityOp(OpKernelConstruction* ctx); + + void Compute(OpKernelContext* ctx) override; + + private: + std::unique_ptr cardinality_options_; +}; + +class DatasetFromGraphOp : public OpKernel { + public: + static constexpr const char* const kGraphDef = "graph_def"; + static constexpr const char* const kHandle = "handle"; + + explicit DatasetFromGraphOp(OpKernelConstruction* ctx) : OpKernel(ctx) {} + + void Compute(OpKernelContext* ctx) override; +}; + +} // namespace data +} // namespace tensorflow +#endif // !IS_MOBILE_PLATFORM + +#endif // TENSORFLOW_CORE_KERNELS_DATA_DATASET_OPS_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/experimental/assert_cardinality_dataset_op.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/experimental/assert_cardinality_dataset_op.h new file mode 100644 index 0000000000000000000000000000000000000000..098206a692957a247c8edc7aee0d487b911d57eb --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/experimental/assert_cardinality_dataset_op.h @@ -0,0 +1,48 @@ +/* Copyright 2020 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ +#ifndef TENSORFLOW_CORE_KERNELS_DATA_EXPERIMENTAL_ASSERT_CARDINALITY_DATASET_OP_H_ +#define TENSORFLOW_CORE_KERNELS_DATA_EXPERIMENTAL_ASSERT_CARDINALITY_DATASET_OP_H_ + +#include "tensorflow/core/framework/dataset.h" + +namespace tensorflow { +namespace data { +namespace experimental { + +class AssertCardinalityDatasetOp : public UnaryDatasetOpKernel { + public: + static constexpr const char* const kDatasetType = "AssertCardinality"; + static constexpr const char* const kInputDataset = "input_dataset"; + static constexpr const char* const kCardinality = "cardinality"; + static constexpr const char* const kOutputTypes = "output_types"; + static constexpr const char* const kOutputShapes = "output_shapes"; + + explicit AssertCardinalityDatasetOp(OpKernelConstruction* ctx); + + protected: + void MakeDataset(OpKernelContext* ctx, DatasetBase* input, + DatasetBase** output) override; + + private: + class Dataset; + DataTypeVector output_types_; + std::vector output_shapes_; +}; + +} // namespace experimental +} // namespace data +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_DATA_EXPERIMENTAL_ASSERT_CARDINALITY_DATASET_OP_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/experimental/assert_next_dataset_op.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/experimental/assert_next_dataset_op.h new file mode 100644 index 0000000000000000000000000000000000000000..6e86b5d82d9d763c94309b79ff5f5baaefa96154 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/experimental/assert_next_dataset_op.h @@ -0,0 +1,48 @@ +/* Copyright 2019 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ +#ifndef TENSORFLOW_CORE_KERNELS_DATA_EXPERIMENTAL_ASSERT_NEXT_DATASET_OP_H_ +#define TENSORFLOW_CORE_KERNELS_DATA_EXPERIMENTAL_ASSERT_NEXT_DATASET_OP_H_ + +#include "tensorflow/core/framework/dataset.h" + +namespace tensorflow { +namespace data { +namespace experimental { + +class AssertNextDatasetOp : public UnaryDatasetOpKernel { + public: + static constexpr const char* const kDatasetType = "AssertNext"; + static constexpr const char* const kInputDataset = "input_dataset"; + static constexpr const char* const kTransformations = "transformations"; + static constexpr const char* const kOutputTypes = "output_types"; + static constexpr const char* const kOutputShapes = "output_shapes"; + + explicit AssertNextDatasetOp(OpKernelConstruction* ctx); + + protected: + void MakeDataset(OpKernelContext* ctx, DatasetBase* input, + DatasetBase** output) override; + + private: + class Dataset; + DataTypeVector output_types_; + std::vector output_shapes_; +}; + +} // namespace experimental +} // namespace data +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_DATA_EXPERIMENTAL_ASSERT_NEXT_DATASET_OP_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/experimental/assert_prev_dataset_op.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/experimental/assert_prev_dataset_op.h new file mode 100644 index 0000000000000000000000000000000000000000..ed42b0c8b4eda162f1493bbb9549f98a40fbba49 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/experimental/assert_prev_dataset_op.h @@ -0,0 +1,48 @@ +/* Copyright 2019 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ +#ifndef TENSORFLOW_CORE_KERNELS_DATA_EXPERIMENTAL_ASSERT_PREV_DATASET_OP_H_ +#define TENSORFLOW_CORE_KERNELS_DATA_EXPERIMENTAL_ASSERT_PREV_DATASET_OP_H_ + +#include "tensorflow/core/framework/dataset.h" + +namespace tensorflow { +namespace data { +namespace experimental { + +class AssertPrevDatasetOp : public UnaryDatasetOpKernel { + public: + static constexpr char kDatasetType[] = "AssertPrev"; + static constexpr char kInputDataset[] = "input_dataset"; + static constexpr char kTransformations[] = "transformations"; + static constexpr char kOutputTypes[] = "output_types"; + static constexpr char kOutputShapes[] = "output_shapes"; + + explicit AssertPrevDatasetOp(OpKernelConstruction* ctx); + + protected: + void MakeDataset(OpKernelContext* ctx, DatasetBase* input, + DatasetBase** output) override; + + private: + class Dataset; + DataTypeVector output_types_; + std::vector output_shapes_; +}; + +} // namespace experimental +} // namespace data +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_DATA_EXPERIMENTAL_ASSERT_PREV_DATASET_OP_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/experimental/auto_shard_dataset_op.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/experimental/auto_shard_dataset_op.h new file mode 100644 index 0000000000000000000000000000000000000000..c1f71bd6b8c7d933399fb13dc2992a9b2604a515 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/experimental/auto_shard_dataset_op.h @@ -0,0 +1,53 @@ +/* Copyright 2019 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ +#ifndef TENSORFLOW_CORE_KERNELS_DATA_EXPERIMENTAL_AUTO_SHARD_DATASET_OP_H_ +#define TENSORFLOW_CORE_KERNELS_DATA_EXPERIMENTAL_AUTO_SHARD_DATASET_OP_H_ + +#include "tensorflow/core/framework/dataset.h" + +namespace tensorflow { +namespace data { +namespace experimental { + +class AutoShardDatasetOp : public UnaryDatasetOpKernel { + public: + static constexpr const char* const kDatasetType = "AutoShard"; + static constexpr const char* const kInputDataset = "input_dataset"; + static constexpr const char* const kNumWorkers = "num_workers"; + static constexpr const char* const kIndex = "index"; + static constexpr const char* const kAutoShardPolicy = "auto_shard_policy"; + static constexpr const char* const kNumReplicas = "num_replicas"; + static constexpr const char* const kOutputTypes = "output_types"; + static constexpr const char* const kOutputShapes = "output_shapes"; + + explicit AutoShardDatasetOp(OpKernelConstruction* ctx); + + protected: + void MakeDataset(OpKernelContext* ctx, DatasetBase* input, + DatasetBase** output) override; + + private: + static RewriterConfig CreateConfig(int64_t num_workers, int64_t index, + int64_t auto_shard_policy, + int64_t num_replicas); + int64_t auto_shard_policy_; + int64_t num_replicas_; +}; + +} // namespace experimental +} // namespace data +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_DATA_EXPERIMENTAL_AUTO_SHARD_DATASET_OP_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/experimental/compression_ops.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/experimental/compression_ops.h new file mode 100644 index 0000000000000000000000000000000000000000..6dd89ea4e5d5a8493ffa4fc89f12deec009772f8 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/experimental/compression_ops.h @@ -0,0 +1,49 @@ +/* Copyright 2020 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ +#ifndef TENSORFLOW_CORE_KERNELS_DATA_EXPERIMENTAL_COMPRESSION_OPS_H_ +#define TENSORFLOW_CORE_KERNELS_DATA_EXPERIMENTAL_COMPRESSION_OPS_H_ + +#include "tensorflow/core/framework/dataset.h" + +namespace tensorflow { +namespace data { +namespace experimental { + +class CompressElementOp : public OpKernel { + public: + explicit CompressElementOp(OpKernelConstruction* ctx); + + void Compute(OpKernelContext* ctx) override; +}; + +class UncompressElementOp : public OpKernel { + public: + static constexpr const char* const kOutputTypes = "output_types"; + static constexpr const char* const kOutputShapes = "output_shapes"; + + explicit UncompressElementOp(OpKernelConstruction* ctx); + + void Compute(OpKernelContext* ctx) override; + + private: + DataTypeVector output_types_; + std::vector output_shapes_; +}; + +} // namespace experimental +} // namespace data +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_DATA_EXPERIMENTAL_COMPRESSION_OPS_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/experimental/directed_interleave_dataset_op.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/experimental/directed_interleave_dataset_op.h new file mode 100644 index 0000000000000000000000000000000000000000..25c0ef7a578ffa682488f62747e75d8fe427c195 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/experimental/directed_interleave_dataset_op.h @@ -0,0 +1,50 @@ +/* Copyright 2020 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ +#ifndef TENSORFLOW_CORE_KERNELS_DATA_EXPERIMENTAL_DIRECTED_INTERLEAVE_DATASET_OP_H_ +#define TENSORFLOW_CORE_KERNELS_DATA_EXPERIMENTAL_DIRECTED_INTERLEAVE_DATASET_OP_H_ + +#include "tensorflow/core/framework/dataset.h" + +namespace tensorflow { +namespace data { +namespace experimental { + +class DirectedInterleaveDatasetOp : public DatasetOpKernel { + public: + static constexpr const char* const kDatasetType = "DirectedInterleave"; + static constexpr const char* const kSelectorInputDataset = + "selector_input_dataset"; + static constexpr const char* const kDataInputDatasets = "data_input_datasets"; + static constexpr const char* const kOutputTypes = "output_types"; + static constexpr const char* const kOutputShapes = "output_shapes"; + static constexpr const char* const kNumInputDatasets = "N"; + static constexpr const char* const kStopOnEmptyDataset = + "stop_on_empty_dataset"; + + explicit DirectedInterleaveDatasetOp(OpKernelConstruction* ctx); + + protected: + void MakeDataset(OpKernelContext* ctx, DatasetBase** output) override; + + private: + class Dataset; + bool stop_on_empty_dataset_ = false; +}; + +} // namespace experimental +} // namespace data +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_DATA_EXPERIMENTAL_DIRECTED_INTERLEAVE_DATASET_OP_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/experimental/list_dataset_op.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/experimental/list_dataset_op.h new file mode 100644 index 0000000000000000000000000000000000000000..ef9210429ca30705eda5855f2c0f1085c6ca644d --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/experimental/list_dataset_op.h @@ -0,0 +1,46 @@ +/* Copyright 2022 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ +#ifndef TENSORFLOW_CORE_KERNELS_DATA_EXPERIMENTAL_LIST_DATASET_OP_H_ +#define TENSORFLOW_CORE_KERNELS_DATA_EXPERIMENTAL_LIST_DATASET_OP_H_ + +#include "tensorflow/core/framework/dataset.h" + +namespace tensorflow { +namespace data { + +class ListDatasetOp : public DatasetOpKernel { + public: + static constexpr const char* const kDatasetType = "List"; + static constexpr const char* const kTensors = "tensors"; + static constexpr const char* const kTinputTypes = "Tinput_types"; + static constexpr const char* const kOutputTypes = "output_types"; + static constexpr const char* const kOutputShapes = "output_shapes"; + + explicit ListDatasetOp(OpKernelConstruction* ctx); + + protected: + void MakeDataset(OpKernelContext* ctx, DatasetBase** output) override; + + private: + class Dataset; + DataTypeVector input_types_; + DataTypeVector output_types_; + std::vector output_shapes_; +}; + +} // namespace data +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_DATA_EXPERIMENTAL_LIST_DATASET_OP_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/experimental/lmdb_dataset_op.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/experimental/lmdb_dataset_op.h new file mode 100644 index 0000000000000000000000000000000000000000..f58473a7a8646a4db87ef705083674b991b15aaa --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/experimental/lmdb_dataset_op.h @@ -0,0 +1,44 @@ +/* Copyright 2019 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ +#ifndef TENSORFLOW_CORE_KERNELS_DATA_EXPERIMENTAL_LMDB_DATASET_OP_H_ +#define TENSORFLOW_CORE_KERNELS_DATA_EXPERIMENTAL_LMDB_DATASET_OP_H_ + +#include "tensorflow/core/framework/dataset.h" + +namespace tensorflow { +namespace data { +namespace experimental { + +class LMDBDatasetOp : public DatasetOpKernel { + public: + static constexpr const char* const kDatasetType = "LMDB"; + static constexpr const char* const kFileNames = "filenames"; + static constexpr const char* const kOutputTypes = "output_types"; + static constexpr const char* const kOutputShapes = "output_shapes"; + + using DatasetOpKernel::DatasetOpKernel; + + protected: + void MakeDataset(OpKernelContext* ctx, DatasetBase** output) override; + + private: + class Dataset; +}; + +} // namespace experimental +} // namespace data +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_DATA_EXPERIMENTAL_LMDB_DATASET_OP_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/experimental/load_dataset_op.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/experimental/load_dataset_op.h new file mode 100644 index 0000000000000000000000000000000000000000..4a27d6aab15cc0e4503ee0f8440b4ef9493d1dad --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/experimental/load_dataset_op.h @@ -0,0 +1,62 @@ +/* Copyright 2020 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_KERNELS_DATA_EXPERIMENTAL_LOAD_DATASET_OP_H_ +#define TENSORFLOW_CORE_KERNELS_DATA_EXPERIMENTAL_LOAD_DATASET_OP_H_ + +#include +#include +#include + +#include "tensorflow/core/data/captured_function.h" +#include "tensorflow/core/framework/dataset.h" +#include "tensorflow/core/framework/op_kernel.h" + +namespace tensorflow { +namespace data { +namespace experimental { + +// An operation that can load a dataset from one or more files. +class LoadDatasetOp : public DatasetOpKernel { + public: + static constexpr const char* const kCompression = "compression"; + static constexpr const char* const kDatasetType = "Load"; + static constexpr const char* const kOutputTypes = "output_types"; + static constexpr const char* const kOutputShapes = "output_shapes"; + static constexpr const char* const kPath = "path"; + static constexpr const char* const kReaderFunc = "reader_func"; + static constexpr const char* const kReaderFuncOtherArgs = + "reader_func_other_args"; + static constexpr const char* const kReaderFuncTarguments = + "Treader_func_args"; + + explicit LoadDatasetOp(OpKernelConstruction* ctx); + + void MakeDataset(OpKernelContext* ctx, DatasetBase** output) override; + + private: + class Dataset; + + std::string compression_; + DataTypeVector output_types_; + std::vector output_shapes_; + std::shared_ptr reader_func_metadata_; +}; + +} // namespace experimental +} // namespace data +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_DATA_EXPERIMENTAL_LOAD_DATASET_OP_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/experimental/map_and_batch_dataset_op.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/experimental/map_and_batch_dataset_op.h new file mode 100644 index 0000000000000000000000000000000000000000..b3fec152dd190b6db1632bce23b01d0afcab934e --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/experimental/map_and_batch_dataset_op.h @@ -0,0 +1,61 @@ +/* Copyright 2019 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ +#ifndef TENSORFLOW_CORE_KERNELS_DATA_EXPERIMENTAL_MAP_AND_BATCH_DATASET_OP_H_ +#define TENSORFLOW_CORE_KERNELS_DATA_EXPERIMENTAL_MAP_AND_BATCH_DATASET_OP_H_ + +#include "tensorflow/core/data/captured_function.h" +#include "tensorflow/core/framework/dataset.h" + +namespace tensorflow { +namespace data { +namespace experimental { + +// See documentation in ../../ops/experimental_dataset_ops.cc for a high-level +// description of the following op. + +class MapAndBatchDatasetOp : public UnaryDatasetOpKernel { + public: + static constexpr const char* const kDatasetType = "MapAndBatch"; + static constexpr const char* const kInputDataset = "input_dataset"; + static constexpr const char* const kOtherArguments = "other_arguments"; + static constexpr const char* const kBatchSize = "batch_size"; + static constexpr const char* const kNumParallelCalls = "num_parallel_calls"; + static constexpr const char* const kDropRemainder = "drop_remainder"; + static constexpr const char* const kFunc = "f"; + static constexpr const char* const kTarguments = "Targuments"; + static constexpr const char* const kOutputTypes = "output_types"; + static constexpr const char* const kOutputShapes = "output_shapes"; + static constexpr const char* const kPreserveCardinality = + "preserve_cardinality"; + + explicit MapAndBatchDatasetOp(OpKernelConstruction* ctx); + + protected: + void MakeDataset(OpKernelContext* ctx, DatasetBase* input, + DatasetBase** output) override; + + private: + class Dataset; + std::shared_ptr func_metadata_ = nullptr; + DataTypeVector output_types_; + std::vector output_shapes_; + bool preserve_cardinality_; +}; + +} // namespace experimental +} // namespace data +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_DATA_EXPERIMENTAL_MAP_AND_BATCH_DATASET_OP_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/experimental/parallel_interleave_dataset_op.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/experimental/parallel_interleave_dataset_op.h new file mode 100644 index 0000000000000000000000000000000000000000..fc59b599909e8ebce9bbf0ba998141dba8eedc5b --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/experimental/parallel_interleave_dataset_op.h @@ -0,0 +1,67 @@ +/* Copyright 2019 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ +#ifndef TENSORFLOW_CORE_KERNELS_DATA_EXPERIMENTAL_PARALLEL_INTERLEAVE_DATASET_OP_H_ +#define TENSORFLOW_CORE_KERNELS_DATA_EXPERIMENTAL_PARALLEL_INTERLEAVE_DATASET_OP_H_ + +#include "tensorflow/core/data/captured_function.h" +#include "tensorflow/core/data/dataset_utils.h" +#include "tensorflow/core/framework/dataset.h" + +namespace tensorflow { +namespace data { +namespace experimental { + +// See documentation in ../../ops/experimental_dataset_ops.cc for a high-level +// description of the following op. + +class ParallelInterleaveDatasetOp : public UnaryDatasetOpKernel { + public: + static constexpr const char* const kDatasetType = "LegacyParallelInterleave"; + static constexpr const char* const kInputDataset = "input_dataset"; + static constexpr const char* const kOtherArguments = "other_arguments"; + static constexpr const char* const kCycleLength = "cycle_length"; + static constexpr const char* const kBlockLength = "block_length"; + static constexpr const char* const kDeterministic = "deterministic"; + static constexpr const char* const kSloppy = "sloppy"; + static constexpr const char* const kBufferOutputElements = + "buffer_output_elements"; + static constexpr const char* const kPrefetchInputElements = + "prefetch_input_elements"; + static constexpr const char* const kFunc = "f"; + static constexpr const char* const kTarguments = "Targuments"; + static constexpr const char* const kOutputTypes = "output_types"; + static constexpr const char* const kOutputShapes = "output_shapes"; + + explicit ParallelInterleaveDatasetOp(OpKernelConstruction* ctx); + + protected: + void MakeDataset(OpKernelContext* ctx, DatasetBase* input, + DatasetBase** output) override; + + private: + class Dataset; + const int op_version_; + + std::shared_ptr func_metadata_ = nullptr; + DataTypeVector output_types_; + std::vector output_shapes_; + DeterminismPolicy deterministic_; +}; + +} // namespace experimental +} // namespace data +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_DATA_EXPERIMENTAL_PARALLEL_INTERLEAVE_DATASET_OP_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/experimental/random_access_ops.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/experimental/random_access_ops.h new file mode 100644 index 0000000000000000000000000000000000000000..ddc5e9dabf53f3dadaf04d627527c867974da709 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/experimental/random_access_ops.h @@ -0,0 +1,64 @@ +/* Copyright 2021 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ +#ifndef TENSORFLOW_CORE_KERNELS_DATA_EXPERIMENTAL_RANDOM_ACCESS_OPS_H_ +#define TENSORFLOW_CORE_KERNELS_DATA_EXPERIMENTAL_RANDOM_ACCESS_OPS_H_ + +#include "tensorflow/core/framework/dataset.h" +#include "tensorflow/core/framework/op_kernel.h" +#include "tensorflow/core/framework/op_requires.h" +#include "tensorflow/core/kernels/data/iterator_ops.h" +#include "tensorflow/core/platform/platform.h" + +namespace tensorflow { +namespace data { +namespace experimental { + +// An operation that can get an element at a specified index in a dataset. +class GetElementAtIndexOp : public AsyncOpKernel { + public: + explicit GetElementAtIndexOp(OpKernelConstruction* ctx) + : AsyncOpKernel(ctx), + unbounded_threadpool_(ctx->env(), "tf_data_get_element_at_index") { + OP_REQUIRES_OK(ctx, ctx->GetAttr("output_types", &output_types_)); + OP_REQUIRES_OK(ctx, ctx->GetAttr("output_shapes", &output_shapes_)); + } + + ~GetElementAtIndexOp() override {} + + void ComputeAsync(OpKernelContext* ctx, DoneCallback done) override { + unbounded_threadpool_.Schedule([this, ctx, done = std::move(done)]() { + ctx->SetStatus(DoCompute(ctx)); + done(); + }); + } + + void Compute(OpKernelContext* ctx) override { + ctx->SetStatus(DoCompute(ctx)); + } + + protected: + Status DoCompute(OpKernelContext* ctx); + + private: + UnboundedThreadPool unbounded_threadpool_; + DataTypeVector output_types_; + std::vector output_shapes_; +}; + +} // namespace experimental +} // namespace data +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_DATA_EXPERIMENTAL_RANDOM_ACCESS_OPS_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/experimental/random_dataset_op.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/experimental/random_dataset_op.h new file mode 100644 index 0000000000000000000000000000000000000000..2b3624fedfcafab82c209756e263e8540f093449 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/experimental/random_dataset_op.h @@ -0,0 +1,54 @@ +/* Copyright 2019 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ +#ifndef TENSORFLOW_CORE_KERNELS_DATA_EXPERIMENTAL_RANDOM_DATASET_OP_H_ +#define TENSORFLOW_CORE_KERNELS_DATA_EXPERIMENTAL_RANDOM_DATASET_OP_H_ + +#include "tensorflow/core/framework/dataset.h" + +namespace tensorflow { +namespace data { +namespace experimental { + +// See tensorflow/core/api_def/base_api/api_def_RandomDataset.pbtxt for the +// API definition that corresponds to this kernel. +class RandomDatasetOp : public DatasetOpKernel { + public: + // Names of op parameters, public so that they can be accessed by test cases. + // Make sure that these are kept in sync with the REGISTER_OP call in + // tensorflow/core/ops/experimental_dataset_ops.cc + static constexpr const char* const kDatasetType = "Random"; + static constexpr const char* const kSeed = "seed"; + static constexpr const char* const kSeed2 = "seed2"; + static constexpr const char* const kOutputTypes = "output_types"; + static constexpr const char* const kOutputShapes = "output_shapes"; + static constexpr const char* const kRerandomizeEachIteration = + "rerandomize_each_iteration"; + + explicit RandomDatasetOp(OpKernelConstruction* ctx); + + protected: + void MakeDataset(OpKernelContext* ctx, DatasetBase** output) override; + + private: + class Dataset; + int32_t op_version_; + bool rerandomize_each_iteration_ = false; +}; + +} // namespace experimental +} // namespace data +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_DATA_EXPERIMENTAL_RANDOM_DATASET_OP_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/experimental/sampling_dataset_op.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/experimental/sampling_dataset_op.h new file mode 100644 index 0000000000000000000000000000000000000000..9223c0e5497f27b0a00d5fa60e998038a25d7457 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/experimental/sampling_dataset_op.h @@ -0,0 +1,53 @@ +/* Copyright 2019 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ +#ifndef TENSORFLOW_CORE_KERNELS_DATA_EXPERIMENTAL_SAMPLING_DATASET_OP_H_ +#define TENSORFLOW_CORE_KERNELS_DATA_EXPERIMENTAL_SAMPLING_DATASET_OP_H_ + +#include "tensorflow/core/framework/dataset.h" + +namespace tensorflow { +namespace data { +namespace experimental { + +// See tensorflow/core/api_def/base_api/api_def_SamplingDataset.pbtxt for the +// API definition that corresponds to this kernel. +class SamplingDatasetOp : public UnaryDatasetOpKernel { + public: + // Names of op parameters, public so that they can be accessed by test cases. + // Make sure that these are kept in sync with the REGISTER_OP call in + // tensorflow/core/ops/experimental_dataset_ops.cc + static constexpr const char* const kDatasetType = "Sampling"; + static constexpr const char* const kInputDataset = "input_dataset"; + static constexpr const char* const kRate = "rate"; + static constexpr const char* const kSeed = "seed"; + static constexpr const char* const kSeed2 = "seed2"; + static constexpr const char* const kOutputTypes = "output_types"; + static constexpr const char* const kOutputShapes = "output_shapes"; + + explicit SamplingDatasetOp(OpKernelConstruction* ctx); + + protected: + void MakeDataset(OpKernelContext* ctx, DatasetBase* input, + DatasetBase** output) override; + + private: + class Dataset; +}; + +} // namespace experimental +} // namespace data +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_DATA_EXPERIMENTAL_SAMPLING_DATASET_OP_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/experimental/save_dataset_op.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/experimental/save_dataset_op.h new file mode 100644 index 0000000000000000000000000000000000000000..212a1d7b62b34d245d28f2aaa8c46823a937b0a3 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/experimental/save_dataset_op.h @@ -0,0 +1,113 @@ +/* Copyright 2020 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_KERNELS_DATA_EXPERIMENTAL_SAVE_DATASET_OP_H_ +#define TENSORFLOW_CORE_KERNELS_DATA_EXPERIMENTAL_SAVE_DATASET_OP_H_ + +#include +#include +#include + +#include "tensorflow/core/data/captured_function.h" +#include "tensorflow/core/framework/dataset.h" +#include "tensorflow/core/framework/op_kernel.h" +#include "tensorflow/core/kernels/data/iterator_ops.h" +#include "tensorflow/core/platform/thread_annotations.h" + +namespace tensorflow { +namespace data { +namespace experimental { + +// An operation that can save a dataset to one or more files. +class SaveDatasetOp : public HybridAsyncOpKernel { + public: + static constexpr const char* const kCompression = "compression"; + static constexpr const char* const kPath = "path"; + static constexpr const char* const kShardFunc = "shard_func"; + static constexpr const char* const kShardFuncOtherArgs = + "shard_func_other_args"; + static constexpr const char* const kUseShardFunc = "use_shard_func"; + + explicit SaveDatasetOp(OpKernelConstruction* ctx); + + Status DoCompute(OpKernelContext* ctx) override; + + private: + static constexpr const int kFileFormatVersion = 2; + + Status ConsumeElement(); + + Status GetShardIndex(IteratorContext* ctx, + InstantiatedCapturedFunction* function, + const std::vector& element, + int64_t* shard_index); + + Status WriteData(OpKernelContext* ctx, DatasetBase* dataset, + std::unique_ptr captured_func, + const std::string& run_dir, uint64* num_elements); + + Status WriteMetadataFile(Env* env, const std::string& path, uint64 run_id, + const DataTypeVector& output_dtypes, + uint64 num_elements, bool finalized); + + bool use_shard_func_; + std::string compression_; + std::shared_ptr func_metadata_; +}; + +// An operation that can save a dataset to one or more files. This +// version of the implementation subclasses from UnaryDatasetOpKernel to align +// the implementation of save with that of the other tf.data transformations. +class SaveDatasetV2Op : public UnaryDatasetOpKernel { + public: + static constexpr const char* const kInputDataset = "input_dataset"; + static constexpr const char* const kPath = "path"; + static constexpr const char* const kCompression = "compression"; + + static constexpr const char* const kDatasetType = "SaveV2"; + static constexpr const char* const kOutputTypes = "output_types"; + static constexpr const char* const kOutputShapes = "output_shapes"; + + static constexpr const char* const kShardFunc = "shard_func"; + static constexpr const char* const kShardFuncOtherArgs = + "shard_func_other_args"; + static constexpr const char* const kUseShardFunc = "use_shard_func"; + static constexpr const char* const kShardFuncTarguments = "Tshard_func_args"; + + explicit SaveDatasetV2Op(OpKernelConstruction* ctx); + + void MakeDataset(OpKernelContext* ctx, DatasetBase* input, + DatasetBase** output) override; + + private: + class Dataset; + + static constexpr const int kFileFormatVersion = 2; + + tstring path_; + std::string compression_; + std::unique_ptr shard_func_; + bool use_shard_func_; + DataTypeVector output_types_; + std::vector output_shapes_; + std::shared_ptr func_metadata_; + std::string writer_prefix_; +}; + +} // namespace experimental +} // namespace data +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_DATA_EXPERIMENTAL_SAVE_DATASET_OP_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/experimental/snapshot_dataset_op.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/experimental/snapshot_dataset_op.h new file mode 100644 index 0000000000000000000000000000000000000000..fb1fa875af264d742e1ea97ef318ca485c1c8618 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/experimental/snapshot_dataset_op.h @@ -0,0 +1,95 @@ +/* Copyright 2020 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_KERNELS_DATA_EXPERIMENTAL_SNAPSHOT_DATASET_OP_H_ +#define TENSORFLOW_CORE_KERNELS_DATA_EXPERIMENTAL_SNAPSHOT_DATASET_OP_H_ + +#include + +#include "absl/container/flat_hash_map.h" +#include "tensorflow/core/data/captured_function.h" +#include "tensorflow/core/data/dataset_utils.h" +#include "tensorflow/core/data/name_utils.h" +#include "tensorflow/core/data/snapshot_utils.h" +#include "tensorflow/core/framework/dataset.h" +#include "tensorflow/core/framework/op_kernel.h" +#include "tensorflow/core/framework/op_requires.h" +#include "tensorflow/core/framework/tensor_shape.h" +#include "tensorflow/core/framework/types.h" +#include "tensorflow/core/lib/gtl/map_util.h" +#include "tensorflow/core/platform/env.h" +#include "tensorflow/core/platform/errors.h" +#include "tensorflow/core/platform/mutex.h" +#include "tensorflow/core/platform/path.h" +#include "tensorflow/core/platform/random.h" +#include "tensorflow/core/platform/thread_annotations.h" + +namespace tensorflow { +namespace data { +namespace experimental { + +class SnapshotDatasetV2Op : public UnaryDatasetOpKernel { + public: + static constexpr const char* const kDatasetType = "Snapshot"; + static constexpr const char* const kOutputTypes = "output_types"; + static constexpr const char* const kOutputShapes = "output_shapes"; + static constexpr const char* const kCompression = "compression"; + static constexpr const char* const kReaderPrefix = "reader_prefix"; + static constexpr const char* const kWriterPrefix = "writer_prefix"; + static constexpr const char* const kHashValid = "hash_valid"; + static constexpr const char* const kHash = "hash"; + static constexpr const char* const kCompressionAuto = "AUTO"; + static constexpr const char* const kReaderFunc = "reader_func"; + static constexpr const char* const kShardFunc = "shard_func"; + static constexpr const char* const kReaderFuncOtherArgs = + "reader_func_other_args"; + static constexpr const char* const kShardFuncOtherArgs = + "shard_func_other_args"; + static constexpr const char* const kReaderFuncTarguments = + "Treader_func_args"; + static constexpr const char* const kShardFuncTarguments = "Tshard_func_args"; + // Note: If a new constant is declared here, it *must* be defined in + // snapshot_dataset_op.cc, otherwise it will not compile in debug mode. + + explicit SnapshotDatasetV2Op(OpKernelConstruction* ctx); + + protected: + void MakeDataset(OpKernelContext* ctx, DatasetBase* input, + DatasetBase** output) override; + + private: + static constexpr const int kFileFormatVersion = 2; + + class Dataset; + + const int graph_def_version_; + DataTypeVector output_types_; + std::vector output_shapes_; + + std::string compression_; + std::string reader_prefix_; + std::string writer_prefix_; + bool hash_valid_; + uint64 hash_; + + std::shared_ptr reader_func_metadata_; + std::shared_ptr shard_func_metadata_; +}; + +} // namespace experimental +} // namespace data +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_DATA_EXPERIMENTAL_SNAPSHOT_DATASET_OP_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/experimental/sql/driver_manager.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/experimental/sql/driver_manager.h new file mode 100644 index 0000000000000000000000000000000000000000..7aa307e2690b136e8f582df1ffdf2acebff93ca2 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/experimental/sql/driver_manager.h @@ -0,0 +1,43 @@ +/* Copyright 2017 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ +#ifndef TENSORFLOW_CORE_KERNELS_DATA_EXPERIMENTAL_SQL_DRIVER_MANAGER_H_ +#define TENSORFLOW_CORE_KERNELS_DATA_EXPERIMENTAL_SQL_DRIVER_MANAGER_H_ + +#include "tensorflow/core/kernels/data/experimental/sql/query_connection.h" + +namespace tensorflow { +namespace data { +namespace experimental { +namespace sql { + +// A factory class for creating `QueryConnection` instances. +class DriverManager { + public: + // A factory method for creating `QueryConnection` instances. + // + // `driver_name` is the database type (e.g. 'sqlite'). `driver_name` + // corresponds to a `QueryConnection` subclass. For example, if `driver_name` + // == `sqlite`, then `CreateQueryConnection` will create a + // `SqliteQueryConnection` instance. + static std::unique_ptr CreateQueryConnection( + const string& driver_name); +}; + +} // namespace sql +} // namespace experimental +} // namespace data +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_DATA_EXPERIMENTAL_SQL_DRIVER_MANAGER_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/experimental/sql/query_connection.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/experimental/sql/query_connection.h new file mode 100644 index 0000000000000000000000000000000000000000..40f13d54f35b44fa6ea953743d1e626f1326bb72 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/experimental/sql/query_connection.h @@ -0,0 +1,73 @@ +/* Copyright 2017 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ +#ifndef TENSORFLOW_CORE_KERNELS_DATA_EXPERIMENTAL_SQL_QUERY_CONNECTION_H_ +#define TENSORFLOW_CORE_KERNELS_DATA_EXPERIMENTAL_SQL_QUERY_CONNECTION_H_ + +#include "tensorflow/core/framework/tensor.h" + +namespace tensorflow { +namespace data { + +class IteratorContext; + +namespace experimental { + +namespace sql { +// This interface allows a user to connect to a database, execute a query, and +// iterate over the result set, putting the results into an output tensor. +// A subclass implementation is required for each type of database +// (e.g. sqlite3, mysql, etc.) +// +// Presently, a `QueryConnection` instance can only handle one query at a time. +// In a future extension, this class may be refactored so that it creates +// instances of a new class (named, say, `Statement`) which could have a +// one-to-one correspondence with queries. This would make `QueryConnection` +// more consistent with `Connection` classes of other database APIs. +// `QueryConnection` would then be renamed simply `Connection`. +// +// This class is not thread safe. Access to it is guarded by a mutex in +// `SqlDatasetOp::Dataset::Iterator`. +class QueryConnection { + public: + virtual ~QueryConnection() {} + // Opens a connection to the database named by `data_source_name`. Prepares to + // execute `query` against the database. + // + // The client must call `Close()` to release the connection resources, even + // if `Open()` fails. `Close()` must be called before making another call + // to `Open()`. + virtual Status Open(const string& data_source_name, const string& query, + const DataTypeVector& output_types) = 0; + // Closes an opened connection. + virtual Status Close() = 0; + // Retrieves the next row of the result set of the query from the most recent + // call to `Open()`. + // + // If such a row exists, then the row will be stored in `*out_tensors`, and + // `false` will be stored in `*end_of_sequence`. + // + // If there are no more rows in the result set, then instead `true` will be + // stored in `*end_of_sequence`, and the content of `*out_tensors` will be + // undefined. + virtual Status GetNext(IteratorContext* ctx, std::vector* out_tensors, + bool* end_of_sequence) = 0; +}; + +} // namespace sql +} // namespace experimental +} // namespace data +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_DATA_EXPERIMENTAL_SQL_QUERY_CONNECTION_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/experimental/sql/sqlite_query_connection.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/experimental/sql/sqlite_query_connection.h new file mode 100644 index 0000000000000000000000000000000000000000..42526c7668a2a685736a79a37f11c201c504645e --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/experimental/sql/sqlite_query_connection.h @@ -0,0 +1,58 @@ +/* Copyright 2017 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ +#ifndef TENSORFLOW_CORE_KERNELS_DATA_EXPERIMENTAL_SQL_SQLITE_QUERY_CONNECTION_H_ +#define TENSORFLOW_CORE_KERNELS_DATA_EXPERIMENTAL_SQL_SQLITE_QUERY_CONNECTION_H_ + +#include + +#include "tensorflow/core/kernels/data/experimental/sql/query_connection.h" +#include "tensorflow/core/lib/db/sqlite.h" +#include "tensorflow/core/platform/types.h" + +namespace tensorflow { +namespace data { +namespace experimental { +namespace sql { + +class SqliteQueryConnection : public QueryConnection { + public: + SqliteQueryConnection(); + ~SqliteQueryConnection() override; + Status Open(const string& data_source_name, const string& query, + const DataTypeVector& output_types) override; + Status Close() override; + Status GetNext(IteratorContext* ctx, std::vector* out_tensors, + bool* end_of_sequence) override; + + private: + // Prepares the query string `query_`. + Status PrepareQuery(); + // Fills `tensor` with the column_index_th element of the current row of + // `stmt_`. + void FillTensorWithResultSetEntry(const DataType& data_type, int column_index, + Tensor* tensor); + Sqlite* db_ = nullptr; + SqliteStatement stmt_; + int column_count_ = 0; + string query_; + DataTypeVector output_types_; +}; + +} // namespace sql +} // namespace experimental +} // namespace data +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_DATA_EXPERIMENTAL_SQL_SQLITE_QUERY_CONNECTION_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/experimental/threadpool_dataset_op.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/experimental/threadpool_dataset_op.h new file mode 100644 index 0000000000000000000000000000000000000000..88d5ef7a4c341a3b33e0ead2ffaa886e224eb78d --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/experimental/threadpool_dataset_op.h @@ -0,0 +1,74 @@ +/* Copyright 2021 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ +#ifndef TENSORFLOW_CORE_KERNELS_DATA_EXPERIMENTAL_THREADPOOL_DATASET_OP_H_ +#define TENSORFLOW_CORE_KERNELS_DATA_EXPERIMENTAL_THREADPOOL_DATASET_OP_H_ + +#include "tensorflow/core/framework/dataset.h" +#include "tensorflow/core/platform/platform.h" + +namespace tensorflow { +namespace data { +namespace experimental { + +class MaxIntraOpParallelismDatasetOp : public UnaryDatasetOpKernel { + public: + static constexpr const char* const kDatasetType = + "MaxIntraOpParallelismDataset"; + static constexpr const char* const kDatasetOp = + "MaxIntraOpParallelismDatasetOp"; + + // Executes the logic of the MaxIntraOpParallelismDatasetOp directly (as + // opposed to through executing the MaxIntraOpParallelismDatasetOp op kernel). + static void MakeDatasetFromOptions(OpKernelContext* ctx, DatasetBase* input, + int32_t max_intra_op_parallelism, + DatasetBase** output); + + explicit MaxIntraOpParallelismDatasetOp(OpKernelConstruction* ctx) + : UnaryDatasetOpKernel(ctx) {} + + protected: + void MakeDataset(OpKernelContext* ctx, DatasetBase* input, + DatasetBase** output) override; + + private: + class Dataset; +}; + +class PrivateThreadPoolDatasetOp : public UnaryDatasetOpKernel { + public: + static constexpr const char* const kDatasetType = "PrivateThreadPoolDataset"; + static constexpr const char* const kDatasetOp = "PrivateThreadPoolDatasetOp"; + + // Executes the logic of the PrivateThreadpoolDatasetOp directly (as + // opposed to through executing the PrivateThreadpoolDatasetOp op kernel). + static void MakeDatasetFromOptions(OpKernelContext* ctx, DatasetBase* input, + int32_t num_threads, DatasetBase** output); + + explicit PrivateThreadPoolDatasetOp(OpKernelConstruction* ctx) + : UnaryDatasetOpKernel(ctx) {} + + protected: + void MakeDataset(OpKernelContext* ctx, DatasetBase* input, + DatasetBase** output) override; + + private: + class Dataset; +}; + +} // namespace experimental +} // namespace data +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_DATA_EXPERIMENTAL_THREADPOOL_DATASET_OP_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/experimental/unique_dataset_op.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/experimental/unique_dataset_op.h new file mode 100644 index 0000000000000000000000000000000000000000..2d415816920a7bff5311052802bc150b847284bb --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/experimental/unique_dataset_op.h @@ -0,0 +1,46 @@ +/* Copyright 2019 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ +#ifndef TENSORFLOW_CORE_KERNELS_DATA_EXPERIMENTAL_UNIQUE_DATASET_OP_H_ +#define TENSORFLOW_CORE_KERNELS_DATA_EXPERIMENTAL_UNIQUE_DATASET_OP_H_ + +#include "tensorflow/core/framework/dataset.h" + +namespace tensorflow { +namespace data { +namespace experimental { + +class UniqueDatasetOp : public UnaryDatasetOpKernel { + public: + static constexpr const char* const kDatasetType = "Unique"; + static constexpr const char* const kInputDataset = "input_dataset"; + static constexpr const char* const kOutputTypes = "output_types"; + static constexpr const char* const kOutputShapes = "output_shapes"; + + explicit UniqueDatasetOp(OpKernelConstruction* ctx) + : UnaryDatasetOpKernel(ctx) {} + + protected: + void MakeDataset(OpKernelContext* ctx, DatasetBase* input, + DatasetBase** output) override; + + private: + class Dataset; +}; + +} // namespace experimental +} // namespace data +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_DATA_EXPERIMENTAL_UNIQUE_DATASET_OP_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/filter_dataset_op.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/filter_dataset_op.h new file mode 100644 index 0000000000000000000000000000000000000000..59c5bcc178b772f2c7f8c64351471751ed2b785c --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/filter_dataset_op.h @@ -0,0 +1,48 @@ +/* Copyright 2019 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ +#ifndef TENSORFLOW_CORE_KERNELS_DATA_FILTER_DATASET_OP_H_ +#define TENSORFLOW_CORE_KERNELS_DATA_FILTER_DATASET_OP_H_ + +#include "tensorflow/core/data/captured_function.h" +#include "tensorflow/core/framework/dataset.h" + +namespace tensorflow { +namespace data { + +class FilterDatasetOp : public UnaryDatasetOpKernel { + public: + static constexpr const char* const kDatasetType = "Filter"; + static constexpr const char* const kInputDataset = "input_dataset"; + static constexpr const char* const kOtherArguments = "other_arguments"; + static constexpr const char* const kPredicate = "predicate"; + static constexpr const char* const kTarguments = "Targuments"; + static constexpr const char* const kOutputTypes = "output_types"; + static constexpr const char* const kOutputShapes = "output_shapes"; + + explicit FilterDatasetOp(OpKernelConstruction* ctx); + + protected: + void MakeDataset(OpKernelContext* ctx, DatasetBase* input, + DatasetBase** output) override; + + private: + class Dataset; + std::shared_ptr func_metadata_ = nullptr; +}; + +} // namespace data +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_DATA_FILTER_DATASET_OP_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/finalize_dataset_op.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/finalize_dataset_op.h new file mode 100644 index 0000000000000000000000000000000000000000..4b2ef22b2b621cb7159bb375e0486a24ed16ee32 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/finalize_dataset_op.h @@ -0,0 +1,60 @@ +/* Copyright 2021 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ +#ifndef TENSORFLOW_CORE_KERNELS_DATA_FINALIZE_DATASET_OP_H_ +#define TENSORFLOW_CORE_KERNELS_DATA_FINALIZE_DATASET_OP_H_ + +#include "tensorflow/core/framework/dataset.h" +#include "tensorflow/core/framework/op_kernel.h" + +namespace tensorflow { +namespace data { + +class FinalizeDatasetOp : public UnaryDatasetOpKernel { + public: + static constexpr const char* const kDatasetType = "Finalize"; + static constexpr const char* const kInputDataset = "input_dataset"; + static constexpr const char* const kOutputTypes = "output_types"; + static constexpr const char* const kOutputShapes = "output_shapes"; + static constexpr const char* const kHasCapturedRef = "has_captured_ref"; + + explicit FinalizeDatasetOp(OpKernelConstruction* ctx); + + void MakeDataset(OpKernelContext* ctx, DatasetBase* input, + DatasetBase** output) override; + + private: + class Dataset; + bool has_captured_ref_; +}; + +class FinalizeDatasetNoopOp : public UnaryDatasetOpKernel { + public: + explicit FinalizeDatasetNoopOp(OpKernelConstruction* ctx) + : UnaryDatasetOpKernel(ctx) {} + + protected: + void MakeDataset(OpKernelContext* ctx, DatasetBase* input, + DatasetBase** output) override { + LOG(WARNING) << "FinalizeDataset is only supported on CPU. Using it on " + "devices other than CPU has no effect."; + input->Ref(); + *output = input; + } +}; + +} // namespace data +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_DATA_FINALIZE_DATASET_OP_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/fixed_length_record_dataset_op.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/fixed_length_record_dataset_op.h new file mode 100644 index 0000000000000000000000000000000000000000..30b620310854e43743a819a40a733e62414deea4 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/fixed_length_record_dataset_op.h @@ -0,0 +1,46 @@ +/* Copyright 2019 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ +#ifndef TENSORFLOW_CORE_KERNELS_DATA_FIXED_LENGTH_RECORD_DATASET_OP_H_ +#define TENSORFLOW_CORE_KERNELS_DATA_FIXED_LENGTH_RECORD_DATASET_OP_H_ + +#include "tensorflow/core/framework/dataset.h" + +namespace tensorflow { +namespace data { + +class FixedLengthRecordDatasetOp : public DatasetOpKernel { + public: + static constexpr const char* const kDatasetType = "FixedLengthRecord"; + static constexpr const char* const kFileNames = "filenames"; + static constexpr const char* const kHeaderBytes = "header_bytes"; + static constexpr const char* const kRecordBytes = "record_bytes"; + static constexpr const char* const kFooterBytes = "footer_bytes"; + static constexpr const char* const kBufferSize = "buffer_size"; + static constexpr const char* const kCompressionType = "compression_type"; + + explicit FixedLengthRecordDatasetOp(OpKernelConstruction* ctx); + + protected: + void MakeDataset(OpKernelContext* ctx, DatasetBase** output) override; + + private: + class Dataset; + const int op_version_; +}; + +} // namespace data +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_DATA_FIXED_LENGTH_RECORD_DATASET_OP_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/flat_map_dataset_op.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/flat_map_dataset_op.h new file mode 100644 index 0000000000000000000000000000000000000000..6b370757779fe3bb0d1aaf29634395c825bc8059 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/flat_map_dataset_op.h @@ -0,0 +1,51 @@ +/* Copyright 2019 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ +#ifndef TENSORFLOW_CORE_KERNELS_DATA_FLAT_MAP_DATASET_OP_H_ +#define TENSORFLOW_CORE_KERNELS_DATA_FLAT_MAP_DATASET_OP_H_ + +#include "tensorflow/core/data/captured_function.h" +#include "tensorflow/core/framework/dataset.h" + +namespace tensorflow { +namespace data { + +class FlatMapDatasetOp : public UnaryDatasetOpKernel { + public: + static constexpr const char* const kDatasetType = "FlatMap"; + static constexpr const char* const kInputDataset = "input_dataset"; + static constexpr const char* const kOtherArguments = "other_arguments"; + static constexpr const char* const kFunc = "f"; + static constexpr const char* const kTarguments = "Targuments"; + static constexpr const char* const kOutputTypes = "output_types"; + static constexpr const char* const kOutputShapes = "output_shapes"; + + explicit FlatMapDatasetOp(OpKernelConstruction* ctx); + + protected: + void MakeDataset(OpKernelContext* ctx, DatasetBase* input, + DatasetBase** output) override; + + private: + class Dataset; + const int graph_def_version_; + DataTypeVector output_types_; + std::vector output_shapes_; + std::shared_ptr func_metadata_ = nullptr; +}; + +} // namespace data +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_DATA_FLAT_MAP_DATASET_OP_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/generator_dataset_op.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/generator_dataset_op.h new file mode 100644 index 0000000000000000000000000000000000000000..b734e9a6d1ef9c938be19c0748c458f5ebd01353 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/generator_dataset_op.h @@ -0,0 +1,59 @@ +/* Copyright 2018 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_KERNELS_DATA_GENERATOR_DATASET_OP_H_ +#define TENSORFLOW_CORE_KERNELS_DATA_GENERATOR_DATASET_OP_H_ + +#include "tensorflow/core/data/captured_function.h" +#include "tensorflow/core/framework/dataset.h" + +namespace tensorflow { +namespace data { + +class GeneratorDatasetOp : public DatasetOpKernel { + public: + static constexpr const char* const kDatasetType = "Generator"; + static constexpr const char* const kInitFuncOtherArgs = + "init_func_other_args"; + static constexpr const char* const kNextFuncOtherArgs = + "next_func_other_args"; + static constexpr const char* const kFinalizeFuncOtherArgs = + "finalize_func_other_args"; + static constexpr const char* const kInitFunc = "init_func"; + static constexpr const char* const kNextFunc = "next_func"; + static constexpr const char* const kFinalizeFunc = "finalize_func"; + static constexpr const char* const kTinitFuncArgs = "Tinit_func_args"; + static constexpr const char* const kTnextFuncArgs = "Tnext_func_args"; + static constexpr const char* const kTfinalizeFuncArgs = "Tfinalize_func_args"; + static constexpr const char* const kOutputTypes = "output_types"; + static constexpr const char* const kOutputShapes = "output_shapes"; + + explicit GeneratorDatasetOp(OpKernelConstruction* ctx); + + void MakeDataset(OpKernelContext* ctx, DatasetBase** output) override; + + private: + class Dataset; + + DataTypeVector output_types_; + std::vector output_shapes_; + std::shared_ptr init_func_metadata_ = nullptr; + std::shared_ptr next_func_metadata_ = nullptr; + std::shared_ptr finalize_func_metadata_ = nullptr; +}; + +} // namespace data +} // namespace tensorflow +#endif // TENSORFLOW_CORE_KERNELS_DATA_GENERATOR_DATASET_OP_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/get_options_op.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/get_options_op.h new file mode 100644 index 0000000000000000000000000000000000000000..3e6611cbe7003419a611d70601d1a3ccbff10625 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/get_options_op.h @@ -0,0 +1,36 @@ +/* Copyright 2021 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ +#ifndef TENSORFLOW_CORE_KERNELS_DATA_GET_OPTIONS_OP_H_ +#define TENSORFLOW_CORE_KERNELS_DATA_GET_OPTIONS_OP_H_ + +#include "tensorflow/core/framework/op_kernel.h" + +namespace tensorflow { +namespace data { + +// TODO(jsimsa): Provide class-level documentation for this and the other ops. +class GetOptionsOp : public OpKernel { + public: + explicit GetOptionsOp(OpKernelConstruction* ctx) : OpKernel(ctx) {} + + void Compute(OpKernelContext* ctx) final; + + string TraceString(const OpKernelContext& ctx, bool verbose) const override; +}; + +} // namespace data +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_DATA_GET_OPTIONS_OP_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/interleave_dataset_op.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/interleave_dataset_op.h new file mode 100644 index 0000000000000000000000000000000000000000..a1300ddd4a221bc726df3230daf92b75ad20f347 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/interleave_dataset_op.h @@ -0,0 +1,53 @@ +/* Copyright 2019 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ +#ifndef TENSORFLOW_CORE_KERNELS_DATA_INTERLEAVE_DATASET_OP_H_ +#define TENSORFLOW_CORE_KERNELS_DATA_INTERLEAVE_DATASET_OP_H_ + +#include "tensorflow/core/data/captured_function.h" +#include "tensorflow/core/framework/dataset.h" + +namespace tensorflow { +namespace data { + +class InterleaveDatasetOp : public UnaryDatasetOpKernel { + public: + static constexpr const char* const kDatasetType = "Interleave"; + static constexpr const char* const kInputDataset = "input_dataset"; + static constexpr const char* const kOtherArguments = "other_arguments"; + static constexpr const char* const kCycleLength = "cycle_length"; + static constexpr const char* const kBlockLength = "block_length"; + static constexpr const char* const kFunc = "f"; + static constexpr const char* const kTarguments = "Targuments"; + static constexpr const char* const kOutputTypes = "output_types"; + static constexpr const char* const kOutputShapes = "output_shapes"; + + explicit InterleaveDatasetOp(OpKernelConstruction* ctx); + + protected: + void MakeDataset(OpKernelContext* ctx, DatasetBase* input, + DatasetBase** output) override; + + private: + class Dataset; + const int graph_def_version_; + DataTypeVector output_types_; + std::vector output_shapes_; + std::shared_ptr func_metadata_ = nullptr; +}; + +} // namespace data +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_DATA_INTERLEAVE_DATASET_OP_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/iterator_ops.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/iterator_ops.h new file mode 100644 index 0000000000000000000000000000000000000000..1b5d75622c88725cb4e6f825d93ff80d5af03c98 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/iterator_ops.h @@ -0,0 +1,337 @@ +/* Copyright 2018 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_KERNELS_DATA_ITERATOR_OPS_H_ +#define TENSORFLOW_CORE_KERNELS_DATA_ITERATOR_OPS_H_ + +#include +#include +#include + +#include "tensorflow/core/data/dataset_utils.h" +#include "tensorflow/core/data/metric_utils.h" +#include "tensorflow/core/data/tfdataz_metrics.h" +#include "tensorflow/core/data/unbounded_thread_pool.h" +#include "tensorflow/core/framework/dataset.h" +#include "tensorflow/core/framework/function_handle_cache.h" +#include "tensorflow/core/framework/op_kernel.h" +#include "tensorflow/core/framework/tensor_shape.h" +#include "tensorflow/core/framework/types.h" +#include "tensorflow/core/platform/refcount.h" + +namespace tensorflow { +namespace data { + +class IteratorResource : public ResourceBase { + public: + IteratorResource(Env* env, const DataTypeVector& output_dtypes, + const std::vector& output_shapes, + std::unique_ptr device_mgr, + std::unique_ptr flib_def, + std::unique_ptr pflr, + FunctionLibraryRuntime* flr); + + ~IteratorResource() override; + + // Gets the next output from the iterator managed by this iterator resource. + // + // If at least one output remains, that output will be stored in + // `*out_tensors` and `false` will be stored in `*end_of_sequence`. + // + // If no more outputs remain, `true` will be stored in `*end_of_sequence`, and + // the content of `*out_tensors` will be undefined. + Status GetNext(OpKernelContext* ctx, std::vector* out_tensors, + bool* end_of_sequence); + + // Saves a checkpoint of the state of the iterator through the given `writer`. + Status Save(OpKernelContext* ctx, ExternalStatePolicy external_state_policy, + IteratorStateWriter* writer); + + // Restores the state of the iterator from a checkpoint created by `Save`. + Status Restore(OpKernelContext* ctx, IteratorStateReader* reader); + + // Creates an iterator for `dataset`, and associates the iterator with this + // iterator resource. + // + // `SetIteratorFromDataset` should be called before calling `GetNext`, `Save`, + // or `Restore`. + Status SetIteratorFromDataset(OpKernelContext* ctx, + const DatasetBase* dataset); + + string DebugString() const override { return "Iterator resource"; } + + const DataTypeVector& output_dtypes() const { return output_dtypes_; } + + const std::vector& output_shapes() const { + return output_shapes_; + } + + private: + class State { + public: + State(std::shared_ptr flib_def, + std::shared_ptr pflr, + FunctionLibraryRuntime* flr, + std::unique_ptr iterator) + : flib_def_(std::move(flib_def)), + flr_(flr), + pflr_(std::move(pflr)), + function_handle_cache_(std::make_unique(flr)), + iterator_(std::move(iterator)), + + id_registry_(std::make_shared()), + checkpoint_(MemoryCheckpoint::CreateRootCheckpoint(id_registry_)) {} + + ~State() { cancellation_manager_.StartCancel(); } + + std::shared_ptr flib_def() { return flib_def_; } + + FunctionLibraryRuntime* flr() { return flr_; } + + std::shared_ptr pflr() { return pflr_; } + + FunctionHandleCache* function_handle_cache() { + return function_handle_cache_.get(); + } + + ResourceMgr* resource_mgr() { return &resource_mgr_; } + + CancellationManager* cancellation_manager() { + return &cancellation_manager_; + } + + DatasetBaseIterator* iterator() { return iterator_.get(); } + + const MemoryCheckpoint& checkpoint() const { return checkpoint_; } + + DatasetBase* dataset() { return dataset_.get(); } + + // Downcasts the given `IteratorBase` to a `DatasetBaseIterator`, and uses + // it to set the `iterator` and the `dataset` field. + void DowncastAndSetIteratorAndDataset(std::unique_ptr it, + const DatasetBase* dataset); + + // Merges the given checkpoint with the checkpoint of this state. + void MergeCheckpoint(MemoryCheckpoint* other); + + std::shared_ptr id_registry() { + return id_registry_; + } + + private: + std::shared_ptr flib_def_; + FunctionLibraryRuntime* flr_ = nullptr; // not owned + std::shared_ptr pflr_; + std::unique_ptr function_handle_cache_; + ResourceMgr resource_mgr_; + CancellationManager cancellation_manager_; + std::unique_ptr iterator_; + core::RefCountPtr dataset_; + std::shared_ptr id_registry_; + MemoryCheckpoint checkpoint_; + }; + + IteratorMetricsCollector metrics_collector_; + std::shared_ptr tf_dataz_metrics_collector_; + UnboundedThreadPool unbounded_thread_pool_; + + mutex mu_; + const Env& env_; + const std::unique_ptr device_mgr_ TF_GUARDED_BY(mu_); + std::shared_ptr iterator_state_ TF_GUARDED_BY(mu_); + const DataTypeVector output_dtypes_; + const std::vector output_shapes_; +}; + +class IteratorHandleOp : public OpKernel { + public: + explicit IteratorHandleOp(OpKernelConstruction* ctx); + + // The resource is deleted from the resource manager only when it is private + // to kernel. Ideally the resource should be deleted when it is no longer held + // by anyone, but it would break backward compatibility. + ~IteratorHandleOp() override; + + void Compute(OpKernelContext* context) override TF_LOCKS_EXCLUDED(mu_); + + private: + // During the first Compute(), resource is either created or looked up using + // shared_name. In the latter case, the resource found should be verified if + // it is compatible with this op's configuration. The verification may fail in + // cases such as two graphs asking queues of the same shared name to have + // inconsistent capacities. + Status VerifyResource(IteratorResource* resource); + + FunctionLibraryRuntime* CreatePrivateFLR( + OpKernelContext* ctx, std::unique_ptr* device_mgr, + std::unique_ptr* flib_def, + std::unique_ptr* pflr); + + mutex mu_; + ContainerInfo cinfo_; // Written once under mu_ then constant afterwards. + IteratorResource* resource_ TF_GUARDED_BY(mu_) = nullptr; + DataTypeVector output_dtypes_; + std::vector output_shapes_; + const int graph_def_version_; + string name_; +}; + +// Like IteratorHandleOp, but creates handles which are never shared, and does +// not hold a reference to these handles. The latter is important for eager +// execution, since OpKernel instances generally live as long as the program +// running them. +class AnonymousIteratorHandleOp : public AnonymousResourceOp { + public: + explicit AnonymousIteratorHandleOp(OpKernelConstruction* context); + + private: + string name() override; + + Status CreateResource(OpKernelContext* ctx, + std::unique_ptr flib_def, + std::unique_ptr pflr, + FunctionLibraryRuntime* lib, + IteratorResource** resource) override; + + DataTypeVector output_dtypes_; + std::vector output_shapes_; + const int graph_def_version_; +}; + +// A hybrid asynchronous-and-synchronous OpKernel with efficient support for +// both modes. +// +// Inherit from this class when the application logic of the kernel (i) is +// implemented synchronously, (ii) must run on a background thread when the +// kernel executes in the inter-op threadpool (typically because it depends on +// inter-op threadpool threads, e.g. for function execution), and (iii) can run +// synchronously on the calling thread when the caller donates a thread +// (typically in eager execution). The implementation avoids a thread-hop in +// case (iii). +// +// NOTE: Unlike typical OpKernel subclasses, the application logic is +// implemented in a method (DoCompute()) that returns Status. Use +// TF_RETURN_IF_ERROR for error-related control flow rather than +// OP_REQUIRES_OK(). +class HybridAsyncOpKernel : public AsyncOpKernel { + public: + HybridAsyncOpKernel(OpKernelConstruction* ctx, + const char* background_worker_name); + + void Compute(OpKernelContext* ctx) final; + void ComputeAsync(OpKernelContext* ctx, DoneCallback done) final; + + protected: + virtual Status DoCompute(OpKernelContext* ctx) = 0; + + private: + BackgroundWorker background_worker_; +}; + +class MakeIteratorOp : public HybridAsyncOpKernel { + public: + explicit MakeIteratorOp(OpKernelConstruction* ctx) + : HybridAsyncOpKernel(ctx, "tf_data_make_iterator") {} + + protected: + Status DoCompute(OpKernelContext* ctx) override; +}; + +class IteratorGetNextOp : public HybridAsyncOpKernel { + public: + explicit IteratorGetNextOp(OpKernelConstruction* ctx) + : HybridAsyncOpKernel(ctx, "tf_data_iterator_get_next") { + OP_REQUIRES_OK(ctx, ctx->GetAttr("output_types", &output_types_)); + OP_REQUIRES_OK(ctx, ctx->GetAttr("output_shapes", &output_shapes_)); + } + + AsyncOpKernel* AsAsync() override; + + protected: + Status DoCompute(OpKernelContext* ctx) override; + + private: + DataTypeVector output_types_; + std::vector output_shapes_; +}; + +class DeleteIteratorOp : public HybridAsyncOpKernel { + public: + explicit DeleteIteratorOp(OpKernelConstruction* ctx) + : HybridAsyncOpKernel(ctx, "tf_data_delete_iterator") {} + + protected: + Status DoCompute(OpKernelContext* ctx) override; +}; + +class IteratorGetNextAsOptionalOp : public HybridAsyncOpKernel { + public: + explicit IteratorGetNextAsOptionalOp(OpKernelConstruction* ctx) + : HybridAsyncOpKernel(ctx, "tf_data_iterator_get_next_as_optional") { + OP_REQUIRES_OK(ctx, ctx->GetAttr("output_types", &output_types_)); + OP_REQUIRES_OK(ctx, ctx->GetAttr("output_shapes", &output_shapes_)); + } + + protected: + Status DoCompute(OpKernelContext* ctx) override; + + private: + DataTypeVector output_types_; + std::vector output_shapes_; +}; + +class IteratorToStringHandleOp : public OpKernel { + public: + explicit IteratorToStringHandleOp(OpKernelConstruction* ctx) + : OpKernel(ctx) {} + + void Compute(OpKernelContext* ctx) override; +}; + +class IteratorFromStringHandleOp : public OpKernel { + public: + explicit IteratorFromStringHandleOp(OpKernelConstruction* ctx); + + void Compute(OpKernelContext* ctx) override; + + private: + DataTypeVector output_dtypes_; + std::vector output_shapes_; +}; + +class SerializeIteratorOp : public OpKernel { + public: + static constexpr const char* const kExternalStatePolicy = + "external_state_policy"; + + explicit SerializeIteratorOp(OpKernelConstruction* ctx); + + void Compute(OpKernelContext* ctx) override; + + private: + ExternalStatePolicy external_state_policy_ = ExternalStatePolicy::POLICY_WARN; +}; + +class DeserializeIteratorOp : public OpKernel { + public: + explicit DeserializeIteratorOp(OpKernelConstruction* ctx) : OpKernel(ctx) {} + + void Compute(OpKernelContext* ctx) override; +}; + +} // namespace data +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_DATA_ITERATOR_OPS_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/map_dataset_op.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/map_dataset_op.h new file mode 100644 index 0000000000000000000000000000000000000000..8a15d62f466dfce195b11b577bc2a6ef49c21751 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/map_dataset_op.h @@ -0,0 +1,55 @@ +/* Copyright 2019 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ +#ifndef TENSORFLOW_CORE_KERNELS_DATA_MAP_DATASET_OP_H_ +#define TENSORFLOW_CORE_KERNELS_DATA_MAP_DATASET_OP_H_ + +#include "tensorflow/core/data/captured_function.h" +#include "tensorflow/core/framework/dataset.h" + +namespace tensorflow { +namespace data { + +class MapDatasetOp : public UnaryDatasetOpKernel { + public: + static constexpr const char* const kDatasetType = "Map"; + static constexpr const char* const kInputDataset = "input_dataset"; + static constexpr const char* const kOtherArguments = "other_arguments"; + static constexpr const char* const kFunc = "f"; + static constexpr const char* const kTarguments = "Targuments"; + static constexpr const char* const kOutputTypes = "output_types"; + static constexpr const char* const kOutputShapes = "output_shapes"; + static constexpr const char* const kUseInterOpParallelism = + "use_inter_op_parallelism"; + static constexpr const char* const kPreserveCardinality = + "preserve_cardinality"; + + explicit MapDatasetOp(OpKernelConstruction* ctx); + + protected: + void MakeDataset(OpKernelContext* ctx, DatasetBase* input, + DatasetBase** output) override; + + private: + class Dataset; + std::shared_ptr func_metadata_ = nullptr; + DataTypeVector output_types_; + std::vector output_shapes_; + bool preserve_cardinality_; +}; + +} // namespace data +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_DATA_MAP_DATASET_OP_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/map_defun_op.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/map_defun_op.h new file mode 100644 index 0000000000000000000000000000000000000000..cf2ed99c6ba1dd39683be1bae5bd74d7bb17701a --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/map_defun_op.h @@ -0,0 +1,76 @@ +/* Copyright 2019 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ +#ifndef TENSORFLOW_CORE_KERNELS_DATA_MAP_DEFUN_OP_H_ +#define TENSORFLOW_CORE_KERNELS_DATA_MAP_DEFUN_OP_H_ + +#include "tensorflow/core/framework/dataset.h" + +namespace tensorflow { +namespace data { + +// This op runs a given defun on slices of the input arguments. The function +// given by "f" is assumed to be stateless, and is executed concurrently +// on all the slices; up to batch_size (i.e. the 0th dimension of each argument) +// functions will be scheduled at once. +// +// The "max_intra_op_parallelism" attr, which defaults to 1, can be used to +// limit the intra op parallelism. To limit inter-op parallelism, a user +// can set a private threadpool on the dataset using `tf.data.Options`'s +// `ThreadingOptions`. +// +// Note that this op is not exposed to users directly, but is invoked in +// tf.data rewrites. +class MapDefunOp : public AsyncOpKernel { + public: + static constexpr const char* const kArguments = "arguments"; + static constexpr const char* const kCapturedInputs = "captured_inputs"; + static constexpr const char* const kTarguments = "Targuments"; + static constexpr const char* const kTcaptured = "Tcaptured"; + static constexpr const char* const kOutputTypes = "output_types"; + static constexpr const char* const kOutputShapes = "output_shapes"; + static constexpr const char* const kFunc = "f"; + static constexpr const char* const kMaxIntraOpParallelism = + "max_intra_op_parallelism"; + + explicit MapDefunOp(OpKernelConstruction* ctx); + + ~MapDefunOp() override = default; + + void ComputeAsync(OpKernelContext* ctx, DoneCallback done) override; + + private: + struct ComputeOptions; + class MapFunctionCallFrame; + + void SetRunOptions(OpKernelContext* ctx, + FunctionLibraryRuntime::Options* opts, + ComputeOptions* compute_opts, bool always_collect_stats); + + // Get inputs to Compute and check that they are valid. + Status SetupArgs(OpKernelContext* ctx, ComputeOptions** compute_opts); + + Status SetupOutputs(OpKernelContext* ctx, ComputeOptions* opts); + + FunctionLibraryRuntime::Handle func_handle_; + std::vector output_shapes_; + // If this value is positive, limit the max intra op parallelism when the + // function is run on slices of the input. + int max_intra_op_parallelism_; +}; + +} // namespace data +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_DATA_MAP_DEFUN_OP_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/model_dataset_op.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/model_dataset_op.h new file mode 100644 index 0000000000000000000000000000000000000000..a61984145d3df366a819f4f6601703c9a7e404d2 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/model_dataset_op.h @@ -0,0 +1,87 @@ +/* Copyright 2020 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ +#ifndef TENSORFLOW_CORE_KERNELS_DATA_MODEL_DATASET_OP_H_ +#define TENSORFLOW_CORE_KERNELS_DATA_MODEL_DATASET_OP_H_ + +#include "tensorflow/core/platform/platform.h" + +// On mobile we do not provide model dataset op because not all of its +// dependencies are available there. The op is replaced with a no-op. +#if !defined(IS_MOBILE_PLATFORM) +#include "tensorflow/core/framework/dataset.h" +#include "tensorflow/core/framework/model.h" + +namespace tensorflow { +namespace data { + +class ModelDatasetOp : public UnaryDatasetOpKernel { + public: + static constexpr const char* const kDatasetType = "ModelDataset"; + static constexpr const char* const kDatasetOp = "ModelDatasetOp"; + static constexpr const char* const kAlgorithm = "algorithm"; + static constexpr const char* const kCpuBudget = "cpu_budget"; + static constexpr const char* const kRamBudget = "ram_budget"; + + // Executes the logic of the ModelDatasetOp directly (as opposed to through + // executing the ModelDatasetOp op kernel). + static void MakeDatasetFromOptions(OpKernelContext* ctx, DatasetBase* input, + model::AutotuneAlgorithm algorithm, + int64_t cpu_budget, int64_t ram_budget, + DatasetBase** output); + + explicit ModelDatasetOp(OpKernelConstruction* ctx); + + protected: + void MakeDataset(OpKernelContext* ctx, DatasetBase* input, + DatasetBase** output) override; + + private: + class Dataset; + + model::AutotuneAlgorithm algorithm_; + int64_t cpu_budget_; + int64_t ram_budget_; +}; + +} // namespace data +} // namespace tensorflow +#else // !IS_MOBILE_PLATFORM +#include "tensorflow/core/framework/dataset.h" + +namespace tensorflow { +namespace data { + +class ModelDatasetOp : public UnaryDatasetOpKernel { + public: + // Creates and returns a ModelDatasetOp::Dataset in output, given the + // input, algorithm, cpu_budget and ram_budget parameters. This method is used + // to create the dataset without explicitly using the ModelDatasetOp. + static void MakeDatasetFromOptions(OpKernelContext* ctx, DatasetBase* input, + model::AutotuneAlgorithm algorithm, + bool cpu_budget, bool ram_budget, + DatasetBase** output); + + explicit ModelDatasetOp(OpKernelConstruction* ctx); + + protected: + void MakeDataset(OpKernelContext* ctx, DatasetBase* input, + DatasetBase** output) override; +}; + +} // namespace data +} // namespace tensorflow +#endif // !IS_MOBILE_PLATFORM + +#endif // TENSORFLOW_CORE_KERNELS_DATA_MODEL_DATASET_OP_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/optimize_dataset_op.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/optimize_dataset_op.h new file mode 100644 index 0000000000000000000000000000000000000000..1824fc5aed5599fcfb2c21de1ddd743ff49a0751 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/optimize_dataset_op.h @@ -0,0 +1,97 @@ +/* Copyright 2019 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ +#ifndef TENSORFLOW_CORE_KERNELS_DATA_OPTIMIZE_DATASET_OP_H_ +#define TENSORFLOW_CORE_KERNELS_DATA_OPTIMIZE_DATASET_OP_H_ + +#include "absl/container/flat_hash_set.h" +#include "tensorflow/core/framework/dataset.h" +#include "tensorflow/core/platform/platform.h" + +// On mobile we do not provide optimize dataset op because not all of its +// dependencies are available there. The op is replaced with a no-op. +#if !defined(IS_MOBILE_PLATFORM) +namespace tensorflow { +namespace data { + +class OptimizeDatasetOp : public UnaryDatasetOpKernel { + public: + static constexpr const char* const kDatasetType = "Optimize"; + static constexpr const char* const kInputDataset = "input_dataset"; + static constexpr const char* const kOptimizations = "optimizations"; + static constexpr const char* const kOptimizationsEnabled = + "optimizations_enabled"; + static constexpr const char* const kOptimizationsDisabled = + "optimizations_disabled"; + static constexpr const char* const kOptimizationsDefault = + "optimizations_default"; + static constexpr const char* const kOutputTypes = "output_types"; + static constexpr const char* const kOutputShapes = "output_shapes"; + static constexpr const char* const kOptimizationConfigs = + "optimization_configs"; + static constexpr const char* const kOptimizeDatasetV1 = "OptimizeDataset"; + static constexpr const char* const kOptimizeDatasetV2 = "OptimizeDatasetV2"; + + // Creates and returns a OptimizeDatasetOp::Dataset in output, given the + // default optimizations and those that are enabled, disabled. This method is + // used to create the dataset without explicitly using the OptimizeDatasetOp. + static void MakeDatasetFromOptions( + OpKernelContext* ctx, DatasetBase* input, + const absl::flat_hash_set& optimizations_enabled, + const absl::flat_hash_set& optimizations_disabled, + const absl::flat_hash_set& optimizations_default, + const absl::flat_hash_set& optimization_configs, + DatasetBase** output); + + explicit OptimizeDatasetOp(OpKernelConstruction* ctx); + + protected: + void MakeDataset(OpKernelContext* ctx, DatasetBase* input, + DatasetBase** output) override; + + private: + absl::flat_hash_set optimization_configs_; + int op_version_ = 0; +}; + +} // namespace data +} // namespace tensorflow +#else // !IS_MOBILE_PLATFORM +namespace tensorflow { +namespace data { + +class OptimizeDatasetOp : public UnaryDatasetOpKernel { + public: + // Executes the logic of the OptimizeDatasetOp directly (as opposed to through + // executing the OptimizeDatasetOp op kernel). + static void MakeDatasetFromOptions( + OpKernelContext* ctx, DatasetBase* input, + const absl::flat_hash_set& optimizations_enabled, + const absl::flat_hash_set& optimizations_disabled, + const absl::flat_hash_set& optimizations_default, + const absl::flat_hash_set& optimization_configs, + DatasetBase** output); + + explicit OptimizeDatasetOp(OpKernelConstruction* ctx); + + protected: + void MakeDataset(OpKernelContext* ctx, DatasetBase* input, + DatasetBase** output) override; +}; + +} // namespace data +} // namespace tensorflow +#endif // !IS_MOBILE_PLATFORM + +#endif // TENSORFLOW_CORE_KERNELS_DATA_OPTIMIZE_DATASET_OP_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/optional_ops.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/optional_ops.h new file mode 100644 index 0000000000000000000000000000000000000000..4e69243dbb111d3ccc877772463ad271c587a2f2 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/optional_ops.h @@ -0,0 +1,93 @@ +/* Copyright 2018 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ +#ifndef TENSORFLOW_CORE_KERNELS_DATA_OPTIONAL_OPS_H_ +#define TENSORFLOW_CORE_KERNELS_DATA_OPTIONAL_OPS_H_ + +#include + +#include "tensorflow/core/framework/tensor.h" +#include "tensorflow/core/framework/variant_tensor_data.h" +#include "tensorflow/core/kernels/data/optional_ops_util.h" +#include "tensorflow/core/util/tensor_ops_util.h" + +namespace tensorflow { +namespace data { + +// Stores a DT_VARIANT value representing an Optional with the given value +// in the `output_index`^th output of the given kernel execution context. +Status WriteOptionalWithValueToOutput(OpKernelContext* ctx, int output_index, + std::vector value); + +// Stores a DT_VARIANT value representing an Optional with no value +// in the `output_index`^th output of the given kernel execution context. +Status WriteOptionalNoneToOutput(OpKernelContext* ctx, int output_index); + +template +Status OptionalZerosLike(OpKernelContext* ctx, const OptionalVariant& x, + OptionalVariant* y) { + return OptionalZerosLike(ctx, x, y, ZerosLikeTensor); +} + +template +Status OptionalBinaryAdd(OpKernelContext* ctx, const OptionalVariant& a, + const OptionalVariant& b, OptionalVariant* out) { + return OptionalBinaryAdd(ctx, a, b, out, BinaryAddTensors); +} + +class OptionalNoneOp : public OpKernel { + public: + explicit OptionalNoneOp(OpKernelConstruction* ctx) : OpKernel(ctx) {} + + void Compute(OpKernelContext* ctx) override; +}; + +class OptionalFromValueOp : public OpKernel { + public: + explicit OptionalFromValueOp(OpKernelConstruction* ctx) : OpKernel(ctx) {} + + void Compute(OpKernelContext* ctx) override; +}; + +class OptionalHasValueOp : public OpKernel { + public: + explicit OptionalHasValueOp(OpKernelConstruction* ctx) : OpKernel(ctx) {} + + void Compute(OpKernelContext* ctx) override; +}; + +class OptionalGetValueOp : public OpKernel { + public: + explicit OptionalGetValueOp(OpKernelConstruction* ctx) : OpKernel(ctx) { + OP_REQUIRES_OK(ctx, ctx->GetAttr("output_shapes", &output_shapes_)); + OP_REQUIRES_OK(ctx, ctx->GetAttr("output_types", &output_types_)); + OP_REQUIRES( + ctx, output_shapes_.size() == output_types_.size(), + errors::InvalidArgument( + "output_types and output_shapes must be same length, got:\n", + "output_types: ", output_types_.size(), "\n", + "output_shapes: ", output_shapes_.size())); + } + + void Compute(OpKernelContext* ctx) override; + + private: + DataTypeVector output_types_; + std::vector output_shapes_; +}; + +} // namespace data +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_DATA_OPTIONAL_OPS_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/optional_ops_util.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/optional_ops_util.h new file mode 100644 index 0000000000000000000000000000000000000000..5e3ce9141b6d034f09c24a0b31821f8fb9d0afc6 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/optional_ops_util.h @@ -0,0 +1,117 @@ +/* Copyright 2022 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ +#ifndef TENSORFLOW_CORE_KERNELS_DATA_OPTIONAL_OPS_UTIL_H_ +#define TENSORFLOW_CORE_KERNELS_DATA_OPTIONAL_OPS_UTIL_H_ + +#include +#include +#include +#include + +#include "tensorflow/core/framework/tensor.h" +#include "tensorflow/core/framework/variant_tensor_data.h" +#include "tensorflow/core/util/tensor_ops_util.h" + +namespace tensorflow { +namespace data { + +const char kOptionalVariantTypeName[] = "tensorflow::data::Optional"; + +// An `OptionalVariant` can represent either an "actual value" (a tuple of +// tensors) or "none", and may be stored in a DT_VARIANT tensor. +class OptionalVariant { + public: + // Create an `OptionalVariant` with no actual value. + OptionalVariant() : values_(nullptr) {} + + // Create an `OptionalVariant` with the actual value given by the tuple of + // tensors in `values`. + explicit OptionalVariant(std::vector values) { + values_ = std::make_shared>(std::move(values)); + } + + OptionalVariant(const OptionalVariant& other) : values_(other.values_) {} + + // Returns true if `this` represents an actual value. + bool has_value() const { return values_ != nullptr; } + + // REQUIRES: `this->has_value()` must be true. + const std::vector& get_values() const { + DCHECK(values_) << "Tried to get values from an empty OptionalVariant"; + return *values_; + } + + // Implementations of the necessary methods for using `OptionalVariant` + // objects in DT_VARIANT tensors. + string TypeName() const { return kOptionalVariantTypeName; } + void Encode(VariantTensorData* data) const { + data->set_metadata(values_ != nullptr); + if (values_ != nullptr) { + for (const auto& t : *values_) { + *(data->add_tensors()) = t; + } + } + } + + bool Decode(const VariantTensorData& data) { + if (data.type_name() != TypeName()) { + return false; + } + bool has_value = false; + if (!data.get_metadata(&has_value)) { + return false; + } + if (has_value) { + values_ = std::make_shared>(data.tensors()); + } else { + values_.reset(); + } + return true; + } + + string DebugString() const { + if (values_) { + return strings::StrCat("OptionalVariant<", "values: (", + absl::StrJoin(*values_, ", ", + [](string* s, const Tensor& elem) { + *s = elem.DebugString(); + }), + ")>"); + } else { + return strings::StrCat("OptionalVariant"); + } + } + + private: + std::shared_ptr> values_; +}; + +Status OptionalZerosLike(OpKernelContext* ctx, const OptionalVariant& x, + OptionalVariant* y, + std::function + zeros_like_func); + +Status OptionalBinaryAdd( + OpKernelContext* ctx, const OptionalVariant& a, const OptionalVariant& b, + OptionalVariant* out, + std::function + binary_add_func); + +} // namespace data +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_DATA_OPTIONAL_OPS_UTIL_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/options_dataset_op.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/options_dataset_op.h new file mode 100644 index 0000000000000000000000000000000000000000..024ae757b2343bdf444f0777d17f4b9f43df2daa --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/options_dataset_op.h @@ -0,0 +1,44 @@ +/* Copyright 2021 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ +#ifndef TENSORFLOW_CORE_KERNELS_DATA_OPTIONS_DATASET_OP_H_ +#define TENSORFLOW_CORE_KERNELS_DATA_OPTIONS_DATASET_OP_H_ + +#include "tensorflow/core/framework/dataset.h" + +namespace tensorflow { +namespace data { + +// TODO(jsimsa): Provide class-level documentation for this and the other ops. +class OptionsDatasetOp : public DatasetOpKernel { + public: + static constexpr const char* const kDatasetType = "Options"; + static constexpr const char* const kInputDataset = "input_dataset"; + static constexpr const char* const kOutputTypes = "output_types"; + static constexpr const char* const kOutputShapes = "output_shapes"; + static constexpr const char* const kSerializedOptions = "serialized_options"; + + explicit OptionsDatasetOp(OpKernelConstruction* ctx); + + void MakeDataset(OpKernelContext* ctx, DatasetBase** output) override; + + private: + class Dataset; + tstring serialized_options_; +}; + +} // namespace data +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_DATA_OPTIONS_DATASET_OP_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/padded_batch_dataset_op.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/padded_batch_dataset_op.h new file mode 100644 index 0000000000000000000000000000000000000000..474587db546fda8d80dfb46572f4080d9e08e567 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/padded_batch_dataset_op.h @@ -0,0 +1,51 @@ +/* Copyright 2019 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ +#ifndef TENSORFLOW_CORE_KERNELS_DATA_PADDED_BATCH_DATASET_OP_H_ +#define TENSORFLOW_CORE_KERNELS_DATA_PADDED_BATCH_DATASET_OP_H_ + +#include "tensorflow/core/framework/dataset.h" + +namespace tensorflow { +namespace data { + +class PaddedBatchDatasetOp : public UnaryDatasetOpKernel { + public: + static constexpr const char* const kDatasetType = "PaddedBatch"; + static constexpr const char* const kInputDataset = "input_dataset"; + static constexpr const char* const kBatchSize = "batch_size"; + static constexpr const char* const kPaddedShapes = "padded_shapes"; + static constexpr const char* const kPaddingValues = "padding_values"; + static constexpr const char* const kDropRemainder = "drop_remainder"; + static constexpr const char* const kParallelCopy = "parallel_copy"; + static constexpr const char* const kToutputTypes = "Toutput_types"; + static constexpr const char* const kOutputShapes = "output_shapes"; + static constexpr const char* const kNumPaddedShapes = "N"; + + explicit PaddedBatchDatasetOp(OpKernelConstruction* ctx); + + protected: + void MakeDataset(OpKernelContext* ctx, DatasetBase* input, + DatasetBase** output) override; + + private: + class Dataset; + const int op_version_; + bool parallel_copy_ = false; +}; + +} // namespace data +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_DATA_PADDED_BATCH_DATASET_OP_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/parallel_batch_dataset_op.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/parallel_batch_dataset_op.h new file mode 100644 index 0000000000000000000000000000000000000000..219dc73ce282b886686d03835b9b6c27090d1e19 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/parallel_batch_dataset_op.h @@ -0,0 +1,51 @@ +/* Copyright 2021 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ +#ifndef TENSORFLOW_CORE_KERNELS_DATA_PARALLEL_BATCH_DATASET_OP_H_ +#define TENSORFLOW_CORE_KERNELS_DATA_PARALLEL_BATCH_DATASET_OP_H_ + +#include "tensorflow/core/data/dataset_utils.h" +#include "tensorflow/core/framework/dataset.h" + +namespace tensorflow { +namespace data { + +class ParallelBatchDatasetOp : public UnaryDatasetOpKernel { + public: + static constexpr const char* const kDatasetType = "ParallelBatch"; + static constexpr const char* const kInputDataset = "input_dataset"; + static constexpr const char* const kBatchSize = "batch_size"; + static constexpr const char* const kNumParallelCalls = "num_parallel_calls"; + static constexpr const char* const kDropRemainder = "drop_remainder"; + static constexpr const char* const kParallelCopy = "parallel_copy"; + static constexpr const char* const kOutputTypes = "output_types"; + static constexpr const char* const kOutputShapes = "output_shapes"; + static constexpr const char* const kDeterministic = "deterministic"; + + explicit ParallelBatchDatasetOp(OpKernelConstruction* ctx); + + protected: + void MakeDataset(OpKernelContext* ctx, DatasetBase* input, + DatasetBase** output) override; + + private: + class Dataset; + DeterminismPolicy deterministic_; + bool parallel_copy_ = false; +}; + +} // namespace data +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_DATA_PARALLEL_BATCH_DATASET_OP_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/parallel_filter_dataset_op.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/parallel_filter_dataset_op.h new file mode 100644 index 0000000000000000000000000000000000000000..48b1bda1ab75df1afbd15e26529388e5df462178 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/parallel_filter_dataset_op.h @@ -0,0 +1,52 @@ +/* Copyright 2022 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ +#ifndef TENSORFLOW_CORE_KERNELS_DATA_PARALLEL_FILTER_DATASET_OP_H_ +#define TENSORFLOW_CORE_KERNELS_DATA_PARALLEL_FILTER_DATASET_OP_H_ + +#include "tensorflow/core/data/captured_function.h" +#include "tensorflow/core/data/dataset_utils.h" +#include "tensorflow/core/framework/dataset.h" + +namespace tensorflow { +namespace data { + +class ParallelFilterDatasetOp : public UnaryDatasetOpKernel { + public: + static constexpr const char* const kDatasetType = "ParallelFilter"; + static constexpr const char* const kInputDataset = "input_dataset"; + static constexpr const char* const kOtherArguments = "other_arguments"; + static constexpr const char* const kNumParallelCalls = "num_parallel_calls"; + static constexpr const char* const kPredicate = "predicate"; + static constexpr const char* const kDeterministic = "deterministic"; + static constexpr const char* const kTarguments = "Targuments"; + static constexpr const char* const kOutputTypes = "output_types"; + static constexpr const char* const kOutputShapes = "output_shapes"; + + explicit ParallelFilterDatasetOp(OpKernelConstruction* ctx); + + protected: + void MakeDataset(OpKernelContext* ctx, DatasetBase* input, + DatasetBase** output) override; + + private: + class Dataset; + DeterminismPolicy deterministic_; + std::shared_ptr func_metadata_ = nullptr; +}; + +} // namespace data +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_DATA_PARALLEL_FILTER_DATASET_OP_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/parallel_interleave_dataset_op.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/parallel_interleave_dataset_op.h new file mode 100644 index 0000000000000000000000000000000000000000..be46a360715bcd601f7903b3c6a43f37069eba9b --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/parallel_interleave_dataset_op.h @@ -0,0 +1,62 @@ +/* Copyright 2019 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ +#ifndef TENSORFLOW_CORE_KERNELS_DATA_PARALLEL_INTERLEAVE_DATASET_OP_H_ +#define TENSORFLOW_CORE_KERNELS_DATA_PARALLEL_INTERLEAVE_DATASET_OP_H_ + +#include "tensorflow/core/data/captured_function.h" +#include "tensorflow/core/data/dataset_utils.h" +#include "tensorflow/core/framework/dataset.h" + +namespace tensorflow { +namespace data { + +class ParallelInterleaveDatasetOp : public UnaryDatasetOpKernel { + public: + static constexpr const char* const kDatasetType = "ParallelInterleave"; + static constexpr const char* const kInputDataset = "input_dataset"; + static constexpr const char* const kOtherArguments = "other_arguments"; + static constexpr const char* const kCycleLength = "cycle_length"; + static constexpr const char* const kBlockLength = "block_length"; + static constexpr const char* const kBufferOutputElements = + "buffer_output_elements"; + static constexpr const char* const kPrefetchInputElements = + "prefetch_input_elements"; + static constexpr const char* const kNumParallelCalls = "num_parallel_calls"; + static constexpr const char* const kFunc = "f"; + static constexpr const char* const kTarguments = "Targuments"; + static constexpr const char* const kOutputTypes = "output_types"; + static constexpr const char* const kOutputShapes = "output_shapes"; + static constexpr const char* const kDeterministic = "deterministic"; + static constexpr const char* const kSloppy = "sloppy"; + + explicit ParallelInterleaveDatasetOp(OpKernelConstruction* ctx); + + protected: + void MakeDataset(OpKernelContext* ctx, DatasetBase* input, + DatasetBase** output) override; + + private: + class Dataset; + const int op_version_; + std::shared_ptr func_metadata_ = nullptr; + DataTypeVector output_types_; + std::vector output_shapes_; + DeterminismPolicy deterministic_; +}; + +} // namespace data +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_DATA_PARALLEL_INTERLEAVE_DATASET_OP_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/parallel_map_dataset_op.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/parallel_map_dataset_op.h new file mode 100644 index 0000000000000000000000000000000000000000..4e1e564346f874ebcab2bced5219c6f769c8fc47 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/parallel_map_dataset_op.h @@ -0,0 +1,73 @@ +/* Copyright 2019 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ +#ifndef TENSORFLOW_CORE_KERNELS_DATA_PARALLEL_MAP_DATASET_OP_H_ +#define TENSORFLOW_CORE_KERNELS_DATA_PARALLEL_MAP_DATASET_OP_H_ + +#include "tensorflow/core/data/captured_function.h" +#include "tensorflow/core/data/dataset_utils.h" +#include "tensorflow/core/framework/dataset.h" + +namespace tensorflow { +namespace data { + +class ParallelMapDatasetOp : public UnaryDatasetOpKernel { + public: + static constexpr const char* const kDatasetType = "ParallelMap"; + static constexpr const char* const kInputDataset = "input_dataset"; + static constexpr const char* const kOtherArguments = "other_arguments"; + static constexpr const char* const kNumParallelCalls = "num_parallel_calls"; + static constexpr const char* const kFunc = "f"; + static constexpr const char* const kTarguments = "Targuments"; + static constexpr const char* const kOutputTypes = "output_types"; + static constexpr const char* const kOutputShapes = "output_shapes"; + static constexpr const char* const kUseInterOpParallelism = + "use_inter_op_parallelism"; + static constexpr const char* const kDeterministic = "deterministic"; + static constexpr const char* const kSloppy = "sloppy"; + static constexpr const char* const kPreserveCardinality = + "preserve_cardinality"; + + explicit ParallelMapDatasetOp(OpKernelConstruction* ctx); + + protected: + void MakeDataset(OpKernelContext* ctx, DatasetBase* input, + DatasetBase** output) override; + + private: + class Dataset; + const int op_version_; + std::shared_ptr func_metadata_ = nullptr; + DataTypeVector output_types_; + std::vector output_shapes_; + bool sloppy_; + bool preserve_cardinality_; + DeterminismPolicy deterministic_; + + friend std::unique_ptr MakeDataServiceUncompressDataset( + DatasetBase* input, std::unique_ptr captured_function, + const DataTypeVector& output_types, + const std::vector& output_shapes); +}; + +// Used by tf.data service to create a map dataset for uncompression. +std::unique_ptr MakeDataServiceUncompressDataset( + DatasetBase* input, std::unique_ptr captured_function, + const DataTypeVector& output_types, + const std::vector& output_shapes); + +} // namespace data +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_DATA_PARALLEL_MAP_DATASET_OP_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/prefetch_autotuner.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/prefetch_autotuner.h new file mode 100644 index 0000000000000000000000000000000000000000..d7106b698a876c72a0cc3798f8840837bdfb29d8 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/prefetch_autotuner.h @@ -0,0 +1,86 @@ +/* Copyright 2017 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_KERNELS_DATA_PREFETCH_AUTOTUNER_H_ +#define TENSORFLOW_CORE_KERNELS_DATA_PREFETCH_AUTOTUNER_H_ + +#include +#include +#include + +#include "tensorflow/core/framework/model.h" +#include "tensorflow/core/platform/types.h" + +namespace tensorflow { +namespace data { + +// PrefetchAutotuner dynamically adjusts the buffer size of a prefetch iterator. +// +// PrefetchAutotuner attempts to find the minimum buffer size such that there is +// always at least 1 element in the prefetch queue every time the downstream +// iterator calls GetNext(). +// +// One common failure mode of input pipelines is being throughput bound. No +// amount of prefetching can address that performance mode. In order to guard +// against this condition, PrefetchAutotuner will only increase the buffer_limit +// if the prefetching thread is able to successfully fill the buffer at its +// current size. +// +// Note: in the current implementation, we never decrease the buffer_limit(). +// This should change in the future! +// +// PrefetchAutotuner is NOT thread safe. +class PrefetchAutotuner { + public: + explicit PrefetchAutotuner( + int64_t initial_buffer_size, int64_t buffer_size_min, + std::shared_ptr ram_budget_manager); + + int64_t buffer_limit() const { return buffer_limit_; } + + // Reports whether the element size has been set. + int64_t HasElementSize() const { return element_size_bytes_.has_value(); } + // Sets the element size to use for predicting memory usage. Element size must + // be set before the autotuner can increase the buffer size. + void SetElementSize(int64_t element_size_bytes); + void RecordConsumption(size_t current_buffer_size); + void RecordEmpty() { RecordConsumption(0); } + + private: + // PrefetchAutotuner operates as a state machine. + enum class Mode { + // Disables the autotuning. + kDisabled, + + // We have increased the size of the buffer, and will transition to + // kDownswing if we successfully fill the buffer. + kUpswing, + + // We have successfully filled a buffer of this size. If we ever block the + // downstream iterator, we should increase the buffer size. + kDownswing, + }; + + int64_t buffer_limit_; + // Estimated per-element size. + std::optional element_size_bytes_; + Mode mode_ = Mode::kDisabled; + std::shared_ptr ram_budget_manager_; +}; + +} // namespace data +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_DATA_PREFETCH_AUTOTUNER_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/prefetch_dataset_op.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/prefetch_dataset_op.h new file mode 100644 index 0000000000000000000000000000000000000000..e193e75e3e414819d48134f8f3d806ccc0943982 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/prefetch_dataset_op.h @@ -0,0 +1,53 @@ +/* Copyright 2018 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_KERNELS_DATA_PREFETCH_DATASET_OP_H_ +#define TENSORFLOW_CORE_KERNELS_DATA_PREFETCH_DATASET_OP_H_ + +#include "tensorflow/core/framework/dataset.h" +#include "tensorflow/core/framework/model.h" +#include "tensorflow/core/kernels/data/prefetch_autotuner.h" + +namespace tensorflow { +namespace data { + +class PrefetchDatasetOp : public UnaryDatasetOpKernel { + public: + static constexpr const char* const kDatasetType = "Prefetch"; + static constexpr const char* const kInputDataset = "input_dataset"; + static constexpr const char* const kBufferSize = model::kBufferSize; + static constexpr const char* const kOutputTypes = "output_types"; + static constexpr const char* const kOutputShapes = "output_shapes"; + static constexpr const char* const kSlackPeriod = "slack_period"; + static constexpr const char* const kLegacyAutotune = "legacy_autotune"; + static constexpr const char* const kBufferSizeMin = "buffer_size_min"; + + explicit PrefetchDatasetOp(OpKernelConstruction* ctx); + + protected: + void MakeDataset(OpKernelContext* ctx, DatasetBase* input, + DatasetBase** output) override; + + private: + class Dataset; + int64_t slack_period_ = 0; + bool legacy_autotune_ = true; + int64_t buffer_size_min_ = 0; +}; + +} // namespace data +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_DATA_PREFETCH_DATASET_OP_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/random_seed_ops.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/random_seed_ops.h new file mode 100644 index 0000000000000000000000000000000000000000..638f779e4bc166e0736594379770c20a621911ab --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/random_seed_ops.h @@ -0,0 +1,161 @@ +/* Copyright 2019 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_KERNELS_DATA_RANDOM_SEED_OPS_H_ +#define TENSORFLOW_CORE_KERNELS_DATA_RANDOM_SEED_OPS_H_ + +#include "tensorflow/core/data/dataset_utils.h" +#include "tensorflow/core/framework/resource_mgr.h" +#include "tensorflow/core/lib/random/philox_random.h" +#include "tensorflow/core/lib/random/random.h" +#include "tensorflow/core/lib/random/random_distributions.h" + +namespace tensorflow { +namespace data { + +// Represents a pair of random seeds. By TensorFlow convention, if both seeds +// are 0, then pseudo-random values are used instead. +class RandomSeeds { + public: + RandomSeeds(int64_t seed, int64_t seed2) + : input_seed_(seed), + input_seed2_(seed2), + seed_((seed | seed2) == 0 ? random::New64() : seed), + seed2_((seed | seed2) == 0 ? random::New64() : seed2) {} + + int64_t input_seed() const { return input_seed_; } + int64_t input_seed2() const { return input_seed2_; } + int64_t seed() const { return seed_; } + int64_t seed2() const { return seed2_; } + + private: + const int64_t input_seed_; + const int64_t input_seed2_; + const int64_t seed_; + const int64_t seed2_; +}; + +// Base class for seed generator resources. Subclasses customize how seeds are +// generated. +class SeedGenerator { + public: + virtual ~SeedGenerator() {} + + virtual int64_t seed() const = 0; + virtual int64_t seed2() const = 0; + virtual bool reshuffle_each_iteration() const = 0; + + virtual void GenerateSeeds(int64_t* seed1, int64_t* seed2) = 0; + virtual void Reset() = 0; + + virtual int64_t num_random_samples() const { + tf_shared_lock l(mu_); + return num_random_samples_; + } + virtual void set_num_random_samples(int64_t num_random_samples) { + mutex_lock l(mu_); + num_random_samples_ = num_random_samples; + } + + protected: + mutable mutex mu_; + int64_t num_random_samples_ TF_GUARDED_BY(mu_) = 0; +}; + +// A resource wrapping a shared instance of a seed generator. +class SeedGeneratorManager : public ResourceBase { + public: + explicit SeedGeneratorManager(SeedGenerator* seed_generator) + : seed_generator_(seed_generator) {} + + std::string DebugString() const override; + + std::shared_ptr get() { return seed_generator_; } + + private: + std::shared_ptr seed_generator_; +}; + +// Always generates the specified seed values. +class FixedSeedGenerator : public SeedGenerator { + public: + explicit FixedSeedGenerator(RandomSeeds seeds) : seeds_(std::move(seeds)) {} + + int64_t seed() const override { return seeds_.seed(); } + int64_t seed2() const override { return seeds_.seed(); } + bool reshuffle_each_iteration() const override { return false; } + + void GenerateSeeds(int64_t* seed1, int64_t* seed2) override; + void Reset() override {} + + private: + const RandomSeeds seeds_; +}; + +// Generates different (but deterministically chosen) seed values. +class RandomSeedGenerator : public SeedGenerator { + public: + explicit RandomSeedGenerator(RandomSeeds seeds) + : seeds_(std::move(seeds)), + parent_generator_(seeds_.seed(), seeds_.seed2()), + generator_(&parent_generator_) {} + + int64_t seed() const override { return seeds_.seed(); } + int64_t seed2() const override { return seeds_.seed2(); } + bool reshuffle_each_iteration() const override { return true; } + + void GenerateSeeds(int64_t* seed1, int64_t* seed2) override; + void Reset() override; + + private: + const RandomSeeds seeds_; + random::PhiloxRandom parent_generator_ TF_GUARDED_BY(mu_); + random::SingleSampleAdapter generator_ + TF_GUARDED_BY(mu_); +}; + +// Creates an instance of seed generator resource and transfers ownership +// to the caller. +class AnonymousSeedGeneratorHandleOp + : public AnonymousResourceOp { + public: + explicit AnonymousSeedGeneratorHandleOp(OpKernelConstruction* ctx); + void Compute(OpKernelContext* ctx) override; + + private: + string name() override; + Status CreateResource(OpKernelContext* ctx, + std::unique_ptr flib_def, + std::unique_ptr pflr, + FunctionLibraryRuntime* lib, + SeedGeneratorManager** manager) override; + + mutex mu_; + std::unique_ptr seeds_ TF_GUARDED_BY(mu_); + bool reshuffle_; +}; + +// Deletes an instance of seed generator resource. +class DeleteSeedGeneratorOp : public OpKernel { + public: + explicit DeleteSeedGeneratorOp(OpKernelConstruction* ctx) : OpKernel(ctx) {} + + void Compute(OpKernelContext* ctx) override; +}; + +} // namespace data +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_DATA_RANDOM_SEED_OPS_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/range_dataset_op.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/range_dataset_op.h new file mode 100644 index 0000000000000000000000000000000000000000..687f2eb66a2d26224914d77572c97b5a93d3b719 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/range_dataset_op.h @@ -0,0 +1,48 @@ +/* Copyright 2019 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ +#ifndef TENSORFLOW_CORE_KERNELS_DATA_RANGE_DATASET_OP_H_ +#define TENSORFLOW_CORE_KERNELS_DATA_RANGE_DATASET_OP_H_ + +#include "tensorflow/core/framework/dataset.h" + +namespace tensorflow { +namespace data { + +class RangeDatasetOp : public DatasetOpKernel { + public: + static constexpr const char* const kDatasetType = "Range"; + static constexpr const char* const kStart = "start"; + static constexpr const char* const kStop = "stop"; + static constexpr const char* const kStep = "step"; + static constexpr const char* const kOutputTypes = "output_types"; + static constexpr const char* const kOutputShapes = "output_shapes"; + static constexpr const char* const kReplicateOnSplit = "replicate_on_split"; + + explicit RangeDatasetOp(OpKernelConstruction* ctx); + + protected: + void MakeDataset(OpKernelContext* ctx, DatasetBase** output) override; + + private: + class Dataset; + class RangeSplitProvider; + DataTypeVector output_types_; + bool replicate_on_split_ = false; +}; + +} // namespace data +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_DATA_RANGE_DATASET_OP_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/reduce_dataset_op.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/reduce_dataset_op.h new file mode 100644 index 0000000000000000000000000000000000000000..524e7e304bd9c481b218831d67e00a9e56f64cad --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/reduce_dataset_op.h @@ -0,0 +1,43 @@ +/* Copyright 2021 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_KERNELS_DATA_REDUCE_DATASET_OP_H_ +#define TENSORFLOW_CORE_KERNELS_DATA_REDUCE_DATASET_OP_H_ + +#include "tensorflow/core/data/captured_function.h" +#include "tensorflow/core/framework/op_kernel.h" +#include "tensorflow/core/framework/tensor_shape.h" +#include "tensorflow/core/framework/types.h" +#include "tensorflow/core/kernels/data/iterator_ops.h" + +namespace tensorflow { +namespace data { + +class ReduceDatasetOp : public HybridAsyncOpKernel { + public: + explicit ReduceDatasetOp(OpKernelConstruction* ctx); + + protected: + Status DoCompute(OpKernelContext* ctx) override; + + std::shared_ptr func_metadata_ = nullptr; + DataTypeVector output_types_; + std::vector output_shapes_; +}; + +} // namespace data +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_DATA_REDUCE_DATASET_OP_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/repeat_dataset_op.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/repeat_dataset_op.h new file mode 100644 index 0000000000000000000000000000000000000000..81d534f7ad08f19d9d054663be2238a84d7802cb --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/repeat_dataset_op.h @@ -0,0 +1,44 @@ +/* Copyright 2019 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ +#ifndef TENSORFLOW_CORE_KERNELS_DATA_REPEAT_DATASET_OP_H_ +#define TENSORFLOW_CORE_KERNELS_DATA_REPEAT_DATASET_OP_H_ + +#include "tensorflow/core/framework/dataset.h" + +namespace tensorflow { +namespace data { + +class RepeatDatasetOp : public UnaryDatasetOpKernel { + public: + static constexpr const char* const kDatasetType = "Repeat"; + static constexpr const char* const kInputDataset = "input_dataset"; + static constexpr const char* const kCount = "count"; + static constexpr const char* const kOutputTypes = "output_types"; + static constexpr const char* const kOutputShapes = "output_shapes"; + + explicit RepeatDatasetOp(OpKernelConstruction* ctx); + + protected: + void MakeDataset(OpKernelContext* ctx, DatasetBase* input, + DatasetBase** output) override; + + private: + class Dataset; +}; + +} // namespace data +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_DATA_REPEAT_DATASET_OP_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/rewrite_dataset_op.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/rewrite_dataset_op.h new file mode 100644 index 0000000000000000000000000000000000000000..cd9b34b448d13d596cdcd8509c04e683d2e9505d --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/rewrite_dataset_op.h @@ -0,0 +1,41 @@ +/* Copyright 2022 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ +#ifndef TENSORFLOW_CORE_KERNELS_DATA_REWRITE_DATASET_OP_H_ +#define TENSORFLOW_CORE_KERNELS_DATA_REWRITE_DATASET_OP_H_ + +#include "tensorflow/core/framework/dataset.h" + +namespace tensorflow { +namespace data { + +class RewriteDatasetOp : public UnaryDatasetOpKernel { + public: + static constexpr const char* const kDatasetType = "Rewrite"; + static constexpr const char* const kInputDataset = "input_dataset"; + static constexpr const char* const kRewriteName = "rewrite_name"; + static constexpr const char* const kOutputTypes = "output_types"; + static constexpr const char* const kOutputShapes = "output_shapes"; + + explicit RewriteDatasetOp(OpKernelConstruction* ctx); + + protected: + void MakeDataset(OpKernelContext* ctx, DatasetBase* input, + DatasetBase** output) override; +}; + +} // namespace data +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_DATA_REWRITE_DATASET_OP_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/shard_dataset_op.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/shard_dataset_op.h new file mode 100644 index 0000000000000000000000000000000000000000..acdf171adbed2a9083ecf0fd5539de85fbc53fd4 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/shard_dataset_op.h @@ -0,0 +1,47 @@ +/* Copyright 2019 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ +#ifndef TENSORFLOW_CORE_KERNELS_DATA_SHARD_DATASET_OP_H_ +#define TENSORFLOW_CORE_KERNELS_DATA_SHARD_DATASET_OP_H_ + +#include "tensorflow/core/framework/dataset.h" + +namespace tensorflow { +namespace data { + +class ShardDatasetOp : public UnaryDatasetOpKernel { + public: + static constexpr const char* const kDatasetType = "Shard"; + static constexpr const char* const kInputDataset = "input_dataset"; + static constexpr const char* const kNumShards = "num_shards"; + static constexpr const char* const kIndex = "index"; + static constexpr const char* const kRequireNonEmpty = "require_non_empty"; + static constexpr const char* const kOutputTypes = "output_types"; + static constexpr const char* const kOutputShapes = "output_shapes"; + + explicit ShardDatasetOp(OpKernelConstruction* ctx); + + protected: + void MakeDataset(OpKernelContext* ctx, DatasetBase* input, + DatasetBase** output) override; + + private: + class Dataset; + bool require_non_empty_; +}; + +} // namespace data +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_DATA_SHARD_DATASET_OP_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/shuffle_dataset_op.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/shuffle_dataset_op.h new file mode 100644 index 0000000000000000000000000000000000000000..f33f75c84ebb0a4b0dfcf7196420e58df546c084 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/shuffle_dataset_op.h @@ -0,0 +1,79 @@ +/* Copyright 2019 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ +#ifndef TENSORFLOW_CORE_KERNELS_DATA_SHUFFLE_DATASET_OP_H_ +#define TENSORFLOW_CORE_KERNELS_DATA_SHUFFLE_DATASET_OP_H_ + +#include "tensorflow/core/framework/dataset.h" + +namespace tensorflow { +namespace data { + +class ShuffleDatasetOpBase : public UnaryDatasetOpKernel { + public: + static constexpr const char* const kInputDataset = "input_dataset"; + static constexpr const char* const kBufferSize = "buffer_size"; + static constexpr const char* const kSeed = "seed"; + static constexpr const char* const kSeed2 = "seed2"; + static constexpr const char* const kOutputTypes = "output_types"; + static constexpr const char* const kOutputShapes = "output_shapes"; + static constexpr const char* const kReshuffleEachIteration = + "reshuffle_each_iteration"; + + explicit ShuffleDatasetOpBase(OpKernelConstruction* ctx); + + protected: + class ShuffleDatasetBase; +}; + +class ShuffleDatasetOp : public ShuffleDatasetOpBase { + public: + static constexpr const char* const kDatasetType = "Shuffle"; + + explicit ShuffleDatasetOp(OpKernelConstruction* ctx); + + protected: + void MakeDataset(OpKernelContext* ctx, DatasetBase* input, + DatasetBase** output) override; + + private: + class Dataset; + class DatasetV2; + class DatasetV3; + int op_version_ = 0; + bool reshuffle_each_iteration_ = true; +}; + +class ShuffleAndRepeatDatasetOp : public ShuffleDatasetOpBase { + public: + static constexpr const char* const kDatasetType = "ShuffleAndRepeat"; + static constexpr const char* const kCount = "count"; + + explicit ShuffleAndRepeatDatasetOp(OpKernelConstruction* ctx); + + protected: + void MakeDataset(OpKernelContext* ctx, DatasetBase* input, + DatasetBase** output) override; + + private: + class Dataset; + class DatasetV2; + int op_version_ = 0; + bool reshuffle_each_iteration_ = true; +}; + +} // namespace data +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_DATA_SHUFFLE_DATASET_OP_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/skip_dataset_op.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/skip_dataset_op.h new file mode 100644 index 0000000000000000000000000000000000000000..6e22d7afe1066dc3a5c2132f8c31ba54a03a704d --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/skip_dataset_op.h @@ -0,0 +1,44 @@ +/* Copyright 2019 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ +#ifndef TENSORFLOW_CORE_KERNELS_DATA_SKIP_DATASET_OP_H_ +#define TENSORFLOW_CORE_KERNELS_DATA_SKIP_DATASET_OP_H_ + +#include "tensorflow/core/framework/dataset.h" + +namespace tensorflow { +namespace data { + +class SkipDatasetOp : public UnaryDatasetOpKernel { + public: + static constexpr const char* const kDatasetType = "Skip"; + static constexpr const char* const kInputDataset = "input_dataset"; + static constexpr const char* const kCount = "count"; + static constexpr const char* const kOutputTypes = "output_types"; + static constexpr const char* const kOutputShapes = "output_shapes"; + + explicit SkipDatasetOp(OpKernelConstruction* ctx); + + protected: + void MakeDataset(OpKernelContext* ctx, DatasetBase* input, + DatasetBase** output) override; + + private: + class Dataset; +}; + +} // namespace data +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_DATA_SKIP_DATASET_OP_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/take_dataset_op.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/take_dataset_op.h new file mode 100644 index 0000000000000000000000000000000000000000..c952b49c3c89a1721a1811aefadda9a33f406d34 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/take_dataset_op.h @@ -0,0 +1,80 @@ +/* Copyright 2019 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ +#ifndef TENSORFLOW_CORE_KERNELS_DATA_TAKE_DATASET_OP_H_ +#define TENSORFLOW_CORE_KERNELS_DATA_TAKE_DATASET_OP_H_ + +#include "tensorflow/core/framework/dataset.h" + +namespace tensorflow { +namespace data { + +class TakeDataset : public DatasetBase { + public: + TakeDataset(OpKernelContext* ctx, int64_t count, const DatasetBase* input); + + TakeDataset(DatasetContext::Params params, int64_t count, + const DatasetBase* input); + + ~TakeDataset() override; + + std::unique_ptr MakeIteratorInternal( + const string& prefix) const override; + + const DataTypeVector& output_dtypes() const override; + + const std::vector& output_shapes() const override; + + string DebugString() const override; + + int64_t CardinalityInternal(CardinalityOptions options) const override; + + Status InputDatasets(std::vector* inputs) const override; + + Status Get(OpKernelContext* ctx, int64 index, + std::vector* out_tensors) const override; + + Status CheckExternalState() const override; + + protected: + Status AsGraphDefInternal(SerializationContext* ctx, + DatasetGraphDefBuilder* b, + Node** output) const override; + + private: + class EmptyIterator; + class FiniteIterator; + const int64_t count_; + const DatasetBase* const input_; +}; + +class TakeDatasetOp : public UnaryDatasetOpKernel { + public: + static constexpr const char* const kDatasetType = "Take"; + static constexpr const char* const kInputDataset = "input_dataset"; + static constexpr const char* const kCount = "count"; + static constexpr const char* const kOutputTypes = "output_types"; + static constexpr const char* const kOutputShapes = "output_shapes"; + + explicit TakeDatasetOp(OpKernelConstruction* ctx); + + protected: + void MakeDataset(OpKernelContext* ctx, DatasetBase* input, + DatasetBase** output) override; +}; + +} // namespace data +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_DATA_TAKE_DATASET_OP_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/tensor_dataset_op.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/tensor_dataset_op.h new file mode 100644 index 0000000000000000000000000000000000000000..dcd738e90963021aed9bfe937efb92b5c72c0915 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/tensor_dataset_op.h @@ -0,0 +1,44 @@ +/* Copyright 2019 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ +#ifndef TENSORFLOW_CORE_KERNELS_DATA_TENSOR_DATASET_OP_H_ +#define TENSORFLOW_CORE_KERNELS_DATA_TENSOR_DATASET_OP_H_ + +#include "tensorflow/core/framework/dataset.h" + +namespace tensorflow { +namespace data { + +class TensorDatasetOp : public DatasetOpKernel { + public: + static constexpr const char* const kDatasetType = "Tensor"; + static constexpr const char* const kComponents = "components"; + static constexpr const char* const kToutput_types = "Toutput_types"; + static constexpr const char* const kOutputShapes = "output_shapes"; + + explicit TensorDatasetOp(OpKernelConstruction* ctx); + + protected: + void MakeDataset(OpKernelContext* ctx, DatasetBase** output) override; + + private: + class Dataset; + DataTypeVector output_types_; + std::vector output_shapes_; +}; + +} // namespace data +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_DATA_TENSOR_DATASET_OP_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/tensor_slice_dataset_op.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/tensor_slice_dataset_op.h new file mode 100644 index 0000000000000000000000000000000000000000..c2ddbaf1510b08c6603c674d2e7d756210d90aa1 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/tensor_slice_dataset_op.h @@ -0,0 +1,48 @@ +/* Copyright 2019 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ +#ifndef TENSORFLOW_CORE_KERNELS_DATA_TENSOR_SLICE_DATASET_OP_H_ +#define TENSORFLOW_CORE_KERNELS_DATA_TENSOR_SLICE_DATASET_OP_H_ + +#include "tensorflow/core/framework/dataset.h" + +namespace tensorflow { +namespace data { + +class TensorSliceDatasetOp : public DatasetOpKernel { + public: + static constexpr const char* const kDatasetType = "TensorSlice"; + static constexpr const char* const kComponents = "components"; + static constexpr const char* const kToutputTypes = "Toutput_types"; + static constexpr const char* const kOutputShapes = "output_shapes"; + static constexpr const char* const kIsFiles = "is_files"; + static constexpr const char* const kReplicateOnSplit = "replicate_on_split"; + + explicit TensorSliceDatasetOp(OpKernelConstruction* ctx); + + protected: + void MakeDataset(OpKernelContext* ctx, DatasetBase** output) override; + + private: + class Dataset; + DataTypeVector output_types_; + std::vector output_shapes_; + bool is_files_ = false; + bool replicate_on_split_ = false; +}; + +} // namespace data +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_DATA_TENSOR_SLICE_DATASET_OP_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/text_line_dataset_op.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/text_line_dataset_op.h new file mode 100644 index 0000000000000000000000000000000000000000..3621b57ada2e3d8e8e65ae9ed43172d0724d3dbd --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/text_line_dataset_op.h @@ -0,0 +1,42 @@ +/* Copyright 2019 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ +#ifndef TENSORFLOW_CORE_KERNELS_DATA_TEXT_LINE_DATASET_OP_H_ +#define TENSORFLOW_CORE_KERNELS_DATA_TEXT_LINE_DATASET_OP_H_ + +#include "tensorflow/core/framework/dataset.h" + +namespace tensorflow { +namespace data { + +class TextLineDatasetOp : public DatasetOpKernel { + public: + static constexpr const char* const kDatasetType = "TextLine"; + static constexpr const char* const kFileNames = "filenames"; + static constexpr const char* const kCompressionType = "compression_type"; + static constexpr const char* const kBufferSize = "buffer_size"; + + explicit TextLineDatasetOp(OpKernelConstruction* ctx); + + protected: + void MakeDataset(OpKernelContext* ctx, DatasetBase** output) override; + + private: + class Dataset; +}; + +} // namespace data +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_DATA_TEXT_LINE_DATASET_OP_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/tf_record_dataset_op.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/tf_record_dataset_op.h new file mode 100644 index 0000000000000000000000000000000000000000..0cfbc66706b86a49d7acbec4f9177713ee48306b --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/tf_record_dataset_op.h @@ -0,0 +1,44 @@ +/* Copyright 2019 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ +#ifndef TENSORFLOW_CORE_KERNELS_DATA_TF_RECORD_DATASET_OP_H_ +#define TENSORFLOW_CORE_KERNELS_DATA_TF_RECORD_DATASET_OP_H_ + +#include "tensorflow/core/framework/dataset.h" + +namespace tensorflow { +namespace data { + +class TFRecordDatasetOp : public DatasetOpKernel { + public: + static constexpr const char* const kDatasetType = "TFRecord"; + static constexpr const char* const kFileNames = "filenames"; + static constexpr const char* const kCompressionType = "compression_type"; + static constexpr const char* const kBufferSize = "buffer_size"; + static constexpr const char* const kByteOffsets = "byte_offsets"; + + explicit TFRecordDatasetOp(OpKernelConstruction* ctx); + + protected: + void MakeDataset(OpKernelContext* ctx, DatasetBase** output) override; + + private: + class Dataset; + int op_version_; +}; + +} // namespace data +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_DATA_TF_RECORD_DATASET_OP_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/window_dataset.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/window_dataset.h new file mode 100644 index 0000000000000000000000000000000000000000..6d698083c5a56859bd9d0d64b98e739afc2d1746 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/window_dataset.h @@ -0,0 +1,50 @@ +/* Copyright 2017 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ +#ifndef TENSORFLOW_CORE_KERNELS_DATA_WINDOW_DATASET_H_ +#define TENSORFLOW_CORE_KERNELS_DATA_WINDOW_DATASET_H_ + +#include + +#include "tensorflow/core/framework/dataset.h" +#include "tensorflow/core/framework/partial_tensor_shape.h" +#include "tensorflow/core/framework/tensor.h" +#include "tensorflow/core/framework/types.h" + +namespace tensorflow { +namespace data { + +// Creates a dataset representing an eagerly-collected window of elements. +// +// The `elements` argument defines the elements of the resulting +// dataset, which is stored in `out_dataset`. +// +// This dataset is constructed internally for use in datasets that +// build nested dataset expressions (e.g. the reducer function for +// GroupByWindowDataset). It efficiently supports multiple iterators on +// the same window without recomputation. +// +// REQUIRES: `output_types` must match the types of the respective +// element components in `elements`. +// REQUIRES: `output_shapes` must be compatible with the shapes of the +// respective element components in `elements`.a +Status NewWindow(std::vector> elements, + DataTypeVector output_types, + std::vector output_shapes, + DatasetBase** out_dataset); + +} // namespace data +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_DATA_WINDOW_DATASET_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/window_dataset_op.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/window_dataset_op.h new file mode 100644 index 0000000000000000000000000000000000000000..186bce67638191dda8c29fbbd8986945384bacc6 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/window_dataset_op.h @@ -0,0 +1,52 @@ +/* Copyright 2019 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ +#ifndef TENSORFLOW_CORE_KERNELS_DATA_WINDOW_DATASET_OP_H_ +#define TENSORFLOW_CORE_KERNELS_DATA_WINDOW_DATASET_OP_H_ + +#include + +#include "tensorflow/core/framework/dataset.h" +#include "tensorflow/core/framework/partial_tensor_shape.h" +#include "tensorflow/core/framework/tensor.h" +#include "tensorflow/core/framework/types.h" + +namespace tensorflow { +namespace data { + +class WindowDatasetOp : public UnaryDatasetOpKernel { + public: + static constexpr const char* const kDatasetType = "Window"; + static constexpr const char* const kInputDataset = "input_dataset"; + static constexpr const char* const kSize = "size"; + static constexpr const char* const kShift = "shift"; + static constexpr const char* const kStride = "stride"; + static constexpr const char* const kDropRemainder = "drop_remainder"; + static constexpr const char* const kOutputTypes = "output_types"; + static constexpr const char* const kOutputShapes = "output_shapes"; + + explicit WindowDatasetOp(OpKernelConstruction* ctx); + + protected: + void MakeDataset(OpKernelContext* ctx, DatasetBase* input, + DatasetBase** output) override; + + private: + class Dataset; +}; + +} // namespace data +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_DATA_WINDOW_DATASET_OP_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/zip_dataset_op.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/zip_dataset_op.h new file mode 100644 index 0000000000000000000000000000000000000000..5aa92035cc7ae0f8e755d171e4e2ce90e00ac4bc --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/data/zip_dataset_op.h @@ -0,0 +1,43 @@ +/* Copyright 2019 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ +#ifndef TENSORFLOW_CORE_KERNELS_DATA_ZIP_DATASET_OP_H_ +#define TENSORFLOW_CORE_KERNELS_DATA_ZIP_DATASET_OP_H_ + +#include "tensorflow/core/framework/dataset.h" + +namespace tensorflow { +namespace data { + +class ZipDatasetOp : public DatasetOpKernel { + public: + static constexpr const char* const kDatasetType = "Zip"; + static constexpr const char* const kInputDatasets = "input_datasets"; + static constexpr const char* const kOutputTypes = "output_types"; + static constexpr const char* const kOutputShapes = "output_shapes"; + static constexpr const char* const kNumInputDatasets = "N"; + + explicit ZipDatasetOp(OpKernelConstruction* ctx); + + protected: + void MakeDataset(OpKernelContext* ctx, DatasetBase** output) override; + + private: + class Dataset; +}; + +} // namespace data +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_DATA_ZIP_DATASET_OP_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/image/adjust_contrast_op.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/image/adjust_contrast_op.h new file mode 100644 index 0000000000000000000000000000000000000000..9981275c96c78f38f5d6e33dd5b259677c0e6a58 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/image/adjust_contrast_op.h @@ -0,0 +1,127 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_KERNELS_IMAGE_ADJUST_CONTRAST_OP_H_ +#define TENSORFLOW_CORE_KERNELS_IMAGE_ADJUST_CONTRAST_OP_H_ +#include "unsupported/Eigen/CXX11/Tensor" // from @eigen_archive +#include "tensorflow/core/framework/tensor_types.h" + +namespace tensorflow { +namespace functor { + +// Functor used by AdjustContrastOp to do the computations. +template +struct AdjustContrast { + void operator()(const Device& d, typename TTypes::ConstTensor input, + typename TTypes::ConstScalar contrast_factor, + typename TTypes::ConstScalar min_value, + typename TTypes::ConstScalar max_value, + typename TTypes::Tensor mean_values, + typename TTypes::Tensor output) { + const int batch = input.dimension(0); + const int height = input.dimension(1); + const int width = input.dimension(2); + const int channels = input.dimension(3); + + Eigen::array scalar_broadcast; + scalar_broadcast[0] = batch; + scalar_broadcast[1] = height; + scalar_broadcast[2] = width; + scalar_broadcast[3] = channels; + + Eigen::IndexList, Eigen::type2index<2> > + reduction_axis; + Eigen::IndexList, int, int, Eigen::type2index<1> > + broadcast_dims; + broadcast_dims.set(1, height); + broadcast_dims.set(2, width); + Eigen::IndexList, Eigen::type2index<1>, int> + reshape_dims; + reshape_dims.set(0, batch); + reshape_dims.set(3, channels); + + Eigen::Sizes<1, 1, 1, 1> scalar; + float num_reduced_coeffs = height * width; + mean_values.device(d) = + (input.template cast().sum(reduction_axis).eval() / + num_reduced_coeffs) + .reshape(reshape_dims) + .broadcast(broadcast_dims); + + auto contrast_factor_tensor = + contrast_factor.reshape(scalar).broadcast(scalar_broadcast); + auto adjusted = + (input.template cast() - mean_values) * contrast_factor_tensor + + mean_values; + auto min_bcast = min_value.reshape(scalar).broadcast(scalar_broadcast); + auto max_bcast = max_value.reshape(scalar).broadcast(scalar_broadcast); + // TODO(wicke): This is rather slow and should be re-written as pure cuda. + output.device(d) = adjusted.cwiseMin(max_bcast).cwiseMax(min_bcast); + } +}; + +// Functor used by AdjustContrastOpv2 to do the computations. +template +struct AdjustContrastv2 { + void operator()(const Device& d, typename TTypes::ConstTensor input, + typename TTypes::ConstScalar contrast_factor, + typename TTypes::Tensor output) { + const int batch = input.dimension(0); + const int height = input.dimension(1); + const int width = input.dimension(2); + const int channels = input.dimension(3); + + Eigen::array scalar_broadcast; + scalar_broadcast[0] = batch; + scalar_broadcast[1] = height; + scalar_broadcast[2] = width; + scalar_broadcast[3] = channels; + + Eigen::IndexList, Eigen::type2index<1> > + reduction_axis; + Eigen::IndexList, int, int, Eigen::type2index<1> > + broadcast_dims; + broadcast_dims.set(1, height); + broadcast_dims.set(2, width); + Eigen::IndexList, Eigen::type2index<1>, int> + reshape_dims; + reshape_dims.set(0, batch); + reshape_dims.set(3, channels); + Eigen::IndexList, Eigen::type2index<2>, + Eigen::type2index<0>, Eigen::type2index<3> > + reduced_dims_first; + + Eigen::Sizes<1, 1, 1, 1> scalar; + float num_reduced_coeffs = height * width; + output.device(d) = (input.template cast() + .shuffle(reduced_dims_first) + .sum(reduction_axis) + .eval() / + num_reduced_coeffs) + .template cast() + .reshape(reshape_dims) + .broadcast(broadcast_dims); + auto contrast_factor_tensor = + contrast_factor.reshape(scalar).broadcast(scalar_broadcast); + auto adjusted = + (input - output).template cast() * contrast_factor_tensor; + output.device(d) += adjusted.template cast(); + } +}; + +} // namespace functor +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_IMAGE_ADJUST_CONTRAST_OP_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/image/adjust_hsv_gpu.cu.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/image/adjust_hsv_gpu.cu.h new file mode 100644 index 0000000000000000000000000000000000000000..417ea652db79cb40d289d830a6e6bb7e8a72991b --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/image/adjust_hsv_gpu.cu.h @@ -0,0 +1,145 @@ +/* Copyright 2017 The TensorFlow Authors. All Rights Reserved. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ +#ifndef TENSORFLOW_CORE_KERNELS_IMAGE_ADJUST_HSV_GPU_CU_H_ +#define TENSORFLOW_CORE_KERNELS_IMAGE_ADJUST_HSV_GPU_CU_H_ + +#if GOOGLE_CUDA || TENSORFLOW_USE_ROCM + +#define EIGEN_USE_GPU + +#include "tensorflow/core/framework/register_types.h" +#include "tensorflow/core/framework/types.h" + +namespace tensorflow { +namespace internal { + +typedef struct RgbTuple { + float r; + float g; + float b; +} RgbTuple; + +typedef struct HsvTuple { + float h; + float s; + float v; +} HsvTuple; + +inline __device__ HsvTuple rgb2hsv_cuda(const float r, const float g, + const float b) { + HsvTuple tuple; + const float M = fmaxf(r, fmaxf(g, b)); + const float m = fminf(r, fminf(g, b)); + const float chroma = M - m; + float h = 0.0f, s = 0.0f; + // hue + if (chroma > 0.0f) { + if (M == r) { + const float num = (g - b) / chroma; + const float sign = copysignf(1.0f, num); + h = ((sign < 0.0f) * 6.0f + sign * fmodf(sign * num, 6.0f)) / 6.0f; + } else if (M == g) { + h = ((b - r) / chroma + 2.0f) / 6.0f; + } else { + h = ((r - g) / chroma + 4.0f) / 6.0f; + } + } else { + h = 0.0f; + } + // saturation + if (M > 0.0) { + s = chroma / M; + } else { + s = 0.0f; + } + tuple.h = h; + tuple.s = s; + tuple.v = M; + return tuple; +} + +inline __device__ RgbTuple hsv2rgb_cuda(const float h, const float s, + const float v) { + RgbTuple tuple; + const float new_h = h * 6.0f; + const float chroma = v * s; + const float x = chroma * (1.0f - fabsf(fmodf(new_h, 2.0f) - 1.0f)); + const float new_m = v - chroma; + const bool between_0_and_1 = new_h >= 0.0f && new_h < 1.0f; + const bool between_1_and_2 = new_h >= 1.0f && new_h < 2.0f; + const bool between_2_and_3 = new_h >= 2.0f && new_h < 3.0f; + const bool between_3_and_4 = new_h >= 3.0f && new_h < 4.0f; + const bool between_4_and_5 = new_h >= 4.0f && new_h < 5.0f; + const bool between_5_and_6 = new_h >= 5.0f && new_h < 6.0f; + tuple.r = chroma * (between_0_and_1 || between_5_and_6) + + x * (between_1_and_2 || between_4_and_5) + new_m; + tuple.g = chroma * (between_1_and_2 || between_2_and_3) + + x * (between_0_and_1 || between_3_and_4) + new_m; + tuple.b = chroma * (between_3_and_4 || between_4_and_5) + + x * (between_2_and_3 || between_5_and_6) + new_m; + return tuple; +} + +template +__global__ void adjust_hsv_nhwc( + const int64 number_elements, const T* const __restrict__ input, + T* const __restrict__ output, const float* const __restrict__ hue_delta, + const float* const __restrict__ saturation_scale, + const float* const __restrict__ value_scale) { + // multiply by 3 since we're dealing with contiguous RGB bytes for each pixel + // (NHWC) + for (int64 idx = (blockDim.x * blockIdx.x + threadIdx.x) * 3; + idx < number_elements; idx += blockDim.x * gridDim.x * 3) { + if (!AdjustHue && !AdjustSaturation && !AdjustV) { + output[idx] = input[idx]; + output[idx + 1] = input[idx + 1]; + output[idx + 2] = input[idx + 2]; + continue; + } + const HsvTuple hsv = rgb2hsv_cuda(static_cast(input[idx]), + static_cast(input[idx + 1]), + static_cast(input[idx + 2])); + float new_h = hsv.h; + float new_s = hsv.s; + float new_v = hsv.v; + // hue adjustment + if (AdjustHue) { + const float delta = *hue_delta; + new_h = fmodf(hsv.h + delta, 1.0f); + if (new_h < 0.0f) { + new_h = fmodf(1.0f + new_h, 1.0f); + } + } + // saturation adjustment + if (AdjustSaturation && saturation_scale != nullptr) { + const float scale = *saturation_scale; + new_s = fminf(1.0f, fmaxf(0.0f, hsv.s * scale)); + } + // value adjustment + if (AdjustV && value_scale != nullptr) { + const float scale = *value_scale; + new_v = hsv.v * scale; + } + const RgbTuple rgb = hsv2rgb_cuda(new_h, new_s, new_v); + output[idx] = static_cast(rgb.r); + output[idx + 1] = static_cast(rgb.g); + output[idx + 2] = static_cast(rgb.b); + } +} + +} // namespace internal +} // namespace tensorflow + +#endif // GOOGLE_CUDA || TENSORFLOW_USE_ROCM +#endif // TENSORFLOW_CORE_KERNELS_IMAGE_ADJUST_HSV_GPU_CU_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/image/adjust_hue_op.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/image/adjust_hue_op.h new file mode 100644 index 0000000000000000000000000000000000000000..788b61bc35227b9507cc3f9d2a5a998643ee846a --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/image/adjust_hue_op.h @@ -0,0 +1,41 @@ +/* Copyright 2016 The TensorFlow Authors. All Rights Reserved. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ +#ifndef TENSORFLOW_CORE_KERNELS_IMAGE_ADJUST_HUE_OP_H_ +#define TENSORFLOW_CORE_KERNELS_IMAGE_ADJUST_HUE_OP_H_ + +#if GOOGLE_CUDA || TENSORFLOW_USE_ROCM +#define EIGEN_USE_GPU + +#include "unsupported/Eigen/CXX11/Tensor" // from @eigen_archive + +#include "tensorflow/core/framework/types.h" + +namespace tensorflow { + +typedef Eigen::GpuDevice GPUDevice; + +namespace functor { + +template +struct AdjustHueGPU { + void operator()(GPUDevice* device, const int64_t number_of_elements, + const T* const input, const float* const delta, + T* const output); +}; + +} // namespace functor +} // namespace tensorflow + +#endif // GOOGLE_CUDA || TENSORFLOW_USE_ROCM +#endif // TENSORFLOW_CORE_KERNELS_IMAGE_ADJUST_HUE_OP_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/image/adjust_saturation_op.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/image/adjust_saturation_op.h new file mode 100644 index 0000000000000000000000000000000000000000..278161bddb833c30c80694a255b4c21cfbbbb32b --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/image/adjust_saturation_op.h @@ -0,0 +1,41 @@ +/* Copyright 2017 The TensorFlow Authors. All Rights Reserved. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ +#ifndef TENSORFLOW_CORE_KERNELS_IMAGE_ADJUST_SATURATION_OP_H_ +#define TENSORFLOW_CORE_KERNELS_IMAGE_ADJUST_SATURATION_OP_H_ + +#if GOOGLE_CUDA || TENSORFLOW_USE_ROCM +#define EIGEN_USE_GPU + +#include "unsupported/Eigen/CXX11/Tensor" // from @eigen_archive + +#include "tensorflow/core/framework/types.h" + +namespace tensorflow { + +typedef Eigen::GpuDevice GPUDevice; + +namespace functor { + +template +struct AdjustSaturationGPU { + void operator()(GPUDevice* device, const int64_t number_of_elements, + const T* const input, const float* const scale, + T* const output); +}; + +} // namespace functor +} // namespace tensorflow + +#endif // GOOGLE_CUDA || TENSORFLOW_USE_ROCM +#endif // TENSORFLOW_CORE_KERNELS_IMAGE_ADJUST_SATURATION_OP_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/image/colorspace_op.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/image/colorspace_op.h new file mode 100644 index 0000000000000000000000000000000000000000..b71f058f031647c8ac1ead04700a0c96076ce705 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/image/colorspace_op.h @@ -0,0 +1,90 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_KERNELS_IMAGE_COLORSPACE_OP_H_ +#define TENSORFLOW_CORE_KERNELS_IMAGE_COLORSPACE_OP_H_ + +#include "unsupported/Eigen/CXX11/Tensor" // from @eigen_archive +#include "tensorflow/core/framework/tensor_shape.h" +#include "tensorflow/core/framework/tensor_types.h" + +namespace tensorflow { + +namespace functor { + +template +struct RGBToHSV { + void operator()(const Device &d, + typename TTypes::ConstTensor input_data, + typename TTypes::Tensor range, + typename TTypes::Tensor output_data) { + auto H = output_data.template chip<1>(0); + auto S = output_data.template chip<1>(1); + auto V = output_data.template chip<1>(2); + + auto R = input_data.template chip<1>(0); + auto G = input_data.template chip<1>(1); + auto B = input_data.template chip<1>(2); + + Eigen::IndexList > channel_axis; + + V.device(d) = input_data.maximum(channel_axis); + + range.device(d) = V - input_data.minimum(channel_axis); + + S.device(d) = (V > T(0)).select(range / V, V.constant(T(0))); + + auto norm = range.inverse() * (T(1) / T(6)); + // TODO(wicke): all these assignments are only necessary because a combined + // expression is larger than kernel parameter space. A custom kernel is + // probably in order. + H.device(d) = (R == V).select( + norm * (G - B), (G == V).select(norm * (B - R) + T(2) / T(6), + norm * (R - G) + T(4) / T(6))); + H.device(d) = (range > T(0)).select(H, H.constant(T(0))); + H.device(d) = (H < T(0)).select(H + T(1), H); + } +}; + +template +struct HSVToRGB { + void operator()(const Device &d, + typename TTypes::ConstTensor input_data, + typename TTypes::Tensor output_data) { + auto H = input_data.template chip<1>(0); + auto S = input_data.template chip<1>(1); + auto V = input_data.template chip<1>(2); + + // TODO(wicke): compute only the fractional part of H for robustness + auto dh = H * T(6); + auto dr = ((dh - T(3)).abs() - T(1)).cwiseMax(T(0)).cwiseMin(T(1)); + auto dg = (-(dh - T(2)).abs() + T(2)).cwiseMax(T(0)).cwiseMin(T(1)); + auto db = (-(dh - T(4)).abs() + T(2)).cwiseMax(T(0)).cwiseMin(T(1)); + auto one_s = -S + T(1); + + auto R = output_data.template chip<1>(0); + auto G = output_data.template chip<1>(1); + auto B = output_data.template chip<1>(2); + + R.device(d) = (one_s + S * dr) * V; + G.device(d) = (one_s + S * dg) * V; + B.device(d) = (one_s + S * db) * V; + } +}; + +} // namespace functor +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_IMAGE_COLORSPACE_OP_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/image/crop_and_resize_op.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/image/crop_and_resize_op.h new file mode 100644 index 0000000000000000000000000000000000000000..dd838ea570e9cd554f6d0f9b42c44398d4480199 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/image/crop_and_resize_op.h @@ -0,0 +1,72 @@ +/* Copyright 2016 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_KERNELS_IMAGE_CROP_AND_RESIZE_OP_H_ +#define TENSORFLOW_CORE_KERNELS_IMAGE_CROP_AND_RESIZE_OP_H_ + +#include "unsupported/Eigen/CXX11/Tensor" // from @eigen_archive +#include "tensorflow/core/framework/numeric_types.h" +#include "tensorflow/core/framework/op_kernel.h" +#include "tensorflow/core/framework/tensor_types.h" + +namespace tensorflow { +namespace functor { + +template +struct CropAndResize { + // We assume that the tensor sizes are correct. + bool operator()(const OpKernelContext* context, + typename TTypes::ConstTensor image, + typename TTypes::ConstTensor boxes, + typename TTypes::ConstTensor box_ind, + const std::string& method_name, float extrapolation_value, + typename TTypes::Tensor crops); +}; + +template +struct CropAndResizeBackpropImage { + // We assume that the tensor sizes are correct. + bool operator()(const OpKernelContext* context, + typename TTypes::ConstTensor grads, + typename TTypes::ConstTensor boxes, + typename TTypes::ConstTensor box_ind, + typename TTypes::Tensor grads_image, + const std::string& method_name); +}; + +template +struct CropAndResizeBackpropBoxes { + // We assume that the tensor sizes are correct. + bool operator()(const Device& d, typename TTypes::ConstTensor grads, + typename TTypes::ConstTensor image, + typename TTypes::ConstTensor boxes, + typename TTypes::ConstTensor box_ind, + typename TTypes::Tensor grads_boxes); +}; + +template +struct CheckValidBoxIndexHelper { + // Checks if all values in box_index are in [0, batch). + void operator()(const Device& d, + typename TTypes::ConstTensor box_index, int batch, + typename TTypes::Tensor isvalid) { + isvalid.device(d) = ((box_index >= 0) && (box_index < batch)).all(); + } +}; + +} // namespace functor +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_IMAGE_CROP_AND_RESIZE_OP_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/image/extract_image_patches_op.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/image/extract_image_patches_op.h new file mode 100644 index 0000000000000000000000000000000000000000..3dc2f32348c87aeb278dfbc5f8c0def1f5ddf47e --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/image/extract_image_patches_op.h @@ -0,0 +1,51 @@ +/* Copyright 2016 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_KERNELS_IMAGE_EXTRACT_IMAGE_PATCHES_OP_H_ +#define TENSORFLOW_CORE_KERNELS_IMAGE_EXTRACT_IMAGE_PATCHES_OP_H_ + +#include "unsupported/Eigen/CXX11/Tensor" // from @eigen_archive +#include "tensorflow/core/framework/tensor_shape.h" +#include "tensorflow/core/framework/tensor_types.h" + +namespace tensorflow { +namespace functor { + +template +struct ExtractImagePatchesForward { + void operator()(const Device& d, typename TTypes::ConstTensor input, + int patch_rows, int patch_cols, int stride_rows, + int stride_cols, int rate_rows, int rate_cols, + const Eigen::PaddingType& padding, + typename TTypes::Tensor output) { + // Need to swap row/col when calling Eigen, because our data is in + // NHWC format while Eigen assumes NWHC format. + MaybeWith32BitIndexing( + [&](auto input32, auto output32) { + output32.device(d) = + input32 + .extract_image_patches(patch_cols, patch_rows, stride_cols, + stride_rows, rate_cols, rate_rows, + padding) + .reshape(output32.dimensions()); + }, + input, output); + } +}; + +} // namespace functor +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_IMAGE_EXTRACT_IMAGE_PATCHES_OP_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/image/extract_volume_patches_op.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/image/extract_volume_patches_op.h new file mode 100644 index 0000000000000000000000000000000000000000..9e1348181ece7d0e4e5daf162a5027862301e653 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/image/extract_volume_patches_op.h @@ -0,0 +1,50 @@ +/* Copyright 2018 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_KERNELS_IMAGE_EXTRACT_VOLUME_PATCHES_OP_H_ +#define TENSORFLOW_CORE_KERNELS_IMAGE_EXTRACT_VOLUME_PATCHES_OP_H_ + +#include "tensorflow/core/framework/tensor_shape.h" +#include "tensorflow/core/framework/tensor_types.h" +#include "unsupported/Eigen/CXX11/Tensor" // from @eigen_archive + +namespace tensorflow { +namespace functor { + +template +struct ExtractVolumePatchesForward { + void operator()(const Device& d, typename TTypes::ConstTensor input, + int patch_planes, int patch_rows, int patch_cols, + int stride_planes, int stride_rows, int stride_cols, + /* int rate_planes, int rate_rows, int rate_cols, */ + const Eigen::PaddingType& padding, + typename TTypes::Tensor output) { + MaybeWith32BitIndexing( + [&](auto input32, auto output32) { + output32.device(d) = + input32 + .extract_volume_patches(patch_cols, patch_rows, patch_planes, + stride_cols, stride_rows, + stride_planes, padding) + .reshape(output32.dimensions()); + }, + input, output); + } +}; + +} // namespace functor +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_IMAGE_EXTRACT_VOLUME_PATCHES_OP_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/image/image_ops.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/image/image_ops.h new file mode 100644 index 0000000000000000000000000000000000000000..914cb52805f10e4a43aa420305fd94ae4f73cc83 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/image/image_ops.h @@ -0,0 +1,278 @@ +/* Copyright 2020 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_KERNELS_IMAGE_IMAGE_OPS_H_ +#define TENSORFLOW_CORE_KERNELS_IMAGE_IMAGE_OPS_H_ + +// See docs in ../ops/image_ops.cc. + +#define EIGEN_USE_THREADS + +#include "unsupported/Eigen/CXX11/Tensor" // from @eigen_archive + +#include "tensorflow/core/framework/tensor_types.h" +#include "tensorflow/core/platform/types.h" + +namespace tensorflow { + +namespace generator { + +enum Interpolation { NEAREST, BILINEAR }; +enum Mode { FILL_REFLECT, FILL_WRAP, FILL_CONSTANT, FILL_NEAREST }; + +using Eigen::array; +using Eigen::DenseIndex; + +// Follow scipy's implementation +// https://github.com/scipy/scipy/blob/master/scipy/ndimage/src/ni_interpolation.c +template +struct MapCoordinate { + float operator()(const float out_coord, const DenseIndex len); +}; + +template +struct MapCoordinate { + EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE float operator()(const float out_coord, + const DenseIndex len) { + // Reflect [abcd] to [dcba|abcd|dcba]. + float in_coord = out_coord; + if (in_coord < 0) { + if (len <= 1) { + in_coord = 0; + } else { + const DenseIndex sz2 = 2 * len; + if (in_coord < sz2) { + in_coord = sz2 * static_cast(-in_coord / sz2) + in_coord; + } + in_coord = (in_coord < -len) ? in_coord + sz2 : -in_coord - 1; + } + } else if (in_coord > len - 1) { + if (len <= 1) { + in_coord = 0; + } else { + const DenseIndex sz2 = 2 * len; + in_coord -= sz2 * static_cast(in_coord / sz2); + if (in_coord >= len) { + in_coord = sz2 - in_coord - 1; + } + } + } + // clamp is necessary because when out_coord = 3.5 and len = 4, + // in_coord = 3.5 and will be rounded to 4 in nearest interpolation. + return Eigen::internal::scalar_clamp_op(0.0f, len - 1)(in_coord); + } +}; + +template +struct MapCoordinate { + EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE float operator()(const float out_coord, + const DenseIndex len) { + // Wrap [abcd] to [abcd|abcd|abcd]. + float in_coord = out_coord; + if (in_coord < 0) { + if (len <= 1) { + in_coord = 0; + } else { + const DenseIndex sz = len - 1; + in_coord += len * (static_cast(-in_coord / sz) + 1); + } + } else if (in_coord > len - 1) { + if (len <= 1) { + in_coord = 0; + } else { + const DenseIndex sz = len - 1; + in_coord -= len * static_cast(in_coord / sz); + } + } + // clamp is necessary because when out_coord = -0.5 and len = 4, + // in_coord = 3.5 and will be rounded to 4 in nearest interpolation. + return Eigen::internal::scalar_clamp_op(0.0f, len - 1)(in_coord); + } +}; + +template +struct MapCoordinate { + EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE float operator()(const float out_coord, + const DenseIndex len) { + return out_coord; + } +}; + +template +struct MapCoordinate { + EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE float operator()(const float out_coord, + const DenseIndex len) { + return Eigen::internal::scalar_clamp_op(0.0f, len - 1)(out_coord); + } +}; + +template +class ProjectiveGenerator { + private: + typename TTypes::ConstTensor input_; + typename TTypes::ConstMatrix transforms_; + const Interpolation interpolation_; + const T fill_value_; + + public: + EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE + ProjectiveGenerator(typename TTypes::ConstTensor input, + typename TTypes::ConstMatrix transforms, + const Interpolation interpolation, const T fill_value) + : input_(input), + transforms_(transforms), + interpolation_(interpolation), + fill_value_(fill_value) {} + + EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE T + operator()(const array& coords) const { + const int64_t output_y = coords[1]; + const int64_t output_x = coords[2]; + const float* transform = + transforms_.dimension(0) == 1 + ? transforms_.data() + : &transforms_.data()[transforms_.dimension(1) * coords[0]]; + float projection = transform[6] * output_x + transform[7] * output_y + 1.f; + if (projection == 0) { + // Return the fill value for infinite coordinates, + // which are outside the input image + return fill_value_; + } + const float input_x = + (transform[0] * output_x + transform[1] * output_y + transform[2]) / + projection; + const float input_y = + (transform[3] * output_x + transform[4] * output_y + transform[5]) / + projection; + + // Map out-of-boundary input coordinates to in-boundary based on fill_mode. + auto map_functor = MapCoordinate(); + const float x = map_functor(input_x, input_.dimension(2)); + const float y = map_functor(input_y, input_.dimension(1)); + + const DenseIndex batch = coords[0]; + const DenseIndex channels = coords[3]; + switch (interpolation_) { + case NEAREST: + return nearest_interpolation(batch, y, x, channels, fill_value_); + case BILINEAR: + return bilinear_interpolation(batch, y, x, channels, fill_value_); + } + // Unreachable; ImageProjectiveTransform only uses INTERPOLATION_NEAREST + // or INTERPOLATION_BILINEAR. + return fill_value_; + } + + EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE T + nearest_interpolation(const DenseIndex batch, const float y, const float x, + const DenseIndex channel, const T fill_value) const { + return read_with_fill_value(batch, DenseIndex(std::round(y)), + DenseIndex(std::round(x)), channel, fill_value); + } + + EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE T + bilinear_interpolation(const DenseIndex batch, const float y, const float x, + const DenseIndex channel, const T fill_value) const { + const float y_floor = std::floor(y); + const float x_floor = std::floor(x); + const float y_ceil = y_floor + 1; + const float x_ceil = x_floor + 1; + // f(x, y_floor) = (x_ceil - x) / (x_ceil - x_floor) * f(x_floor, y_floor) + // + (x - x_floor) / (x_ceil - x_floor) * f(x_ceil, y_floor) + const float value_yfloor = + (x_ceil - x) * static_cast(read_with_fill_value( + batch, DenseIndex(y_floor), DenseIndex(x_floor), + channel, fill_value)) + + (x - x_floor) * static_cast(read_with_fill_value( + batch, DenseIndex(y_floor), DenseIndex(x_ceil), + channel, fill_value)); + // f(x, y_ceil) = (x_ceil - x) / (x_ceil - x_floor) * f(x_floor, y_ceil) + // + (x - x_floor) / (x_ceil - x_floor) * f(x_ceil, y_ceil) + const float value_yceil = + (x_ceil - x) * static_cast(read_with_fill_value( + batch, DenseIndex(y_ceil), DenseIndex(x_floor), + channel, fill_value)) + + (x - x_floor) * static_cast(read_with_fill_value( + batch, DenseIndex(y_ceil), DenseIndex(x_ceil), + channel, fill_value)); + // f(x, y) = (y_ceil - y) / (y_ceil - y_floor) * f(x, y_floor) + // + (y - y_floor) / (y_ceil - y_floor) * f(x, y_ceil) + return T((y_ceil - y) * value_yfloor + (y - y_floor) * value_yceil); + } + + EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE T read_with_fill_value( + const DenseIndex batch, const DenseIndex y, const DenseIndex x, + const DenseIndex channel, const T fill_value) const { + // batch and channel must be correct, because they are passed unchanged from + // the input. + return (0 <= y && y < input_.dimension(1) && 0 <= x && + x < input_.dimension(2)) + ? input_(array{batch, y, x, channel}) + : fill_value; + } +}; + +} // end namespace generator + +namespace functor { + +using generator::Interpolation; +using generator::Mode; +using generator::ProjectiveGenerator; + +template +struct FillProjectiveTransform { + typedef typename TTypes::Tensor OutputType; + typedef typename TTypes::ConstTensor InputType; + typedef typename TTypes::ConstTensor TransformsType; + const Interpolation interpolation; + + explicit FillProjectiveTransform(Interpolation interpolation) + : interpolation(interpolation) {} + + EIGEN_ALWAYS_INLINE + void operator()(const Device& device, OutputType* output, + const InputType& images, const TransformsType& transform, + const Mode fill_mode, const T fill_value) const { + switch (fill_mode) { + case Mode::FILL_REFLECT: + output->device(device) = + output->generate(ProjectiveGenerator( + images, transform, interpolation, fill_value)); + break; + case Mode::FILL_WRAP: + output->device(device) = + output->generate(ProjectiveGenerator( + images, transform, interpolation, fill_value)); + break; + case Mode::FILL_CONSTANT: + output->device(device) = output->generate( + ProjectiveGenerator( + images, transform, interpolation, fill_value)); + break; + case Mode::FILL_NEAREST: + output->device(device) = + output->generate(ProjectiveGenerator( + images, transform, interpolation, fill_value)); + break; + } + } +}; + +} // end namespace functor + +} // end namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_IMAGE_IMAGE_OPS_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/image/mirror_pad_op.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/image/mirror_pad_op.h new file mode 100644 index 0000000000000000000000000000000000000000..7c3df97855208c267ccaab38de00cb38055fdadd --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/image/mirror_pad_op.h @@ -0,0 +1,445 @@ +/* Copyright 2016 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_KERNELS_IMAGE_MIRROR_PAD_OP_H_ +#define TENSORFLOW_CORE_KERNELS_IMAGE_MIRROR_PAD_OP_H_ + +#include "unsupported/Eigen/CXX11/Tensor" // from @eigen_archive +#include "tensorflow/core/framework/tensor_types.h" +#include "tensorflow/core/platform/types.h" + +namespace Eigen { +template +class TensorMirrorPadOp; + +namespace internal { +template +struct traits> + : public traits { + typedef typename XprType::Scalar Scalar; + typedef traits XprTraits; + typedef typename XprTraits::StorageKind StorageKind; + typedef typename XprTraits::Index Index; + typedef typename XprType::Nested Nested; + typedef std::remove_reference_t _Nested; + static constexpr int NumDimensions = XprTraits::NumDimensions; + static constexpr int Layout = XprTraits::Layout; +}; + +template +struct eval, Eigen::Dense> { + typedef const TensorMirrorPadOp& type; +}; + +template +struct nested< + TensorMirrorPadOp, 1, + typename eval>::type> { + typedef TensorMirrorPadOp type; +}; +} // namespace internal + +template +class TensorMirrorPadOp + : public TensorBase, + ReadOnlyAccessors> { + public: + typedef typename Eigen::internal::traits::Scalar Scalar; + typedef typename Eigen::NumTraits::Real RealScalar; + typedef typename XprType::CoeffReturnType CoeffReturnType; + typedef typename Eigen::internal::nested::type Nested; + typedef typename Eigen::internal::traits::StorageKind + StorageKind; + typedef typename Eigen::internal::traits::Index Index; + + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorMirrorPadOp( + const XprType& expr, const PaddingDimensions& padding_dims, Index offset) + : xpr_(expr), padding_dims_(padding_dims), offset_(offset) {} + + EIGEN_DEVICE_FUNC + const PaddingDimensions& padding() const { return padding_dims_; } + + EIGEN_DEVICE_FUNC + Index offset() const { return offset_; } + + EIGEN_DEVICE_FUNC + const typename internal::remove_all::type& + expression() const { + return xpr_; + } + + protected: + typename XprType::Nested xpr_; + const PaddingDimensions padding_dims_; + const Index offset_; +}; + +// Eval as rvalue +template +struct TensorEvaluator, + Device> { + typedef TensorMirrorPadOp XprType; + typedef typename XprType::Index Index; + static constexpr int Dims = internal::array_size::value; + typedef DSizes Dimensions; + typedef typename XprType::Scalar Scalar; + typedef typename XprType::CoeffReturnType CoeffReturnType; + // Copied from Eigen3 Github version 0e806c1. + typedef typename PacketType::type PacketReturnType; + + enum { + IsAligned = false, + PacketAccess = TensorEvaluator::PacketAccess, + BlockAccess = false, + BlockAccessV2 = false, + PreferBlockAccess = false, + Layout = TensorEvaluator::Layout, + CoordAccess = true, + RawAccess = false + }; + + //===- Tensor block evaluation strategy (see TensorBlock.h) -------------===// + typedef internal::TensorBlockNotImplemented TensorBlock; + //===--------------------------------------------------------------------===// + + EIGEN_STRONG_INLINE TensorEvaluator(const XprType& op, const Device& device) + : impl_(op.expression(), device), padding_(op.padding()) { + EIGEN_STATIC_ASSERT(Dims > 0, YOU_MADE_A_PROGRAMMING_MISTAKE) + + // op.offset() == 0 if padding mode is symmetric. + // op.offset() == 1 if padding mode is reflect. + eigen_assert(op.offset() == 0 || op.offset() == 1); + left_offset_ = -1 + op.offset(); + right_offset_ = -1 - op.offset(); + + // This should trigger compilation error if padding dimensions and + // expression dimensions do not match. + dimensions_ = impl_.dimensions(); + for (int dim = 0; dim < Dims; ++dim) { + eigen_assert(padding_[dim].first + op.offset() <= dimensions_[dim]); + eigen_assert(padding_[dim].second + op.offset() <= dimensions_[dim]); + dimensions_[dim] += padding_[dim].first + padding_[dim].second; + } + + const auto& input_dims = impl_.dimensions(); + if (static_cast(Layout) == static_cast(ColMajor)) { + input_strides_[0] = 1; + output_strides_[0] = 1; + for (int i = 0; i < Dims - 1; ++i) { + input_strides_[i + 1] = input_strides_[i] * input_dims[i]; + output_strides_[i + 1] = output_strides_[i] * dimensions_[i]; + } + } else { + input_strides_[numext::maxi(0, Dims - 1)] = 1; + output_strides_[numext::maxi(0, Dims - 1)] = 1; + for (int i = Dims - 1; i > 0; --i) { + input_strides_[i - 1] = input_strides_[i] * input_dims[i]; + output_strides_[i - 1] = output_strides_[i] * dimensions_[i]; + } + } + } + + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Dimensions& dimensions() const { + return dimensions_; + } + + EIGEN_STRONG_INLINE bool evalSubExprsIfNeeded(Scalar*) { + impl_.evalSubExprsIfNeeded(nullptr); + return true; + } + + EIGEN_STRONG_INLINE void cleanup() { impl_.cleanup(); } + + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType + coeff(Index index) const { + eigen_assert(index < dimensions().TotalSize()); + const Index input_index = ToInputIndex(index); + return impl_.coeff(input_index); + } + + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType + coeff(array coords) const { + for (int dim = 0; dim < Dims; ++dim) { + coords[dim] = ToInputCoord(coords[dim], dim); + } + ReadInputHelper::CoordAccess> helper; + return helper(coords, input_strides_, impl_); + } + + template + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE PacketReturnType + packet(Index index) const { + constexpr int kPacketSize = + internal::unpacket_traits::size; + + EIGEN_STATIC_ASSERT(kPacketSize > 1, YOU_MADE_A_PROGRAMMING_MISTAKE) + eigen_assert(index + kPacketSize <= dimensions().TotalSize()); + + // Find the effective inner-most dimension where padding actually happens. + // NOTE: This is independent of index argument, and can be done in the + // constructor to save computation. However, if packet access does not + // happen, then moving to constructor will incur needless overhead. + int dim = -1; + if (static_cast(Layout) == static_cast(ColMajor)) { + for (int k = 0; k < Dims; ++k) { + if (padding_[k].first != 0 || padding_[k].second != 0) { + dim = k; + break; + } + } + } else { + for (int k = Dims - 1; k >= 0; --k) { + if (padding_[k].first != 0 || padding_[k].second != 0) { + dim = k; + break; + } + } + } + + const Index input_index = ToInputIndex(index); + + // If dim < 0, this means there is no padding at all. + if (dim < 0) { + return impl_.template packet(input_index); + } + + // Check if the way from the begin of the packet to the end of the packet + // is paved with contiguous road. That is, the indices must be between the + // padded region in the effective inner-most dimension. + const Index left = padding_[dim].first * output_strides_[dim]; + const Index right = + (dimensions_[dim] - padding_[dim].second) * output_strides_[dim]; + + const Index index_mod = index % (dimensions_[dim] * output_strides_[dim]); + if (left <= index_mod && (index_mod + kPacketSize - 1) < right) { + return impl_.template packet(input_index); + } + + // If the road is not contiguous, then fall back to coeff(). + EIGEN_ALIGN_MAX std::remove_const_t values[kPacketSize]; + values[0] = impl_.coeff(input_index); + for (int i = 1; i < kPacketSize; ++i) { + values[i] = coeff(index + i); + } + PacketReturnType result = internal::pload(values); + return result; + } + + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorOpCost + costPerCoeff(bool vectorized) const { + constexpr int kPacketSize = + internal::unpacket_traits::size; + + const double compute_cost = Dims * (7 * TensorOpCost::AddCost() + + 2 * TensorOpCost::MulCost() + + TensorOpCost::DivCost()); + return impl_.costPerCoeff(vectorized) + + TensorOpCost(1, 0, compute_cost, vectorized, kPacketSize); + } + + EIGEN_DEVICE_FUNC Scalar* data() const { return nullptr; } + + protected: + using Coords = array; + + // Full template specialization is not allowed within non-fully specialized + // template class. Adding a dummy parameter to make specializations partial. + template + struct ReadInputHelper; + + template + struct ReadInputHelper { + template + EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE Index + operator()(const Coords& coord, const Coords& strides, const Eval& eval) { + Index index = 0; + for (int k = 0; k < Dims; ++k) { + index += coord[k] * strides[k]; + } + return eval.coeff(index); + } + }; + + template + struct ReadInputHelper { + template + EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE Index + operator()(const Coords& coord, const Coords& strides, const Eval& eval) { + return eval.coeff(coord); + } + }; + + EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE Index ToInputCoord(Index k, + int dim) const { + const Index m = impl_.dimensions()[dim]; + k -= padding_[dim].first; + if (k < 0) { + return -k + left_offset_; + } + if (k < m) { + return k; + } + return m - (k - m) + right_offset_; + } + + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index + ToInputIndex(const Coords& coords) const { + Index input_index = 0; + for (int dim = 0; dim < Dims; ++dim) { + input_index += ToInputCoord(coords[dim], dim) * input_strides_[dim]; + } + return input_index; + } + + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index ToInputIndex(Index index) const { + Index input_index = 0; + if (static_cast(Layout) == static_cast(ColMajor)) { + for (int dim = Dims - 1; dim > 0; --dim) { + const Index k = index / output_strides_[dim]; + index -= k * output_strides_[dim]; + input_index += ToInputCoord(k, dim) * input_strides_[dim]; + } + input_index += ToInputCoord(index, 0); + } else { + for (int dim = 0; dim < Dims - 1; ++dim) { + const Index k = index / output_strides_[dim]; + index -= k * output_strides_[dim]; + input_index += ToInputCoord(k, dim) * input_strides_[dim]; + } + input_index += ToInputCoord(index, Dims - 1); + } + + return input_index; + } + + TensorEvaluator impl_; + PaddingDimensions padding_; + Dimensions dimensions_; + array input_strides_; + array output_strides_; + + Index left_offset_; + Index right_offset_; +}; +} // namespace Eigen + +namespace tensorflow { +namespace functor { + +// offset argument must be either 0 or 1. This controls whether the boundary +// values are replicated (offset == 0) or not replicated (offset == 1). +template +struct MirrorPad { + void operator()(const Device& device, + typename TTypes::Tensor output, + typename TTypes::ConstTensor input, + typename TTypes::ConstMatrix padding, int offset) { + Eigen::array, Dims> padding_dims; + + for (int i = 0; i < Dims; ++i) { + padding_dims[i] = Eigen::IndexPair(padding(i, 0), padding(i, 1)); + } + + output.device(device) = MirrorPadOp(input, padding_dims, offset); + } + + template + static const Eigen::TensorMirrorPadOp + MirrorPadOp( + const Eigen::TensorBase& tensor, + const PaddingDimensions& padding, int offset) { + return Eigen::TensorMirrorPadOp( + static_cast(tensor), padding, offset); + } +}; + +// offset argument must be either 0 or 1. This controls whether the boundary +// values are replicated (offset == 0) or not replicated (offset == 1). +template +struct MirrorPadGrad { + void operator()(const Device& device, + typename TTypes::Tensor output, + typename TTypes::ConstTensor input, + typename TTypes::ConstMatrix paddings, int offset, + typename TTypes::Tensor scratch) { + // Copy the gradient input into the scratch buffer. + scratch.device(device) = input; + + Eigen::array lhs_offsets; + Eigen::array rhs_offsets; + Eigen::array extents; + Eigen::array reverses; + + for (int i = 0; i < Dims; ++i) { + lhs_offsets[i] = 0; + rhs_offsets[i] = 0; + extents[i] = scratch.dimension(i); + reverses[i] = false; + } + + // At this point, the central part (non-padded area) does not include the + // gradients back-propagated through padded areas. Those gradient components + // need be added to the central part. + // + // Note that a gradient input element falls into a padded area iff in at + // least one dimension i, the coordinate x(i) is in the range (python-style) + // [:paddings(i,0)] or [-paddings(i,1):]. + + for (int i = 0; i < Dims; ++i) { + reverses[i] = true; + + // This handles the case when coordinate in dimension i is in the range + // [:paddings(i,0)]. This portion is added to the range + // [paddings(i,0) + offset:2 * paddings(i,0) + offset]. + if (paddings(i, 0) > 0) { + rhs_offsets[i] = 0; + lhs_offsets[i] = paddings(i, 0) + offset; + extents[i] = paddings(i, 0); + + scratch.slice(lhs_offsets, extents).device(device) += + scratch.slice(rhs_offsets, extents).reverse(reverses); + } + + // This handles the case when coordinate in dimension i is in the range + // [-paddings(i,1):]. This portion is added to the range + // [-2 * paddings(i,1) - offset:-paddings(i,1) - offset]. + if (paddings(i, 1) > 0) { + rhs_offsets[i] = scratch.dimension(i) - paddings(i, 1); + lhs_offsets[i] = rhs_offsets[i] - paddings(i, 1) - offset; + extents[i] = paddings(i, 1); + + scratch.slice(lhs_offsets, extents).device(device) += + scratch.slice(rhs_offsets, extents).reverse(reverses); + } + + reverses[i] = false; + lhs_offsets[i] = paddings(i, 0); + rhs_offsets[i] = paddings(i, 0); + extents[i] = output.dimension(i); + + // At this point, scratch buffer contains gradient input as if paddings + // for dimension k = 0,...,i are zeros. Therefore after the loop + // termination, the central part of the scratch buffer contains the folded + // gradients. + } + + // Copy the central part of the scratch buffer to the output. + output.device(device) = scratch.slice(rhs_offsets, extents); + } +}; +} // namespace functor +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_IMAGE_MIRROR_PAD_OP_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/image/mirror_pad_op_cpu_impl.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/image/mirror_pad_op_cpu_impl.h new file mode 100644 index 0000000000000000000000000000000000000000..b138ae0c9a455834069e2513615938bc9ba81770 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/image/mirror_pad_op_cpu_impl.h @@ -0,0 +1,47 @@ +/* Copyright 2016 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_KERNELS_IMAGE_MIRROR_PAD_OP_CPU_IMPL_H_ +#define TENSORFLOW_CORE_KERNELS_IMAGE_MIRROR_PAD_OP_CPU_IMPL_H_ + +#if CPU_PROVIDED_IXDIM +#define EIGEN_USE_THREADS + +#include "tensorflow/core/framework/register_types.h" +#include "tensorflow/core/kernels/image/mirror_pad_op.h" + +namespace tensorflow { + +using CpuDevice = Eigen::ThreadPoolDevice; + +#define DEFINE_CPU_SPECS(T) \ + template struct functor::MirrorPad; \ + template struct functor::MirrorPad; +TF_CALL_POD_TYPES(DEFINE_CPU_SPECS); +TF_CALL_QUANTIZED_TYPES(DEFINE_CPU_SPECS); +TF_CALL_tstring(DEFINE_CPU_SPECS); +#undef DEFINE_CPU_SPECS + +#define DEFINE_CPU_SPECS(T) \ + template struct functor::MirrorPadGrad; \ + template struct functor::MirrorPadGrad; +TF_CALL_NUMBER_TYPES(DEFINE_CPU_SPECS); +#undef DEFINE_CPU_SPECS +} // namespace tensorflow + +#endif // CPU_PROVIDED_IXDIM +#endif // TENSORFLOW_CORE_KERNELS_IMAGE_MIRROR_PAD_OP_CPU_IMPL_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/image/non_max_suppression_op.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/image/non_max_suppression_op.h new file mode 100644 index 0000000000000000000000000000000000000000..04828b0706cc624c5a3b20eef3645f9af75621be --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/image/non_max_suppression_op.h @@ -0,0 +1,50 @@ +/* Copyright 2016 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_KERNELS_IMAGE_NON_MAX_SUPPRESSION_OP_H_ +#define TENSORFLOW_CORE_KERNELS_IMAGE_NON_MAX_SUPPRESSION_OP_H_ + +#include "unsupported/Eigen/CXX11/Tensor" // from @eigen_archive +#include "tensorflow/core/framework/numeric_types.h" +#include "tensorflow/core/framework/op_kernel.h" +#include "tensorflow/core/framework/tensor_types.h" + +namespace tensorflow { + +#if GOOGLE_CUDA || TENSORFLOW_USE_ROCM +extern const int kNmsBoxesPerTread; + +// Given descending sorted box list, apply non-maximal-suppression with given +// threshold and select boxes to keep. +// - d_sorted_boxes_float_ptr: a pointer to device memory float array +// containing the box corners for N boxes sorted in descending order of +// scores. +// - num_boxes: number of boxes. +// - iou_threshold: the intersection-over-union (iou) threshold for elimination. +// - d_selected_indices: is a device pointer to int array containing sorted +// indices of the boxes to keep. +// - h_num_boxes_to_keep: is a host pointer for returning number of items +// to keep. +// - flip_boxes: flag reorders the boxes use lower left and upper right +// corners if they are given in mixed format. +Status NmsGpu(const float* d_sorted_boxes_float_ptr, const int num_boxes, + const float iou_threshold, int* d_selected_indices, + int* h_num_boxes_to_keep, OpKernelContext* context, + const int max_boxes, bool flip_boxes = false); +#endif + +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_IMAGE_NON_MAX_SUPPRESSION_OP_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/image/resize_bilinear_op.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/image/resize_bilinear_op.h new file mode 100644 index 0000000000000000000000000000000000000000..1a304c2ce398c624fef3d3f8977742b0e7012361 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/image/resize_bilinear_op.h @@ -0,0 +1,46 @@ +/* Copyright 2016 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_KERNELS_IMAGE_RESIZE_BILINEAR_OP_H_ +#define TENSORFLOW_CORE_KERNELS_IMAGE_RESIZE_BILINEAR_OP_H_ + +#include "unsupported/Eigen/CXX11/Tensor" // from @eigen_archive +#include "tensorflow/core/framework/numeric_types.h" +#include "tensorflow/core/framework/tensor_types.h" + +namespace tensorflow { +namespace functor { + +template +struct ResizeBilinear { + void operator()(const Device& d, typename TTypes::ConstTensor images, + const float height_scale, const float width_scale, + const bool half_pixel_centers, + typename TTypes::Tensor resized_images); +}; + +template +struct ResizeBilinearGrad { + void operator()(const Device& d, + typename TTypes::ConstTensor input_grad, + const float height_scale, const float width_scale, + const bool half_pixel_centers, + typename TTypes::Tensor output_grad); +}; + +} // namespace functor +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_IMAGE_RESIZE_BILINEAR_OP_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/image/resize_nearest_neighbor_op.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/image/resize_nearest_neighbor_op.h new file mode 100644 index 0000000000000000000000000000000000000000..e6797dfbadc1532a672f2c18071dd099f63efa21 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/image/resize_nearest_neighbor_op.h @@ -0,0 +1,45 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_KERNELS_IMAGE_RESIZE_NEAREST_NEIGHBOR_OP_H_ +#define TENSORFLOW_CORE_KERNELS_IMAGE_RESIZE_NEAREST_NEIGHBOR_OP_H_ + +#include "tensorflow/core/framework/tensor_types.h" +#include "tensorflow/core/platform/types.h" + +namespace tensorflow { +namespace functor { + +template +struct ResizeNearestNeighbor { + bool operator()(const Device& d, typename TTypes::ConstTensor input, + const float height_scale, const float width_scale, + typename TTypes::Tensor output); +}; + +template +struct ResizeNearestNeighborGrad { + bool operator()(const Device& d, + typename TTypes::ConstTensor input_grad, + const float height_scale, const float width_scale, + typename TTypes::Tensor output_grad); +}; + +} // namespace functor +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_IMAGE_RESIZE_NEAREST_NEIGHBOR_OP_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/image/sampling_kernels.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/image/sampling_kernels.h new file mode 100644 index 0000000000000000000000000000000000000000..1903e675038b86384cb82c63b63d2ceed6c4461a --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/image/sampling_kernels.h @@ -0,0 +1,192 @@ +/* Copyright 2016 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_KERNELS_IMAGE_SAMPLING_KERNELS_H_ +#define TENSORFLOW_CORE_KERNELS_IMAGE_SAMPLING_KERNELS_H_ + +#include + +#include "tensorflow/core/lib/core/stringpiece.h" + +namespace tensorflow { +namespace functor { +// Defines functions for different types of sampling kernels. +enum SamplingKernelType { + // Lanczos kernel with radius 1. Aliases but does not ring. + Lanczos1Kernel, + + // Lanczos kernel with radius 3. High-quality practical filter but may have + // some ringing especially on synthetic images. + Lanczos3Kernel, + + // Lanczos kernel with radius 5. Very-high-quality filter but may have + // stronger ringing. + Lanczos5Kernel, + + // Gaussian kernel with radius 3, sigma = 1.5 / 3. Less commonly used. + GaussianKernel, + + // Rectangle function. Equivalent to "nearest" sampling when upscaling. + // Has value 1 in interval (-0.5, 0.5), value 0.5 on edge, and 0 elsewhere. + BoxKernel, + + // Hat/tent function with radius 1. Equivalent to "bilinear" reconstruction + // when upsampling. + // Has value zero at -1.0 and 1.0. + TriangleKernel, + + // Cubic interpolant of Keys. Equivalent to Catmull-Rom kernel. Reasonably + // good quality and faster than Lanczos3Kernel. + KeysCubicKernel, + + // Cubic non-interpolating scheme. For synthetic images (especially those + // lacking proper prefiltering), less ringing than Keys cubic kernel but less + // sharp. + MitchellCubicKernel, + + // Always insert new kernel types before this. + SamplingKernelTypeEnd +}; + +// Converts a string into the corresponding kernel type. +// Returns SamplingKernelTypeEnd if the string couldn't be converted. +SamplingKernelType SamplingKernelTypeFromString(const StringPiece str); + +// A function object for a Lanczos kernel. +struct LanczosKernelFunc { + // Pass 1 for Lanczos1 kernel, 3 for Lanczos3 etc. + explicit LanczosKernelFunc(float _radius) : radius(_radius) {} + float operator()(float x) const { + constexpr float kPI = 3.14159265359; + x = std::abs(x); + if (x > radius) return 0.0; + // Need to special case the limit case of sin(x) / x when x is zero. + if (x <= 1e-3) { + return 1.0; + } + return radius * std::sin(kPI * x) * std::sin(kPI * x / radius) / + (kPI * kPI * x * x); + } + float Radius() const { return radius; } + const float radius; +}; + +struct GaussianKernelFunc { + static constexpr float kRadiusMultiplier = 3.0f; + // https://en.wikipedia.org/wiki/Gaussian_function + // We use sigma = 0.5, as suggested on p. 4 of Ken Turkowski's "Filters + // for Common Resampling Tasks" for kernels with a support of 3 pixels: + // www.realitypixels.com/turk/computergraphics/ResamplingFilters.pdf + // This implies a radius of 1.5, + explicit GaussianKernelFunc(float _radius = 1.5f) + : radius(_radius), sigma(_radius / kRadiusMultiplier) {} + float operator()(float x) const { + x = std::abs(x); + if (x >= radius) return 0.0; + return std::exp(-x * x / (2.0 * sigma * sigma)); + } + float Radius() const { return radius; } + const float radius; + const float sigma; // Gaussian standard deviation +}; + +struct BoxKernelFunc { + float operator()(float x) const { + x = std::abs(x); + return x < 0.5f ? 1. : x == 0.5f ? 0.5f : 0.0f; + } + float Radius() const { return 1.f; } +}; + +struct TriangleKernelFunc { + // https://en.wikipedia.org/wiki/Triangle_function + float operator()(float x) const { + x = std::abs(x); + return x < 1.0f ? 1.0f - x : 0.0f; + } + float Radius() const { return 1.f; } +}; + +struct KeysCubicKernelFunc { + // http://ieeexplore.ieee.org/document/1163711/ + // R. G. Keys. Cubic convolution interpolation for digital image + // processing. IEEE Transactions on Acoustics, Speech, and Signal + // Processing, 29(6):1153–1160, 1981. + float operator()(float x) const { + x = std::abs(x); + if (x >= 2.0f) { + return 0.0f; + } else if (x >= 1.0f) { + return ((-0.5f * x + 2.5f) * x - 4.0f) * x + 2.0f; + } else { + return ((1.5f * x - 2.5f) * x) * x + 1.0f; + } + } + float Radius() const { return 2.f; } +}; + +struct MitchellCubicKernelFunc { + // https://doi.org/10.1145/378456.378514 + // D. P. Mitchell and A. N. Netravali. Reconstruction filters in computer + // graphics. Computer Graphics (Proceedings of ACM SIGGRAPH 1988), + // 22(4):221–228, 1988. + float operator()(float x) const { + x = std::abs(x); + if (x >= 2.0f) { + return 0.0f; + } else if (x >= 1.0f) { + return (((-7.0f / 18.0f) * x + 2.0f) * x - 10.0f / 3.0f) * x + + 16.0f / 9.0f; + } else { + return (((7.0f / 6.0f) * x - 2.0f) * x) * x + 8.0f / 9.0f; + } + } + float Radius() const { return 2.f; } +}; + +inline LanczosKernelFunc CreateLanczos1Kernel() { + return LanczosKernelFunc(1.0); +} + +inline LanczosKernelFunc CreateLanczos3Kernel() { + return LanczosKernelFunc(3.0); +} + +inline LanczosKernelFunc CreateLanczos5Kernel() { + return LanczosKernelFunc(5.0); +} + +inline GaussianKernelFunc CreateGaussianKernel() { + return GaussianKernelFunc(1.5); +} + +inline BoxKernelFunc CreateBoxKernel() { return BoxKernelFunc(); } + +inline TriangleKernelFunc CreateTriangleKernel() { + return TriangleKernelFunc(); +} + +inline KeysCubicKernelFunc CreateKeysCubicKernel() { + return KeysCubicKernelFunc(); +} + +inline MitchellCubicKernelFunc CreateMitchellCubicKernel() { + return MitchellCubicKernelFunc(); +} + +} // namespace functor +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_IMAGE_SAMPLING_KERNELS_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/image/scale_and_translate_op.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/image/scale_and_translate_op.h new file mode 100644 index 0000000000000000000000000000000000000000..cd3f37ef886a09f0ebf6ba8187be875039f6b7a4 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/image/scale_and_translate_op.h @@ -0,0 +1,75 @@ +/* Copyright 2016 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_KERNELS_IMAGE_SCALE_AND_TRANSLATE_OP_H_ +#define TENSORFLOW_CORE_KERNELS_IMAGE_SCALE_AND_TRANSLATE_OP_H_ + +#include "unsupported/Eigen/CXX11/Tensor" // from @eigen_archive +#include "tensorflow/core/framework/numeric_types.h" +#include "tensorflow/core/framework/tensor.h" +#include "tensorflow/core/framework/tensor_types.h" +#include "tensorflow/core/kernels/image/sampling_kernels.h" + +namespace tensorflow { +namespace functor { + +// The scale and translate op works by scaling and translating the row and +// column dimensions separately. +// When scaling and translating the rows the set of input pixels and kernel +// weights used to compute a given output pixel within a row is constant across +// rows and can thus be precomputed and reused for every row. Similarly for the +// columns. This precomputed data structure is called a 'span'. + +// To compute the gradient we use the spans computed on the forward pass and +// essentially reverse them: we record for each input pixel which output +// pixels it contributes to. This means that the forward and backward passes +// use the same core algorithm, only the spans are computed differently. + +// A pre-computed span of pixels along a single dimension. +// The output pixel will be the weighted sum of pixels starting from start. +struct Spans { + // The maximum span size of any output pixel. + int span_size; + // int32 tensor of size [output_dim]. + Tensor starts; + // float tensor of size [output_dim, span_size]. + // The output pixel at x is computed as: + // dot_product(input[starts[x]:starts[x]+span_size], weights[x]). + Tensor weights; +}; + +// Gather spans in both dimensions. +// row_span_size, row_starts and row_weights correspond to the variables in +// the row Spans data structure, similarly for col_span_size etc. +// intermediate_buffer is a Tensor used to store the result of the +// resize in the column dimension and is of size: +// [batch_size, input_height, output_width, channels] +template +struct GatherSpans { + void operator()(const Device& d, int row_span_size, + typename TTypes::ConstTensor row_starts, + typename TTypes::ConstTensor row_weights, + int col_span_size, + typename TTypes::ConstTensor col_starts, + typename TTypes::ConstTensor col_weights, + typename TTypes::ConstTensor input_images, + typename TTypes::Tensor intermediate_buffer, + typename TTypes::Tensor output_images); +}; + +} // namespace functor +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_IMAGE_SCALE_AND_TRANSLATE_OP_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/linalg/determinant_op.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/linalg/determinant_op.h new file mode 100644 index 0000000000000000000000000000000000000000..6ace1bef44b250e5b90999596bd4fb964fce976f --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/linalg/determinant_op.h @@ -0,0 +1,47 @@ +/* Copyright 2017 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_KERNELS_LINALG_DETERMINANT_OP_H_ +#define TENSORFLOW_CORE_KERNELS_LINALG_DETERMINANT_OP_H_ + +#include "tensorflow/core/framework/tensor_types.h" + +namespace tensorflow { +namespace functor { + +// Helper functor to compute Determinant from a partially pivoted LU +// factorization. +template +struct DeterminantFromPivotedLUFunctor { + void operator()(const Device& device, + typename TTypes::ConstTensor lu_factor, + const int* pivots, typename TTypes::Tensor output, + int* info); +}; + +// Helper functor to compute sign and log of the absolute value of the +// determinant from a partially pivoted LU factorization. +template +struct LogDeterminantFromPivotedLUFunctor { + void operator()(const Device& device, + typename TTypes::ConstTensor lu_factor, + const int* pivots, typename TTypes::Tensor sign, + typename TTypes::Tensor log_abs_det); +}; + +} // namespace functor +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_LINALG_DETERMINANT_OP_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/linalg/eig_op_impl.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/linalg/eig_op_impl.h new file mode 100644 index 0000000000000000000000000000000000000000..220e6db55a6bb80dced9f7a0926f7f1e720b57b0 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/linalg/eig_op_impl.h @@ -0,0 +1,100 @@ +/* Copyright 2019 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_KERNELS_LINALG_EIG_OP_IMPL_H_ +#define TENSORFLOW_CORE_KERNELS_LINALG_EIG_OP_IMPL_H_ + +// See docs in ../ops/linalg_ops.cc. + +#include "Eigen/Core" // from @eigen_archive +#include "Eigen/Eigenvalues" // from @eigen_archive +#include "tensorflow/core/framework/kernel_def_builder.h" +#include "tensorflow/core/framework/op_kernel.h" +#include "tensorflow/core/framework/tensor_shape.h" +#include "tensorflow/core/kernels/linalg/linalg_ops_common.h" +#include "tensorflow/core/lib/core/errors.h" +#include "tensorflow/core/platform/denormal.h" +#include "tensorflow/core/platform/logging.h" +#include "tensorflow/core/platform/types.h" + +namespace tensorflow { + +template +class EigOp : public LinearAlgebraOp { + public: + typedef LinearAlgebraOp Base; + + explicit EigOp(OpKernelConstruction* context) : Base(context) { + OP_REQUIRES_OK(context, context->GetAttr("compute_v", &compute_v_)); + } + + using TensorShapes = typename Base::TensorShapes; + using InputMatrix = typename Base::InputMatrix; + using InputMatrixMaps = typename Base::InputMatrixMaps; + using InputConstMatrixMap = typename Base::InputConstMatrixMap; + using InputConstMatrixMaps = typename Base::InputConstMatrixMaps; + + using OutputMatrix = typename Base::OutputMatrix; + using OutputMatrixMaps = typename Base::OutputMatrixMaps; + using OutputConstMatrixMap = typename Base::OutputConstMatrixMap; + using OutputConstMatrixMaps = typename Base::OutputConstMatrixMaps; + + TensorShapes GetOutputMatrixShapes( + const TensorShapes& input_matrix_shapes) const final { + int64_t n = input_matrix_shapes[0].dim_size(0); + if (compute_v_) { + return TensorShapes({TensorShape({n}), TensorShape({n, n})}); + } else { + return TensorShapes({TensorShape({n})}); + } + } + + void ComputeMatrix(OpKernelContext* context, + const InputConstMatrixMaps& inputs, + OutputMatrixMaps* outputs) final { + const int64_t rows = inputs[0].rows(); + if (rows == 0) { + // If X is an empty matrix (0 rows, 0 col), X * X' == X. + // Therefore, we return X. + return; + } + + // This algorithm relies on denormals, so switch them back on locally. + port::ScopedDontFlushDenormal dont_flush_denormals; + + using EigenSolver = + std::conditional_t::IsComplex, + Eigen::ComplexEigenSolver, + Eigen::EigenSolver>; + EigenSolver eig(inputs[0], /*computeEigenvectors=*/compute_v_); + + OP_REQUIRES( + context, eig.info() == Eigen::Success, + errors::InvalidArgument("Eigen decomposition was not " + "successful. The input might not be valid.")); + + outputs->at(0) = eig.eigenvalues().template cast(); + if (compute_v_) { + outputs->at(1) = eig.eigenvectors(); + } + } + + private: + bool compute_v_; +}; + +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_LINALG_EIG_OP_IMPL_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/linalg/einsum_op.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/linalg/einsum_op.h new file mode 100644 index 0000000000000000000000000000000000000000..26daed1eec80de30ba2b01a7fca1e90177fc2c95 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/linalg/einsum_op.h @@ -0,0 +1,48 @@ +/* Copyright 2019 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ +#ifndef TENSORFLOW_CORE_KERNELS_LINALG_EINSUM_OP_H_ +#define TENSORFLOW_CORE_KERNELS_LINALG_EINSUM_OP_H_ + +#include "unsupported/Eigen/CXX11/Tensor" // from @eigen_archive +#include "tensorflow/core/framework/tensor_types.h" + +#if GOOGLE_CUDA || TENSORFLOW_USE_ROCM +#define EIGEN_USE_GPU +#endif // GOOGLE_CUDA || TENSORFLOW_USE_ROCM + +namespace tensorflow { +namespace functor { + +template +struct StrideFunctor { + void operator()(const Device& d, typename TTypes::ConstTensor input, + const Eigen::DSizes& strides, + typename TTypes::Tensor output) { + output.device(d) = input.stride(strides); + } +}; + +template +struct InflateFunctor { + void operator()(const Device& d, typename TTypes::ConstTensor input, + const Eigen::DSizes& strides, + typename TTypes::Tensor output) { + output.device(d) = input.inflate(strides); + } +}; +} // namespace functor +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_EINSUM_OP_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/linalg/einsum_op_impl.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/linalg/einsum_op_impl.h new file mode 100644 index 0000000000000000000000000000000000000000..99c130639332507b3faa473182ef1e351ad6f6e8 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/linalg/einsum_op_impl.h @@ -0,0 +1,670 @@ +/* Copyright 2019 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_KERNELS_LINALG_EINSUM_OP_IMPL_H_ +#define TENSORFLOW_CORE_KERNELS_LINALG_EINSUM_OP_IMPL_H_ + +#define EIGEN_USE_THREADS +#if GOOGLE_CUDA || TENSORFLOW_USE_ROCM +#define EIGEN_USE_GPU +#endif // GOOGLE_CUDA || TENSORFLOW_USE_ROCM + +#include "absl/container/flat_hash_map.h" +#include "absl/strings/str_split.h" +#include "unsupported/Eigen/CXX11/Tensor" // from @eigen_archive +#include "tensorflow/core/framework/kernel_def_builder.h" +#include "tensorflow/core/framework/op_kernel.h" +#include "tensorflow/core/framework/register_types.h" +#include "tensorflow/core/framework/tensor.h" +#include "tensorflow/core/framework/tensor_shape.h" +#include "tensorflow/core/framework/tensor_types.h" +#include "tensorflow/core/kernels/fill_functor.h" +#include "tensorflow/core/kernels/linalg/einsum_op.h" +#include "tensorflow/core/kernels/matmul_op_impl.h" +#include "tensorflow/core/kernels/reduction_ops_common.h" +#include "tensorflow/core/kernels/transpose_functor.h" +#include "tensorflow/core/lib/core/errors.h" +#include "tensorflow/core/lib/core/status.h" +#include "tensorflow/core/lib/gtl/inlined_vector.h" +#include "tensorflow/core/lib/math/math_util.h" +#include "tensorflow/core/platform/types.h" +#include "tensorflow/core/profiler/lib/traceme.h" +#include "tensorflow/core/util/einsum_op_util.h" + +#if GOOGLE_CUDA || TENSORFLOW_USE_ROCM +#include "tensorflow/core/kernels/reduction_ops_common_gpu.h" +#endif // GOOGLE_CUDA || TENSORFLOW_USE_ROCM + +namespace tensorflow { + +using CPUDevice = Eigen::ThreadPoolDevice; +using GPUDevice = Eigen::GpuDevice; + +using ShapeVec = gtl::InlinedVector; +using Labels = gtl::InlinedVector; +using OperandLabels = gtl::InlinedVector; +using LabelCounts = gtl::InlinedVector; +using OperandLabelCounts = gtl::InlinedVector; +using LabelToDimSizes = gtl::InlinedVector; + +struct EinsumHelper { + // Insert new (unnamed) broadcasting labels at the location of ellipsis. + static void InsertBroadcastLabels(int num_bcast_dims, int num_named_labels, + int ellipsis_axis, Labels* labels, + LabelCounts* label_counts) { + labels->erase(labels->begin() + ellipsis_axis); + labels->insert(labels->begin() + ellipsis_axis, num_bcast_dims, 0); + std::iota(labels->begin() + ellipsis_axis, + labels->begin() + ellipsis_axis + num_bcast_dims, + num_named_labels); + // Increment label counts. Since these are new labels, the count is set + // to 1. + label_counts->resize(num_named_labels + num_bcast_dims, 1); + } + + // Record and validate the label to dimension mapping. Must be a named + // (non-broadcasting) label as broadcasting labels don't have a fixed + // dimension. + static Status RecordLabelToDimension(const int label, const int axis, + const Tensor& input, + LabelToDimSizes* label_to_dim_sizes) { + const int64_t input_dim = input.dim_size(axis); + // We know that label_to_dim_sizes has the size to accommodate named labels. + if (label_to_dim_sizes->at(label) != 0 && + label_to_dim_sizes->at(label) != input_dim) { + return errors::InvalidArgument( + "Expected dimension ", label_to_dim_sizes->at(label), " at axis ", + axis, " of the input shaped ", input.shape().DebugString(), + " but got dimension ", input_dim); + } + (*label_to_dim_sizes)[label] = input_dim; + return OkStatus(); + } + + // Validate input dimensions and populate unnamed labels and their label + // counts. + static Status ProcessDimensions( + const OpInputList& inputs, + const gtl::InlinedVector& input_has_ellipsis, + const bool output_has_ellipsis, OperandLabels* input_labels, + Labels* output_labels, std::vector* label_types, + OperandLabelCounts* input_label_counts, LabelCounts* output_label_counts, + LabelToDimSizes* label_to_dim_sizes) { + if (inputs.size() != input_labels->size()) { + return errors::InvalidArgument("Expected ", input_labels->size(), + " inputs but got: ", inputs.size()); + } + const int num_inputs = inputs.size(); + + // We infer the number of broadcasting dimensions by taking the maximum rank + // among the broadcasting subshapes of the input. + int max_bcast_dims = 0; + const int num_named_labels = label_types->size(); + label_to_dim_sizes->resize(num_named_labels); + for (int i = 0; i < num_inputs; ++i) { + Labels* labels = &(*input_labels)[i]; + + if (!input_has_ellipsis[i]) { + if (inputs[i].dims() != labels->size()) { + return errors::InvalidArgument("Expected input ", i, " to have rank ", + labels->size(), + " but got: ", inputs[i].dims()); + } + for (int label_idx = 0; label_idx < labels->size(); ++label_idx) { + const int label = (*labels)[label_idx]; + TF_RETURN_IF_ERROR(RecordLabelToDimension(label, label_idx, inputs[i], + label_to_dim_sizes)); + } + continue; + } + + // Input has an ellipsis. + if (inputs[i].dims() + 1 < labels->size()) { + return errors::InvalidArgument( + "Expected input ", i, " to have rank at least ", labels->size() - 1, + " but got: ", inputs[i].dims()); + } + int ellipsis_axis = -1; + const int num_bcast_dims = inputs[i].dims() - labels->size() + 1; + for (int label_idx = 0; label_idx < labels->size(); ++label_idx) { + const int label = (*labels)[label_idx]; + if (label == kEllipsisLabel) { + ellipsis_axis = label_idx; + continue; + } + // Current label is not an ellipsis. + const int axis = + label_idx + (ellipsis_axis == -1 ? 0 : num_bcast_dims - 1); + TF_RETURN_IF_ERROR( + RecordLabelToDimension(label, axis, inputs[i], label_to_dim_sizes)); + } + // Found an ellipsis. Replace 'kEllipsisLabel' with broadcasting + // dimensions. + if (ellipsis_axis != -1) { + InsertBroadcastLabels(num_bcast_dims, num_named_labels, ellipsis_axis, + labels, &input_label_counts->at(i)); + max_bcast_dims = std::max(max_bcast_dims, num_bcast_dims); + } + } + if (!absl::c_linear_search(input_has_ellipsis, true) && + !output_has_ellipsis) { + return OkStatus(); + } + // Insert broadcasting dimensions in the output labels. + auto it = + std::find(output_labels->begin(), output_labels->end(), kEllipsisLabel); + if (it != output_labels->end()) { + const int ellipsis_axis = it - output_labels->begin(); + InsertBroadcastLabels(max_bcast_dims, num_named_labels, ellipsis_axis, + output_labels, output_label_counts); + } else if (max_bcast_dims > 0) { + return errors::InvalidArgument( + "Output contains ", max_bcast_dims, + " broadcasting dimension(s) but no ellipsis " + "(...) was found in the output subscripts."); + } + // Populate EinsumDimensionType for the new broadcasting labels. + label_types->resize(num_named_labels + max_bcast_dims, + EinsumDimensionType::kBroadcasting); + return OkStatus(); + } + + // Permutes the labels according to the given permutation. + static void PermuteLabels(const std::vector& permutation, + Labels* labels) { + Labels permuted_labels(labels->size()); + for (int i = 0; i < labels->size(); ++i) { + permuted_labels[i] = (*labels)[permutation[i]]; + } + labels->swap(permuted_labels); + } + + // Returns a reshaped input Tensor. The underlying buffer is not copied. + static Status CopyFrom(const Tensor& input, const TensorShape& shape, + Tensor* output) { + if (output->CopyFrom(input, shape)) return OkStatus(); + return errors::Internal( + "Encountered error while reshaping a Tensor of shape ", + input.shape().DebugString(), " to shape ", shape.DebugString()); + } + + // Returns whether transposing would be a no-op; whether input has rank < 2 or + // the permutation is the identity permutation. + static bool ShouldTranspose(const TensorShape& input_shape, + const std::vector& permutation) { + if (input_shape.dims() < 2) return false; + for (int i = 0; i < permutation.size(); ++i) { + if (permutation[i] != i) return true; + } + return false; + } + + // Transpose the input given a permutation. Returns a reference to the input + // if transposing is not necessary. + template + static Status TransposeOperand(OpKernelContext* ctx, const Tensor& input, + const std::vector& permutation, + Tensor* output) { + if (!ShouldTranspose(input.shape(), permutation)) { + return CopyFrom(input, input.shape(), output); + } + TensorShape transposed_shape; + for (int i = 0; i < input.dims(); ++i) { + TF_RETURN_IF_ERROR( + transposed_shape.AddDimWithStatus(input.dim_size(permutation[i]))); + } + // For empty Tensors, just change the shape. E.g. we may need to transpose + // from shape [1, 0, 5] to [5, 1, 0]. + if (input.NumElements() == 0) { + return CopyFrom(input, transposed_shape, output); + } + TF_RETURN_IF_ERROR( + ctx->allocate_temp(DataTypeToEnum::value, transposed_shape, output)); + const Device& device = ctx->eigen_device(); + TF_RETURN_IF_ERROR(DoTranspose(device, input, permutation, output)); + return OkStatus(); + } + + // If there are repeated labels in either the input or output, then this + // strides the input (e.g. iii->i) or inflates it (e.g. i->iii), respectively. + template + static Status StrideOrInflate(OpKernelContext* ctx, const Tensor& input, + const Labels& labels, + const LabelCounts& label_counts, + const bool should_inflate, Tensor* output) { + // Return early if there are no repeated indices. + if (absl::c_all_of(label_counts, [](int c) { return c <= 1; })) { + return CopyFrom(input, input.shape(), output); + } + // We reshape so that each repeated label is compressed to one dimension. + // E.g. For iiij -> ij, The shape [3, 3, 3, 5] would be compressed to [27, + // 5]. Striding appropriately (in this case with strides 14 (=1+3+9) and 1) + // recovers the generalized diagonal of shape [3, 5]. + ShapeVec reshape; + ShapeVec strides; + // Strided and inflated shapes correspond to input and output shapes, + // respectively, should_inflate is true (vice-versa if should_inflate is + // false). E.g. they are [3, 5] and [3, 3, 3, 5] in the above example. + ShapeVec strided_shape; + ShapeVec inflated_shape; + for (int label : labels) { + const int count = label_counts[label]; + const int current_axis = + should_inflate ? strided_shape.size() : inflated_shape.size(); + const int64_t dim = input.dim_size(current_axis); + strided_shape.push_back(dim); + inflated_shape.insert(inflated_shape.end(), count, dim); + const int64_t reshape_dim = MathUtil::IPow(dim, count); + reshape.push_back(reshape_dim); + // While taking the d-diagonal in a rank k Tensor, we take d + // equally-spaced elements including the first and last element. Then, (k + // - 1) * stride = d^k - 1, or, stride = (d^k - 1)/(d - 1). + const int64_t stride = + (dim > 1 && count > 1) ? (reshape_dim - 1) / (dim - 1) : 1; + strides.push_back(stride); + } + + TensorShape output_shape = + TensorShape(should_inflate ? inflated_shape : strided_shape); + TF_RETURN_IF_ERROR( + ctx->allocate_temp(DataTypeToEnum::value, output_shape, output)); + const Device& device = ctx->eigen_device(); + switch (reshape.size()) { +#define NDIMS_CASE(N) \ + case N: { \ + if (should_inflate) { \ + auto output_map = output->shaped(reshape); \ + auto input_map = input.shaped(strided_shape); \ + functor::InflateFunctor()( \ + device, input_map, TensorShape(strides).AsEigenDSizes(), \ + output_map); \ + } else { \ + auto input_map = input.shaped(reshape); \ + auto output_map = output->shaped(strided_shape); \ + functor::StrideFunctor()( \ + device, input_map, TensorShape(strides).AsEigenDSizes(), \ + output_map); \ + } \ + } break; + NDIMS_CASE(1); + NDIMS_CASE(2); + NDIMS_CASE(3); + NDIMS_CASE(4); + NDIMS_CASE(5); + NDIMS_CASE(6); + default: + return errors::Unimplemented( + "Unsupported rank: ", reshape.size(), + " while handling repeated indices. Up to rank 6 is supported."); +#undef NDIMS_CASE + } + return OkStatus(); + } + + // Returns true if the input dimensions are already sorted in the order + // [batch, contract, free, reduce]. Used to implement an optimization to avoid + // an extra transpose and instead uses (adj_x and adj_y) in BatchMatMul. + static bool ShouldSwapFreeAndContract( + const Labels& labels, + const std::vector& label_types) { + // Check that ordering is according to dimension type, with the role of + // free and contract dimensions swapped. + gtl::InlinedVector remap = {0, 1, 3, 2, 4}; + for (int i = 0; i + 1 < labels.size(); ++i) { + const int dimtype_a = remap[label_types[labels[i]]]; + const int dimtype_b = remap[label_types[labels[i + 1]]]; + if (dimtype_a > dimtype_b || + (dimtype_a == dimtype_b && labels[i] > labels[i + 1])) { + return false; + } + } + return true; + } + + template + static Status ReduceOperand( + OpKernelContext* ctx, const Tensor& input, + const std::vector& label_types, + const LabelCounts& label_counts, Labels* labels, Labels* free_labels, + bool* swap_free_and_contract, Tensor* output) { + // Find the permutation to transpose the input dimensions in the order of + // EinsumDimensionType; i.e. batch, free, contract and reduce dimensions. + // This makes it more convenient to invoke Reduce/Contract operations. + std::vector permutation(input.dims()); + absl::c_iota(permutation, 0); + Tensor input_transposed; + // Check if we can avoid the transpose. We need to flip the adj_x (or adj_y) + // flag during BatchMatMul. This is an extra optimization not necessary for + // correctness. + if (ShouldSwapFreeAndContract(*labels, label_types)) { + *swap_free_and_contract = true; + } else { + absl::c_sort(permutation, [&](int i, int j) { + int label_i = (*labels)[i]; + int label_j = (*labels)[j]; + return std::tie(label_types[label_i], label_i) < + std::tie(label_types[label_j], label_j); + }); + } + // Transpose the input so that EinsumDimensionTypes are in order. + TF_RETURN_IF_ERROR(TransposeOperand(ctx, input, permutation, + &input_transposed)); + PermuteLabels(permutation, labels); + + // Take the generalized diagonal for dimensions with repeated axis labels. + Tensor input_deduped; + labels->erase(std::unique(labels->begin(), labels->end()), labels->end()); + TF_RETURN_IF_ERROR( + StrideOrInflate(ctx, input_transposed, *labels, label_counts, + false /* should_inflate */, &input_deduped)); + + // Reshape denotes the rank-5 shape [broadcast, batch, free, contract, + // reduce] where we've compacted the dimensions of each EinsumDimensionType. + gtl::InlinedVector reshape(5, 1); + // The output shape is [batch shape] + [free size, contract size] + // That is, the batch shape is preserved (for broadcasting while + // contracting) while the free dims and contract dims are compressed to one + // dimension each. + TensorShape output_shape; + for (int label_idx = 0; label_idx < labels->size(); ++label_idx) { + const int label = labels->at(label_idx); + int64_t dim = input_deduped.dim_size(label_idx); + if (label_types[label] == EinsumDimensionType::kBroadcasting || + label_types[label] == EinsumDimensionType::kBatch) { + TF_RETURN_IF_ERROR(output_shape.AddDimWithStatus(dim)); + } else if (label_types[label] == EinsumDimensionType::kFree) { + free_labels->push_back(label); + } + reshape[label_types[label]] *= dim; + } + if (*swap_free_and_contract) + std::swap(reshape[EinsumDimensionType::kFree], + reshape[EinsumDimensionType::kContract]); + TF_RETURN_IF_ERROR( + output_shape.AddDimWithStatus(reshape[EinsumDimensionType::kFree])); + TF_RETURN_IF_ERROR( + output_shape.AddDimWithStatus(reshape[EinsumDimensionType::kContract])); + + if (reshape[EinsumDimensionType::kReduce] == + 1) { // No need to actually reduce. + return CopyFrom(input_deduped, output_shape, output); + } + TF_RETURN_IF_ERROR( + ctx->allocate_temp(DataTypeToEnum::value, output_shape, output)); + using Reducer = Eigen::internal::SumReducer; + using Index = typename TTypes::Tensor::Index; + // Reduce along the last axis (i.e axis 1) of the rank-2 Tensor. + const int64_t output_size = reshape[kBroadcasting] * reshape[kBatch] * + reshape[kFree] * reshape[kContract]; + functor::ReduceFunctor::Reduce( + ctx, output->shaped({output_size}), + const_cast(input_deduped) + .shaped({output_size, reshape[kReduce]}), + Eigen::array({1}), Reducer()); + return OkStatus(); + } + + // Reshapes a Tensor of shape [b0,b1...bk,N,M] to [prod(b0,b1...bk),N,M]. + static Status ReshapeToRank3(const Tensor& input, int batch_size, + Tensor* output) { + const int rank = input.dims(); + TensorShape output_shape = {batch_size, input.dim_size(rank - 2), + input.dim_size(rank - 1)}; + return CopyFrom(input, output_shape, output); + } + + // Contracts the inputs along the last axis (or the second last if the + // corresponding value of swap_free_and_contract is true). The batch + // dimensions are broadcast to the output shape. + // TODO(anudhyan): BatchMatMul might devolve into a component-wise + // multiplication when the matrix shape is [1,1]; in this case BatchMatMul + // functor would be very inefficient. The functor should detect if this is the + // case and perform componentwise multiplication functor instead. + template + static Status ContractOperands(OpKernelContext* ctx, + absl::Span inputs, + absl::Span swap_free_and_contract, + Tensor* output) { + if (inputs.size() == 1) + return CopyFrom(inputs[0], inputs[0].shape(), output); + MatMulBCast bcast(inputs[0].shape().dim_sizes(), + inputs[1].shape().dim_sizes()); + if (!bcast.IsValid()) { + return errors::InvalidArgument( + "Invalid broadcasting dimensions: ", inputs[0].shape().DebugString(), + " vs. ", inputs[1].shape().DebugString()); + } + Tensor lhs; + TF_RETURN_IF_ERROR(ReshapeToRank3(inputs[0], bcast.x_batch_size(), &lhs)); + Tensor rhs; + TF_RETURN_IF_ERROR(ReshapeToRank3(inputs[1], bcast.y_batch_size(), &rhs)); + TensorShape output_shape = bcast.output_batch_shape(); + for (int i = 0; i < inputs.size(); ++i) { + const int64_t free_axis = + inputs[i].dims() - (swap_free_and_contract[i] ? 1 : 2); + TF_RETURN_IF_ERROR( + output_shape.AddDimWithStatus(inputs[i].dim_size(free_axis))); + } + bool trans_x = swap_free_and_contract[0]; + bool trans_y = !swap_free_and_contract[1]; + TF_RETURN_IF_ERROR( + ctx->allocate_temp(DataTypeToEnum::value, output_shape, output)); + if (lhs.NumElements() == 0 || rhs.NumElements() == 0) { + functor::SetZeroFunctor set_zero; + set_zero(ctx->eigen_device(), output->flat()); + return OkStatus(); + } + Tensor output_reshaped; + TF_RETURN_IF_ERROR( + ReshapeToRank3(*output, bcast.output_batch_size(), &output_reshaped)); + LaunchBatchMatMul::Launch(ctx, lhs, rhs, /*adj_x=*/false, + /*adj_y=*/false, trans_x, trans_y, + bcast, &output_reshaped); + return OkStatus(); + } +}; + +template +class EinsumOp : public OpKernel { + public: + explicit EinsumOp(OpKernelConstruction* c) : OpKernel(c) { + OP_REQUIRES_OK(c, c->GetAttr("equation", &equation_)); + OP_REQUIRES_OK( + c, ParseEinsumEquation(equation_, &input_labels_, &output_labels_, + &label_types_, &input_label_counts_, + &output_label_counts_, &input_has_ellipsis_, + &output_has_ellipsis_)); + } + + void Compute(OpKernelContext* ctx) override { + OpInputList inputs; + OP_REQUIRES_OK(ctx, ctx->input_list("inputs", &inputs)); + + OperandLabels input_labels(input_labels_); + Labels output_labels(output_labels_); + std::vector label_types(label_types_); + OperandLabelCounts input_label_counts(input_label_counts_); + LabelCounts output_label_counts(output_label_counts_); + LabelToDimSizes label_to_dim_sizes; + + OP_REQUIRES_OK(ctx, EinsumHelper::ProcessDimensions( + inputs, input_has_ellipsis_, output_has_ellipsis_, + &input_labels, &output_labels, &label_types, + &input_label_counts, &output_label_counts, + &label_to_dim_sizes)); + + // The reduction phase (a) sums across reduction dimensions, (b) takes + // generalized diagonals, and (c) reshapes it into shape + // [(broadcasting) batch shape] + [F,C] + // where F and C denote the total (compacted) size of free and contract + // dimensions, respectively. + const int num_inputs = inputs.size(); + OperandLabels free_labels(num_inputs); + gtl::InlinedVector inputs_reduced(num_inputs); + gtl::InlinedVector swap_free_and_contract(num_inputs); + for (int i = 0; i < num_inputs; ++i) { + OP_REQUIRES_OK(ctx, + EinsumHelper::ReduceOperand( + ctx, inputs[i], label_types, input_label_counts[i], + &input_labels[i], &free_labels[i], + &swap_free_and_contract[i], &inputs_reduced[i])); + } + + // After reduction, the inputs should be reshaped to Tensors suitable for + // contraction. If num_inputs is 1, the reduced input is simply forwarded to + // the output. + Tensor contraction_output_reshaped; + OP_REQUIRES_OK(ctx, EinsumHelper::ContractOperands( + ctx, inputs_reduced, swap_free_and_contract, + &contraction_output_reshaped)); + + // Copy the batch labels from the contraction output. Recover the batch + // shape, which may have been broadcasted. + TensorShape result_shape = contraction_output_reshaped.shape(); + result_shape.RemoveLastDims(2); + + int num_labels = label_types.size(); + Labels result_labels; + // All batch dimensions should be present in the contracted result. First + // the broadcasting dimensions, then the named batch dimensions. + for (int label = 0; label < num_labels; ++label) { + if (label_types[label] == EinsumDimensionType::kBroadcasting) + result_labels.push_back(label); + } + for (int label = 0; label < num_labels; ++label) { + if (label_types[label] == EinsumDimensionType::kBatch) + result_labels.push_back(label); + } + for (int i = 0; i < num_inputs; ++i) { + for (int label : free_labels[i]) { + result_labels.push_back(label); + OP_REQUIRES_OK( + ctx, result_shape.AddDimWithStatus(label_to_dim_sizes[label])); + } + } + + // Reshape the contraction (or reduction) result to its expanded shape: + // [(broadcasted) batch shape] + [free shape 0] + [free shape 1]. + Tensor contraction_output; + OP_REQUIRES_OK( + ctx, EinsumHelper::CopyFrom(contraction_output_reshaped, result_shape, + &contraction_output)); + + // Inflate the output if necessary. (E.g. for the equation 'i->iii' which + // may arise while computing gradient of a regular Einsum). + // TODO(anudhyan): It's possible that Eigen's contract and inflate can be + // chained here to avoid materializing an intermediate. + Tensor output_inflated; + OP_REQUIRES_OK( + ctx, EinsumHelper::StrideOrInflate( + ctx, contraction_output, result_labels, output_label_counts, + true /* should_inflate */, &output_inflated)); + if (output_inflated.dims() > contraction_output.dims()) { + // We inflated the output. Modify result labels accordingly. + Labels inflated_labels; + for (int label : result_labels) { + inflated_labels.insert(inflated_labels.end(), + output_label_counts[label], label); + } + result_labels.swap(inflated_labels); + } + // Find the permutation to map the result labels to the output labels. Note + // that both the result and the final output may have the repeated labels, + // in which case the permutation preserves the left-to-right ordering. + // E.g. if result labels are [0, 0, 1] and output is [0, l, 0] then the + // permutation should be [0, 2, 1]. We also use the fact that repeated + // labels in the result are adjacent to each other. + std::vector output_permutation(output_labels.size()); + std::vector label_to_position(num_labels, -1); + for (int i = 0; i < result_labels.size(); ++i) { + // Remember the position of only the leftmost result label. + if (label_to_position[result_labels[i]] == -1) { + label_to_position[result_labels[i]] = i; + } + } + for (int i = 0; i < output_labels.size(); ++i) { + output_permutation[i] = label_to_position[output_labels[i]]; + // We have found the leftmost occurrence. The next one would be adjacent. + label_to_position[output_labels[i]] += 1; + } + Tensor output; + OP_REQUIRES_OK(ctx, EinsumHelper::TransposeOperand( + ctx, output_inflated, output_permutation, &output)); + ctx->set_output(0, output); + } + + string TraceString(const OpKernelContext& ctx, bool verbose) const override { + string op = profiler::TraceMeOp(name_view(), type_string_view()); + string equation = strings::StrCat("(", equation_, ")"); + if (verbose) { + string shape = ShapeTraceString(ctx); + if (!shape.empty()) { + return profiler::TraceMeEncode( + std::move(op), {{"equation", equation}, {"shape", shape}}); + } + } + return profiler::TraceMeEncode(std::move(op), {{"equation", equation}}); + } + + private: + string equation_; + OperandLabels input_labels_; + Labels output_labels_; + std::vector label_types_; + OperandLabelCounts input_label_counts_; + LabelCounts output_label_counts_; + gtl::InlinedVector input_has_ellipsis_; + bool output_has_ellipsis_ = false; +}; + +#if GOOGLE_CUDA || TENSORFLOW_USE_ROCM +// Forward declarations of the functor specializations for GPU. +namespace functor { +#define DECLARE_GPU_SPEC(T, N) \ + template <> \ + void StrideFunctor::operator()( \ + const GPUDevice& d, typename TTypes::ConstTensor input, \ + const Eigen::DSizes& strides, \ + typename TTypes::Tensor output); \ + extern template struct StrideFunctor; \ + template <> \ + void InflateFunctor::operator()( \ + const GPUDevice& d, typename TTypes::ConstTensor input, \ + const Eigen::DSizes& strides, \ + typename TTypes::Tensor output); \ + extern template struct InflateFunctor; + +#define DECLARE_GPU_SPECS(T) \ + DECLARE_GPU_SPEC(T, 1); \ + DECLARE_GPU_SPEC(T, 2); \ + DECLARE_GPU_SPEC(T, 3); \ + DECLARE_GPU_SPEC(T, 4); \ + DECLARE_GPU_SPEC(T, 5); \ + DECLARE_GPU_SPEC(T, 6); + +TF_CALL_GPU_NUMBER_TYPES(DECLARE_GPU_SPECS); +// TODO(rocm): Enable once complex types are supported. +#if GOOGLE_CUDA +DECLARE_GPU_SPECS(complex64); +DECLARE_GPU_SPECS(complex128); +#endif +#undef DECLARE_GPU_SPEC +#undef DECLARE_GPU_SPECS +} // namespace functor +#endif // GOOGLE_CUDA || TENSORFLOW_USE_ROCM + +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_LINALG_EINSUM_OP_IMPL_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/linalg/eye_functor.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/linalg/eye_functor.h new file mode 100644 index 0000000000000000000000000000000000000000..c77372f089a8fdf4cd103af1558bfa6c5c850ef5 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/linalg/eye_functor.h @@ -0,0 +1,32 @@ +/* Copyright 2017 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ +#ifndef TENSORFLOW_CORE_KERNELS_LINALG_EYE_FUNCTOR_H_ +#define TENSORFLOW_CORE_KERNELS_LINALG_EYE_FUNCTOR_H_ + +#include "tensorflow/core/framework/tensor_types.h" + +namespace tensorflow { +namespace functor { + +template +struct EyeFunctor { + void operator()(const Device& device, + typename TTypes::Tensor matrix_batch); +}; + +} // namespace functor +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_EYE_FUNCTOR_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/linalg/linalg_ops_common.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/linalg/linalg_ops_common.h new file mode 100644 index 0000000000000000000000000000000000000000..d4d66bd4c8f8090cf72f9a7daa6e20469842e1c4 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/linalg/linalg_ops_common.h @@ -0,0 +1,223 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ +#ifndef TENSORFLOW_CORE_KERNELS_LINALG_LINALG_OPS_COMMON_H_ +#define TENSORFLOW_CORE_KERNELS_LINALG_LINALG_OPS_COMMON_H_ + +// Classes to support linear algebra functionality, similar to the numpy.linalg +// module. Supports batch computation on several matrices at once, sharding the +// computations across different threads if necessary. +#include + +#include "Eigen/Core" // from @eigen_archive +#include "tensorflow/core/framework/kernel_def_builder.h" +#include "tensorflow/core/framework/op_kernel.h" +#include "tensorflow/core/framework/tensor.h" +#include "tensorflow/core/framework/tensor_shape.h" +#include "tensorflow/core/framework/tensor_types.h" +#include "tensorflow/core/framework/types.h" +#include "tensorflow/core/lib/core/errors.h" +#include "tensorflow/core/lib/gtl/inlined_vector.h" +#include "tensorflow/core/platform/types.h" +#include "tensorflow/core/util/work_sharder.h" + +namespace tensorflow { + +// Base class for linear algebra operators. +template +class LinearAlgebraOp : public OpKernel { + public: + explicit LinearAlgebraOp(OpKernelConstruction* context) : OpKernel(context) {} + + void Compute(OpKernelContext* context) override; + + protected: + using TensorShapes = gtl::InlinedVector; + // Returns the number of leading inputs that are to be treated as matrix + // inputs. By default this is all the inputs. Derived classes can override + // this to tell the base class to ignore one or more trailing inputs. + virtual int NumMatrixInputs(const OpKernelContext* context) const { + return context->num_inputs(); + } + + // Returns true if the number of inputs and their shapes are as expected. + // Many ops take a single square input matrix, so we provide that as a default + // implementation for convenience. + virtual void ValidateInputMatrixShapes( + OpKernelContext* context, const TensorShapes& input_matrix_shapes) const { + ValidateSingleSquareMatrix(context, input_matrix_shapes); + } + + // Convenience validators for common cases: + // + // Validate op taking a single matrix A. + static void ValidateSingleMatrix(OpKernelContext* context, + const TensorShapes& input_matrix_shapes); + // Validate op taking a single square matrix A. + static void ValidateSingleSquareMatrix( + OpKernelContext* context, const TensorShapes& input_matrix_shapes); + // Validate op taking two matrices A and B that have the same number of rows. + static void ValidateSolver(OpKernelContext* context, + const TensorShapes& input_matrix_shapes); + // Validate op taking two matrices A and B that have the same number of rows + // and A is square. + static void ValidateSquareSolver(OpKernelContext* context, + const TensorShapes& input_matrix_shapes); + + // Returns the output shapes of each individual matrix operation. Output + // matrices shapes must be rank 0, 1, or 2. Scalar outputs are rank 0. + // + // The derived class may return a number of shapes (N) less than + // context->num_outputs() (M) to indicate that a only leading subset of + // the outputs will be populated. In this case, a dummy scalar tensor with + // value zero will be return for the last M-N outputs. + // + // For many ops, the output dimensions are the same as the input dimensions, + // so we provide that as a default implementation for convenience. + virtual TensorShapes GetOutputMatrixShapes( + const TensorShapes& input_matrix_shapes) const { + return input_matrix_shapes; + } + + // Returns the cost per matrix operation. This is used to determine the + // number of threads to use for parallelizing calls to ComputeMatrix in + // batch mode. Cost per unit is assumed to be roughly 1ns, based on comments + // in core/util/work_sharder.cc. Many linear algebra ops take roughly max(m,n) + // * min(m,n)^2, where the first input matrix is m-by-n. We provide that as a + // default implementation for convenience. + virtual int64_t GetCostPerUnit( + const TensorShapes& input_matrix_shapes) const { + double m = static_cast(input_matrix_shapes[0].dim_size(0)); + double n = static_cast(input_matrix_shapes[0].dim_size(1)); + double cost = std::max(m, n) * std::min(m, n) * std::min(m, n); + return cost >= static_cast(kint64max) ? kint64max + : static_cast(cost); + } + + // Returns true if it is safe to forward (alias) input to output buffer + // and expect the kernel to perform the computation inplace. + virtual bool EnableInputForwarding() const { return true; } + + using InputMatrix = Eigen::Matrix; + using InputConstMatrixMap = Eigen::Map; + using InputMatrixMap = Eigen::Map; + using InputConstVectorMap = + Eigen::Map>; + using InputConstMatrixMaps = gtl::InlinedVector; + using InputMatrixMaps = gtl::InlinedVector; + using InputRealScalar = typename Eigen::NumTraits::Real; + + using OutputMatrix = Eigen::Matrix; + using OutputConstMatrixMap = Eigen::Map; + using OutputMatrixMap = Eigen::Map; + using OutputConstVectorMap = + Eigen::Map>; + using OutputConstMatrixMaps = gtl::InlinedVector; + using OutputMatrixMaps = gtl::InlinedVector; + using OutputRealScalar = typename Eigen::NumTraits::Real; + + // backward compatibility + using Scalar = OutputScalar; + using Matrix = + Eigen::Matrix; + using ConstMatrixMap = Eigen::Map; + using MatrixMap = Eigen::Map; + using ConstVectorMap = + Eigen::Map>; + using ConstMatrixMaps = gtl::InlinedVector; + using MatrixMaps = gtl::InlinedVector; + using RealScalar = typename Eigen::NumTraits::Real; + + // Performs a single matrix computation given input matrices, and + // stores the result in outputs. For batch operations, this will be called + // repeatedly for a single call to Compute() when multiple matrices exist in + // input Tensors with rank > 2. In this case the calls to ComputeMatrix are + // parallelized. The number of threads used is determined by a cost model from + // the value returned by GetCostPerUnit(). + virtual void ComputeMatrix(OpKernelContext* context, + const InputConstMatrixMaps& inputs, + OutputMatrixMaps* outputs) = 0; + + private: + using TensorInputs = gtl::InlinedVector; + using TensorOutputs = gtl::InlinedVector; + // This function maps 2-d slices (matrices) of the input and output tensors + // using Eigen::Map and calls ComputeMatrix implemented in terms of the + // Eigen::MatrixBase API by the derived class. + // + // The 'matrix_index' parameter specifies the index of the matrix to be used + // from each input tensor, and the index of the matrix to be written to each + // output tensor. The input matrices are in row major order, and located at + // the memory addresses + // inputs[i].flat().data() + + // matrix_index * input_matrix_shapes[i].num_elements() + // for i in 0...inputs.size()-1. + // The output matrices are in row major order, and located at the memory + // address + // outputs[i]->flat().data() + + // matrix_index * output_matrix_shapes[i].num_elements(). + // for i in 0...outputs.size()-1. + // + void ComputeTensorSlice(OpKernelContext* context, int64_t matrix_index, + const TensorInputs& inputs, + const TensorShapes& input_matrix_shapes, + const TensorOutputs& outputs, + const TensorShapes& output_matrix_shapes); + + void AnalyzeInputs(OpKernelContext* context, TensorInputs* inputs, + TensorShapes* input_matrix_shapes, + TensorShape* batch_shape); + + void PrepareOutputs(OpKernelContext* context, + const TensorShapes& input_matrix_shapes, + const TensorShape& batch_shape, TensorOutputs* outputs, + TensorShapes* output_matrix_shapes); +}; + +// Declare LinearAlgebraOp, which is explicitly instantiated in +// linalg_ops_common.cc for half,float, double, complex64, and complex128. +extern template class LinearAlgebraOp; +extern template class LinearAlgebraOp; +extern template class LinearAlgebraOp; +extern template class LinearAlgebraOp; +extern template class LinearAlgebraOp; + +} // namespace tensorflow + +#define INHERIT_LINALG_TYPEDEFS(Scalar) \ + typedef LinearAlgebraOp Base; \ + using RealScalar = typename Eigen::NumTraits::Real; \ + using Matrix = typename Base::Matrix; \ + using MatrixMap = typename Base::MatrixMap; \ + using MatrixMaps = typename Base::MatrixMaps; \ + using ConstMatrixMap = typename Base::ConstMatrixMap; \ + using ConstMatrixMaps = typename Base::ConstMatrixMaps; \ + using ConstVectorMap = typename Base::ConstVectorMap; \ + using TensorShapes = typename Base::TensorShapes; + +#define REGISTER_LINALG_OP_CPU(OpName, OpClass, Scalar) \ + REGISTER_KERNEL_BUILDER( \ + Name(OpName).Device(DEVICE_CPU).TypeConstraint("T"), OpClass) + +#define REGISTER_LINALG_OP_GPU(OpName, OpClass, Scalar) \ + REGISTER_KERNEL_BUILDER( \ + Name(OpName).Device(DEVICE_GPU).TypeConstraint("T"), OpClass) + +// Deprecated, use one of the device-specific macros above. +#define REGISTER_LINALG_OP(OpName, OpClass, Scalar) \ + REGISTER_LINALG_OP_CPU(OpName, OpClass, Scalar) + +#endif // TENSORFLOW_CORE_KERNELS_LINALG_LINALG_OPS_COMMON_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/linalg/matrix_band_part_op.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/linalg/matrix_band_part_op.h new file mode 100644 index 0000000000000000000000000000000000000000..2f68eba6dcdd9af16f14230e2b7483269b722bf1 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/linalg/matrix_band_part_op.h @@ -0,0 +1,37 @@ +/* Copyright 2016 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_KERNELS_LINALG_MATRIX_BAND_PART_OP_H_ +#define TENSORFLOW_CORE_KERNELS_LINALG_MATRIX_BAND_PART_OP_H_ + +#include "tensorflow/core/framework/op_kernel.h" +#include "tensorflow/core/framework/tensor_types.h" +#include "tensorflow/core/platform/types.h" + +namespace tensorflow { +namespace functor { + +template +struct MatrixBandPartFunctor { + void operator()(OpKernelContext* context, const Device& device, + int num_upper_diags, int num_lower_diags, + typename TTypes::ConstTensor input, + typename TTypes::Tensor output); +}; + +} // namespace functor +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_LINALG_MATRIX_BAND_PART_OP_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/linalg/matrix_diag_op.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/linalg/matrix_diag_op.h new file mode 100644 index 0000000000000000000000000000000000000000..104c7d0d9ab9c58b1c42be14bd7fed739ee07151 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/linalg/matrix_diag_op.h @@ -0,0 +1,72 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_KERNELS_LINALG_MATRIX_DIAG_OP_H_ +#define TENSORFLOW_CORE_KERNELS_LINALG_MATRIX_DIAG_OP_H_ + +// Generator definition for MatrixDiagOp, must be compilable by nvcc. + +#include "unsupported/Eigen/CXX11/Tensor" // from @eigen_archive +#include "tensorflow/core/framework/op_kernel.h" +#include "tensorflow/core/framework/tensor.h" +#include "tensorflow/core/framework/tensor_types.h" +#include "tensorflow/core/platform/types.h" + +namespace tensorflow { +namespace functor { + +// Reads the diagonal packing alignment. +void ReadAlignment(OpKernelConstruction* context, + bool* left_align_superdiagonal, + bool* left_align_subdiagonal); + +// Calculates diagonal length and content offset (from aligning) of a diagonal. +// Returns a pair of integers {diag_len, content_offset}: +// - diag_len: The length of the diag_index-th diagonal. +// - content_offset: Each diagonal is stored as a row in the compact format. +// If the diagonal is shorter than max_diag_len, its content is aligned +// either to the left or right. content_offset is the index in the row +// where the first element of the diag-index-th diagonal is stored. It is +// always zero when the diagonal is left-aligned. +std::pair ComputeDiagLenAndContentOffset( + int diag_index, int max_diag_len, int num_rows, int num_cols, + bool left_align_superdiagonal, bool left_align_subdiagonal); + +template +struct MatrixDiagPart { + EIGEN_ALWAYS_INLINE static void Compute( + OpKernelContext* context, const Device& device, + typename TTypes::ConstTensor& input, + typename TTypes::Tensor& output, const Eigen::Index lower_diag_index, + const Eigen::Index upper_diag_index, const Eigen::Index max_diag_len, + const T padding_value, const bool left_align_superdiagonal, + const bool left_align_subdiagonal); +}; + +template +struct MatrixDiag { + EIGEN_ALWAYS_INLINE static void Compute( + OpKernelContext* context, const Device& device, + typename TTypes::ConstTensor& diag, + typename TTypes::Tensor& output, + const Eigen::Index lower_diag_index, const Eigen::Index upper_diag_index, + const Eigen::Index max_diag_len, const T padding_value, + const bool left_align_superdiagonal, const bool left_align_subdiagonal); +}; + +} // namespace functor +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_LINALG_MATRIX_DIAG_OP_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/linalg/matrix_set_diag_op.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/linalg/matrix_set_diag_op.h new file mode 100644 index 0000000000000000000000000000000000000000..449a3607edef153da8bfdb68173d6526bf187ed3 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/linalg/matrix_set_diag_op.h @@ -0,0 +1,42 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_KERNELS_LINALG_MATRIX_SET_DIAG_OP_H_ +#define TENSORFLOW_CORE_KERNELS_LINALG_MATRIX_SET_DIAG_OP_H_ + +#include "tensorflow/core/framework/op_kernel.h" +#include "tensorflow/core/framework/tensor_types.h" +#include "tensorflow/core/platform/types.h" + +namespace tensorflow { +namespace functor { + +template +struct MatrixSetDiag { + static void Compute(OpKernelContext* context, const Device& device, + typename TTypes::ConstTensor& input, + typename TTypes::ConstTensor& diag, + typename TTypes::Tensor& output, + const Eigen::Index lower_diag_index, + const Eigen::Index upper_diag_index, + const Eigen::Index max_diag_len, + const bool left_align_superdiagonal, + const bool left_align_subdiagonal); +}; + +} // namespace functor +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_LINALG_MATRIX_SET_DIAG_OP_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/linalg/matrix_solve_ls_op_impl.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/linalg/matrix_solve_ls_op_impl.h new file mode 100644 index 0000000000000000000000000000000000000000..c75c494e6f85862ca493f88d1916a979bc166a42 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/linalg/matrix_solve_ls_op_impl.h @@ -0,0 +1,166 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_KERNELS_LINALG_MATRIX_SOLVE_LS_OP_IMPL_H_ +#define TENSORFLOW_CORE_KERNELS_LINALG_MATRIX_SOLVE_LS_OP_IMPL_H_ + +// See docs in ../ops/linalg_ops.cc. + +#include "Eigen/Cholesky" // from @eigen_archive +#include "Eigen/Core" // from @eigen_archive +#include "Eigen/QR" // from @eigen_archive +#include "tensorflow/core/framework/kernel_def_builder.h" +#include "tensorflow/core/framework/op_kernel.h" +#include "tensorflow/core/framework/tensor_shape.h" +#include "tensorflow/core/kernels/linalg/linalg_ops_common.h" +#include "tensorflow/core/lib/core/errors.h" +#include "tensorflow/core/platform/logging.h" +#include "tensorflow/core/platform/types.h" + +namespace tensorflow { + +template +class MatrixSolveLsOp : public LinearAlgebraOp { + public: + typedef LinearAlgebraOp Base; + + explicit MatrixSolveLsOp(OpKernelConstruction* context) : Base(context) { + OP_REQUIRES_OK(context, context->GetAttr("fast", &fast_)); + } + + using TensorShapes = typename Base::TensorShapes; + using Matrix = typename Base::Matrix; + using MatrixMaps = typename Base::MatrixMaps; + using ConstMatrixMap = typename Base::ConstMatrixMap; + using ConstMatrixMaps = typename Base::ConstMatrixMaps; + + // Tell the base class to ignore the regularization parameter + // in context->input(2). + int NumMatrixInputs(const OpKernelContext* context) const final { return 2; } + + void ValidateInputMatrixShapes( + OpKernelContext* context, + const TensorShapes& input_matrix_shapes) const final { + Base::ValidateSolver(context, input_matrix_shapes); + } + + TensorShapes GetOutputMatrixShapes( + const TensorShapes& input_matrix_shapes) const final { + return TensorShapes({TensorShape({input_matrix_shapes[0].dim_size(1), + input_matrix_shapes[1].dim_size(1)})}); + } + + int64_t GetCostPerUnit(const TensorShapes& input_matrix_shapes) const final { + double m = static_cast(input_matrix_shapes[0].dim_size(0)); + double n = static_cast(input_matrix_shapes[0].dim_size(1)); + double num_rhss = static_cast(input_matrix_shapes[1].dim_size(1)); + double cost = std::max(m, n) * std::min(m, n) * (std::min(m, n) + num_rhss); + return cost >= static_cast(kint64max) ? kint64max + : static_cast(cost); + } + + bool EnableInputForwarding() const final { return false; } + + void ComputeMatrix(OpKernelContext* context, const ConstMatrixMaps& inputs, + MatrixMaps* outputs) final { + const ConstMatrixMap& matrix = inputs[0]; + const ConstMatrixMap& rhs = inputs[1]; + const auto& l2_regularizer_in = context->input(2); + OP_REQUIRES( + context, TensorShapeUtils::IsScalar(l2_regularizer_in.shape()), + errors::InvalidArgument("l2_regularizer must be scalar, got shape ", + l2_regularizer_in.shape().DebugString())); + const double l2_regularizer = l2_regularizer_in.scalar()(); + OP_REQUIRES(context, l2_regularizer >= 0, + errors::InvalidArgument("l2_regularizer must be >= 0.")); + + const int64_t rows = matrix.rows(); + const int64_t cols = matrix.cols(); + if (rows == 0 || cols == 0 || rhs.rows() == 0 || rhs.cols() == 0) { + // The result is the empty matrix. + return; + } + if (fast_) { + // The fast branch assumes that matrix is not rank deficient and + // not too ill-conditioned. Specifically, the reciprocal condition number + // should be greater than the square root of the machine precision, i.e. + // 1 / cond(matrix) > sqrt(std::numeric_limits::epsilon()). + // This branch solves over- or underdetermined least-squares problems + // via the normal equations and Cholesky decomposition. + if (rows >= cols) { + // Overdetermined case (rows >= cols): Solves the ordinary (possibly + // regularized) least-squares problem + // min || A * X - RHS ||_F^2 + l2_regularizer ||X||_F^2 + // by solving the normal equations + // (A^T * A + l2_regularizer * I) X = A^T RHS + // using Cholesky decomposition. + Matrix gramian(cols, cols); + gramian.template triangularView() = + matrix.adjoint() * matrix; + if (l2_regularizer > 0) { + gramian += + (Scalar(l2_regularizer) * Matrix::Ones(cols, 1)).asDiagonal(); + } + const Eigen::LLT, Eigen::Lower> llt(gramian); + OP_REQUIRES( + context, llt.info() == Eigen::Success, + errors::InvalidArgument("Input matrix was rank deficient or " + "ill-conditioned. Try setting fast=False " + "or provide a larger l2_regularizer > 0.")); + outputs->at(0).noalias() = matrix.adjoint() * rhs; + llt.solveInPlace(outputs->at(0)); + } else { + // Underdetermined case (rows < cols): Solves the minimum-norm problem + // min ||X||_F^2 s.t. A*X = RHS + // by solving the normal equations of the second kind + // (A * A^T + l2_regularizer * I) Z = RHS, X = A^T * Z + // using Cholesky decomposition. + Matrix gramian(rows, rows); + gramian.template triangularView() = + matrix * matrix.adjoint(); + if (l2_regularizer > 0) { + gramian += + (Scalar(l2_regularizer) * Matrix::Ones(rows, 1)).asDiagonal(); + } + const Eigen::LLT, Eigen::Lower> llt(gramian); + OP_REQUIRES( + context, llt.info() == Eigen::Success, + errors::InvalidArgument("Input matrix was rank deficient or " + "ill-conditioned. Try setting fast=False " + "or provide an l2_regularizer > 0.")); + outputs->at(0).noalias() = matrix.adjoint() * llt.solve(rhs); + } + } else { + // Use complete orthogonal decomposition which is backwards stable and + // will compute the minimum-norm solution for rank-deficient matrices. + // This is 6-7 times slower than the fast path. + // + // TODO(rmlarsen): The implementation of + // Eigen::CompleteOrthogonalDecomposition is not blocked, so for + // matrices that do not fit in cache, it is significantly slower than + // the equivalent blocked LAPACK routine xGELSY (e.g. Eigen is ~3x + // slower for 4k x 4k matrices). + // See http://www.netlib.org/lapack/lawnspdf/lawn114.pdf + outputs->at(0) = matrix.completeOrthogonalDecomposition().solve(rhs); + } + } + + private: + bool fast_; +}; + +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_LINALG_MATRIX_SOLVE_LS_OP_IMPL_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/linalg/matrix_triangular_solve_op_impl.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/linalg/matrix_triangular_solve_op_impl.h new file mode 100644 index 0000000000000000000000000000000000000000..8ed5315e2babcfbc480057bf6bf523fc354e2e24 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/linalg/matrix_triangular_solve_op_impl.h @@ -0,0 +1,426 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +// See docs in ../ops/linalg_ops.cc. +// +#ifndef TENSORFLOW_CORE_KERNELS_LINALG_MATRIX_TRIANGULAR_SOLVE_OP_IMPL_H_ +#define TENSORFLOW_CORE_KERNELS_LINALG_MATRIX_TRIANGULAR_SOLVE_OP_IMPL_H_ + +#include "Eigen/Core" // from @eigen_archive +#include "tensorflow/core/framework/kernel_def_builder.h" +#include "tensorflow/core/framework/op_kernel.h" +#include "tensorflow/core/framework/register_types.h" +#include "tensorflow/core/framework/tensor_shape.h" +#include "tensorflow/core/kernels/fill_functor.h" +#include "tensorflow/core/kernels/linalg/linalg_ops_common.h" +#include "tensorflow/core/lib/core/errors.h" +#include "tensorflow/core/platform/logging.h" +#include "tensorflow/core/platform/macros.h" +#include "tensorflow/core/platform/types.h" +#include "tensorflow/core/util/matmul_bcast.h" + +#if GOOGLE_CUDA || TENSORFLOW_USE_ROCM +#include "unsupported/Eigen/CXX11/Tensor" // from @eigen_archive +#include "tensorflow/core/kernels/transpose_functor.h" +#include "tensorflow/core/platform/stream_executor.h" +#include "tensorflow/core/util/gpu_solvers.h" +#endif // GOOGLE_CUDA || TENSORFLOW_USE_ROCM + +namespace tensorflow { + +typedef Eigen::ThreadPoolDevice CPUDevice; +typedef Eigen::GpuDevice GPUDevice; + +#if GOOGLE_CUDA || TENSORFLOW_USE_ROCM +template +se::DeviceMemory AsDeviceMemory(const Scalar* gpu_memory) { + se::DeviceMemoryBase wrapped(const_cast(gpu_memory)); + se::DeviceMemory typed(wrapped); + return typed; +} + +#endif // GOOGLE_CUDA || TENSORFLOW_USE_ROCM + +// Sequential batch matrix triangular solve kernel that calls Eigen's +// matrix triangular solve. +template +struct SequentialMatrixTriangularSolveKernel { + using Matrix = + Eigen::Matrix; + using ConstMatrixMap = Eigen::Map; + using MatrixMap = Eigen::Map; + using RealScalar = typename Eigen::NumTraits::Real; + + static ConstMatrixMap ConstTensorSliceToEigenMatrix(const Tensor& t, + int slice) { + return ConstMatrixMap( + t.flat().data() + slice * t.dim_size(1) * t.dim_size(2), + t.dim_size(1), t.dim_size(2)); + } + + static MatrixMap TensorSliceToEigenMatrix(Tensor* t, int slice) { + return MatrixMap( + t->flat().data() + slice * t->dim_size(1) * t->dim_size(2), + t->dim_size(1), t->dim_size(2)); + } + + static void Run(const Tensor& in_x, const Tensor& in_y, bool lower, + bool adjoint, const MatMulBCast& bcast, Tensor* out, + int start, int limit) { + const bool should_bcast = bcast.IsBroadcastingRequired(); + const auto& x_batch_indices = bcast.x_batch_indices(); + const auto& y_batch_indices = bcast.y_batch_indices(); + for (int64_t i = start; i < limit; ++i) { + const int64_t x_batch_index = should_bcast ? x_batch_indices[i] : i; + const int64_t y_batch_index = should_bcast ? y_batch_indices[i] : i; + auto matrix = ConstTensorSliceToEigenMatrix(in_x, x_batch_index); + auto rhs = ConstTensorSliceToEigenMatrix(in_y, y_batch_index); + auto output = TensorSliceToEigenMatrix(out, i); + if (lower) { + auto triangle = matrix.template triangularView(); + if (adjoint) { + output.noalias() = triangle.adjoint().solve(rhs); + } else { + output.noalias() = triangle.solve(rhs); + } + } else { + auto triangle = matrix.template triangularView(); + if (adjoint) { + output.noalias() = triangle.adjoint().solve(rhs); + } else { + output.noalias() = triangle.solve(rhs); + } + } + } + } +}; + +template +struct LaunchBatchMatrixTriangularSolve; + +template +struct LaunchBatchMatrixTriangularSolve { + static void Launch(OpKernelContext* context, const Tensor& in_x, + const Tensor& in_y, bool adjoint, bool lower, + const MatMulBCast& bcast, Tensor* out) { + // Number of matrix triangular solves i.e. size of the batch. + const int64_t batch_size = bcast.output_batch_size(); + const int64_t cost_per_unit = + in_x.dim_size(1) * in_x.dim_size(1) * in_y.dim_size(2) / 2; + auto worker_threads = *(context->device()->tensorflow_cpu_worker_threads()); + + using Matrix = + Eigen::Matrix; + using ConstMatrixMap = Eigen::Map; + using RealScalar = typename Eigen::NumTraits::Real; + + Shard(worker_threads.num_threads, worker_threads.workers, batch_size, + cost_per_unit, + [&in_x, &in_y, adjoint, lower, &bcast, out](int start, int limit) { + SequentialMatrixTriangularSolveKernel::Run( + in_x, in_y, lower, adjoint, bcast, out, start, limit); + }); + } +}; + +template +class BaseMatrixTriangularSolveOp : public OpKernel { + public: + explicit BaseMatrixTriangularSolveOp(OpKernelConstruction* context) + : OpKernel(context) { + OP_REQUIRES_OK(context, context->GetAttr("lower", &lower_)); + OP_REQUIRES_OK(context, context->GetAttr("adjoint", &adjoint_)); + } + + ~BaseMatrixTriangularSolveOp() override {} + + void Compute(OpKernelContext* ctx) override { + const Tensor& in0 = ctx->input(0); + const Tensor& in1 = ctx->input(1); + + ValidateInputTensors(ctx, in0, in1); + if (!ctx->status().ok()) { + return; + } + + MatMulBCast bcast(in0.shape().dim_sizes(), in1.shape().dim_sizes()); + OP_REQUIRES( + ctx, bcast.IsValid(), + errors::InvalidArgument( + "In[0] and In[1] must have compatible batch dimensions: ", + in0.shape().DebugString(), " vs. ", in1.shape().DebugString())); + + TensorShape out_shape = bcast.output_batch_shape(); + auto batch_size = bcast.output_batch_size(); + auto d0 = in0.dim_size(in0.dims() - 2); + auto d1 = in0.dim_size(in0.dims() - 1); + Tensor in0_reshaped; + OP_REQUIRES( + ctx, + in0_reshaped.CopyFrom(in0, TensorShape({bcast.x_batch_size(), d0, d1})), + errors::Internal("Failed to reshape In[0] from ", + in0.shape().DebugString())); + auto d2 = in1.dim_size(in1.dims() - 2); + auto d3 = in1.dim_size(in1.dims() - 1); + Tensor in1_reshaped; + OP_REQUIRES( + ctx, + in1_reshaped.CopyFrom(in1, TensorShape({bcast.y_batch_size(), d2, d3})), + errors::Internal("Failed to reshape In[1] from ", + in1.shape().DebugString())); + if (adjoint_) std::swap(d0, d1); + OP_REQUIRES(ctx, d1 == d2, + errors::InvalidArgument( + "In[0] mismatch In[1] shape: ", d1, " vs. ", d2, ": ", + in0.shape().DebugString(), " ", in1.shape().DebugString(), + " ", lower_, " ", adjoint_)); + OP_REQUIRES_OK(ctx, out_shape.AddDimWithStatus(d0)); + OP_REQUIRES_OK(ctx, out_shape.AddDimWithStatus(d3)); + Tensor* out = nullptr; + OP_REQUIRES_OK(ctx, ctx->allocate_output(0, out_shape, &out)); + if (out->NumElements() == 0) { + return; + } + Tensor out_reshaped; + OP_REQUIRES(ctx, + out_reshaped.CopyFrom(*out, TensorShape({batch_size, d0, d3})), + errors::Internal("Failed to reshape output from ", + out->shape().DebugString())); + LaunchBatchMatrixTriangularSolve::Launch( + ctx, in0_reshaped, in1_reshaped, adjoint_, lower_, bcast, + &out_reshaped); + } + + private: + virtual void ValidateInputTensors(OpKernelContext* ctx, const Tensor& in0, + const Tensor& in1) = 0; + bool lower_; + bool adjoint_; +}; + +template +class MatrixTriangularSolveOp + : public BaseMatrixTriangularSolveOp { + public: + explicit MatrixTriangularSolveOp(OpKernelConstruction* context) + : BaseMatrixTriangularSolveOp(context) {} + + ~MatrixTriangularSolveOp() override {} + + private: + void ValidateInputTensors(OpKernelContext* ctx, const Tensor& in0, + const Tensor& in1) override { + const auto in0_num_dims = in0.dims(); + OP_REQUIRES( + ctx, in0_num_dims >= 2, + errors::InvalidArgument("In[0] ndims must be >= 2: ", in0_num_dims)); + + const auto in1_num_dims = in1.dims(); + OP_REQUIRES( + ctx, in1_num_dims >= 2, + errors::InvalidArgument("In[1] ndims must be >= 2: ", in1_num_dims)); + + const auto in0_last_dim = in0.dim_size(in0_num_dims - 1); + const auto in0_prev_dim = in0.dim_size(in0_num_dims - 2); + OP_REQUIRES(ctx, in0_last_dim == in0_prev_dim, + errors::InvalidArgument( + "In[0] matrices in the last dimensions must be square (", + in0_last_dim, " =/= ", in0_prev_dim, ")")); + } +}; + +#define REGISTER_BATCH_MATRIX_TRIANGULAR_SOLVE_CPU(TYPE) \ + REGISTER_KERNEL_BUILDER(Name("MatrixTriangularSolve") \ + .Device(DEVICE_CPU) \ + .TypeConstraint("T"), \ + MatrixTriangularSolveOp); \ + REGISTER_KERNEL_BUILDER(Name("BatchMatrixTriangularSolve") \ + .Device(DEVICE_CPU) \ + .TypeConstraint("T"), \ + MatrixTriangularSolveOp); + +#if GOOGLE_CUDA || TENSORFLOW_USE_ROCM + +template +struct LaunchBatchMatrixTriangularSolve { + static void Launch(OpKernelContext* context, const Tensor& in_x, + const Tensor& in_y, bool adjoint, bool lower, + const MatMulBCast& bcast, Tensor* out) { + auto* stream = context->op_device_context()->stream(); + + const uint64 m = in_x.dim_size(1); + const uint64 n = out->dim_size(2); + + // Do a memcpy when we don't need to broadcast. + if (!bcast.IsBroadcastingRequired() || out->shape() == in_y.shape()) { + auto src_device_mem = AsDeviceMemory(in_y.template flat().data()); + auto dst_device_mem = AsDeviceMemory(out->template flat().data()); + OP_REQUIRES( + context, + stream + ->ThenMemcpyD2D(&dst_device_mem, src_device_mem, + bcast.y_batch_size() * m * n * sizeof(Scalar)) + .ok(), + errors::Internal("MatrixTriangularSolveOp: failed to copy rhs " + "from device")); + } else { + std::vector out_ptrs; + std::vector b_tmp_ptrs; + auto* b_base_ptr = in_y.template flat().data(); + const std::vector& b_batch_indices = bcast.y_batch_indices(); + for (int64_t i = 0; i < bcast.y_batch_size(); ++i) { + b_tmp_ptrs.push_back(b_base_ptr + i * m * n); + } + for (int64_t i = 0; i < bcast.output_batch_size(); ++i) { + auto src_device_mem = AsDeviceMemory(b_tmp_ptrs[b_batch_indices[i]]); + auto dst_device_mem = + AsDeviceMemory(out->template flat().data() + i * m * n); + OP_REQUIRES( + context, + stream + ->ThenMemcpyD2D(&dst_device_mem, src_device_mem, + m * n * sizeof(Scalar)) + .ok(), + errors::Internal("MatrixTriangularSolveOp: failed to copy rhs " + "from device")); + } + } + + if (out->NumElements() == 0) { + return; + } + +#if GOOGLE_CUDA + + cublasSideMode_t side = CUBLAS_SIDE_RIGHT; + cublasFillMode_t uplo; + cublasOperation_t trans; + cublasDiagType_t diag = CUBLAS_DIAG_NON_UNIT; + + // Cublas does + // output = matrix \ rhs + // where matrix, rhs and output are assumed to be in column major. + // We want the output to be in row-major, so we can compute + // output' = rhs' / matrix' (' stands for transpose) + // Upper/lower needs to be swapped for this. + + uplo = lower ? CUBLAS_FILL_MODE_UPPER : CUBLAS_FILL_MODE_LOWER; + trans = adjoint ? CUBLAS_OP_C : CUBLAS_OP_N; + +#elif TENSORFLOW_USE_ROCM + rocblas_side side = rocblas_side_right; + rocblas_fill uplo; + rocblas_operation trans; + rocblas_diagonal diag = rocblas_diagonal_non_unit; + + // rocblas does + // output = matrix \ rhs + // where matrix, rhs and output are assumed to be in column major. + // We want the output to be in row-major, so we can compute + // output' = rhs' / matrix' (' stands for transpose) + // Upper/lower needs to be swapped for this. + + uplo = lower ? rocblas_fill_upper : rocblas_fill_lower; + trans = adjoint ? rocblas_operation_conjugate_transpose + : rocblas_operation_none; + +#endif + + auto solver = absl::make_unique(context); + const uint64 leading_dim_matrix = m; + const uint64 leading_dim_output = n; + const uint64 colmajor_rows = n; + const uint64 colmajor_cols = m; + + const int64_t batch_size = bcast.output_batch_size(); + std::vector a_ptrs; + std::vector out_ptrs; + std::vector a_tmp_ptrs; + a_ptrs.reserve(batch_size); + out_ptrs.reserve(batch_size); + a_tmp_ptrs.reserve(bcast.x_batch_size()); + auto* a_base_ptr = in_x.template flat().data(); + auto* out_base_ptr = out->template flat().data(); + + if (!bcast.IsBroadcastingRequired()) { + for (int64_t i = 0; i < batch_size; ++i) { + a_ptrs.push_back(a_base_ptr + i * m * m); + out_ptrs.push_back(out_base_ptr + i * m * n); + } + } else { + const std::vector& a_batch_indices = bcast.x_batch_indices(); + for (int64_t i = 0; i < bcast.x_batch_size(); ++i) { + a_tmp_ptrs.push_back(a_base_ptr + i * m * m); + } + for (int64_t i = 0; i < batch_size; ++i) { + a_ptrs.push_back(a_tmp_ptrs[a_batch_indices[i]]); + out_ptrs.push_back(out_base_ptr + i * m * n); + } + } + + typedef Scalar Coefficient; + const Scalar alpha = Scalar(1.0); + + // TODO(b/146763573): Consider using Trsv here when the right hand side is + // a vector. This will require an explicit transpose since Trsv assumes + // CUBLAS_SIDE_LEFT. + if (batch_size == 1) { + OP_REQUIRES_OK( + context, + solver->Trsm(side, uplo, trans, diag, colmajor_rows, colmajor_cols, + &alpha, a_ptrs[0], leading_dim_matrix /*lda*/, + out_ptrs[0], leading_dim_output /*ldb*/)); + } else { + // Heuristic for choosing between batched interface vs. non-batched + // interface. This is inspired by matrix_solve_op and can probably be + // tuned. + // TODO(b/146763573): Tune this heuristic. + const int kMaxMatrixSizeToBatchSizeRatio = 128; + const bool use_batched_solver = + m <= kMaxMatrixSizeToBatchSizeRatio * batch_size; + if (use_batched_solver) { + OP_REQUIRES_OK( + context, solver->TrsmBatched( + side, uplo, trans, diag, colmajor_rows, colmajor_cols, + &alpha, &a_ptrs[0], leading_dim_matrix /*lda*/, + &out_ptrs[0], leading_dim_output /*ldb*/, batch_size)); + } else { + for (int batch = 0; batch < batch_size; ++batch) { + OP_REQUIRES_OK( + context, solver->Trsm(side, uplo, trans, diag, colmajor_rows, + colmajor_cols, &alpha, a_ptrs[batch], + leading_dim_matrix /*lda*/, out_ptrs[batch], + leading_dim_output /*ldb*/)); + } + } + } + } +}; + +#define REGISTER_BATCH_MATRIX_TRIANGULAR_SOLVE_GPU(TYPE) \ + REGISTER_KERNEL_BUILDER(Name("MatrixTriangularSolve") \ + .Device(DEVICE_GPU) \ + .TypeConstraint("T"), \ + MatrixTriangularSolveOp); \ + REGISTER_KERNEL_BUILDER(Name("BatchMatrixTriangularSolve") \ + .Device(DEVICE_GPU) \ + .TypeConstraint("T"), \ + MatrixTriangularSolveOp); + +#endif // GOOGLE_CUDA || TENSORFLOW_USE_ROCM + +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_LINALG_MATRIX_TRIANGULAR_SOLVE_OP_IMPL_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/linalg/qr_op_impl.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/linalg/qr_op_impl.h new file mode 100644 index 0000000000000000000000000000000000000000..c5a1823f2f69e5aa4a8634606cae5fa4491e768f --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/linalg/qr_op_impl.h @@ -0,0 +1,318 @@ +/* Copyright 2016 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_KERNELS_LINALG_QR_OP_IMPL_H_ +#define TENSORFLOW_CORE_KERNELS_LINALG_QR_OP_IMPL_H_ + +// See docs in ../ops/linalg_ops.cc. +// +// This header file is used by the individual qr_*op*.cc files for registering +// individual kernels. A separate file is used for each instantiated kernel to +// improve compilation times. +#include +#include + +#if GOOGLE_CUDA || TENSORFLOW_USE_ROCM +#define EIGEN_USE_GPU +#endif + +#include "Eigen/QR" // from @eigen_archive +#include "tensorflow/core/framework/kernel_def_builder.h" +#include "tensorflow/core/framework/op_kernel.h" +#include "tensorflow/core/framework/tensor.h" +#include "tensorflow/core/framework/tensor_shape.h" +#include "tensorflow/core/kernels/linalg/linalg_ops_common.h" +#include "tensorflow/core/lib/core/errors.h" +#include "tensorflow/core/platform/logging.h" +#include "tensorflow/core/platform/macros.h" +#include "tensorflow/core/platform/types.h" + +#if GOOGLE_CUDA || TENSORFLOW_USE_ROCM +#include "unsupported/Eigen/CXX11/Tensor" // from @eigen_archive +#include "tensorflow/core/kernels/cwise_ops.h" +#include "tensorflow/core/kernels/linalg/eye_functor.h" +#include "tensorflow/core/kernels/linalg/matrix_band_part_op.h" +#include "tensorflow/core/kernels/transpose_functor.h" +#include "tensorflow/core/util/gpu_solvers.h" +#endif + +namespace tensorflow { + +template +class QrOp : public LinearAlgebraOp { + public: + typedef LinearAlgebraOp Base; + + explicit QrOp(OpKernelConstruction* context) : Base(context) { + OP_REQUIRES_OK(context, context->GetAttr("full_matrices", &full_matrices_)); + } + + using TensorShapes = typename Base::TensorShapes; + + void ValidateInputMatrixShapes( + OpKernelContext* context, + const TensorShapes& input_matrix_shapes) const final { + Base::ValidateSingleMatrix(context, input_matrix_shapes); + } + + TensorShapes GetOutputMatrixShapes( + const TensorShapes& input_matrix_shapes) const final { + int64_t m = input_matrix_shapes[0].dim_size(0); + int64_t n = input_matrix_shapes[0].dim_size(1); + int64_t min_size = std::min(m, n); + if (full_matrices_) { + return TensorShapes({TensorShape({m, m}), TensorShape({m, n})}); + } else { + return TensorShapes( + {TensorShape({m, min_size}), TensorShape({min_size, n})}); + } + } + + int64_t GetCostPerUnit(const TensorShapes& input_matrix_shapes) const final { + double m = static_cast(input_matrix_shapes[0].dim_size(0)); + double n = static_cast(input_matrix_shapes[0].dim_size(1)); + double max_size = std::max(m, n); + double min_size = std::min(m, n); + double cost = 2 * max_size * min_size * min_size - + 2 * min_size * min_size * min_size / 3.; + // TODO(jpoulson): Increase the cost if full_matrices is true in a manner + // that reflects the algorithm used for the expansion. + return cost >= static_cast(kint64max) ? kint64max + : static_cast(cost); + } + + using Matrix = typename Base::Matrix; + using MatrixMaps = typename Base::MatrixMaps; + using ConstMatrixMap = typename Base::ConstMatrixMap; + using ConstMatrixMaps = typename Base::ConstMatrixMaps; + + void ComputeMatrix(OpKernelContext* context, const ConstMatrixMaps& inputs, + MatrixMaps* outputs) final { + Eigen::HouseholderQR qr(inputs[0]); + const int m = inputs[0].rows(); + const int n = inputs[0].cols(); + const int min_size = std::min(m, n); + + if (full_matrices_) { + outputs->at(0) = qr.householderQ(); + outputs->at(1) = qr.matrixQR().template triangularView(); + } else { + // TODO(jpoulson): Exploit the fact that Householder transformations can + // be expanded faster than they can be applied to an arbitrary matrix + // (Cf. LAPACK's DORGQR). + Matrix tmp = Matrix::Identity(m, min_size); + outputs->at(0) = qr.householderQ() * tmp; + auto qr_top = qr.matrixQR().block(0, 0, min_size, n); + outputs->at(1) = qr_top.template triangularView(); + } + } + + private: + bool full_matrices_; + + QrOp(const QrOp&) = delete; + void operator=(const QrOp&) = delete; +}; + +#if GOOGLE_CUDA || TENSORFLOW_USE_ROCM + +typedef Eigen::GpuDevice GPUDevice; + +template +class QrOpGpu : public AsyncOpKernel { + public: + explicit QrOpGpu(OpKernelConstruction* context) : AsyncOpKernel(context) { + OP_REQUIRES_OK(context, context->GetAttr("full_matrices", &full_matrices_)); + } + + void ComputeAsync(OpKernelContext* context, DoneCallback done) final { + const Tensor& input = context->input(0); + const int ndims = input.dims(); + const int64_t m = input.dim_size(ndims - 2); + const int64_t n = input.dim_size(ndims - 1); + const int64_t min_size = std::min(m, n); + const int64_t batch_size = + input.template flat_inner_dims().dimension(0); + + // Validate inputs. + OP_REQUIRES_ASYNC( + context, ndims >= 2, + errors::InvalidArgument("Input must have rank >= 2, got ", ndims), + done); + + // Allocate output. + // If full_matrices_ is true then Q is m x m and R is m x n. + // Otherwise, Q is m x min(m, n), and R is min(m, n) x n. + Tensor* q; + TensorShape q_shape = input.shape(); + q_shape.set_dim(ndims - 1, full_matrices_ ? m : min_size); + OP_REQUIRES_OK_ASYNC(context, context->allocate_output(0, q_shape, &q), + done); + Tensor* r; + TensorShape r_shape = input.shape(); + r_shape.set_dim(ndims - 2, full_matrices_ ? m : min_size); + OP_REQUIRES_OK_ASYNC(context, context->allocate_output(1, r_shape, &r), + done); + + if (input.NumElements() == 0) { + done(); + return; + } + + // TODO(rmlarsen): Convert to std::make_unique when available. + std::unique_ptr solver(new GpuSolver(context)); + + // Allocate temporaries. + Tensor input_transposed; + TensorShape transposed_shape = input.shape(); + transposed_shape.set_dim(ndims - 2, input.dim_size(ndims - 1)); + transposed_shape.set_dim(ndims - 1, input.dim_size(ndims - 2)); + + OP_REQUIRES_OK_ASYNC( + context, + solver->allocate_scoped_tensor(DataTypeToEnum::value, + transposed_shape, &input_transposed), + done); + + Tensor tau; + OP_REQUIRES_OK_ASYNC(context, + solver->allocate_scoped_tensor( + DataTypeToEnum::value, + TensorShape({batch_size, min_size}), &tau), + done); + + // Transpose input, since cuSolver uses column-major, while TensorFlow uses + // row-major storage. + const GPUDevice& device = context->eigen_device(); + OP_REQUIRES_OK_ASYNC( + context, DoMatrixTranspose(device, input, &input_transposed), done); + + // Compute QR decomposition in-place in input_transposed. + std::vector dev_info; + dev_info.push_back(solver->GetDeviceLapackInfo(batch_size, "geqrf")); + auto input_transposed_reshaped = + input_transposed.flat_inner_dims(); + auto tau_matrix = tau.matrix(); + auto r_reshaped = r->flat_inner_dims(); + for (int batch = 0; batch < batch_size; ++batch) { + OP_REQUIRES_OK_ASYNC( + context, + solver->Geqrf(m, n, &input_transposed_reshaped(batch, 0, 0), m, + &tau_matrix(batch, 0), + dev_info.back().mutable_data() + batch), + done); + } + +#if GOOGLE_CUDA + cublasOperation_t transa = CUBLAS_OP_T; + cublasOperation_t transb = CUBLAS_OP_N; + cublasSideMode_t side = CUBLAS_SIDE_LEFT; +#elif TENSORFLOW_USE_ROCM + rocblas_operation transa = rocblas_operation_transpose; + rocblas_operation transb = rocblas_operation_none; + rocblas_side side = rocblas_side_left; +#endif + + // Generate R. R is equal to the upper triangle of the decomposition + // stored in input_transposed. Crop, transpose (to get back to row-major) + // and copy it to the output buffer. + if (full_matrices_ || m == n) { + OP_REQUIRES_OK_ASYNC( + context, DoMatrixTranspose(device, input_transposed, r), done); + } else { + const Scalar alpha(1); + const Scalar beta(0); + const Scalar* dummy = nullptr; + for (int batch = 0; batch < batch_size; ++batch) { + OP_REQUIRES_OK_ASYNC( + context, + solver->Geam(transa, transb, n, full_matrices_ ? m : min_size, + &alpha, &input_transposed_reshaped(batch, 0, 0), m, + &beta, dummy, n, &r_reshaped(batch, 0, 0), n), + done); + } + } + // Extract the upper triangle of r (i.e. zero out the strictly lower + // triangle). + functor::MatrixBandPartFunctor band_part; + auto r_reshaped_const = + const_cast(r)->flat_inner_dims(); + band_part(context, device, 0 /* num_lower_diags */, + -1 /* num_upper_diags */, r_reshaped_const, r_reshaped); + + // Generate Q from the decomposition in input_transposed. + if (m != n && (full_matrices_ || m < n)) { + // Generate full m x m matrix Q by computing the product Q^T * I, + // where the transpose is to get back to row-major form. + // In the complex case we actually form Q^H * I and conjugate it + // to get Q in row-major form. + functor::EyeFunctor eye; + auto q_reshaped = q->flat_inner_dims(); + eye(device, q_reshaped); +#if GOOGLE_CUDA + cublasOperation_t trans = CublasAdjointOp(); +#elif TENSORFLOW_USE_ROCM + rocblas_operation trans = RocblasAdjointOp(); +#endif + for (int batch = 0; batch < batch_size; ++batch) { + // Notice: It appears that Unmqr does not write a zero into *info upon + // success (probably a bug), so we simply re-use the info array already + // zeroed by Geqrf above. + OP_REQUIRES_OK_ASYNC( + context, + solver->Unmqr(side, trans, m, m, min_size, + &input_transposed_reshaped(batch, 0, 0), m, + &tau_matrix(batch, 0), &q_reshaped(batch, 0, 0), m, + dev_info.back().mutable_data() + batch), + done); + } + if (Eigen::NumTraits::IsComplex) { + functor::UnaryFunctor> conj; + conj(device, q->flat() /*out*/, + const_cast(q)->flat() /*in*/); + } + } else { + // Generate m x n matrix Q. In this case we can use the more efficient + // algorithm in Ungqr to generate Q in place. + dev_info.push_back(solver->GetDeviceLapackInfo(batch_size, "orgqr")); + for (int batch = 0; batch < batch_size; ++batch) { + OP_REQUIRES_OK_ASYNC( + context, + solver->Ungqr( + m, n, min_size, &input_transposed_reshaped(batch, 0, 0), m, + &tau_matrix(batch, 0), dev_info.back().mutable_data() + batch), + done); + } + OP_REQUIRES_OK_ASYNC( + context, DoMatrixTranspose(device, input_transposed, q), done); + } + + // Asynchronously check return status from cuSolver kernels. + GpuSolver::CheckLapackInfoAndDeleteSolverAsync(std::move(solver), dev_info, + std::move(done)); + } + + private: + bool full_matrices_; + + QrOpGpu(const QrOpGpu&) = delete; + void operator=(const QrOpGpu&) = delete; +}; + +#endif // GOOGLE_CUDA + +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_LINALG_QR_OP_IMPL_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/linalg/self_adjoint_eig_v2_op_impl.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/linalg/self_adjoint_eig_v2_op_impl.h new file mode 100644 index 0000000000000000000000000000000000000000..4fba705f7087588b259e9d5b4af4a40b0d0b2a29 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/linalg/self_adjoint_eig_v2_op_impl.h @@ -0,0 +1,92 @@ +/* Copyright 2017 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_KERNELS_LINALG_SELF_ADJOINT_EIG_V2_OP_IMPL_H_ +#define TENSORFLOW_CORE_KERNELS_LINALG_SELF_ADJOINT_EIG_V2_OP_IMPL_H_ + +// See docs in ../ops/linalg_ops.cc. + +#include "Eigen/Core" // from @eigen_archive +#include "Eigen/Eigenvalues" // from @eigen_archive +#include "tensorflow/core/framework/kernel_def_builder.h" +#include "tensorflow/core/framework/op_kernel.h" +#include "tensorflow/core/framework/tensor_shape.h" +#include "tensorflow/core/kernels/linalg/linalg_ops_common.h" +#include "tensorflow/core/lib/core/errors.h" +#include "tensorflow/core/platform/denormal.h" +#include "tensorflow/core/platform/logging.h" +#include "tensorflow/core/platform/types.h" + +namespace tensorflow { + +template +class SelfAdjointEigV2Op : public LinearAlgebraOp { + public: + typedef LinearAlgebraOp Base; + + explicit SelfAdjointEigV2Op(OpKernelConstruction* context) : Base(context) { + OP_REQUIRES_OK(context, context->GetAttr("compute_v", &compute_v_)); + } + + using TensorShapes = typename Base::TensorShapes; + using Matrix = typename Base::Matrix; + using MatrixMaps = typename Base::MatrixMaps; + using ConstMatrixMap = typename Base::ConstMatrixMap; + using ConstMatrixMaps = typename Base::ConstMatrixMaps; + + TensorShapes GetOutputMatrixShapes( + const TensorShapes& input_matrix_shapes) const final { + int64_t n = input_matrix_shapes[0].dim_size(0); + if (compute_v_) { + return TensorShapes({TensorShape({n}), TensorShape({n, n})}); + } else { + return TensorShapes({TensorShape({n})}); + } + } + + void ComputeMatrix(OpKernelContext* context, const ConstMatrixMaps& inputs, + MatrixMaps* outputs) final { + const int64_t rows = inputs[0].rows(); + if (rows == 0) { + // If X is an empty matrix (0 rows, 0 col), X * X' == X. + // Therefore, we return X. + return; + } + + // This algorithm relies on denormals, so switch them back on locally. + port::ScopedDontFlushDenormal dont_flush_denormals; + + Eigen::SelfAdjointEigenSolver eig( + inputs[0], + compute_v_ ? Eigen::ComputeEigenvectors : Eigen::EigenvaluesOnly); + // TODO(rmlarsen): Output more detailed error info on failure. + OP_REQUIRES( + context, eig.info() == Eigen::Success, + errors::InvalidArgument("Self-adjoint eigen decomposition was not " + "successful. The input might not be valid.")); + + outputs->at(0) = eig.eigenvalues().template cast(); + if (compute_v_) { + outputs->at(1) = eig.eigenvectors(); + } + } + + private: + bool compute_v_; +}; + +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_LINALG_SELF_ADJOINT_EIG_V2_OP_IMPL_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/linalg/svd_op_impl.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/linalg/svd_op_impl.h new file mode 100644 index 0000000000000000000000000000000000000000..4e6745855e47ff9e122f09f45861bb742ffb9907 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/linalg/svd_op_impl.h @@ -0,0 +1,135 @@ +/* Copyright 2016 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_KERNELS_LINALG_SVD_OP_IMPL_H_ +#define TENSORFLOW_CORE_KERNELS_LINALG_SVD_OP_IMPL_H_ + +// See docs in ../ops/linalg_ops.cc. +// +// This header file is used by the individual svd_*op*.cc files for registering +// individual kernels. A separate file is used for each instantiated kernel to +// improve compilation times. +#include + +#include "Eigen/SVD" // from @eigen_archive +#include "tensorflow/core/framework/kernel_def_builder.h" +#include "tensorflow/core/framework/op_kernel.h" +#include "tensorflow/core/framework/tensor_shape.h" +#include "tensorflow/core/kernels/linalg/linalg_ops_common.h" +#include "tensorflow/core/lib/core/errors.h" +#include "tensorflow/core/platform/logging.h" +#include "tensorflow/core/platform/macros.h" +#include "tensorflow/core/platform/types.h" + +namespace tensorflow { + +template +class SvdOp : public LinearAlgebraOp { + public: + typedef LinearAlgebraOp Base; + + explicit SvdOp(OpKernelConstruction* context) : Base(context) { + OP_REQUIRES_OK(context, context->GetAttr("compute_uv", &compute_uv_)); + OP_REQUIRES_OK(context, context->GetAttr("full_matrices", &full_matrices_)); + } + + using TensorShapes = typename Base::TensorShapes; + + void ValidateInputMatrixShapes( + OpKernelContext* context, + const TensorShapes& input_matrix_shapes) const final { + Base::ValidateSingleMatrix(context, input_matrix_shapes); + } + + TensorShapes GetOutputMatrixShapes( + const TensorShapes& input_matrix_shapes) const final { + int64_t m = input_matrix_shapes[0].dim_size(0); + int64_t n = input_matrix_shapes[0].dim_size(1); + int64_t min_size = std::min(m, n); + if (compute_uv_) { + return TensorShapes({TensorShape({min_size}), + TensorShape({m, full_matrices_ ? m : min_size}), + TensorShape({n, full_matrices_ ? n : min_size})}); + } else { + return TensorShapes({TensorShape({min_size})}); + } + } + + // TODO(rmlarsen): This should depend on compute_uv. See b/30409375. + int64_t GetCostPerUnit(const TensorShapes& input_matrix_shapes) const final { + double m = static_cast(input_matrix_shapes[0].dim_size(0)); + double n = static_cast(input_matrix_shapes[0].dim_size(1)); + double cost = 12 * std::max(m, n) * std::min(m, n) * std::min(m, n); + return cost >= static_cast(kint64max) ? kint64max + : static_cast(cost); + } + + using Matrix = typename Base::Matrix; + using MatrixMaps = typename Base::MatrixMaps; + using ConstMatrixMap = typename Base::ConstMatrixMap; + using ConstMatrixMaps = typename Base::ConstMatrixMaps; + + void ComputeMatrix(OpKernelContext* context, const ConstMatrixMaps& inputs, + MatrixMaps* outputs) final { + int64_t n = inputs[0].cols(); + int64_t m = inputs[0].rows(); + const bool empty = (m == 0 || n == 0); + int options = 0; // Don't compute singular vectors; + if (compute_uv_) { + options = full_matrices_ ? Eigen::ComputeFullU | Eigen::ComputeFullV + : Eigen::ComputeThinU | Eigen::ComputeThinV; + } + + if (empty) { + // For an empty matrix where only one dimension is zero, we still set + // U or V to the unit matrix for the dimension that is non-zero. + if (compute_uv_ && full_matrices_) { + if (m > 0) { + outputs->at(1) = Matrix::Identity(m, m); + } else { + outputs->at(2) = Matrix::Identity(n, n); + } + } + return; + } + + Eigen::BDCSVD svd(inputs[0], options); + if (svd.info() != Eigen::Success) { + LOG(ERROR) << "Eigen::BDCSVD failed with error code " << svd.info(); + outputs->at(0).fill(std::numeric_limits::quiet_NaN()); + if (compute_uv_) { + outputs->at(1).fill(std::numeric_limits::quiet_NaN()); + outputs->at(2).fill(std::numeric_limits::quiet_NaN()); + } + } else { + outputs->at(0) = svd.singularValues().template cast(); + if (compute_uv_) { + outputs->at(1) = svd.matrixU(); + outputs->at(2) = svd.matrixV(); + } + } + } + + private: + bool compute_uv_; + bool full_matrices_; + + SvdOp(const SvdOp&) = delete; + void operator=(const SvdOp&) = delete; +}; + +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_LINALG_SVD_OP_IMPL_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/mkl/mkl_batch_matmul_helper.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/mkl/mkl_batch_matmul_helper.h new file mode 100644 index 0000000000000000000000000000000000000000..d7c1da14e0efcea6b2217d9fdeb20a2ff8b422de --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/mkl/mkl_batch_matmul_helper.h @@ -0,0 +1,104 @@ +/* Copyright 2020 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ +#ifndef TENSORFLOW_CORE_KERNELS_MKL_MKL_BATCH_MATMUL_HELPER_H_ +#define TENSORFLOW_CORE_KERNELS_MKL_MKL_BATCH_MATMUL_HELPER_H_ +#if defined(INTEL_MKL) + +#include "unsupported/Eigen/CXX11/Tensor" // from @eigen_archive +#include "tensorflow/core/framework/register_types.h" +#include "tensorflow/core/framework/tensor.h" +#include "tensorflow/core/framework/tensor_shape.h" +#include "tensorflow/core/framework/type_traits.h" +#include "tensorflow/core/framework/types.h" +#include "tensorflow/core/kernels/mkl/mkl_matmul_ops_common.h" +#include "tensorflow/core/platform/types.h" +#include "tensorflow/core/util/matmul_bcast.h" + +namespace tensorflow { + +struct MklBatchMatMulHelper { + using dims = dnnl::memory::dims; + // This method makes the rank (ndims) of input same as the output by creating + // new axes to the input. For example, if input shape is [a, b, c, d] and + // output shape is [e, f, g, h, i, j], then the reshaped input would have a + // shape of [1, 1, a, b, c, d]. + void ExpandInputDimsToOutputShape(const TensorShape& input_shape, + const TensorShape& output_shape, + dims* reshaped_dims) { + auto ndims_input = input_shape.dims(); + auto ndims_output = output_shape.dims(); + auto dim_offset = ndims_output - ndims_input; + DCHECK(dim_offset > 0); + reshaped_dims->clear(); + reshaped_dims->resize(ndims_output, 1); + auto input_dims = input_shape.dim_sizes(); + for (int dim_idx = 0; dim_idx < ndims_input; ++dim_idx) + reshaped_dims->at(dim_idx + dim_offset) = input_dims[dim_idx]; + } + + std::unique_ptr CreateMatMulParams( + string& prefix, const TensorShape& lhs_shape, + const TensorShape& rhs_shape, const TensorShape& out_shape, bool& adj_x, + bool& adj_y) { + const auto ndims_lhs = lhs_shape.dims(); + const auto ndims_rhs = rhs_shape.dims(); + const auto ndims_out = out_shape.dims(); + auto lhs_dims = TFShapeToMklDnnDims(lhs_shape); + auto rhs_dims = TFShapeToMklDnnDims(rhs_shape); + auto out_dims = TFShapeToMklDnnDims(out_shape); + + // DNNL matmul_primitive requires ranks of inputs and output to be same. + // Create dnnl::memory::dims for inputs and output of same rank. + // It is assumed here that MatMulBCast object creates output_batch_shape as + // a conforming superset of input batch shapes, i.e., ndims_out >= + // ndims_lhs and ndims_out >= ndims_rhs. + if (ndims_lhs < ndims_out) { + ExpandInputDimsToOutputShape(lhs_shape, out_shape, &lhs_dims); + } + if (ndims_rhs < ndims_out) { + ExpandInputDimsToOutputShape(rhs_shape, out_shape, &rhs_dims); + } + auto lhs_strides = CalculateTFStrides(lhs_dims); + auto rhs_strides = CalculateTFStrides(rhs_dims); + auto out_strides = CalculateTFStrides(out_dims); + + if (adj_x) { + int m_idx = ndims_out - 1; + int k_idx = ndims_out - 2; + memory::dim m = lhs_dims[m_idx]; // number of rows in x + std::swap(lhs_dims[m_idx], lhs_dims[k_idx]); + lhs_strides[m_idx] = m; + lhs_strides[k_idx] = 1; + } + + if (adj_y) { + int k_idx = ndims_out - 1; + int n_idx = ndims_out - 2; + memory::dim k = rhs_dims[k_idx]; // number of columns in x + std::swap(rhs_dims[k_idx], rhs_dims[n_idx]); + rhs_strides[k_idx] = k; + rhs_strides[n_idx] = 1; + } + + return std::make_unique(prefix, lhs_dims, rhs_dims, + out_dims, lhs_strides, rhs_strides, + out_strides); + } +}; + +} // namespace tensorflow + +#endif // INTEL_MKL +#endif // TENSORFLOW_CORE_KERNELS_MKL_MKL_BATCH_MATMUL_HELPER_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/mkl/mkl_conv_ops.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/mkl/mkl_conv_ops.h new file mode 100644 index 0000000000000000000000000000000000000000..eac82beadfdd09443daded40836d64646cc4deb8 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/mkl/mkl_conv_ops.h @@ -0,0 +1,711 @@ +/* Copyright 2017 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_KERNELS_MKL_MKL_CONV_OPS_H_ +#define TENSORFLOW_CORE_KERNELS_MKL_MKL_CONV_OPS_H_ + +#ifdef INTEL_MKL +#include +#include +#include + +#include "dnnl.hpp" +#include "tensorflow/core/framework/bounds_check.h" +#include "tensorflow/core/framework/kernel_shape_util.h" +#include "tensorflow/core/framework/numeric_op.h" +#include "tensorflow/core/framework/op_kernel.h" +#include "tensorflow/core/framework/register_types.h" +#include "tensorflow/core/framework/tensor.h" +#include "tensorflow/core/framework/tensor_shape.h" +#include "tensorflow/core/framework/tensor_slice.h" +#include "tensorflow/core/kernels/conv_grad_ops.h" +#include "tensorflow/core/kernels/ops_util.h" +#include "tensorflow/core/lib/core/errors.h" +#include "tensorflow/core/lib/gtl/array_slice.h" +#include "tensorflow/core/lib/strings/numbers.h" +#include "tensorflow/core/lib/strings/str_util.h" +#include "tensorflow/core/platform/macros.h" +#include "tensorflow/core/util/mkl_util.h" +#include "tensorflow/core/util/onednn_env_vars.h" +#include "tensorflow/core/util/padding.h" +#include "tensorflow/core/util/tensor_format.h" + +using dnnl::convolution_forward; +using dnnl::prop_kind; +using dnnl::stream; + +namespace tensorflow { + +#ifndef ENABLE_ONEDNN_V3 +// Op descriptor is no longer supported in oneDNN v3.x. Instead, primitive +// descriptor will directly accept primitive parameters during creation. +using ConvFwdDesc = dnnl::convolution_forward::desc; +#endif // !ENABLE_ONEDNN_V3 +using ConvFwdPd = dnnl::convolution_forward::primitive_desc; + +class MklDnnConvUtil { + protected: + OpKernelContext* context_; // We don't own this. + std::vector strides_; + std::vector dilations_; + Padding padding_; + TensorFormat data_format_; + + public: + MklDnnConvUtil(OpKernelContext* context, const std::vector& strides, + Padding pad, TensorFormat fm, + const std::vector& dilations, bool is_depthwise = false) + : context_(context), + strides_(strides), + dilations_(dilations), + padding_(pad), + data_format_(fm) {} + + virtual ~MklDnnConvUtil() { context_ = nullptr; } + + // Calculate Convolution strides + virtual inline void GetStridesInMklOrder(memory::dims* strides) { + // For now we take the stride from the second and third dimensions only + // (we do not support striding on the batch or depth dimension). + DCHECK(strides); + if (strides_.size() == 4) { + int stride_rows = GetTensorDim(strides_, data_format_, 'H'); + int stride_cols = GetTensorDim(strides_, data_format_, 'W'); + *strides = {stride_rows, stride_cols}; + } else if (strides_.size() == 5) { + int stride_planes = GetTensorDim(strides_, data_format_, '0'); + int stride_rows = GetTensorDim(strides_, data_format_, '1'); + int stride_cols = GetTensorDim(strides_, data_format_, '2'); + *strides = {stride_planes, stride_rows, stride_cols}; + } + } + + // Calculate Convolution dilations + virtual inline void GetDilationsInMklOrder(memory::dims* dilations) { + // For now we take the dilation from the second and third dimensions only + // (we do not support dilation on the batch or depth dimension). + DCHECK(dilations); + if (dilations_.size() == 4) { + int dilations_rows = GetTensorDim(dilations_, data_format_, 'H'); + int dilations_cols = GetTensorDim(dilations_, data_format_, 'W'); + *dilations = {dilations_rows, dilations_cols}; + } else if (dilations_.size() == 5) { + int dilations_planes = GetTensorDim(dilations_, data_format_, '0'); + int dilations_rows = GetTensorDim(dilations_, data_format_, '1'); + int dilations_cols = GetTensorDim(dilations_, data_format_, '2'); + *dilations = {dilations_planes, dilations_rows, dilations_cols}; + } + } + + // Calculate Convolution input size in oneDNN order. oneDNN + // requires input in NCHW/NCDHW format. Function does not return anything. + // But errors arising from sanity checks are returned in context's + // status. + virtual inline void GetInputSizeInMklOrder(const TensorShape& input_shape, + memory::dims* input_dims) { +#define CHECK_BOUNDS(val, err_msg) \ + do { \ + OP_REQUIRES(context_, \ + FastBoundsCheck(val, std::numeric_limits::max()), \ + errors::InvalidArgument(err_msg)); \ + } while (0) + + DCHECK(input_dims); + + // Input channel + int64 input_depth_raw = GetTensorDim(input_shape, data_format_, 'C'); + int input_depth = static_cast(input_depth_raw); + + // Input batch + int64 input_batch_raw = GetTensorDim(input_shape, data_format_, 'N'); + CHECK_BOUNDS(input_batch_raw, "Input batch too large"); + int input_batch = static_cast(input_batch_raw); + + if (strides_.size() == 4) { // NCHW format for Conv2D + // Input rows/height + int64 input_rows_raw = GetTensorDim(input_shape, data_format_, 'H'); + CHECK_BOUNDS(input_rows_raw, "Input rows too large"); + int input_rows = static_cast(input_rows_raw); + + // Input columns/width + int64 input_cols_raw = GetTensorDim(input_shape, data_format_, 'W'); + CHECK_BOUNDS(input_cols_raw, "Input cols too large"); + int input_cols = static_cast(input_cols_raw); + + // oneDNN always requires input in NCHW format Conv2D. + std::vector input_sizes(4, -1); + input_sizes[MklDnnDims::Dim_N] = input_batch; + input_sizes[MklDnnDims::Dim_C] = input_depth; + input_sizes[MklDnnDims::Dim_H] = input_rows; + input_sizes[MklDnnDims::Dim_W] = input_cols; + *input_dims = input_sizes; + } else if (strides_.size() == 5) { // NCDHW format for Conv3D + // Input planes/third-dimension + int64 input_planes_raw = GetTensorDim(input_shape, data_format_, '0'); + CHECK_BOUNDS(input_planes_raw, "Input depth too large"); + int input_planes = static_cast(input_planes_raw); + + // Input rows/height + int64 input_rows_raw = GetTensorDim(input_shape, data_format_, '1'); + CHECK_BOUNDS(input_rows_raw, "Input rows too large"); + int input_rows = static_cast(input_rows_raw); + + // Input columns/width + int64 input_cols_raw = GetTensorDim(input_shape, data_format_, '2'); + CHECK_BOUNDS(input_cols_raw, "Input cols too large"); + int input_cols = static_cast(input_cols_raw); + + // oneDNN always requires input in NCDHW format for Conv3D. + std::vector input_sizes(5, -1); + input_sizes[MklDnnDims3D::Dim3d_N] = input_batch; + input_sizes[MklDnnDims3D::Dim3d_C] = input_depth; + input_sizes[MklDnnDims3D::Dim3d_D] = input_planes; + input_sizes[MklDnnDims3D::Dim3d_H] = input_rows; + input_sizes[MklDnnDims3D::Dim3d_W] = input_cols; + *input_dims = input_sizes; + } +#undef CHECK_BOUNDS + } + + // Calculate Convolution filter size in oneDNN order. + // oneDNN requires filter in OIHW (Conv2D) or OIDHW (Conv3D) format. + // Function does not return anything. + // But errors arising from sanity checks are returned in context's + // status. This function differs from GetConvFilterSizeInMklOrder in + // parameter for input - it accepts src_shape since Convolution Backward + // Input gets shape of input tensor rather than actual tensor (Convolution + // forward gets actual tensor as input). + // + // TODO(intel-tf): Add similar function for input and filter in MklShape. + virtual inline void GetFilterSizeInMklOrder(const TensorShape& input_shape, + const TensorShape& filter_shape, + memory::dims* filter_dims, + bool* is_grouped_convolution, + bool is_depthwise) { + DCHECK(filter_dims); + + OP_REQUIRES(context_, filter_shape.dims() == strides_.size(), + errors::InvalidArgument((strides_.size() == 4) + ? "filter must be 4-dimensional: " + : "filter must be 5-dimensional: ", + filter_shape.DebugString())); + + for (int i = 0; i < ((strides_.size() == 4) ? 3 : 5); i++) { + OP_REQUIRES(context_, + FastBoundsCheck(filter_shape.dim_size(i), + std::numeric_limits::max()), + errors::InvalidArgument("filter too large")); + } + + int input_depth = GetTensorDim(input_shape, data_format_, 'C'); + + if (strides_.size() == 4) { // Conv2D + // TF filter is always in (rows, cols, in_depth, out_depth) order. + int filter_rows = + static_cast(filter_shape.dim_size(TF_2DFILTER_DIM_H)); + int filter_cols = + static_cast(filter_shape.dim_size(TF_2DFILTER_DIM_W)); + int filter_in_depth = + static_cast(filter_shape.dim_size(TF_2DFILTER_DIM_I)); + int filter_out_depth = + static_cast(filter_shape.dim_size(TF_2DFILTER_DIM_O)); + OP_REQUIRES(context_, input_depth % filter_in_depth == 0, + errors::InvalidArgument( + "input depth must be evenly divisible by filter depth: ", + input_depth, " vs ", filter_in_depth)); + *is_grouped_convolution = filter_in_depth != input_depth; + int group_count = input_depth / filter_in_depth; + OP_REQUIRES(context_, group_count > 0, + errors::InvalidArgument( + "grouped convolution must have at least one group: ", + group_count, " groups")); + + // oneDNN always needs filter in OIHW format for regular convolutions + // and GOIHW for grouped/depthwise convolutions, + // OIHW = (out_depth, in_depth, rows, cols) + // GOIHW = (group, out_depth, in_depth, rows, cols) + // Specifically for depthwise G=filter_indepth, O=filter_outdepth, I=1 + if (is_depthwise) { + std::vector filter_sizes(5, -1); + filter_sizes[MKL_GROUP_FILTER_DIM_G] = filter_in_depth; + filter_sizes[MKL_GROUP_FILTER_DIM_O] = filter_out_depth; + filter_sizes[MKL_GROUP_FILTER_DIM_I] = 1; + filter_sizes[MKL_GROUP_FILTER_DIM_H] = filter_rows; + filter_sizes[MKL_GROUP_FILTER_DIM_W] = filter_cols; + *filter_dims = filter_sizes; + } else if (*is_grouped_convolution) { + // TODO(intel-tf): Directly set filter_dims. Same for other places. + std::vector filter_sizes(5, -1); + filter_sizes[MKL_GROUP_FILTER_DIM_G] = group_count; + filter_sizes[MKL_GROUP_FILTER_DIM_O] = filter_out_depth / group_count; + filter_sizes[MKL_GROUP_FILTER_DIM_I] = filter_in_depth; + filter_sizes[MKL_GROUP_FILTER_DIM_H] = filter_rows; + filter_sizes[MKL_GROUP_FILTER_DIM_W] = filter_cols; + *filter_dims = filter_sizes; + } else { + std::vector filter_sizes(4, -1); + filter_sizes[MklDnnDims::Dim_O] = filter_out_depth; + filter_sizes[MklDnnDims::Dim_I] = filter_in_depth; + filter_sizes[MklDnnDims::Dim_H] = filter_rows; + filter_sizes[MklDnnDims::Dim_W] = filter_cols; + *filter_dims = filter_sizes; + } + } else { // Conv3D + OP_REQUIRES(context_, input_depth == filter_shape.dim_size(3), + errors::InvalidArgument( + "input and filter must have the same depth: ", + input_depth, " vs ", filter_shape.dim_size(3))); + + // TF filter is always in (planes, rows, cols, in_depth, out_depth) order. + int filter_planes = + static_cast(filter_shape.dim_size(TF_3DFILTER_DIM_P)); + int filter_rows = + static_cast(filter_shape.dim_size(TF_3DFILTER_DIM_H)); + int filter_cols = + static_cast(filter_shape.dim_size(TF_3DFILTER_DIM_W)); + int filter_in_depth = + static_cast(filter_shape.dim_size(TF_3DFILTER_DIM_I)); + int filter_out_depth = + static_cast(filter_shape.dim_size(TF_3DFILTER_DIM_O)); + + // oneDNN always needs filter in OIDHW format. + // OIDHW = (out_depth, in_depth, planes, rows, cols) + std::vector filter_sizes(5, -1); + filter_sizes[MklDnnDims3D::Dim3d_O] = filter_out_depth; + filter_sizes[MklDnnDims3D::Dim3d_I] = filter_in_depth; + filter_sizes[MklDnnDims3D::Dim3d_D] = filter_planes; + filter_sizes[MklDnnDims3D::Dim3d_H] = filter_rows; + filter_sizes[MklDnnDims3D::Dim3d_W] = filter_cols; + *filter_dims = filter_sizes; + } + } + + // Calculate Convolution filter size in oneDNN order. + // oneDNN requires filter in OIHW (Conv2D) or OIDHW(Conv3D format. + // Function does not return anything. But errors arising from sanity + // checks are returned in context's status. + virtual inline void GetFilterSizeInMklOrder(size_t src_index, + size_t filter_index, + memory::dims* filter_dims, + bool* is_grouped_convolution, + bool is_depthwise) { + DCHECK(filter_dims); + GetFilterSizeInMklOrder(GetTfShape(context_, src_index), + GetTfShape(context_, filter_index), filter_dims, + is_grouped_convolution, is_depthwise); + } + + // Calculate Bias size for 2D or 3D Convolution. Function does not + // return anything, but may set an error in context status. + virtual inline void GetBiasSizeInMklOrder(size_t bias_index, + memory::dims* bias_dims) { + const Tensor& bias = MklGetInput(context_, bias_index); + if (bias.dims() > 1) { + if (strides_.size() == 4) { + OP_REQUIRES( + context_, bias.dims() <= 4, + errors::InvalidArgument("For NHWC format, bias should have " + "4 or less dimensions", + bias.shape().DebugString())); + } else if (strides_.size() == 5) { + OP_REQUIRES( + context_, bias.dims() <= 5, + errors::InvalidArgument("For NDHWC format, bias should have " + "5 or less dimensions", + bias.shape().DebugString())); + } + // Make sure all the dims except channel(last) is 1 + for (int i = 0; i < bias.dims() - 1; i++) { + OP_REQUIRES( + context_, bias.dim_size(i) == 1, + errors::InvalidArgument("For bias_dims > 1, all except the last " + "dimension (channel) must be 1: ", + bias.shape().DebugString())); + } + *bias_dims = {static_cast(bias.dim_size(bias.dims() - 1))}; + } else { + *bias_dims = {static_cast(bias.dim_size(0))}; + } + } + + // Function to calculate output and padding size for 2D/3D convolution. + // + // Calculate output shape of Convolution in oneDNN and TensorFlow order. + // oneDNN uses NCHW(Conv2D) or NCDHW(Conv3D) for output order. + // But TensorFlow output will be in NHWC||NCHW(Conv2D) or + // NDHWC||NCDHW(Conv3D) format depending on data format. + // Function also calculates left, right, top and bottom pads. + // Function does not return any status which is set with context status. + // + // TODO(intel-tf): Add similar function for input and filter in MklShape. + virtual inline void GetOutputAndPadSizeInMklOrder( + const TensorShape& input_shape, const TensorShape& filter_shape, + const memory::dims& strides, const memory::dims& dilations, + memory::dims* output_dims_tf_order, memory::dims* output_dims_mkl_order, + memory::dims* pad_l, memory::dims* pad_r, bool is_grouped_convolution, + bool pad_enabled = false, bool is_depthwise = false) { + DCHECK(output_dims_tf_order); + DCHECK(output_dims_mkl_order); + DCHECK(pad_l); + DCHECK(pad_r); + + bool is_conv2d = (strides_.size() == 4); + int input_planes, input_rows, input_cols; + if (is_conv2d) { + input_rows = GetTensorDim(input_shape, data_format_, 'H'); + input_cols = GetTensorDim(input_shape, data_format_, 'W'); + } else { + input_planes = GetTensorDim(input_shape, data_format_, '0'); + input_rows = GetTensorDim(input_shape, data_format_, '1'); + input_cols = GetTensorDim(input_shape, data_format_, '2'); + } + + // Filter dimension + // Conv2D: + // First dimension: rows/height. + // Second dimension: cols/width. + // Conv3D: + // First dimension: planes/depth. + // Second dimension: rows/height. + // Third dimension: cols/width. + + int filter_planes, filter_rows, filter_cols; + if (is_conv2d) { + filter_rows = filter_shape.dim_size(TF_2DFILTER_DIM_H); + filter_cols = filter_shape.dim_size(TF_2DFILTER_DIM_W); + } else { + filter_planes = filter_shape.dim_size(TF_3DFILTER_DIM_P); + filter_rows = filter_shape.dim_size(TF_3DFILTER_DIM_H); + filter_cols = filter_shape.dim_size(TF_3DFILTER_DIM_W); + } + + int stride_planes, stride_rows, stride_cols; + int dilation_planes, dilation_rows, dilation_cols; + if (is_conv2d) { + // Conv2D stride is a vector of 2 elements: {s_r, s_c} + stride_rows = strides[0]; + stride_cols = strides[1]; + dilation_rows = dilations[0]; + dilation_cols = dilations[1]; + } else { + // Conv3D stride is a vector of 3 elements: {s_d, s_r, s_c} + stride_planes = strides[0]; + stride_rows = strides[1]; + stride_cols = strides[2]; + dilation_planes = dilations[0]; + dilation_rows = dilations[1]; + dilation_cols = dilations[2]; + } + + // Output batch is same as input batch. + int out_batch = GetTensorDim(input_shape, data_format_, 'N'); + int out_depth; + + // TODO(intel-tf) add support for 3-D Depthwise + + // Output depth is same as last dimension for filters for regular + // convolutions and group convolutions. For depthwise it is in_depth * + // channel_multiplier. The channel_multiplier is the last dimension of + // TF filter for depthwise convolutions. + if (is_depthwise) { + out_depth = (filter_shape.dim_size(TF_2DFILTER_DIM_I) * + filter_shape.dim_size(TF_2DFILTER_DIM_O)); + } else if (is_grouped_convolution) { + out_depth = filter_shape.dim_size(TF_2DFILTER_DIM_O); + } else { + out_depth = filter_shape.dim_size( + is_conv2d ? static_cast(TF_2DFILTER_DIM_O) + : static_cast(TF_3DFILTER_DIM_O)); + } + + int64 out_rows = 0, out_cols = 0, out_planes = 0; + int64 pad_top = 0, pad_bottom = 0, pad_left = 0, pad_right = 0; + int64 pad_front, pad_back; + + if (is_conv2d) { + Padding padding_type; + if (pad_enabled) { + padding_type = Padding::EXPLICIT; + pad_top = static_cast((*pad_l)[0]); + pad_left = static_cast((*pad_l)[1]); + pad_bottom = static_cast((*pad_r)[0]); + pad_right = static_cast((*pad_r)[1]); + } else { + padding_type = padding_; + } + OP_REQUIRES_OK(context_, + GetWindowedOutputSizeVerbose( + input_rows, filter_rows, dilation_rows, stride_rows, + padding_type, &out_rows, &pad_top, &pad_bottom)); + OP_REQUIRES_OK(context_, + GetWindowedOutputSizeVerbose( + input_cols, filter_cols, dilation_cols, stride_cols, + padding_type, &out_cols, &pad_left, &pad_right)); + } else { + Padding padding_type; + if (pad_enabled) { + padding_type = Padding::EXPLICIT; + pad_front = static_cast((*pad_l)[0]); + pad_top = static_cast((*pad_l)[1]); + pad_left = static_cast((*pad_l)[2]); + pad_back = static_cast((*pad_r)[0]); + pad_bottom = static_cast((*pad_r)[1]); + pad_right = static_cast((*pad_r)[2]); + } else { + padding_type = padding_; + } + OP_REQUIRES_OK(context_, GetWindowedOutputSizeVerbose( + input_planes, filter_planes, dilation_planes, + stride_planes, padding_type, &out_planes, + &pad_front, &pad_back)); + OP_REQUIRES_OK(context_, + GetWindowedOutputSizeVerbose( + input_rows, filter_rows, dilation_rows, stride_rows, + padding_type, &out_rows, &pad_top, &pad_bottom)); + OP_REQUIRES_OK(context_, + GetWindowedOutputSizeVerbose( + input_cols, filter_cols, dilation_cols, stride_cols, + padding_type, &out_cols, &pad_left, &pad_right)); + } + + if (is_conv2d) { + // If pad_enabled, i.e., pad and conv op are fused, then + // all pads are already passed from pad op through + // *pad_l and *pad_r and they don't need to be set here. + if (!pad_enabled) { + *pad_l = {static_cast(pad_top), static_cast(pad_left)}; + *pad_r = {static_cast(pad_bottom), static_cast(pad_right)}; + } + } else { + // If pad_enabled, i.e., pad and conv op are fused, then + // all pads are already passed from pad op through + // *pad_l and *pad_r and they don't need to be set here. + if (!pad_enabled) { + *pad_l = {static_cast(pad_front), static_cast(pad_top), + static_cast(pad_left)}; + *pad_r = {static_cast(pad_back), static_cast(pad_bottom), + static_cast(pad_right)}; + } + } + // Tensorflow output is in data_format order. + // Conv2D: NHWC or NCHW + // Conv3D: NDHWC or NCDHW + // oneDNN uses asymmetric padding. + TensorShape out_shape; + if (is_conv2d) { + OP_REQUIRES_OK( + context_, ShapeFromFormatWithStatus(data_format_, out_batch, out_rows, + out_cols, out_depth, &out_shape)); + } else { + OP_REQUIRES_OK(context_, ShapeFromFormatWithStatus( + data_format_, out_batch, + {{out_planes, out_rows, out_cols}}, + out_depth, &out_shape)); + } + *output_dims_tf_order = TFShapeToMklDnnDims(out_shape); + if (is_grouped_convolution) { + int out_depth = GetTensorDim(out_shape, data_format_, 'C'); + int input_depth = GetTensorDim(input_shape, data_format_, 'C'); + int filter_in_depth = + static_cast(filter_shape.dim_size(TF_2DFILTER_DIM_I)); + int num_groups = input_depth / filter_in_depth; + OP_REQUIRES( + context_, out_depth % num_groups == 0 && out_depth >= num_groups, + errors::InvalidArgument( + "output depth must be evenly divisible by number of groups: ", + out_depth, " vs ", num_groups)); + } + if (is_conv2d) { + // For Conv2D, oneDNN always needs output in NCHW format. + std::vector output_sizes(4, -1); + output_sizes[MklDnnDims::Dim_N] = out_batch; + output_sizes[MklDnnDims::Dim_C] = out_depth; + output_sizes[MklDnnDims::Dim_H] = static_cast(out_rows); + output_sizes[MklDnnDims::Dim_W] = static_cast(out_cols); + *output_dims_mkl_order = output_sizes; + } else { + std::vector output_sizes(5, -1); + output_sizes[MklDnnDims3D::Dim3d_N] = out_batch; + output_sizes[MklDnnDims3D::Dim3d_C] = out_depth; + output_sizes[MklDnnDims3D::Dim3d_D] = static_cast(out_planes); + output_sizes[MklDnnDims3D::Dim3d_H] = static_cast(out_rows); + output_sizes[MklDnnDims3D::Dim3d_W] = static_cast(out_cols); + *output_dims_mkl_order = output_sizes; + } + } + + // Calculate output and pad size of forward Convolution operator. + // See comment on GetConvOutputAndPadSizeInMklOrder for parameters. + // + // Function does not return anything, but sets error in context status. + inline void GetOutputAndPadSizeInMklOrder( + size_t src_index, size_t filter_index, const memory::dims& strides, + const memory::dims& dilations, memory::dims* output_dims_tf_order, + memory::dims* output_dims_mkl_order, memory::dims* pad_l, + memory::dims* pad_r, bool is_grouped_convolution, bool is_depthwise) { + DCHECK(output_dims_tf_order); + DCHECK(output_dims_mkl_order); + DCHECK(pad_l); + DCHECK(pad_r); + + auto input_tf_shape = GetTfShape(context_, src_index); + auto filter_tf_shape = GetTfShape(context_, filter_index); + + if (strides_.size() == 4) { + // Conv2D + OP_REQUIRES(context_, input_tf_shape.dims() == 4, + errors::InvalidArgument("input must be 4-dimensional", + input_tf_shape.DebugString())); + OP_REQUIRES(context_, filter_tf_shape.dims() == 4, + errors::InvalidArgument("filter must be 4-dimensional", + filter_tf_shape.DebugString())); + } else { + // Conv3D + OP_REQUIRES(context_, input_tf_shape.dims() == 5, + errors::InvalidArgument("input must be 5-dimensional", + input_tf_shape.DebugString())); + OP_REQUIRES(context_, filter_tf_shape.dims() == 5, + errors::InvalidArgument("filter must be 5-dimensional", + filter_tf_shape.DebugString())); + } + + GetOutputAndPadSizeInMklOrder(input_tf_shape, filter_tf_shape, strides, + dilations, output_dims_tf_order, + output_dims_mkl_order, pad_l, pad_r, + is_grouped_convolution, is_depthwise); + } + + // Wrapper function to calculate input, filter, and output sizes of + // Conv2D/Conv3D in MKL order: + // Conv2D: NCHW for input and output; OIHW for filter. + // Conv3D: NCDHW for input and output; OIDHW for filter. + // Function also calculates output shape in Tensorflow order. + // Additionally, it also calculates strides and paddings. + // + // Function does not return anything, but sets error in context status. + inline void GetConvFwdSizesInMklOrder( + const TensorShape& input_shape, const TensorShape& filter_shape, + memory::dims* input_dims, memory::dims* filter_dims, + memory::dims* strides, memory::dims* dilations, + memory::dims* output_dims_tf_order, memory::dims* output_dims_mkl_order, + memory::dims* pad_l, memory::dims* pad_r, bool* is_grouped_convolution, + bool pad_enabled = false, bool is_depthwise = false) { + DCHECK(input_dims); + DCHECK(filter_dims); + DCHECK(strides); + DCHECK(dilations); + DCHECK(output_dims_tf_order); + DCHECK(output_dims_mkl_order); + DCHECK(pad_l); + DCHECK(pad_r); + + GetInputSizeInMklOrder(input_shape, input_dims); + if (!context_->status().ok()) return; + GetFilterSizeInMklOrder(input_shape, filter_shape, filter_dims, + is_grouped_convolution, is_depthwise); + if (!context_->status().ok()) return; + GetStridesInMklOrder(strides); + GetDilationsInMklOrder(dilations); + GetOutputAndPadSizeInMklOrder( + input_shape, filter_shape, *strides, *dilations, output_dims_tf_order, + output_dims_mkl_order, pad_l, pad_r, *is_grouped_convolution, + pad_enabled, is_depthwise); + if (!context_->status().ok()) return; + } +}; + +///////////////////////////////////////////////////////////////////// +/// Common class that implements ConvBackpropFilter and Input +///////////////////////////////////////////////////////////////////// + +template +class MklConvBackpropCommonOp : public OpKernel { + public: + ~MklConvBackpropCommonOp() {} + explicit MklConvBackpropCommonOp(OpKernelConstruction* context) + : OpKernel(context) { + string data_format_str; + OP_REQUIRES_OK(context, context->GetAttr("data_format", &data_format_str)); + OP_REQUIRES(context, FormatFromString(data_format_str, &data_format_), + errors::InvalidArgument("Invalid data format")); + OP_REQUIRES_OK(context, context->GetAttr("strides", &strides_)); + int stride_n = GetTensorDim(strides_, data_format_, 'N'); + int stride_c = GetTensorDim(strides_, data_format_, 'C'); + OP_REQUIRES( + context, (stride_n == 1 && stride_c == 1), + errors::InvalidArgument("Current implementation does not yet support " + "strides in the batch and depth dimensions.")); + + // Depthwise Convolution doesn't have dilation parameter + if (!is_depthwise) { + OP_REQUIRES_OK(context, context->GetAttr("dilations", &dilations_)); + if (strides_.size() == 4) { + // Check Conv2D dilations + OP_REQUIRES( + context, dilations_.size() == 4, + errors::InvalidArgument("Sliding window dilations field must " + "specify 4 dimensions")); + int dilation_n = GetTensorDim(dilations_, data_format_, 'N'); + int dilation_c = GetTensorDim(dilations_, data_format_, 'C'); + int dilation_h = GetTensorDim(dilations_, data_format_, 'H'); + int dilation_w = GetTensorDim(dilations_, data_format_, 'W'); + OP_REQUIRES(context, (dilation_n == 1 && dilation_c == 1), + errors::InvalidArgument( + "Current implementation does not yet support " + "dilations in the batch and depth dimensions.")); + OP_REQUIRES( + context, dilation_h > 0 && dilation_w > 0, + errors::InvalidArgument("Dilated rates should be larger than 0.")); + } + } else { + // Set dilations as 1 for depthwise conv + // for future support to align with Tensorflow + dilations_ = {1, 1, 1, 1}; + } + + OP_REQUIRES_OK(context, context->GetAttr("padding", &padding_)); + } + + protected: + // data members accessible to derived classes. + std::vector dilations_; + std::vector strides_; + Padding padding_; + TensorFormat data_format_; // NCHW or NHWC +}; + +///////////////////////////////////////////////////////////////////// +/// Dummy Mkl op that is just used for operators that are intermediate +/// output of node fusion in the graph +///////////////////////////////////////////////////////////////////// + +template +class MklDummyOp : public OpKernel { + public: + ~MklDummyOp() {} + + explicit MklDummyOp(OpKernelConstruction* context) : OpKernel(context) {} + + void Compute(OpKernelContext* context) override { + TF_CHECK_OK( + errors::Unimplemented("This is a dummy op." + "It should not have been invoked.")); + } +}; + +} // namespace tensorflow + +#endif // INTEL_MKL +#endif // TENSORFLOW_CORE_KERNELS_MKL_MKL_CONV_OPS_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/mkl/mkl_eltwise_activation_base_op.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/mkl/mkl_eltwise_activation_base_op.h new file mode 100644 index 0000000000000000000000000000000000000000..a1d1268dd4a8be2c1a0e27b2ac3d762b4ea9412f --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/mkl/mkl_eltwise_activation_base_op.h @@ -0,0 +1,351 @@ +/* Copyright 2021 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_KERNELS_MKL_MKL_ELTWISE_ACTIVATION_BASE_OP_H_ +#define TENSORFLOW_CORE_KERNELS_MKL_MKL_ELTWISE_ACTIVATION_BASE_OP_H_ + +// See docs in ../ops/mkl_nn_ops.cc. + +#ifdef INTEL_MKL + +#include + +#include "unsupported/Eigen/CXX11/Tensor" // from @eigen_archive +#include "dnnl.hpp" +#include "tensorflow/core/framework/numeric_op.h" +#include "tensorflow/core/framework/op_kernel.h" +#include "tensorflow/core/framework/register_types.h" +#include "tensorflow/core/framework/tensor.h" +#include "tensorflow/core/lib/core/errors.h" +#include "tensorflow/core/util/mkl_util.h" +#if defined(DNNL_AARCH64_USE_ACL) && defined(ENABLE_ONEDNN_OPENMP) +#include "tensorflow/core/platform/mutex.h" +#endif + +using dnnl::algorithm; +using dnnl::eltwise_forward; +using dnnl::memory; +using dnnl::prop_kind; +using dnnl::stream; + +using EltwiseFwdActivationPd = dnnl::eltwise_forward::primitive_desc; + +namespace tensorflow { +#ifndef ENABLE_ONEDNN_V3 +#define GET_MEMORY_DESC(md) md.data +#else +#define GET_MEMORY_DESC(md) md +#endif // !ENABLE_ONEDNN_V3 + +// TODO(tf-onednn): Consolidate this class with `MklEltWiseFwdParams` +// in `mkl_relu_op.cc`. +// +// The implementation of this class is very similar to it and it +// should be consolidated to one class +template +class MklEltwiseFwdActivationParams { + public: + memory::dims src_dims; + memory::desc src_md; +#ifdef ENABLE_ONEDNN_V3 + memory::desc dst_md; +#endif // ENABLE_ONEDNN_V3 + algorithm alg_kind; + float alpha; + float beta; + + MklEltwiseFwdActivationParams(memory::dims src_dims, memory::desc src_md, +#ifdef ENABLE_ONEDNN_V3 + memory::desc dst_md, +#endif // ENABLE_ONEDNN_V3 + algorithm alg_kind, float alpha, float beta) + : src_dims(src_dims), + src_md(src_md), +#ifdef ENABLE_ONEDNN_V3 + dst_md(dst_md), +#endif // ENABLE_ONEDNN_V3 + alg_kind(alg_kind), + alpha(alpha), + beta(beta) { + } +}; + +template +class MklEltwiseFwdActivationPrimitive : public MklPrimitive { + public: + explicit MklEltwiseFwdActivationPrimitive( + const MklEltwiseFwdActivationParams& fwdParams) + : MklPrimitive(engine(engine::kind::cpu, 0)) { + // create eltwise primitive + if (context_.eltwise_fwd == nullptr) { + Setup(fwdParams); + } + } + + ~MklEltwiseFwdActivationPrimitive() {} + + // Eltwise forward execute + // src_data: input data buffer of src + // dst_data: output data buffer of dst + void Execute(const T* src_data, T* dst_data, OpKernelContext* op_context) { +#if defined(DNNL_AARCH64_USE_ACL) && defined(ENABLE_ONEDNN_OPENMP) + mutex_lock lock(primitive_execution_mu_); +#endif + context_.src_mem->set_data_handle( + static_cast(const_cast(src_data))); + context_.dst_mem->set_data_handle(static_cast(dst_data)); + DCHECK_EQ(context_.fwd_primitives.size(), + context_.fwd_primitives_args.size()); + + std::vector net; + net.push_back(eltwise_forward(*context_.fwd_pd)); + std::vector net_args; + net_args.push_back( + {{DNNL_ARG_SRC, *context_.src_mem}, {DNNL_ARG_DST, *context_.dst_mem}}); + // execute eltwise_fwd primitve + ExecutePrimitive(net, &net_args, GetEngine(), op_context); + + // After execution, set data handle back. + context_.src_mem->set_data_handle(DummyData); + context_.dst_mem->set_data_handle(DummyData); + } + + std::shared_ptr GetEltwiseFwdActivationPd() { + return context_.fwd_pd; + } + + private: + // Primitive reuse context for eltwise Fwd ops: Relu, Elu, Tanh + struct EltwiseFwdActivationContext { + // oneDNN memory + std::shared_ptr src_mem; + std::shared_ptr dst_mem; + + // desc & primitive desc +#ifndef ENABLE_ONEDNN_V3 + std::shared_ptr fwd_desc; +#endif // !ENABLE_ONEDNN_V3 + std::shared_ptr fwd_pd; + + // memory desc + std::shared_ptr src_md; + std::shared_ptr dst_md; + + // memory primitive desc + std::shared_ptr src_mpd; + + // Eltwise primitive + std::shared_ptr eltwise_fwd; + + std::vector fwd_primitives; + + std::vector> fwd_primitives_args; + + EltwiseFwdActivationContext() + : src_mem(nullptr), + dst_mem(nullptr), +#ifndef ENABLE_ONEDNN_V3 + fwd_desc(nullptr), +#endif // !ENABLE_ONEDNN_V3 + fwd_pd(nullptr), + src_md(nullptr), + dst_md(nullptr), + src_mpd(nullptr), + eltwise_fwd(nullptr) { + } + }; + + // Eltwise forward primitive setup + void Setup(const MklEltwiseFwdActivationParams& fwdParams) { + // create memory descriptors for eltwise data with specified format + context_.src_md.reset(new memory::desc(GET_MEMORY_DESC(fwdParams.src_md))); + context_.src_mpd.reset(new memory::desc(*context_.src_md)); + + // Create an eltwise forward descriptor and primitive descriptor +#ifndef ENABLE_ONEDNN_V3 + context_.fwd_desc.reset(new eltwise_forward::desc( + prop_kind::forward, fwdParams.alg_kind, *context_.src_md, + fwdParams.alpha, fwdParams.beta)); + context_.fwd_pd.reset( + new EltwiseFwdActivationPd(*context_.fwd_desc, cpu_engine_)); +#else + context_.dst_md.reset(new memory::desc(fwdParams.dst_md)); + context_.fwd_pd.reset(new EltwiseFwdActivationPd( + cpu_engine_, prop_kind::forward, fwdParams.alg_kind, *context_.src_md, + *context_.dst_md, fwdParams.alpha, fwdParams.beta)); +#endif // !ENABLE_ONEDNN_V3 + auto fwd_pd = context_.fwd_pd.get(); + + // Create memory primitive based on dummy data + context_.src_mem.reset( + new memory(fwd_pd->src_desc(), cpu_engine_, DummyData)); + context_.dst_mem.reset( + new memory(fwd_pd->dst_desc(), cpu_engine_, DummyData)); + // Create eltwise primitive and add it to net + context_.eltwise_fwd.reset(new eltwise_forward(*context_.fwd_pd)); + context_.fwd_primitives_args.push_back( + {{DNNL_ARG_SRC, *context_.src_mem}, {DNNL_ARG_DST, *context_.dst_mem}}); + context_.fwd_primitives.push_back(*context_.eltwise_fwd); + } + + struct EltwiseFwdActivationContext context_; + +#if defined(DNNL_AARCH64_USE_ACL) && defined(ENABLE_ONEDNN_OPENMP) + mutex primitive_execution_mu_; +#endif +}; + +template +class MklEltwiseFwdActivationPrimitiveFactory : public MklPrimitiveFactory { + public: + static MklEltwiseFwdActivationPrimitive* Get( + const MklEltwiseFwdActivationParams& fwdParams) { + MklEltwiseFwdActivationPrimitive* eltwise_forward = nullptr; + + // Get a eltwise fwd primitive from the cached pool + eltwise_forward = static_cast*>( + MklEltwiseFwdActivationPrimitiveFactory::GetInstance() + .GetEltwiseFwdActivation(fwdParams)); + if (eltwise_forward == nullptr) { + eltwise_forward = new MklEltwiseFwdActivationPrimitive(fwdParams); + MklEltwiseFwdActivationPrimitiveFactory::GetInstance() + .SetEltwiseFwdActivation(fwdParams, eltwise_forward); + } + + return eltwise_forward; + } + + static MklEltwiseFwdActivationPrimitiveFactory& GetInstance() { + static MklEltwiseFwdActivationPrimitiveFactory instance_; + return instance_; + } + + private: + MklEltwiseFwdActivationPrimitiveFactory() {} + ~MklEltwiseFwdActivationPrimitiveFactory() {} + + static string CreateKey(const MklEltwiseFwdActivationParams& fwdParams) { + string prefix = "eltwise_fwd"; + FactoryKeyCreator key_creator; + key_creator.AddAsKey(prefix); + key_creator.AddAsKey(fwdParams.src_dims); + key_creator.AddAsKey(static_cast(fwdParams.alg_kind)); + key_creator.AddAsKey(static_cast(fwdParams.alpha)); + key_creator.AddAsKey(static_cast(fwdParams.beta)); + return key_creator.GetKey(); + } + + MklPrimitive* GetEltwiseFwdActivation( + const MklEltwiseFwdActivationParams& fwdParams) { + string key = CreateKey(fwdParams); + return this->GetOp(key); + } + + void SetEltwiseFwdActivation( + const MklEltwiseFwdActivationParams& fwdParams, MklPrimitive* op) { + string key = CreateKey(fwdParams); + this->SetOp(key, op); + } +}; + +template +class MklEltwiseFwdActivationOpBase : public OpKernel { + public: + ~MklEltwiseFwdActivationOpBase() {} + + explicit MklEltwiseFwdActivationOpBase(OpKernelConstruction* context, + float alpha, float beta) + : OpKernel(context), alpha_(alpha), beta_(beta) {} + virtual void Compute_Scalar(OpKernelContext* context) = 0; + + void Compute(OpKernelContext* context) override { + try { + const Tensor& src_tensor = context->input(0); + TensorShape src_shape = src_tensor.shape(); + if (src_tensor.dims() == 0) { + Compute_Scalar(context); + return; + } + // Allocate output (dst) tensor + TensorShape dst_shape = src_shape; + Tensor* dst_tensor = nullptr; + // Nothing to compute, return. + if (src_shape.num_elements() == 0) { + OP_REQUIRES_OK(context, + context->allocate_output( + GetTensorDataIndex(0, context->num_outputs()), + dst_shape, &dst_tensor)); + return; + } + // Set DNN primitive - src + MklDnnData src(&cpu_engine); + memory::dims src_dims; + memory::desc src_md({}, memory::data_type::undef, + memory::format_tag::undef); + + src_dims = TFShapeToMklDnnDims(src_tensor.shape()); + auto src_strides = CalculateTFStrides(src_dims); + + // Create blocked memory descriptor + src_md = MklDnnData::CreateBlockedMemDesc(src_dims, src_strides); + +#ifdef ENABLE_ONEDNN_V3 + memory::desc dst_md = src_md; +#endif // ENABLE_ONEDNN_V3 + + // Try to get an eltwise forward primitive from caching pool + MklEltwiseFwdActivationParams fwdParams(src_dims, src_md, +#ifdef ENABLE_ONEDNN_V3 + dst_md, +#endif // ENABLE_ONEDNN_V3 + alg_kind, alpha_, beta_); + MklEltwiseFwdActivationPrimitive* eltwise_fwd = + MklEltwiseFwdActivationPrimitiveFactory::Get(fwdParams); + + const T* src_data = src_tensor.flat().data(); + + OP_REQUIRES_OK(context, context->allocate_output( + GetTensorDataIndex(0, context->num_outputs()), + dst_shape, &dst_tensor)); + + T* dst_data = dst_tensor->flat().data(); + // execute eltwise + eltwise_fwd->Execute(src_data, dst_data, context); + } catch (dnnl::error& e) { + string error_msg = "Status: " + std::to_string(e.status) + + ", message: " + string(e.message) + ", in file " + + string(__FILE__) + ":" + std::to_string(__LINE__); + OP_REQUIRES_OK( + context, + errors::Aborted("Operation received an exception:", error_msg)); + } + } + + private: + engine cpu_engine = engine(engine::kind::cpu, 0); + + protected: + float alpha_; + float beta_; +}; + +// TODO : Implement Eltwise bwd / eltwiseGrad class + +#undef GET_MEMORY_DESC + +} // namespace tensorflow + +#endif // INTEL_MKL +#endif // TENSORFLOW_CORE_KERNELS_MKL_MKL_ELTWISE_ACTIVATION_BASE_OP_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/mkl/mkl_kernel_util.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/mkl/mkl_kernel_util.h new file mode 100644 index 0000000000000000000000000000000000000000..1fb972064a97d278474e72fd67e2b87b1f63dd3a --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/mkl/mkl_kernel_util.h @@ -0,0 +1,101 @@ +/* Copyright 2021 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_KERNELS_MKL_MKL_KERNEL_UTIL_H_ +#define TENSORFLOW_CORE_KERNELS_MKL_MKL_KERNEL_UTIL_H_ + +#ifdef INTEL_MKL + +#include "dnnl.hpp" +#include "tensorflow/core/graph/testlib.h" +#include "tensorflow/core/public/session.h" +#include "tsl/platform/status.h" + +using dnnl::memory; + +namespace tensorflow { + +class MklTestingUtil { + public: + static void RunMklQuantizeOp(const Tensor& input, const float input_min, + const float input_max, DataType type, + string mode, Tensor* output); + static void RunDequantizeOp(const Tensor& input, const Tensor& input_min, + const Tensor& input_max, string mode, + Tensor* output); + + static void RunGraph(const tensorflow::GraphDef graph_def, + const string& fetch, Tensor* output); + template + static void ComputeMinMax(const Tensor& tf_tensor, T* tensor_min, + T* tensor_max) { + auto eigen_tensor = tf_tensor.flat(); + Eigen::Tensor min = eigen_tensor.minimum(); + Eigen::Tensor max = eigen_tensor.maximum(); + *tensor_min = min(); + *tensor_max = max(); + } +}; + +#ifdef ENABLE_ONEDNN_V3 +// Since oneDNN v3.x exposes only an opaque memory descriptor, it is no longer +// possible to cache the entire filter memory descriptor as is. So we store +// all relevant information about it in the following class. +// +// TODO(intel-tf): When oneDNN major version changes to v4.x, weight +// caching may not work as expected if the underlying memory descriptor +// has changed (i.e. compared to v3.x). We have to return a status here +// to catch oneDNN major version change to avoid unexpected results. +class FilterMemoryDesc { + public: + FilterMemoryDesc() {} + + explicit FilterMemoryDesc(int ndims, int inner_nblks, + memory::data_type data_type, + const memory::dims& dims, + const memory::dims& inner_blks, + const memory::dims& inner_idxs, + const memory::dims& strides) + : ndims_(ndims), + inner_nblks_(inner_nblks), + data_type_(data_type), + dims_(dims), + inner_blks_(inner_blks), + inner_idxs_(inner_idxs), + strides_(strides) {} + + ~FilterMemoryDesc() {} + + bool operator==(const FilterMemoryDesc& other) const { + return (ndims_ == other.ndims_ && inner_nblks_ == other.inner_nblks_ && + data_type_ == other.data_type_ && dims_ == other.dims_ && + inner_blks_ == other.inner_blks_ && + inner_idxs_ == other.inner_idxs_ && strides_ == other.strides_); + } + + private: + int ndims_; + int inner_nblks_; + memory::data_type data_type_; + memory::dims dims_; + memory::dims inner_blks_; + memory::dims inner_idxs_; + memory::dims strides_; +}; +#endif // ENABLE_ONEDNN_V3 +} // namespace tensorflow + +#endif // INTEL_MKL +#endif // TENSORFLOW_CORE_KERNELS_MKL_MKL_KERNEL_UTIL_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/mkl/mkl_matmul_ops_common.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/mkl/mkl_matmul_ops_common.h new file mode 100644 index 0000000000000000000000000000000000000000..6585c4dbf1316fe06d5583e23a8ee8c14c282844 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/mkl/mkl_matmul_ops_common.h @@ -0,0 +1,1147 @@ +/* Copyright 2019 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_KERNELS_MKL_MKL_MATMUL_OPS_COMMON_H_ +#define TENSORFLOW_CORE_KERNELS_MKL_MKL_MATMUL_OPS_COMMON_H_ + +#if defined(INTEL_MKL) +#include +#include +#include + +#include "unsupported/Eigen/CXX11/Tensor" // from @eigen_archive +#include "dnnl.hpp" +#include "tensorflow/core/framework/op.h" +#include "tensorflow/core/framework/op_kernel.h" +#include "tensorflow/core/framework/tensor_util.h" +#include "tensorflow/core/kernels/mkl/mkl_kernel_util.h" +#include "tensorflow/core/util/mkl_util.h" +#include "tensorflow/core/util/onednn_env_vars.h" +#if defined(DNNL_AARCH64_USE_ACL) && defined(ENABLE_ONEDNN_OPENMP) +#include "tensorflow/core/platform/mutex.h" +#endif + +using dnnl::inner_product_forward; +using dnnl::primitive_attr; +using dnnl::prop_kind; +using dnnl::stream; + +namespace tensorflow { + +#ifndef ENABLE_ONEDNN_V3 +#define APPEND_ELTWISE(scale, alg, alpha, beta) \ + append_eltwise(scale, alg, alpha, beta) +#define APPEND_ELTWISE_RELU6(scale, alpha, beta) \ + append_eltwise(scale, dnnl::algorithm::eltwise_bounded_relu, alpha, beta) +#define OUTPUT_SCALE_DCHECK (post_op_param.name == "output_scale") +#define SET_MKL_LAYOUT(md) SetMklLayout(&md) +#define TSCALED_BIAS Tbias +#else +#define APPEND_ELTWISE(scale, alg, alpha, beta) append_eltwise(alg, alpha, beta) +#define APPEND_ELTWISE_RELU6(scale, alpha, beta) \ + append_eltwise(dnnl::algorithm::eltwise_clip, 0.0, alpha) +#define OUTPUT_SCALE_DCHECK \ + (post_op_param.name == "src_scale") || \ + (post_op_param.name == "wei_scale") || \ + (post_op_param.name == "dst_scale") +#define SET_MKL_LAYOUT(md) SetMklLayout(md) +#define TSCALED_BIAS float +#endif // !ENABLE_ONEDNN_V3 + +#if !defined(ENABLE_ONEDNN_OPENMP) && !defined(ENABLE_ONEDNN_V3) +#define FWD_STREAM , *fwd_stream +#else +#define FWD_STREAM +#endif // !ENABLE_ONEDNN_OPENMP && !ENABLE_ONEDNN_V3 + +static Eigen::internal::CacheSizes cache_sizes = Eigen::internal::CacheSizes(); + +typedef Eigen::ThreadPoolDevice CPUDevice; +inline bool ExecuteSingleThreadedGemm(int64_t m, int64_t n, int64_t k, + int bytes) { + // Ideally we would like to determine blocking and then come up with + // a heuristic but what we are targeting are very small models whose + // total size is < x*L2. So we will do this simple calculation + // to determine if the matrix multiplication should be run on a single thread. + // TODO(Intel-tf): this needs to be vastly improved, perhaps at a lower level + // than the integration. + ptrdiff_t l2_size = cache_sizes.m_l2; + constexpr float kHeuristicMultiplier = 1.01; + const float mul_size = bytes * (m * n + k * (m + n)); + const float l2_heur = l2_size * kHeuristicMultiplier; + return (mul_size >= 0 && mul_size < l2_heur); +} + +// This structure aggregates multiple inputs to MklDnnMatMul* methods. +struct MklDnnMatMulFwdParams { + memory::dims src_dims; + memory::dims weight_dims; + memory::dims bias_dims; + memory::dims dst_dims; + memory::format_tag src_format; + memory::format_tag weight_format; + memory::format_tag dst_format; + string dtypes = string(""); + bool const_weight; + struct PostOpParam { + string name; + std::vector param; + }; + std::vector post_op_params; + + MklDnnMatMulFwdParams( + memory::dims src_dims, memory::dims weight_dims, memory::dims bias_dims, + memory::dims dst_dims, + memory::format_tag src_format = memory::format_tag::any, + memory::format_tag weight_format = memory::format_tag::any, + memory::format_tag dst_format = memory::format_tag::any, + bool const_weight = false) + : src_dims(src_dims), + weight_dims(weight_dims), + bias_dims(bias_dims), + dst_dims(dst_dims), + src_format(src_format), + weight_format(weight_format), + dst_format(dst_format), + const_weight(const_weight) {} +}; + +// With quantization, input, weight, bias, and output can have different types. +// So we use different template parameters for each type. +// TODO(intel-tf): The template type "T" is currently used to match the +// templatized class MklPrimitiveFactory (tensorflow/core/util/mkl_util.h). +// In the future, with the removal of "T" from MklPrimitiveFactory, this class +// needs to drop "T". +template +class MklDnnMatMulFwdPrimitive : public MklPrimitive { + public: + explicit MklDnnMatMulFwdPrimitive( + const MklDnnMatMulFwdParams& matmulFwdParams) + : MklPrimitive(engine(engine::kind::cpu, 0)) { + // Create matmul primitive + if (context_.matmul_fwd == nullptr) { + Setup(matmulFwdParams); + } + } + + ~MklDnnMatMulFwdPrimitive() {} + + dnnl::memory::desc GetScratchPadDesc() { + return context_.fwd_pd->scratchpad_desc(); + } + + // Inner-product forward execute with bias: + // - src_data: input data buffer of src + // - weight_data: input data buffer of weight + // - bias_data: input data buffer of bias + // - dst_data: output data buffer of dst + // - sp_data: scratchpad data + void Execute(const Tinput* src_data, const Tweight* weight_data, + const void* bias_data, Toutput* dst_data, + const MklDnnMatMulFwdParams& matmul_fwd_params, void* sp_data, + std::shared_ptr fwd_stream) { +#if defined(DNNL_AARCH64_USE_ACL) && defined(ENABLE_ONEDNN_OPENMP) + mutex_lock lock(primitive_execution_mu_); +#endif + context_.src_mem->set_data_handle( + static_cast(const_cast(src_data)) FWD_STREAM); + context_.weight_mem->set_data_handle( + static_cast(const_cast(weight_data)) FWD_STREAM); + context_.bias_mem->set_data_handle(const_cast(bias_data) FWD_STREAM); + context_.dst_mem->set_data_handle(static_cast(dst_data) FWD_STREAM); + context_.sp_mem->set_data_handle(sp_data FWD_STREAM); + auto const& post_op_params = matmul_fwd_params.post_op_params; + if (!post_op_params.empty()) { + for (auto const& post_op_param : post_op_params) { + if (post_op_param.name == "src_scale") { + context_.src_scale_mem->set_data_handle(static_cast( + const_cast(post_op_param.param.data())) FWD_STREAM); + } else if (post_op_param.name == "wei_scale") { + context_.wei_scale_mem->set_data_handle(static_cast( + const_cast(post_op_param.param.data())) FWD_STREAM); + } else if (post_op_param.name == "dst_scale") { + context_.dst_scale_mem->set_data_handle(static_cast( + const_cast(post_op_param.param.data())) FWD_STREAM); + } + } + } + + execute_primitives(context_.fwd_primitives, fwd_stream, context_.net_args); + + // After execution, set data handle back + context_.src_mem->set_data_handle(DummyData); + context_.weight_mem->set_data_handle(DummyData); + context_.bias_mem->set_data_handle(DummyData); + context_.dst_mem->set_data_handle(DummyData); + } + + std::shared_ptr + GetPrimitiveDesc() const { + return context_.fwd_pd; + } + + private: + // Primitive reuse context for inner-product Fwd op + struct MklDnnMatMulFwdContext { + // oneDNN memory. + std::shared_ptr src_mem; + std::shared_ptr weight_mem; + std::shared_ptr bias_mem; + std::shared_ptr dst_mem; + std::shared_ptr sp_mem; + // Quantization scale related memory + std::shared_ptr src_scale_mem; + std::shared_ptr wei_scale_mem; + std::shared_ptr dst_scale_mem; + + // Descriptor and primitive-descriptor for forward inner-product. +#ifndef ENABLE_ONEDNN_V3 + std::shared_ptr fwd_desc; +#endif // !ENABLE_ONEDNN_V3 + std::shared_ptr fwd_pd; + + // Memory descriptors. + std::shared_ptr src_md; + std::shared_ptr weight_md; + std::shared_ptr bias_md; + std::shared_ptr dst_md; + // Quantization scale related memory descriptors + std::shared_ptr src_scale_md; + std::shared_ptr wei_scale_md; + std::shared_ptr dst_scale_md; + + // Inner-product primitive. + std::shared_ptr matmul_fwd; + std::vector fwd_primitives; + + std::vector> net_args; + + MklDnnMatMulFwdContext() + : src_mem(nullptr), + weight_mem(nullptr), + bias_mem(nullptr), + dst_mem(nullptr), + sp_mem(nullptr), + src_scale_mem(nullptr), + wei_scale_mem(nullptr), + dst_scale_mem(nullptr), +#ifndef ENABLE_ONEDNN_V3 + fwd_desc(nullptr), +#endif // !ENABLE_ONEDNN_V3 + fwd_pd(nullptr), + src_md(nullptr), + weight_md(nullptr), + bias_md(nullptr), + dst_md(nullptr), + src_scale_md(nullptr), + wei_scale_md(nullptr), + dst_scale_md(nullptr), + matmul_fwd(nullptr) { + } + }; + + void Setup(const MklDnnMatMulFwdParams& matmul_fwd_params) { + // Create memory descriptors for inner-product data without specified + // format. + context_.src_md.reset(new memory::desc({matmul_fwd_params.src_dims}, + MklDnnType(), + matmul_fwd_params.src_format)); + + context_.weight_md.reset(new memory::desc({matmul_fwd_params.weight_dims}, + MklDnnType(), +#ifdef DNNL_AARCH64_USE_ACL + memory::format_tag::any)); +#else + matmul_fwd_params.weight_format)); +#endif + + context_.dst_md.reset(new memory::desc({matmul_fwd_params.dst_dims}, + MklDnnType(), + matmul_fwd_params.dst_format)); + + if (std::is_same::value) { + context_.bias_md.reset(new memory::desc({matmul_fwd_params.bias_dims}, + MklDnnType(), + memory::format_tag::any)); + } else { + context_.bias_md.reset(new memory::desc({matmul_fwd_params.bias_dims}, + MklDnnType(), + memory::format_tag::any)); + } + // Create an inner-product. +#ifndef ENABLE_ONEDNN_V3 + context_.fwd_desc.reset(new inner_product_forward::desc( + matmul_fwd_params.const_weight ? prop_kind::forward_inference + : prop_kind::forward_training, + *context_.src_md, *context_.weight_md, *context_.bias_md, + *context_.dst_md)); + context_.fwd_pd.reset(new inner_product_forward::primitive_desc( + *context_.fwd_desc, cpu_engine_)); +#endif // !ENABLE_ONEDNN_V3 + + // Check if there is any fusion as post-ops + auto const& post_op_params = matmul_fwd_params.post_op_params; + dnnl::primitive_attr post_ops_attr; + post_ops_attr.set_scratchpad_mode(dnnl::scratchpad_mode::user); + dnnl::post_ops post_ops; + std::unordered_map is_scale_set; + if (!post_op_params.empty()) { + for (auto const& post_op_param : post_op_params) { + if (post_op_param.name == "relu" || post_op_param.name == "leakyrelu") { + DCHECK_EQ(post_op_param.param.size(), 3); + float op_scale = post_op_param.param[0]; + float op_alpha = post_op_param.param[1]; + float op_beta = post_op_param.param[2]; + post_ops.APPEND_ELTWISE(op_scale, dnnl::algorithm::eltwise_relu, + op_alpha, op_beta); + } else if (post_op_param.name == "relu6") { + DCHECK_EQ(post_op_param.param.size(), 3); + float op_scale = post_op_param.param[0]; + float op_alpha = post_op_param.param[1]; + float op_beta = post_op_param.param[2]; + post_ops.APPEND_ELTWISE_RELU6(op_scale, op_alpha, op_beta); + } else if (post_op_param.name == "elu") { + DCHECK_EQ(post_op_param.param.size(), 3); + float op_scale = post_op_param.param[0]; + float op_alpha = post_op_param.param[1]; + float op_beta = post_op_param.param[2]; + post_ops.APPEND_ELTWISE(op_scale, dnnl::algorithm::eltwise_elu, + op_alpha, op_beta); + } else if (post_op_param.name == "gelu_approximate") { + DCHECK_EQ(post_op_param.param.size(), 3); + float op_scale = post_op_param.param[0]; + float op_alpha = post_op_param.param[1]; + float op_beta = post_op_param.param[2]; + post_ops.APPEND_ELTWISE(op_scale, dnnl::algorithm::eltwise_gelu_tanh, + op_alpha, op_beta); + } else if (post_op_param.name == "gelu_exact") { + DCHECK_EQ(post_op_param.param.size(), 3); + float op_scale = post_op_param.param[0]; + float op_alpha = post_op_param.param[1]; + float op_beta = post_op_param.param[2]; + post_ops.APPEND_ELTWISE(op_scale, dnnl::algorithm::eltwise_gelu_erf, + op_alpha, op_beta); + } else if (post_op_param.name == "tanh") { + DCHECK_EQ(post_op_param.param.size(), 3); + float op_scale = post_op_param.param[0]; + float op_alpha = post_op_param.param[1]; + float op_beta = post_op_param.param[2]; + post_ops.APPEND_ELTWISE(op_scale, dnnl::algorithm::eltwise_tanh, + op_alpha, op_beta); + } else if (post_op_param.name == "logistic") { + DCHECK_EQ(post_op_param.param.size(), 3); + float op_scale = post_op_param.param[0]; + float op_alpha = post_op_param.param[1]; + float op_beta = post_op_param.param[2]; + post_ops.APPEND_ELTWISE(op_scale, dnnl::algorithm::eltwise_logistic, + op_alpha, op_beta); +#ifndef ENABLE_ONEDNN_V3 + } else if (post_op_param.name == "output_scale") { + DCHECK_EQ(post_op_param.param.size(), 1); + std::vector scales; + scales.push_back(post_op_param.param[0]); + post_ops_attr.set_output_scales(0, scales); +#else + } else if (post_op_param.name == "src_scale") { + is_scale_set.insert({"src", true}); + post_ops_attr.set_scales_mask(DNNL_ARG_SRC, 0); + context_.src_scale_md.reset(new memory::desc({1}, MklDnnType(), + memory::format_tag::x)); + context_.src_scale_mem.reset( + new memory(*context_.src_scale_md, cpu_engine_, DummyData)); + } else if (post_op_param.name == "wei_scale") { + is_scale_set.insert({"wei", true}); + post_ops_attr.set_scales_mask(DNNL_ARG_WEIGHTS, 0); + context_.wei_scale_md.reset(new memory::desc({1}, MklDnnType(), + memory::format_tag::x)); + context_.wei_scale_mem.reset( + new memory(*context_.wei_scale_md, cpu_engine_, DummyData)); + } else if (post_op_param.name == "dst_scale") { + is_scale_set.insert({"dst", true}); + post_ops_attr.set_scales_mask(DNNL_ARG_DST, 0); + context_.dst_scale_md.reset(new memory::desc({1}, MklDnnType(), + memory::format_tag::x)); + context_.dst_scale_mem.reset( + new memory(*context_.dst_scale_md, cpu_engine_, DummyData)); +#endif // !ENABLE_ONEDNN_V3 + } else if (post_op_param.name == "sum") { + DCHECK_EQ(post_op_param.param.size(), 1); + float op_scale = post_op_param.param[0]; + post_ops.append_sum(op_scale); + + } else { + DCHECK((post_op_param.name == "relu") || + (post_op_param.name == "relu6") || + (post_op_param.name == "elu") || + (post_op_param.name == "tanh") || + (post_op_param.name == "logistic") || + (post_op_param.name == "sum") || + (post_op_param.name == "leakyrelu") || OUTPUT_SCALE_DCHECK); + } + } + post_ops_attr.set_post_ops(post_ops); + } + +#ifndef ENABLE_ONEDNN_V3 + context_.fwd_pd.reset(new inner_product_forward::primitive_desc( + *context_.fwd_desc, post_ops_attr, cpu_engine_)); +#else + context_.fwd_pd.reset(new inner_product_forward::primitive_desc( + cpu_engine_, + matmul_fwd_params.const_weight ? prop_kind::forward_inference + : prop_kind::forward_training, + *context_.src_md, *context_.weight_md, *context_.bias_md, + *context_.dst_md, post_ops_attr)); +#endif // !ENABLE_ONEDNN_V3 + + // Create memory primitive based on dummy data + context_.src_mem.reset( + new memory(context_.fwd_pd.get()->src_desc(), cpu_engine_, DummyData)); + context_.weight_mem.reset(new memory(context_.fwd_pd.get()->weights_desc(), + cpu_engine_, DummyData)); + context_.dst_mem.reset( + new memory(context_.fwd_pd.get()->dst_desc(), cpu_engine_, DummyData)); + context_.bias_mem.reset( + new memory(context_.fwd_pd.get()->bias_desc(), cpu_engine_, DummyData)); + auto scratchpad_md = context_.fwd_pd->scratchpad_desc(); + context_.sp_mem.reset( + new dnnl::memory(scratchpad_md, cpu_engine_, DummyData)); + + // Create inner-product primitive. + context_.matmul_fwd.reset(new inner_product_forward(*context_.fwd_pd)); + std::unordered_map net_args = { + {DNNL_ARG_SRC, *context_.src_mem}, + {DNNL_ARG_WEIGHTS, *context_.weight_mem}, + {DNNL_ARG_BIAS, *context_.bias_mem}, + {DNNL_ARG_SCRATCHPAD, *context_.sp_mem}, + {DNNL_ARG_DST, *context_.dst_mem}}; +#ifdef ENABLE_ONEDNN_V3 + if (is_scale_set["src"] && is_scale_set["wei"] && is_scale_set["dst"]) { + net_args.insert( + {DNNL_ARG_ATTR_SCALES | DNNL_ARG_SRC, *context_.src_scale_mem}); + net_args.insert( + {DNNL_ARG_ATTR_SCALES | DNNL_ARG_WEIGHTS, *context_.wei_scale_mem}); + net_args.insert( + {DNNL_ARG_ATTR_SCALES | DNNL_ARG_DST, *context_.dst_scale_mem}); + } +#endif // ENABLE_ONEDNN_V3 + context_.net_args.push_back(net_args); + context_.fwd_primitives.push_back(*context_.matmul_fwd); + return; + } + + struct MklDnnMatMulFwdContext context_; + +#if defined(DNNL_AARCH64_USE_ACL) && defined(ENABLE_ONEDNN_OPENMP) + // Guards Execution() + mutex primitive_execution_mu_; +#endif +}; + +template +class MklDnnMatMulFwdPrimitiveFactory : public MklPrimitiveFactory { + public: + static MklDnnMatMulFwdPrimitive* Get( + const MklDnnMatMulFwdParams& mkldnn_matmul_fwd_dims, bool do_not_cache) { + MklDnnMatMulFwdPrimitive* matmul_fwd = + nullptr; + + if (do_not_cache) { + // Always create new primitive + matmul_fwd = + new MklDnnMatMulFwdPrimitive( + mkldnn_matmul_fwd_dims); + } else { + // Try to find a suitable one in pool + matmul_fwd = dynamic_cast< + MklDnnMatMulFwdPrimitive*>( + MklDnnMatMulFwdPrimitiveFactory::GetInstance() + .GetMklDnnMatMulFwd(mkldnn_matmul_fwd_dims)); + if (matmul_fwd == nullptr) { + matmul_fwd = + new MklDnnMatMulFwdPrimitive( + mkldnn_matmul_fwd_dims); + MklDnnMatMulFwdPrimitiveFactory::GetInstance() + .SetMklDnnMatMulFwd(mkldnn_matmul_fwd_dims, matmul_fwd); + } + } + return matmul_fwd; + } + + private: + MklDnnMatMulFwdPrimitiveFactory() {} + ~MklDnnMatMulFwdPrimitiveFactory() {} + + static MklDnnMatMulFwdPrimitiveFactory& GetInstance() { + static MklDnnMatMulFwdPrimitiveFactory instance_; + return instance_; + } + + static string CreateKey(const MklDnnMatMulFwdParams& mkldnn_matmul_fwd_dims) { + string prefix = "matmul_fwd_"; + FactoryKeyCreator key_creator; + key_creator.AddAsKey(prefix); + key_creator.AddAsKey(mkldnn_matmul_fwd_dims.src_dims); + key_creator.AddAsKey(mkldnn_matmul_fwd_dims.weight_dims); + key_creator.AddAsKey(mkldnn_matmul_fwd_dims.bias_dims); + key_creator.AddAsKey(mkldnn_matmul_fwd_dims.dst_dims); + key_creator.AddAsKey(mkldnn_matmul_fwd_dims.dtypes); + key_creator.AddAsKey(mkldnn_matmul_fwd_dims.weight_format); + + // Generate keys for post-ops + for (auto const& post_op_param : mkldnn_matmul_fwd_dims.post_op_params) { + if (post_op_param.name == "relu" || post_op_param.name == "relu6" || + post_op_param.name == "elu" || post_op_param.name == "tanh" || + post_op_param.name == "logistic" || + post_op_param.name == "leakyrelu" || + post_op_param.name == "gelu_approximate" || + post_op_param.name == "gelu_exact") { + DCHECK_EQ(post_op_param.param.size(), 3); + key_creator.AddAsKey(post_op_param.name); + key_creator.AddAsKey(post_op_param.param[0]); + key_creator.AddAsKey(post_op_param.param[1]); + key_creator.AddAsKey(post_op_param.param[2]); + } else if (post_op_param.name == "sum") { + DCHECK_EQ(post_op_param.param.size(), 1); + key_creator.AddAsKey(post_op_param.name); + key_creator.AddAsKey(post_op_param.param[0]); +#ifndef ENABLE_ONEDNN_V3 + } else if (post_op_param.name == "output_scale") { +#else + } else if (post_op_param.name == "src_scale" || + post_op_param.name == "wei_scale" || + post_op_param.name == "dst_scale") { +#endif // !ENABLE_ONEDNN_V3 + DCHECK_EQ(post_op_param.param.size(), 1); + key_creator.AddAsKey(post_op_param.name); + key_creator.AddAsKey(post_op_param.param[0]); + } else { + return string("not_a_key"); + } + } + return key_creator.GetKey(); + } + + MklPrimitive* GetMklDnnMatMulFwd( + const MklDnnMatMulFwdParams& mkldnn_matmul_fwd_dims) { + string key = CreateKey(mkldnn_matmul_fwd_dims); + return this->GetOp(key); + } + + void SetMklDnnMatMulFwd(const MklDnnMatMulFwdParams& mkldnn_matmul_fwd_dims, + MklPrimitive* op) { + string key = CreateKey(mkldnn_matmul_fwd_dims); + this->SetOp(key, op); + } +}; + +template +class MklDnnMatMulOpBase : public OpKernel { + public: + explicit MklDnnMatMulOpBase(OpKernelConstruction* context) + : OpKernel(context) {} + void Compute(OpKernelContext* context) override = 0; + + // Allocate output tensor. + virtual void AllocateOutputTensor( + OpKernelContext* context, + const inner_product_forward::primitive_desc& mkldnn_matmul_prim_desc, + const memory::dims& output_dims_mkl_order, + MklTensorFormat output_tf_format, Tensor** output_tensor, + bool native_format = false) { + DCHECK(output_tensor); + auto dst_pd = mkldnn_matmul_prim_desc.dst_desc(); + + MklDnnShape output_mkl_shape; + output_mkl_shape.SetMklTensor(true); + output_mkl_shape.SET_MKL_LAYOUT(dst_pd); + output_mkl_shape.SetElemType(MklDnnType()); + output_mkl_shape.SetTfLayout(output_dims_mkl_order.size(), + output_dims_mkl_order, output_tf_format); + + TensorShape output_tf_shape; + output_tf_shape.AddDim((dst_pd.get_size() / sizeof(Toutput))); + + if (native_format) { + output_tf_shape = output_mkl_shape.GetTfShape(); + } + // Allocate Output Tensor + AllocateOutputSetMklShape(context, kOutputIndexDst, output_tensor, + output_tf_shape, output_mkl_shape, native_format); + } + + // TF_LOCKS_EXCLUDED annotation ensures that the lock (mu_) cannot + // be acquired before entering the function, since it is acquired + // inside the function. + inline bool IsWeightCacheEmpty(OpKernelContext* context) + TF_LOCKS_EXCLUDED(mu_) { + tf_shared_lock lock(mu_); + return (weight_oi_.NumElements() == 0); + } + + // Cache the converted weight in a tensor. + // Only one thread can execute this method at any given time. + void CacheWeight( + OpKernelContext* context, + const std::shared_ptr& + matmul_fwd_pd, + Tweight* weight_data, const Tensor& weight_tensor, + MklDnnData& weight, const memory::desc& weight_md) + TF_LOCKS_EXCLUDED(mu_) { + mutex_lock lock(mu_); + const Tensor& weight_t = weight_oi_; + + // If the weights are already cached, there's nothing to do + if (weight_t.NumElements() > 0) { + return; + } + +#ifdef ENABLE_ONEDNN_V3 + // For now, cache weights only for blocked format + if (weight_md.get_format_kind() != memory::format_kind::blocked) { + return; + } +#endif // ENABLE_ONEDNN_V3 + + // reorder and cache the weight + weight.SetUsrMem(weight_md, &weight_tensor); + weight.CheckReorderToOpMem(matmul_fwd_pd.get()->weights_desc(), cpu_engine_, + context); + weight_data = static_cast(weight.GetOpMem().get_data_handle()); + + size_t weight_size = matmul_fwd_pd.get()->weights_desc().get_size(); + TensorShape weight_tf_shape; + weight_tf_shape.AddDim(weight_size / sizeof(Tweight)); + + OP_REQUIRES_OK(context, + context->allocate_temp(DataTypeToEnum::value, + weight_tf_shape, &weight_oi_)); + + void* weight_oi_t_data = weight.GetTensorBuffer(&weight_oi_); + memcpy(weight_oi_t_data, weight_data, weight_size); + + // cache the memory descriptor + auto expected_md = matmul_fwd_pd->weights_desc(); +#ifndef ENABLE_ONEDNN_V3 + TensorShape weight_mkl_format; + weight_mkl_format.AddDim(sizeof(expected_md) / sizeof(Tweight)); + + OP_REQUIRES_OK(context, + context->allocate_temp(DataTypeToEnum::value, + weight_mkl_format, &weight_oi_md_)); + *reinterpret_cast(weight_oi_md_.flat().data()) = + expected_md; +#else + weight_oi_md_ = FilterMemoryDesc( + expected_md.get_ndims(), expected_md.get_inner_nblks(), + expected_md.get_data_type(), expected_md.get_dims(), + expected_md.get_inner_blks(), expected_md.get_inner_idxs(), + expected_md.get_strides()); +#endif // !ENABLE_ONEDNN_V3 + } + + Tweight* GetCachedWeight(OpKernelContext* context, + const memory::desc& expected_md) + TF_LOCKS_EXCLUDED(mu_) { + tf_shared_lock lock(mu_); + const Tensor& weight_t = weight_oi_; +#ifndef ENABLE_ONEDNN_V3 + const Tensor& weight_md_t = weight_oi_md_; + + // Check if the memory descriptor of the cached weight is same as + // expected_md. if so use the cached memory, else return NULL + if (weight_md_t.flat().size()) { + const memory::desc& stored_md = + *(static_cast(weight_md_t.data())); + if (stored_md == expected_md) { + return static_cast( + const_cast(weight_t.flat().data())); + } + } + return nullptr; +#else + // Return the cached weights only if the dimensions of the cached weights + // and the current weights match. Otherwise, return nullptr. + // + // TODO(intel-tf): The following check assumes that all dimensions are + // known before checking for equality. We may have to modify it in the + // future once we support runtime dimensions (especially if the dimensions + // are still unknown at this point). + if (weight_oi_md_ == + FilterMemoryDesc(expected_md.get_ndims(), expected_md.get_inner_nblks(), + expected_md.get_data_type(), expected_md.get_dims(), + expected_md.get_inner_blks(), + expected_md.get_inner_idxs(), + expected_md.get_strides())) { + return static_cast( + const_cast(weight_t.flat().data())); + } + return nullptr; +#endif // !ENABLE_ONEDNN_V3 + } + + bool IsBiasCacheEmpty() TF_LOCKS_EXCLUDED(bias_cache_mutex_) { + tf_shared_lock lock(bias_cache_mutex_); + return (cached_bias_data_pt_.NumElements() == 0); + } + + virtual bool IsCachedBiasValid(float, float) + TF_LOCKS_EXCLUDED(bias_cache_mutex_) { + tf_shared_lock lock(bias_cache_mutex_); + return false; + } + + void CacheBias(OpKernelContext* ctx, const Tensor& temp_scaled_bias_tensor, + float min_input, float max_input) + TF_LOCKS_EXCLUDED(bias_cache_mutex_) { + mutex_lock lock(bias_cache_mutex_); + if (cached_bias_data_pt_.NumElements() > 0) { + return; + } + OP_REQUIRES_OK(ctx, ctx->allocate_temp(temp_scaled_bias_tensor.dtype(), + temp_scaled_bias_tensor.shape(), + &cached_bias_data_pt_)); + tensor::DeepCopy(temp_scaled_bias_tensor, &cached_bias_data_pt_); + saved_min_input_ = min_input; + saved_max_input_ = max_input; + } + + void GetCachedBias(float min_input, float max_input, void** bias_data) + TF_LOCKS_EXCLUDED(bias_cache_mutex_) { + tf_shared_lock lock(bias_cache_mutex_); + const Tensor& cached_bias_data = cached_bias_data_pt_; + if (IsCachedBiasValid(min_input, max_input)) { + *bias_data = static_cast(const_cast( + cached_bias_data.flat().data())); + } else { + *bias_data = nullptr; + } + } + + engine cpu_engine_ = engine(engine::kind::cpu, 0); + + protected: + // Tensor to save reordered weight + mutex mu_; + Tensor weight_oi_ TF_GUARDED_BY(mu_); +#ifndef ENABLE_ONEDNN_V3 + Tensor weight_oi_md_ TF_GUARDED_BY(mu_); +#else + FilterMemoryDesc weight_oi_md_ TF_GUARDED_BY(mu_); +#endif // !ENABLE_ONEDNN_V3 + + bool is_weight_const_; + + bool is_bias_const_; + mutex bias_cache_mutex_; + // Persistent tensor for cached bias. + Tensor cached_bias_data_pt_ TF_GUARDED_BY(bias_cache_mutex_); + float saved_min_input_ = -std::numeric_limits::infinity(); + float saved_max_input_ = std::numeric_limits::infinity(); + + const int kInputIndexSrc = 0; + const int kInputIndexWeight = 1; + const int kInputIndexBias = 2; + const int kOutputIndexDst = 0; +}; + +using dnnl::matmul; + +namespace { + +struct MklMatMulParams { + string prefix; + memory::dims a_dims; + memory::dims b_dims; + memory::dims c_dims; + memory::dims a_strides; + memory::dims b_strides; + memory::dims c_strides; + struct PostOpParam { + string name; + std::vector param; + memory::dims dims; + memory::data_type data_type; + memory::format_tag format_tag; + }; + std::vector post_op_params; + + MklMatMulParams(string prefix, memory::dims a_dims, memory::dims b_dims, + memory::dims c_dims, memory::dims a_strides, + memory::dims b_strides, memory::dims c_strides) + : prefix(prefix), + a_dims(a_dims), + b_dims(b_dims), + c_dims(c_dims), + a_strides(a_strides), + b_strides(b_strides), + c_strides(c_strides) {} +}; + +template +class MklMatMulPrimitive : public MklPrimitive { + public: + explicit MklMatMulPrimitive(const MklMatMulParams& params) + : MklPrimitive(engine(engine::kind::cpu, 0)) { + // Create matmul primitive + Setup(params); + } + + ~MklMatMulPrimitive() {} + + dnnl::memory::desc GetScratchPadDesc() { + return context_.prim_desc->scratchpad_desc(); + } + void Execute(const std::shared_ptr& stream, const Tlhs* a_data, + const Trhs* b_data, const Toutput* c_data, void* sp_data, + void* mul_data = nullptr, void* add_data = nullptr) { +#if defined(DNNL_AARCH64_USE_ACL) && defined(ENABLE_ONEDNN_OPENMP) + mutex_lock lock(primitive_execution_mu_); +#endif +#if !defined(ENABLE_ONEDNN_OPENMP) && !defined(ENABLE_ONEDNN_V3) + context_.a_mem->set_data_handle( + static_cast(const_cast(a_data)), *stream); + context_.b_mem->set_data_handle( + static_cast(const_cast(b_data)), *stream); + context_.c_mem->set_data_handle( + static_cast(const_cast(c_data)), *stream); + context_.sp_mem->set_data_handle(sp_data, *stream); + + if (mul_data != nullptr) + context_.mul_mem->set_data_handle(mul_data, *stream); + if (add_data != nullptr) + context_.add_mem->set_data_handle(add_data, *stream); +#else + context_.a_mem->set_data_handle( + static_cast(const_cast(a_data))); + context_.b_mem->set_data_handle( + static_cast(const_cast(b_data))); + context_.c_mem->set_data_handle( + static_cast(const_cast(c_data))); + context_.sp_mem->set_data_handle(sp_data); + if (mul_data != nullptr) context_.mul_mem->set_data_handle(mul_data); + if (add_data != nullptr) context_.add_mem->set_data_handle(add_data); +#endif // !ENABLE_ONEDNN_OPENMP && !ENABLE_ONEDNN_V3 + execute_primitives(context_.matmul_primitives, stream, context_.net_args); + + // After execution, set data handle back + context_.a_mem->set_data_handle(DummyData); + context_.b_mem->set_data_handle(DummyData); + context_.c_mem->set_data_handle(DummyData); + context_.sp_mem->set_data_handle(DummyData); + if (mul_data != nullptr) context_.mul_mem->set_data_handle(DummyData); + if (add_data != nullptr) context_.add_mem->set_data_handle(DummyData); + } + + std::shared_ptr GetPrimitiveDesc() const { + return context_.prim_desc; + } + + private: + // Primitive reuse context for MatMul op + struct MklMatMulContext { + // oneDNN memory. + std::shared_ptr a_mem; + std::shared_ptr b_mem; + std::shared_ptr c_mem; + std::shared_ptr mul_mem; + std::shared_ptr add_mem; + std::shared_ptr sp_mem; + + // Descriptor and primitive-descriptor for MatMul. +#ifndef ENABLE_ONEDNN_V3 + std::shared_ptr desc; +#endif // !ENABLE_ONEDNN_V3 + std::shared_ptr prim_desc; + + // Memory descriptors. + std::shared_ptr a_md; + std::shared_ptr b_md; + std::shared_ptr c_md; + std::shared_ptr mul_md; + std::shared_ptr add_md; + + // MatMul primitive. + std::vector matmul_primitives; + std::vector> net_args; + + MklMatMulContext() + : a_mem(nullptr), + b_mem(nullptr), + c_mem(nullptr), + mul_mem(nullptr), + add_mem(nullptr), + sp_mem(nullptr), +#ifndef ENABLE_ONEDNN_V3 + desc(nullptr), +#endif // !ENABLE_ONEDNN_V3 + prim_desc(nullptr), + a_md(nullptr), + b_md(nullptr), + c_md(nullptr), + mul_md(nullptr), + add_md(nullptr) { + } + }; + + void Setup(const MklMatMulParams& params) { + std::shared_ptr matmul_primitive = nullptr; + + // Create MatMul descriptor and primitive descriptor. + context_.a_md.reset(new memory::desc({params.a_dims}, MklDnnType(), + params.a_strides)); + + context_.b_md.reset(new memory::desc({params.b_dims}, MklDnnType(), +#ifdef DNNL_AARCH64_USE_ACL + memory::format_tag::any)); +#else + params.b_strides)); +#endif + context_.c_md.reset(new memory::desc({params.c_dims}, MklDnnType(), + params.c_strides)); + + // Create matmul. +#ifndef ENABLE_ONEDNN_V3 + context_.desc.reset( + new matmul::desc(*context_.a_md, *context_.b_md, *context_.c_md)); +#endif // !ENABLE_ONEDNN_V3 + + // Check if there is any fusion as post-ops + auto const& post_op_params = params.post_op_params; + dnnl::primitive_attr post_ops_attr; + dnnl::post_ops post_ops; + if (!post_op_params.empty()) { + for (auto const& post_op_param : post_op_params) { + if (post_op_param.name == "output_scale") { +#ifndef ENABLE_ONEDNN_V3 + // TODO(intel-tf): Verify if this code is needed. If not, it needs to + // be removed. + DCHECK_EQ(post_op_param.param.size(), 1); + std::vector scales; + scales.push_back(post_op_param.param[0]); + post_ops_attr.set_output_scales(0, scales); +#endif // !ENABLE_ONEDNN_V3 + } else if (post_op_param.name == "mul") { + context_.mul_md.reset(new memory::desc({post_op_param.dims}, + post_op_param.data_type, + post_op_param.format_tag)); + post_ops.append_binary(dnnl::algorithm::binary_mul, *context_.mul_md); + } else if (post_op_param.name == "add") { + context_.add_md.reset(new memory::desc({post_op_param.dims}, + post_op_param.data_type, + post_op_param.format_tag)); + post_ops.append_binary(dnnl::algorithm::binary_add, *context_.add_md); + } else { + DCHECK((post_op_param.name == "output_scale")); + } + } + post_ops_attr.set_post_ops(post_ops); + } + post_ops_attr.set_scratchpad_mode(dnnl::scratchpad_mode::user); +#ifndef ENABLE_ONEDNN_V3 + context_.prim_desc.reset( + new matmul::primitive_desc(*context_.desc, post_ops_attr, cpu_engine_)); +#else + context_.prim_desc.reset( + new matmul::primitive_desc(cpu_engine_, *context_.a_md, *context_.b_md, + *context_.c_md, post_ops_attr)); +#endif // !ENABLE_ONEDNN_V3 + + // Create memory primitive based on dummy data. + context_.a_mem.reset( + new dnnl::memory(*context_.a_md, cpu_engine_, DummyData)); +#ifdef DNNL_AARCH64_USE_ACL + context_.b_mem.reset(new dnnl::memory( + context_.prim_desc.get()->weights_desc(), cpu_engine_, DummyData)); +#else + context_.b_mem.reset( + new dnnl::memory(*context_.b_md, cpu_engine_, DummyData)); +#endif + context_.c_mem.reset( + new dnnl::memory(*context_.c_md, cpu_engine_, DummyData)); + auto scratchpad_md = context_.prim_desc->scratchpad_desc(); + context_.sp_mem.reset( + new dnnl::memory(scratchpad_md, cpu_engine_, DummyData)); + + // Create matmul primitive. + matmul_primitive.reset(new dnnl::matmul(*context_.prim_desc)); + context_.net_args.push_back({{DNNL_ARG_SRC, *context_.a_mem}, + {DNNL_ARG_WEIGHTS, *context_.b_mem}, + {DNNL_ARG_SCRATCHPAD, *context_.sp_mem}, + {DNNL_ARG_DST, *context_.c_mem}}); + if (!post_op_params.empty()) { + int count = 0; + for (auto const& post_op_param : post_op_params) { + if (post_op_param.name == "mul") { + context_.mul_mem.reset( + new dnnl::memory(*context_.mul_md, cpu_engine_, DummyData)); + context_.net_args[0].insert( + {DNNL_ARG_ATTR_MULTIPLE_POST_OP(count) | DNNL_ARG_SRC_1, + *context_.mul_mem}); + count++; + } else if (post_op_param.name == "add") { + context_.add_mem.reset( + new dnnl::memory(*context_.add_md, cpu_engine_, DummyData)); + context_.net_args[0].insert( + {DNNL_ARG_ATTR_MULTIPLE_POST_OP(count) | DNNL_ARG_SRC_1, + *context_.add_mem}); + count++; + } + } + } + + context_.matmul_primitives.push_back(*matmul_primitive); + return; + } + + struct MklMatMulContext context_; +#if defined(DNNL_AARCH64_USE_ACL) && defined(ENABLE_ONEDNN_OPENMP) + mutex primitive_execution_mu_; +#endif +}; + +template +class MklMatMulPrimitiveFactory : public MklPrimitiveFactory { + public: + static MklMatMulPrimitive* Get( + const MklMatMulParams& params, bool do_not_cache) { + MklMatMulPrimitive* matmul_prim = nullptr; + + if (do_not_cache) { + // Always create new primitive + matmul_prim = new MklMatMulPrimitive(params); + } else { + // Try to find a suitable one in pool + matmul_prim = dynamic_cast*>( + MklMatMulPrimitiveFactory::GetInstance() + .GetMklMatMul(params)); + if (matmul_prim == nullptr) { + matmul_prim = new MklMatMulPrimitive(params); + MklMatMulPrimitiveFactory::GetInstance() + .SetMklMatMul(params, matmul_prim); + } + } + + return matmul_prim; + } + + private: + MklMatMulPrimitiveFactory() {} + ~MklMatMulPrimitiveFactory() {} + + static MklMatMulPrimitiveFactory& GetInstance() { + static MklMatMulPrimitiveFactory instance_; + return instance_; + } + + static string CreateKey(const MklMatMulParams& params) { + FactoryKeyCreator key_creator; + key_creator.AddAsKey(params.prefix); + key_creator.AddAsKey(params.a_dims); + key_creator.AddAsKey(params.b_dims); + key_creator.AddAsKey(params.c_dims); + key_creator.AddAsKey(params.a_strides); + key_creator.AddAsKey(params.b_strides); + key_creator.AddAsKey(params.c_strides); + key_creator.AddAsKey(typeid(T).name()); + key_creator.AddAsKey(typeid(Tlhs).name()); + key_creator.AddAsKey(typeid(Trhs).name()); + key_creator.AddAsKey(typeid(Toutput).name()); + + // Generate keys for post-ops + for (auto const& post_op_param : params.post_op_params) { + if (post_op_param.name == "output_scale") { + DCHECK_EQ(post_op_param.param.size(), 1); + key_creator.AddAsKey(post_op_param.name); + key_creator.AddAsKey(post_op_param.param[0]); + } else if (post_op_param.name == "mul" || post_op_param.name == "add") { + key_creator.AddAsKey(post_op_param.name); + key_creator.AddAsKey(post_op_param.dims); + } else { + return string("not_a_key"); + } + } + return key_creator.GetKey(); + } + + MklPrimitive* GetMklMatMul(const MklMatMulParams& params) { + string key = CreateKey(params); + return this->GetOp(key); + } + + void SetMklMatMul(const MklMatMulParams& params, MklPrimitive* op) { + string key = CreateKey(params); + this->SetOp(key, op); + } +}; + +template +void dnnl_gemm(char transa, char transb, int64_t m, int64_t n, int64_t k, + float alpha, const T* a, int64_t lda, const T* b, int64_t ldb, + float beta, T* c, int64_t ldc, OpKernelContext* ctx = nullptr) { + using dims = dnnl::memory::dims; + + // Prepare strides based on the transa and transb flags: transposed + // matrices have strides swapped + dims a_dims = dims{m, k}; + dims b_dims = dims{k, n}; + dims c_dims = dims{m, n}; + dims a_strides = tolower(transa) == 'n' ? dims{lda, 1} : dims{1, lda}; + dims b_strides = tolower(transb) == 'n' ? dims{ldb, 1} : dims{1, ldb}; + dims c_strides = dims{ldc, 1}; + + // MklMatMul uses const alpha and beta, make guarantee here to ensure + // they are never changed. + DCHECK_EQ(alpha, 1.0f); + DCHECK_EQ(beta, 0.f); + + MklMatMulParams params("dnnl_gemm", a_dims, b_dims, c_dims, a_strides, + b_strides, c_strides); + auto st = ExecuteSingleThreadedGemm(m, n, k, sizeof(T)); + // Create the oneDNN wrapper over Eigen threadpool and set max threads + // in oneDNN. + Eigen::ThreadPoolInterface* eigen_interface = + EigenThreadPoolFromTfContext(ctx); + tsl::OneDnnThreadPool eigen_tp(eigen_interface, ThreadPoolUseCallerThread(), + st ? 1 : -1); + MklMatMulPrimitive* matmul_prim = + MklMatMulPrimitiveFactory::Get(params, 0); + + UserScratchPad scratch_pad; + scratch_pad.AllocateSPTensor(matmul_prim, ctx); + // Execute matmul primitive. + + std::shared_ptr cpu_stream; + + cpu_stream.reset(CreateStream(&eigen_tp, matmul_prim->GetEngine())); + matmul_prim->Execute(cpu_stream, a, b, c, scratch_pad.Get()); +} + +} // anonymous namespace + +#undef APPEND_ELTWISE +#undef APPEND_ELTWISE_RELU6 +#undef OUTPUT_SCALE_DCHECK +#undef SET_MKL_LAYOUT +#undef TSCALED_BIAS + +} // namespace tensorflow + +#endif // INTEL_MKL +#endif // TENSORFLOW_CORE_KERNELS_MKL_MKL_MATMUL_OPS_COMMON_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/mkl/mkl_pooling_ops_common.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/mkl/mkl_pooling_ops_common.h new file mode 100644 index 0000000000000000000000000000000000000000..d709f0f1d546fda2f1db49d7da7a7468522d6c0f --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/mkl/mkl_pooling_ops_common.h @@ -0,0 +1,804 @@ +/* Copyright 2017 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_KERNELS_MKL_MKL_POOLING_OPS_COMMON_H_ +#define TENSORFLOW_CORE_KERNELS_MKL_MKL_POOLING_OPS_COMMON_H_ + +#ifdef INTEL_MKL + +#include +#include +#include + +#include "dnnl.hpp" +#include "tensorflow/core/framework/kernel_shape_util.h" +#include "tensorflow/core/framework/ops_util.h" +#include "tensorflow/core/util/mkl_util.h" +#include "tensorflow/core/util/padding.h" +#if defined(DNNL_AARCH64_USE_ACL) && defined(ENABLE_ONEDNN_OPENMP) +#include "tensorflow/core/platform/mutex.h" +#endif + +namespace tensorflow { + +#ifndef ENABLE_ONEDNN_V3 +#define GET_DIMS data.dims +#define SET_MKL_LAYOUT(md) SetMklLayout(&md) +#else +#define GET_DIMS get_dims() +#define SET_MKL_LAYOUT(md) SetMklLayout(md) +#endif // !ENABLE_ONEDNN_V3 + +using dnnl::pooling_backward; +using dnnl::pooling_forward; +using dnnl::prop_kind; +using dnnl::stream; + +using PoolingFwdPd = dnnl::pooling_forward::primitive_desc; +using PoolingBwdPd = dnnl::pooling_backward::primitive_desc; + +struct MklPoolingParams { + memory::dims src_dims; + memory::dims dst_dims; + memory::dims filter_dims; + memory::dims strides; +#ifdef ENABLE_ONEDNN_V3 + memory::dims dilations; +#endif // ENABLE_ONEDNN_V3 + memory::dims padding_left; + memory::dims padding_right; + dnnl::algorithm alg_kind; + dnnl::prop_kind prop_kind; + memory::format_tag src_format; + memory::desc src_md; + bool native_format; + + MklPoolingParams(memory::dims src_dims, memory::dims dst_dims, + memory::dims filter_dims, memory::dims strides, +#ifdef ENABLE_ONEDNN_V3 + memory::dims dilations, +#endif // ENABLE_ONEDNN_V3 + memory::dims padding_left, memory::dims padding_right, + dnnl::algorithm alg_kind, dnnl::prop_kind prop_kind, + memory::format_tag src_format, memory::desc src_md, + bool native_format) + : src_dims(src_dims), + dst_dims(dst_dims), + filter_dims(filter_dims), + strides(strides), +#ifdef ENABLE_ONEDNN_V3 + dilations(dilations), +#endif // ENABLE_ONEDNN_V3 + padding_left(padding_left), + padding_right(padding_right), + alg_kind(alg_kind), + prop_kind(prop_kind), + src_format(src_format), + src_md(src_md), + native_format(native_format) { + } +}; + +template +class MklPoolingFwdPrimitive : public MklPrimitive { + public: + explicit MklPoolingFwdPrimitive(const MklPoolingParams& fwdParams) + : MklPrimitive(engine(engine::kind::cpu, 0)) { + if (context_.fwd == nullptr) Setup(fwdParams); + } + + ~MklPoolingFwdPrimitive() {} + + // Pooling forward execute + // src_data: input data buffer of src + // ws_data: output data buffer of workspace + // dst_data: output data buffer of dst + void Execute(const T* src_data, T* dst_data, void* ws_data, + std::shared_ptr fwd_stream); + + std::shared_ptr GetPoolingFwdPd() const { + return context_.fwd_pd; + } + + memory::format_tag GetSrcMemoryFormat() const { return context_.src_fmt; } + memory::format_tag GetDstMemoryFormat() const { return context_.dst_fmt; } + + private: + void Setup(const MklPoolingParams& fwdParams); + + struct PoolingFwdContext { + // Algorithm. + dnnl::algorithm alg_kind; + + // Kind of propagation, forward or backward. + dnnl::prop_kind prop_kind; + + // Expected memory format. + memory::format_tag src_fmt; + memory::format_tag dst_fmt; + memory::format_tag ws_fmt; + + // Workspace shape. + memory::data_type ws_dt; + size_t ws_size; + + // oneDNN memory, just dummy data. + std::shared_ptr ws_mem; + std::shared_ptr src_mem; + std::shared_ptr dst_mem; + + // Pooling forward descriptor and primitive descriptor. +#ifndef ENABLE_ONEDNN_V3 + std::shared_ptr fwd_desc; +#endif // !ENABLE_ONEDNN_V3 + std::shared_ptr fwd_pd; + + // Memory descriptor. + std::shared_ptr src_md; + std::shared_ptr dst_md; + + // Pooling primitive + std::shared_ptr fwd; + std::shared_ptr fwd_stream; + std::vector fwd_primitives; + + std::vector> net_args; + + PoolingFwdContext() + : src_fmt(memory::format_tag::any), + dst_fmt(memory::format_tag::any), + ws_fmt(memory::format_tag::any), + ws_dt(memory::data_type::u8), + ws_size(0), + ws_mem(nullptr), + src_mem(nullptr), + dst_mem(nullptr), +#ifndef ENABLE_ONEDNN_V3 + fwd_desc(nullptr), +#endif // !ENABLE_ONEDNN_V3 + fwd_pd(nullptr), + src_md(nullptr), + dst_md(nullptr), + fwd(nullptr) { + } + }; + + struct PoolingFwdContext context_; + +#if defined(DNNL_AARCH64_USE_ACL) && defined(ENABLE_ONEDNN_OPENMP) + mutex primitive_execution_mu_; +#endif +}; + +template +class MklPoolingFwdPrimitiveFactory : public MklPrimitiveFactory { + public: + static MklPoolingFwdPrimitive* Get(const MklPoolingParams& fwdParams) { + MklPoolingFwdPrimitive* pooling_forward = nullptr; + // Get pooling primitive from the pool + pooling_forward = static_cast*>( + MklPoolingFwdPrimitiveFactory::GetInstance().GetPoolingFwd( + fwdParams)); + + if (pooling_forward == nullptr) { + pooling_forward = new MklPoolingFwdPrimitive(fwdParams); + MklPoolingFwdPrimitiveFactory::GetInstance().SetPoolingFwd( + fwdParams, pooling_forward); + } + return pooling_forward; + } + + static MklPoolingFwdPrimitiveFactory& GetInstance() { + static MklPoolingFwdPrimitiveFactory instance_; + return instance_; + } + + private: + MklPoolingFwdPrimitiveFactory() {} + ~MklPoolingFwdPrimitiveFactory() {} + + // The key to be created will be used to get/set pooling + // primitive op from reuse perspective. + // A pooling key is a string which concates key parameters + // as well as algorithm kind (max versus avg). + static string CreateKey(const MklPoolingParams& fwdParams) { + string prefix = "pooling_fwd"; + FactoryKeyCreator key_creator; + key_creator.AddAsKey(prefix); + key_creator.AddAsKey(fwdParams.src_dims); + key_creator.AddAsKey(fwdParams.dst_dims); + key_creator.AddAsKey(fwdParams.filter_dims); + key_creator.AddAsKey(fwdParams.strides); +#ifdef ENABLE_ONEDNN_V3 + key_creator.AddAsKey(fwdParams.dilations); +#endif // ENABLE_ONEDNN_V3 + key_creator.AddAsKey(fwdParams.padding_left); + key_creator.AddAsKey(fwdParams.padding_right); + key_creator.AddAsKey(static_cast(fwdParams.alg_kind)); + key_creator.AddAsKey(static_cast(fwdParams.prop_kind)); + return key_creator.GetKey(); + } + + MklPrimitive* GetPoolingFwd(const MklPoolingParams& fwdParams) { + string key = CreateKey(fwdParams); + return this->GetOp(key); + } + + void SetPoolingFwd(const MklPoolingParams& fwdParams, MklPrimitive* op) { + string key = CreateKey(fwdParams); + this->SetOp(key, op); + } +}; + +template +class MklPoolingBwdPrimitive : public MklPrimitive { + public: + explicit MklPoolingBwdPrimitive(const MklPoolingParams& bwdParams) + : MklPrimitive(engine(engine::kind::cpu, 0)) { + if (context_.bwd == nullptr) Setup(bwdParams); + } + + ~MklPoolingBwdPrimitive() {} + + // Pooling backward execute + // diff_dst_data: input data buffer of diff_dst + // diff_src_data: output data buffer of diff_src + // ws_data: input data buffer of workspace + void Execute(const T* diff_dst_data, T* diff_src_data, const void* ws_data, + std::shared_ptr bwd_stream); + + public: + std::shared_ptr GetPoolingFwdPd() const { + return context_.fwd_pd; + } + std::shared_ptr GetPoolingBwdPd() const { + return context_.bwd_pd; + } + + dnnl::memory::data_type GetWorkspaceDataType() const { + return context_.ws_dt; + } + + private: + void Setup(const MklPoolingParams& bwdParams); + + // Primitive reuse context for pooling bwd ops + struct PoolingBwdContext { + // Algorithm. + dnnl::algorithm alg_kind; + + // Expected memory format. + memory::format_tag diff_src_fmt; + memory::format_tag diff_dst_fmt; + memory::format_tag ws_fmt; + + // Workspace attribute. + dnnl::memory::data_type ws_dt; + + // oneDNN memory. + std::shared_ptr ws_mem; + std::shared_ptr diff_src_mem; + std::shared_ptr diff_dst_mem; + + // Memory descriptors. + std::shared_ptr src_md; + std::shared_ptr dst_md; + + // Forward and backward pooling descriptors and primitive descriptors. +#ifndef ENABLE_ONEDNN_V3 + std::shared_ptr fwd_desc; + std::shared_ptr bwd_desc; +#endif // !ENABLE_ONEDNN_V3 + std::shared_ptr fwd_pd; + std::shared_ptr bwd_pd; + + // Backward pooling primitive. + std::shared_ptr bwd; + std::shared_ptr bwd_stream; + + std::vector bwd_primitives; + std::vector> net_args; + + PoolingBwdContext() + : diff_src_fmt(memory::format_tag::any), + diff_dst_fmt(memory::format_tag::any), + ws_fmt(memory::format_tag::any), + ws_dt(memory::data_type::u8), + ws_mem(nullptr), + diff_src_mem(nullptr), + diff_dst_mem(nullptr), + src_md(nullptr), + dst_md(nullptr), +#ifndef ENABLE_ONEDNN_V3 + fwd_desc(nullptr), + bwd_desc(nullptr), +#endif // !ENABLE_ONEDNN_V3 + fwd_pd(nullptr), + bwd_pd(nullptr), + bwd(nullptr) { + } + }; + + struct PoolingBwdContext context_; +#if defined(DNNL_AARCH64_USE_ACL) && defined(ENABLE_ONEDNN_OPENMP) + mutex primitive_execution_mu_; +#endif +}; + +template +class MklPoolingBwdPrimitiveFactory : public MklPrimitiveFactory { + public: + static MklPoolingBwdPrimitive* Get(const MklPoolingParams& bwdParams) { + MklPoolingBwdPrimitive* pooling_backward = nullptr; + + // Find a pooling backward primitive from the pool. + // If it does not exist, create a new one. + pooling_backward = static_cast*>( + MklPoolingBwdPrimitiveFactory::GetInstance().GetPoolingBwd( + bwdParams)); + if (pooling_backward == nullptr) { + pooling_backward = new MklPoolingBwdPrimitive(bwdParams); + MklPoolingBwdPrimitiveFactory::GetInstance().SetPoolingBwd( + bwdParams, pooling_backward); + } + return pooling_backward; + } + + static MklPoolingBwdPrimitiveFactory& GetInstance() { + static MklPoolingBwdPrimitiveFactory instance_; + return instance_; + } + + private: + MklPoolingBwdPrimitiveFactory() {} + ~MklPoolingBwdPrimitiveFactory() {} + + // The key to be created will be used to get/set pooling + // primitive op from reuse perspective. + // A pooling key is a string which concates key parameters + // as well as algorithm kind (max versus avg). + static string CreateKey(const MklPoolingParams& bwdParams) { + string prefix = "pooling_bwd"; + FactoryKeyCreator key_creator; + key_creator.AddAsKey(prefix); + key_creator.AddAsKey(bwdParams.src_dims); + key_creator.AddAsKey(bwdParams.dst_dims); + key_creator.AddAsKey(bwdParams.filter_dims); + key_creator.AddAsKey(bwdParams.strides); +#ifdef ENABLE_ONEDNN_V3 + key_creator.AddAsKey(bwdParams.dilations); +#endif // ENABLE_ONEDNN_V3 + key_creator.AddAsKey(bwdParams.padding_left); + key_creator.AddAsKey(bwdParams.padding_right); + key_creator.AddAsKey(static_cast(bwdParams.alg_kind)); + return key_creator.GetKey(); + } + + MklPrimitive* GetPoolingBwd(const MklPoolingParams& bwdParams) { + string key = CreateKey(bwdParams); + return this->GetOp(key); + } + + void SetPoolingBwd(const MklPoolingParams& bwdParams, MklPrimitive* op) { + string key = CreateKey(bwdParams); + this->SetOp(key, op); + } +}; + +typedef Eigen::ThreadPoolDevice CPUDevice; + +struct MklPoolParameters { + int depth; + + int tensor_in_planes; // Pool3D + int tensor_in_cols; + int tensor_in_rows; + int tensor_in_batch; + + int window_planes; // Pool3D + int window_rows; + int window_cols; + int depth_window; + + int planes_stride; // Pool3D + int row_stride; + int col_stride; + int depth_stride; + +#ifdef ENABLE_ONEDNN_V3 + int planes_dilation; // Pool3D + int row_dilation; + int col_dilation; +#endif // ENABLE_ONEDNN_V3 + + int64 out_planes; // Pool3D + int64 out_height; + int64 out_width; + int out_depth; + + int64 pad_P1; // Pool3D + int64 pad_P2; // Pool3D + int64 pad_left; + int64 pad_right; + int64 pad_top; + int64 pad_bottom; + int pad_depth; + + TensorFormat data_format; + MklPoolParameters() + : depth(0), + tensor_in_planes(0), + tensor_in_cols(0), + tensor_in_rows(0), + tensor_in_batch(0), + window_planes(0), + window_rows(0), + window_cols(0), + depth_window(0), + planes_stride(0), + row_stride(0), + col_stride(0), + depth_stride(0), +#ifdef ENABLE_ONEDNN_V3 + planes_dilation(0), + row_dilation(0), + col_dilation(0), +#endif // ENABLE_ONEDNN_V3 + out_planes(0), + out_height(0), + out_width(0), + out_depth(0), + pad_P1(0), + pad_P2(0), + pad_left(0), + pad_right(0), + pad_top(0), + pad_bottom(0), + pad_depth(0), + data_format(TensorFormat::FORMAT_NCHW) { + } + + // Updates context->status if there is an invalid input. + void Init(OpKernelContext* context, const std::vector& ksize, + const std::vector& stride, Padding padding, + TensorFormat data_format, const TensorShape& tensor_in_shape); + void Init(OpKernelContext* context, const std::vector& ksize, + const std::vector& stride, Padding padding, + TensorFormat data_format, const MklDnnShape* mkl_in_shape); + + private: + // Common initialization for TensorFlow and MKL formats + void Init(OpKernelContext* context, const std::vector& ksize, + const std::vector& stride, Padding padding, + TensorFormat data_format); +}; + +template +class MklPoolingOpBase : public OpKernel { + public: + explicit MklPoolingOpBase(OpKernelConstruction* context) + : OpKernel(context), workspace_enabled_(false) { + string data_format; + if (std::is_same::value || std::is_same::value) { + // Current quantized convolution doesn't have data_format attribute. + data_format = "NHWC"; + } else { + OP_REQUIRES_OK(context, context->GetAttr("data_format", &data_format)); + } + OP_REQUIRES(context, FormatFromString(data_format, &this->data_format_tf_), + absl::InvalidArgumentError("Invalid data format")); + OP_REQUIRES_OK(context, context->GetAttr("ksize", &this->ksize_)); + OP_REQUIRES(context, this->ksize_.size() == 4 || this->ksize_.size() == 5, + absl::InvalidArgumentError("Sliding window ksize field must " + "specify 4 or 5 dimensions")); + for (int i = 0; i < this->ksize_.size(); ++i) { + OP_REQUIRES(context, this->ksize_[i] > 0, + absl::InvalidArgumentError(absl::StrCat( + "Sliding window ksize for dimension ", i, " was zero."))); + } + + OP_REQUIRES_OK(context, context->GetAttr("strides", &this->stride_)); + OP_REQUIRES(context, this->stride_.size() == 4 || this->stride_.size() == 5, + absl::InvalidArgumentError("Sliding window strides field must " + "specify 4 or 5 dimensions")); + OP_REQUIRES_OK(context, context->GetAttr("padding", &this->padding_)); + OP_REQUIRES(context, this->ksize_[0] == 1 && this->stride_[0] == 1, + absl::UnimplementedError("Pooling is not yet supported on the " + "batch dimension.")); + bool is_pool2d = (this->ksize_.size() == 4); + this->tensor_format_mkldnn_ = + is_pool2d ? TFDataFormatToMklDnnDataFormat(this->data_format_tf_) + : TFDataFormatToMklDnn3DDataFormat(this->data_format_tf_); + + this->data_format_mkldnn_ = + MklTensorFormatToMklDnnDataFormat(this->tensor_format_mkldnn_); + + // We may not get this attribute for this node if it does not go through + // graph rewrite pass. So we do not check for error while retrieving this + // attribute value. + auto status = + context->GetAttr("workspace_enabled", &this->workspace_enabled_); + (void)status; + } + void Compute(OpKernelContext* context) override = 0; + + protected: + // Calculate output shape of pooling op in oneDNN and TensorFlow order. + // oneDNN uses NCHW(Pool2D) or NCDHW(Pool3D) for output order. + // But TensorFlow output will be in NHWC/NCHW(Pool2D) or + // NDHWC/NCDHW(Pool3D) format depending on data format. Function expects + // output height and width to have already been int32 bounds-checked. + void GetOutputDims(const MklPoolParameters& mkl_pool_params, + memory::dims* output_dims_mkl_order) { + if (this->ksize_.size() == 4) { + // Pooling2D: oneDNN always needs output in NCHW format. + *output_dims_mkl_order = {mkl_pool_params.tensor_in_batch, + mkl_pool_params.out_depth, + static_cast(mkl_pool_params.out_height), + static_cast(mkl_pool_params.out_width)}; + } else { + // Pooling3D: oneDNN always needs output in NCDHW format. + *output_dims_mkl_order = {mkl_pool_params.tensor_in_batch, + mkl_pool_params.out_depth, + static_cast(mkl_pool_params.out_planes), + static_cast(mkl_pool_params.out_height), + static_cast(mkl_pool_params.out_width)}; + } + } + + void InitMklPoolParameters(OpKernelContext* context, + MklPoolParameters* pool_params, + const MklDnnShape& original_input_mkl_shape, + const TensorShape& input_tensor_shape) { + if (!original_input_mkl_shape.IsMklTensor()) { + pool_params->Init(context, this->ksize_, this->stride_, this->padding_, + this->data_format_tf_, input_tensor_shape); + } else { + pool_params->Init(context, this->ksize_, this->stride_, this->padding_, + this->data_format_tf_, &original_input_mkl_shape); + } + } + + void PoolParamsToDims(const MklPoolParameters* pool_params, + memory::dims* filter_dims, memory::dims* strides, +#ifdef ENABLE_ONEDNN_V3 + memory::dims* dilations, +#endif // ENABLE_ONEDNN_V3 + memory::dims* padding_left, memory::dims* padding_right, + bool is_pool2d) { + if (is_pool2d) { + // Pool2D + *filter_dims = + memory::dims({pool_params->window_rows, pool_params->window_cols}); + *strides = + memory::dims({pool_params->row_stride, pool_params->col_stride}); +#ifdef ENABLE_ONEDNN_V3 + *dilations = + memory::dims({pool_params->row_dilation, pool_params->col_dilation}); +#endif // ENABLE_ONEDNN_V3 + *padding_left = memory::dims({static_cast(pool_params->pad_top), + static_cast(pool_params->pad_left)}); + *padding_right = memory::dims({static_cast(pool_params->pad_bottom), + static_cast(pool_params->pad_right)}); + } else { + // Pool3D + *filter_dims = + memory::dims({pool_params->window_planes, pool_params->window_rows, + pool_params->window_cols}); + *strides = + memory::dims({pool_params->planes_stride, pool_params->row_stride, + pool_params->col_stride}); +#ifdef ENABLE_ONEDNN_V3 + *dilations = + memory::dims({pool_params->planes_dilation, pool_params->row_dilation, + pool_params->col_dilation}); +#endif // ENABLE_ONEDNN_V3 + + *padding_left = memory::dims({static_cast(pool_params->pad_P1), + static_cast(pool_params->pad_top), + static_cast(pool_params->pad_left)}); + *padding_right = memory::dims({static_cast(pool_params->pad_P2), + static_cast(pool_params->pad_bottom), + static_cast(pool_params->pad_right)}); + } + } + + void AllocateEmptyOutputTensor(OpKernelContext* context, + const int kOutputIndex, + MklPoolParameters* pool_params, + const memory::dims output_dims_mkl_order, + Tensor** output_tensor) { + MklDnnShape output_mkl_shape; + output_mkl_shape.SetMklTensor(false); + TensorShape output_tf_shape; + if (pool_params->data_format == TensorFormat::FORMAT_NCHW) { + output_tf_shape = MklDnnDimsToTFShape(output_dims_mkl_order); + } else { + memory::dims output_dims_order; + // determine Pooling2D (NHWC) or Pooling3D (NDHWC) + if (this->ksize_.size() == 4) { + output_dims_order = {pool_params->tensor_in_batch, + static_cast(pool_params->out_height), + static_cast(pool_params->out_width), + pool_params->out_depth}; + } else { + output_dims_order = {pool_params->tensor_in_batch, + static_cast(pool_params->out_planes), + static_cast(pool_params->out_height), + static_cast(pool_params->out_width), + pool_params->out_depth}; + } + output_tf_shape = MklDnnDimsToTFShape(output_dims_order); + } + AllocateOutputSetMklShape(context, kOutputIndex, output_tensor, + output_tf_shape, output_mkl_shape, + native_format_); + DCHECK(output_tensor); + } + + // Checks to make sure that the memory we need to allocate + // is a multiple of sizeof(T) + // returns the number of elements + size_t GetNumTElements(const memory::desc& pd) { + size_t num_bytes = pd.get_size(); + size_t ret_val = num_bytes / sizeof(T); + if (num_bytes % sizeof(T) != 0) { + ret_val++; + } + return ret_val; + } + + std::vector ksize_; + std::vector stride_; + Padding padding_; + TensorFormat data_format_tf_; + MklTensorFormat tensor_format_mkldnn_; + memory::format_tag data_format_mkldnn_; + bool workspace_enabled_; + bool native_format_ = false; +}; + +template +class MklPoolingForwardOpBase : public MklPoolingOpBase { + public: + explicit MklPoolingForwardOpBase(OpKernelConstruction* context) + : MklPoolingOpBase(context) {} + void Compute(OpKernelContext* context) override = 0; + + protected: + void ConfigureInput(OpKernelContext* context, + const MklDnnShape& input_mkl_shape, + const Tensor& input_tensor, + MklPoolParameters* pool_params, + MklDnnData* dnn_data_input) { + DCHECK(pool_params); + DCHECK(dnn_data_input); + TensorShape input_tensor_shape = input_tensor.shape(); + if (input_tensor.NumElements() != 0) { + memory::desc input_md = + input_mkl_shape.IsMklTensor() + ? input_mkl_shape.GetMklLayout() + : memory::desc( + (this->ksize_.size() == 4) + ? TFShapeToMklDnnDimsInNCHW(input_tensor_shape, + this->data_format_tf_) + : TFShapeToMklDnnDimsInNCDHW(input_tensor_shape, + this->data_format_tf_), + MklDnnType(), this->data_format_mkldnn_); + dnn_data_input->SetUsrMem(input_md, &input_tensor); + + if (this->ksize_.size() == 5) { + // Pool3D + std::vector input_sizes(5, -1); + input_sizes[MklDnnDims3D::Dim3d_N] = input_md.GET_DIMS[0]; + input_sizes[MklDnnDims3D::Dim3d_C] = input_md.GET_DIMS[1]; + input_sizes[MklDnnDims3D::Dim3d_D] = input_md.GET_DIMS[2]; + input_sizes[MklDnnDims3D::Dim3d_H] = input_md.GET_DIMS[3]; + input_sizes[MklDnnDims3D::Dim3d_W] = input_md.GET_DIMS[4]; + dnn_data_input->SetOpMemDesc(input_sizes, this->data_format_mkldnn_); + } + } + this->InitMklPoolParameters(context, pool_params, input_mkl_shape, + input_tensor_shape); + } + + void AllocateOutputTensor(OpKernelContext* context, + const PoolingFwdPd& pool_fwd_prim_desc, + const memory::dims output_dims_mkl_order, + const MklTensorFormat& output_tf_format, + Tensor** output_tensor) { + TensorShape output_tf_shape; + DCHECK(output_tensor); + memory::desc dst_pd = pool_fwd_prim_desc.dst_desc(); + + MklDnnShape output_mkl_shape; + output_mkl_shape.SetMklTensor(true); + output_mkl_shape.SET_MKL_LAYOUT(dst_pd); + output_mkl_shape.SetElemType(MklDnnType()); + output_mkl_shape.SetTfLayout(output_dims_mkl_order.size(), + output_dims_mkl_order, output_tf_format); + // Only allocate enough space for the elements we need. + output_tf_shape.AddDim(this->GetNumTElements(dst_pd)); + + if (this->native_format_) { + output_tf_shape = output_mkl_shape.GetTfShape(); + } + AllocateOutputSetMklShape(context, kOutputTensorIndexOutput, output_tensor, + output_tf_shape, output_mkl_shape, + this->native_format_); + DCHECK(*output_tensor); + } + + void SanityCheckInput(OpKernelContext* context, const Tensor& input_tensor, + const MklDnnShape& input_mkl_shape) { + if (!input_mkl_shape.IsMklTensor()) { + OP_REQUIRES( + context, input_tensor.dims() == 4 || input_tensor.dims() == 5, + absl::InvalidArgumentError("Input must be 4 or 5-dimensional")); + } else { + OP_REQUIRES( + context, + input_mkl_shape.GetDimension() == 4 || + input_mkl_shape.GetDimension() == 5, + absl::InvalidArgumentError("Input shape must be 4 or 5-dimensional")); + } + } + const int kInputTensorIndexInput = 0; + const int kOutputTensorIndexOutput = 0; +}; // MklPoolingForwardBaseOp + +template +class MklPoolingBackwardOpBase : public MklPoolingOpBase { + public: + explicit MklPoolingBackwardOpBase(OpKernelConstruction* context) + : MklPoolingOpBase(context) {} + void Compute(OpKernelContext* context) override = 0; + + protected: + const int kOutputTensorIndexOutput = 0; + + void AllocateOutputTensor(OpKernelContext* context, + const PoolingBwdPd& pool_bkwd_prim_desc, + const memory::dims output_dims_mkl_order, + const MklTensorFormat& output_tf_format, + Tensor** output_tensor) { + DCHECK(output_tensor); + memory::desc dst_pd = pool_bkwd_prim_desc.diff_src_desc(); + MklDnnShape output_mkl_shape; + output_mkl_shape.SetMklTensor(true); + output_mkl_shape.SET_MKL_LAYOUT(dst_pd); + output_mkl_shape.SetElemType(MklDnnType()); + output_mkl_shape.SetTfLayout(output_dims_mkl_order.size(), + output_dims_mkl_order, output_tf_format); + + TensorShape output_tf_shape; + output_tf_shape.AddDim(this->GetNumTElements(dst_pd)); + if (this->native_format_) { + output_tf_shape = output_mkl_shape.GetTfShape(); + } + AllocateOutputSetMklShape(context, kOutputTensorIndexOutput, output_tensor, + output_tf_shape, output_mkl_shape, + this->native_format_); + DCHECK(*output_tensor); + } +}; + +#undef GET_DIMS +#undef SET_MKL_LAYOUT + +} // namespace tensorflow + +#endif // INTEL_MKL +#endif // TENSORFLOW_CORE_KERNELS_MKL_MKL_POOLING_OPS_COMMON_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/mkl/mkl_quantized_conv_ops.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/mkl/mkl_quantized_conv_ops.h new file mode 100644 index 0000000000000000000000000000000000000000..0b6319c96518cadd595e186d0ec0c194afb5196d --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/mkl/mkl_quantized_conv_ops.h @@ -0,0 +1,93 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_KERNELS_MKL_MKL_QUANTIZED_CONV_OPS_H_ +#define TENSORFLOW_CORE_KERNELS_MKL_MKL_QUANTIZED_CONV_OPS_H_ + +#include "unsupported/Eigen/CXX11/Tensor" // from @eigen_archive +#include "tensorflow/core/framework/tensor.h" + +#ifdef INTEL_MKL + +namespace tensorflow { +template +float MklFloatForOneQuantizedLevel(float range_min, float range_max) { + int64 highest = static_cast(Eigen::NumTraits::highest()); + int64 lowest = static_cast(Eigen::NumTraits::lowest()); + + // Adjusting for having a symmetric range. + // for example: for 8-bit [-127, 127] as opposed to [-128, 127]. + if (lowest < -highest) ++lowest; + + const float float_for_one_quantized_level = + (range_max - range_min) / (highest - lowest); + return float_for_one_quantized_level; +} + +template +void MklQuantizationRangeForMultiplication(float min_a, float max_a, + float min_b, float max_b, + float* min_c, float* max_c) { + const float a_float_for_one_quant_level = + MklFloatForOneQuantizedLevel(min_a, max_a); + const float b_float_for_one_quant_level = + MklFloatForOneQuantizedLevel(min_b, max_b); + + const int64 c_highest = static_cast(Eigen::NumTraits::highest()); + const int64 c_lowest = static_cast(Eigen::NumTraits::lowest()); + const float c_float_for_one_quant_level = + a_float_for_one_quant_level * b_float_for_one_quant_level; + + *min_c = c_float_for_one_quant_level * c_lowest; + *max_c = c_float_for_one_quant_level * c_highest; +} + +template +void MklQuantizationRangeForMultiplication(float min_a, float max_a, + const Tensor& min_b_vector, + const Tensor& max_b_vector, + Tensor** min_c_vector, + Tensor** max_c_vector) { + DCHECK(min_b_vector.NumElements() == (*min_c_vector)->NumElements()); + DCHECK(max_b_vector.NumElements() == (*max_c_vector)->NumElements()); + size_t n_channel = min_b_vector.NumElements(); + const int64 c_highest = static_cast(Eigen::NumTraits::highest()); + const int64 c_lowest = static_cast(Eigen::NumTraits::lowest()); + const float* min_b = min_b_vector.flat().data(); + const float* max_b = max_b_vector.flat().data(); + float* min_c = (*min_c_vector)->flat().data(); + float* max_c = (*max_c_vector)->flat().data(); + +#ifdef ENABLE_ONEDNN_OPENMP +#pragma omp parallel for +#endif // ENABLE_ONEDNN_OPENMP + // TODO(intel-tf): Add eigen parallel_for + for (int64_t n = 0; n < n_channel; ++n) { + float a_float_for_one_quant_level = + MklFloatForOneQuantizedLevel(min_a, max_a); + float b_float_for_one_quant_level = + MklFloatForOneQuantizedLevel(min_b[n], max_b[n]); + float c_float_for_one_quant_level = + a_float_for_one_quant_level * b_float_for_one_quant_level; + min_c[n] = c_float_for_one_quant_level * c_lowest; + max_c[n] = c_float_for_one_quant_level * c_highest; + } +} + +} // namespace tensorflow + +#endif // INTEL_MKL + +#endif // TENSORFLOW_CORE_KERNELS_MKL_MKL_QUANTIZED_CONV_OPS_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/mlir_generated/base_gpu_op.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/mlir_generated/base_gpu_op.h new file mode 100644 index 0000000000000000000000000000000000000000..c299e1c78b6cba24e9fe9112d79caac7851ca04a --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/mlir_generated/base_gpu_op.h @@ -0,0 +1,117 @@ +/* Copyright 2021 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_KERNELS_MLIR_GENERATED_BASE_GPU_OP_H_ +#define TENSORFLOW_CORE_KERNELS_MLIR_GENERATED_BASE_GPU_OP_H_ + +#include "tensorflow/core/framework/op_kernel.h" +#include "tensorflow/core/kernels/mlir_generated/base_op.h" + +namespace tensorflow { + +/// Register kernels. + +#define REGISTER_ALIASED_GPU_KERNEL(tf_op, mlir_op, input_type, output_type) \ + REGISTER_ALIASED_KERNEL(tf_op, mlir_op, GPU, input_type, output_type, \ + /*no additional_cstrs*/) + +// clang-format off +#define REGISTER_GPU_KERNEL(tf_op, input_type, output_type) \ + REGISTER_KERNEL(tf_op, GPU, input_type, output_type, /*no additional_cstrs*/) +// clang-format on + +#define REGISTER_COMPLEX_GPU_KERNEL(tf_op, input_type, output_type) \ + REGISTER_COMPLEX_KERNEL(tf_op, GPU, input_type, output_type) + +#define REGISTER_GPU_KERNEL_NO_TYPE_CONSTRAINT(tf_op, input_type) \ + REGISTER_KERNEL_NO_TYPE_CONSTRAINT(tf_op, GPU, input_type) + +/// Unary kernels. + +#define GENERATE_AND_REGISTER_UNARY_GPU_KERNEL(tf_op, input_type) \ + GENERATE_AND_REGISTER_UNARY_KERNEL(tf_op, GPU, input_type, \ + /*no additional_cstrs*/) + +#define GENERATE_AND_REGISTER_UNARY_GPU_KERNEL2(tf_op, input_type, \ + output_type) \ + GENERATE_AND_REGISTER_UNARY_KERNEL2(tf_op, GPU, input_type, output_type, \ + /*no additional_cstrs*/) + +#define GENERATE_AND_REGISTER_UNARY_GPU_KERNEL3( \ + tf_op, input_type, output_type, casted_input_type, casted_output_type) \ + GENERATE_AND_REGISTER_UNARY_KERNEL3(tf_op, GPU, input_type, output_type, \ + casted_input_type, casted_output_type, \ + /*no additional_cstrs*/) + +#define GENERATE_AND_REGISTER_UNARY_JIT_GPU_KERNEL(tf_op, input_type) \ + GENERATE_AND_REGISTER_UNARY_JIT_KERNEL(tf_op, GPU, input_type, \ + /*no additional_cstrs*/) + +#define GENERATE_UNARY_GPU_KERNEL(tf_op, input_type) \ + GENERATE_UNARY_KERNEL(tf_op, GPU, input_type) + +#define GENERATE_UNARY_GPU_KERNEL2(tf_op, input_type, output_type) \ + GENERATE_UNARY_KERNEL2(tf_op, GPU, input_type, output_type) + +#define GENERATE_UNARY_GPU_KERNEL3(tf_op, input_type, output_type, \ + casted_input_type, casted_output_type) \ + GENERATE_UNARY_KERNEL3(tf_op, GPU, input_type, output_type, \ + casted_input_type, casted_output_type) + +/// Binary kernels. + +#define GENERATE_AND_REGISTER_BINARY_GPU_KERNEL(tf_op, input_type) \ + GENERATE_AND_REGISTER_BINARY_KERNEL(tf_op, GPU, input_type, \ + /*no additional_cstrs*/) + +#define GENERATE_AND_REGISTER_BINARY_GPU_KERNEL2(tf_op, input_type, \ + output_type) \ + GENERATE_AND_REGISTER_BINARY_KERNEL2(tf_op, GPU, input_type, output_type, \ + /*no additional_cstrs*/) + +#define GENERATE_AND_REGISTER_BINARY_GPU_KERNEL3( \ + tf_op, input_type, output_type, casted_input_type, casted_output_type) \ + GENERATE_AND_REGISTER_BINARY_KERNEL3(tf_op, GPU, input_type, output_type, \ + casted_input_type, casted_output_type, \ + /*no additional_cstrs*/) + +#define GENERATE_AND_REGISTER_BINARY_JIT_GPU_KERNEL(tf_op, input_type) \ + GENERATE_AND_REGISTER_BINARY_JIT_KERNEL(tf_op, GPU, input_type, \ + /*no additional_cstrs*/) + +#define GENERATE_BINARY_GPU_KERNEL(tf_op, input_type) \ + GENERATE_BINARY_KERNEL(tf_op, GPU, input_type) + +#define GENERATE_BINARY_GPU_KERNEL2(tf_op, input_type, output_type) \ + GENERATE_BINARY_KERNEL2(tf_op, GPU, input_type, output_type) + +#define GENERATE_BINARY_GPU_KERNEL3(tf_op, input_type, output_type, \ + casted_input_type, casted_output_type) \ + GENERATE_BINARY_KERNEL3(tf_op, GPU, input_type, output_type, \ + casted_input_type, casted_output_type) + +/// Ternary kernels. + +#define GENERATE_AND_REGISTER_TERNARY_GPU_KERNEL(tf_op, input_type) \ + GENERATE_AND_REGISTER_TERNARY_KERNEL(tf_op, GPU, input_type, \ + /*no additional_cstrs*/) + +#define GENERATE_AND_REGISTER_TERNARY_JIT_GPU_KERNEL(tf_op, input_type) \ + GENERATE_AND_REGISTER_TERNARY_JIT_KERNEL(tf_op, GPU, input_type, \ + /*no additional_cstrs*/) + +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_MLIR_GENERATED_BASE_GPU_OP_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/mlir_generated/base_op.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/mlir_generated/base_op.h new file mode 100644 index 0000000000000000000000000000000000000000..c7e9254055fe756e95e9bd0700e467d027637cc2 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/mlir_generated/base_op.h @@ -0,0 +1,346 @@ +/* Copyright 2020 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_KERNELS_MLIR_GENERATED_BASE_OP_H_ +#define TENSORFLOW_CORE_KERNELS_MLIR_GENERATED_BASE_OP_H_ + +#include "llvm/ADT/ArrayRef.h" +#include "llvm/ADT/SmallVector.h" +#include "mlir/ExecutionEngine/CRunnerUtils.h" // from @llvm-project +#include "tensorflow/core/framework/op_kernel.h" +#include "tensorflow/core/framework/op_requires.h" +#include "tensorflow/core/platform/errors.h" + +namespace tensorflow { + +// Unranked memref descriptor as it is expected and returned by the external +// MLIR-generated "C" function. +struct UnrankedMemRef { + int64_t rank; + void* descriptor; +}; + +// Returns a pointer to an allocated MlirTensorBuffer that takes ownership of +// pre-allocated memory. +TensorBuffer* GetMlirTensorBuffer(const void* ptr, size_t size, + Allocator* allocator); + +/// Used to allocate descriptors on stack when they are small. + +constexpr int kMaxRankForOnStackDescriptors = 10; + +static constexpr size_t GetSizeOfDescriptor(int rank) { + return sizeof(void*) * (2 * rank + 3); +} + +using DescriptorBuffer = + llvm::SmallVector; + +/// Converts tensors to memory descriptors and back. + +UnrankedMemRef ConvertTensorToDescriptor(const Tensor& tensor, + DescriptorBuffer& buffer); + +TensorShape ExtractShapeFromDescriptor(UnrankedMemRef unranked_descriptor); + +template +Tensor ConvertDescriptorToTensor(UnrankedMemRef unranked_descriptor, + DataType TfDataType, Allocator* allocator) { + void* base_ptr = static_cast(unranked_descriptor.descriptor)[0]; + TensorShape result_shape = ExtractShapeFromDescriptor(unranked_descriptor); + TensorBuffer* buffer = GetMlirTensorBuffer( + base_ptr, sizeof(ElemType) * result_shape.num_elements(), allocator); + + // Tensor takes ownership of the buffer. + Tensor tensor{TfDataType, result_shape, buffer}; + // When Tensor is constructed, its ref-counter is incremented. We need to + // decrement it back. + buffer->Unref(); + return tensor; +} + +// OpKernel with Compute function that converts input tensors to unranked +// memref descriptors and calls the MLIR-generated unranked kernel. The outputs +// are converted back to tensors using MlirTensorBuffer to take ownership of +// pre-allocated memory. +template +class MLIROpKernel : public OpKernel { + public: + explicit MLIROpKernel(OpKernelConstruction* ctx) : OpKernel(ctx) {} + + void Compute(OpKernelContext* ctx) override { + VLOG(4) << ctx->op_kernel().TraceString(*ctx, true); + + // Convert tensor arguments to unranked memory descriptors. + llvm::SmallVector buffers(ctx->num_inputs()); + llvm::SmallVector args; + for (int i = 0; i < ctx->num_inputs(); ++i) { + args.push_back(ConvertTensorToDescriptor(ctx->input(i), buffers[i])); + } + + UnrankedMemRef result_desc = Invoke(ctx, args); + if (!ctx->status().ok()) { + free(result_desc.descriptor); + return; + } + void* result_data_ptr = static_cast(result_desc.descriptor)[0]; + + // Detect input buffer reuse. + for (int i = 0, end = ctx->num_inputs(); i < end; ++i) { + const Tensor& input = ctx->input(i); + if (input.data() == result_data_ptr) { + // Run a bitcast in case the output type is different. + Tensor output; + TensorShape result_shape = ExtractShapeFromDescriptor(result_desc); + OP_REQUIRES_OK( + ctx, output.BitcastFrom(input, CastedTfDataType, result_shape)); + + ctx->set_output(0, output); + free(result_desc.descriptor); + return; + } + } + + tensorflow::AllocatorAttributes attrs; + auto* allocator = ctx->get_allocator(attrs); + Tensor result_tensor = ConvertDescriptorToTensor( + result_desc, TfDataType, allocator); + if (TfDataType != CastedTfDataType) { + Tensor casted_result_tensor; + OP_REQUIRES_OK( + ctx, casted_result_tensor.BitcastFrom(result_tensor, CastedTfDataType, + result_tensor.shape())); + result_tensor = casted_result_tensor; + } + free(result_desc.descriptor); + ctx->set_output(0, result_tensor); + } + + protected: + virtual UnrankedMemRef Invoke( + OpKernelContext* ctx, llvm::SmallVectorImpl& args) = 0; +}; + +/// Generate C function and kernel names. + +#define MLIR_FUNCTION(tf_op, platform, input_type, output_type) \ + _mlir_ciface_##tf_op##_##platform##_##input_type##_##output_type + +#define MLIR_OP(tf_op, platform, input_type, output_type) \ + Mlir##tf_op##platform##input_type##output_type##Op + +/// Register kernels. + +#define REGISTER_ALIASED_KERNEL(tf_op, mlir_op, platform, input_type, \ + output_type, additional_cstrs) \ + REGISTER_KERNEL_BUILDER( \ + Name(#tf_op) \ + .Device(DEVICE_##platform) \ + .TypeConstraint::Type>("T") \ + additional_cstrs, \ + MLIR_OP(mlir_op, platform, input_type, output_type)); + +#define REGISTER_KERNEL(tf_op, platform, input_type, output_type, \ + additional_cstrs) \ + REGISTER_ALIASED_KERNEL(tf_op, tf_op, platform, input_type, output_type, \ + additional_cstrs) + +#define REGISTER_COMPLEX_KERNEL(tf_op, platform, input_type, output_type) \ + REGISTER_KERNEL_BUILDER( \ + Name(#tf_op) \ + .Device(DEVICE_##platform) \ + .TypeConstraint::Type>("T") \ + .TypeConstraint::Type>("Tout"), \ + MLIR_OP(tf_op, platform, input_type, output_type)); + +#define REGISTER_KERNEL_NO_TYPE_CONSTRAINT(tf_op, platform, input_type) \ + REGISTER_KERNEL_BUILDER(Name(#tf_op).Device(DEVICE_##platform), \ + MLIR_OP(tf_op, platform, input_type, input_type)); + +/// Unary kernels. + +#define GENERATE_AND_REGISTER_UNARY_KERNEL(tf_op, platform, input_type, \ + additional_cstrs) \ + GENERATE_UNARY_KERNEL(tf_op, platform, input_type) \ + REGISTER_KERNEL(tf_op, platform, input_type, input_type, additional_cstrs) + +#define GENERATE_AND_REGISTER_UNARY_KERNEL2(tf_op, platform, input_type, \ + output_type, additional_cstrs) \ + GENERATE_UNARY_KERNEL(tf_op, platform, input_type, output_type) \ + REGISTER_KERNEL(tf_op, platform, input_type, output_type, additional_cstrs) + +#define GENERATE_AND_REGISTER_UNARY_KERNEL3( \ + tf_op, platform, input_type, output_type, casted_input_type, \ + casted_output_type, additional_cstrs) \ + GENERATE_UNARY_KERNEL3(tf_op, platform, input_type, output_type, \ + casted_input_type, casted_output_type) \ + REGISTER_KERNEL(tf_op, platform, casted_input_type, casted_output_type, \ + additional_cstrs) + +#define GENERATE_AND_REGISTER_UNARY_JIT_KERNEL(tf_op, platform, input_type, \ + additional_cstrs) \ + GENERATE_AND_REGISTER_UNARY_KERNEL(tf_op, platform, input_type, \ + .Label(kJitKernelLabel) additional_cstrs) + +#define GENERATE_UNARY_KERNEL(tf_op, platform, input_type) \ + GENERATE_UNARY_KERNEL2(tf_op, platform, input_type, input_type) + +#define GENERATE_UNARY_KERNEL2(tf_op, platform, input_type, output_type) \ + GENERATE_UNARY_KERNEL3(tf_op, platform, input_type, output_type, input_type, \ + output_type) + +#define GENERATE_UNARY_KERNEL3(tf_op, platform, input_type, output_type, \ + casted_input_type, casted_output_type) \ + extern "C" void MLIR_FUNCTION(tf_op, platform, input_type, output_type)( \ + UnrankedMemRef * result, OpKernelContext * ctx, UnrankedMemRef * arg); \ + \ + namespace { \ + class MLIR_OP(tf_op, platform, casted_input_type, casted_output_type) \ + : public MLIROpKernel::Type, \ + casted_output_type> { \ + public: \ + using MLIROpKernel::MLIROpKernel; \ + \ + UnrankedMemRef Invoke( \ + OpKernelContext* ctx, \ + llvm::SmallVectorImpl& args) override { \ + UnrankedMemRef result; \ + MLIR_FUNCTION(tf_op, platform, input_type, output_type) \ + (&result, ctx, &args[0]); \ + return result; \ + } \ + }; \ + } + +/// Binary kernels. + +#define GENERATE_AND_REGISTER_BINARY_KERNEL(tf_op, platform, input_type, \ + additional_cstrs) \ + GENERATE_BINARY_KERNEL(tf_op, platform, input_type) \ + REGISTER_KERNEL(tf_op, platform, input_type, input_type, additional_cstrs) + +#define GENERATE_AND_REGISTER_BINARY_KERNEL2(tf_op, platform, input_type, \ + output_type, additional_cstrs) \ + GENERATE_BINARY_KERNEL2(tf_op, platform, input_type, output_type) \ + REGISTER_KERNEL(tf_op, platform, input_type, output_type, additional_cstrs) + +#define GENERATE_AND_REGISTER_BINARY_KERNEL3( \ + tf_op, platform, input_type, output_type, casted_input_type, \ + casted_output_type, additional_cstrs) \ + GENERATE_BINARY_KERNEL3(tf_op, platform, input_type, output_type, \ + casted_input_type, casted_output_type) \ + REGISTER_KERNEL(tf_op, platform, casted_input_type, casted_output_type, \ + additional_cstrs) + +#define GENERATE_AND_REGISTER_BINARY_JIT_KERNEL(tf_op, platform, input_type, \ + additional_cstrs) \ + GENERATE_AND_REGISTER_BINARY_KERNEL( \ + tf_op, platform, input_type, .Label(kJitKernelLabel) additional_cstrs) + +#define GENERATE_BINARY_KERNEL(tf_op, platform, input_type) \ + GENERATE_BINARY_KERNEL2(tf_op, platform, input_type, input_type) + +#define GENERATE_BINARY_KERNEL2(tf_op, platform, input_type, output_type) \ + GENERATE_BINARY_KERNEL3(tf_op, platform, input_type, output_type, \ + input_type, output_type) + +#define GENERATE_BINARY_KERNEL3(tf_op, platform, input_type, output_type, \ + casted_input_type, casted_output_type) \ + extern "C" void MLIR_FUNCTION(tf_op, platform, input_type, output_type)( \ + UnrankedMemRef * result, OpKernelContext * ctx, UnrankedMemRef * arg0, \ + UnrankedMemRef * arg1); \ + \ + namespace { \ + class MLIR_OP(tf_op, platform, casted_input_type, casted_output_type) \ + : public MLIROpKernel::Type, \ + casted_output_type> { \ + public: \ + using MLIROpKernel::MLIROpKernel; \ + \ + UnrankedMemRef Invoke( \ + OpKernelContext* ctx, \ + llvm::SmallVectorImpl& args) override { \ + UnrankedMemRef result; \ + MLIR_FUNCTION(tf_op, platform, input_type, output_type) \ + (&result, ctx, &args[0], &args[1]); \ + return result; \ + } \ + }; \ + } + +/// Ternary kernels. + +#define GENERATE_AND_REGISTER_TERNARY_KERNEL(tf_op, platform, input_type, \ + additional_cstrs) \ + GENERATE_TERNARY_KERNEL(tf_op, platform, input_type) \ + REGISTER_KERNEL(tf_op, platform, input_type, input_type, additional_cstrs) + +#define GENERATE_AND_REGISTER_TERNARY_KERNEL2(tf_op, platform, input_type, \ + output_type, additional_cstrs) \ + GENERATE_TERNARY_KERNEL2(tf_op, platform, input_type, output_type) \ + REGISTER_KERNEL(tf_op, platform, input_type, output_type, additional_cstrs) + +#define GENERATE_AND_REGISTER_TERNARY_KERNEL3( \ + tf_op, platform, input_type, output_type, casted_input_type, \ + casted_output_type, additional_cstrs) \ + GENERATE_TERNARY_KERNEL3(tf_op, platform, input_type, output_type, \ + casted_input_type, casted_output_type) \ + REGISTER_KERNEL(tf_op, platform, casted_input_type, casted_output_type, \ + additional_cstrs) + +#define GENERATE_AND_REGISTER_TERNARY_JIT_KERNEL(tf_op, platform, input_type, \ + additional_cstrs) \ + GENERATE_AND_REGISTER_TERNARY_KERNEL( \ + tf_op, platform, input_type, .Label(kJitKernelLabel) additional_cstrs) + +#define GENERATE_TERNARY_KERNEL(tf_op, platform, input_type) \ + GENERATE_TERNARY_KERNEL2(tf_op, platform, input_type, input_type) + +#define GENERATE_TERNARY_KERNEL2(tf_op, platform, input_type, output_type) \ + GENERATE_TERNARY_KERNEL3(tf_op, platform, input_type, output_type, \ + input_type, output_type) + +#define GENERATE_TERNARY_KERNEL3(tf_op, platform, input_type, output_type, \ + casted_input_type, casted_output_type) \ + extern "C" void MLIR_FUNCTION(tf_op, platform, input_type, output_type)( \ + UnrankedMemRef * result, OpKernelContext * ctx, UnrankedMemRef * arg0, \ + UnrankedMemRef * arg1, UnrankedMemRef * arg2); \ + \ + namespace { \ + class MLIR_OP(tf_op, platform, casted_input_type, casted_output_type) \ + : public MLIROpKernel::Type, \ + casted_output_type> { \ + public: \ + using MLIROpKernel::MLIROpKernel; \ + \ + UnrankedMemRef Invoke( \ + OpKernelContext* ctx, \ + llvm::SmallVectorImpl& args) override { \ + UnrankedMemRef result; \ + MLIR_FUNCTION(tf_op, platform, input_type, output_type) \ + (&result, ctx, &args[0], &args[1], &args[2]); \ + return result; \ + } \ + }; \ + } + +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_MLIR_GENERATED_BASE_OP_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/rnn/blas_gemm.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/rnn/blas_gemm.h new file mode 100644 index 0000000000000000000000000000000000000000..0a00df0e975e6c8d9d6e4e87770d6c2283ea6b59 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/rnn/blas_gemm.h @@ -0,0 +1,97 @@ +/* Copyright 2016 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_KERNELS_RNN_BLAS_GEMM_H_ +#define TENSORFLOW_CORE_KERNELS_RNN_BLAS_GEMM_H_ + +#include "unsupported/Eigen/CXX11/Tensor" // from @eigen_archive +#include "tensorflow/core/framework/tensor_types.h" +#include "tensorflow/core/kernels/eigen_activations.h" +#include "tensorflow/core/platform/types.h" + +#if defined(TENSORFLOW_USE_CUSTOM_CONTRACTION_KERNEL) +#include "tsl/framework/contraction/eigen_contraction_kernel.h" +#endif + +namespace tensorflow { +class OpKernelContext; +namespace functor { + +template +struct TensorCuBlasGemm { + void operator()(OpKernelContext* ctx, bool transa, bool transb, uint64 m, + uint64 n, uint64 k, float alpha, const T* a, int lda, + const T* b, int ldb, float beta, T* c, int ldc); +}; + +template +struct gemm_compute_type { + typedef T type; +}; + +template <> +struct gemm_compute_type { + typedef float type; +}; + +template +struct TensorBlasGemm; + +template +struct TensorBlasGemm { + static void compute(OpKernelContext* ctx, const Device& d, bool transa, + bool transb, typename gemm_compute_type::type alpha, + typename TTypes::ConstMatrix a, + typename TTypes::ConstMatrix b, + typename gemm_compute_type::type beta, + typename TTypes::Matrix c) { + int64_t m = c.dimensions()[0]; + int64_t n = c.dimensions()[1]; + int64_t k = transa ? a.dimensions()[0] : a.dimensions()[1]; + + TensorCuBlasGemm()(ctx, transb, transa, n, m, k, alpha, b.data(), + transb ? k : n, a.data(), transa ? m : k, beta, + c.data(), n); + } +}; + +template +struct TensorBlasGemm { + static void compute(OpKernelContext* ctx, const Device& d, bool transa, + bool transb, typename gemm_compute_type::type alpha, + typename TTypes::ConstMatrix a, + typename TTypes::ConstMatrix b, + typename gemm_compute_type::type beta, + typename TTypes::Matrix c) { + Eigen::array, 1> contract_pairs; + contract_pairs[0] = + Eigen::IndexPair(transa == false, transb == true); + if (alpha == typename gemm_compute_type::type(1.f) && + beta == typename gemm_compute_type::type(0.f)) { + c.device(d) = a.contract(b, contract_pairs); + } else if (alpha == typename gemm_compute_type::type(1.f) && + beta == typename gemm_compute_type::type(1.f)) { + c.device(d) += a.contract(b, contract_pairs); + } else { + c.device(d) = c.constant(T(alpha)) * a.contract(b, contract_pairs) + + c.constant(T(beta)) * c; + } + } +}; + +} // namespace functor +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_RNN_BLAS_GEMM_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/rnn/gru_ops.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/rnn/gru_ops.h new file mode 100644 index 0000000000000000000000000000000000000000..8799401d00b102f5d303ef67527ad7d2f49d0fd1 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/rnn/gru_ops.h @@ -0,0 +1,189 @@ +/* Copyright 2016 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_KERNELS_RNN_GRU_OPS_H_ +#define TENSORFLOW_CORE_KERNELS_RNN_GRU_OPS_H_ + +#include "unsupported/Eigen/CXX11/Tensor" // from @eigen_archive +#include "tensorflow/core/framework/tensor_types.h" +#include "tensorflow/core/kernels/rnn/blas_gemm.h" +#include "tensorflow/core/platform/types.h" + +namespace tensorflow { + +class OpKernelContext; + +namespace functor { + +struct GRUCell { + GRUCell(const int batch_size, const int input_size, const int cell_size) + : batch_size_(batch_size), + input_size_(input_size), + cell_size_(cell_size) {} + + inline Eigen::array x_offsets() const { return {0, 0}; } + + inline Eigen::array x_extends() const { + return {batch_size_, input_size_}; + } + + inline Eigen::array h_offsets() const { + return {0, input_size_}; + } + + inline Eigen::array h_extends() const { + return {batch_size_, cell_size_}; + } + + inline Eigen::array ru_r_offset() const { + return {0, 0}; + } + + inline Eigen::array ru_u_offset() const { + return {0, cell_size_}; + } + + inline Eigen::array cell_extents() const { + return {batch_size_, cell_size_}; + } + + protected: + const int batch_size_; + const int input_size_; + const int cell_size_; +}; + +template +struct GRUBlockCellFprop : public GRUCell { + GRUBlockCellFprop(const int batch_size, const int input_size, + const int cell_size) + : GRUCell(batch_size, input_size, cell_size) {} + + void operator()( + OpKernelContext* ctx, const Device& d, typename TTypes::ConstMatrix x, + typename TTypes::ConstMatrix h_prev, + typename TTypes::ConstMatrix w_ru, typename TTypes::ConstMatrix w_c, + typename TTypes::ConstVec b_ru, typename TTypes::ConstVec b_c, + typename TTypes::Matrix r_u_bar, typename TTypes::Matrix r, + typename TTypes::Matrix u, typename TTypes::Matrix c, + typename TTypes::Matrix h, typename TTypes::Matrix x_h_prev, + typename TTypes::Matrix x_h_prevr) { + // Concat x_h_prev = [x, h_prev]. + x_h_prev.slice(x_offsets(), x_extends()).device(d) = x; + x_h_prev.slice(h_offsets(), h_extends()).device(d) = h_prev; + + // r_u_bar = x_h_prev * w_ru + b_ru + typename TTypes::ConstMatrix const_x_h_prev(x_h_prev.data(), + x_h_prev.dimensions()); + TensorBlasGemm::compute( + ctx, d, false, false, typename gemm_compute_type::type(1.f), + const_x_h_prev, w_ru, typename gemm_compute_type::type(0.f), + r_u_bar); + + // Creating a bias matrix for adding by broadcasting 'b_ru' + Eigen::array broadcast_shape({batch_size_, 1}); + Eigen::array b_ru_shape({1, b_ru.dimensions()[0]}); + r_u_bar.device(d) += b_ru.reshape(b_ru_shape).broadcast(broadcast_shape); + + // Slice r_u_bar into r, u and apply the sigmoid. + r.device(d) = (r_u_bar.slice(ru_r_offset(), cell_extents())).sigmoid(); + u.device(d) = (r_u_bar.slice(ru_u_offset(), cell_extents())).sigmoid(); + + // Concat x_h_prevr = [x,h_prev*r] + x_h_prevr.slice(x_offsets(), x_extends()).device(d) = x; + x_h_prevr.slice(h_offsets(), h_extends()).device(d) = h_prev * r; + + // c = tanh(x_h_prevr*w_c+b_c), Note b_c is broadcasted before adding. + typename TTypes::ConstMatrix const_x_h_prevr(x_h_prevr.data(), + x_h_prevr.dimensions()); + TensorBlasGemm::compute( + ctx, d, false, false, typename gemm_compute_type::type(1.f), + const_x_h_prevr, w_c, typename gemm_compute_type::type(0.f), c); + + Eigen::array b_c_shape({1, b_c.dimensions()[0]}); + c.device(d) += (b_c.reshape(b_c_shape).broadcast(broadcast_shape)); + c.device(d) = c.tanh(); + + // h= u*h_prev + (1-u)*c + h.device(d) = u * (h_prev - c) + c; + } +}; + +template +struct GRUBlockCellBprop : public GRUCell { + GRUBlockCellBprop(const int batch_size, const int input_size, + const int cell_size) + : GRUCell(batch_size, input_size, cell_size) {} + + void operator()( + OpKernelContext* ctx, const Device& d, typename TTypes::ConstMatrix x, + typename TTypes::ConstMatrix h_prev, + typename TTypes::ConstMatrix w_ru, typename TTypes::ConstMatrix w_c, + typename TTypes::ConstVec b_ru, typename TTypes::ConstVec b_c, + typename TTypes::ConstMatrix r, typename TTypes::ConstMatrix u, + typename TTypes::ConstMatrix c, typename TTypes::ConstMatrix d_h, + typename TTypes::Matrix d_x, typename TTypes::Matrix d_h_prev, + typename TTypes::Matrix d_c_bar, + typename TTypes::Matrix d_r_bar_u_bar, + typename TTypes::Matrix d_r_bar, typename TTypes::Matrix d_u_bar, + typename TTypes::Matrix d_hr, + typename TTypes::Matrix d_x_comp1_and_h_prev_comp1, + typename TTypes::Matrix d_x_comp2_and_h_prevr) { + // d_c_bar = d_h*(1-u)*(1-(c*c)) + d_c_bar.device(d) = + ((d_h * (u.constant(T(1)) - u)) * (c.constant(T(1)) - c * c)); + + // d_u_bar = d_h*(h-c)*(u*(1-u)) + d_u_bar.device(d) = d_h * (h_prev - c) * u * (u.constant(T(1)) - u); + + // [2nd_component_of_d_x d_h_prevr] = d_c_bar X w_c^T + typename TTypes::ConstMatrix const_d_c_bar(d_c_bar.data(), + d_c_bar.dimensions()); + TensorBlasGemm::compute( + ctx, d, false, true, typename gemm_compute_type::type(1.f), + const_d_c_bar, w_c, typename gemm_compute_type::type(0.f), + d_x_comp2_and_h_prevr); + + d_hr.device(d) = d_x_comp2_and_h_prevr.slice(h_offsets(), h_extends()); + d_r_bar.device(d) = (d_hr * h_prev * r) * (r.constant(T(1)) - r); + + // d_r_bar_u_bar = concatenate(d_r_bar, d_u_bar) along axis = 1. + d_r_bar_u_bar.slice(ru_r_offset(), cell_extents()).device(d) = d_r_bar; + d_r_bar_u_bar.slice(ru_u_offset(), cell_extents()).device(d) = d_u_bar; + + // [1st_component_of_d_x 1st_component_of_d_h_prev] = [d_r_bar d_u_bar] X + // w_ru^T + typename TTypes::ConstMatrix const_d_r_bar_u_bar( + d_r_bar_u_bar.data(), d_r_bar_u_bar.dimensions()); + TensorBlasGemm::compute( + ctx, d, false, true, typename gemm_compute_type::type(1.f), + const_d_r_bar_u_bar, w_ru, typename gemm_compute_type::type(0.f), + d_x_comp1_and_h_prev_comp1); + + // d_x = d_x_comp1 + d_x_comp2 + d_x.device(d) = (d_x_comp1_and_h_prev_comp1 + d_x_comp2_and_h_prevr) + .slice(x_offsets(), x_extends()); + + // d_h_prev = d_h_comp1 + d_hr*r + d_h*u + d_h_prev.device(d) = + d_x_comp1_and_h_prev_comp1.slice(h_offsets(), h_extends()) + + (d_hr * r) + (d_h * u); + } +}; + +} // namespace functor +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_RNN_GRU_OPS_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/rnn/lstm_ops.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/rnn/lstm_ops.h new file mode 100644 index 0000000000000000000000000000000000000000..f24575312c259b253a1c81ce37feb378be2db378 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/rnn/lstm_ops.h @@ -0,0 +1,308 @@ +/* Copyright 2016 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_KERNELS_RNN_LSTM_OPS_H_ +#define TENSORFLOW_CORE_KERNELS_RNN_LSTM_OPS_H_ + +#include "unsupported/Eigen/CXX11/Tensor" // from @eigen_archive +#include "tensorflow/core/framework/tensor_types.h" +#include "tensorflow/core/kernels/eigen_activations.h" +#include "tensorflow/core/kernels/rnn/blas_gemm.h" +#include "tensorflow/core/platform/types.h" + +namespace tensorflow { +class OpKernelContext; + +enum GateLayout { ICFO, IFCO }; + +constexpr int gate_c_offset(GateLayout gate_layout, int cell_size) { + return (gate_layout == ICFO) ? cell_size : cell_size * 2; +} + +constexpr int gate_f_offset(GateLayout gate_layout, int cell_size) { + return (gate_layout == ICFO) ? cell_size * 2 : cell_size; +} + +namespace functor { + +template +struct TensorZero { + void operator()(const Device& d, typename TTypes::Flat t) { + t.device(d) = t.constant(T(0)); + } +}; + +template +struct TensorUnalignedZero { + void operator()(const Device& d, typename TTypes::UnalignedFlat t) { + t.device(d) = t.constant(T(0)); + } +}; + +template +struct TensorCopy { + void operator()(const Device& d, typename TTypes::ConstFlat src, + typename TTypes::Flat dst) { + dst.device(d) = src; + } +}; + +template +struct TensorCopyUnaligned { + void operator()(const Device& d, typename TTypes::UnalignedConstFlat src, + typename TTypes::Flat dst) { + dst.device(d) = src; + } +}; + +template +struct TensorCopyToUnaligned { + void operator()(const Device& d, typename TTypes::ConstFlat src, + typename TTypes::UnalignedFlat dst) { + dst.device(d) = src; + } +}; + +template +struct TensorAdd { + void operator()(const Device& d, typename TTypes::ConstFlat a, + typename TTypes::ConstFlat b, typename TTypes::Flat c) { + c.device(d) = a + b; + } +}; + +template +struct TensorZeroPadding { + void operator()(const Device& d, const int64_t time_idx, + typename TTypes::ConstVec seq_len, + typename TTypes::Vec mask, typename TTypes::Matrix m) { + // mask is shape [batch_size]. + mask.device(d) = seq_len.constant(time_idx) < seq_len; + + // m_shape is [batch_size, 1]. + Eigen::array m_shape({m.dimensions()[0], 1}); + // broadcast_shape is [1, units]. + Eigen::array broadcast_shape({1, m.dimensions()[1]}); + + // m is shape [batch_size, units]. + m.device(d) = m * mask.reshape(m_shape).broadcast(broadcast_shape); + } +}; + +struct LSTMBlockCell { + LSTMBlockCell(const int batch_size, const int input_size, const int cell_size) + : batch_size_(batch_size), + input_size_(input_size), + cell_size_(cell_size) {} + + int batch_size() const { return batch_size_; } + + int input_size() const { return input_size_; } + + int cell_size() const { return cell_size_; } + + inline Eigen::array gates_i_offsets() const { + return {0, 0}; + } + + inline Eigen::array gates_c_offsets( + const GateLayout gate_layout) const { + return {0, gate_c_offset(gate_layout, cell_size_)}; + } + + inline Eigen::array gates_f_offsets( + const GateLayout gate_layout) const { + return {0, gate_f_offset(gate_layout, cell_size_)}; + } + + inline Eigen::array gates_o_offsets() const { + return {0, cell_size_ * 3}; + } + + inline Eigen::array cell_extents() const { + return {batch_size_, cell_size_}; + } + + inline Eigen::array xh_x_offsets() const { + return {0, 0}; + } + + inline Eigen::array xh_x_extents() const { + return {batch_size_, input_size_}; + } + + inline Eigen::array xh_h_offsets() const { + return {0, input_size_}; + } + + inline Eigen::array xh_h_extents() const { + return {batch_size_, cell_size_}; + } + + protected: + const int batch_size_; + const int input_size_; + const int cell_size_; +}; + +// See lstm_ops.cc for CPUDevice implementation and lstm_ops_gpu.cu.cc for +// GPUDevice implementation. +template +struct LSTMBlockCellFprop : public LSTMBlockCell { + LSTMBlockCellFprop(const int batch_size, const int input_size, + const int cell_size) + : LSTMBlockCell(batch_size, input_size, cell_size) {} + + void operator()(OpKernelContext* ctx, const Device& d, + const float forget_bias, const float cell_clip, + bool use_peephole, typename TTypes::ConstMatrix x, + typename TTypes::ConstMatrix cs_prev, + typename TTypes::ConstMatrix h_prev, + typename TTypes::ConstMatrix w, + typename TTypes::ConstVec wci, + typename TTypes::ConstVec wcf, + typename TTypes::ConstVec wco, + typename TTypes::ConstVec b, typename TTypes::Matrix xh, + typename TTypes::Matrix i, typename TTypes::Matrix cs, + typename TTypes::Matrix f, typename TTypes::Matrix o, + typename TTypes::Matrix ci, typename TTypes::Matrix co, + typename TTypes::Matrix gates, + typename TTypes::Matrix h); +}; + +// See lstm_ops.cc for CPUDevice implementation and lstm_ops_gpu.cu.cc for +// GPUDevice implementation. +template +struct LSTMBlockCellBprop : public LSTMBlockCell { + LSTMBlockCellBprop(const int batch_size, const int input_size, + const int cell_size) + : LSTMBlockCell(batch_size, input_size, cell_size) {} + + void operator()( + OpKernelContext* ctx, const Device& d, bool use_peephole, + typename TTypes::ConstMatrix x, + typename TTypes::ConstMatrix cs_prev, + typename TTypes::ConstMatrix h_prev, typename TTypes::ConstMatrix w, + typename TTypes::ConstVec wci, typename TTypes::ConstVec wcf, + typename TTypes::ConstVec wco, typename TTypes::ConstVec b, + typename TTypes::ConstMatrix i, typename TTypes::ConstMatrix cs, + typename TTypes::ConstMatrix f, typename TTypes::ConstMatrix o, + typename TTypes::ConstMatrix ci, typename TTypes::ConstMatrix co, + typename TTypes::ConstMatrix cs_grad, + typename TTypes::ConstMatrix h_grad, typename TTypes::Matrix do_, + typename TTypes::Matrix dcs, typename TTypes::Matrix dci, + typename TTypes::Matrix df, typename TTypes::Matrix di, + typename TTypes::Matrix dgates, + typename TTypes::Matrix cs_prev_grad, typename TTypes::Vec wci_grad, + typename TTypes::Vec wcf_grad, typename TTypes::Vec wco_grad); +}; + +template +struct BlockLSTMBprop : public LSTMBlockCell { + BlockLSTMBprop(const int batch_size, const int input_size, + const int cell_size) + : LSTMBlockCell(batch_size, input_size, cell_size) {} + + void operator()( + OpKernelContext* ctx, const Device& d, bool use_peephole, + typename TTypes::ConstMatrix x, + typename TTypes::ConstMatrix cs_prev, + typename TTypes::ConstMatrix h_prev, typename TTypes::ConstMatrix w, + typename TTypes::ConstVec wci, typename TTypes::ConstVec wcf, + typename TTypes::ConstVec wco, typename TTypes::ConstVec b, + typename TTypes::Matrix xh, typename TTypes::ConstMatrix i, + typename TTypes::ConstMatrix cs, typename TTypes::ConstMatrix f, + typename TTypes::ConstMatrix o, typename TTypes::ConstMatrix ci, + typename TTypes::ConstMatrix co, + typename TTypes::ConstMatrix cs_grad, + typename TTypes::ConstMatrix h_grad, typename TTypes::Matrix do_, + typename TTypes::Matrix dcs, typename TTypes::Matrix dci, + typename TTypes::Matrix df, typename TTypes::Matrix di, + typename TTypes::Matrix dgates, + typename TTypes::Matrix cs_prev_grad, + typename TTypes::Matrix h_prev_grad, + typename TTypes::Matrix xh_grad, typename TTypes::Matrix x_grad, + typename TTypes::Matrix w_grad, typename TTypes::Vec wci_grad, + typename TTypes::Vec wcf_grad, typename TTypes::Vec wco_grad, + typename TTypes::Vec b_grad) { + // do[t] = sigm'(o[t]) .* dh[t] .* co[t] + do_.device(d) = o * (o.constant(T(1)) - o) * h_grad * co; + + // dcs[t] += tanh'(cs[t]) .* dh[t] .* o[t] + dcs[t + 1] .* f[t + 1] + dcs.device(d) = (co.constant(T(1)) - co * co) * h_grad * o + cs_grad; + + Eigen::array p_shape({1, cell_size_}); + Eigen::array p_broadcast_shape({batch_size_, 1}); + if (use_peephole) { + dcs.device(d) = + dcs + do_ * wco.reshape(p_shape).broadcast(p_broadcast_shape); + } + + // dci[t] = tanh'(ci[t]) dcs[t] i[t] + dci.device(d) = (ci.constant(T(1)) - ci * ci) * dcs * i; + + // df[t] = sigm'(f[t]) dcs[t] cs[t - 1] + df.device(d) = f * (f.constant(T(1)) - f) * dcs * cs_prev; + + // di[t] = sigm'(i[t]) dcs[t] ci[t] + di.device(d) = i * (i.constant(T(1)) - i) * dcs * ci; + + dgates.slice(gates_i_offsets(), cell_extents()).device(d) = di; + dgates.slice(gates_c_offsets(gate_layout), cell_extents()).device(d) = dci; + dgates.slice(gates_f_offsets(gate_layout), cell_extents()).device(d) = df; + dgates.slice(gates_o_offsets(), cell_extents()).device(d) = do_; + + cs_prev_grad.device(d) = dcs * f; + if (use_peephole) { + cs_prev_grad.device(d) = + cs_prev_grad + + di * wci.reshape(p_shape).broadcast(p_broadcast_shape) + + df * wcf.reshape(p_shape).broadcast(p_broadcast_shape); + } + + // xh_grad. + typename TTypes::ConstMatrix const_dgates(dgates.data(), + dgates.dimensions()); + TensorBlasGemm::compute( + ctx, d, false, true, 1.f, const_dgates, w, 0.f, xh_grad); + + // xh. + xh.slice(xh_x_offsets(), xh_x_extents()).device(d) = x; + xh.slice(xh_h_offsets(), xh_h_extents()).device(d) = h_prev; + typename TTypes::ConstMatrix const_xh(xh.data(), xh.dimensions()); + + // x_grad. + x_grad.device(d) = xh_grad.slice(xh_x_offsets(), xh_x_extents()); + h_prev_grad.device(d) = xh_grad.slice(xh_h_offsets(), xh_h_extents()); + + // w_grad. + TensorBlasGemm::compute( + ctx, d, true, false, 1.f, const_xh, const_dgates, 1.f, w_grad); + + // b_grad. + b_grad.device(d) += dgates.sum(Eigen::array({0})); + + if (use_peephole) { + wci_grad.device(d) += (di * cs_prev).sum(Eigen::array({0})); + wcf_grad.device(d) += (df * cs_prev).sum(Eigen::array({0})); + wco_grad.device(d) += (do_ * cs).sum(Eigen::array({0})); + } + } +}; + +} // namespace functor +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_RNN_LSTM_OPS_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/sdca_internal.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/sdca_internal.h new file mode 100644 index 0000000000000000000000000000000000000000..5f5f8bacd15c1e078e3bb036c9e7f89d044ae21c --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/sdca_internal.h @@ -0,0 +1,394 @@ +/* Copyright 2016 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_KERNELS_SDCA_INTERNAL_H_ +#define TENSORFLOW_CORE_KERNELS_SDCA_INTERNAL_H_ + +#define EIGEN_USE_THREADS + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "unsupported/Eigen/CXX11/Tensor" // from @eigen_archive +#include "tensorflow/core/framework/device_base.h" +#include "tensorflow/core/framework/op_kernel.h" +#include "tensorflow/core/framework/tensor.h" +#include "tensorflow/core/framework/tensor_shape.h" +#include "tensorflow/core/framework/tensor_types.h" +#include "tensorflow/core/framework/types.h" +#include "tensorflow/core/kernels/loss.h" +#include "tensorflow/core/lib/core/coding.h" +#include "tensorflow/core/lib/core/errors.h" +#include "tensorflow/core/lib/core/status.h" +#include "tensorflow/core/lib/core/stringpiece.h" +#include "tensorflow/core/lib/gtl/inlined_vector.h" +#include "tensorflow/core/lib/random/distribution_sampler.h" +#include "tensorflow/core/lib/strings/stringprintf.h" +#include "tensorflow/core/util/guarded_philox_random.h" +#include "tensorflow/core/util/work_sharder.h" + +namespace tensorflow { + +namespace sdca { + +// Statistics computed with input (ModelWeights, Example). +struct ExampleStatistics { + // Logits for each class. + // For binary case, this should be a vector of length 1; while for multiclass + // case, this vector has the same length as the number of classes, where each + // value corresponds to one class. + // Use InlinedVector to avoid heap allocation for small number of classes. + gtl::InlinedVector wx; + + // Logits for each class, using the previous weights. + gtl::InlinedVector prev_wx; + + // Sum of squared feature values occurring in the example divided by + // L2 * sum(example_weights). + double normalized_squared_norm = 0; + + // Num_weight_vectors equals to the number of classification classes in the + // multiclass case; while for binary case, it is 1. + ExampleStatistics(const int num_weight_vectors) + : wx(num_weight_vectors, 0.0), prev_wx(num_weight_vectors, 0.0) {} +}; + +class Regularizations { + public: + Regularizations() {} + + // Initialize() must be called immediately after construction. + Status Initialize(OpKernelConstruction* const context) { + TF_RETURN_IF_ERROR(context->GetAttr("l1", &symmetric_l1_)); + TF_RETURN_IF_ERROR(context->GetAttr("l2", &symmetric_l2_)); + shrinkage_ = symmetric_l1_ / symmetric_l2_; + return OkStatus(); + } + + // Proximal SDCA shrinking for L1 regularization. + double Shrink(const double weight) const { + const double shrinked = std::max(std::abs(weight) - shrinkage_, 0.0); + if (shrinked > 0.0) { + return std::copysign(shrinked, weight); + } + return 0.0; + } + + // Vectorized float variant of the above. + Eigen::Tensor EigenShrinkVector( + const Eigen::Tensor weights) const { + // Proximal step on the weights which is sign(w)*|w - shrinkage|+. + return weights.sign() * ((weights.abs() - weights.constant(shrinkage_)) + .cwiseMax(weights.constant(0.0))); + } + + // Matrix float variant of the above. + Eigen::Tensor EigenShrinkMatrix( + const Eigen::Tensor weights) const { + // Proximal step on the weights which is sign(w)*|w - shrinkage|+. + return weights.sign() * ((weights.abs() - weights.constant(shrinkage_)) + .cwiseMax(weights.constant(0.0))); + } + + float symmetric_l2() const { return symmetric_l2_; } + + private: + float symmetric_l1_ = 0; + float symmetric_l2_ = 0; + + // L1 divided by L2, pre-computed for use during weight shrinking. + double shrinkage_ = 0; + + Regularizations(const Regularizations&) = delete; + void operator=(const Regularizations&) = delete; +}; + +class ModelWeights; + +// Struct describing a single example. +class Example { + public: + // Compute matrix vector product between weights (a matrix) and features + // (a vector). This method also computes the normalized example norm used + // in SDCA update. + // For multiclass case, num_weight_vectors equals to the number of classes; + // while for binary case, it is 1. + const ExampleStatistics ComputeWxAndWeightedExampleNorm( + const int num_loss_partitions, const ModelWeights& model_weights, + const Regularizations& regularization, + const int num_weight_vectors) const; + + float example_label() const { return example_label_; } + + float example_weight() const { return example_weight_; } + + double squared_norm() const { return squared_norm_; } + + // Sparse features associated with the example. + // Indices and Values are the associated feature index, and values. Values + // can be optionally absent, in which we case we implicitly assume a value of + // 1.0f. + struct SparseFeatures { + std::unique_ptr::UnalignedConstVec> indices; + std::unique_ptr::UnalignedConstVec> + values; // nullptr encodes optional. + }; + + // A dense vector which is a row-slice of the underlying matrix. + struct DenseVector { + // Returns a row slice from the matrix. + Eigen::TensorMap> Row() + const { + return Eigen::TensorMap>( + data_matrix.data() + row_index * data_matrix.dimension(1), + data_matrix.dimension(1)); + } + + // Returns a row slice as a 1 * F matrix, where F is the number of features. + Eigen::TensorMap> + RowAsMatrix() const { + return Eigen::TensorMap>( + data_matrix.data() + row_index * data_matrix.dimension(1), 1, + data_matrix.dimension(1)); + } + + const TTypes::ConstMatrix data_matrix; + const int64_t row_index; + }; + + private: + std::vector sparse_features_; + std::vector> dense_vectors_; + + float example_label_ = 0; + float example_weight_ = 0; + double squared_norm_ = 0; // sum squared norm of the features. + + // Examples fills Example in a multi-threaded way. + friend class Examples; + + // ModelWeights use each example for model update w += \alpha * x_{i}; + friend class ModelWeights; +}; + +// Weights related to features. For example, say you have two sets of sparse +// features i.e. age bracket and country, then FeatureWeightsDenseStorage hold +// the parameters for it. We keep track of the original weight passed in and the +// delta weight which the optimizer learns in each call to the optimizer. +class FeatureWeightsDenseStorage { + public: + FeatureWeightsDenseStorage(const TTypes::Matrix nominals, + TTypes::Matrix deltas) + : nominals_(nominals), deltas_(deltas) { + CHECK_GT(deltas.rank(), 1); + } + + // Check if a feature index is with-in the bounds. + bool IndexValid(const int64_t index) const { + return index >= 0 && index < deltas_.dimension(1); + } + + // Nominals here are the original weight matrix. + TTypes::Matrix nominals() const { return nominals_; } + + // Delta weights during mini-batch updates. + TTypes::Matrix deltas() const { return deltas_; } + + // Updates delta weights based on active dense features in the example and + // the corresponding dual residual. + void UpdateDenseDeltaWeights( + const Eigen::ThreadPoolDevice& device, + const Example::DenseVector& dense_vector, + const std::vector& normalized_bounded_dual_delta); + + private: + // The nominal value of the weight for a feature (indexed by its id). + const TTypes::Matrix nominals_; + // The accumulated delta weight for a feature (indexed by its id). + TTypes::Matrix deltas_; +}; + +// Similar to FeatureWeightsDenseStorage, but the underlying weights are stored +// in an unordered map. +class FeatureWeightsSparseStorage { + public: + FeatureWeightsSparseStorage(const TTypes::Vec indices, + const TTypes::Matrix nominals, + TTypes::Matrix deltas) + : nominals_(nominals), deltas_(deltas) { + // Create a map from sparse index to the dense index of the underlying + // storage. + for (int64_t j = 0; j < indices.size(); ++j) { + indices_to_id_[indices(j)] = j; + } + } + + // Check if a feature index exists. + bool IndexValid(const int64_t index) const { + return indices_to_id_.find(index) != indices_to_id_.end(); + } + + // Nominal value at a particular feature index and class label. + float nominals(const int class_id, const int64_t index) const { + auto it = indices_to_id_.find(index); + return nominals_(class_id, it->second); + } + + // Delta weights during mini-batch updates. + float deltas(const int class_id, const int64_t index) const { + auto it = indices_to_id_.find(index); + return deltas_(class_id, it->second); + } + + // Updates delta weights based on active sparse features in the example and + // the corresponding dual residual. + void UpdateSparseDeltaWeights( + const Eigen::ThreadPoolDevice& device, + const Example::SparseFeatures& sparse_features, + const std::vector& normalized_bounded_dual_delta); + + private: + // The nominal value of the weight for a feature (indexed by its id). + const TTypes::Matrix nominals_; + // The accumulated delta weight for a feature (indexed by its id). + TTypes::Matrix deltas_; + // Map from feature index to an index to the dense vector. + std::unordered_map indices_to_id_; +}; + +// Weights in the model, wraps both current weights, and the delta weights +// for both sparse and dense features. +class ModelWeights { + public: + ModelWeights() {} + + bool SparseIndexValid(const int col, const int64_t index) const { + return sparse_weights_[col].IndexValid(index); + } + + bool DenseIndexValid(const int col, const int64_t index) const { + return dense_weights_[col].IndexValid(index); + } + + // Go through all the features present in the example, and update the + // weights based on the dual delta. + void UpdateDeltaWeights( + const Eigen::ThreadPoolDevice& device, const Example& example, + const std::vector& normalized_bounded_dual_delta); + + Status Initialize(OpKernelContext* const context); + + const std::vector& sparse_weights() const { + return sparse_weights_; + } + + const std::vector& dense_weights() const { + return dense_weights_; + } + + private: + std::vector sparse_weights_; + std::vector dense_weights_; + + ModelWeights(const ModelWeights&) = delete; + void operator=(const ModelWeights&) = delete; +}; + +// Examples contains all the training examples that SDCA uses for a mini-batch. +class Examples { + public: + Examples() {} + + // Returns the Example at |example_index|. + const Example& example(const int example_index) const { + return examples_.at(example_index); + } + + int sampled_index(const int id) const { return sampled_index_[id]; } + + // Adaptive SDCA in the current implementation only works for + // binary classification, where the input argument for num_weight_vectors + // is 1. + Status SampleAdaptiveProbabilities( + const int num_loss_partitions, const Regularizations& regularization, + const ModelWeights& model_weights, + const TTypes::Matrix example_state_data, + const std::unique_ptr& loss_updater, + const int num_weight_vectors); + + void RandomShuffle(); + + int num_examples() const { return examples_.size(); } + + int num_features() const { return num_features_; } + + // Initialize() must be called immediately after construction. + Status Initialize(OpKernelContext* const context, const ModelWeights& weights, + int num_sparse_features, + int num_sparse_features_with_values, + int num_dense_features); + + private: + // Reads the input tensors, and builds the internal representation for sparse + // features per example. This function modifies the |examples| passed in + // to build the sparse representations. + static Status CreateSparseFeatureRepresentation( + const DeviceBase::CpuWorkerThreads& worker_threads, int num_examples, + int num_sparse_features, const ModelWeights& weights, + const OpInputList& sparse_example_indices_inputs, + const OpInputList& sparse_feature_indices_inputs, + const OpInputList& sparse_feature_values_inputs, + std::vector* const examples); + + // Reads the input tensors, and builds the internal representation for dense + // features per example. This function modifies the |examples| passed in + // to build the sparse representations. + static Status CreateDenseFeatureRepresentation( + const DeviceBase::CpuWorkerThreads& worker_threads, int num_examples, + int num_dense_features, const ModelWeights& weights, + const OpInputList& dense_features_inputs, + std::vector* const examples); + + // Computes squared example norm per example i.e |x|^2. This function modifies + // the |examples| passed in and adds the squared norm per example. + static Status ComputeSquaredNormPerExample( + const DeviceBase::CpuWorkerThreads& worker_threads, int num_examples, + int num_sparse_features, int num_dense_features, + std::vector* const examples); + + // All examples in the batch. + std::vector examples_; + + // Adaptive sampling variables. + std::vector probabilities_; + std::vector sampled_index_; + std::vector sampled_count_; + + int num_features_ = 0; + + Examples(const Examples&) = delete; + void operator=(const Examples&) = delete; +}; + +} // namespace sdca +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_SDCA_INTERNAL_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/searchsorted_op.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/searchsorted_op.h new file mode 100644 index 0000000000000000000000000000000000000000..a139dfc23e9b33e560a9d6dd19c7f859d4b34fb0 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/searchsorted_op.h @@ -0,0 +1,52 @@ +/* Copyright 2018 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_KERNELS_SEARCHSORTED_OP_H_ +#define TENSORFLOW_CORE_KERNELS_SEARCHSORTED_OP_H_ + +#include "unsupported/Eigen/CXX11/Tensor" // from @eigen_archive +#include "tensorflow/core/framework/op_kernel.h" +#include "tensorflow/core/framework/tensor_types.h" +#include "tensorflow/core/framework/types.h" +#include "tensorflow/core/lib/core/errors.h" + +namespace tensorflow { +namespace functor { + +template +struct UpperBoundFunctor { + // Searches for values in sorted_inputs and returns the greatest possible + // index where they maintain sorted order. + static Status Compute(OpKernelContext* context, + const typename TTypes::ConstTensor& sorted_inputs, + const typename TTypes::ConstTensor& values, + int batch_size, int num_inputs, int num_values, + typename TTypes::Tensor* output); +}; + +template +struct LowerBoundFunctor { + // Searches for values in sorted_inputs and returns the lowest possible + // index where they maintain sorted order. + static Status Compute(OpKernelContext* context, + const typename TTypes::ConstTensor& sorted_inputs, + const typename TTypes::ConstTensor& values, + int batch_size, int num_inputs, int num_values, + typename TTypes::Tensor* output); +}; +} // namespace functor + +} // end namespace tensorflow +#endif // TENSORFLOW_CORE_KERNELS_SEARCHSORTED_OP_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/segment_reduction_ops.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/segment_reduction_ops.h new file mode 100644 index 0000000000000000000000000000000000000000..e3a6712bda2253f39c3d3cdaef271750fa9c2376 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/segment_reduction_ops.h @@ -0,0 +1,172 @@ +/* Copyright 2016 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_KERNELS_SEGMENT_REDUCTION_OPS_H_ +#define TENSORFLOW_CORE_KERNELS_SEGMENT_REDUCTION_OPS_H_ + +#include "unsupported/Eigen/CXX11/Tensor" // from @eigen_archive +#include "tensorflow/core/framework/op_kernel.h" +#include "tensorflow/core/framework/tensor.h" +#include "tensorflow/core/framework/tensor_shape.h" +#include "tensorflow/core/framework/tensor_types.h" + +namespace tensorflow { + +class OpKernelContext; + +bool UseDeterministicSegmentReductions(); +bool DisableSegmentReductionOpDeterminismExceptions(); + +// Type of SparseSegmentReduction operation to perform gradient of. +enum class SparseSegmentReductionOperation { kSum, kMean, kSqrtN }; + +namespace functor { + +#if GOOGLE_CUDA || TENSORFLOW_USE_ROCM + +// Note that we define this ourselves to avoid a dependency on gpuprim. +struct Sum { + template + __host__ __device__ T operator()(const T& a, const T& b) const { + return a + b; + } +}; + +struct Prod { + template + __host__ __device__ T operator()(const T& a, const T& b) const { + return a * b; + } +}; + +// Note that we don't use gpuprim::Min/Max because they use operator<, which is +// not implemented for AlignedVector types. +struct Min { + template + __host__ __device__ T operator()(const T& a, const T& b) const { + return min(a, b); + } +}; + +struct Max { + template + __host__ __device__ T operator()(const T& a, const T& b) const { + return max(a, b); + } +}; + +template +struct ReduceOpIsAssociative {}; +template +struct ReduceOpIsAssociative : std::is_integral {}; +template +struct ReduceOpIsAssociative : std::is_integral {}; +template +struct ReduceOpIsAssociative : std::true_type {}; +template +struct ReduceOpIsAssociative : std::true_type {}; + +typedef Eigen::GpuDevice GPUDevice; +// Functor for SegmentReductionGPUOp. +// output_rows: the number of output segments (unique segment ids in +// 'segment_ids'). +// segment_ids_shape: shape of 'segment_ids' tensor. +// segment_ids: unsorted map from input to output segment ids at which to +// perform segment sum operation. +// data_size: size of input data tensor. +// data: input data tensor. +// output: output reshaped to {output_rows, output.size/output_rows} +template +struct SegmentReductionFunctor { + void operator()(OpKernelContext* ctx, const GPUDevice& d, + const Index output_rows, const TensorShape& segment_ids_shape, + bool is_mean, typename TTypes::ConstFlat segment_ids, + const Index data_size, const T* data, + typename TTypes::Tensor output); + static constexpr bool atomic_reduction_is_associative = + ReduceOpIsAssociative::value; +}; + +#endif // GOOGLE_CUDA || TENSORFLOW_USE_ROCM + +template +struct UnsortedSegmentFunctor { + void operator()(OpKernelContext* ctx, const TensorShape& segment_ids_shape, + typename TTypes::ConstFlat segment_ids, + typename TTypes::ConstTensor data, + typename TTypes::Tensor output); +}; + +// Initial value functors. +template +struct Zero { + EIGEN_STRONG_INLINE T operator()() const { return T(0); } +}; + +template +struct One { + EIGEN_STRONG_INLINE T operator()() const { return T(1); } +}; + +template +struct Lowest { + EIGEN_STRONG_INLINE T operator()() const { + return Eigen::NumTraits::lowest(); + } +}; + +template +struct Highest { + EIGEN_STRONG_INLINE T operator()() const { + return Eigen::NumTraits::highest(); + } +}; + +template +struct SparseSegmentReductionFunctor { + Status operator()(OpKernelContext* context, bool is_mean, bool is_sqrtn, + T default_value, typename TTypes::ConstTensor input, + typename TTypes::ConstVec indices, + typename TTypes::ConstVec segment_ids, + typename TTypes::Tensor output); +}; + +template +struct SparseSegmentGradFunctor { + void operator()(OpKernelContext* context, + SparseSegmentReductionOperation operation, + typename TTypes::ConstMatrix input_flat, + typename TTypes::ConstVec indices_vec, + typename TTypes::ConstVec segment_vec, + typename TTypes::Matrix output_flat); +}; + +template +struct SparseSegmentGradV2Functor { + void operator()(OpKernelContext* context, + SparseSegmentReductionOperation operation, + typename TTypes::ConstMatrix input_flat, + typename TTypes::ConstVec indices_vec, + typename TTypes::ConstVec segment_vec, + const TensorShape& dense_output_shape, + typename AsyncOpKernel::DoneCallback done); +}; + +} // namespace functor +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_SEGMENT_REDUCTION_OPS_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/segment_reduction_ops_gpu.cu.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/segment_reduction_ops_gpu.cu.h new file mode 100644 index 0000000000000000000000000000000000000000..de6b4540abf615d24a00468aa22bc8648dfeacdf --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/segment_reduction_ops_gpu.cu.h @@ -0,0 +1,1417 @@ +/* Copyright 2016 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_KERNELS_SEGMENT_REDUCTION_OPS_GPU_CU_H_ +#define TENSORFLOW_CORE_KERNELS_SEGMENT_REDUCTION_OPS_GPU_CU_H_ + +#if GOOGLE_CUDA || TENSORFLOW_USE_ROCM + +#define EIGEN_USE_GPU + +#include "tensorflow/core/common_runtime/gpu/gpu_event_mgr.h" +#include "tensorflow/core/framework/register_types.h" +#include "tensorflow/core/kernels/gpu_prim.h" +#include "tensorflow/core/kernels/gpu_prim_helpers.h" +#include "tensorflow/core/kernels/segment_reduction_ops.h" +#include "tensorflow/core/lib/core/bits.h" +#include "tensorflow/core/util/determinism.h" +#include "tensorflow/core/util/env_var.h" +#include "tensorflow/core/util/gpu_device_functions.h" +#include "tensorflow/core/util/gpu_kernel_helper.h" +#include "tensorflow/core/util/gpu_solvers.h" // For ScratchSpace +#include "tensorflow/core/util/permutation_input_iterator.h" + +#if (defined(GOOGLE_CUDA) && GOOGLE_CUDA) +#include "xla/stream_executor/cuda/cuda_activation.h" +#elif (defined(TENSORFLOW_USE_ROCM) && TENSORFLOW_USE_ROCM) +#include "tensorflow/core/platform/rocm.h" +#endif + +namespace tensorflow { + +using GPUDevice = Eigen::GpuDevice; + +// Non/Atomic reduction functors for the gpu. +#define DEFINE_REDUCE_UPDATE_OP_GPU(name, func) \ + struct name##OpGpu { \ + template \ + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void operator()(T* dest, \ + const T& value) { \ + func; \ + } \ + }; +DEFINE_REDUCE_UPDATE_OP_GPU(AtomicSum, GpuAtomicAdd(dest, value)) +DEFINE_REDUCE_UPDATE_OP_GPU(AtomicProd, GpuAtomicMul(dest, value)) +DEFINE_REDUCE_UPDATE_OP_GPU(AtomicMax, GpuAtomicMax(dest, value)) +DEFINE_REDUCE_UPDATE_OP_GPU(AtomicMin, GpuAtomicMin(dest, value)) +DEFINE_REDUCE_UPDATE_OP_GPU(NonAtomicSum, *dest += value) +DEFINE_REDUCE_UPDATE_OP_GPU(NonAtomicProd, *dest *= value) +DEFINE_REDUCE_UPDATE_OP_GPU(NonAtomicMax, *dest = max(*dest, value)) +DEFINE_REDUCE_UPDATE_OP_GPU(NonAtomicMin, *dest = min(*dest, value)) +#undef DEFINE_REDUCE_UPDATE_OP_GPU + +template +struct ReduceUpdateOpFor {}; + +#define DEFINE_REDUCE_UPDATE_OP_FOR(reduce_op, atomic, nonatomic) \ + template <> \ + struct ReduceUpdateOpFor { \ + using atomic_op = atomic; \ + using nonatomic_op = nonatomic; \ + }; +DEFINE_REDUCE_UPDATE_OP_FOR(functor::Sum, AtomicSumOpGpu, NonAtomicSumOpGpu) +DEFINE_REDUCE_UPDATE_OP_FOR(functor::Prod, AtomicProdOpGpu, NonAtomicProdOpGpu) +DEFINE_REDUCE_UPDATE_OP_FOR(functor::Max, AtomicMaxOpGpu, NonAtomicMaxOpGpu) +DEFINE_REDUCE_UPDATE_OP_FOR(functor::Min, AtomicMinOpGpu, NonAtomicMinOpGpu) +#undef DEFINE_REDUCE_UPDATE_OP_FOR + +// PR#61339: MSVC does not support compound-assignment operators on device + +// SortedSegmentReductionFunctor kernel reduces input data just as +// UnsortedSegmentReductionCustomKernel does except that input data +// is partitioned along the outer reduction dimension. This is +// because consecutive rows (elements in a row share the same +// outer dimension index) in the flattened 2D input data likely +// belong to the same segment in sorted segment sum operation. +// Therefore such partitioning strategy has two advantages over +// the UnsortedSegmentReductionFunctor kernel: +// 1. Each thread reduces across multiple rows before writing +// answers to the global memory, we can therefore +// write reduction results to global memory less often. +// 2. We may know that the current thread is the only contributor +// to an output element because of the increasing nature of segment +// ids. In such cases, we do not need to use atomic operations +// to write results to global memory. +// In the flattened view of input data (with only outer and inner +// dimension), every thread processes a strip of input data of +// size OuterDimTileSize x 1. This strip runs across multiple +// rows of input data and all reduction elements share one inner +// dimension index. +template +__global__ void SortedSegmentReductionCustomKernel( + const Index input_outer_dim_size, const Index inner_dim_size, + const Index output_outer_dim_size, const Index* __restrict__ segment_ids, + const T* __restrict__ input, T* __restrict__ output, + const Index total_stripe_count, const T initial_value) { + for (int stripe_index : GpuGridRangeX(total_stripe_count)) { + const Index segment_offset = stripe_index % inner_dim_size; + const Index input_outer_dim_index_base = + stripe_index / inner_dim_size * Index(OuterDimTileSize); + + T reduce_res = initial_value; + Index first_segment_id = segment_ids[input_outer_dim_index_base]; + Index last_output_segment_id = output_outer_dim_size; + + const Index actual_stripe_height = + min(Index(OuterDimTileSize), + input_outer_dim_size - input_outer_dim_index_base); + for (Index j = 0; j < actual_stripe_height; j++) { + Index current_output_segment_id = + segment_ids[input_outer_dim_index_base + j]; + // Decide whether to write result to global memory. Result is only written + // to global memory if we move to another segment. Otherwise we can keep + // accumulating locally. + if (current_output_segment_id > last_output_segment_id) { + const Index output_index = + last_output_segment_id * inner_dim_size + segment_offset; + // Decide whether to write result to global memory using atomic + // operations. + if (last_output_segment_id == first_segment_id) { + AtomicReductionF()(output + output_index, reduce_res); + } else { + ReductionF()(output + output_index, reduce_res); + } + reduce_res = initial_value; + } + ReductionF()( + &reduce_res, + ldg(input + (input_outer_dim_index_base + j) * inner_dim_size + + segment_offset)); + last_output_segment_id = current_output_segment_id; + } + // For the last result in a strip, always write using atomic operations + // due to possible race conditions with threads computing + // the following strip. + const Index output_index = + last_output_segment_id * inner_dim_size + segment_offset; + AtomicReductionF()(output + output_index, reduce_res); + } +} + +template +__global__ void SegmentMeanNormalizeKernel( + SegmentId nsegments, Index ninner, + const Index* __restrict__ segment_offsets, // [nsegments + 1] + T* __restrict__ output) { // [nsegments, ninner] + for (SegmentId seg : GpuGridRangeY(nsegments)) { + SegmentId segment_size = segment_offsets[seg + 1] - segment_offsets[seg]; + segment_size = max(segment_size, Index(1)); // Avoid division by zero + T inv_norm = T(1) / static_cast(segment_size); + for (Index i : GpuGridRangeX(ninner)) { + output[seg * ninner + i] *= inv_norm; + } + } +} + +template +Status LaunchSegmentMeanNormalizeKernel( + const GPUDevice& d, SegmentId nsegments, Index ninner, + const Index* __restrict__ segment_offsets, // [nsegments + 1] + T* __restrict__ output) { // [nsegments, ninner] + Gpu2DLaunchConfig config = GetGpu2DLaunchConfig( + ninner, nsegments, d, SegmentMeanNormalizeKernel, + /*dynamic_shared_memory_size=*/0, /*block_size_limit=*/0); + return GpuLaunchKernel(SegmentMeanNormalizeKernel, + config.block_count, config.thread_per_block, 0, + d.stream(), nsegments, ninner, segment_offsets, + output); +} + +template +__global__ void SegmentSetEmptyKernel( + SegmentId nsegments, Index ninner, + const Index* __restrict__ segment_offsets, // [nsegments + 1] + const T empty_value, + T* __restrict__ output) { // [nsegments, ninner] + for (SegmentId seg : GpuGridRangeY(nsegments)) { + SegmentId segment_size = segment_offsets[seg + 1] - segment_offsets[seg]; + if (segment_size == 0) { + for (Index i : GpuGridRangeX(ninner)) { + output[seg * ninner + i] = empty_value; + } + } + } +} + +template +Status LaunchSegmentSetEmptyKernel( + const GPUDevice& d, SegmentId nsegments, Index ninner, + const Index* __restrict__ segment_offsets, // [nsegments + 1] + const T empty_value, + T* __restrict__ output) { // [nsegments, ninner] + Gpu2DLaunchConfig config = GetGpu2DLaunchConfig( + ninner, nsegments, d, SegmentSetEmptyKernel, + /*dynamic_shared_memory_size=*/0, /*block_size_limit=*/0); + return GpuLaunchKernel(SegmentSetEmptyKernel, + config.block_count, config.thread_per_block, 0, + d.stream(), nsegments, ninner, segment_offsets, + empty_value, output); +} + +// UnsortedSegmentSumKernel processes 'input_total_size' elements. +// Each element is mapped from input to output by a combination of its +// 'segment_ids' mapping and 'inner_dim_size'. +template +__global__ void UnsortedSegmentCustomKernel( + const int64_t input_outer_dim_size, const int64_t inner_dim_size, + const int64_t output_outer_dim_size, const Index* __restrict__ segment_ids, + const T* __restrict__ input, T* __restrict__ output) { + const int64_t input_total_size = input_outer_dim_size * inner_dim_size; + for (int64_t input_index : GpuGridRangeX(input_total_size)) { + const int64_t input_segment_index = input_index / inner_dim_size; + const int64_t segment_offset = input_index % inner_dim_size; + const Index output_segment_index = segment_ids[input_segment_index]; + if (output_segment_index < 0 || + output_segment_index >= output_outer_dim_size) { + continue; + } + const int64_t output_index = + output_segment_index * inner_dim_size + segment_offset; + KernelReductionFunctor()(output + output_index, ldg(input + input_index)); + } +} + +template +__global__ void SegmentOffsetsKernel( + Toffsets size, Tsegmentids nsegments, + const Tsegmentids* __restrict__ segment_ids, // [size] + Toffsets* __restrict__ segment_offsets) { // [nsegments + 1] + GPU_1D_KERNEL_LOOP(i, size + 1) { + // IDs are clipped to [-1, nsegments] so that out-of-bounds IDs are ignored. + // Note that we can't report invalid IDs from the GPU without incurring + // additional overhead. + auto clip = [&](Tsegmentids id) { + return min(max(Tsegmentids(-1), id), nsegments); + }; + const Tsegmentids cur_id = (i < size) ? clip(segment_ids[i]) : nsegments; + const Tsegmentids prev_id = + (i == 0) ? Tsegmentids(-1) : clip(segment_ids[i - 1]); + // At segment boundaries, write the offset for this ID and any missing IDs + // since the previous one. + for (Tsegmentids id = prev_id + 1; id <= cur_id; ++id) { + segment_offsets[id] = i; + } + } +} + +// Finds the start offset of each segment in the given sorted segment_ids +// vector. Missing IDs are given the same offset as the next ID so that they +// represent empty ranges. Invalid IDs (those that are outside the range +// [0, nsegments)) are ignored. The value at segment_offsets[0] is set to the +// start index of the first valid ID (e.g., 0 if all IDs are valid), and the +// value at segment_offsets[nsegments] is set to the end index of the last valid +// ID (e.g., nsegments if all IDs are valid). +template +Status LaunchSegmentOffsetsKernel( + const GPUDevice& d, Toffsets size, Tsegmentids nsegments, + const Tsegmentids* segment_ids, // [size] + Toffsets* segment_offsets) { // [nsegments + 1] + GpuLaunchConfig config = GetGpuLaunchConfig( + size + 1, d, &SegmentOffsetsKernel, + /*dynamic_shared_memory_size=*/0, /*block_size_limit=*/0); + return GpuLaunchKernel(SegmentOffsetsKernel, + config.block_count, config.thread_per_block, 0, + d.stream(), size, nsegments, segment_ids, + segment_offsets); +} + +template +struct RealTypeIfComplex { + using type = T; +}; + +template +struct RealTypeIfComplex> { + using type = Real; +}; + +// Reduces along columns of the thread block, returning the result in the first +// row of threads. +template +__device__ T ReduceBlockAlongCols(ReduceOp reduce_op, const T& value, + bool is_valid) { + GPU_DYNAMIC_SHARED_MEM_DECL(/*ALIGN=*/16, char, shared_memory_raw); + T* const shared_partial_reduction = + reinterpret_cast(shared_memory_raw); // [blockDim.y, blockDim.x] + const int x = threadIdx.x; + const int y = threadIdx.y; + T reduced = value; + // Reduce over the y dimension of the block. + for (unsigned k = blockDim.y / 2; k > 0; k /= 2) { + if (is_valid && y < 2 * k) { + shared_partial_reduction[y * blockDim.x + x] = reduced; + } + __syncthreads(); + if (is_valid && y < k) { + reduced = reduce_op(reduced, + shared_partial_reduction[(y + k) * blockDim.x + x]); + } + __syncthreads(); + } + return reduced; +} + +// This kernel uses a 2D thread decomposition. The x dimension maps to the inner +// dimension of the input/output. The y grid dimension maps to segments, and y +// threads within a block cooperate to reduce over the block's segment. +// Note that Tinit is needed because Tvec and Treducevec may be vector types, +// but Tinit is always a scalar type. +// Note that the first dimension of input_vec is nouter if indices is not +// provided; otherwise it is indexed indirectly via indices and can have any +// size (as long as it spans at least the maximum value in indices). This also +// applies to the weights vector. +template +__global__ void SegmentReduceVectorKernel( + Toffsets nouter, Toffsets ninner_vec, Tsegmentids nsegments, + ReduceOp reduce_op, Tinit initial_value, Tinit empty_segment_value, + bool is_mean, bool is_sqrtn, + const Tvec* __restrict__ input_vec, // [nouter or any, ninner_vec] + const Toffsets* __restrict__ segment_offsets, // [nsegments + 1] + const Tindices* __restrict__ indices, // [nouter] (optional) + const Tweights* __restrict__ weights, // [nouter or any] (optional) + Tvec* __restrict__ output_vec) { // [nsegments, ninner_vec] + const int num_blocks_x = (ninner_vec - 1) / blockDim.x + 1; + // Grid-stride loop over inner dimension blocks. + for (Toffsets blk_x = blockIdx.x; blk_x < num_blocks_x; blk_x += gridDim.x) { + const Toffsets x = threadIdx.x + blk_x * blockDim.x; + const Toffsets y = threadIdx.y; + const bool x_ok = x < ninner_vec; + // Grid-stride loop over segment blocks, each processing one segment. + for (Tsegmentids seg = blockIdx.y; seg < nsegments; seg += gridDim.y) { + // Load segment range. + const Toffsets begin = segment_offsets[seg]; + const Toffsets end = segment_offsets[seg + 1]; + // Reduce over the segment. + Treducevec result = Treducevec(initial_value); + // Loop over the segment, reducing blockDim.y elements at a time. + for (Toffsets y_offset = begin; y_offset < end; y_offset += blockDim.y) { + const bool y_ok = (y_offset + y) < end; + // Perform indirect lookup if required. + const Toffsets y_idx = + indices && y_ok ? indices[y_offset + y] : y_offset + y; + const int64_t input_idx = static_cast(y_idx) * ninner_vec + x; + // Load the input row from global mem. + Treducevec block_result = + x_ok && y_ok ? input_vec[input_idx] : Tvec(initial_value); + // Apply weights if provided. + if (weights && y_ok) block_result = block_result * Tvec(weights[y_idx]); + // Reduce along the columns of the block, returning result in first row. + block_result = ReduceBlockAlongCols(reduce_op, block_result, x_ok); + if (y == 0 && x_ok) { + result = reduce_op(result, block_result); + } + } + // First row of the block stores the result to global memory. + if (y == 0 && x_ok) { + if (begin == end) { + // Empty segment. + result = Treducevec(empty_segment_value); + } else { + Tweights total_weight(end - begin); + // Normalize the results if necessary. + if (is_mean) { + result = result / Treducevec(total_weight); + } else if (is_sqrtn) { + result = + result / Treducevec(sqrt(static_cast(total_weight))); + } + } + // Cast from Treducevec to Tvec. + const int64_t output_idx = static_cast(seg) * ninner_vec + x; + output_vec[output_idx] = static_cast(result); + } + } + } +} + +// Reduces input matrix within segments over the outer dimension. Empty segments +// always output empty_segment_value. +// If is_mean or is_sqrtn is true, the results are normalized using the +// corresponding function. +// If indices is not nullptr, input rows are accessed indirectly as +// input[indices[i]], instead of input[i]. +// Note: Treducevec is to allow reducing in higher precision than Tvec. +template +Status LaunchSegmentReduceVectorKernel( + const GPUDevice& d, Toffsets nouter, Toffsets ninner_vec, + Tsegmentids nsegments, ReduceOp reduce_op, Tinit initial_value, + Tinit empty_segment_value, bool is_mean, bool is_sqrtn, + const Tvec* input_vec, // [nouter or any, ninner_vec] + const Toffsets* segment_offsets, // [nsegments + 1] + const Tindices* indices, // [nouter] (optional) + const Tweights* weights, // [nouter or any] (optional) + Tvec* output_vec) { // [nsegments, ninner_vec] + static constexpr const int kMaxGridX = (1u << 31) - 1; + static constexpr const int kMaxGridY = (1u << 16) - 1; + const int max_block_size = 1024; // Can be tuned for perf (<= 1024) + const int min_block_size = 64; // Can be tuned for perf + const Toffsets ninner_pow2 = Toffsets(1) << Log2Ceiling64(ninner_vec); + // This is a heuristic that first allocates threads in the block to the inner + // (x) dimension (which is most efficient) and then allocates the rest to the + // reduction (y) dimension (which is less efficient but increases + // parallelism). + int block_x = std::min(ninner_pow2, static_cast(max_block_size)); + const Toffsets avg_reduce_size = + Eigen::divup(nouter, static_cast(nsegments)); + const Toffsets avg_reduce_size_pow2 = Toffsets(1) + << Log2Ceiling64(avg_reduce_size); + dim3 block( + block_x, + std::min(static_cast(Eigen::divup(min_block_size, block_x)), + avg_reduce_size_pow2)); + dim3 grid(std::min(Eigen::divup(ninner_vec, static_cast(block.x)), + static_cast(kMaxGridX)), + std::min(nsegments, static_cast(kMaxGridY))); + unsigned shared_memory_bytes = block.x * block.y * sizeof(Treducevec); + return GpuLaunchKernel( + SegmentReduceVectorKernel, + grid, block, shared_memory_bytes, d.stream(), nouter, ninner_vec, + nsegments, reduce_op, initial_value, empty_segment_value, is_mean, + is_sqrtn, input_vec, segment_offsets, indices, weights, output_vec); +} + +template +__global__ void SegmentReduceEpilogueKernel( + Tsegmentids nsegments, Tinit empty_segment_value, bool is_mean, + bool is_sqrtn, + const Treducevec* __restrict__ output_raw, // [nsegments] + const Toffsets* __restrict__ segment_offsets, // [nsegments + 1] + Tvec* __restrict__ output) { // [nsegments] + GPU_1D_KERNEL_LOOP(seg, nsegments) { + Toffsets segment_size = segment_offsets[seg + 1] - segment_offsets[seg]; + Treducevec val = output_raw[seg]; + if (segment_size == 0) { + // Empty segment. + val = Treducevec(empty_segment_value); + } else if (is_mean) { + val = val / Treducevec(segment_size); + } else if (is_sqrtn) { + val = val / Treducevec(sqrt(static_cast( + typename RealTypeIfComplex::type(segment_size)))); + } + // Cast from Treducevec to Tvec. + output[seg] = static_cast(val); + } +} + +// Normalizes output_raw based on segment size and casts from Treducevec to +// Tvec. If Tvec == Treducevec, this is safe to call with output_raw == output. +// Note that Treducevec is the type that was used for the reduction, which may +// be a higher-precision type than the output type Tvec (e.g., float vs. half). +template +Status LaunchSegmentReduceEpilogueKernel( + const GPUDevice& d, Tsegmentids nsegments, Tinit empty_segment_value, + bool is_mean, bool is_sqrtn, + const Treducevec* output_raw, // [nsegments] + const Toffsets* segment_offsets, // [nsegments + 1] + Tvec* output) { // [nsegments] + GpuLaunchConfig config = GetGpuLaunchConfig( + nsegments, d, + &SegmentReduceEpilogueKernel, + /*dynamic_shared_memory_size=*/0, /*block_size_limit=*/0); + return GpuLaunchKernel(SegmentReduceEpilogueKernel, + config.block_count, config.thread_per_block, 0, + d.stream(), nsegments, empty_segment_value, is_mean, + is_sqrtn, output_raw, segment_offsets, output); +} + +template +struct CastFunctor { + template + __device__ Tto operator()(const T& val) const { + return static_cast(val); + } +}; + +template +struct LookupAndScaleAndCastInputsFunctor { + LookupAndScaleAndCastInputsFunctor(const Tvec* input_vec, + const Tindices* indices, + const Tweights* weights) + : input_vec_(input_vec), indices_(indices), weights_(weights) {} + + template + __device__ Treducevec operator()(Toffsets idx) const { + if (indices_) idx = indices_[idx]; + Treducevec result = static_cast(input_vec_[idx]); + if (weights_) result = result * Tvec(weights_[idx]); + return result; + } + + private: + const Tvec* __restrict__ input_vec_; + const Tindices* __restrict__ indices_; + const Tweights* __restrict__ weights_; +}; + +template +struct CastIterator { + using FunctorTy = + LookupAndScaleAndCastInputsFunctor; + using InputIteratorTy = gpuprim::CountingInputIterator; + using IteratorTy = + gpuprim::TransformInputIterator; +}; + +template +typename CastIterator::IteratorTy +MakeLookupAndScaleAndCastInputsIterator(const Tvec* input_vec, + const Tindices* indices, + const Tweights* weights) { + using CastIteratorTy = + CastIterator; + typename CastIteratorTy::FunctorTy functor(input_vec, indices, weights); + return typename CastIteratorTy::IteratorTy( + typename CastIteratorTy::InputIteratorTy(Toffsets(0)), functor); +} + +template +Status SegmentReduceGPUImplNoInnerDim( + OpKernelContext* ctx, Toffsets nouter, Tsegmentids nsegments, + ReduceOp reduce_op, Tinit initial_value, Tinit empty_segment_value, + bool is_mean, bool is_sqrtn, + const Tvec* input_vec, // [nouter or any] + const Toffsets* segment_offsets, // [nsegments + 1] + const Tindices* indices, // [nouter] (optional) + const Tweights* weights, // [nouter or any] (optional) + Tvec* output_vec) { // [nsegments] + // Here we use gpuprim::DeviceSegmentedReduce (which is optimized for this + // shape) and add the additional required functionality using fancy input + // iterators and an epilogue kernel. + + // Note: This reinterpret cast is only needed to avoid compilation error + // when Tvec != Treducevec; the result is only used if Tvec == Treducevec. + Treducevec* output_raw_ptr = reinterpret_cast(output_vec); + Tensor output_raw; + bool need_temp_output = !std::is_same::value; + if (need_temp_output) { + // Note: We must allocate and reinterpret as bytes because Treducevec may + // be a vector type and they are not supported as Tensor dtypes. + TF_RETURN_IF_ERROR(ctx->allocate_temp( + DT_INT8, + TensorShape({static_cast(nsegments * sizeof(Treducevec))}), + &output_raw)); + output_raw_ptr = + reinterpret_cast(output_raw.flat().data()); + } + auto input_iter = + MakeLookupAndScaleAndCastInputsIterator( + input_vec, indices, weights); + TF_RETURN_IF_ERROR(GpuSegmentedReduce(ctx, nsegments, reduce_op, + Treducevec(initial_value), input_iter, + segment_offsets, output_raw_ptr)); + bool need_epilogue = !std::is_same::value || + initial_value != empty_segment_value || is_mean || + is_sqrtn; + if (need_epilogue) { + const GPUDevice& device = ctx->eigen_gpu_device(); + // Normalize based on the segment size and cast results back to T. + TF_RETURN_IF_ERROR(LaunchSegmentReduceEpilogueKernel( + device, nsegments, empty_segment_value, is_mean, is_sqrtn, + output_raw_ptr, segment_offsets, output_vec)); + } + return OkStatus(); +} + +template +Status SegmentReduceGPUImpl( + OpKernelContext* ctx, Toffsets nouter, Toffsets ninner_vec, + Tsegmentids nsegments, ReduceOp reduce_op, Tinit initial_value, + Tinit empty_segment_value, bool is_mean, bool is_sqrtn, + const Tvec* input_vec, // [nouter or any, ninner_vec] + const Tsegmentids* segment_ids, // [nouter] + const Tindices* indices, // [nouter] (optional) + const Tweights* weights, // [nouter or any] (optional) + Tvec* output_vec) { // [nsegments, ninner_vec] + const GPUDevice& device = ctx->eigen_gpu_device(); + + if (nouter == 0) { + // Just set output to empty_segment_value. + GPUDevice d = ctx->template eigen_device(); + int64_t output_size = static_cast(nsegments) * ninner_vec; + GpuLaunchConfig config = GetGpuLaunchConfig(output_size, d); + return GpuLaunchKernel(SetToValue, config.block_count, + config.thread_per_block, 0, d.stream(), output_size, + output_vec, empty_segment_value); + } + + // Allocate and compute segment_offsets. + Tensor segment_offsets; + TF_RETURN_IF_ERROR(ctx->allocate_temp(DataTypeToEnum::value, + TensorShape({nsegments + 1}), + &segment_offsets)); + Toffsets* segment_offsets_ptr = segment_offsets.flat().data(); + TF_RETURN_IF_ERROR(LaunchSegmentOffsetsKernel( + device, nouter, nsegments, segment_ids, segment_offsets_ptr)); + + const Toffsets avg_reduce_size = + Eigen::divup(nouter, static_cast(nsegments)); + // This avg_reduce_size threshold is a performance heuristic. + if (ninner_vec == 1 && avg_reduce_size >= 512) { + // Here we use a gpuprim-based implementation that doesn't support an + // inner dimension but can be significantly faster for large reductions. + return SegmentReduceGPUImplNoInnerDim( + ctx, nouter, nsegments, reduce_op, initial_value, empty_segment_value, + is_mean, is_sqrtn, input_vec, segment_offsets_ptr, indices, weights, + output_vec); + } + // Here we use a custom kernel that is optimized for ninner_vec >= ~64 and + // gives decent performance for smaller cases. It also handles indices, + // casting to/from Treducevec, and normalizing the output. + return LaunchSegmentReduceVectorKernel( + device, nouter, ninner_vec, nsegments, reduce_op, initial_value, + empty_segment_value, is_mean, is_sqrtn, input_vec, segment_offsets_ptr, + indices, weights, output_vec); +} + +template +struct SegmentReduceGPUVectorized { + template + struct Impl { + template + Status operator()(OpKernelContext* ctx, Toffsets nouter, Toffsets ninner, + Tsegmentids nsegments, ReduceOp reduce_op, + T initial_value, T empty_segment_value, bool is_mean, + bool is_sqrtn, const T* input, + const Tsegmentids* segment_ids, const Tindices* indices, + const Tweights* weights, T* output) { + DCHECK_EQ(ninner % vec_size, 0); + DCHECK_EQ(reinterpret_cast(input) % vec_size, 0); + DCHECK_EQ(reinterpret_cast(output) % vec_size, 0); + Toffsets ninner_vec = ninner / vec_size; + using Tvec = AlignedVector; + using Treducevec = AlignedVector; + const Tvec* input_vec = reinterpret_cast(input); + Tvec* output_vec = reinterpret_cast(output); + + return SegmentReduceGPUImpl( + ctx, nouter, ninner_vec, nsegments, reduce_op, initial_value, + empty_segment_value, is_mean, is_sqrtn, input_vec, segment_ids, + indices, weights, output_vec); + } + }; +}; + +// Reduces input matrix within segments over the outer dimension. Empty segments +// always output empty_segment_value. +// The segment_ids vector must be sorted. +// If is_mean or is_sqrtn is true, the results are normalized using the +// corresponding function. +// If indices is not nullptr, input rows are accessed indirectly as +// input[indices[i]], instead of input[i]. +// The implementation is deterministic. +// Note: Treduce is to allow reducing in higher precision than T. +template +Status SegmentReduceGPU(OpKernelContext* ctx, Toffsets nouter, Toffsets ninner, + Tsegmentids nsegments, ReduceOp reduce_op, + T initial_value, T empty_segment_value, bool is_mean, + bool is_sqrtn, + const T* input, // [nouter or any, ninner] + const Tsegmentids* segment_ids, // [nouter] + const Tindices* indices, // [nouter] (optional) + const Tweights* weights, // [nouter or any] (optional) + T* output) { // [nsegments, ninner] + if (ninner == 0 || nsegments == 0) return OkStatus(); + return DispatchToVectorized< + T, SegmentReduceGPUVectorized::template Impl>( + MinAlignmentOf(input, output, ninner), ctx, nouter, ninner, nsegments, + reduce_op, initial_value, empty_segment_value, is_mean, is_sqrtn, input, + segment_ids, indices, weights, output); +} + +template +__global__ void SegmentWeightsKernel( + SegmentId nsegments, SparseSegmentReductionOperation operation, + const Index* __restrict__ segment_offsets, // [nsegments + 1] + Tweights* __restrict__ weights) { // [nsegments] + GPU_1D_KERNEL_LOOP(i, nsegments) { + Index segment_size = segment_offsets[i + 1] - segment_offsets[i]; + segment_size = max(segment_size, Index(1)); // Avoid division by zero + if (operation == SparseSegmentReductionOperation::kMean) { + weights[i] = Tweights(1) / static_cast(segment_size); + } else if (operation == SparseSegmentReductionOperation::kSqrtN) { + weights[i] = Tweights(1) / sqrt(static_cast(segment_size)); + } + } +} + +template +Status LaunchSegmentWeightsKernel( + const GPUDevice& d, SegmentId nsegments, + SparseSegmentReductionOperation operation, + const Index* segment_offsets, // [nsegments + 1] + Tweights* weights) { // [nsegments] + GpuLaunchConfig config = GetGpuLaunchConfig( + nsegments, d, &SegmentWeightsKernel, + /*dynamic_shared_memory_size=*/0, /*block_size_limit=*/0); + return GpuLaunchKernel(SegmentWeightsKernel, + config.block_count, config.thread_per_block, 0, + d.stream(), nsegments, operation, segment_offsets, + weights); +} + +template +struct ReduceType { + using type = T; +}; + +// Sum fp16 values using an fp32 accumulator to avoid numerical issues. +template <> +struct ReduceType { + using type = float; +}; + +template <> +struct ReduceType { + using type = float; +}; + +namespace functor { + +template +void SegmentReductionFunctor< + T, Index, InitialValueF, EmptySegmentValueF, + ReductionF>::operator()(OpKernelContext* ctx, const GPUDevice& d, + const Index output_rows, + const TensorShape& segment_ids_shape, bool is_mean, + typename TTypes::ConstFlat segment_ids, + const Index data_size, const T* data, + typename TTypes::Tensor output) { + if (output.size() == 0) { + return; + } + + // Launch kernel(s) to compute sorted segment reduction. + // Notes: + // *) 'input_total_size' is the total number of elements to process. + // *) 'segment_ids.shape' is a prefix of data's shape. + // *) 'input_outer_dim_size' is the total number of segments to process. + const Index input_total_size = data_size; + const Index input_outer_dim_size = segment_ids.dimension(0); + const Index input_inner_dim_size = input_total_size / input_outer_dim_size; + const Index num_segments = output.size() / input_inner_dim_size; + + bool use_deterministic_kernels = + UseDeterministicSegmentReductions() || + (OpDeterminismRequired() && !ReduceOpIsAssociative::value); + + // TODO(benbarsdell): If there are no performance concerns with the new + // deterministic kernels, remove this runtime check and the old + // non-deterministic kernels. + if (!use_deterministic_kernels) { + // Set 'output' to initial value. + GpuLaunchConfig config = GetGpuLaunchConfig(output.size(), d); + const T initial_value = InitialValueF()(); + TF_CHECK_OK(GpuLaunchKernel(SetToValue, config.block_count, + config.thread_per_block, 0, d.stream(), + output.size(), output.data(), initial_value)); + if (data_size == 0 || segment_ids_shape.num_elements() == 0) { + return; + } + + const int OuterDimTileSize = 8; + + const Index input_outer_dim_num_stripe = + Eigen::divup(input_outer_dim_size, Index(OuterDimTileSize)); + + const Index total_stripe_count = + input_inner_dim_size * input_outer_dim_num_stripe; + + config = GetGpuLaunchConfig(total_stripe_count, d); + TF_CHECK_OK(GpuLaunchKernel( + SortedSegmentReductionCustomKernel< + T, Index, OuterDimTileSize, + typename ReduceUpdateOpFor::nonatomic_op, + typename ReduceUpdateOpFor::atomic_op>, + config.block_count, config.thread_per_block, 0, d.stream(), + input_outer_dim_size, input_inner_dim_size, output_rows, + segment_ids.data(), data, output.data(), total_stripe_count, + initial_value)); + + const T empty_value = EmptySegmentValueF()(); + if (is_mean || initial_value != empty_value) { + Tensor segment_offsets; + OP_REQUIRES_OK(ctx, ctx->allocate_temp(DataTypeToEnum::value, + TensorShape({num_segments + 1}), + &segment_offsets)); + Index* segment_offsets_ptr = segment_offsets.flat().data(); + OP_REQUIRES_OK(ctx, LaunchSegmentOffsetsKernel( + d, input_outer_dim_size, num_segments, + segment_ids.data(), segment_offsets_ptr)); + + if (is_mean) { + OP_REQUIRES_OK(ctx, LaunchSegmentMeanNormalizeKernel( + d, num_segments, input_inner_dim_size, + segment_offsets_ptr, output.data())); + } + if (initial_value != empty_value) { + OP_REQUIRES_OK( + ctx, LaunchSegmentSetEmptyKernel( + d, num_segments, input_inner_dim_size, segment_offsets_ptr, + empty_value, output.data())); + } + } + } else { + using Treduce = typename ReduceType::type; + using Tweights = typename RealTypeIfComplex::type; + OP_REQUIRES_OK( + ctx, + SegmentReduceGPU( + ctx, input_outer_dim_size, input_inner_dim_size, num_segments, + ReductionF(), InitialValueF()(), EmptySegmentValueF()(), + /*is_mean=*/is_mean, /*is_sqrtn=*/false, data, segment_ids.data(), + /*indices=*/static_cast(nullptr), + /*weights=*/static_cast(nullptr), output.data())); + } +} + +template +struct UnsortedSegmentFunctor { + void operator()(OpKernelContext* ctx, const TensorShape& segment_ids_shape, + typename TTypes::ConstFlat unsorted_segment_ids, + typename TTypes::ConstTensor data, + typename TTypes::Tensor output) { + if (output.size() == 0) { + return; + } + + bool use_deterministic_kernels = + UseDeterministicSegmentReductions() || + (!ReduceOpIsAssociative::value && + OpDeterminismRequired()); + + bool determinism_requirement_met = + use_deterministic_kernels || + ReduceOpIsAssociative::value || + !OpDeterminismRequired() || + DisableSegmentReductionOpDeterminismExceptions(); + OP_REQUIRES( + ctx, determinism_requirement_met, + errors::Unimplemented( + "Deterministic GPU implementation of unsorted segment reduction op" + " not available.")); + + // Launch kernel(s) to compute unsorted segment reduction. + // Notes: + // *) 'data_size' is the total number of elements to process. + // *) 'segment_ids.shape' is a prefix of data's shape. + // *) 'input_outer_dim_size' is the total number of segments to process. + const Index input_outer_dim_size = unsorted_segment_ids.dimension(0); + const Index input_inner_dim_size = data.dimension(1); + const Index output_outer_dim_size = output.dimension(0); + const Index num_segments = output.size() / input_inner_dim_size; + + // TODO(benbarsdell): If there are no performance concerns with the new + // deterministic kernels, remove this runtime check and the old + // non-deterministic kernels. + if (!use_deterministic_kernels) { + // Set 'output' to initial value. + GPUDevice d = ctx->template eigen_device(); + GpuLaunchConfig config = GetGpuLaunchConfig(output.size(), d); + TF_CHECK_OK(GpuLaunchKernel( + SetToValue, config.block_count, config.thread_per_block, 0, + d.stream(), output.size(), output.data(), InitialValueF()())); + const int64_t data_size = data.size(); + if (data_size == 0 || segment_ids_shape.num_elements() == 0) { + return; + } + config = GetGpuLaunchConfig(data_size, d); + TF_CHECK_OK(GpuLaunchKernel( + UnsortedSegmentCustomKernel< + T, Index, typename ReduceUpdateOpFor::atomic_op>, + config.block_count, config.thread_per_block, 0, d.stream(), + input_outer_dim_size, input_inner_dim_size, output_outer_dim_size, + unsorted_segment_ids.data(), data.data(), output.data())); + } else { + // Allocate temporary space and sort segment_ids, then call the sorted + // implem. + Tensor segment_ids; + OP_REQUIRES_OK( + ctx, ctx->allocate_temp( + DataTypeToEnum::value, + TensorShape({static_cast(input_outer_dim_size)}), + &segment_ids)); + Index* segment_ids_ptr = segment_ids.flat().data(); + Tensor sorted_indices; + OP_REQUIRES_OK( + ctx, ctx->allocate_temp( + DataTypeToEnum::value, + TensorShape({static_cast(input_outer_dim_size)}), + &sorted_indices)); + Index* sorted_indices_ptr = sorted_indices.flat().data(); + // Note: We must sort using all bits here because unsorted_segment_ids + // may contain negative values. + OP_REQUIRES_OK( + ctx, GpuRadixSort(ctx, input_outer_dim_size, + /*keys_in=*/unsorted_segment_ids.data(), + /*keys_out=*/segment_ids_ptr, + /*indices_in=*/static_cast(nullptr), + /*indices_out=*/sorted_indices_ptr)); + using Treduce = typename ReduceType::type; + using Tweights = typename RealTypeIfComplex::type; + OP_REQUIRES_OK( + ctx, + SegmentReduceGPU( + ctx, input_outer_dim_size, input_inner_dim_size, num_segments, + ReductionF(), /*initial_value=*/InitialValueF()(), + /*empty_segment_value=*/InitialValueF()(), /*is_mean=*/false, + /*is_sqrtn=*/false, /*input=*/data.data(), + /*segment_ids=*/segment_ids_ptr, /*indices=*/sorted_indices_ptr, + /*weights=*/static_cast(nullptr), output.data())); + } + } +}; + +template +Status SparseSegmentReductionFunctor::operator()( + OpKernelContext* context, bool is_mean, bool is_sqrtn, T default_value, + typename TTypes::ConstTensor input, + typename TTypes::ConstVec indices, + typename TTypes::ConstVec segment_ids, + typename TTypes::Tensor output) { + using ReduceOp = functor::Sum; + using Treduce = typename ReduceType::type; + using Tweights = typename RealTypeIfComplex::type; + Index nouter = segment_ids.size(); + Index ninner = input.dimension(1); + SegmentId nsegments = output.dimension(0); + return SegmentReduceGPU( + context, /*nouter=*/nouter, /*ninner=*/ninner, + /*nsegments=*/nsegments, /*reduce_op=*/ReduceOp(), + /*initial_value=*/T(0), + /*empty_segment_value=*/default_value, + /*is_mean=*/is_mean, /*is_sqrtn=*/is_sqrtn, + /*input=*/input.data(), /*segment_ids=*/segment_ids.data(), + /*indices=*/indices.data(), /*weights=*/static_cast(nullptr), + /*output=*/output.data()); +} + +template +struct SparseSegmentGradFunctor { + void operator()(OpKernelContext* context, + SparseSegmentReductionOperation operation, + typename TTypes::ConstMatrix input_flat, + typename TTypes::ConstVec indices_vec, + typename TTypes::ConstVec segment_vec, + typename TTypes::Matrix output_flat) { + const GPUDevice& device = context->eigen_gpu_device(); + + const SegmentId nsegments = input_flat.dimension(0); + const Index ninner = input_flat.dimension(1); + const Index nouter = indices_vec.dimension(0); + const Index noutput = output_flat.dimension(0); + + // Allocate and compute segment weights (for Mean/SqrtN operations only). + Tensor weights; + using Tweights = typename RealTypeIfComplex::type; + Tweights* weights_ptr = nullptr; + if (operation != SparseSegmentReductionOperation::kSum) { + OP_REQUIRES_OK( + context, context->allocate_temp(DataTypeToEnum::value, + TensorShape({nsegments}), &weights)); + weights_ptr = weights.flat().data(); + // Allocate and compute segment_offsets. + Tensor segment_offsets; + OP_REQUIRES_OK(context, + context->allocate_temp(DataTypeToEnum::value, + TensorShape({nsegments + 1}), + &segment_offsets)); + Index* segment_offsets_ptr = segment_offsets.flat().data(); + OP_REQUIRES_OK(context, LaunchSegmentOffsetsKernel( + device, nouter, nsegments, segment_vec.data(), + segment_offsets_ptr)); + // Compute the weights based on the segment sizes using segment_offsets. + OP_REQUIRES_OK(context, LaunchSegmentWeightsKernel( + device, nsegments, operation, + segment_offsets_ptr, weights_ptr)); + } + + const Index* sorted_indices_ptr = indices_vec.data(); + const SegmentId* sorted_segment_ptr = segment_vec.data(); + Tensor tmp_sorted_indices; + Tensor tmp_sorted_segment; + if (noutput > 1) { + // Sort indices and permute segments. + OP_REQUIRES_OK(context, context->allocate_temp( + DataTypeToEnum::value, + TensorShape({nouter}), &tmp_sorted_indices)); + Index* tmp_sorted_indices_ptr = tmp_sorted_indices.flat().data(); + OP_REQUIRES_OK(context, context->allocate_temp( + DataTypeToEnum::value, + TensorShape({nouter}), &tmp_sorted_segment)); + SegmentId* tmp_sorted_segment_ptr = + tmp_sorted_segment.flat().data(); + OP_REQUIRES_OK(context, + GpuRadixSort(context, nouter, + /*keys_in=*/indices_vec.data(), + /*keys_out=*/tmp_sorted_indices_ptr, + /*indices_in=*/segment_vec.data(), + /*indices_out=*/tmp_sorted_segment_ptr, + /*num_bits=*/Log2Ceiling64(noutput))); + sorted_indices_ptr = tmp_sorted_indices_ptr; + sorted_segment_ptr = tmp_sorted_segment_ptr; + } + + // Compute the gradient using a weighted SegmentReduceGPU with the segment + // IDs and indices swapped. + using ReduceOp = functor::Sum; + using Treduce = typename ReduceType::type; + OP_REQUIRES_OK( + context, + SegmentReduceGPU( + context, /*nouter=*/static_cast(nouter), + /*ninner=*/static_cast(ninner), + /*nsegments=*/noutput, + /*reduce_op=*/ReduceOp(), + /*initial_value=*/T(0), + /*empty_segment_value=*/T(0), + /*is_mean=*/false, /*is_sqrtn=*/false, + /*input=*/input_flat.data(), /*segment_ids=*/sorted_indices_ptr, + /*indices=*/sorted_segment_ptr, /*weights=*/weights_ptr, + /*output=*/output_flat.data())); + } +}; + +template +struct EdgeIndicatorFunctor { + EdgeIndicatorFunctor(const TindicesCompact* sorted_indices) + : sorted_indices_(sorted_indices) {} + + template + __device__ bool operator()(Idx idx) const { + return idx == 0 ? false : sorted_indices_[idx] != sorted_indices_[idx - 1]; + } + + private: + const TindicesCompact* __restrict__ sorted_indices_; +}; + +template +__global__ void ScatterUniqueIndicesKernel( + Toffsets nouter, + EdgeIndicatorIter sorted_indices_edge_indicator, // [nouter] + const TindicesCompact* __restrict__ sorted_indices, // [nouter] + const Toffsets* __restrict__ sorted_indices_ids, // [nouter] + Tindices* __restrict__ sorted_unique_indices) { // [num_unique] + for (int i : GpuGridRangeX(nouter)) { + if (i == 0 || sorted_indices_edge_indicator[i]) { + sorted_unique_indices[sorted_indices_ids[i]] = + static_cast(sorted_indices[i]); + } + } +} + +template +Status LaunchScatterUniqueIndicesKernel( + const GPUDevice& d, Toffsets nouter, + EdgeIndicatorIter sorted_indices_edge_indicator, // [nouter] + const TindicesCompact* __restrict__ sorted_indices, // [nouter] + const Toffsets* __restrict__ sorted_indices_ids, // [nouter] + Tindices* __restrict__ sorted_unique_indices) { // [num_unique] + GpuLaunchConfig config = GetGpuLaunchConfig( + nouter, d, + &ScatterUniqueIndicesKernel, + /*dynamic_shared_memory_size=*/0, /*block_size_limit=*/0); + return GpuLaunchKernel(ScatterUniqueIndicesKernel, + config.block_count, config.thread_per_block, 0, + d.stream(), nouter, sorted_indices_edge_indicator, + sorted_indices, sorted_indices_ids, + sorted_unique_indices); +} + +template +struct SparseSegmentGradV2Functor { + void operator()(OpKernelContext* context, + SparseSegmentReductionOperation operation, + typename TTypes::ConstMatrix input_flat, + typename TTypes::ConstVec indices_vec, + typename TTypes::ConstVec segment_vec, + const TensorShape& dense_output_shape, + typename AsyncOpKernel::DoneCallback done) { + const GPUDevice& device = context->eigen_gpu_device(); + + const int64_t nsegments = input_flat.dimension(0); + const int64_t ninner64 = input_flat.dimension(1); + const int64_t nouter64 = indices_vec.dimension(0); + // Note: nouter and ninner are not expected to be huge, so we use int32 to + // save memory bandwidth. + using Toffsets = int32; + OP_REQUIRES_ASYNC(context, nouter64 <= std::numeric_limits::max(), + absl::InvalidArgumentError( + absl::StrCat("Indices vector of length ", nouter64, + " is too large to fit in int32.")), + done); + const Toffsets nouter = static_cast(nouter64); + OP_REQUIRES_ASYNC(context, ninner64 <= std::numeric_limits::max(), + absl::InvalidArgumentError(absl::StrCat( + "Inner data dimension of size ", ninner64, + " is too large to fit in int32.")), + done); + const Toffsets ninner = static_cast(ninner64); + + // Cast indices to 32-bit to save memory bandwidth (the cost of the cast is + // worth it because the vector is used multiple times). + // Note that we can currently assume int32 is safe because the op's dense + // output_dim0 input is always int32. + using TindicesCompact = int32; + Tensor tmp_indices_internal; + const TindicesCompact* indices_internal_ptr; + if constexpr (std::is_same::value) { + indices_internal_ptr = indices_vec.data(); + } else { + OP_REQUIRES_OK_ASYNC( + context, + context->allocate_temp(DataTypeToEnum::value, + TensorShape({nouter}), &tmp_indices_internal), + done); + auto indices_vec_internal = tmp_indices_internal.flat(); + indices_vec_internal.device(device) = + indices_vec.template cast(); + indices_internal_ptr = indices_vec_internal.data(); + } + + // Cast segment IDs to smallest possible type to save memory bandwidth. + if (nsegments <= std::numeric_limits::max()) { + CastSegmentIdsThenImpl( + context, operation, nouter, ninner, nsegments, input_flat.data(), + tmp_indices_internal, indices_internal_ptr, segment_vec, + dense_output_shape, done); + } else if (sizeof(Tsegmentids) > sizeof(int32) && + nsegments <= std::numeric_limits::max()) { + CastSegmentIdsThenImpl( + context, operation, nouter, ninner, nsegments, input_flat.data(), + tmp_indices_internal, indices_internal_ptr, segment_vec, + dense_output_shape, done); + } else { + Impl( + context, operation, nouter, ninner, nsegments, input_flat.data(), + tmp_indices_internal, indices_internal_ptr, Tensor(), + segment_vec.data(), dense_output_shape, done); + } + } + + private: + using Tweights = typename RealTypeIfComplex::type; + + template + void CastSegmentIdsThenImpl( + OpKernelContext* context, SparseSegmentReductionOperation operation, + Toffsets nouter, Toffsets ninner, Tsegmentids_internal nsegments, + const T* input, Tensor indices_tensor, const TindicesCompact* indices, + typename TTypes::ConstVec segment_vec, + const TensorShape& dense_output_shape, + typename AsyncOpKernel::DoneCallback done) { + const GPUDevice& device = context->eigen_gpu_device(); + Tensor tmp_segment_internal; + OP_REQUIRES_OK_ASYNC( + context, + context->allocate_temp(DataTypeToEnum::value, + TensorShape({nouter}), &tmp_segment_internal), + done); + auto segment_vec_internal = + tmp_segment_internal.flat(); + segment_vec_internal.device(device) = + segment_vec.template cast(); + + Impl( + context, operation, nouter, ninner, nsegments, input, indices_tensor, + indices, tmp_segment_internal, segment_vec_internal.data(), + dense_output_shape, done); + } + + template + void Impl(OpKernelContext* context, SparseSegmentReductionOperation operation, + Toffsets nouter, Toffsets ninner, Tsegmentids_internal nsegments, + const T* input, Tensor indices_tensor, + const TindicesCompact* indices, Tensor segment_ids_tensor, + const Tsegmentids_internal* segment_ids, + const TensorShape& dense_output_shape, + typename AsyncOpKernel::DoneCallback done) { + const int64_t dense_output_dim0 = dense_output_shape.dim_size(0); + + // Allocate and compute segment weights (for Mean/SqrtN operations only). + Tensor tmp_weights; + Tweights* weights_ptr = nullptr; + if (operation != SparseSegmentReductionOperation::kSum) { + ComputeSegmentWeights(context, operation, nsegments, nouter, segment_ids, + &tmp_weights, done); + weights_ptr = tmp_weights.flat().data(); + } + + const TindicesCompact* sorted_indices_ptr = indices; + const Tsegmentids_internal* permuted_segment_ptr = segment_ids; + Tensor tmp_sorted_indices; + Tensor tmp_permuted_segment; + if (dense_output_dim0 > 1) { + // Sort indices and permute segments. + OP_REQUIRES_OK_ASYNC( + context, + context->allocate_temp(DataTypeToEnum::value, + TensorShape({nouter}), &tmp_sorted_indices), + done); + TindicesCompact* tmp_sorted_indices_ptr = + tmp_sorted_indices.flat().data(); + OP_REQUIRES_OK_ASYNC( + context, + context->allocate_temp(DataTypeToEnum::value, + TensorShape({nouter}), &tmp_permuted_segment), + done); + Tsegmentids_internal* tmp_permuted_segment_ptr = + tmp_permuted_segment.flat().data(); + OP_REQUIRES_OK_ASYNC( + context, + GpuRadixSort(context, nouter, + /*keys_in=*/indices, + /*keys_out=*/tmp_sorted_indices_ptr, + /*indices_in=*/segment_ids, + /*indices_out=*/tmp_permuted_segment_ptr, + /*num_bits=*/Log2Ceiling64(dense_output_dim0)), + done); + sorted_indices_ptr = tmp_sorted_indices_ptr; + permuted_segment_ptr = tmp_permuted_segment_ptr; + // The original tensors are no longer needed. + indices_tensor = Tensor(); + indices = nullptr; + segment_ids_tensor = Tensor(); + segment_ids = nullptr; + } + + using CountIter = gpuprim::CountingInputIterator; + using EdgeIndicatorIter = gpuprim::TransformInputIterator< + Toffsets, EdgeIndicatorFunctor, CountIter>; + EdgeIndicatorIter sorted_indices_edge_indicator( + CountIter(0), + EdgeIndicatorFunctor(sorted_indices_ptr)); + + Tensor tmp_sorted_indices_unique_ids; + OP_REQUIRES_OK_ASYNC(context, + context->allocate_temp(DataTypeToEnum::value, + TensorShape({nouter}), + &tmp_sorted_indices_unique_ids), + done); + Toffsets* sorted_indices_unique_ids_ptr = + tmp_sorted_indices_unique_ids.flat().data(); + OP_REQUIRES_OK_ASYNC( + context, + GpuInclusivePrefixSum(context, nouter, sorted_indices_edge_indicator, + sorted_indices_unique_ids_ptr), + done); + + se::Stream* stream = context->op_device_context()->stream(); + OP_REQUIRES_ASYNC(context, stream, + absl::InternalError("No GPU stream available."), done); + + // Copy the last element of sorted_indices_unique_ids back to the host to + // obtain num_unique. + ScratchSpace last_idx_host(context, 1, /*on_host=*/true); + OP_REQUIRES_ASYNC( + context, + stream + ->ThenMemcpy( + last_idx_host.mutable_data(), + se::DeviceMemoryBase( + const_cast(sorted_indices_unique_ids_ptr) + + (nouter - 1), + sizeof(*last_idx_host.data())), + sizeof(*last_idx_host.data())) + .ok(), + absl::InternalError("Failed to copy last_idx to host"), done); + + auto async_finish_computation = + [this, context, dense_output_shape, nouter, ninner, input, + indices_tensor, tmp_sorted_indices, sorted_indices_ptr, + tmp_sorted_indices_unique_ids, sorted_indices_unique_ids_ptr, + segment_ids_tensor, tmp_permuted_segment, permuted_segment_ptr, + sorted_indices_edge_indicator, tmp_weights, weights_ptr, last_idx_host, + done]() -> void { + const GPUDevice& device = context->eigen_gpu_device(); + Toffsets num_unique = (*last_idx_host.data()) + 1; + + se::gpu::ScopedActivateExecutorContext scoped_activation{ + context->op_device_context()->stream()->parent()}; + + TensorShape output_shape = dense_output_shape; + OP_REQUIRES_OK_ASYNC(context, + output_shape.SetDimWithStatus(0, num_unique), done); + Tensor* output = nullptr; + T* output_ptr; + OP_REQUIRES_OK_ASYNC( + context, context->allocate_output(0, output_shape, &output), done); + output_ptr = output->flat().data(); + + // Compute the gradient using a weighted SegmentReduceGPU with the segment + // IDs and indices swapped. + using ReduceOp = functor::Sum; + using Treduce = typename ReduceType::type; + OP_REQUIRES_OK_ASYNC(context, + SegmentReduceGPU( + context, /*nouter=*/nouter, + /*ninner=*/ninner, + /*nsegments=*/num_unique, + /*reduce_op=*/ReduceOp(), + /*initial_value=*/T(0), + /*empty_segment_value=*/T(0), + /*is_mean=*/false, /*is_sqrtn=*/false, + /*input=*/input, + /*segment_ids=*/sorted_indices_unique_ids_ptr, + /*indices=*/permuted_segment_ptr, + /*weights=*/weights_ptr, + /*output=*/output_ptr), + done); + + Tensor* sorted_unique_indices = nullptr; + Tindices* sorted_unique_indices_ptr; + OP_REQUIRES_OK_ASYNC( + context, + context->allocate_output(1, TensorShape({num_unique}), + &sorted_unique_indices), + done); + sorted_unique_indices_ptr = + sorted_unique_indices->flat().data(); + + OP_REQUIRES_OK_ASYNC( + context, + LaunchScatterUniqueIndicesKernel( + device, nouter, sorted_indices_edge_indicator, sorted_indices_ptr, + sorted_indices_unique_ids_ptr, sorted_unique_indices_ptr), + done); + + done(); + }; + + context->device() + ->tensorflow_accelerator_device_info() + ->event_mgr->ThenExecute(stream, async_finish_computation); + } + + template + void ComputeSegmentWeights(OpKernelContext* context, + SparseSegmentReductionOperation operation, + Tsegmentids_internal nsegments, Toffsets nouter, + const Tsegmentids_internal* segment_ids, + Tensor* tmp_weights, + typename AsyncOpKernel::DoneCallback done) { + const GPUDevice& device = context->eigen_gpu_device(); + OP_REQUIRES_OK_ASYNC( + context, + context->allocate_temp(DataTypeToEnum::value, + TensorShape({nsegments}), tmp_weights), + done); + Tweights* weights_ptr = tmp_weights->flat().data(); + // Allocate and compute segment_offsets. + Tensor tmp_segment_offsets; + OP_REQUIRES_OK_ASYNC(context, + context->allocate_temp(DataTypeToEnum::value, + TensorShape({nsegments + 1}), + &tmp_segment_offsets), + done); + Toffsets* segment_offsets_ptr = tmp_segment_offsets.flat().data(); + OP_REQUIRES_OK_ASYNC( + context, + LaunchSegmentOffsetsKernel(device, nouter, nsegments, segment_ids, + segment_offsets_ptr), + done); + // Compute the weights based on the segment sizes using segment_offsets. + OP_REQUIRES_OK_ASYNC( + context, + LaunchSegmentWeightsKernel(device, nsegments, operation, + segment_offsets_ptr, weights_ptr), + done); + } +}; + +} // namespace functor +} // namespace tensorflow + +#endif // GOOGLE_CUDA || TENSORFLOW_USE_ROCM +#endif // TENSORFLOW_CORE_KERNELS_SEGMENT_REDUCTION_OPS_GPU_CU_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/segment_reduction_ops_impl.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/segment_reduction_ops_impl.h new file mode 100644 index 0000000000000000000000000000000000000000..792de853b054cb123d9a51c470af575017b5d169 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/segment_reduction_ops_impl.h @@ -0,0 +1,1425 @@ +/* Copyright 2019 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +// See docs in ../ops/math_ops.cc. + +#ifndef TENSORFLOW_CORE_KERNELS_SEGMENT_REDUCTION_OPS_IMPL_H_ +#define TENSORFLOW_CORE_KERNELS_SEGMENT_REDUCTION_OPS_IMPL_H_ + +#include + +#include "tensorflow/core/framework/op_requires.h" +#include "tensorflow/core/platform/types.h" +#define EIGEN_USE_THREADS +#if GOOGLE_CUDA || TENSORFLOW_USE_ROCM +#define EIGEN_USE_GPU +#endif // GOOGLE_CUDA || TENSORFLOW_USE_ROCM + +#include "absl/container/flat_hash_map.h" +#include "Eigen/Core" // from @eigen_archive +#include "unsupported/Eigen/CXX11/Tensor" // from @eigen_archive +#include "tensorflow/core/framework/bounds_check.h" +#include "tensorflow/core/framework/numeric_op.h" +#include "tensorflow/core/framework/op_kernel.h" +#include "tensorflow/core/framework/register_types.h" +#include "tensorflow/core/framework/tensor.h" +#include "tensorflow/core/framework/tensor_types.h" +#include "tensorflow/core/framework/tensor_util.h" +#include "tensorflow/core/framework/types.h" +#include "tensorflow/core/kernels/segment_reduction_ops.h" +#include "tensorflow/core/lib/core/status.h" +#include "tensorflow/core/platform/logging.h" +#include "tensorflow/core/util/determinism.h" +#include "tensorflow/core/util/util.h" + +#if GOOGLE_CUDA || TENSORFLOW_USE_ROCM +#include "tensorflow/core/common_runtime/gpu/gpu_event_mgr.h" +#endif // GOOGLE_CUDA || TENSORFLOW_USE_ROCM + +#if GOOGLE_CUDA +#include "xla/stream_executor/cuda/cuda_activation.h" +#include "tensorflow/core/util/gpu_solvers.h" + +using stream_executor::cuda::ScopedActivateExecutorContext; +#elif TENSORFLOW_USE_ROCM +#include "tensorflow/core/platform/rocm.h" +#include "tensorflow/core/util/gpu_solvers.h" +using stream_executor::rocm::ScopedActivateExecutorContext; +#endif // GOOGLE_CUDA + +namespace tensorflow { + +typedef Eigen::ThreadPoolDevice CPUDevice; +typedef Eigen::GpuDevice GPUDevice; + +namespace internal { +Status ValidateSegmentReduction(OpKernelContext* c, const Tensor& input, + const Tensor& segment_ids); +Status ValidateUnsortedSegmentReduction(OpKernel* op_kernel, + OpKernelContext* context, + const Tensor& data, + const Tensor& segment_ids, + const Tensor& num_segments); +Status ValidateSparseSegmentReduction(OpKernelContext* context, + const Tensor& input, + const Tensor& indices, + const Tensor& segment_ids, + bool has_num_segments); +} // namespace internal + +// This operator handles reducing segments along the first dimension. +// See core/ops/math_ops.cc for more details. +template +class SegmentReductionOp : public OpKernel { + public: + explicit SegmentReductionOp(OpKernelConstruction* context) + : OpKernel(context) {} + + void Compute(OpKernelContext* context) override { + const Tensor& input = context->input(0); + const Tensor& segment_ids = context->input(1); + + OP_REQUIRES_OK(context, internal::ValidateSegmentReduction(context, input, + segment_ids)); + + const int64_t num_indices = segment_ids.NumElements(); + auto input_flat = input.flat_outer_dims(); + const int64_t num_col = input_flat.dimension(1); + + const auto segment_vec = segment_ids.vec(); + // Note that the current implementation assumes that segment_vec values are + // sorted. + const Index output_rows = + num_indices > 0 + ? internal::SubtleMustCopy(segment_vec(num_indices - 1)) + 1 + : 0; + OP_REQUIRES(context, output_rows >= 0, + errors::InvalidArgument("segment ids must be >= 0")); + + OP_REQUIRES(context, input.dims() >= 1, + errors::InvalidArgument("Shape must be at least rank 1")); + + TensorShape output_shape = input.shape(); + // Since we're changing the first dimension of the shape, we need to make + // sure the new shape won't overflow. + OP_REQUIRES_OK(context, output_shape.SetDimWithStatus(0, output_rows)); + + // Note that we do not initialize the output buffer with a default value, so + // we need to explicitly set missing indices to the default value. + Tensor* output = nullptr; + OP_REQUIRES_OK(context, context->allocate_output(0, output_shape, &output)); + if (num_indices == 0) return; + OP_REQUIRES(context, output_rows > 0, + errors::InvalidArgument("segment ids must be >= 0")); + auto output_flat = output->flat_outer_dims(); + + Eigen::IndexList > dims_to_reduce; + Index start = 0, end = 1; + + Index uninitialized_index = 0; // Index from which the output is not set. + Index out_index = internal::SubtleMustCopy(segment_vec(start)); + + // TODO(agarwal): if this loop becomes a bottleneck, consider sharding it + // across threads. + Eigen::DSizes out_slice_shape(num_col); + while (end <= num_indices) { + // We initialize next_index to 0 to avoid "warning: 'next_index' may be + // used uninitialized in this function" in the Mac build (since the + // compiler isn't smart enough to realize the code is safe). + Index next_index = 0; + if (end < num_indices) { + next_index = internal::SubtleMustCopy(segment_vec(end)); + if (out_index == next_index) { + ++end; + continue; + } + // We have a new segment here. Verify that the segment ids are growing. + OP_REQUIRES(context, out_index < next_index, + errors::InvalidArgument("segment ids are not increasing")); + } + + // Process segment [start, end) + const T* in_slice_ptr = &input_flat(start, 0); + typedef Eigen::TensorMap, + Eigen::Unaligned> + OutT; + + OP_REQUIRES( + context, FastBoundsCheck(out_index, output_rows), + errors::InvalidArgument( + "Segment id ", out_index, " out of range [0, ", output_rows, + "), possibly because 'segment_ids' input is not sorted.")); + + // If there is a gap between two indices, we need to set that gap to the + // default value. + if (out_index > uninitialized_index) { + Eigen::DSizes gap_slice_shape( + out_index - uninitialized_index, num_col); + Eigen::TensorMap, Eigen::Unaligned> + gap_slice(&output_flat(uninitialized_index, 0), gap_slice_shape); + gap_slice.setConstant(T(default_value)); + } + + T* out_slice_ptr = &output_flat(out_index, 0); + OutT out_slice(out_slice_ptr, out_slice_shape); + // We don't use out_slice.device(context->eigen_device) + // because these pieces of work are likely to be very small and + // the context switching overhead dwarfs any benefit we get from + // using another thread to do this work. + if (start == end - 1) { + typedef Eigen::TensorMap, + Eigen::Unaligned> + InT; + InT in_slice(in_slice_ptr, out_slice_shape); + out_slice = in_slice; + } else { + Eigen::DSizes in_slice_shape(end - start, + num_col); + typedef Eigen::TensorMap, + Eigen::Unaligned> + InT; + InT in_slice(in_slice_ptr, in_slice_shape); + + out_slice = in_slice.reduce(dims_to_reduce, Reducer()); + } + if (end >= num_indices) break; + start = end; + ++end; + uninitialized_index = out_index + 1; + out_index = next_index; + } + } +}; + +#if GOOGLE_CUDA || TENSORFLOW_USE_ROCM + +// SegmentReductionGPUOp is a segment reduction operator implemented for GPU +// only. +// TODO: This implementation of SegmentReductionGPUOp is sometimes slower than +// its unsorted counterpart (mostly when problem size is small). +// This is due to the following two main reasons and a cost-effective way +// to resolve these problems is desirable. +// 1. Sorted segment reduction requires a memory transfer from device to host +// in order to know the size of the output dimension whereas unsorted +// segment reduction receives the size of the output dimension as an input +// parameter. +// 2. Sorted segment reduction is essentially a tiled version of unsorted +// segment reduction and therefore such optimization comes at an inherent +// cost. However such cost may not be justified when the problem size is +// small. When to use the tiled version or the untiled version depends on +// many factors including data alignments, ratio of calculation to memory +// traffic and obviously, the problem sizes. +template +class SegmentReductionGPUOp : public AsyncOpKernel { + public: + explicit SegmentReductionGPUOp(OpKernelConstruction* context) + : AsyncOpKernel(context) {} + + void ComputeAsync(OpKernelContext* context, DoneCallback done) override { + const Tensor& input = context->input(0); + const Tensor& segment_ids = context->input(1); + + OP_REQUIRES_ASYNC( + context, TensorShapeUtils::IsVector(segment_ids.shape()), + errors::InvalidArgument("segment_ids should be a vector."), done); + + OP_REQUIRES_ASYNC(context, input.dims() >= 1, + errors::InvalidArgument("Shape must be at least rank 1"), + done); + + const int64_t num_indices = segment_ids.NumElements(); + OP_REQUIRES_ASYNC( + context, num_indices == input.dim_size(0), + errors::InvalidArgument( + "segment_ids should be the same size as dimension 0 of" + " input."), + done); + + if (num_indices == 0) { + TensorShape output_shape = input.shape(); + output_shape.set_dim(0, 0); + + Tensor* output = nullptr; + OP_REQUIRES_OK_ASYNC( + context, context->allocate_output(0, output_shape, &output), done); + done(); + return; + } + + se::DeviceMemoryBase output_rows_device( + const_cast(segment_ids).template flat().data() + + (num_indices - 1)); + ScratchSpace output_rows_host(context, 1, /* on_host */ true); + + auto stream = context->op_device_context()->stream(); + OP_REQUIRES_ASYNC( + context, + stream + ->ThenMemcpy(output_rows_host.mutable_data(), output_rows_device, + sizeof(Index)) + .ok(), + errors::Internal(type_string() + + ": failed to copy output_rows from device"), + done); + + SegmentReductionFunctor functor_; + auto create_and_check_output = [context, output_rows_host, &input, + &segment_ids, &functor_, done]() { + // Ensure that within the callback, the proper GPU settings are + // configured. + auto stream = context->op_device_context()->stream(); + ScopedActivateExecutorContext scoped_activation{stream->parent()}; + + Index output_rows = *output_rows_host.data(); + output_rows++; + OP_REQUIRES_ASYNC(context, output_rows > 0, + errors::InvalidArgument("segment ids must be >= 0"), + done); + + TensorShape output_shape = input.shape(); + // Since we're changing the first dimension of the shape, we need to make + // sure the new shape won't overflow. + OP_REQUIRES_OK_ASYNC(context, + output_shape.SetDimWithStatus(0, output_rows), done); + + Tensor* output = nullptr; + OP_REQUIRES_OK_ASYNC( + context, context->allocate_output(0, output_shape, &output), done); + + bool use_deterministic_kernels = + UseDeterministicSegmentReductions() || + (!SegmentReductionFunctor::atomic_reduction_is_associative && + OpDeterminismRequired()); + + // The determinism check is here, rather than inside the functor (as it is + // for the unsorted segment reduction ops) because the done callback + // (required for OP_REQUIRES_ASYNC) is not available inside the functor. + bool determinism_requirement_met = + use_deterministic_kernels || + SegmentReductionFunctor::atomic_reduction_is_associative || + !OpDeterminismRequired() || + DisableSegmentReductionOpDeterminismExceptions(); + OP_REQUIRES_ASYNC( + context, determinism_requirement_met, + errors::Unimplemented( + "Deterministic GPU implementation of sorted segment reduction op" + " not available."), + done); + + auto output_flat = output->flat_outer_dims(); + auto data_ptr = input.template flat().data(); + auto segment_flat = segment_ids.flat(); + functor_(context, context->eigen_device(), output_rows, + segment_ids.shape(), IsMean, segment_flat, input.NumElements(), + data_ptr, output_flat); + + done(); + }; + + context->device() + ->tensorflow_accelerator_device_info() + ->event_mgr->ThenExecute(stream, create_and_check_output); + } +}; +#endif // GOOGLE_CUDA || TENSORFLOW_USE_ROCM + +// ____________________________________________________________________________ +// Unsorted segment reduction ops. + +namespace functor { + +// The ReductionFunctor implementation for CPU. +template +struct UnsortedSegmentFunctor { + void operator()(OpKernelContext* ctx, const TensorShape& segment_ids_shape, + typename TTypes::ConstFlat segment_ids, + typename TTypes::ConstTensor data, + typename TTypes::Tensor output) { + auto cpu_device = ctx->eigen_cpu_device(); + output.device(cpu_device) = output.constant(InitialValueF()()); + if (data.size() == 0) { + return; + } + + // This functor will reduce `N` rows input to `num_segments` rows output. + const int64_t N = segment_ids.dimension(0); + const int64_t num_segments = output.dimension(0); + const int64_t inner_dim = data.dimension(1); + ReductionF reduction; + + // `num_real_segment` counts the rows actually reduced from input, + // the rows with negative segment index will be excluded. + // It will be used for cost model. + int64_t num_real_segment = N; + // `num_reductions` counts the rows actually reduced in output, + // the rows only filled with InitialValueF() will be excluded. + int64_t num_reductions = 0; + // `row_counter` records how many input rows will be reduced in each + // output row, the row only fills with InitialValueF() will keep 0. + // Length of non-zero elements is `num_reductions`. + std::vector row_counter(num_segments, 0); + + for (int64_t i = 0; i < N; ++i) { + Index j = internal::SubtleMustCopy(segment_ids(i)); + if (j < 0) { + --num_real_segment; + continue; + } + OP_REQUIRES(ctx, FastBoundsCheck(j, num_segments), + errors::InvalidArgument( + "segment_ids", SliceDebugString(segment_ids_shape, i), + " = ", j, " is out of range [0, ", num_segments, ")")); + if (row_counter[j] == 0) num_reductions++; + row_counter[j]++; + } + + // Nothing to reduce. All output values equal to `InitialValueF()`. + if (num_reductions == 0) return; + + // Parallelize by `num_segments`. It's simple, efficient and safe + // (no data dependency): + // + // input segment_ids num_segments operation + // | a0 | | 0 | worker 1: |0| f(a0, a1) + // | b0 | | 1 | worker 2: |1| f(b0, b1) + // N | c0 | | 2 | --> worker 3: |2| f(c0) + // | b1 | | 1 | + // | a1 | | 0 | + // + // TODO(intel-tf): Balance workload in `row_counter` to make parallelism + // more efficient. + auto reductionWorker = [&](int64_t begin, int64_t end) -> void { + for (int64_t i = 0; i < N; i++) { + Index j = internal::SubtleMustCopy(segment_ids(i)); + // If `j` is in work scope of this worker, do the reduction. + if (j >= begin && j < end) { + reduction(data.template chip<0>(i), output.template chip<0>(j)); + } + } + }; + + // Reduction functors includes Sum, Max, Min, etc. Simply consider it + // will cost 5 cycles per operation. + const int64_t kAverTaskSize = num_real_segment / num_segments; + const int64_t compute_cycles = 5 * inner_dim * kAverTaskSize; + const int64_t input_bytes = sizeof(T) * inner_dim * kAverTaskSize; + const int64_t output_bytes = sizeof(T) * inner_dim * kAverTaskSize; + const Eigen::TensorOpCost cost(input_bytes, output_bytes, compute_cycles); + cpu_device.parallelFor(num_segments, cost, reductionWorker); + } +}; + +template +using MatrixChip = Eigen::TensorChippingOp<0l, typename TTypes::Matrix>; + +template +using constMatrixChip = + Eigen::TensorChippingOp<0l, const typename TTypes::ConstMatrix>; + +// reduction functors +template +struct SumOp { + void operator()(const constMatrixChip data, MatrixChip output) { + output += data; + } +}; + +template +struct MaxOp { + void operator()(const constMatrixChip data, MatrixChip output) { + output = data.cwiseMax(output); + } +}; + +template +struct MinOp { + void operator()(const constMatrixChip data, MatrixChip output) { + output = data.cwiseMin(output); + } +}; + +template +struct ProdOp { + void operator()(const constMatrixChip data, MatrixChip output) { + output *= data; + } +}; +} // namespace functor + +// The UnsortedSegmentReduction OpKernel. The DeviceReductionFunctor +// is the device specific implementation of the reduction. These device +// specific implementations are templated themselves with the corresponding +// initial value functors and reduction functors. +template +class UnsortedSegmentReductionOp : public OpKernel { + public: + explicit UnsortedSegmentReductionOp(OpKernelConstruction* context) + : OpKernel(context), reduction_functor_(DeviceReductionFunctor()) {} + + void Compute(OpKernelContext* context) override { + const Tensor& data = context->input(0); + const Tensor& segment_ids = context->input(1); + const Tensor& num_segments = context->input(2); + OP_REQUIRES_OK(context, + internal::ValidateUnsortedSegmentReduction( + this, context, data, segment_ids, num_segments)); + const auto segment_flat = segment_ids.flat(); + const int64_t output_rows = internal::SubtleMustCopy(static_cast( + num_segments.dtype() == DT_INT32 ? num_segments.scalar()() + : num_segments.scalar()())); + OP_REQUIRES(context, output_rows >= 0, + errors::InvalidArgument("Input num_segments == ", output_rows, + " must not be negative.")); + TensorShape output_shape; + OP_REQUIRES_OK(context, output_shape.AddDimWithStatus(output_rows)); + for (int i = segment_ids.dims(); i < data.dims(); i++) { + OP_REQUIRES_OK(context, output_shape.AddDimWithStatus(data.dim_size(i))); + } + Tensor* output = nullptr; + OP_REQUIRES_OK(context, context->allocate_output(0, output_shape, &output)); + auto output_flat = output->flat_outer_dims(); + auto data_flat = data.flat_inner_outer_dims(segment_ids.dims() - 1); + reduction_functor_(context, segment_ids.shape(), segment_flat, data_flat, + output_flat); + } + + protected: + DeviceReductionFunctor reduction_functor_; +}; + +// ____________________________________________________________________________ +// Sparse segment reduction ops. + +// Same as SegmentReductionOp but takes as input a "sparse" tensor, represented +// by two dense tensors, one containing the data, and the other containing +// indices into the data. +// +// The template parameters are: +// * Device: An Eigen device object, on which the kernel will execute. +// * T: The value type. +// * Index: The element type of the indices tensor (int32 or int64). +// * SegmentId: The element type of the segment_ids tensor (int32 or int64). +template +class SparseSegmentReductionOpBase : public OpKernel { + public: + explicit SparseSegmentReductionOpBase(OpKernelConstruction* context, + bool is_mean, bool is_sqrtn, + bool has_num_segments, T default_value) + : OpKernel(context), + dtidx_(DataTypeToEnum::v()), + is_mean_(is_mean), + is_sqrtn_(is_sqrtn), + has_num_segments_(has_num_segments), + default_value_(default_value) {} + + void Compute(OpKernelContext* context) override { + const Tensor& input = context->input(0); + const Tensor& indices = context->input(1); + const Tensor& segment_ids = context->input(2); + + OP_REQUIRES_OK( + context, internal::ValidateSparseSegmentReduction( + context, input, indices, segment_ids, has_num_segments_)); + + Index output_rows = -1; + if (has_num_segments_) { + const Tensor& num_segments = context->input(3); + // Note that there is a Tnumsegments parameter on the op, but it is not + // plumbed through to here and so always takes its default value of int32. + output_rows = internal::SubtleMustCopy(num_segments.scalar()()); + } + const int64_t num_indices = indices.NumElements(); + + auto input_flat = input.flat_outer_dims(); + const int64_t num_col = input_flat.dimension(1); + const auto indices_vec = indices.vec(); + const auto segment_vec = segment_ids.vec(); + // Note that the current implementation assumes that segment_vec values are + // sorted. + const SegmentId last_segment_id = + num_indices > 0 ? segment_vec(num_indices - 1) : 0; + int64_t limit = dtidx_ == DataType::DT_INT32 ? kint32max : kint64max; + + OP_REQUIRES( + context, last_segment_id < limit, + errors::InvalidArgument("Last segment id must be < kintmax, got ", + last_segment_id, " limit ", limit)); + + const SegmentId last_segment_id_plus_one = + num_indices > 0 + ? internal::SubtleMustCopy(segment_vec(num_indices - 1)) + 1 + : 0; + + if (has_num_segments_) { + OP_REQUIRES( + context, output_rows >= last_segment_id_plus_one, + errors::InvalidArgument("segment ids must be < num_segments")); + } else { + output_rows = last_segment_id_plus_one; + } + OP_REQUIRES(context, output_rows >= 0, + errors::InvalidArgument("segment ids must be >= 0")); + + TensorShape output_shape = input.shape(); + OP_REQUIRES_OK(context, output_shape.SetDimWithStatus(0, output_rows)); + + // Note that we do not initialize the output buffer with a default value, so + // we need to explicitly set missing indices to the default value. + Tensor* output = nullptr; + OP_REQUIRES_OK(context, context->allocate_output(0, output_shape, &output)); + if (num_indices == 0) { + if (output_rows > 0) { + output->flat_outer_dims().setConstant(default_value_); + } + return; + } + OP_REQUIRES(context, output_rows > 0, + errors::InvalidArgument("segment ids must be >= 0")); + auto output_flat = output->flat_outer_dims(); + + Tensor temp; + if (input.dtype() == DT_BFLOAT16 || input.dtype() == DT_HALF) { + temp = tensorflow::Tensor(DT_FLOAT, output_shape); + } + auto temp_flat = temp.flat_outer_dims(); + + int64_t start = 0, end = 1; + // Index from which the output is not initialized. + SegmentId uninitialized_index = 0; + SegmentId out_index = internal::SubtleMustCopy(segment_vec(start)); + + while (true) { + // We initialize next_index to 0 to avoid "warning: 'next_index' may be + // used uninitialized in this function" in the Mac build (since the + // compiler isn't smart enough to realize the code is safe). + SegmentId next_index = 0; + if (end < num_indices) { + next_index = internal::SubtleMustCopy(segment_vec(end)); + if (out_index == next_index) { + ++end; + continue; + } + // We have a new segment here. Verify that the segment ids are growing. + OP_REQUIRES(context, out_index < next_index, + errors::InvalidArgument("segment ids are not increasing")); + } + + OP_REQUIRES( + context, FastBoundsCheck(out_index, output_rows), + errors::InvalidArgument( + "Segment id ", out_index, " out of range [0, ", output_rows, + "), possibly because 'segment_ids' input is not sorted.")); + + // If there is a gap between two indices, we need to set that gap to the + // default value. + if (out_index > uninitialized_index) { + Eigen::DSizes gap_slice_shape( + out_index - uninitialized_index, num_col); + Eigen::TensorMap, Eigen::Unaligned> + gap_slice(&output_flat(uninitialized_index, 0), gap_slice_shape); + gap_slice.setConstant(default_value_); + } + + auto out = output_flat.template chip<0>(out_index); + auto temp = temp_flat.template chip<0>(out_index); + const int bad_offset = Reduce(input_flat, indices_vec, start, + end - start, out, temp); + OP_REQUIRES(context, bad_offset < 0, + errors::InvalidArgument( + "Bad: indices[", start + bad_offset, + "] == ", indices_vec(start + bad_offset), + " out of range [0, ", input_flat.dimension(0), ")")); + + start = end; + ++end; + uninitialized_index = out_index + 1; + out_index = next_index; + if (end > num_indices) break; + } + + // Fill the gap at the end with the default value. + if (uninitialized_index < output_rows) { + Eigen::DSizes gap_slice_shape( + output_rows - uninitialized_index, num_col); + Eigen::TensorMap, Eigen::Unaligned> + gap_slice(&output_flat(uninitialized_index, 0), gap_slice_shape); + gap_slice.setConstant(default_value_); + } + } + + private: + const DataType dtidx_; + template + using EnableIfBfloat16OrHalf = + typename std::enable_if::value || + std::is_same::value, + int>::type; + template + using EnableIfNotBfloat16OrHalf = + typename std::enable_if::value && + !std::is_same::value, + int>::type; + + template = 0> + EIGEN_ALWAYS_INLINE auto fetch_val( + const typename TTypes::ConstMatrix& input_flat, Tindex index) { + return input_flat.template chip<0>(index); + } + + template = 0> + EIGEN_ALWAYS_INLINE auto fetch_val( + const typename TTypes::ConstMatrix& input_flat, Tindex index) { + return input_flat.template chip<0>(index).template cast(); + } + + template + EIGEN_ALWAYS_INLINE Tout get_scaling_factor(int64_t num) { + Tout m(1); + if (is_mean_ && (num < 10)) { + m = Tout(num); + } + if (is_sqrtn_ && (num < 10)) { + m = Tout(sqrt(num)); + } + return Tout(1) / m; + } + + template = 0> + int64_t Reduce( + const typename TTypes::ConstMatrix& input_flat, + const typename TTypes::ConstVec& indices_vec, int64_t start, + int64_t num, Eigen::TensorChippingOp<0, typename TTypes::Matrix> out, + Eigen::TensorChippingOp<0, typename TTypes::Matrix> temp) { + return ReduceImpl(input_flat, indices_vec, start, num, + out, get_scaling_factor(num)); + } + + template = 0> + int64_t Reduce( + const typename TTypes::ConstMatrix& input_flat, + const typename TTypes::ConstVec& indices_vec, int64_t start, + int64_t num, Eigen::TensorChippingOp<0, typename TTypes::Matrix> out, + Eigen::TensorChippingOp<0, typename TTypes::Matrix> temp) { + int64_t res = + ReduceImpl(input_flat, indices_vec, start, num, + temp, get_scaling_factor(num)); + out = temp.template cast(); + return res; + } + + template + int64_t ReduceImpl( + const typename TTypes::ConstMatrix& input_flat, + const typename TTypes::ConstVec& indices_vec, int64_t start, + int64_t num, + Eigen::TensorChippingOp<0, typename TTypes::Matrix> out, + const Tout scaling_factor) { +#define INDEX(n, i) \ + const auto index##n = indices_vec(start + (i)); \ + if (!FastBoundsCheck(index##n, input_flat.dimension(0))) return (i); + +#define L(n) fetch_val(input_flat, index##n) + + if (num == 1) { + INDEX(0, 0); + out = L(0); + } else { + int64_t r = num & 7; + switch (r) { + case 2: { + INDEX(0, 0); + INDEX(1, 1); + out = (L(0) + L(1)) * scaling_factor; + break; + } + case 3: { + INDEX(0, 0); + INDEX(1, 1); + INDEX(2, 2); + out = (L(0) + L(1) + L(2)) * scaling_factor; + break; + } + case 4: { + INDEX(0, 0); + INDEX(1, 1); + INDEX(2, 2); + INDEX(3, 3); + out = (L(0) + L(1) + L(2) + L(3)) * scaling_factor; + break; + } + case 5: { + INDEX(0, 0); + INDEX(1, 1); + INDEX(2, 2); + INDEX(3, 3); + INDEX(4, 4); + out = (L(0) + L(1) + L(2) + L(3) + L(4)) * scaling_factor; + break; + } + case 6: { + INDEX(0, 0); + INDEX(1, 1); + INDEX(2, 2); + INDEX(3, 3); + INDEX(4, 4); + INDEX(5, 5); + out = (L(0) + L(1) + L(2) + L(3) + L(4) + L(5)) * scaling_factor; + break; + } + case 7: { + INDEX(0, 0); + INDEX(1, 1); + INDEX(2, 2); + INDEX(3, 3); + INDEX(4, 4); + INDEX(5, 5); + INDEX(6, 6); + out = + (L(0) + L(1) + L(2) + L(3) + L(4) + L(5) + L(6)) * scaling_factor; + break; + } + case 0: { + INDEX(0, 0); + INDEX(1, 1); + INDEX(2, 2); + INDEX(3, 3); + INDEX(4, 4); + INDEX(5, 5); + INDEX(6, 6); + INDEX(7, 7); + out = (L(0) + L(1) + L(2) + L(3) + L(4) + L(5) + L(6) + L(7)) * + scaling_factor; + r = 8; + break; + } + case 1: { + INDEX(0, 0); + INDEX(1, 1); + INDEX(2, 2); + INDEX(3, 3); + INDEX(4, 4); + INDEX(5, 5); + INDEX(6, 6); + INDEX(7, 7); + INDEX(8, 8); + out = (L(0) + L(1) + L(2) + L(3) + L(4) + L(5) + L(6) + L(7) + L(8)) * + scaling_factor; + r = 9; + break; + } + } + for (; r < num; r += 8) { + INDEX(0, r); + INDEX(1, r + 1); + INDEX(2, r + 2); + INDEX(3, r + 3); + INDEX(4, r + 4); + INDEX(5, r + 5); + INDEX(6, r + 6); + INDEX(7, r + 7); + out += L(0) + L(1) + L(2) + L(3) + L(4) + L(5) + L(6) + L(7); + } + if (is_mean_ && num >= 10) { + out = out / static_cast(num); + } + if (is_sqrtn_ && num >= 10) { + out = out / static_cast(sqrt(num)); + } + } + + return -1; +#undef L +#undef INDEX + } + + const bool is_mean_; + const bool is_sqrtn_; + const bool has_num_segments_; + const T default_value_; +}; + +#if GOOGLE_CUDA || TENSORFLOW_USE_ROCM + +// Specialization for GPU. Must be Async because may need to wait for a host to +// device memcpy before allocating output. +template +class SparseSegmentReductionOpBase + : public AsyncOpKernel { + public: + explicit SparseSegmentReductionOpBase(OpKernelConstruction* context, + bool is_mean, bool is_sqrtn, + bool has_num_segments, T default_value) + : AsyncOpKernel(context), + is_mean_(is_mean), + is_sqrtn_(is_sqrtn), + has_num_segments_(has_num_segments), + default_value_(default_value) {} + + void ComputeAsync(OpKernelContext* context, DoneCallback done) override { + const Tensor& input = context->input(0); + const Tensor& indices = context->input(1); + const Tensor& segment_ids = context->input(2); + + OP_REQUIRES_OK_ASYNC( + context, + internal::ValidateSparseSegmentReduction( + context, input, indices, segment_ids, has_num_segments_), + done); + + ScratchSpace last_segment_id_host(context, 1, /*on_host=*/true); + + auto create_and_check_output = [this, context, input, indices, segment_ids, + last_segment_id_host, done]() { + // Ensure that within the callback, the proper GPU settings are + // configured. + auto stream = context->op_device_context()->stream(); + ScopedActivateExecutorContext scoped_activation{stream->parent()}; + + SegmentId last_segment_id = *last_segment_id_host.data(); + SegmentId output_rows = last_segment_id + 1; + OP_REQUIRES_ASYNC(context, output_rows > 0, + errors::InvalidArgument("segment ids must be >= 0"), + done); + + TensorShape output_shape = input.shape(); + output_shape.set_dim(0, output_rows); + + Tensor* output = nullptr; + OP_REQUIRES_OK_ASYNC( + context, context->allocate_output(0, output_shape, &output), done); + + auto input_flat = input.flat_outer_dims(); + const auto indices_vec = indices.vec(); + const auto segment_ids_vec = segment_ids.vec(); + auto output_flat = output->flat_outer_dims(); + + functor::SparseSegmentReductionFunctor functor; + OP_REQUIRES_OK_ASYNC( + context, + functor(context, is_mean_, is_sqrtn_, default_value_, input_flat, + indices_vec, segment_ids_vec, output_flat), + done); + done(); + }; + + if (has_num_segments_) { + // No need to do any device to host memcpy, just compute synchronously. + const Tensor& num_segments_t = context->input(3); + SegmentId num_segments = + internal::SubtleMustCopy(num_segments_t.dtype() == DT_INT32 + ? num_segments_t.scalar()() + : num_segments_t.scalar()()); + *last_segment_id_host.mutable_data() = num_segments - 1; + create_and_check_output(); + } else { + const int64_t num_indices = indices.NumElements(); + if (num_indices == 0) { + TensorShape output_shape = input.shape(); + output_shape.set_dim(0, 0); + + Tensor* output = nullptr; + OP_REQUIRES_OK_ASYNC( + context, context->allocate_output(0, output_shape, &output), done); + done(); + return; + } + + // Need to copy last element of segment_ids from device to host, and then + // asynchronously allocate the output and finish the computation. + se::DeviceMemoryBase last_segment_id_device( + const_cast(segment_ids).template flat().data() + + (num_indices - 1)); + auto stream = context->op_device_context()->stream(); + OP_REQUIRES_ASYNC( + context, + stream + ->ThenMemcpy(last_segment_id_host.mutable_data(), + last_segment_id_device, sizeof(SegmentId)) + .ok(), + errors::Internal(type_string() + + ": failed to copy last_segment_id from device"), + done); + context->device() + ->tensorflow_accelerator_device_info() + ->event_mgr->ThenExecute(stream, create_and_check_output); + } + } + + private: + const bool is_mean_; + const bool is_sqrtn_; + const bool has_num_segments_; + const T default_value_; +}; + +#endif // GOOGLE_CUDA || TENSORFLOW_USE_ROCM + +template +class SparseSegmentReductionMeanOp + : public SparseSegmentReductionOpBase { + public: + explicit SparseSegmentReductionMeanOp(OpKernelConstruction* context) + : SparseSegmentReductionOpBase( + context, true /*is_mean*/, false /*is_sqrtn*/, + false /* has_num_segments */, T(0) /* default_value */) {} +}; + +template +class SparseSegmentReductionMeanWithNumSegmentsOp + : public SparseSegmentReductionOpBase { + public: + explicit SparseSegmentReductionMeanWithNumSegmentsOp( + OpKernelConstruction* context) + : SparseSegmentReductionOpBase( + context, true /*is_mean*/, false /*is_sqrtn*/, + true /* has_num_segments */, T(0) /* default_value */) {} +}; + +template +class SparseSegmentReductionSqrtNOp + : public SparseSegmentReductionOpBase { + public: + explicit SparseSegmentReductionSqrtNOp(OpKernelConstruction* context) + : SparseSegmentReductionOpBase( + context, false /*is_mean*/, true /*is_sqrtn*/, + false /* has_num_segments */, T(0) /* default_value */) {} +}; + +template +class SparseSegmentReductionSqrtNWithNumSegmentsOp + : public SparseSegmentReductionOpBase { + public: + explicit SparseSegmentReductionSqrtNWithNumSegmentsOp( + OpKernelConstruction* context) + : SparseSegmentReductionOpBase( + context, false /*is_mean*/, true /*is_sqrtn*/, + true /* has_num_segments */, T(0) /* default_value */) {} +}; + +template +class SparseSegmentReductionSumOp + : public SparseSegmentReductionOpBase { + public: + explicit SparseSegmentReductionSumOp(OpKernelConstruction* context) + : SparseSegmentReductionOpBase( + context, false /*is_mean*/, false /*is_sqrtn*/, + false /* has_num_segments */, T(0) /* default_value */) {} +}; + +template +class SparseSegmentReductionSumWithNumSegmentsOp + : public SparseSegmentReductionOpBase { + public: + explicit SparseSegmentReductionSumWithNumSegmentsOp( + OpKernelConstruction* context) + : SparseSegmentReductionOpBase( + context, false /*is_mean*/, false /*is_sqrtn*/, + true /* has_num_segments */, T(0) /* default_value */) {} +}; + +namespace functor { + +template +struct SparseSegmentGradFunctor { + void operator()(OpKernelContext* context, + SparseSegmentReductionOperation operation, + typename TTypes::ConstMatrix input_flat, + typename TTypes::ConstVec indices_vec, + typename TTypes::ConstVec segment_vec, + typename TTypes::Matrix output_flat) { + const int64_t N = indices_vec.size(); + const SegmentId M = output_flat.dimension(0); + + // Note that similar to SparseSegmentMean, we assume that segment_vec is + // already sorted and has non-negative values. + const SegmentId num_segments = input_flat.dimension(0); + const SegmentId last_segment_id_plus_one = + internal::SubtleMustCopy(segment_vec(N - 1)) + 1; + OP_REQUIRES(context, last_segment_id_plus_one <= num_segments, + errors::InvalidArgument("Invalid number of segments")); + + // Compute scaling factors for input. + std::vector scaling( + (operation == SparseSegmentReductionOperation::kSum ? 0 : num_segments), + 0.0); + if (operation != SparseSegmentReductionOperation::kSum) { + for (int64_t i = 0; i < N; ++i) { + const SegmentId idx = internal::SubtleMustCopy(segment_vec(i)); + OP_REQUIRES( + context, FastBoundsCheck(idx, num_segments), + errors::InvalidArgument("Segment id ", idx, " out of range [0, ", + num_segments, ").")); + scaling[idx] += 1; + } + for (size_t i = 0; i < scaling.size(); ++i) { + switch (operation) { + case SparseSegmentReductionOperation::kSum: { + OP_REQUIRES( + context, false, + errors::Internal( + "Should not happen: sum inside SparseSegmentReductionOp " + "scaling generation.")); + } + case SparseSegmentReductionOperation::kMean: { + scaling[i] = 1.0 / std::max(scaling[i], 1.0); + break; + } + case SparseSegmentReductionOperation::kSqrtN: { + scaling[i] = 1.0 / sqrt(std::max(scaling[i], 1.0)); + break; + } + // No default to get compiler warnings for missing cases. + } + } + } + + output_flat.setZero(); + std::vector is_modified(M, false); + + for (int64_t i = 0; i < N; ++i) { + const Index output_idx = internal::SubtleMustCopy(indices_vec(i)); + OP_REQUIRES(context, FastBoundsCheck(output_idx, M), + errors::InvalidArgument("Index ", output_idx, + " out of range [0, ", M, ").")); + + const SegmentId idx = internal::SubtleMustCopy(segment_vec(i)); + OP_REQUIRES( + context, FastBoundsCheck(idx, num_segments), + errors::InvalidArgument("Segment id ", idx, " out of range [0, ", + num_segments, ").")); + + const T scale = (operation == SparseSegmentReductionOperation::kSum + ? static_cast(1) + : static_cast(scaling[idx])); + if (is_modified[output_idx]) { + if (scale == T{1.0}) { + output_flat.template chip<0>(output_idx) += + input_flat.template chip<0>(idx); + } else { + output_flat.template chip<0>(output_idx) += + input_flat.template chip<0>(idx) * scale; + } + } else { + if (scale == T{1.0}) { + output_flat.template chip<0>(output_idx) = + input_flat.template chip<0>(idx); + } else { + output_flat.template chip<0>(output_idx) = + input_flat.template chip<0>(idx) * scale; + } + } + is_modified[output_idx] = true; + } + } +}; + +template +struct SparseSegmentGradV2Functor { + void operator()(OpKernelContext* context, + SparseSegmentReductionOperation operation, + typename TTypes::ConstMatrix input_flat, + typename TTypes::ConstVec indices_vec, + typename TTypes::ConstVec segment_vec, + const TensorShape& dense_output_shape, + typename AsyncOpKernel::DoneCallback /*done*/) { + const int64_t N = indices_vec.size(); + const int64_t M = dense_output_shape.dim_size(0); + const SegmentId num_segments = input_flat.dimension(0); + const SegmentId last_segment_id_plus_one = + internal::SubtleMustCopy(segment_vec(N - 1)) + 1; + // Note: We do bounds-checking up front here so that it operates in the same + // order as the V1 implementation. + OP_REQUIRES(context, last_segment_id_plus_one <= num_segments, + errors::InvalidArgument("Invalid number of segments")); + for (int64_t i = 0; i < N; ++i) { + const Index output_idx = internal::SubtleMustCopy(indices_vec(i)); + OP_REQUIRES(context, FastBoundsCheck(output_idx, M), + errors::InvalidArgument("Index ", output_idx, + " out of range [0, ", M, ").")); + const SegmentId segment_id = internal::SubtleMustCopy(segment_vec(i)); + OP_REQUIRES( + context, FastBoundsCheck(segment_id, num_segments), + errors::InvalidArgument("Segment id ", segment_id, + " out of range [0, ", num_segments, ").")); + } + + std::vector permutation; + permutation.reserve(N); + for (int64_t i = 0; i < N; ++i) { + permutation.push_back(i); + } + std::stable_sort( + permutation.begin(), permutation.end(), + [&](Index a, Index b) { return indices_vec(a) < indices_vec(b); }); + std::vector sorted_indices; + std::vector permuted_segments; + sorted_indices.reserve(N); + permuted_segments.reserve(N); + for (Index j : permutation) { + sorted_indices.push_back(indices_vec(j)); + permuted_segments.push_back(segment_vec(j)); + } + + // Maps indices to unique index IDs. + absl::flat_hash_map unique_indices_map; + // The unique ID for each original index. + std::vector unique_index_ids; + unique_index_ids.reserve(N); + for (Index output_idx : sorted_indices) { + auto iter = + unique_indices_map.emplace(output_idx, unique_indices_map.size()) + .first; + Index unique_id = iter->second; + unique_index_ids.push_back(unique_id); + } + const int64_t num_unique = unique_indices_map.size(); + + // The original index for each unique ID. + Tensor* unique_indices = nullptr; + OP_REQUIRES_OK(context, + context->allocate_output(1, {num_unique}, &unique_indices)); + typename TTypes::Vec unique_indices_vec = + unique_indices->vec(); + for (const auto& idx_and_id : unique_indices_map) { + unique_indices_vec(idx_and_id.second) = idx_and_id.first; + } + + TensorShape output_shape = dense_output_shape; + OP_REQUIRES_OK(context, output_shape.SetDimWithStatus(0, num_unique)); + Tensor* output = nullptr; + OP_REQUIRES_OK(context, context->allocate_output(0, output_shape, &output)); + + // Call the V1 implementation with the unique/permuted indices/segments. + typename TTypes::ConstVec unique_index_ids_vec( + unique_index_ids.data(), unique_index_ids.size()); + typename TTypes::ConstVec permuted_segment_vec( + permuted_segments.data(), permuted_segments.size()); + SparseSegmentGradFunctor()( + context, operation, input_flat, unique_index_ids_vec, + permuted_segment_vec, output->flat_outer_dims()); + } +}; + +} // namespace functor + +// Implements the common logic for the gradients of SparseSegmentReduction +// kernels. +// +// The template parameters are: +// * Device: An Eigen device object, on which the kernel will execute. +// * T: The value type. +// * Index: The element type of the indices tensor (int32 or int64). +// * SegmentId: The element type of the segment_ids tensor (int32 or int64). +template +class SparseSegmentGradOpBase : public OpKernel { + public: + explicit SparseSegmentGradOpBase(OpKernelConstruction* context, + SparseSegmentReductionOperation operation) + : OpKernel(context), operation_(operation) {} + + void Compute(OpKernelContext* context) override { + const Tensor& input = context->input(0); + const Tensor& indices = context->input(1); + const Tensor& segment_ids = context->input(2); + const Tensor& output_dim0 = context->input(3); + + OP_REQUIRES(context, TensorShapeUtils::IsVector(indices.shape()), + errors::InvalidArgument("indices should be a vector.")); + OP_REQUIRES(context, TensorShapeUtils::IsVector(segment_ids.shape()), + errors::InvalidArgument("segment_ids should be a vector.")); + OP_REQUIRES(context, TensorShapeUtils::IsScalar(output_dim0.shape()), + errors::InvalidArgument("output_dim0 should be a scalar.")); + + const int64_t N = indices.NumElements(); + OP_REQUIRES(context, N == segment_ids.NumElements(), + errors::InvalidArgument( + "segment_ids and indices should have same size.")); + const SegmentId M = internal::SubtleMustCopy(output_dim0.scalar()()); + + auto input_flat = input.flat_outer_dims(); + const auto indices_vec = indices.vec(); + const auto segment_vec = segment_ids.vec(); + + TensorShape output_shape = input.shape(); + OP_REQUIRES_OK(context, output_shape.SetDimWithStatus(0, M)); + Tensor* output = nullptr; + OP_REQUIRES_OK(context, context->allocate_output(0, output_shape, &output)); + if (M == 0 || N == 0) return; + + auto output_flat = output->flat_outer_dims(); + functor::SparseSegmentGradFunctor()( + context, operation_, input_flat, indices_vec, segment_vec, output_flat); + } + + private: + const SparseSegmentReductionOperation operation_; +}; + +template +class SparseSegmentSumGradOp + : public SparseSegmentGradOpBase { + public: + explicit SparseSegmentSumGradOp(OpKernelConstruction* context) + : SparseSegmentGradOpBase( + context, SparseSegmentReductionOperation::kSum) {} +}; + +template +class SparseSegmentMeanGradOp + : public SparseSegmentGradOpBase { + public: + explicit SparseSegmentMeanGradOp(OpKernelConstruction* context) + : SparseSegmentGradOpBase( + context, SparseSegmentReductionOperation::kMean) {} +}; + +template +class SparseSegmentSqrtNGradOp + : public SparseSegmentGradOpBase { + public: + explicit SparseSegmentSqrtNGradOp(OpKernelConstruction* context) + : SparseSegmentGradOpBase( + context, SparseSegmentReductionOperation::kSqrtN) {} +}; + +template +class SparseSegmentGradV2OpCommon { + public: + Status operator()(OpKernelContext* context, + SparseSegmentReductionOperation operation, + typename AsyncOpKernel::DoneCallback done = nullptr) { + const Tensor& input = context->input(0); + const Tensor& indices = context->input(1); + const Tensor& segment_ids = context->input(2); + const Tensor& dense_output_dim0 = context->input(3); + + if (!TensorShapeUtils::IsVector(indices.shape())) { + return errors::InvalidArgument("indices should be a vector."); + } + if (!TensorShapeUtils::IsVector(segment_ids.shape())) { + return errors::InvalidArgument("segment_ids should be a vector."); + } + if (!TensorShapeUtils::IsScalar(dense_output_dim0.shape())) { + return errors::InvalidArgument("dense_output_dim0 should be a scalar."); + } + + const int64_t N = indices.NumElements(); + if (N != segment_ids.NumElements()) { + return errors::InvalidArgument( + "segment_ids and indices should have same size."); + } + const int32_t M = + internal::SubtleMustCopy(dense_output_dim0.scalar()()); + TensorShape dense_output_shape = input.shape(); + TF_RETURN_IF_ERROR(dense_output_shape.SetDimWithStatus(0, M)); + + if (M == 0 || N == 0) { + TensorShape output_shape = input.shape(); + TF_RETURN_IF_ERROR(output_shape.SetDimWithStatus(0, 0)); + Tensor* output = nullptr; + TF_RETURN_IF_ERROR(context->allocate_output(0, output_shape, &output)); + Tensor* sorted_unique_indices = nullptr; + TF_RETURN_IF_ERROR(context->allocate_output(1, TensorShape({0}), + &sorted_unique_indices)); + return OkStatus(); + } + + auto input_flat = input.flat_outer_dims(); + const auto indices_vec = indices.vec(); + const auto segment_vec = segment_ids.vec(); + + functor::SparseSegmentGradV2Functor()( + context, operation, input_flat, indices_vec, segment_vec, + dense_output_shape, done); + + return OkStatus(); + } +}; + +template +class SparseSegmentGradV2OpBase {}; + +// The CPU implementation is synchronous. +template +class SparseSegmentGradV2OpBase + : public OpKernel { + public: + explicit SparseSegmentGradV2OpBase(OpKernelConstruction* context, + SparseSegmentReductionOperation operation) + : OpKernel(context), operation_(operation) {} + + void Compute(OpKernelContext* context) override { + OP_REQUIRES_OK( + context, (SparseSegmentGradV2OpCommon()( + context, operation_))); + } + + private: + const SparseSegmentReductionOperation operation_; +}; + +// The GPU implementation is asynchronous. +template +class SparseSegmentGradV2OpBase + : public AsyncOpKernel { + public: + explicit SparseSegmentGradV2OpBase(OpKernelConstruction* context, + SparseSegmentReductionOperation operation) + : AsyncOpKernel(context), operation_(operation) {} + + void ComputeAsync(OpKernelContext* context, DoneCallback done) override { + OP_REQUIRES_OK_ASYNC( + context, + (SparseSegmentGradV2OpCommon()( + context, operation_, done)), + done); + } + + private: + const SparseSegmentReductionOperation operation_; +}; + +template +class SparseSegmentSumGradV2Op + : public SparseSegmentGradV2OpBase { + public: + explicit SparseSegmentSumGradV2Op(OpKernelConstruction* context) + : SparseSegmentGradV2OpBase( + context, SparseSegmentReductionOperation::kSum) {} +}; + +template +class SparseSegmentMeanGradV2Op + : public SparseSegmentGradV2OpBase { + public: + explicit SparseSegmentMeanGradV2Op(OpKernelConstruction* context) + : SparseSegmentGradV2OpBase( + context, SparseSegmentReductionOperation::kMean) {} +}; + +template +class SparseSegmentSqrtNGradV2Op + : public SparseSegmentGradV2OpBase { + public: + explicit SparseSegmentSqrtNGradV2Op(OpKernelConstruction* context) + : SparseSegmentGradV2OpBase( + context, SparseSegmentReductionOperation::kSqrtN) {} +}; + +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_SEGMENT_REDUCTION_OPS_IMPL_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/sendrecv_ops.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/sendrecv_ops.h new file mode 100644 index 0000000000000000000000000000000000000000..34f27d10c0c7de014d8d1ff88706e0d268e832f0 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/sendrecv_ops.h @@ -0,0 +1,58 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_KERNELS_SENDRECV_OPS_H_ +#define TENSORFLOW_CORE_KERNELS_SENDRECV_OPS_H_ + +#include "tensorflow/core/framework/op_kernel.h" +#include "tensorflow/core/platform/macros.h" + +namespace tensorflow { + +class SendOp : public OpKernel { + public: + explicit SendOp(OpKernelConstruction* ctx); + void Compute(OpKernelContext* ctx) override; + + string TraceString(const OpKernelContext& ctx, bool verbose) const override; + + private: + string key_prefix_; + Rendezvous::ParsedKey parsed_key_; + bool hostmem_sendrecv_; + + SendOp(const SendOp&) = delete; + void operator=(const SendOp&) = delete; +}; + +class RecvOp : public AsyncOpKernel { + public: + explicit RecvOp(OpKernelConstruction* ctx); + void ComputeAsync(OpKernelContext* ctx, DoneCallback done) override; + + string TraceString(const OpKernelContext& ctx, bool verbose) const override; + + private: + string key_prefix_; + Rendezvous::ParsedKey parsed_key_; + bool hostmem_sendrecv_; + + RecvOp(const RecvOp&) = delete; + void operator=(const RecvOp&) = delete; +}; + +} // end namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_SENDRECV_OPS_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/sequence_ops.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/sequence_ops.h new file mode 100644 index 0000000000000000000000000000000000000000..fc81643c027e6f4b516c3a646aa675c293b88177 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/sequence_ops.h @@ -0,0 +1,36 @@ +/* Copyright 2021 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_KERNELS_SEQUENCE_OPS_H_ +#define TENSORFLOW_CORE_KERNELS_SEQUENCE_OPS_H_ + +#include "tensorflow/core/framework/op_kernel.h" +#include "tensorflow/core/framework/tensor_types.h" + +namespace tensorflow { + +namespace functor { + +template +struct RangeFunctor { + void operator()(OpKernelContext* context, int64_t size, T start, T delta, + typename TTypes::Flat output) const; +}; + +} // namespace functor + +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_SEQUENCE_OPS_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/shape_ops.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/shape_ops.h new file mode 100644 index 0000000000000000000000000000000000000000..296031eceb53d67e8f13c3425d3df425aae45981 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/shape_ops.h @@ -0,0 +1,269 @@ +/* Copyright 2017 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_KERNELS_SHAPE_OPS_H_ +#define TENSORFLOW_CORE_KERNELS_SHAPE_OPS_H_ + +#include +#include +#include + +#include "absl/container/inlined_vector.h" +#include "tensorflow/core/common_runtime/dma_helper.h" +#include "tensorflow/core/framework/bounds_check.h" +#include "tensorflow/core/framework/op_kernel.h" +#include "tensorflow/core/framework/tensor.h" +#include "tensorflow/core/framework/tensor_shape.h" +#include "tensorflow/core/framework/variant_op_registry.h" + +namespace tensorflow { + +namespace shape_op_helpers { +inline Status GetShape(OpKernelContext* ctx, int input_index, + TensorShape* shape) { + *shape = ctx->input(input_index).shape(); + return OkStatus(); +} +} // namespace shape_op_helpers + +template +class ShapeOp : public OpKernel { + public: + explicit ShapeOp(OpKernelConstruction* ctx) : OpKernel(ctx) {} + + void Compute(OpKernelContext* ctx) override { + TensorShape shape; + OP_REQUIRES_OK(ctx, shape_op_helpers::GetShape(ctx, 0, &shape)); + const int rank = shape.dims(); + Tensor* out = nullptr; + OP_REQUIRES_OK(ctx, ctx->allocate_output(0, TensorShape({rank}), &out)); + auto vec = out->vec(); + for (int i = 0; i < rank; ++i) { + int64_t dim_size = shape.dim_size(i); + if (out->dtype() == DT_INT32) { + OP_REQUIRES( + ctx, FastBoundsCheck(dim_size, std::numeric_limits::max()), + errors::InvalidArgument("Shape output type is 32-bit ", " but dim ", + i, " is ", dim_size)); + } + vec(i) = static_cast(dim_size); + } + } + + bool IsExpensive() override { return false; } +}; + +template +class ShapeNOp : public OpKernel { + public: + explicit ShapeNOp(OpKernelConstruction* ctx) : OpKernel(ctx) {} + + void Compute(OpKernelContext* ctx) override { + for (int i = 0; i < ctx->num_inputs(); ++i) { + TensorShape shape; + OP_REQUIRES_OK(ctx, shape_op_helpers::GetShape(ctx, i, &shape)); + const int dims = shape.dims(); + Tensor* out = nullptr; + OP_REQUIRES_OK(ctx, ctx->allocate_output(i, {dims}, &out)); + auto vec = out->vec(); + + for (int j = 0; j < dims; ++j) { + int64_t dim_size = shape.dim_size(j); + if (out->dtype() == DT_INT32) { + OP_REQUIRES( + ctx, FastBoundsCheck(dim_size, std::numeric_limits::max()), + errors::InvalidArgument("ShapeN output type is 32-bit but shape ", + i, " dim ", j, " is ", dim_size)); + } + vec(j) = static_cast(dim_size); + } + } + } + + bool IsExpensive() override { return false; } +}; + +class RankOp : public OpKernel { + public: + explicit RankOp(OpKernelConstruction* ctx) : OpKernel(ctx) {} + + void Compute(OpKernelContext* ctx) override { + TensorShape shape; + OP_REQUIRES_OK(ctx, shape_op_helpers::GetShape(ctx, 0, &shape)); + const int rank = shape.dims(); + Tensor* out = nullptr; + OP_REQUIRES_OK(ctx, ctx->allocate_output(0, TensorShape({}), &out)); + out->scalar()() = rank; + } + + bool IsExpensive() override { return false; } +}; + +template +class SizeOp : public OpKernel { + public: + explicit SizeOp(OpKernelConstruction* ctx) : OpKernel(ctx) {} + + void Compute(OpKernelContext* ctx) override { + TensorShape shape; + OP_REQUIRES_OK(ctx, shape_op_helpers::GetShape(ctx, 0, &shape)); + const int64_t size = shape.num_elements(); + Tensor* out = nullptr; + OP_REQUIRES_OK(ctx, ctx->allocate_output(0, TensorShape({}), &out)); + if (out->dtype() == DT_INT32) { + OP_REQUIRES( + ctx, FastBoundsCheck(size, std::numeric_limits::max()), + errors::InvalidArgument("Number of elements was larger than " + "representable by 32-bit output type")); + } + out->scalar()() = static_cast(size); + } + + bool IsExpensive() override { return false; } +}; + +template +class ExpandDimsOp : public OpKernel { + public: + explicit ExpandDimsOp(OpKernelConstruction* ctx) : OpKernel(ctx) {} + + void Compute(OpKernelContext* ctx) override { + const Tensor& input_t = ctx->input(0); + OP_REQUIRES(ctx, input_t.dtype() != DT_VARIANT, + errors::InvalidArgument("ExpandDims on Variant not supported")); + + const Tensor& dim_t = ctx->input(1); + OP_REQUIRES( + ctx, (dim_t.NumElements() == 1), + errors::InvalidArgument("'dim' must be a tensor with a single value")); + DCHECK_EQ(dim_t.dtype(), DataTypeToEnum::v()); + Tdim dim = *static_cast(DMAHelper::base(&dim_t)); + const TensorShape& input_shape = input_t.shape(); + int input_dims = input_shape.dims(); + OP_REQUIRES(ctx, dim >= -1 - input_dims && dim <= input_dims, + errors::InvalidArgument("Tried to expand dim index ", dim, + " for tensor with ", input_dims, + " dimensions.")); + + // We emulate numpy's interpretation of the dim axis when + // -input.dims() >= dim <= input.dims(). + if (dim < 0) { + // Clamp to the end if needed. + dim = std::min(dim + input_dims + 1, input_dims); + } + + // Compute new shape with an additional dimension. + absl::InlinedVector output_shape_vec(input_dims + 1); + for (int64_t i = 0; i < dim; ++i) { + output_shape_vec[i] = input_shape.dim_size(i); + } + output_shape_vec[dim] = 1; + for (int64_t i = dim + 1; i < input_dims + 1; ++i) { + output_shape_vec[i] = input_shape.dim_size(i - 1); + } + TensorShape output_shape(output_shape_vec); + + Tensor output_t; + if (!output_t.CopyFrom(input_t, output_shape)) { + // This should never happen, since the sizes of the input and output + // should always be the same (we only expand the dimension with 1). + ctx->SetStatus( + errors::Internal("Could not expand dimension with input shape ", + ctx->input(0).shape().DebugString(), + " and output shape ", output_shape.DebugString())); + } + ctx->set_output(0, std::move(output_t)); + } + + bool IsExpensive() override { return false; } +}; + +class SqueezeOp : public OpKernel { + public: + explicit SqueezeOp(OpKernelConstruction* ctx) : OpKernel(ctx) { + std::vector squeeze_dims; + OP_REQUIRES_OK(ctx, ctx->GetAttr("squeeze_dims", &squeeze_dims)); + squeeze_dims_.insert(squeeze_dims.begin(), squeeze_dims.end()); + } + + void Compute(OpKernelContext* ctx) override { + OP_REQUIRES(ctx, ctx->input(0).dtype() != DT_VARIANT, + errors::InvalidArgument("Squeeze on Variant not supported")); + + auto existing_dims = ctx->input(0).shape().dim_sizes(); + const int existing_dims_size = static_cast(existing_dims.size()); + std::vector new_shape; + + std::unordered_set wrapped_squeeze_dims; + wrapped_squeeze_dims.reserve(squeeze_dims_.size()); + // Validate squeeze dims against the input. + for (int32_t dim : squeeze_dims_) { + OP_REQUIRES( + ctx, (dim >= -ctx->input(0).dims() && dim < ctx->input(0).dims()), + errors::InvalidArgument("Tried to squeeze dim index ", dim, + " for tensor with ", ctx->input(0).dims(), + " dimensions.")); + // If dim is < 0, we wrap around (-1 means the last element). + if (dim < 0) { + dim = existing_dims_size + dim; + } + + wrapped_squeeze_dims.insert(dim); + } + + for (int i = 0; i < existing_dims_size; ++i) { + auto existing_dim = existing_dims[i]; + + // If squeeze_set is non-empty, only squeeze those dimensions. + if (!wrapped_squeeze_dims.empty()) { + if (wrapped_squeeze_dims.count(i) > 0) { + OP_REQUIRES(ctx, existing_dim == 1, + errors::InvalidArgument( + "Can not squeeze dim[", i, + "], expected a dimension of 1, got ", existing_dim)); + } else { + // This dimension is not being squeezed. + new_shape.push_back(existing_dim); + } + } else { + // Copy over all non-1-length dimensions. + if (existing_dim != 1) { + new_shape.push_back(existing_dim); + } + } + } + + const TensorShape output_shape(new_shape); + Tensor* output = nullptr; + OP_REQUIRES_OK(ctx, ctx->allocate_output(0, {0}, &output)); + if (!output->CopyFrom(ctx->input(0), output_shape)) { + // This should never happen, since the sizes of the input and + // output should always be the same. + ctx->SetStatus(errors::Internal("Could not squeeze input with shape ", + ctx->input(0).shape().DebugString(), + " and output shape ", + output_shape.DebugString())); + } + } + + bool IsExpensive() override { return false; } + + private: + std::unordered_set squeeze_dims_; +}; + +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_SHAPE_OPS_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/shuffle_common.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/shuffle_common.h new file mode 100644 index 0000000000000000000000000000000000000000..feb62accc02e5366cee337ff9a99a6d4b3b3a3a9 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/shuffle_common.h @@ -0,0 +1,102 @@ +/* Copyright 2022 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +// Common utilities for random shuffling. + +#ifndef TENSORFLOW_CORE_KERNELS_SHUFFLE_COMMON_H_ +#define TENSORFLOW_CORE_KERNELS_SHUFFLE_COMMON_H_ + +#include +#include + +#include "tensorflow/core/framework/op_kernel.h" +#include "tensorflow/core/framework/tensor_util.h" +#include "tensorflow/core/lib/random/philox_random.h" +#include "tensorflow/core/lib/random/random_distributions.h" + +namespace tensorflow { + +// TODO(irving): If performance is critical, generate output directly instead +// of an in-place shuffle using a pseudorandom permutation like +// +// https://github.com/otherlab/geode/blob/master/geode/random/permute.cpp +// +// This is probably also the right thing if we want a GPU version of shuffling. + +// We use our own version of std::random_shuffle to guarantee that exactly +// size - 1 samples are used. +template +static inline void ShuffleRange(Iter first, Iter last, Random& uniform) { + if (first == last) return; + const auto stop = last - 1; + for (auto i = first; i != stop; ++i) { + using std::iter_swap; + iter_swap(i, i + uniform(last - i)); + } +} + +template +static void IndexedShuffle(const int64_t size, const InT& input_mat, + OutT output_mat, Random& uniform) { + std::vector permutation(size); + for (IntT i = 0; i < size; i++) { + permutation[i] = i; + } + ShuffleRange(permutation.begin(), permutation.end(), uniform); + for (IntT i = 0; i < size; i++) { + output_mat.template chip<0>(i) = input_mat.template chip<0>(permutation[i]); + } +} + +template +Status RandomShuffle(OpKernelContext* context, const Tensor& input, + int output_idx, + std::function get_rng) { + if (input.NumElements() <= 1 || input.dim_size(0) <= 1) { + // No shuffling is required, so copy input directly to output + context->set_output(output_idx, input); + } else { + // Reserve enough random samples for shuffling + const int64_t size = input.dim_size(0); + const int64_t samples = size - 1; + auto rng = get_rng(samples); + random::SingleSampleAdapter single(&rng); + const auto uniform = [&single](uint32 n) { return single() % n; }; + + if (input.dims() == 1) { + // For 1D data, copy and then shuffle in place + context->set_output(output_idx, tensor::DeepCopy(input)); + auto vec = context->mutable_output(output_idx)->vec(); + ShuffleRange(vec.data(), vec.data() + size, uniform); + } else { + // For >= 2D, shuffle indices and then copy across + Tensor* output = nullptr; + TF_RETURN_IF_ERROR( + context->allocate_output(output_idx, input.shape(), &output)); + const auto input_mat = input.flat_outer_dims(); + auto output_mat = output->flat_outer_dims(); + if (size < kint32max) { + IndexedShuffle(size, input_mat, output_mat, uniform); + } else { + IndexedShuffle(size, input_mat, output_mat, uniform); + } + } + } + return OkStatus(); +} + +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_SHUFFLE_COMMON_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/slice_op.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/slice_op.h new file mode 100644 index 0000000000000000000000000000000000000000..1992c604e174c47969157b5df4d2b05c0bc7185d --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/slice_op.h @@ -0,0 +1,45 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_KERNELS_SLICE_OP_H_ +#define TENSORFLOW_CORE_KERNELS_SLICE_OP_H_ + +// Functor definition for SliceOp, must be compilable by nvcc. + +#include "unsupported/Eigen/CXX11/Tensor" // from @eigen_archive +#include "tensorflow/core/framework/tensor_types.h" + +namespace tensorflow { +namespace functor { + +template +struct Slice { + void operator()(const Device& d, typename TTypes::Tensor output, + typename TTypes::ConstTensor input, + const Eigen::DSizes& slice_indices, + const Eigen::DSizes& slice_sizes) { + MaybeWith32BitIndexing( + [&](auto output32, auto input32, auto slice_indices32, + auto slice_sizes32) { + output32.device(d) = input32.slice(slice_indices32, slice_sizes32); + }, + output, input, slice_indices, slice_sizes); + } +}; + +} // namespace functor +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_SLICE_OP_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/slice_op_cpu_impl.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/slice_op_cpu_impl.h new file mode 100644 index 0000000000000000000000000000000000000000..9eda840aa4a14df8a5c8244c3cee9877aa1a10d3 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/slice_op_cpu_impl.h @@ -0,0 +1,39 @@ +/* Copyright 2016 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_KERNELS_SLICE_OP_CPU_IMPL_H_ +#define TENSORFLOW_CORE_KERNELS_SLICE_OP_CPU_IMPL_H_ + +#define EIGEN_USE_THREADS + +#include "tensorflow/core/framework/bfloat16.h" +#include "tensorflow/core/framework/register_types.h" +#include "tensorflow/core/kernels/slice_op.h" + +namespace tensorflow { + +using CpuDevice = Eigen::ThreadPoolDevice; + +#define DEFINE_CPU_KERNELS(T) \ + template struct functor::Slice; + +TF_CALL_ALL_TYPES(DEFINE_CPU_KERNELS); + +#undef DEFINE_CPU_KERNELS + + +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_SLICE_OP_CPU_IMPL_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/smooth-hinge-loss.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/smooth-hinge-loss.h new file mode 100644 index 0000000000000000000000000000000000000000..beb56fbf01882b6231c874b8598dd152cf5c9a1d --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/smooth-hinge-loss.h @@ -0,0 +1,114 @@ +/* Copyright 2016 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_KERNELS_SMOOTH_HINGE_LOSS_H_ +#define TENSORFLOW_CORE_KERNELS_SMOOTH_HINGE_LOSS_H_ + +#include + +#include "tensorflow/core/kernels/loss.h" +#include "tensorflow/core/lib/core/errors.h" +#include "tensorflow/core/lib/core/status.h" + +namespace tensorflow { + +class SmoothHingeLossUpdater : public DualLossUpdater { + public: + // Computes the updated dual variable (corresponding) to a single example. The + // updated dual value maximizes the objective function of the dual + // optimization problem associated with smooth hinge loss. The computations + // are detailed in readme.md. + double ComputeUpdatedDual(const int num_partitions, const double label, + const double example_weight, + const double current_dual, const double wx, + const double weighted_example_norm) const final { + // Intuitively there are 3 cases: + // a. new optimal value of the dual variable falls within the admissible + // range [0, 1]. In this case we set new dual to this value. + // b. new optimal value is < 0. Then, because of convexity, the optimal + // valid value for new dual = 0 + // c. new optimal value > 1.0. Then new optimal value should be set to 1.0. + const double candidate_optimal_dual = + current_dual + + (label - wx - gamma * current_dual) / + (num_partitions * example_weight * weighted_example_norm + gamma); + if (label * candidate_optimal_dual < 0) { + return 0.0; + } + if (label * candidate_optimal_dual > 1.0) { + return label; + } + return candidate_optimal_dual; + } + + double ComputeDualLoss(const double current_dual, const double example_label, + const double example_weight) const final { + // For binary classification, there are 2 conjugate functions, one per + // label value (-1 and 1). + const double y_alpha = current_dual * example_label; // y \alpha + if (y_alpha < 0 || y_alpha > 1.0) { + return std::numeric_limits::max(); + } + return (-y_alpha + 0.5 * gamma * current_dual * current_dual) * + example_weight; + } + + double ComputePrimalLoss(const double wx, const double example_label, + const double example_weight) const final { + const double y_wx = example_label * wx; + if (y_wx >= 1) return 0; + if (y_wx <= 1 - gamma) return (1 - y_wx - gamma / 2) * example_weight; + return (1 - y_wx) * (1 - y_wx) * example_weight * 0.5 / gamma; + } + + // Converts binary example labels from 0.0 or 1.0 to -1.0 or 1.0 respectively + // as expected by smooth hinge loss. + Status ConvertLabel(float* const example_label) const final { + if (*example_label == 0.0) { + *example_label = -1; + return OkStatus(); + } + if (*example_label == 1.0) { + return OkStatus(); + } + return errors::InvalidArgument( + "Only labels of 0.0 or 1.0 are supported right now. " + "Found example with label: ", + *example_label); + } + + double PrimalLossDerivative(const double wx, const double label, + const double example_weight) const final { + if (label * wx >= 1) { + return 0; + } + if (label * wx <= 1 - gamma) { + return -label; + } + return (wx - label) / gamma; + } + + double SmoothnessConstant() const final { return gamma; } + + private: + // Smoothness constant of smooth hinge loss + // TODO(sibyl-Aix6ihai): expose this parameter + const double gamma = 1; +}; + +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_SMOOTH_HINGE_LOSS_H_ +// TENSORFLOW_KERNELS_SMOOTH_HINGE_LOSS_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/snapshot_op.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/snapshot_op.h new file mode 100644 index 0000000000000000000000000000000000000000..1047b47018b0e2479acbb29a8e83cb04f35765bd --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/snapshot_op.h @@ -0,0 +1,44 @@ +/* Copyright 2017 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_KERNELS_SNAPSHOT_OP_H_ +#define TENSORFLOW_CORE_KERNELS_SNAPSHOT_OP_H_ + +#if GOOGLE_CUDA || TENSORFLOW_USE_ROCM +#define EIGEN_USE_GPU +#endif + +#define EIGEN_USE_THREADS + +#include "unsupported/Eigen/CXX11/Tensor" // from @eigen_archive +#include "tensorflow/core/framework/op_kernel.h" + +namespace tensorflow { +namespace functor { + +// Functor used by SnapshotOp. +template +struct Snapshot { + void operator()(const Device& device, + typename TTypes::ConstTensor input, + typename TTypes::Tensor output) { + device.memcpy(output.data(), input.data(), input.size() * sizeof(Scalar)); + } +}; + +} // namespace functor +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_SNAPSHOT_OP_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/softmax_op_functor.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/softmax_op_functor.h new file mode 100644 index 0000000000000000000000000000000000000000..2ce16ce8217b0fce931704c22a84f9ca5dd316b8 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/softmax_op_functor.h @@ -0,0 +1,95 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_KERNELS_SOFTMAX_OP_FUNCTOR_H_ +#define TENSORFLOW_CORE_KERNELS_SOFTMAX_OP_FUNCTOR_H_ +// Functor definition for SoftmaxOp, must be compilable by nvcc. + +#include "unsupported/Eigen/CXX11/Tensor" // from @eigen_archive +#include "tensorflow/core/framework/tensor_types.h" + +namespace tensorflow { +namespace functor { + +// Functor used by SoftmaxOp to do the computations. +template +struct SoftmaxFunctor { + // Computes Softmax or LogSoftmax activation. + // + // logits: dim: batch_size, num_classes. + // softmax: dims: batch_size, num_classes. + // log: boolean + void operator()(const Device& d, typename TTypes::ConstMatrix logits, + typename TTypes::Matrix softmax, const bool log); +}; + +// Eigen code implementing SoftmaxFunctor::operator() or +// LogSoftmaxFunctor::operator(). +// This code works for both CPU and GPU and is used by the functor +// specializations for both device types. +template +struct SoftmaxEigenImpl { + static void Compute(const Device& d, typename TTypes::ConstMatrix logits, + typename TTypes::Matrix softmax, const bool log) { + const int kBatchDim = 0; + const int kClassDim = 1; + + const int batch_size = logits.dimension(kBatchDim); + const int num_classes = logits.dimension(kClassDim); + +// These arrays are used to reduce along the class dimension, and broadcast +// the resulting value to all classes. + Eigen::IndexList > along_class; + Eigen::IndexList > batch_by_one; + batch_by_one.set(0, batch_size); + Eigen::IndexList, int> one_by_class; + one_by_class.set(1, num_classes); + + // shifted_logits = logits - max(logits along classes); + auto shifted_logits = (logits - logits.maximum(along_class) + .eval() + .reshape(batch_by_one) + .broadcast(one_by_class)); + if (log) { + // Calculate the log of the softmax + // softmax = logits - max(logits along classes); + softmax.device(d) = shifted_logits; + // softmax = softmax - log(sum(exp(softmax along classes))); + softmax.device(d) = (softmax - softmax.exp() + .sum(along_class) + .log() + .eval() + .reshape(batch_by_one) + .broadcast(one_by_class)); + } else { + // NOTE(touts): If you modify this implementation please run + // the BM_ImageNetSoftmaxFwd benchmark in nn_ops_test.cc. + // + // softmax = exp(logits - max(logits along classes)); + softmax.device(d) = shifted_logits.exp(); + // softmax = softmax * (1 / sum(softmax along classes)); + softmax.device(d) = (softmax * softmax.sum(along_class) + .inverse() + .eval() + .reshape(batch_by_one) + .broadcast(one_by_class)); + } + } +}; + +} // namespace functor +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_SOFTMAX_OP_FUNCTOR_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/softplus_op.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/softplus_op.h new file mode 100644 index 0000000000000000000000000000000000000000..1fa271a6cbbade7dfafbbf2d66888fd753672a68 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/softplus_op.h @@ -0,0 +1,79 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_KERNELS_SOFTPLUS_OP_H_ +#define TENSORFLOW_CORE_KERNELS_SOFTPLUS_OP_H_ +// Functor definition for SoftplusOp and SoftplusGradOp, must be compilable by +// nvcc. + +// clang-format off +#include "tensorflow/core/platform/bfloat16.h" +#include "unsupported/Eigen/CXX11/Tensor" // from @eigen_archive +// clang-format on +#include "tensorflow/core/framework/tensor_types.h" + +namespace tensorflow { +namespace functor { + +// Functor used by SoftplusOp to do the computations. +template +struct Softplus { + // Computes Softplus activation. + // + // features: any shape. + // activations: same shape as "features". + void operator()(const Device& d, typename TTypes::ConstTensor features, + typename TTypes::Tensor activations) { + // Choose a threshold on x below which exp(x) may underflow + // when added to 1, but for which exp(x) is always within epsilon of the + // true softplus(x). Offset of 2 from machine epsilon checked + // experimentally for float16, float32, float64. Checked against + // softplus implemented with numpy's log1p and numpy's logaddexp. + static const T threshold = + Eigen::numext::log(Eigen::NumTraits::epsilon()) + T(2); + // Value above which exp(x) may overflow, but softplus(x) == x + // is within machine epsilon. + auto too_large = features > features.constant(-threshold); + // Value below which exp(x) may underflow, but softplus(x) == exp(x) + // is within machine epsilon. + auto too_small = features < features.constant(threshold); + auto features_exp = features.exp(); + activations.device(d) = too_large.select( + features, // softplus(x) ~= x for x large + too_small.select(features_exp, // softplus(x) ~= exp(x) for x small + features_exp.log1p())); + } +}; + +// Functor used by SoftplusGradOp to do the computations. +template +struct SoftplusGrad { + // Computes SoftplusGrad backprops. + // + // gradients: gradients backpropagated to the Softplus op. + // features: inputs that where passed to the Softplus op. + // backprops: gradients to backpropagate to the Softplus inputs. + void operator()(const Device& d, typename TTypes::ConstTensor gradients, + typename TTypes::ConstTensor features, + typename TTypes::Tensor backprops) { + backprops.device(d) = + gradients / ((-features).exp() + features.constant(T(1))); + } +}; + +} // namespace functor +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_SOFTPLUS_OP_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/softsign_op.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/softsign_op.h new file mode 100644 index 0000000000000000000000000000000000000000..15de7288680d6f37ddb8ff7f8b3f2ca299141040 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/softsign_op.h @@ -0,0 +1,60 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_KERNELS_SOFTSIGN_OP_H_ +#define TENSORFLOW_CORE_KERNELS_SOFTSIGN_OP_H_ +// Functor definition for SoftsignOp and SoftsignGradOp, must be compilable by +// nvcc. + +#include "unsupported/Eigen/CXX11/Tensor" // from @eigen_archive +#include "tensorflow/core/framework/tensor_types.h" + +namespace tensorflow { +namespace functor { + +// Functor used by SoftsignOp to do the computations. +template +struct Softsign { + // Computes Softsign activation. + // + // features: any shape. + // activations: same shape as "features". + void operator()(const Device& d, typename TTypes::ConstTensor features, + typename TTypes::Tensor activations) { + activations.device(d) = + features / (features.abs() + features.constant(T(1))); + } +}; + +// Functor used by SoftsignGradOp to do the computations. +template +struct SoftsignGrad { + // Computes SoftsignGrad backprops. + // + // gradients: gradients backpropagated to the Softsign op. + // features: inputs that were passed to the Softsign op. + // backprops: gradients to backpropagate to the Softsign inputs. + void operator()(const Device& d, typename TTypes::ConstTensor gradients, + typename TTypes::ConstTensor features, + typename TTypes::Tensor backprops) { + backprops.device(d) = + gradients / (features.abs() + features.constant(T(1))).square(); + } +}; + +} // namespace functor +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_SOFTSIGN_OP_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/spacetobatch_functor.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/spacetobatch_functor.h new file mode 100644 index 0000000000000000000000000000000000000000..4804703e25f018add3fe085e700b925a5ebb4f53 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/spacetobatch_functor.h @@ -0,0 +1,114 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_KERNELS_SPACETOBATCH_FUNCTOR_H_ +#define TENSORFLOW_CORE_KERNELS_SPACETOBATCH_FUNCTOR_H_ + +#include + +#include "unsupported/Eigen/CXX11/Tensor" // from @eigen_archive +#include "tensorflow/core/framework/bounds_check.h" +#include "tensorflow/core/framework/tensor.h" +#include "tensorflow/core/framework/tensor_types.h" +#include "tensorflow/core/platform/types.h" + +namespace tensorflow { + +// Maximum number of non-collapsible blocked dimensions supported by the +// {SpaceToBatch,BatchToSpace}ND operation. To change the limit, modify this +// constant and the TF_SPACETOBATCH_FOR_EACH_NUM_BLOCK_DIMS macro definition +// below. +constexpr int kMaxSpaceToBatchBlockDims = 4; + +// Expands to: +// MACRO(1, ## __VA_ARGS__) +// ... +// MACRO(kMaxSpaceToBatchBlockDims, ## __VA_ARGS__) +// +// Note: The space between the number and the comma is necessary for proper GCC +// comma handling: https://gcc.gnu.org/onlinedocs/cpp/Variadic-Macros.html +#define TF_SPACETOBATCH_FOR_EACH_NUM_BLOCK_DIMS(MACRO, ...) \ + MACRO(1 /**/, ##__VA_ARGS__) \ + MACRO(2 /**/, ##__VA_ARGS__) \ + MACRO(3 /**/, ##__VA_ARGS__) \ + MACRO(4 /**/, ##__VA_ARGS__) \ + /**/ + +namespace internal { +namespace spacetobatch { + +template +void SubtleMustCopyFlatHelper(const Tensor& t, OutputType* output) { + const int64_t num_elements = t.shape().num_elements(); + output->resize(num_elements); + auto eigen_vec = t.flat(); + for (int64_t i = 0; i < num_elements; ++i) { + (*output)[i] = SubtleMustCopy(eigen_vec(i)); + } +} + +// Copies flat contents of `t` to std::vector-like `*output`, which is resized +// as needed. `OutputType` may be either `std::vector` or +// `gtl::InlinedVector`. +// +// Precondition: t.dtype() must be either DT_INT32 or DT_INT64. +template +void SubtleMustCopyFlat(const Tensor& t, OutputType* output) { + if (t.dtype() == DT_INT32) { + SubtleMustCopyFlatHelper(t, output); + } else { + SubtleMustCopyFlatHelper(t, output); + } +} + +} // namespace spacetobatch +} // namespace internal + +namespace functor { + +// Functor used by {SpaceToBatch,BatchToSpace}{ND,}Op to do the conversion. +// +// If B2S is false, then this performs the space-to-batch conversion. If B2S is +// true, then this performs the inverse batch-to-space conversion. +template +struct SpaceToBatchFunctor { + using InputT = typename std::conditional::type; + using OutputT = typename std::conditional::type; + // Implements the space to batch conversion. + // + // space_tensor: input tensor of space-to-batch operation. If B2S = false, + // then this is the input to the conversion. If B2S = true, then this + // is the output of the conversion. + // block_size: array of shape [NUM_BLOCK_DIMS] specifying the block sizes for + // dimensions 1 through NUM_BLOCK_DIMS. + // paddings: row-major array of shape [NUM_BLOCK_DIMS, 2] specifying the + // start and end padding for dimensions 1 through NUM_BLOCK_DIMS. + // batch_tensor: output tensor of the space-to-batch operation. If + // B2S = false, then this is the output of the conversion. If B2S = true, + // then this is the input to the conversion. + // + // The caller must ensure that the dimensions of the tensors are correct. + Status operator()( + const Device& d, + typename TTypes::Tensor space_tensor, + const int64_t block_shape[NUM_BLOCK_DIMS], + const int64_t paddings[NUM_BLOCK_DIMS * 2], + typename TTypes::Tensor batch_tensor); +}; + +} // namespace functor +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_SPACETOBATCH_FUNCTOR_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/spacetodepth_op.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/spacetodepth_op.h new file mode 100644 index 0000000000000000000000000000000000000000..3cb1df5b0c731826f7a1f7b3055a1e008b8ea6e5 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/spacetodepth_op.h @@ -0,0 +1,57 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_KERNELS_SPACETODEPTH_OP_H_ +#define TENSORFLOW_CORE_KERNELS_SPACETODEPTH_OP_H_ +// Functor definition for XentOp, must be compilable by nvcc. + +#include "unsupported/Eigen/CXX11/Tensor" // from @eigen_archive +#include "tensorflow/core/framework/tensor_types.h" +#include "tensorflow/core/util/tensor_format.h" + +namespace tensorflow { +namespace functor { + +// Functor used by SpaceToDepthOp to do the computations. +// Implements a family of Space to Depth transforms for a 4D 'input' tensor +// to a 4D 'output' tensor, both tensors use type 'T' and layout 'data_format'. +// These transforms divide the vertical and horizontal image sizes by +// 'block_size', and multiply the depth dimension size by +// (block_size * block_size). The offset within each block_size * block_size +// patch within the image is combined with the input channel index to form +// the output channel index, with the Y, X coordinates within each block of +// the input image used as the high order component of the output channel. +// e.g. for data_format = NHWC: +// Each element in the input tensor can be specified via 6 coordinates, +// ordered by decreasing memory layout significance as: +// n,oY,bY,oX,bX,iC (where n=batch index, oX, oY means X or Y coordinates +// within the output image, bX, bY means coordinates +// within the input block, iC means input channels). +// The output would be a transpose to the following layout: +// n,oY,oX,bY,bX,iC +template +struct SpaceToDepthOpFunctor { + void operator()(const Device& d, typename TTypes::ConstTensor input, + int block_size, typename TTypes::Tensor output); + + // This 5-D version is to support NCHW_VECT_C. + void operator()(const Device& d, typename TTypes::ConstTensor input, + int block_size, typename TTypes::Tensor output); +}; + +} // namespace functor +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_SPACETODEPTH_OP_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/sparse/kernels.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/sparse/kernels.h new file mode 100644 index 0000000000000000000000000000000000000000..c609845cadf4fa27a59ffcf99eb592aea724c092 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/sparse/kernels.h @@ -0,0 +1,252 @@ +/* Copyright 2019 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_KERNELS_SPARSE_KERNELS_H_ +#define TENSORFLOW_CORE_KERNELS_SPARSE_KERNELS_H_ + +#include "unsupported/Eigen/CXX11/Tensor" // from @eigen_archive +#include "tensorflow/core/framework/op_kernel.h" +#include "tensorflow/core/framework/tensor_types.h" +#include "tensorflow/core/kernels/sparse/sparse_matrix.h" +#include "tensorflow/core/lib/core/status.h" +#include "tensorflow/core/platform/types.h" + +namespace tensorflow { + +namespace functor { + +// Calculates number of nonzero entries per batch of a sorted rank-3 +// SparseTensor's indices. indices is expected to have columns +// corresponding to [batch, row, column], where indices[:,0] < B. +// +// REQUIRES: +// indices.dimension(1) == 3 +// nnz_per_batch.dimension(0) == B +template +struct CalculateNNZPerBatchMatrixFromIndices { + Status operator()(OpKernelContext* c, TTypes::ConstMatrix indices, + TTypes::Vec nnz_per_batch); +}; + +// Split a subset of a SparseTensors' indices into two vectors: +// COO row inds and COO col inds. Outputs are: +// +// coo_row_ind = indices[:, row_dim] +// coo_col_ind = indices[:, row_dim + 1] +// +// where n = coo_row_ind.size() +// and row_dim = #cols(indices) - 1 +// +// REQUIRES: +// host_dense_shape.size() in [2, 3] +// indices.dim_size(1) == host_dense_shape.size() +// coo_row_ind.size() == coo_col_ind.size() +// coo_row_ind.size() == indices.dim_size(0) +template +struct SparseTensorToCOOSparseMatrix { + void operator()(const Device& d, TTypes::ConstVec host_dense_shape, + TTypes::ConstMatrix indices, + TTypes::Vec coo_row_ind, + TTypes::Vec coo_col_ind); +}; + +// Write coo batch, row, and column vectors to output matrix indices: +// +// indices[:, row_dim] = coo_row_ind +// indices[:, col_dim] = coo_col_ind +// +// where row_dim = #cols(indices) - 1 and n = coo_row_ind.size(). +// In addition, if #cols(indices) == 3, also store the batch: +// +// indices[i, 0] = batch_of(i) where +// host_batch_ptrs(batch_of(i)) <= i < host_batch_ptrs(batch_of(i) + 1) +// +// REQUIRES: +// +// host_dense_shape.size() in [2, 3] +// indices.dim_size(1) == host_dense_shape.size() +// host_batch_ptr.size() == +// coo_row_ind.size() == coo_col_ind.size() +// +template +struct COOSparseMatrixToSparseTensor { + Status operator()(OpKernelContext* c, + TTypes::ConstVec host_dense_shape, + TTypes::ConstVec host_batch_ptrs, + TTypes::Vec coo_row_ind, + TTypes::ConstVec coo_col_ind, + TTypes::Matrix indices); +}; + +// Convert a vector of coo row indices to csr row pointers. +// +// REQUIRES: +// +// csr_row_ptr.size() == rows + 1. +// max(coo_row_ptr) < rows. +// +template +struct COOSparseMatrixToCSRSparseMatrix { + Status operator()(OpKernelContext* c, const int rows, const int cols, + TTypes::UnalignedVec coo_row_ind, + TTypes::UnalignedVec csr_row_ptr); +}; + +// Convert a matrix of (batched) coo row and column indices to CSR SparseMatrix +// batch ptrs, csr row pointers and coo column indices. +// +// REQUIRES: +// batch_ptr.size() == batch_size + 1 +// csr_row_ptr.size() == batch_size * (num_rows + 1) +// csr_col_ind.size() == total_nnz +// batch_size == 1 if rank == 2 +// +// where +// total_nnz = indices.dim_size(0) +// rank = indices.dim_size(1) +// Also csr_row_ptr should be initially filled with zeros. +// +struct SparseTensorToCSRSparseMatrixCPUFunctor { + Status operator()(int64_t batch_size, int num_rows, int num_cols, + TTypes::ConstMatrix indices, + TTypes::Vec batch_ptr, + TTypes::Vec csr_row_ptr, + TTypes::Vec csr_col_ind); +}; + +// Convert a vector of csr row pointers to coo row indices. +// +// REQUIRES: +// +// coo_row_ptr.size() == nnz. +// csr_row_ptr[-1] == nnz. +// +template +struct CSRSparseMatrixToCOOSparseMatrix { + Status operator()(OpKernelContext* c, + TTypes::UnalignedConstVec csr_row_ptr, + TTypes::UnalignedVec coo_row_ind); +}; + +// Calculates C = matmul(A, B) or C = matmul(A, B)^T, where A is in CSR format +// and B and C are dense. +template +struct CSRSparseMatrixMatMul { + explicit CSRSparseMatrixMatMul(const bool transpose_output); + Status Compute(OpKernelContext* ctx, const ConstCSRComponent& a, + typename TTypes::ConstMatrix b, + typename TTypes::Matrix c); +}; + +// Calculates y = A * x, y = A^T * x, or y = A^H * x, where A is in CSR format +// and x and y are dense vectors. +template +class CSRSparseMatrixMatVec { + CSRSparseMatrixMatVec(bool transpose_a, bool adjoint_a); + Status Compute(OpKernelContext* ctx, const ConstCSRComponent& a, + const T* x, T* y); +}; + +// Calculates C = functor(A, B) where A and B are CSR and C is CSR +// with a different sparsity pattern. +template +struct CSRStructureModifyingFunctor { + virtual ~CSRStructureModifyingFunctor() {} + + virtual Status Initialize() = 0; + + virtual Status GetWorkspaceSize(const ConstCSRComponent& a, + const ConstCSRComponent& b, + size_t* bufferSize) = 0; + + virtual Status GetOutputStructure(const ConstCSRComponent& a, + const ConstCSRComponent& b, + TTypes::UnalignedVec c_row_ptr, + int* output_nnz, void* workspace) = 0; + + virtual Status Compute(const ConstCSRComponent& a, + const ConstCSRComponent& b, CSRComponent* c, + void* workspace) = 0; +}; + +// Calculates C = alpha * A + beta * B, where A and B are in CSR +// format, and alpha and beta are scalars on the host. +template +struct CSRSparseMatrixAdd : public CSRStructureModifyingFunctor { + explicit CSRSparseMatrixAdd(OpKernelContext* ctx, const T alpha, + const T beta); +}; + +// Calculates C = matmul(A, B), where A, B, and C are in CSR format. +template +struct CSRSparseSparseMatrixMatMul + : public CSRStructureModifyingFunctor { + explicit CSRSparseSparseMatrixMatMul(OpKernelContext* ctx, bool transpose_a, + bool transpose_b); +}; + +// Calculates Y = transpose(X) where X and Y are CSR format components. +template +struct CSRSparseMatrixTransposeComponent { + Status operator()(OpKernelContext* ctx, const ConstCSRComponent& x, + CSRComponent* y); +}; + +// Calculates Y = transpose(X) where X and Y are in CSR format. +template +struct CSRSparseMatrixTranspose { + Status operator()(OpKernelContext* ctx, bool conjugate, + const CSRSparseMatrix& input_matrix, + CSRSparseMatrix* output_matrix); +}; + +// Calculates Y = softmax(X) where X and Y are in CSR format; +// missing coefficients in X are treates as -inf (logits of 0 probability). +template +struct CSRSparseMatrixSoftmax { + Status operator()(OpKernelContext* ctx, const CSRSparseMatrix& logits, + typename TTypes::Vec softmax_values); +}; + +template +struct CSRSparseMatrixSoftmaxGrad { + Status operator()(OpKernelContext* ctx, const CSRSparseMatrix& softmax, + const CSRSparseMatrix& grad_softmax, + typename TTypes::Vec gradient_values); +}; + +template +class CSRSparseMatrixMulScalar { + public: + explicit CSRSparseMatrixMulScalar() {} + + Status Compute(OpKernelContext* ctx, const CSRSparseMatrix& a, + typename TTypes::ConstScalar b, CSRSparseMatrix* c); +}; + +template +class CSRSparseMatrixBatchMulVec { + public: + explicit CSRSparseMatrixBatchMulVec() {} + + Status Compute(OpKernelContext* ctx, const CSRSparseMatrix& a, + typename TTypes::ConstFlat b, CSRSparseMatrix* c); +}; + +} // namespace functor + +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_SPARSE_KERNELS_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/sparse/sparse_matrix.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/sparse/sparse_matrix.h new file mode 100644 index 0000000000000000000000000000000000000000..5601c6c7de219629f28adb5b79fbd6ccedd4c46e --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/sparse/sparse_matrix.h @@ -0,0 +1,656 @@ +/* Copyright 2019 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_KERNELS_SPARSE_SPARSE_MATRIX_H_ +#define TENSORFLOW_CORE_KERNELS_SPARSE_SPARSE_MATRIX_H_ + +#define EIGEN_USE_THREADS + +#if GOOGLE_CUDA || TENSORFLOW_USE_ROCM +#define EIGEN_USE_GPU +#endif + +#include "unsupported/Eigen/CXX11/Tensor" // from @eigen_archive +#include "tensorflow/core/framework/op_kernel.h" +#include "tensorflow/core/framework/tensor.h" +#include "tensorflow/core/framework/tensor_shape.h" +#include "tensorflow/core/framework/tensor_types.h" +#include "tensorflow/core/framework/variant.h" +#include "tensorflow/core/framework/variant_encode_decode.h" +#include "tensorflow/core/framework/variant_op_registry.h" +#include "tensorflow/core/platform/errors.h" + +namespace tensorflow { + +class CSRSparseMatrix { + // CreateCSRSparseMatrix is the main method used to construct a + // CSRSparseMatrix. The representations for both 2D and 3D + // (batched) CSR Sparse Matrices are the same: + // + // dtype: The datatype of the values. + // dense_shape: The dense shape of the matrix. + // * Host int64 vector, size 2 or 3. + // * Takes on values: (rows, cols) or (batch_size, rows, cols). + // batch_pointers: Batch offset pointers into col_indices and values. + // * Host int32 vector, size (batch_size + 1). + // * Takes on values: (0, nnz[0], nnz[0] + nnz[1], ..., total_nnz). + // row_pointers: Row offset pointers into col_indices and values. + // * Device int32 vector, size ((rows + 1) * batch_size). + // * Each block of size (rows + 1) takes on values: + // (0, num_rows{b}[0], num_rows{b}[0] + num_rows{b}[1], ..., nnz[b]). + // for b = 0 .. batch_size - 1. + // col_indices: Column values for the given row and column index. + // * Device int32 vector, size total_nnz. + // values: Actual values for the given row and column index. + // * Device dtype vector, size total_nnz. + // + // The storage agreement is such that for a given (batch, row, ix): + // offset = batch_pointers(batch) + row_pointers(batch * (rows + 1) + row) + // col = col_indices(offset + ix) + // val = values(offset + ix) + // where ix < #nnz columns in (batch, row). + // Then: + // matrix(batch, row, col) = val. + // + // All other elements in the dense representation are treated as 0 / empty. + // + // For example, for a 2D sparse matrix m shaped (3, 4) such that: + // + // m[0, 0] = 1.0 + // m[0, 1] = 2.0 + // m[0, 2] = 3.0 + // m[2, 2] = 4.0 + // m[2, 3] = 5.0 + // + // The corresponding representation is: + // + // dtype: DT_FLOAT + // dense_shape: (3, 4) + // batch_pointers: (0, 5) + // row_pointers: (0, 3, 3, 5) + // col_indices: concat((0, 1, 2), (), (2, 3)) + // values: concat((1.0, 2.0, 3.0), (), (4.0, 5.0)) + // + // For a 3D sparse matrix m shaped (2, 3, 4) such that: + // + // m[0, 0, 0] = 1.0 + // m[0, 0, 2] = 2.0 + // m[0, 2, 3] = 3.0 + // m[1, 0, 3] = 4.0 + // m[1, 1, 0] = 5.0 + // + // The corresponding representation is: + // dtype: DT_FLOAT + // dense_shape: (2, 3, 4) + // batch_pointers: (0, 3, 5) + // row_pointers: concat((0, 2, 2, 3), (0, 1, 2, 2)) + // col_indices: concat(concat((0, 2), (), (3,)), + // concat((3,), (), (0,))) + // values: concat(concat((1.0, 2.0), (3.0,), ()), + /// concat((4.0,), (5.0,), ())) + // + public: + static constexpr const char kTypeName[] = "tensorflow::CSRSparseMatrix"; + + CSRSparseMatrix() : metadata_{false, DT_INVALID} {} + + CSRSparseMatrix(const CSRSparseMatrix& rhs) + : metadata_(rhs.metadata_), + dense_shape_(rhs.dense_shape_), + batch_pointers_(rhs.batch_pointers_), + row_pointers_(rhs.row_pointers_), + col_indices_(rhs.col_indices_), + values_(rhs.values_) { + SetupVecs(); + } + + CSRSparseMatrix(CSRSparseMatrix&& rhs) + : metadata_(rhs.metadata_), + dense_shape_(std::move(rhs.dense_shape_)), + batch_pointers_(std::move(rhs.batch_pointers_)), + row_pointers_(std::move(rhs.row_pointers_)), + col_indices_(std::move(rhs.col_indices_)), + values_(std::move(rhs.values_)) { + SetupVecs(); + rhs.metadata_.validated = false; + rhs.metadata_.dtype = DT_INVALID; + rhs.ClearVecs(); + } + + CSRSparseMatrix& operator=(CSRSparseMatrix&& rhs) { + if (this == &rhs) return *this; + metadata_ = rhs.metadata_; + metadata_.validated = rhs.metadata_.validated; + dense_shape_ = std::move(rhs.dense_shape_); + batch_pointers_ = std::move(rhs.batch_pointers_); + row_pointers_ = std::move(rhs.row_pointers_); + col_indices_ = std::move(rhs.col_indices_); + values_ = std::move(rhs.values_); + SetupVecs(); + rhs.metadata_ = {false, DT_INVALID}; + rhs.ClearVecs(); + return *this; + } + + static Status CreateCSRSparseMatrix(DataType dtype, + const Tensor& dense_shape, // on host + const Tensor& batch_pointers, // on host + const Tensor& row_pointers, + const Tensor& col_indices, + const Tensor& values, + CSRSparseMatrix* matrix) { + *matrix = CSRSparseMatrix(dtype, dense_shape, batch_pointers, row_pointers, + col_indices, values); + Status s = matrix->Validate(); + matrix->metadata_.validated = s.ok(); + matrix->SetupVecs(); + return s; + } + + Status Validate() const { + return ValidateTypesAndShapes(metadata_.dtype, dense_shape_, + batch_pointers_, row_pointers_, col_indices_, + values_); + } + + void Clear() { + metadata_ = {false, DT_INVALID}; + dense_shape_ = Tensor(); + batch_pointers_ = Tensor(); + row_pointers_ = Tensor(); + col_indices_ = Tensor(); + values_ = Tensor(); + ClearVecs(); + } + + bool valid() const { + return metadata_.validated && dense_shape_.IsInitialized() && + batch_pointers_.IsInitialized() && row_pointers_.IsInitialized() && + col_indices_.IsInitialized() && values_.IsInitialized() && + dense_shape_.NumElements() > 1 && + batch_pointers_.NumElements() > 0 && row_pointers_.NumElements() > 0; + } + + DataType dtype() const { + DCHECK(valid()); + return metadata_.dtype; + } + + inline int dims() const { + DCHECK(valid()); + return dense_shape_.NumElements(); + } + + inline int nnz(int batch) const { + DCHECK_LT(batch, batch_size()); + return (*batch_pointers_vec_)(batch + 1) - (*batch_pointers_vec_)(batch); + } + + inline int batch_offset(int batch) const { + DCHECK_LT(batch, batch_size()); + return (*batch_pointers_vec_)(batch); + } + + inline int total_nnz() const { + DCHECK(valid()); + return (*batch_pointers_vec_)(batch_size()); + } + + inline Tensor& dense_shape() { + DCHECK(valid()); + return dense_shape_; + } + + inline const Tensor& dense_shape() const { + DCHECK(valid()); + return dense_shape_; + } + + inline TTypes::UnalignedVec row_pointers_vec(int batch) { + DCHECK(valid()); + DCHECK_LT(batch, batch_size()); + const int64_t rows = dense_shape().vec()((dims() == 2) ? 0 : 1); + const int offset = batch * (rows + 1); + return TTypes::UnalignedVec(row_pointers_vec_->data() + offset, + rows + 1); + } + + inline TTypes::UnalignedConstVec row_pointers_vec(int batch) const { + DCHECK(valid()); + DCHECK_LT(batch, batch_size()); + const int64_t rows = dense_shape().vec()((dims() == 2) ? 0 : 1); + const int offset = batch * (rows + 1); + return TTypes::UnalignedConstVec(row_pointers_vec_->data() + offset, + rows + 1); + } + + inline TTypes::UnalignedVec col_indices_vec(int batch) { + DCHECK(valid()); + DCHECK_LT(batch, batch_size()); + const int offset = (*batch_pointers_vec_)(batch); + const int nnz_in_batch = nnz(batch); + return TTypes::UnalignedVec(col_indices_vec_->data() + offset, + nnz_in_batch); + } + + inline TTypes::UnalignedConstVec col_indices_vec(int batch) const { + DCHECK(valid()); + DCHECK_LT(batch, batch_size()); + const int offset = (*batch_pointers_vec_)(batch); + const int nnz_in_batch = nnz(batch); + return TTypes::UnalignedConstVec(col_indices_vec_->data() + offset, + nnz_in_batch); + } + + template + inline typename TTypes::UnalignedVec values_vec(int batch) { + DCHECK(valid()); + DCHECK_LT(batch, batch_size()); + const int offset = (*batch_pointers_vec_)(batch); + const int nnz_in_batch = nnz(batch); + return typename TTypes::UnalignedVec(values().vec().data() + offset, + nnz_in_batch); + } + + template + inline typename TTypes::UnalignedConstVec values_vec(int batch) const { + DCHECK(valid()); + DCHECK_LT(batch, batch_size()); + const int offset = (*batch_pointers_vec_)(batch); + const int nnz_in_batch = nnz(batch); + return typename TTypes::UnalignedConstVec( + values().vec().data() + offset, nnz_in_batch); + } + + inline Tensor& row_pointers() { + DCHECK(valid()); + return row_pointers_; + } + + inline const Tensor& row_pointers() const { + DCHECK(valid()); + return row_pointers_; + } + + inline Tensor& col_indices() { + DCHECK(valid()); + return col_indices_; + } + + inline const Tensor& col_indices() const { + DCHECK(valid()); + return col_indices_; + } + + inline Tensor& values() { + DCHECK(valid()); + return values_; + } + + inline const Tensor& values() const { + DCHECK(valid()); + return values_; + } + + inline Tensor& batch_pointers() { + DCHECK(valid()); + return batch_pointers_; + } + + inline const Tensor& batch_pointers() const { + DCHECK(valid()); + return batch_pointers_; + } + + std::string TypeName() const { return kTypeName; } + + // TODO(ebrevdo): A better debug string. + std::string DebugString() const { return dense_shape_.DebugString(); } + + // Returns the number of elements. This is equal to 1 if the + // CSRSparseMatrix is a singleton matrix (dense_shape is length 2). + int batch_size() const { + DCHECK(valid()); + return batch_pointers_.NumElements() - 1; + } + + bool Decode(const VariantTensorData& p) { + if (p.tensors_.empty()) return false; + Metadata metadata; + if (!p.get_metadata(&metadata)) return false; + const bool validated = metadata.validated; + const DataType dtype = metadata.dtype; + + // p.tensors_ should contain tensors {dense_shape, batch_pointers, + // row_pointers, col_indices, values}. + if (p.tensors_.size() != 5) return false; + + Tensor dense_shape = p.tensors_[0]; + if (dense_shape.dtype() != DT_INT64) return false; + if (dense_shape.dims() != 1) return false; + int rank = dense_shape.dim_size(0); + if (rank < 2 || rank > 3) return false; + + Tensor batch_pointers(p.tensors_[1]); + Tensor row_pointers(p.tensors_[2]); + Tensor col_indices(p.tensors_[3]); + Tensor values(p.tensors_[4]); + + // Check that the validated bool is consistent with the data. + Status s = ValidateTypesAndShapes(dtype, dense_shape, batch_pointers, + row_pointers, col_indices, values); + if (s.ok() != validated) return false; + + // Save to this object. + metadata_ = metadata; + dense_shape_ = std::move(dense_shape); + batch_pointers_ = std::move(batch_pointers); + row_pointers_ = std::move(row_pointers); + col_indices_ = std::move(col_indices); + values_ = std::move(values); + SetupVecs(); + return true; + } + + void Encode(VariantTensorData* p) const { + DCHECK(valid()); + + // Store metadata_ to p's metadata + p->set_metadata(metadata_); + + // Store dense_shape, row_pointers, col_indices, and values to p->tensors_. + p->tensors_.reserve(5); + p->tensors_.push_back(dense_shape_); + p->tensors_.push_back(batch_pointers_); + p->tensors_.push_back(row_pointers_); + p->tensors_.push_back(col_indices_); + p->tensors_.push_back(values_); + } + + // This static method copies CSRSparseMatrices in all directions: + // Host->Device, Device->Host, and Device->Device. + static Status DeviceCopy( + const CSRSparseMatrix& from, CSRSparseMatrix* to, + const UnaryVariantOpRegistry::AsyncTensorDeviceCopyFn& copy) { + VLOG(2) << "DeviceCopy from type: " << DataTypeString(from.dtype()) + << " and shape: " << from.dense_shape().DebugString(); + Tensor to_row_ptr(DT_INT32); + Tensor to_col_ind(DT_INT32); + Tensor to_values(from.dtype()); + TF_RETURN_IF_ERROR(copy(from.row_pointers(), &to_row_ptr)); + TF_RETURN_IF_ERROR(copy(from.col_indices(), &to_col_ind)); + TF_RETURN_IF_ERROR(copy(from.values(), &to_values)); + return CreateCSRSparseMatrix(from.dtype(), + from.dense_shape(), // Always on host. + from.batch_pointers(), // Always on host. + to_row_ptr, to_col_ind, to_values, to); + } + + private: + CSRSparseMatrix(DataType dtype, const Tensor& dense_shape, + const Tensor& batch_pointers, const Tensor& row_pointers, + const Tensor& col_indices, const Tensor& values) + : metadata_{false, dtype}, + dense_shape_(dense_shape), + batch_pointers_(batch_pointers), + row_pointers_(row_pointers), + col_indices_(col_indices), + values_(values) {} + + void SetupVecs() { + if (!metadata_.validated) return; + batch_pointers_vec_.reset( + new TTypes::Vec(batch_pointers_.vec())); + row_pointers_vec_.reset(new TTypes::Vec(row_pointers_.vec())); + col_indices_vec_.reset(new TTypes::Vec(col_indices_.vec())); + } + + void ClearVecs() { + batch_pointers_vec_.reset(); + row_pointers_vec_.reset(); + col_indices_vec_.reset(); + } + + static Status ValidateTypesAndShapes(DataType dtype, + const Tensor& dense_shape, + const Tensor& batch_pointers, + const Tensor& row_pointers, + const Tensor& col_indices, + const Tensor& values) { + // TODO(ebrevdo): Consider adding support for other floating point types + // (namely, float16). + if (dtype != DT_FLOAT && dtype != DT_DOUBLE && dtype != DT_COMPLEX64 && + dtype != DT_COMPLEX128) { + return errors::InvalidArgument( + "CSRSparseMatrix::Validate: dtype = ", DataTypeString(dtype), + " not in {float32, float64, complex64, complex128}"); + } + // dense_shape checks + if (dense_shape.dtype() != DT_INT64) { + return errors::InvalidArgument( + "CSRSparseMatrix::Validate: dense_shape.dtype() = ", + DataTypeString(dense_shape.dtype()), " != int64"); + } + if (dense_shape.dims() != 1) { + return errors::InvalidArgument( + "CSRSparseMatrix::Validate: dense_shape should be a vector, but saw " + "tensor: ", + dense_shape.DebugString()); + } + int rank = dense_shape.dim_size(0); + if (rank < 2 || rank > 3) { + return errors::InvalidArgument( + "CSRSparseMatrix::Validate: dense_shape should be a 2- or 3- vector, " + "but saw: ", + dense_shape.SummarizeValue(5)); + } + auto dense_shape_t = dense_shape.vec(); + const int64_t batch_size = (rank == 2) ? 1 : dense_shape_t(0); + const int64_t num_rows = (rank == 2) ? dense_shape_t(0) : dense_shape_t(1); + + if (batch_pointers.dtype() != DT_INT32) { + return errors::InvalidArgument( + "CSRSparseMatrix::Validate: batch_pointers.dtype() = ", + DataTypeString(batch_pointers.dtype()), " != int32"); + } + if (batch_pointers.dims() != 1) { + return errors::InvalidArgument( + "CSRSparseMatrix::Validate: batch_indices is not a vector, saw " + "shape: ", + batch_pointers.shape().DebugString()); + } + + // batch size checks + if (batch_size != batch_pointers.NumElements() - 1) { + return errors::InvalidArgument( + "CSRSparseMatrix::Validate: dense_shape is ", + dense_shape.SummarizeValue(5), + " but batch pointers implies batch size is ", + batch_pointers.NumElements() - 1); + } + + if (row_pointers.dtype() != DT_INT32) { + return errors::InvalidArgument( + "CSRSparseMatrix::Validate: row_pointers.dtype() = ", + DataTypeString(row_pointers.dtype()), " != int32"); + } + if (row_pointers.dims() != 1) { + return errors::InvalidArgument( + "CSRSparseMatrix::Validate: row_pointers is not a vector, saw " + "shape: ", + row_pointers.shape().DebugString()); + } + if (row_pointers.dim_size(0) != batch_size * (num_rows + 1)) { + return errors::InvalidArgument( + "CSRSparseMatrix::Validate: row_pointers should have size batch_size " + "* (num_rows + 1), saw shapes: ", + dense_shape.DebugString(), " vs. ", + row_pointers.shape().DebugString()); + } + if (col_indices.dtype() != DT_INT32) { + return errors::InvalidArgument( + "CSRSparseMatrix::Validate: col_indices.dtype() = ", + DataTypeString(col_indices.dtype()), " != int32"); + } + if (col_indices.dims() != 1) { + return errors::InvalidArgument( + "CSRSparseMatrix::Validate: col_indices is not a vector, saw shape: ", + col_indices.shape().DebugString()); + } + if (values.dtype() != dtype) { + return errors::InvalidArgument( + "CSRSparseMatrix::Validate: values.dtype() = ", + DataTypeString(values.dtype()), + " != dtype = ", DataTypeString(dtype)); + } + if (values.dims() != 1) { + return errors::InvalidArgument( + "CSRSparseMatrix::Validate: values is not a vector, saw shape: ", + values.shape().DebugString()); + } + if (col_indices.dim_size(0) != values.dim_size(0)) { + return errors::InvalidArgument( + "CSRSparseMatrix::Validate: size(col_indices) = ", + col_indices.dim_size(0), " != size(values) = ", values.dim_size(0)); + } + return OkStatus(); + } + + struct Metadata { + bool validated; + DataType dtype; + }; + Metadata metadata_; + Tensor dense_shape_; + Tensor batch_pointers_; + Tensor row_pointers_; + Tensor col_indices_; + Tensor values_; + std::unique_ptr::Vec> batch_pointers_vec_; + std::unique_ptr::Vec> row_pointers_vec_; + std::unique_ptr::Vec> col_indices_vec_; +}; + +// Call BinaryFunctor()(ctx, a, b, c) +// where T depends on a.dtype(). T will be one of: float, double, +// complex64, complex128. +template class BinaryFunctor> +Status CSRSparseMatrixBinaryHelper(OpKernelContext* ctx, + const CSRSparseMatrix& a, + const CSRSparseMatrix& b, + CSRSparseMatrix* c) { + DataType dt = a.dtype(); + if (dt != b.dtype()) { + return errors::InvalidArgument( + "CSRSparseMatrixBinaryHelper: Inconsistent dtypes for input matrices, " + "a " + "dtype: ", + DataTypeString(dt), ", b dtype: ", DataTypeString(b.dtype())); + } + switch (dt) { + case DT_FLOAT: { + BinaryFunctor functor(ctx); + return functor(a, b, c); + } + case DT_DOUBLE: { + BinaryFunctor functor(ctx); + return functor(a, b, c); + } + case DT_COMPLEX64: { + BinaryFunctor functor(ctx); + return functor(a, b, c); + } + case DT_COMPLEX128: { + BinaryFunctor functor(ctx); + return functor(a, b, c); + } + default: + return errors::InvalidArgument( + "CSRSparseMatrixBinaryHelper: a.dtype (", DataTypeString(dt), + ") is not one of: float, double, complex64, complex128"); + } +} + +// Call UnaryFunctor()(ctx, a, b) +// where T depends on a.dtype(). T will be one of: float, double, +// complex64, complex128. +template class UnaryFunctor> +Status CSRSparseMatrixUnaryHelper(OpKernelContext* ctx, + const CSRSparseMatrix& a, + CSRSparseMatrix* b) { + DataType dt = a.dtype(); + switch (dt) { + case DT_FLOAT: { + UnaryFunctor functor(ctx); + return functor(a, b); + } + case DT_DOUBLE: { + UnaryFunctor functor(ctx); + return functor(a, b); + } + case DT_COMPLEX64: { + UnaryFunctor functor(ctx); + return functor(a, b); + } + case DT_COMPLEX128: { + UnaryFunctor functor(ctx); + return functor(a, b); + } + default: + return errors::InvalidArgument( + "CSRSparseMatrixUnaryHelper: a.dtype (", DataTypeString(dt), + ") is not one of: float, double, complex64, complex128"); + } +} + +template +struct ConstCSRComponent { + TTypes::UnalignedConstVec row_ptr; + TTypes::UnalignedConstVec col_ind; + typename TTypes::UnalignedConstVec values; + TTypes::ConstVec dense_shape_host; +}; + +template +struct CSRComponent { + TTypes::UnalignedVec row_ptr; + TTypes::UnalignedVec col_ind; + typename TTypes::UnalignedVec values; + TTypes::Vec dense_shape_host; +}; + +template +Status ExtractVariantFromInput(OpKernelContext* ctx, int index, + const T** value) { + const Tensor& input_t = ctx->input(index); + if (!TensorShapeUtils::IsScalar(input_t.shape())) { + return errors::InvalidArgument( + "Invalid input matrix: Shape must be rank 0 but is rank ", + input_t.dims()); + } + const Variant& input_variant = input_t.scalar()(); + *value = input_variant.get(); + if (*value == nullptr) { + return errors::InvalidArgument("Could not retrieve Variant input ", index); + } + if (!(*value)->valid()) { + return errors::InvalidArgument("Variant input ", index, " is not valid."); + } + return OkStatus(); +} + +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_SPARSE_SPARSE_MATRIX_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/sparse/transpose_op.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/sparse/transpose_op.h new file mode 100644 index 0000000000000000000000000000000000000000..2a8f067121dc737bad98ee9165055f0aa455458d --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/sparse/transpose_op.h @@ -0,0 +1,73 @@ +/* Copyright 2019 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_KERNELS_SPARSE_TRANSPOSE_OP_H_ +#define TENSORFLOW_CORE_KERNELS_SPARSE_TRANSPOSE_OP_H_ + +#include "tensorflow/core/framework/tensor.h" +#include "tensorflow/core/framework/tensor_types.h" +#include "tensorflow/core/kernels/cwise_ops.h" + +namespace tensorflow { +namespace functor { + +template +struct maybe_conj_inplace { + static void run(const Device& d, Tensor* t) {} +}; + +template +struct maybe_conj_inplace { + static void run(const Device& d, Tensor* t) { + functor::UnaryFunctor> conj; + conj(d, t->flat() /*out*/, + const_cast(t)->flat() /*in*/); + } +}; + +template +struct maybe_conj_inplace { + static void run(const Device& d, Tensor* t) { + functor::UnaryFunctor> conj; + conj(d, t->flat() /*out*/, + const_cast(t)->flat() /*in*/); + } +}; + +template +struct maybe_conj { + static void run(const Device& d, const Tensor& in, Tensor* out) { *out = in; } +}; + +template +struct maybe_conj { + static void run(const Device& d, const Tensor& in, Tensor* out) { + functor::UnaryFunctor> conj; + conj(d, out->flat() /*out*/, in.flat() /*in*/); + } +}; + +template +struct maybe_conj { + static void run(const Device& d, const Tensor& in, Tensor* out) { + functor::UnaryFunctor> conj; + conj(d, out->flat() /*out*/, in.flat() /*in*/); + } +}; + +} // namespace functor +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_SPARSE_TRANSPOSE_OP_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/sparse/zeros_op.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/sparse/zeros_op.h new file mode 100644 index 0000000000000000000000000000000000000000..a6d03974a78ae41461d1cf3b5eb9e9ba24ebc299 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/sparse/zeros_op.h @@ -0,0 +1,84 @@ +/* Copyright 2019 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_KERNELS_SPARSE_ZEROS_OP_H_ +#define TENSORFLOW_CORE_KERNELS_SPARSE_ZEROS_OP_H_ + +#define EIGEN_USE_THREADS + +#if GOOGLE_CUDA || TENSORFLOW_USE_ROCM +#define EIGEN_USE_GPU +#endif + +#include "unsupported/Eigen/CXX11/Tensor" // from @eigen_archive +#include "tensorflow/core/framework/op.h" +#include "tensorflow/core/framework/op_kernel.h" +#include "tensorflow/core/framework/tensor_types.h" +#include "tensorflow/core/framework/variant_op_registry.h" +#include "tensorflow/core/kernels/dense_update_functor.h" +#include "tensorflow/core/kernels/fill_functor.h" +#include "tensorflow/core/kernels/sparse/sparse_matrix.h" + +namespace tensorflow { + +typedef Eigen::ThreadPoolDevice CPUDevice; +typedef Eigen::GpuDevice GPUDevice; + +namespace functor { + +template +struct CSRSparseMatrixZeros { + Status operator()(OpKernelContext* c, DataType dtype, + const Tensor& dense_shape_t, CSRSparseMatrix* matrix) { + auto dense_shape = dense_shape_t.vec(); + const int rank = dense_shape.size(); + if (!(rank == 2 || rank == 3)) { + return errors::InvalidArgument("sparse tensor must have rank == 2 or 3; ", + "but dense shape has ", rank, " entries"); + } + const int64_t batch_size = (rank == 2) ? 1 : dense_shape(0); + const int64_t rows = dense_shape((rank == 2) ? 0 : 1); + + Tensor batch_ptr_t(cpu_allocator(), DT_INT32, + TensorShape({batch_size + 1})); + batch_ptr_t.vec().setZero(); // On host. + + Allocator* allocator = c->device()->GetAllocator(AllocatorAttributes()); + // An all-zeros CSR matrix is composed of an empty set of column + // indices, an empty set of values, and a vector of all zero row + // pointers. The length of the row pointers vector is #rows + 1. + // Each row pointer is just an offset into the cols and + // values vectors, and those are empty, all coefficients are zero. + Tensor csr_row_ptr_t; + Tensor coo_col_ind_t(allocator, DT_INT32, TensorShape({0})); + Tensor csr_values_t(allocator, dtype, TensorShape({0})); + const Device& d = c->eigen_device(); + functor::SetZeroFunctor set_zero; + TF_RETURN_IF_ERROR(c->allocate_temp( + DT_INT32, TensorShape({batch_size * (rows + 1)}), &csr_row_ptr_t)); + set_zero(d, csr_row_ptr_t.flat()); + + TF_RETURN_IF_ERROR(CSRSparseMatrix::CreateCSRSparseMatrix( + dtype, dense_shape_t, batch_ptr_t, csr_row_ptr_t, coo_col_ind_t, + csr_values_t, matrix)); + + return OkStatus(); + } +}; + +} // namespace functor +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_SPARSE_ZEROS_OP_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/sparse_concat_op.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/sparse_concat_op.h new file mode 100644 index 0000000000000000000000000000000000000000..c13ae5021e0b15df753140838168048cc6824a4e --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/sparse_concat_op.h @@ -0,0 +1,36 @@ +/* Copyright 2021 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_KERNELS_SPARSE_CONCAT_OP_H_ +#define TENSORFLOW_CORE_KERNELS_SPARSE_CONCAT_OP_H_ + +#include "tensorflow/core/framework/op_kernel.h" + +namespace tensorflow { + +namespace functor { + +template +struct SparseConcatFunctor { + void operator()(OpKernelContext* context, const OpInputList& inds, + const OpInputList& vals, const OpInputList& shapes, + int concat_dim); +}; + +} // namespace functor + +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_SPARSE_CONCAT_OP_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/sparse_conditional_accumulator.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/sparse_conditional_accumulator.h new file mode 100644 index 0000000000000000000000000000000000000000..3b809f03e95dc2064e84a3545e8eab06069db5e1 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/sparse_conditional_accumulator.h @@ -0,0 +1,438 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_KERNELS_SPARSE_CONDITIONAL_ACCUMULATOR_H_ +#define TENSORFLOW_CORE_KERNELS_SPARSE_CONDITIONAL_ACCUMULATOR_H_ + +#include "tensorflow/core/kernels/typed_conditional_accumulator_base.h" + +namespace tensorflow { + +/** + * An aggregation object for adding sparse gradients, represented as a tuple of + * indices, values, and a (possibly empty) shape. + * + * The two main methods of this class are TryApplyGrad and TryTakeGrad. + * + * TryApplyGrad tries add a gradient to the accumulator. The attempt is + * successful if local_step >= global_step, i.e., if the gradient is not stale, + * having been computed using up-to-date information. Otherwise, the gradient is + * silently dropped. + * + * TryTakeGrad logs an attempt to read the average gradient. The attempt is + * blocked until the number of gradients accumulated (via TryApplyGrad) is equal + * or exceeds the number requested by TryTakeGrad. + * Once this condition is satisfied, the following actions are taken: + * (1) the value of the average gradient is returned + * (2) the count of accumulated gradients is reset to 0 + * (3) the internal global_step value (current_global_step_) is incremented by 1 + * + * SparseConditionalAccumulator is the datatype-dependent templated sub-class of + * ConditionalAccumulatorBase. It implements the virtual arithmetic methods that + * are used by for aggregating, averaging, allocating, returning indexed slices. + */ +template +class SparseConditionalAccumulator + : public TypedConditionalAccumulatorBase< + std::tuple> { + public: + SparseConditionalAccumulator(const DataType& dtype, + const PartialTensorShape& shape, + const string& name, const string& reduction_type) + : TypedConditionalAccumulatorBase< + std::tuple>( + dtype, shape, name, reduction_type), + accum_val_(std::make_unique()) {} + + protected: + std::unique_ptr> accum_idx_vec_; + std::unique_ptr> count_element_; + + std::unique_ptr accum_val_; + + typedef Eigen::TensorMap, + Eigen::Unaligned> + SliceT; + typedef Eigen::TensorMap, + Eigen::Unaligned> + SliceConstT; + + Status ValidateShape( + std::tuple* tensor, + bool has_known_shape) TF_EXCLUSIVE_LOCKS_REQUIRED(this->mu_) { + const Tensor* tensor_idx = std::get<0>(*tensor); + const Tensor* tensor_val = std::get<1>(*tensor); + const Tensor* tensor_shape = std::get<2>(*tensor); + int64_t grad_val_dims = tensor_val->dims(); + int64_t grad_dims = grad_val_dims; + + // Compare with provided shape + if (has_known_shape) { + if (shape_.dims() > tensor_shape->NumElements()) { + return errors::InvalidArgument( + "Shape mismatch: expected shape rank at least ", shape_.dims(), + ", got ", tensor_shape->NumElements()); + } + const auto tensor_shape_flat = tensor_shape->flat(); + for (int64_t i = 0; i < shape_.dims(); i++) { + if (shape_.dim_size(i) != -1 && + shape_.dim_size(i) != tensor_shape_flat(i)) { + return errors::InvalidArgument("Shape mismatch: expected shape dim ", + i, " to be ", shape_.dim_size(i), + ", got ", tensor_shape_flat(i)); + } + } + } + // Check that indices are within limits + if (shape_.dims() > 0 && shape_.dim_size(0) != -1 && + tensor_idx->dims() > 0) { + for (int64_t i = 0; i < tensor_idx->dim_size(0); i++) { + if (tensor_idx->vec()(i) >= shape_.dim_size(0)) { + return errors::InvalidArgument( + "Shape mismatch: index of slice ", i, " exceeded limits of shape", + "; index is ", tensor_idx->vec()(i), " exceeded ", + shape_.dim_size(0)); + } + } + } + + // Check values compatibility with accumulated gradient if available + if (counter_ > 0) { + int64_t accum_val_dims = accum_val_->dims(); + if (accum_val_dims != grad_val_dims) { + return errors::InvalidArgument("Shape mismatch: expected values rank ", + accum_val_dims, ", got ", grad_val_dims); + } + for (int64_t i = 1; i < accum_val_dims; i++) { + if (accum_val_->dim_size(i) != tensor_val->dim_size(i)) { + return errors::InvalidArgument("Shape mismatch: expected values dim ", + i, " to be ", accum_val_->dim_size(i), + ", got ", tensor_val->dim_size(i)); + } + } + } else { + // If there are no accumulated gradients, check against shape_ + if (shape_.dims() > grad_dims) { + return errors::InvalidArgument( + "Shape mismatch: expected values rank at least ", shape_.dims(), + ", got ", grad_dims); + } + // Check that values have correct dimensions + for (int64_t i = 1; i < shape_.dims(); i++) { + if (shape_.dim_size(i) != -1 && + shape_.dim_size(i) != tensor_val->dim_size(i)) { + return errors::InvalidArgument("Shape mismatch: expected values dim ", + i, " to be ", shape_.dim_size(i), + ", got ", tensor_val->dim_size(i)); + } + } + } + + return OkStatus(); + } + + void AllocateAndAssignToAccumGradFunction( + OpKernelContext* ctx, + std::tuple* grad) override { + const Tensor* grad_idx = std::get<0>(*grad); + const Tensor* grad_val = std::get<1>(*grad); + + const int64_t nnz = grad_idx->dim_size(0); + + // Assign indices + accum_idx_vec_ = std::make_unique>(); + accum_idx_vec_->reserve(nnz); + for (int i = 0; i < nnz; i++) { + accum_idx_vec_->push_back(grad_idx->vec()(i)); + } + + // Assign values to accum_val_tensor + OP_REQUIRES_OK( + ctx, ctx->allocate_temp(dtype_, grad_val->shape(), accum_val_.get())); + accum_val_->flat().device(ctx->template eigen_device()) = + grad_val->flat(); + + // Assign count_element_ + count_element_ = std::make_unique>(nnz, 1); + + // Do not need shape; Assume that the op has checked that the shapes match, + // so grad's shape == shape_ + } + + void AddToAccumGradFunction( + OpKernelContext* ctx, + std::tuple* grad) override { + // Modeled after third_party/tensorflow/core/kernels/sparse_add_op + + const Tensor* grad_idx = std::get<0>(*grad); + const Tensor* grad_val = std::get<1>(*grad); + + const int64_t accum_nnz = accum_idx_vec_->size(); + const int64_t grad_nnz = grad_idx->dim_size(0); + + // Source enumerates the origin of a non-zero element: whether it is from + // the new gradient, the accumulated gradient, or the sum of both. + enum Source { from_accum, from_grad, from_accum_and_grad }; + + // (1) do a pass over inputs, and append values and indices to vectors + std::vector> entries_to_copy; + entries_to_copy.reserve(accum_nnz + grad_nnz); + + // Pass over all non-zero elements of both the gradient and the accumulated + // value, to identify where each non-zero element of the sum comes from. + // The input and output indexed slices are assumed to be ordered along + // increasing dimension number. + int64_t i = 0, j = 0; + int64_t sum_nnz = 0; + while (i < accum_nnz && j < grad_nnz) { + sum_nnz++; + switch (cmp(accum_idx_vec_.get(), grad_idx, i, j)) { + case -1: + entries_to_copy.emplace_back(from_accum, i, -1); + ++i; + break; + case 0: + entries_to_copy.emplace_back(from_accum_and_grad, i, j); + ++i; + ++j; + break; + case 1: + entries_to_copy.emplace_back(from_grad, -1, j); + ++j; + break; + } + } + + // Handle leftovers + while (i < accum_nnz) { + sum_nnz++; + entries_to_copy.emplace_back(from_accum, i, -1); + ++i; + } + while (j < grad_nnz) { + sum_nnz++; + entries_to_copy.emplace_back(from_grad, -1, j); + ++j; + } + + // (2) Copy or sum the non-zero elements into sum_indices and sum_tensor + std::vector* sum_indices_vec = new std::vector(); + sum_indices_vec->reserve(sum_nnz); + + std::vector* sum_counts = new std::vector(); + sum_counts->reserve(sum_nnz); + + Tensor* sum_tensor = new Tensor(); + + TensorShape sum_shape = grad_val->shape(); + sum_shape.set_dim(0, sum_nnz); + + OP_REQUIRES_OK(ctx, ctx->allocate_temp(dtype_, sum_shape, sum_tensor)); + auto sum_flat = sum_tensor->flat_outer_dims(); + auto accum_flat = accum_val_->flat_outer_dims(); + auto grad_flat = grad_val->flat_outer_dims(); + + const int64_t num_col = grad_flat.dimension(1); + + Eigen::DSizes slice_shape(num_col); + + for (i = 0; i < sum_nnz; ++i) { + const Source src = std::get<0>(entries_to_copy[i]); + const int64_t idx_a = std::get<1>(entries_to_copy[i]); + const int64_t idx_b = std::get<2>(entries_to_copy[i]); + T* sum_slice_ptr = &sum_flat(i, 0); + SliceT sum_slice(sum_slice_ptr, slice_shape); + if (src == from_accum) { + // Element comes from accumulator; directly copy data structures over + sum_indices_vec->push_back(accum_idx_vec_->at(idx_a)); + T* accum_slice_ptr = &accum_flat(idx_a, 0); + SliceT accum_slice(accum_slice_ptr, slice_shape); + sum_slice = accum_slice; + sum_counts->push_back(count_element_->at(idx_a)); + } else if (src == from_accum_and_grad) { + // Element is a sum of accumulated value and new gradient; + // compute sum here + sum_indices_vec->push_back(accum_idx_vec_->at(idx_a)); + const T* grad_slice_ptr = &grad_flat(idx_b, 0); + SliceConstT grad_slice(grad_slice_ptr, slice_shape); + T* accum_slice_ptr = &accum_flat(idx_a, 0); + SliceT accum_slice(accum_slice_ptr, slice_shape); + sum_slice = grad_slice + accum_slice; + sum_counts->push_back(count_element_->at(idx_a) + 1); + } else if (src == from_grad) { + // Element comes from new gradient; make a copy of indices and values + sum_indices_vec->push_back(grad_idx->vec()(idx_b)); + const T* grad_slice_ptr = &grad_flat(idx_b, 0); + SliceConstT grad_slice(grad_slice_ptr, slice_shape); + sum_slice = grad_slice; + sum_counts->push_back(1); + } + } + + // (3) Keep output, i.e., switch pointers to point to new data structures + // representing the sum + // Indices + accum_idx_vec_.reset(sum_indices_vec); + // Values + accum_val_.reset(sum_tensor); + // Counts + count_element_.reset(sum_counts); + + // No need to copy shape, since shape remains the same after sum. + } + + void DivideAccumGradByCounter(OpKernelContext* ctx) override + TF_EXCLUSIVE_LOCKS_REQUIRED(this->mu_) { + const int64_t nnz = count_element_->size(); + auto accum_flat = accum_val_->flat_outer_dims(); + std::vector count_typet; + std::transform(count_element_->begin(), count_element_->end(), + std::back_inserter(count_typet), + TypeConverter::ConvertUToT); + + // Option 1: divide all by counter + /* + std::transform( + &accum_flat(0,0), &accum_flat(nnz,0), &accum_flat(0,0), + std::bind2nd(std::divides(), + TypeConverter::ConvertUToT(this->counter_))); + */ + + // Option 2: average element-wise + Eigen::DSizes slice_shape(accum_flat.dimension(1)); + for (int64_t i = 0; i < nnz; i++) { + T* accum_slice_ptr = &accum_flat(i, 0); + SliceT accum_slice(accum_slice_ptr, slice_shape); + accum_slice.device(ctx->template eigen_device()) = + accum_slice / count_typet[i]; + } + } + + bool SetOutput(OpKernelContext* ctx) override { + bool is_successful = true; + if (is_successful) is_successful = ReturnIdxTensor(ctx); + if (is_successful) is_successful = ReturnValTensor(ctx); + if (is_successful) is_successful = ReturnShapeTensor(ctx); + return is_successful; + } + + bool GetAndValidateTensorInputForApplyGrad( + OpKernelContext* ctx, + std::tuple** tensor) override + TF_EXCLUSIVE_LOCKS_REQUIRED(this->mu_) { + // TODO(xinghao, jmchen): The roundabout way of getting attr from + // OpKernelContext (instead of OpKernelConstruction) is a hack, and should + // be fixed if it affects efficiency. + bool has_known_shape = false; + OP_REQUIRES_OK_BOOLEAN( + ctx, GetNodeAttr(ctx->op_kernel().def(), "has_known_shape", + &has_known_shape)); + + // Get input gradient tensors + const Tensor* grad_idx_tensor; + OP_REQUIRES_OK_BOOLEAN(ctx, + ctx->input("gradient_indices", &grad_idx_tensor)); + const Tensor* grad_val_tensor; + OP_REQUIRES_OK_BOOLEAN(ctx, + ctx->input("gradient_values", &grad_val_tensor)); + const Tensor* grad_shape_tensor = nullptr; + if (has_known_shape) { + OP_REQUIRES_OK_BOOLEAN(ctx, + ctx->input("gradient_shape", &grad_shape_tensor)); + } + + // Checks + OP_REQUIRES_BOOLEAN( + ctx, TensorShapeUtils::IsVector(grad_idx_tensor->shape()), + errors::InvalidArgument( + "Input indices should be vector but received shape: ", + grad_idx_tensor->shape().DebugString())); + const int64_t nnz = grad_idx_tensor->dim_size(0); + OP_REQUIRES_BOOLEAN( + ctx, grad_val_tensor->dims() > 0, + errors::InvalidArgument("Values cannot be 0-dimensional.")); + OP_REQUIRES_BOOLEAN(ctx, grad_val_tensor->dim_size(0) == nnz, + errors::InvalidArgument("Expected ", nnz, + " non-empty input values, got ", + grad_val_tensor->dim_size(0))); + + *tensor = new std::tuple( + grad_idx_tensor, grad_val_tensor, grad_shape_tensor); + + OP_REQUIRES_OK_BOOLEAN(ctx, this->ValidateShape(*tensor, has_known_shape)); + + return true; + } + + void CleanUpGradTensor(std::tuple* tensor) override { + if (tensor != nullptr) delete tensor; + } + + private: + inline int cmp(std::vector* a_idx, const Tensor* b_idx, + const int64_t a_row, const int64_t b_row) { + const int64_t a = a_idx->at(a_row); + const int64_t b = b_idx->vec()(b_row); + if (a < b) { + return -1; + } else if (a > b) { + return 1; + } + return 0; + } + + inline bool ReturnIdxTensor(OpKernelContext* ctx) { + Tensor* idx_tensor; + const int64_t nnz = accum_idx_vec_->size(); + OP_REQUIRES_OK_BOOLEAN(ctx, ctx->allocate_output(0, {nnz}, &idx_tensor)); + // If allocate_output fails, OP_REQUIRES_OK_BOOLEAN will short-circuit + // the remaining code and just return false + auto idx_tensor_vec = idx_tensor->vec(); + for (int i = 0; i < nnz; ++i) { + idx_tensor_vec(i) = accum_idx_vec_->at(i); + } + return true; + } + + inline bool ReturnValTensor(OpKernelContext* ctx) { + ctx->set_output(1, *accum_val_); + return true; + } + + inline bool ReturnShapeTensor(OpKernelContext* ctx) { + int64_t accum_val_dims = accum_val_->dims(); + Tensor* shape_tensor; + OP_REQUIRES_OK_BOOLEAN( + ctx, ctx->allocate_output(2, {accum_val_dims}, &shape_tensor)); + // If allocate_output fails, OP_REQUIRES_OK_BOOLEAN will short-circuit + // the remaining code and just return false + + // First dim of shape is defined by shape_, others by accum_val_->shape + shape_tensor->flat()(0) = + (shape_.dims() > 0) ? shape_.dim_size(0) : -1; + for (int64_t i = 1; i < accum_val_dims; i++) { + shape_tensor->flat()(i) = accum_val_->dim_size(i); + } + return true; + } + + SparseConditionalAccumulator(const SparseConditionalAccumulator&) = delete; + void operator=(const SparseConditionalAccumulator&) = delete; +}; + +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_SPARSE_CONDITIONAL_ACCUMULATOR_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/sparse_matmul_op.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/sparse_matmul_op.h new file mode 100644 index 0000000000000000000000000000000000000000..9906fe772db4c08161df417a2d204d9901a01904 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/sparse_matmul_op.h @@ -0,0 +1,501 @@ +/* Copyright 2016 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_KERNELS_SPARSE_MATMUL_OP_H_ +#define TENSORFLOW_CORE_KERNELS_SPARSE_MATMUL_OP_H_ + +#include "Eigen/Core" // from @eigen_archive +#include "tensorflow/core/platform/byte_order.h" +#include "tensorflow/core/platform/types.h" + +#if defined(PLATFORM_WINDOWS) +#include "tsl/platform/windows/intrinsics_port.h" +#endif + +namespace Eigen { +namespace internal { + +// Return the float representation of the bfloat16 value +// in the lower 16-bits of input +template +EIGEN_DEVICE_FUNC inline Packet pexpand_bf16_l(const Packet& from) { + tensorflow::uint32 tmp; +#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ + tmp = (reinterpret_cast(from)) & 0xffff0000; +#else + tmp = (reinterpret_cast(from) << 16) & 0xffff0000; +#endif + return reinterpret_cast(tmp); +} + +// Return the float representation of the bfloat16 value +// in the upper 16-bits of input +template +EIGEN_DEVICE_FUNC inline Packet pexpand_bf16_u(const Packet& from) { + tensorflow::uint32 tmp; +#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ + tmp = (reinterpret_cast(from) << 16) & 0xffff0000; +#else + tmp = (reinterpret_cast(from)) & 0xffff0000; +#endif + return reinterpret_cast(tmp); +} + +// Specialization non-scalar version on non-sse. +// Enable vectorization on z13 and higher +#if defined(EIGEN_VECTORIZE_ALTIVEC) || defined(EIGEN_VECTORIZE_VSX) || \ + defined(EIGEN_VECTORIZE_NEON) || defined(EIGEN_VECTORIZE_ZVECTOR) +template +EIGEN_DEVICE_FUNC inline Packet4f pexpand_bf16_l(const Packet4f& from) { + float r[4]; + tensorflow::uint32 p[4]; + pstoreu(r, from); + tensorflow::uint32* ir = reinterpret_cast(r); + p[0] = (ir[0] << 16) & 0xffff0000; + p[1] = ir[0] & 0xffff0000; + p[2] = (ir[1] << 16) & 0xffff0000; + p[3] = ir[1] & 0xffff0000; + return ploadu(reinterpret_cast(p)); +} + +template +EIGEN_DEVICE_FUNC inline Packet4f pexpand_bf16_u(const Packet4f& from) { + float r[4]; + tensorflow::uint32 p[4]; + pstoreu(r, from); + tensorflow::uint32* ir = reinterpret_cast(r); + p[0] = (ir[2] << 16) & 0xffff0000; + p[1] = ir[2] & 0xffff0000; + p[2] = (ir[3] << 16) & 0xffff0000; + p[3] = ir[3] & 0xffff0000; + return ploadu(reinterpret_cast(p)); +} +#endif + +template +EIGEN_DEVICE_FUNC inline Packet pinterleave4x64(const Packet& from) { + return from; +} + +template +EIGEN_DEVICE_FUNC inline Packet pbroadcast_first(const Packet& a) { + return a; +} + +template +EIGEN_DEVICE_FUNC inline Packet pbroadcast_second(const Packet& a) { + assert(false && "Not applicable to Scalar Values"); + return a; +} + +template +EIGEN_DEVICE_FUNC inline Packet pbroadcast_third(const Packet& a) { + assert(false && "Not applicable to Scalar Values"); + return a; +} + +template +EIGEN_DEVICE_FUNC inline Packet pbroadcast_fourth(const Packet& a) { + assert(false && "Not applicable to Scalar Values"); + return a; +} + +template +EIGEN_DEVICE_FUNC inline Packet pload4bf16( + const typename unpacket_traits::type* from) { + assert(false && "Not applicable to Scalar Values"); + return Packet(); +} + +template +EIGEN_DEVICE_FUNC inline Packet pload2bf16( + const typename unpacket_traits::type* from) { + assert(false && "Not applicable to Scalar Values"); + return Packet(); +} + +// Specialization for pload4bf16 and pload2bf16 for non-sse. +// Enable vectorization on z13 and higher. +#if defined(EIGEN_VECTORIZE_ALTIVEC) || defined(EIGEN_VECTORIZE_VSX) || \ + defined(EIGEN_VECTORIZE_NEON) || defined(EIGEN_VECTORIZE_ZVECTOR) +template <> +EIGEN_STRONG_INLINE Packet4f pload4bf16(const float* from) { + tensorflow::uint32 p[4]; + const tensorflow::uint32* ir = + reinterpret_cast(from); + p[0] = (ir[0] << 16) & 0xffff0000; + p[1] = ir[0] & 0xffff0000; + p[2] = (ir[1] << 16) & 0xffff0000; + p[3] = ir[1] & 0xffff0000; + return ploadu(reinterpret_cast(p)); +} + +template <> +EIGEN_STRONG_INLINE Packet4f pload2bf16(const float* from) { + tensorflow::uint32 p[4]; + const tensorflow::uint32* ir = + reinterpret_cast(from); + p[0] = (ir[0] << 16) & 0xffff0000; + p[1] = ir[0] & 0xffff0000; + p[2] = (ir[0] << 16) & 0xffff0000; + p[3] = ir[0] & 0xffff0000; + return ploadu(reinterpret_cast(p)); +} +#endif + +#if defined(EIGEN_VECTORIZE_NEON) +// Return a packet with the first value of the input Packet replicated +template <> +EIGEN_STRONG_INLINE Packet4f pbroadcast_first(const Packet4f& a) { + return pset1(pfirst(a)); +} +template <> +EIGEN_STRONG_INLINE Packet2f pbroadcast_first(const Packet2f& a) { + return pset1(pfirst(a)); +} + +// Return a packet with the second value of the input Packet replicated +template <> +EIGEN_STRONG_INLINE Packet4f pbroadcast_second(const Packet4f& a) { + return pset1(vgetq_lane_f32(a, 1)); +} +template <> +EIGEN_STRONG_INLINE Packet2f pbroadcast_second(const Packet2f& a) { + return pset1(vget_lane_f32(a, 1)); +} + +// Return a packet with the third value of the input Packet replicated +template <> +EIGEN_STRONG_INLINE Packet4f pbroadcast_third(const Packet4f& a) { + return pset1(vgetq_lane_f32(a, 2)); +} + +// Return a packet with the fourth value of the input Packet replicated +template <> +EIGEN_STRONG_INLINE Packet4f pbroadcast_fourth(const Packet4f& a) { + return pset1(vgetq_lane_f32(a, 3)); +} +#endif + +#if defined(EIGEN_VECTORIZE_ALTIVEC) || defined(EIGEN_VECTORIZE_VSX) +// Return a packet with the first value of the input Packet replicated +template <> +EIGEN_STRONG_INLINE Packet4f pbroadcast_first(const Packet4f& a) { + return vec_splat(a, 0); +} + +// Return a packet with the second value of the input Packet replicated +template <> +EIGEN_STRONG_INLINE Packet4f pbroadcast_second(const Packet4f& a) { + return vec_splat(a, 1); +} + +// Return a packet with the third value of the input Packet replicated +template <> +EIGEN_STRONG_INLINE Packet4f pbroadcast_third(const Packet4f& a) { + return vec_splat(a, 2); +} + +// Return a packet with the fourth value of the input Packet replicated +template <> +EIGEN_STRONG_INLINE Packet4f pbroadcast_fourth(const Packet4f& a) { + return vec_splat(a, 3); +} +#endif + +#ifdef EIGEN_VECTORIZE_SSE2 +// For PacketSize of 4 floats the Packet is not modified +template <> +EIGEN_STRONG_INLINE Packet4f pinterleave4x64(const Packet4f& from) { + return from; +} + +// Return a Packet with 4 floats loaded from 4 bfloat16 values +template <> +EIGEN_STRONG_INLINE Packet4f pload4bf16(const float* from) { + __m128i zero = _mm_setzero_si128(); + __m128i tmp = _mm_castpd_si128(_mm_load_pd1((const double*)from)); + return _mm_castsi128_ps(_mm_unpacklo_epi16(zero, tmp)); +} + +// Return a Packet with 2 floats loaded from 2 bfloat16 values +template <> +EIGEN_STRONG_INLINE Packet4f pload2bf16(const float* from) { + __m128i zero = _mm_setzero_si128(); + __m128i tmp = _mm_castps_si128(_mm_load_ps1(from)); + return _mm_castsi128_ps(_mm_unpacklo_epi16(zero, tmp)); +} + +// Return a Packet with 4 floats expanded from 4 bfloat16 values +// in the lower half of the 128-bit lane +template +EIGEN_DEVICE_FUNC inline Packet4f pexpand_bf16_l(const Packet4f& from) { + __m128i zero = _mm_setzero_si128(); + __m128i tmp = _mm_castps_si128(from); + return _mm_castsi128_ps(_mm_unpacklo_epi16(zero, tmp)); +} + +// Return a Packet with 4 floats expanded from 4 bfloat16 values +// in the upper half of the 128-bit lane +template +EIGEN_DEVICE_FUNC inline Packet4f pexpand_bf16_u(const Packet4f& from) { + __m128i zero = _mm_setzero_si128(); + __m128i tmp = _mm_castps_si128(from); + return _mm_castsi128_ps(_mm_unpackhi_epi16(zero, tmp)); +} + +// Return a packet with the first value of the input Packet replicated +template <> +EIGEN_STRONG_INLINE Packet4f pbroadcast_first(const Packet4f& a) { + return _mm_set1_ps(pfirst(a)); +} + +// Return a packet with the second value of the input Packet replicated +template <> +EIGEN_STRONG_INLINE Packet4f pbroadcast_second(const Packet4f& a) { + return _mm_set1_ps(_mm_cvtss_f32(_mm_shuffle_ps(a, a, 1))); +} + +// Return a packet with the third value of the input Packet replicated +template <> +EIGEN_STRONG_INLINE Packet4f pbroadcast_third(const Packet4f& a) { + return _mm_set1_ps(_mm_cvtss_f32(_mm_shuffle_ps(a, a, 2))); +} + +// Return a packet with the fourth value of the input Packet replicated +template <> +EIGEN_STRONG_INLINE Packet4f pbroadcast_fourth(const Packet4f& a) { + return _mm_set1_ps(_mm_cvtss_f32(_mm_shuffle_ps(a, a, 3))); +} + +#endif + +#ifdef EIGEN_VECTORIZE_AVX512 +template <> +EIGEN_STRONG_INLINE Packet16f +pbroadcast_first(const Packet16f& a_in) { + Packet4f a = _mm512_castps512_ps128(a_in); + return _mm512_broadcastss_ps(a); +} +template <> +EIGEN_STRONG_INLINE Packet16f +pbroadcast_second(const Packet16f& a_in) { + Packet4f a = _mm512_castps512_ps128(a_in); + return _mm512_broadcastss_ps(_mm_shuffle_ps(a, a, _MM_SHUFFLE(1, 1, 1, 1))); +} +template <> +EIGEN_STRONG_INLINE Packet16f +pbroadcast_third(const Packet16f& a_in) { + Packet4f a = _mm512_castps512_ps128(a_in); + return _mm512_broadcastss_ps(_mm_shuffle_ps(a, a, _MM_SHUFFLE(2, 2, 2, 2))); +} +template <> +EIGEN_STRONG_INLINE Packet16f +pbroadcast_fourth(const Packet16f& a_in) { + Packet4f a = _mm512_castps512_ps128(a_in); + return _mm512_broadcastss_ps(_mm_shuffle_ps(a, a, _MM_SHUFFLE(3, 3, 3, 3))); +} +template <> +EIGEN_STRONG_INLINE Packet8d pbroadcast_first(const Packet8d& a_in) { + Packet2d a = _mm512_castpd512_pd128(a_in); + return _mm512_broadcastsd_pd(a); +} +template <> +EIGEN_STRONG_INLINE Packet8d pbroadcast_second(const Packet8d& a_in) { + Packet2d a = _mm_permute_pd(_mm512_castpd512_pd128(a_in), 3); + return _mm512_broadcastsd_pd(a); +} +template <> +EIGEN_STRONG_INLINE Packet8d pbroadcast_third(const Packet8d& a_in) { + Packet2d a = _mm256_extractf128_pd(_mm512_castpd512_pd256(a_in), 1); + return _mm512_broadcastsd_pd(a); +} +template <> +EIGEN_STRONG_INLINE Packet8d pbroadcast_fourth(const Packet8d& a_in) { + Packet2d a = + _mm_permute_pd(_mm256_extractf128_pd(_mm512_castpd512_pd256(a_in), 1), 3); + return _mm512_broadcastsd_pd(a); +} +template <> +EIGEN_STRONG_INLINE Packet16i +pbroadcast_first(const Packet16i& a_in) { + Packet4i a = _mm512_castsi512_si128(a_in); + return _mm512_broadcastd_epi32(a); +} +template <> +EIGEN_STRONG_INLINE Packet16i +pbroadcast_second(const Packet16i& a_in) { + Packet4i a = _mm512_castsi512_si128(a_in); + return _mm512_broadcastd_epi32(_mm_shuffle_epi32(a, _MM_SHUFFLE(1, 1, 1, 1))); +} +template <> +EIGEN_STRONG_INLINE Packet16i +pbroadcast_third(const Packet16i& a_in) { + Packet4i a = _mm512_castsi512_si128(a_in); + return _mm512_broadcastd_epi32(_mm_shuffle_epi32(a, _MM_SHUFFLE(2, 2, 2, 2))); +} +template <> +EIGEN_STRONG_INLINE Packet16i +pbroadcast_fourth(const Packet16i& a_in) { + Packet4i a = _mm512_castsi512_si128(a_in); + return _mm512_broadcastd_epi32(_mm_shuffle_epi32(a, _MM_SHUFFLE(3, 3, 3, 3))); +} +#endif + +#ifdef EIGEN_VECTORIZE_AVX +// For a Packet of Size 8 floats(256-bits), swap the 2nd and 3rd quadwords +template <> +EIGEN_STRONG_INLINE Packet8f pinterleave4x64(const Packet8f& from) { +#ifdef EIGEN_VECTORIZE_AVX2 + return _mm256_castsi256_ps(_mm256_permute4x64_epi64(_mm256_castps_si256(from), + _MM_SHUFFLE(3, 1, 2, 0))); +#else + auto tmp1 = _mm256_extract_epi32(_mm256_castps_si256(from), 2); + auto tmp2 = _mm256_extract_epi32(_mm256_castps_si256(from), 3); + auto tmp3 = _mm256_extract_epi32(_mm256_castps_si256(from), 4); + auto tmp4 = _mm256_extract_epi32(_mm256_castps_si256(from), 5); + auto tmp5 = _mm256_insert_epi32(_mm256_castps_si256(from), tmp1, 4); + tmp5 = _mm256_insert_epi32(tmp5, tmp2, 5); + tmp5 = _mm256_insert_epi32(tmp5, tmp3, 2); + tmp5 = _mm256_insert_epi32(tmp5, tmp4, 3); + return _mm256_castsi256_ps(tmp5); +#endif +} +// Return a Packet with 4 floats loaded from 4 bfloat16 values +template <> +EIGEN_STRONG_INLINE Packet8f pload4bf16(const float* from) { + __m128i zero = _mm_setzero_si128(); + __m128i tmp = _mm_castpd_si128(_mm_load_pd1((const double*)from)); + return _mm256_castps128_ps256( + _mm_castsi128_ps(_mm_unpacklo_epi16(zero, tmp))); +} +// Return a Packet with 2 floats loaded from 2 bfloat16 values +template <> +EIGEN_STRONG_INLINE Packet8f pload2bf16(const float* from) { + __m128i zero = _mm_setzero_si128(); + __m128i tmp = _mm_castps_si128(_mm_load_ps1(from)); + return _mm256_castps128_ps256( + _mm_castsi128_ps(_mm_unpacklo_epi16(zero, tmp))); +} + +#ifdef EIGEN_VECTORIZE_AVX512 +// Return a Packet with 4 floats loaded from 4 bfloat16 values +template <> +EIGEN_STRONG_INLINE Packet16f pload4bf16(const float* from) { + __m128i zero = _mm_setzero_si128(); + __m128i tmp = _mm_castpd_si128(_mm_load_pd1((const double*)from)); + return _mm512_castps128_ps512( + _mm_castsi128_ps(_mm_unpacklo_epi16(zero, tmp))); +} +// Return a Packet with 2 floats loaded from 2 bfloat16 values +template <> +EIGEN_STRONG_INLINE Packet16f pload2bf16(const float* from) { + __m128i zero = _mm_setzero_si128(); + __m128i tmp = _mm_castps_si128(_mm_load_ps1(from)); + return _mm512_castps128_ps512( + _mm_castsi128_ps(_mm_unpacklo_epi16(zero, tmp))); +} +#endif + +// For each 128-bit lane convert 4 bfloat to 4 float values from the lower half +// of the 128-bit lane +template +EIGEN_DEVICE_FUNC inline Packet8f pexpand_bf16_l(const Packet8f& from) { +#ifdef EIGEN_VECTORIZE_AVX2 + __m256i zero = _mm256_setzero_si256(); + __m256i tmp = _mm256_castps_si256(from); + return _mm256_castsi256_ps(_mm256_unpacklo_epi16(zero, tmp)); +#else + __m128i zero = _mm_setzero_si128(); + __m128i low = _mm_castps_si128(_mm256_extractf128_ps(from, 0)); + __m128i res_l = _mm_unpacklo_epi16(zero, low); + __m128i high = _mm_castps_si128(_mm256_extractf128_ps(from, 1)); + __m128i res_h = _mm_unpacklo_epi16(zero, high); + __m256 res = _mm256_castps128_ps256(_mm_castsi128_ps(res_l)); + res = _mm256_insertf128_ps(res, _mm_castsi128_ps(res_h), 1); + return res; +#endif +} + +// For each 128-bit lane convert 4 bfloat to 4 float values from the upper half +// of the 128-bit lane +template +EIGEN_DEVICE_FUNC inline Packet8f pexpand_bf16_u(const Packet8f& from) { +#ifdef EIGEN_VECTORIZE_AVX2 + __m256i zero = _mm256_setzero_si256(); + __m256i tmp = _mm256_castps_si256(from); + return _mm256_castsi256_ps(_mm256_unpackhi_epi16(zero, tmp)); +#else + __m128i zero = _mm_setzero_si128(); + __m128i low = _mm_castps_si128(_mm256_extractf128_ps(from, 0)); + __m128i res_l = _mm_unpackhi_epi16(zero, low); + __m128i high = _mm_castps_si128(_mm256_extractf128_ps(from, 1)); + __m128i res_h = _mm_unpackhi_epi16(zero, high); + __m256 res = _mm256_castps128_ps256(_mm_castsi128_ps(res_l)); + res = _mm256_insertf128_ps(res, _mm_castsi128_ps(res_h), 1); + return res; +#endif +} + +// Return a packet with the first value of the input Packet replicated +template <> +EIGEN_STRONG_INLINE Packet8f pbroadcast_first(const Packet8f& a) { + return _mm256_set1_ps(pfirst(a)); +} + +// Return a packet with the second value of the input Packet replicated +template <> +EIGEN_STRONG_INLINE Packet8f pbroadcast_second(const Packet8f& a) { + return _mm256_set1_ps( + _mm_cvtss_f32(_mm256_castps256_ps128(_mm256_permute_ps(a, 1)))); +} + +// Return a packet with the third value of the input Packet replicated +template <> +EIGEN_STRONG_INLINE Packet8f pbroadcast_third(const Packet8f& a) { + return _mm256_set1_ps( + _mm_cvtss_f32(_mm256_castps256_ps128(_mm256_permute_ps(a, 2)))); +} + +// Return a packet with the fourth value of the input Packet replicated +template <> +EIGEN_STRONG_INLINE Packet8f pbroadcast_fourth(const Packet8f& a) { + return _mm256_set1_ps( + _mm_cvtss_f32(_mm256_castps256_ps128(_mm256_permute_ps(a, 3)))); +} + +#endif + +#ifdef EIGEN_VECTORIZE_AVX512 + +template +EIGEN_DEVICE_FUNC inline Packet16f pexpand_bf16_l(const Packet16f& from) { + return _mm512_castsi512_ps(_mm512_slli_epi32( + _mm512_cvtepu16_epi32(_mm512_castsi512_si256(_mm512_castps_si512(from))), + 16)); +} + +template +EIGEN_DEVICE_FUNC inline Packet16f pexpand_bf16_u(const Packet16f& from) { + Packet16i tmp = _mm512_castps_si512(from); + Packet16i tmp2 = _mm512_alignr_epi32(tmp, tmp, 8); + return _mm512_castsi512_ps(_mm512_slli_epi32( + _mm512_cvtepu16_epi32(_mm512_castsi512_si256(tmp2)), 16)); +} + +#endif +} // namespace internal +} // namespace Eigen +#endif // TENSORFLOW_CORE_KERNELS_SPARSE_MATMUL_OP_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/sparse_reorder_op.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/sparse_reorder_op.h new file mode 100644 index 0000000000000000000000000000000000000000..0af44c550bdc7aad783655346e60c63b11e5ff91 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/sparse_reorder_op.h @@ -0,0 +1,35 @@ +/* Copyright 2021 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_KERNELS_SPARSE_REORDER_OP_H_ +#define TENSORFLOW_CORE_KERNELS_SPARSE_REORDER_OP_H_ + +#include "tensorflow/core/framework/op_kernel.h" + +namespace tensorflow { + +namespace functor { + +template +struct SparseReorderFunctor { + void operator()(OpKernelContext* context, const Tensor& input_ind, + const Tensor& input_val, const Tensor& input_shape_in); +}; + +} // namespace functor + +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_SPARSE_REORDER_OP_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/sparse_slice_grad_op.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/sparse_slice_grad_op.h new file mode 100644 index 0000000000000000000000000000000000000000..6358ed02fc33db0dfa6e1192f5a734c6ceb6721f --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/sparse_slice_grad_op.h @@ -0,0 +1,40 @@ +/* Copyright 2022 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_KERNELS_SPARSE_SLICE_GRAD_OP_H_ +#define TENSORFLOW_CORE_KERNELS_SPARSE_SLICE_GRAD_OP_H_ + +#include "tensorflow/core/framework/op_kernel.h" +#include "tensorflow/core/framework/tensor_types.h" + +namespace tensorflow { + +namespace functor { + +template +struct SparseSliceGradFunctor { + void operator()(OpKernelContext* ctx, + typename TTypes::ConstFlat backprop_val_grad, + typename TTypes::ConstMatrix input_indices_mat, + typename TTypes::ConstFlat input_start_flat, + typename TTypes::ConstMatrix output_indices_mat, + typename TTypes::Flat val_grad) const; +}; + +} // namespace functor + +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_SPARSE_SLICE_GRAD_OP_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/sparse_slice_op.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/sparse_slice_op.h new file mode 100644 index 0000000000000000000000000000000000000000..62e0b0cc1c768269a8e5d832d99b05472e72938b --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/sparse_slice_op.h @@ -0,0 +1,39 @@ +/* Copyright 2021 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_KERNELS_SPARSE_SLICE_OP_H_ +#define TENSORFLOW_CORE_KERNELS_SPARSE_SLICE_OP_H_ + +#include "tensorflow/core/framework/op_kernel.h" +#include "tensorflow/core/framework/tensor_types.h" +#include "tensorflow/core/lib/core/status.h" + +namespace tensorflow { + +namespace functor { + +template +struct SparseSliceFunctor { + void operator()(OpKernelContext* context, const Tensor& input_indices, + const Tensor& input_values, const Tensor& input_shape, + const Tensor& input_start, const Tensor& input_size, + typename AsyncOpKernel::DoneCallback done = nullptr) const; +}; + +} // namespace functor + +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_SPARSE_SLICE_OP_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/sparse_split_op.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/sparse_split_op.h new file mode 100644 index 0000000000000000000000000000000000000000..7fba47a495399b3562f222978eeaef3d9fb60a09 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/sparse_split_op.h @@ -0,0 +1,37 @@ +/* Copyright 2021 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_KERNELS_SPARSE_SPLIT_OP_H_ +#define TENSORFLOW_CORE_KERNELS_SPARSE_SPLIT_OP_H_ + +#include "tensorflow/core/framework/op_kernel.h" + +namespace tensorflow { + +namespace functor { + +template +struct SparseSplitFunctor { + void operator()(OpKernelContext* context, const Tensor& input_indices, + const Tensor& input_values, const TensorShape& dense_shape, + const int64_t axis, const int num_split, + typename AsyncOpKernel::DoneCallback done = nullptr); +}; + +} // namespace functor + +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_SPARSE_SPLIT_OP_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/sparse_tensor_dense_add_op.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/sparse_tensor_dense_add_op.h new file mode 100644 index 0000000000000000000000000000000000000000..44a857853bb9e24a6823f88c948b1651aab76172 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/sparse_tensor_dense_add_op.h @@ -0,0 +1,42 @@ +/* Copyright 2016 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_KERNELS_SPARSE_TENSOR_DENSE_ADD_OP_H_ +#define TENSORFLOW_CORE_KERNELS_SPARSE_TENSOR_DENSE_ADD_OP_H_ + +#include "unsupported/Eigen/CXX11/Tensor" // from @eigen_archive +#include "tensorflow/core/framework/tensor_types.h" +#include "tensorflow/core/framework/types.h" +#include "tensorflow/core/kernels/scatter_functor.h" + +namespace tensorflow { +namespace functor { + +// TODO(zongheng): this should be a general functor that powers SparseAdd and +// ScatterNd ops. It should be moved to its own head file, once the other ops +// are implemented. +template +struct ScatterNdFunctor { + // Returns -1 on success or a nonnegative i s.t. indices[i] is a bad index. + Index operator()(const Device& d, typename TTypes::ConstMatrix indices, + typename TTypes::ConstFlat updates, + typename TTypes::Tensor out); +}; + +} // namespace functor +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_SPARSE_TENSOR_DENSE_ADD_OP_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/sparse_tensor_dense_matmul_op.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/sparse_tensor_dense_matmul_op.h new file mode 100644 index 0000000000000000000000000000000000000000..3cab997c567e87cd518b04bd3e4f9255db67131d --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/sparse_tensor_dense_matmul_op.h @@ -0,0 +1,85 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_KERNELS_SPARSE_TENSOR_DENSE_MATMUL_OP_H_ +#define TENSORFLOW_CORE_KERNELS_SPARSE_TENSOR_DENSE_MATMUL_OP_H_ + +#include "unsupported/Eigen/CXX11/Tensor" // from @eigen_archive +#include "tensorflow/core/framework/op_kernel.h" +#include "tensorflow/core/framework/tensor_types.h" +#include "tensorflow/core/framework/types.h" +#include "tensorflow/core/lib/core/errors.h" + +namespace tensorflow { + +namespace functor { + +template +struct SparseTensorDenseMatMulFunctor { + static EIGEN_ALWAYS_INLINE Status Compute( + OpKernelContext* ctx, typename TTypes::Matrix out, + typename TTypes::ConstMatrix a_indices, + typename TTypes::ConstVec a_values, typename TTypes::ConstMatrix b); +}; + +template +class MaybeAdjoint; + +template +class MaybeAdjoint { + public: + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE MaybeAdjoint(MATRIX m) : m_(m) {} + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE typename MATRIX::Scalar operator()( + const typename MATRIX::Index i, const typename MATRIX::Index j) const { + return m_(i, j); + } + + private: + const MATRIX m_; +}; + +template +EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE T MaybeConj(T v) { + return Eigen::numext::conj(v); +} + +template +class MaybeAdjoint { + public: + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE MaybeAdjoint(MATRIX m) : m_(m) {} + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE typename MATRIX::Scalar operator()( + const typename MATRIX::Index i, const typename MATRIX::Index j) const { + return Eigen::numext::conj(m_(j, i)); + } + + private: + const MATRIX m_; +}; + +template +struct SumType { + using type = T; +}; + +template <> +struct SumType { + using type = float; // Use fp32 accumulator for fp16 input values +}; + +} // end namespace functor +} // end namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_SPARSE_TENSOR_DENSE_MATMUL_OP_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/sparse_to_dense_op_gpu.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/sparse_to_dense_op_gpu.h new file mode 100644 index 0000000000000000000000000000000000000000..c19ffa72898b4530a07ff7168474a119b787c349 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/sparse_to_dense_op_gpu.h @@ -0,0 +1,40 @@ +/* Copyright 2021 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#if !GOOGLE_CUDA && !TENSORFLOW_USE_ROCM +#error This file must only be included when building with Cuda +#endif + +#ifndef TENSORFLOW_CORE_KERNELS_SPARSE_TO_DENSE_OP_GPU_H_ +#define TENSORFLOW_CORE_KERNELS_SPARSE_TO_DENSE_OP_GPU_H_ + +#include "xla/stream_executor/device_memory.h" +#include "tensorflow/core/framework/op_kernel.h" + +namespace tensorflow { + +namespace functor { +template +struct LaunchSparseToDense { + void operator()(OpKernelContext* c, AsyncOpKernel::DoneCallback done, + AsyncOpKernel* op, bool validate_indices, + const Tensor& indices, const Tensor& values, + const Tensor& shape, const T default_value, Tensor* dense); +}; + +} // namespace functor + +} // namespace tensorflow +#endif // TENSORFLOW_CORE_KERNELS_SPARSE_TO_DENSE_OP_GPU_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/sparse_utils.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/sparse_utils.h new file mode 100644 index 0000000000000000000000000000000000000000..4e6ab744691c287b42900092dbdd4c99e3e7a50d --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/sparse_utils.h @@ -0,0 +1,88 @@ +/* Copyright 2019 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +// Helpers for writing OpKernels for sparse tensors. +#ifndef TENSORFLOW_CORE_KERNELS_SPARSE_UTILS_H_ +#define TENSORFLOW_CORE_KERNELS_SPARSE_UTILS_H_ + +#include + +#include "tensorflow/core/framework/tensor.h" +#include "tensorflow/core/framework/tensor_types.h" +#include "tensorflow/core/platform/types.h" + +namespace tensorflow { +namespace sparse_utils { + +// Find the index i of the first element for which +// indices_mat(sparse_index_begin, 0) < indices_mat(i, 0). +// The search is conducted in the open interval +// [sparse_index_begin, indices_mat.dimension(0)) and when no such i is found, +// indices_mat.dimension(0) is returned. +// indices_mat(k, 0) should be non-decreasing over the interval +// [begin, indices_mat.dimension(0)). +// Requires 0 <= sparse_index_begin < indices_mat.dimension(0). +template +Tindices FindNextDenseRowStartIndex( + const Tindices sparse_index_begin, + const typename TTypes::ConstMatrix& indices_mat); + +// Returns the vector v of indices in indices_mat at which new dense matrix +// rows begin. +// v.front() = 0, v.back() = indices_mat.dimension(0), and for i > 0, +// v[i] - v[i-1] is the length of the ith dense row in indices_mat. +// *contains_empty_rows = true if and only if indices_mat contains empty rows +// (rows without values) between row 0 and the last row. +template +std::vector GetStartIndicesOfEachDenseRow( + const typename TTypes::ConstMatrix& indices_mat, + bool* contains_empty_rows); + +// Converts tensor.vec to an std::vector object, appends +// the value num_nonzero_entries_in_sparse_mat, and returns the result. +template +std::vector ParseRowStartIndices( + const tensorflow::Tensor& tensor, + const Tindices num_nonzero_entries_in_sparse_mat); + +// Returns true if and only if the sparse matrix indices_mat whose row start +// indices are represented by row_start_indices has empty dense rows +// (between its first and last dense rows). +// This function satisfies the identity row_start_indices == +// GetStartIndicesOfEachDenseRow(indices_mat, &return_value). +template +bool ContainsEmptyRows(const std::vector& row_start_indices); + +// Methods for validating sparse indices. +enum class IndexValidation { + kNone, // Indices are not used by the op, or are not directly accessible + // (e.g. on GPU). + kOrdered, // Indices must be unique, in lexicographical order, and within + // safe bounds. + kUnordered // Indices must be within safe bounds, but may repeat or appear + // out-of-order. +}; + +// Validates the three component tensors of a sparse tensor have the proper +// shapes. Also validates index values according to the method supplied. +template +Status ValidateSparseTensor(const Tensor& indices, const Tensor& values, + const Tensor& shape, + IndexValidation index_validation); + +} // namespace sparse_utils +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_SPARSE_UTILS_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/sparse_xent_op.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/sparse_xent_op.h new file mode 100644 index 0000000000000000000000000000000000000000..d0ad3c4bda0b863d9a1a1e0ef6f27d38eb771bab --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/sparse_xent_op.h @@ -0,0 +1,232 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_KERNELS_SPARSE_XENT_OP_H_ +#define TENSORFLOW_CORE_KERNELS_SPARSE_XENT_OP_H_ +// Functor definition for SparseXentOp, must be compilable by nvcc. + +#include "unsupported/Eigen/CXX11/Tensor" // from @eigen_archive +#include "tensorflow/core/framework/bounds_check.h" +#include "tensorflow/core/framework/op_kernel.h" +#include "tensorflow/core/framework/tensor_types.h" +#include "tensorflow/core/platform/macros.h" +#include "tensorflow/core/platform/types.h" + +namespace tensorflow { + +namespace sparse_xent_helpers { + +template +typename TTypes::Tensor32Bit To32BitConst( + typename TTypes::Vec in) { + return To32Bit(typename TTypes::ConstVec(in.data(), in.dimensions())); +} + +template +typename TTypes::Tensor32Bit To32BitConst( + typename TTypes::Matrix in) { + return To32Bit(typename TTypes::ConstMatrix(in.data(), in.dimensions())); +} + +} // namespace sparse_xent_helpers + +namespace generator { + +// Generator for calculation of the sparse Xent loss. +// This generator takes the logits, the sum of the exponentiated +// logits, and the label indices. For each minibatch entry, ignoring +// the batch index b, it calculates: +// +// loss[j] = (log(sum_exp_logits) - logits[j]) * 1{ j == label } +// +// for j = 0 .. num_classes. This value must be summed over all j for +// the final loss. +template +class SparseXentLossGenerator { + public: + EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE SparseXentLossGenerator( + typename TTypes::Tensor32Bit logits, + typename TTypes::Tensor32Bit sum_exp_logits, + typename TTypes::Tensor32Bit labels, + const Index max_depth) + : logits_(logits), + sum_exp_logits_(sum_exp_logits), + labels_(labels), + max_depth_(max_depth) {} + + EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE T + operator()(const Eigen::array& coords) const { + const int batch = coords[0]; + const int depth = coords[1]; + const Index label = tensorflow::internal::SubtleMustCopy(labels_(batch)); + if (!FastBoundsCheck(label, max_depth_)) { + return Eigen::NumTraits::quiet_NaN(); + } + return TF_PREDICT_FALSE(label == depth) + ? (Eigen::numext::log(sum_exp_logits_(batch)) - logits_(coords)) + : T(0.0); + }; + + private: + typename TTypes::Tensor32Bit logits_; + typename TTypes::Tensor32Bit sum_exp_logits_; + typename TTypes::Tensor32Bit labels_; + const Index max_depth_; +}; + +// Generator for calculation of the sparse Xent gradient. +// This generator takes the exponentiated logits, their sums, and the label +// indices. For each minibatch entry, ignoring the batch index b, it calculates: +// +// exp_logits[j] / sum_exp_logits - 1{ j == label } +// +// for j = 0 .. num_classes. +template +class SparseXentGradGenerator { + public: + EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE SparseXentGradGenerator( + typename TTypes::Tensor32Bit exp_logits, + typename TTypes::Tensor32Bit sum_exp_logits, + typename TTypes::Tensor32Bit labels, + const Index max_depth) + : exp_logits_(exp_logits), + sum_exp_logits_(sum_exp_logits), + labels_(labels), + max_depth_(max_depth) {} + + EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE T + operator()(const Eigen::array& coords) const { + const int batch = coords[0]; + const int depth = coords[1]; + const Index label = tensorflow::internal::SubtleMustCopy(labels_(batch)); + if (!FastBoundsCheck(label, max_depth_)) { + return Eigen::NumTraits::quiet_NaN(); + } + T subtract = TF_PREDICT_FALSE(depth == label) ? T(1.0) : T(0.0); + return exp_logits_(coords) / sum_exp_logits_(batch) - subtract; + }; + + private: + typename TTypes::Tensor32Bit exp_logits_; + typename TTypes::Tensor32Bit sum_exp_logits_; + typename TTypes::Tensor32Bit labels_; + const Index max_depth_; +}; + +} // namespace generator + +namespace functor { + +template +struct RowMaxReduction { + // Computes the maximum across the rows of logits + // + // logits: batch_size, num_classes. + // maximum: temporary tensor, dims: batch_size, 1 + static inline void Compute(OpKernelContext* ctx, + typename TTypes::ConstMatrix logits, + typename TTypes::Vec maximum) { + Eigen::IndexList > along_row; + Device d = ctx->eigen_device(); + To32Bit(maximum).device(d) = To32Bit(logits).maximum(along_row); + } +}; + +// Functor used by SparseXentOp to do the computations. +template +struct SparseXentFunctor { + // Computes Cross Entropy loss and backprop. + // + // logits: batch_size, num_classes. + // labels: num_classes. + // scratch: temporary tensor, dims: batch_size, 1 + // loss: output tensor for the loss, dims: batch_size. + // backprop: output tensor for the backprop, dims: batch_size, num_classes. + void operator()(OpKernelContext* ctx, typename TTypes::ConstMatrix logits, + typename TTypes::ConstVec labels, + typename TTypes::Vec scratch, typename TTypes::Vec loss, + typename TTypes::Matrix backprop); +}; + +// Eigen code implementing SparseXentFunctor::operator(). +// This code works for both CPU and GPU and is used by the functor +// specializations for both device types. +template +struct SparseXentEigenImpl { + static void Compute(OpKernelContext* ctx, + typename TTypes::ConstMatrix logits, + typename TTypes::ConstVec labels, + typename TTypes::Vec scratch, + typename TTypes::Vec loss, + typename TTypes::Matrix backprop) { + // NOTE(touts): This duplicates some of the computations in softmax_op + // because we need the intermediate (logits -max(logits)) values to + // avoid a log(exp()) in the computation of the loss. + + const int kBatchDim = 0; + const int kClassDim = 1; + + const int batch_size = logits.dimension(kBatchDim); + const int num_classes = logits.dimension(kClassDim); + +// These arrays are used to reduce along the class dimension, and broadcast +// the resulting value to all classes. + Eigen::IndexList > along_class; + Eigen::IndexList > batch_by_one; + batch_by_one.set(0, batch_size); + Eigen::IndexList batch_only; + batch_only.set(0, batch_size); + Eigen::IndexList, int> one_by_class; + one_by_class.set(1, num_classes); + + // scratch = max_logits along classes. + RowMaxReduction::Compute(ctx, logits, scratch); + + Device d = ctx->eigen_device(); + // backprop = logits - max_logits. + To32Bit(backprop).device(d) = + To32Bit(logits) - + To32Bit(scratch).reshape(batch_by_one).broadcast(one_by_class); + + // scratch = sum(exp(logits - max_logits)) along classes. + To32Bit(scratch).device(d) = To32Bit(backprop).exp().sum(along_class); + + // sum(-labels * + // ((logits - max_logits) - log(sum(exp(logits - max_logits))))) + // along classes + generator::SparseXentLossGenerator sparse_xent_loss_gen( + sparse_xent_helpers::To32BitConst(backprop), + sparse_xent_helpers::To32BitConst(scratch), To32Bit(labels), + backprop.dimension(1) /* max_depth */); + To32Bit(loss).device(d) = + To32Bit(backprop).generate(sparse_xent_loss_gen).sum(along_class); + + // backprop: prob - labels, where + // prob = exp(logits - max_logits) / sum(exp(logits - max_logits)) + To32Bit(backprop).device(d) = To32Bit(backprop).exp(); + generator::SparseXentGradGenerator sparse_xent_grad_gen( + sparse_xent_helpers::To32BitConst(backprop), + sparse_xent_helpers::To32BitConst(scratch), To32Bit(labels), + backprop.dimension(1) /* max_depth */); + To32Bit(backprop).device(d) = + To32Bit(backprop).generate(sparse_xent_grad_gen); + } +}; + +} // namespace functor + +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_SPARSE_XENT_OP_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/special_math/special_math_op_misc_impl.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/special_math/special_math_op_misc_impl.h new file mode 100644 index 0000000000000000000000000000000000000000..6b8bb7cbcc0e307bfbf9f422a0ba101f6bffe1b0 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/special_math/special_math_op_misc_impl.h @@ -0,0 +1,724 @@ +/* Copyright 2020 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_KERNELS_SPECIAL_MATH_SPECIAL_MATH_OP_MISC_IMPL_H_ +#define TENSORFLOW_CORE_KERNELS_SPECIAL_MATH_SPECIAL_MATH_OP_MISC_IMPL_H_ + +#define _USE_MATH_DEFINES +#include +#include +#include + +#include "unsupported/Eigen/CXX11/Tensor" // from @eigen_archive +#include "tensorflow/core/framework/bounds_check.h" +#include "tensorflow/core/framework/numeric_types.h" +#include "tensorflow/core/framework/tensor_types.h" +#include "tensorflow/core/kernels/cwise_ops.h" + +namespace Eigen { +namespace internal { + +// Implementation of Dawson's integral based on Cephes. + +template +EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar +generic_dawsn_interval_1(const Scalar& x) { + // Rational approximation on [0, 3.25) + const Scalar AN[] = { + Scalar(1.13681498971755972054E-11), Scalar(8.49262267667473811108E-10), + Scalar(1.94434204175553054283E-8), Scalar(9.53151741254484363489E-7), + Scalar(3.07828309874913200438E-6), Scalar(3.52513368520288738649E-4), + Scalar(-8.50149846724410912031E-4), Scalar(4.22618223005546594270E-2), + Scalar(-9.17480371773452345351E-2), Scalar(9.99999999999999994612E-1), + }; + const Scalar AD[] = { + Scalar(2.40372073066762605484E-11), Scalar(1.48864681368493396752E-9), + Scalar(5.21265281010541664570E-8), Scalar(1.27258478273186970203E-6), + Scalar(2.32490249820789513991E-5), Scalar(3.25524741826057911661E-4), + Scalar(3.48805814657162590916E-3), Scalar(2.79448531198828973716E-2), + Scalar(1.58874241960120565368E-1), Scalar(5.74918629489320327824E-1), + Scalar(1.00000000000000000539E0), + }; + const Scalar x2 = x * x; + Scalar y = (x * internal::ppolevl::run(x2, AN)) / + internal::ppolevl::run(x2, AD); + return y; +} + +template +EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar +generic_dawsn_interval_2(const Scalar& x) { + // Rational approximation on [3.25, 6.25) + const Scalar BN[] = { + Scalar(5.08955156417900903354E-1), Scalar(-2.44754418142697847934E-1), + Scalar(9.41512335303534411857E-2), Scalar(-2.18711255142039025206E-2), + Scalar(3.66207612329569181322E-3), Scalar(-4.23209114460388756528E-4), + Scalar(3.59641304793896631888E-5), Scalar(-2.14640351719968974225E-6), + Scalar(9.10010780076391431042E-8), Scalar(-2.40274520828250956942E-9), + Scalar(3.59233385440928410398E-11), + }; + const Scalar BD[] = { + Scalar(1.0), + Scalar(-6.31839869873368190192E-1), + Scalar(2.36706788228248691528E-1), + Scalar(-5.31806367003223277662E-2), + Scalar(8.48041718586295374409E-3), + Scalar(-9.47996768486665330168E-4), + Scalar(7.81025592944552338085E-5), + Scalar(-4.55875153252442634831E-6), + Scalar(1.89100358111421846170E-7), + Scalar(-4.91324691331920606875E-9), + Scalar(7.18466403235734541950E-11), + }; + const Scalar one = Scalar(1); + const Scalar half = Scalar(0.5); + + const Scalar inverse_x = one / x; + const Scalar inverse_x2 = inverse_x * inverse_x; + Scalar z = (internal::ppolevl::run(inverse_x2, BN) / + (x * internal::ppolevl::run(inverse_x2, BD))); + Scalar y = inverse_x2 * z + inverse_x; + return half * y; +} + +template +EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar +generic_dawsn_interval_3(const Scalar& x) { + // Rational approximation on [6.25, 1.0e9) + const Scalar CN[] = { + Scalar(-5.90592860534773254987E-1), Scalar(6.29235242724368800674E-1), + Scalar(-1.72858975380388136411E-1), Scalar(1.64837047825189632310E-2), + Scalar(-4.86827613020462700845E-4), + }; + const Scalar CD[] = { + Scalar(1.0), + Scalar(-2.69820057197544900361E0), + Scalar(1.73270799045947845857E0), + Scalar(-3.93708582281939493482E-1), + Scalar(3.44278924041233391079E-2), + Scalar(-9.73655226040941223894E-4), + }; + const Scalar one = Scalar(1); + const Scalar half = Scalar(0.5); + + const Scalar inverse_x = one / x; + Scalar inverse_x2 = inverse_x * inverse_x; + Scalar z = (internal::ppolevl::run(inverse_x2, CN) / + (x * internal::ppolevl::run(inverse_x2, CD))); + Scalar y = inverse_x2 * z + inverse_x; + return half * y; + return pmul(half, y); +} + +template +struct dawsn_op { + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar + operator()(const Scalar& x) const { + const Scalar half = Scalar(0.5); + const Scalar a = Scalar(3.25); + const Scalar b = Scalar(6.25); + const Scalar c = Scalar(1.0e9); + + Scalar abs_x = pabs(x); + + Scalar dawsn; + if (abs_x < a) { + dawsn = generic_dawsn_interval_1(abs_x); + } else if (abs_x < b) { + dawsn = generic_dawsn_interval_2(abs_x); + } else if (abs_x < c) { + dawsn = generic_dawsn_interval_3(abs_x); + } else { + dawsn = half / x; + } + + if (x < Scalar(0)) { + dawsn = -dawsn; + } + return dawsn; + } +}; + +// Implementation of exponential integral, based on Cephes. + +template +EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar +generic_expint_interval_1(const Scalar& x) { + /* 0 < x <= 2 + Ei(x) - EUL - ln(x) = x A(x)/B(x) + Theoretical peak relative error 9.73e-18 */ + const Scalar A[] = { + Scalar(-5.350447357812542947283E0), Scalar(2.185049168816613393830E2), + Scalar(-4.176572384826693777058E3), Scalar(5.541176756393557601232E4), + Scalar(-3.313381331178144034309E5), Scalar(1.592627163384945414220E6), + }; + const Scalar B[] = { + Scalar(1.0), + Scalar(-5.250547959112862969197E1), + Scalar(1.259616186786790571525E3), + Scalar(-1.756549581973534652631E4), + Scalar(1.493062117002725991967E5), + Scalar(-7.294949239640527645655E5), + Scalar(1.592627163384945429726E6), + }; + + // Euler gamma. + const Scalar EUL = Scalar(0.5772156649015329); + + const Scalar f = (internal::ppolevl::run(x, A) / + internal::ppolevl::run(x, B)); + return x * f + EUL + numext::log(x); +} + +template +EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar +generic_expint_interval_2(const Scalar& x) { + /* 2 <= x <= 4 + x exp(-x) Ei(x) - 1 = 1/x A6(1/x) / B6(1/x) + Theoretical absolute error = 4.89e-17 */ + const Scalar A6[] = { + Scalar(1.981808503259689673238E-2), Scalar(-1.271645625984917501326E0), + Scalar(-2.088160335681228318920E0), Scalar(2.755544509187936721172E0), + Scalar(-4.409507048701600257171E-1), Scalar(4.665623805935891391017E-2), + Scalar(-1.545042679673485262580E-3), Scalar(7.059980605299617478514E-5), + }; + const Scalar B6[] = { + Scalar(1.0), + Scalar(1.476498670914921440652E0), + Scalar(5.629177174822436244827E-1), + Scalar(1.699017897879307263248E-1), + Scalar(2.291647179034212017463E-2), + Scalar(4.450150439728752875043E-3), + Scalar(1.727439612206521482874E-4), + Scalar(3.953167195549672482304E-5), + }; + + const Scalar one = Scalar(1.0); + Scalar w = one / x; + Scalar f = (internal::ppolevl::run(w, A6) / + internal::ppolevl::run(w, B6)); + f = w * f + one; + return numext::exp(x) * w * f; +} + +template +EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar +generic_expint_interval_3(const Scalar& x) { + /* 4 <= x <= 8 + x exp(-x) Ei(x) - 1 = 1/x A5(1/x) / B5(1/x) + Theoretical absolute error = 2.20e-17 */ + const Scalar A5[] = { + Scalar(-1.373215375871208729803E0), Scalar(-7.084559133740838761406E-1), + Scalar(1.580806855547941010501E0), Scalar(-2.601500427425622944234E-1), + Scalar(2.994674694113713763365E-2), Scalar(-1.038086040188744005513E-3), + Scalar(4.371064420753005429514E-5), Scalar(2.141783679522602903795E-6), + }; + const Scalar B5[] = { + Scalar(1.0), + Scalar(8.585231423622028380768E-1), + Scalar(4.483285822873995129957E-1), + Scalar(7.687932158124475434091E-2), + Scalar(2.449868241021887685904E-2), + Scalar(8.832165941927796567926E-4), + Scalar(4.590952299511353531215E-4), + Scalar(-4.729848351866523044863E-6), + Scalar(2.665195537390710170105E-6), + }; + + const Scalar one = Scalar(1.0); + Scalar w = one / x; + Scalar f = (internal::ppolevl::run(w, A5) / + internal::ppolevl::run(w, B5)); + f = w * f + one; + return numext::exp(x) * w * f; +} + +template +EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar +generic_expint_interval_4(const Scalar& x) { + /* 8 <= x <= 16 + x exp(-x) Ei(x) - 1 = 1/x R(1/x) + Theoretical peak absolute error = 1.07e-17 */ + const Scalar A2[] = { + Scalar(-2.106934601691916512584E0), Scalar(1.732733869664688041885E0), + Scalar(-2.423619178935841904839E-1), Scalar(2.322724180937565842585E-2), + Scalar(2.372880440493179832059E-4), Scalar(-8.343219561192552752335E-5), + Scalar(1.363408795605250394881E-5), Scalar(-3.655412321999253963714E-7), + Scalar(1.464941733975961318456E-8), Scalar(6.176407863710360207074E-10), + }; + const Scalar B2[] = { + Scalar(1.0), + Scalar(-2.298062239901678075778E-1), + Scalar(1.105077041474037862347E-1), + Scalar(-1.566542966630792353556E-2), + Scalar(2.761106850817352773874E-3), + Scalar(-2.089148012284048449115E-4), + Scalar(1.708528938807675304186E-5), + Scalar(-4.459311796356686423199E-7), + Scalar(1.394634930353847498145E-8), + Scalar(6.150865933977338354138E-10), + }; + + const Scalar one = Scalar(1.0); + Scalar w = one / x; + Scalar f = (internal::ppolevl::run(w, A2) / + internal::ppolevl::run(w, B2)); + f = w * f + one; + return numext::exp(x) * w * f; +} + +template +EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar +generic_expint_interval_5(const Scalar& x) { + /* 16 <= x <= 32 + x exp(-x) Ei(x) - 1 = 1/x A4(1/x) / B4(1/x) + Theoretical absolute error = 1.22e-17 */ + const Scalar A4[] = { + Scalar(-2.458119367674020323359E-1), Scalar(-1.483382253322077687183E-1), + Scalar(7.248291795735551591813E-2), Scalar(-1.348315687380940523823E-2), + Scalar(1.342775069788636972294E-3), Scalar(-7.942465637159712264564E-5), + Scalar(2.644179518984235952241E-6), Scalar(-4.239473659313765177195E-8), + }; + const Scalar B4[] = { + Scalar(1.0), + Scalar(-1.044225908443871106315E-1), + Scalar(-2.676453128101402655055E-1), + Scalar(9.695000254621984627876E-2), + Scalar(-1.601745692712991078208E-2), + Scalar(1.496414899205908021882E-3), + Scalar(-8.462452563778485013756E-5), + Scalar(2.728938403476726394024E-6), + Scalar(-4.239462431819542051337E-8), + }; + + const Scalar one = Scalar(1.0); + Scalar w = one / x; + Scalar f = (internal::ppolevl::run(w, A4) / + internal::ppolevl::run(w, B4)); + f = w * f + one; + return numext::exp(x) * w * f; +} + +template +EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar +generic_expint_interval_6(const Scalar& x) { + /* 32 <= x <= 64 + x exp(-x) Ei(x) - 1 = 1/x A7(1/x) / B7(1/x) + Theoretical absolute error = 7.71e-18 */ + const Scalar A7[] = { + Scalar(1.212561118105456670844E-1), Scalar(-5.823133179043894485122E-1), + Scalar(2.348887314557016779211E-1), Scalar(-3.040034318113248237280E-2), + Scalar(1.510082146865190661777E-3), Scalar(-2.523137095499571377122E-5), + }; + const Scalar B7[] = { + Scalar(1.0), + Scalar(-1.002252150365854016662E0), + Scalar(2.928709694872224144953E-1), + Scalar(-3.337004338674007801307E-2), + Scalar(1.560544881127388842819E-3), + Scalar(-2.523137093603234562648E-5), + }; + + const Scalar one = Scalar(1.0); + Scalar w = one / x; + Scalar f = (internal::ppolevl::run(w, A7) / + internal::ppolevl::run(w, B7)); + f = w * f + one; + return numext::exp(x) * w * f; +} + +template +EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar +generic_expint_interval_7(const Scalar& x) { + /* x > 64 + x exp(-x) Ei(x) - 1 = 1/x A3(1/x)/B3(1/x) + Theoretical absolute error = 6.15e-17 */ + const Scalar A3[] = { + Scalar(-7.657847078286127362028E-1), Scalar(6.886192415566705051750E-1), + Scalar(-2.132598113545206124553E-1), Scalar(3.346107552384193813594E-2), + Scalar(-3.076541477344756050249E-3), Scalar(1.747119316454907477380E-4), + Scalar(-6.103711682274170530369E-6), Scalar(1.218032765428652199087E-7), + Scalar(-1.086076102793290233007E-9), + }; + const Scalar B3[] = { + Scalar(1.0), + Scalar(-1.888802868662308731041E0), + Scalar(1.066691687211408896850E0), + Scalar(-2.751915982306380647738E-1), + Scalar(3.930852688233823569726E-2), + Scalar(-3.414684558602365085394E-3), + Scalar(1.866844370703555398195E-4), + Scalar(-6.345146083130515357861E-6), + Scalar(1.239754287483206878024E-7), + Scalar(-1.086076102793126632978E-9), + }; + + const Scalar one = Scalar(1.0); + Scalar w = one / x; + Scalar f = (internal::ppolevl::run(w, A3) / + internal::ppolevl::run(w, B3)); + f = w * f + one; + return numext::exp(x) * w * f; +} + +template +struct expint_op { + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar + operator()(const Scalar& x) const { + const Scalar zero = Scalar(0.0); + const Scalar two = Scalar(2.0); + const Scalar four = Scalar(4.0); + const Scalar eight = Scalar(8.0); + const Scalar sixteen = Scalar(16.0); + const Scalar thirty_two = Scalar(32.0); + const Scalar sixty_four = Scalar(64.0); + const Scalar nan = Scalar(NumTraits::quiet_NaN()); + + if (x < zero) { + return nan; + } + + if (x < two) { + return generic_expint_interval_1(x); + } else if (x < four) { + return generic_expint_interval_2(x); + } else if (x < eight) { + return generic_expint_interval_3(x); + } else if (x < sixteen) { + return generic_expint_interval_4(x); + } else if (x < thirty_two) { + return generic_expint_interval_5(x); + } else if (x < sixty_four) { + return generic_expint_interval_6(x); + } + return generic_expint_interval_7(x); + } +}; + +// Implementation of Fresnel cosine and sine integrals, based on Cephes. + +template +EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar +generic_fresnel_cos_interval_1(const Scalar& x) { + const Scalar CN[] = { + Scalar(-4.98843114573573548651E-8), Scalar(9.50428062829859605134E-6), + Scalar(-6.45191435683965050962E-4), Scalar(1.88843319396703850064E-2), + Scalar(-2.05525900955013891793E-1), Scalar(9.99999999999999998822E-1), + }; + const Scalar CD[] = { + Scalar(3.99982968972495980367E-12), Scalar(9.15439215774657478799E-10), + Scalar(1.25001862479598821474E-7), Scalar(1.22262789024179030997E-5), + Scalar(8.68029542941784300606E-4), Scalar(4.12142090722199792936E-2), + Scalar(1.00000000000000000118E0), + }; + + const Scalar x2 = x * x; + Scalar x4 = x2 * x2; + return (x * internal::ppolevl::run(x4, CN) / + internal::ppolevl::run(x4, CD)); +} + +template +EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar +generic_fresnel_sin_interval_1(const Scalar& x) { + const Scalar SN[] = { + Scalar(-2.99181919401019853726E3), Scalar(7.08840045257738576863E5), + Scalar(-6.29741486205862506537E7), Scalar(2.54890880573376359104E9), + Scalar(-4.42979518059697779103E10), Scalar(3.18016297876567817986E11), + }; + const Scalar SD[] = { + Scalar(1.0), + Scalar(2.81376268889994315696E2), + Scalar(4.55847810806532581675E4), + Scalar(5.17343888770096400730E6), + Scalar(4.19320245898111231129E8), + Scalar(2.24411795645340920940E10), + Scalar(6.07366389490084639049E11), + }; + + const Scalar x2 = x * x; + Scalar x4 = x2 * x2; + Scalar z = x * x2; + return (z * internal::ppolevl::run(x4, SN) / + internal::ppolevl::run(x4, SD)); +} + +template +EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar +generic_fresnel_asymp(const Scalar& x, bool use_sin) { + const Scalar FN[] = { + Scalar(4.21543555043677546506E-1), Scalar(1.43407919780758885261E-1), + Scalar(1.15220955073585758835E-2), Scalar(3.45017939782574027900E-4), + Scalar(4.63613749287867322088E-6), Scalar(3.05568983790257605827E-8), + Scalar(1.02304514164907233465E-10), Scalar(1.72010743268161828879E-13), + Scalar(1.34283276233062758925E-16), Scalar(3.76329711269987889006E-20), + }; + const Scalar FD[] = { + Scalar(1.0), + Scalar(7.51586398353378947175E-1), + Scalar(1.16888925859191382142E-1), + Scalar(6.44051526508858611005E-3), + Scalar(1.55934409164153020873E-4), + Scalar(1.84627567348930545870E-6), + Scalar(1.12699224763999035261E-8), + Scalar(3.60140029589371370404E-11), + Scalar(5.88754533621578410010E-14), + Scalar(4.52001434074129701496E-17), + Scalar(1.25443237090011264384E-20), + }; + const Scalar GN[] = { + Scalar(5.04442073643383265887E-1), Scalar(1.97102833525523411709E-1), + Scalar(1.87648584092575249293E-2), Scalar(6.84079380915393090172E-4), + Scalar(1.15138826111884280931E-5), Scalar(9.82852443688422223854E-8), + Scalar(4.45344415861750144738E-10), Scalar(1.08268041139020870318E-12), + Scalar(1.37555460633261799868E-15), Scalar(8.36354435630677421531E-19), + Scalar(1.86958710162783235106E-22), + }; + const Scalar GD[] = { + Scalar(1.0), + Scalar(1.47495759925128324529E0), + Scalar(3.37748989120019970451E-1), + Scalar(2.53603741420338795122E-2), + Scalar(8.14679107184306179049E-4), + Scalar(1.27545075667729118702E-5), + Scalar(1.04314589657571990585E-7), + Scalar(4.60680728146520428211E-10), + Scalar(1.10273215066240270757E-12), + Scalar(1.38796531259578871258E-15), + Scalar(8.39158816283118707363E-19), + Scalar(1.86958710162783236342E-22), + }; + + const Scalar HALF_PI = Scalar(1.5707963267948966); + const Scalar PI = Scalar(EIGEN_PI); + const Scalar one = Scalar(1); + const Scalar half = Scalar(0.5); + + const Scalar x2 = x * x; + const Scalar t = one / pmul(PI, x2); + Scalar u = t * t; + + Scalar f = one - u * (internal::ppolevl::run(u, FN) / + internal::ppolevl::run(u, FD)); + Scalar g = (t * internal::ppolevl::run(u, GN) / + internal::ppolevl::run(u, GD)); + + const Scalar z = HALF_PI * x2; + const Scalar c = numext::cos(z); + const Scalar s = numext::sin(z); + const Scalar y = one / (PI * x); + if (use_sin) { + Scalar intermediate = f * c; + intermediate += g * s; + return half - intermediate * y; + } + Scalar intermediate = f * s; + intermediate -= g * c; + return half + intermediate * y; +} + +template +struct fresnel_cos_op { + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar + operator()(const Scalar& x) const { + const Scalar zero = Scalar(0.); + const Scalar half = Scalar(0.5); + const Scalar a = Scalar(2.5625); + const Scalar b = Scalar(36974.0); + + const Scalar abs_x = numext::abs(x); + + if (abs_x > b) { + if (x < zero) { + return -half; + } + return half; + } + + const Scalar x2 = x * x; + + Scalar fresnel_cos; + if (x2 < a) { + fresnel_cos = generic_fresnel_cos_interval_1(abs_x); + } else { + fresnel_cos = generic_fresnel_asymp(abs_x, false); + } + if (x < zero) { + return -fresnel_cos; + } + return fresnel_cos; + } +}; + +template +struct fresnel_sin_op { + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar + operator()(const Scalar& x) const { + const Scalar zero = Scalar(0.); + const Scalar half = Scalar(0.5); + const Scalar a = Scalar(2.5625); + const Scalar b = Scalar(36974.0); + const Scalar abs_x = numext::abs(x); + + if (abs_x > b) { + if (x < zero) { + return -half; + } + return half; + } + + const Scalar x2 = x * x; + + Scalar fresnel_sin; + if (x2 < a) { + fresnel_sin = generic_fresnel_sin_interval_1(abs_x); + } else { + fresnel_sin = generic_fresnel_asymp(abs_x, true); + } + + if (x < zero) { + return -fresnel_sin; + } + return fresnel_sin; + } +}; + +// Implementation of Spence's Integral based on Cephes. +template +struct spence_op { + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar + operator()(const Scalar& x) const { + const Scalar A[] = { + Scalar(4.65128586073990045278E-5), Scalar(7.31589045238094711071E-3), + Scalar(1.33847639578309018650E-1), Scalar(8.79691311754530315341E-1), + Scalar(2.71149851196553469920E0), Scalar(4.25697156008121755724E0), + Scalar(3.29771340985225106936E0), Scalar(1.00000000000000000126E0), + }; + const Scalar B[] = { + Scalar(6.90990488912553276999E-4), Scalar(2.54043763932544379113E-2), + Scalar(2.82974860602568089943E-1), Scalar(1.41172597751831069617E0), + Scalar(3.63800533345137075418E0), Scalar(5.03278880143316990390E0), + Scalar(3.54771340985225096217E0), Scalar(9.99999999999999998740E-1), + }; + const Scalar zero = Scalar(0.0); + const Scalar one = Scalar(1.0); + const Scalar three_halves = Scalar(1.5); + const Scalar two = Scalar(2.0); + const Scalar half = Scalar(0.5); + const Scalar nan = Scalar(NumTraits::quiet_NaN()); + // pi**2 / 6. + const Scalar PI2O6 = Scalar(EIGEN_PI * EIGEN_PI / 6.0); + + if (x < zero) { + return nan; + } else if (x == zero) { + return PI2O6; + } else if (x == one) { + return zero; + } + + Scalar y; + if (x < two) { + y = x; + } else { + y = one / x; + } + + Scalar w; + if (three_halves < y) { + w = one / y - one; + } else { + if (y < half) { + w = -y; + } else { + w = y - one; + } + } + Scalar spence = -w * (internal::ppolevl::run(w, A) / + internal::ppolevl::run(w, B)); + Scalar z = numext::log(y); + if (y < half) { + spence = -z * numext::log1p(-y) + PI2O6 - spence; + } + if (three_halves < x) { + spence = -half * z * z - spence; + } + return spence; + } +}; + +} // end namespace internal +} // end namespace Eigen + +namespace tensorflow { +namespace functor { + +template +struct dawsn : base> {}; + +template +struct expint : base> {}; + +template +struct fresnel_cos : base> {}; + +template +struct fresnel_sin : base> {}; + +template +struct spence : base> {}; + +// Bessel Functions + +template +struct bessel_i0 : base> {}; + +template +struct bessel_i0e : base> {}; + +template +struct bessel_i1 : base> {}; + +template +struct bessel_i1e : base> {}; + +template +struct bessel_k0 : base> {}; + +template +struct bessel_k0e : base> {}; + +template +struct bessel_k1 : base> {}; + +template +struct bessel_k1e : base> {}; + +template +struct bessel_j0 : base> {}; + +template +struct bessel_j1 : base> {}; + +template +struct bessel_y0 : base> {}; + +template +struct bessel_y1 : base> {}; + +} // end namespace functor +} // end namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_SPECIAL_MATH_SPECIAL_MATH_OP_MISC_IMPL_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/spectrogram.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/spectrogram.h new file mode 100644 index 0000000000000000000000000000000000000000..4b6b9c8ba687d25a30e54c06921ac2dd906a9f56 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/spectrogram.h @@ -0,0 +1,126 @@ +/* Copyright 2017 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +// Class for generating spectrogram slices from a waveform. +// Initialize() should be called before calls to other functions. Once +// Initialize() has been called and returned true, The Compute*() functions can +// be called repeatedly with sequential input data (ie. the first element of the +// next input vector directly follows the last element of the previous input +// vector). Whenever enough audio samples are buffered to produce a +// new frame, it will be placed in output. Output is cleared on each +// call to Compute*(). This class is thread-unsafe, and should only be +// called from one thread at a time. +// With the default parameters, the output of this class should be very +// close to the results of the following MATLAB code: +// overlap_samples = window_length_samples - step_samples; +// window = hann(window_length_samples, 'periodic'); +// S = abs(spectrogram(audio, window, overlap_samples)).^2; + +#ifndef TENSORFLOW_CORE_KERNELS_SPECTROGRAM_H_ +#define TENSORFLOW_CORE_KERNELS_SPECTROGRAM_H_ + +#include +#include +#include + +#include "third_party/fft2d/fft.h" +#include "tensorflow/core/framework/op_kernel.h" +#include "tensorflow/core/framework/tensor.h" + +namespace tensorflow { + +class Spectrogram { + public: + Spectrogram() : initialized_(false) {} + ~Spectrogram() {} + + // Initializes the class with a given window length and step length + // (both in samples). Internally a Hann window is used as the window + // function. Returns true on success, after which calls to Process() + // are possible. window_length must be greater than 1 and step + // length must be greater than 0. + bool Initialize(int window_length, int step_length); + + // Initialize with an explicit window instead of a length. + bool Initialize(const std::vector& window, int step_length); + + // Reset internal variables. + // Spectrogram keeps internal state: remaining input data from previous call. + // As a result it can produce different number of frames when you call + // ComputeComplexSpectrogram multiple times (even though input data + // has the same size). As it is shown in + // MultipleCallsToComputeComplexSpectrogramMayYieldDifferentNumbersOfFrames + // in tensorflow/core/kernels/spectrogram_test.cc. + // But if you need to compute Spectrogram on input data without keeping + // internal state (and clear remaining input data from the previous call) + // you have to call Reset() before computing Spectrogram. + // For example in tensorflow/core/kernels/spectrogram_op.cc + bool Reset(); + + // Processes an arbitrary amount of audio data (contained in input) + // to yield complex spectrogram frames. After a successful call to + // Initialize(), Process() may be called repeatedly with new input data + // each time. The audio input is buffered internally, and the output + // vector is populated with as many temporally-ordered spectral slices + // as it is possible to generate from the input. The output is cleared + // on each call before the new frames (if any) are added. + // + // The template parameters can be float or double. + template + bool ComputeComplexSpectrogram( + const std::vector& input, + std::vector>>* output); + + // This function works as the one above, but returns the power + // (the L2 norm, or the squared magnitude) of each complex value. + template + bool ComputeSquaredMagnitudeSpectrogram( + const std::vector& input, + std::vector>* output); + + // Return reference to the window function used internally. + const std::vector& GetWindow() const { return window_; } + + // Return the number of frequency channels in the spectrogram. + int output_frequency_channels() const { return output_frequency_channels_; } + + private: + template + bool GetNextWindowOfSamples(const std::vector& input, + int* input_start); + void ProcessCoreFFT(); + + int fft_length_; + int output_frequency_channels_; + int window_length_; + int step_length_; + bool initialized_; + int samples_to_next_step_; + + std::vector window_; + std::vector fft_input_output_; + std::deque input_queue_; + + // Working data areas for the FFT routines. + std::vector fft_integer_working_area_; + std::vector fft_double_working_area_; + + Spectrogram(const Spectrogram&) = delete; + void operator=(const Spectrogram&) = delete; +}; + +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_SPECTROGRAM_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/spectrogram_test_utils.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/spectrogram_test_utils.h new file mode 100644 index 0000000000000000000000000000000000000000..d4187076e748af5454e6dd03d05e49d923f1e9d2 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/spectrogram_test_utils.h @@ -0,0 +1,81 @@ +/* Copyright 2017 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_KERNELS_SPECTROGRAM_TEST_UTILS_H_ +#define TENSORFLOW_CORE_KERNELS_SPECTROGRAM_TEST_UTILS_H_ + +#include +#include +#include + +#include "tensorflow/core/framework/types.h" + +namespace tensorflow { + +// Reads a wav format file into a vector of floating-point values with range +// -1.0 to 1.0. +bool ReadWaveFileToVector(const string& file_name, std::vector* data); + +// Reads a binary file containing 32-bit floating point values in the +// form [real_1, imag_1, real_2, imag_2, ...] into a rectangular array +// of complex values where row_length is the length of each inner vector. +bool ReadRawFloatFileToComplexVector( + const string& file_name, int row_length, + std::vector > >* data); + +// Reads a CSV file of numbers in the format 1.1+2.2i,1.1,2.2i,3.3j into data. +void ReadCSVFileToComplexVectorOrDie( + const string& file_name, + std::vector > >* data); + +// Reads a 2D array of floats from an ASCII text file, where each line is a row +// of the array, and elements are separated by commas. +void ReadCSVFileToArrayOrDie(const string& filename, + std::vector >* array); + +// Write a binary file containing 64-bit floating-point values for +// reading by, for example, MATLAB. +bool WriteDoubleVectorToFile(const string& file_name, + const std::vector& data); + +// Write a binary file containing 32-bit floating-point values for +// reading by, for example, MATLAB. +bool WriteFloatVectorToFile(const string& file_name, + const std::vector& data); + +// Write a binary file containing 64-bit floating-point values for +// reading by, for example, MATLAB. +bool WriteDoubleArrayToFile(const string& file_name, int size, + const double* data); + +// Write a binary file containing 32-bit floating-point values for +// reading by, for example, MATLAB. +bool WriteFloatArrayToFile(const string& file_name, int size, + const float* data); + +// Write a binary file in the format read by +// ReadRawDoubleFileToComplexVector above. +bool WriteComplexVectorToRawFloatFile( + const string& file_name, + const std::vector > >& data); + +// Generate a sine wave with the provided parameters, and populate +// data with the samples. +void SineWave(int sample_rate, float frequency, float duration_seconds, + std::vector* data); + +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_SPECTROGRAM_TEST_UTILS_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/split_lib.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/split_lib.h new file mode 100644 index 0000000000000000000000000000000000000000..28257ed401d12d20b7d30c92b69ef7eb82841eab --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/split_lib.h @@ -0,0 +1,55 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_KERNELS_SPLIT_LIB_H_ +#define TENSORFLOW_CORE_KERNELS_SPLIT_LIB_H_ +// Functor definition for SplitOp, must be compilable by nvcc. + +#include "unsupported/Eigen/CXX11/Tensor" // from @eigen_archive +#include "tensorflow/core/framework/tensor_types.h" + +namespace tensorflow { +namespace functor { + +template +struct SplitCustom { + void operator()(const Device& d, typename TTypes::Tensor output, + typename TTypes::ConstTensor input, + const Eigen::DSizes& slice_indices, + const Eigen::DSizes& slice_sizes); +}; + +template +struct Split { + void operator()(const Device& d, typename TTypes::Tensor output, + typename TTypes::ConstTensor input, + const Eigen::DSizes& slice_indices, + const Eigen::DSizes& slice_sizes); +}; + +template +struct Split { + void operator()(const Eigen::ThreadPoolDevice& d, + typename TTypes::Tensor output, + typename TTypes::ConstTensor input, + const Eigen::DSizes& slice_indices, + const Eigen::DSizes& slice_sizes); +}; + + +} // namespace functor +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_SPLIT_LIB_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/split_lib_gpu.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/split_lib_gpu.h new file mode 100644 index 0000000000000000000000000000000000000000..ae767b07a42536553e5d80df8b26622ec40aae8a --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/split_lib_gpu.h @@ -0,0 +1,60 @@ +/* Copyright 2019 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_KERNELS_SPLIT_LIB_GPU_H_ +#define TENSORFLOW_CORE_KERNELS_SPLIT_LIB_GPU_H_ + +#define EIGEN_USE_THREADS +#define EIGEN_USE_GPU + +#include +#include + +#include "unsupported/Eigen/CXX11/Tensor" // from @eigen_archive +#include "tensorflow/core/framework/register_types.h" +#include "tensorflow/core/kernels/gpu_device_array_gpu.h" +#include "tensorflow/core/kernels/split_lib.h" + +namespace tensorflow { + +template +struct SplitOpGPULaunch { + void Run(const Eigen::GpuDevice& d, const T* input, int32_t prefix_dim_size, + int32_t split_dim_size, int32_t suffix_dim_size, + const GpuDeviceArrayStruct& output_ptr_data); +}; + +template +struct SplitVOpGPULaunch { + void Run(const Eigen::GpuDevice& d, bool fixed, const T* input, + int total_cols, int total_rows, + const GpuDeviceArrayStruct& output_scan, + const GpuDeviceArrayStruct& output_ptr_data); +}; + +// Explicit instantiations in split_lib_gpu.cu.cc. +#define REGISTER_GPU_KERNEL(T) \ + extern template struct SplitOpGPULaunch; \ + extern template struct SplitVOpGPULaunch; \ + extern template struct SplitVOpGPULaunch; \ + extern template struct SplitVOpGPULaunch; + +TF_CALL_uint8(REGISTER_GPU_KERNEL); +TF_CALL_GPU_ALL_TYPES(REGISTER_GPU_KERNEL); +#undef REGISTER_GPU_KERNEL + +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_SPLIT_LIB_GPU_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/squared-loss.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/squared-loss.h new file mode 100644 index 0000000000000000000000000000000000000000..7222813bbbf82353cf694cac5e04816a4149af30 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/squared-loss.h @@ -0,0 +1,73 @@ +/* Copyright 2016 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_KERNELS_SQUARED_LOSS_H_ +#define TENSORFLOW_CORE_KERNELS_SQUARED_LOSS_H_ + +#include "tensorflow/core/kernels/loss.h" + +namespace tensorflow { + +class SquaredLossUpdater : public DualLossUpdater { + public: + // Closed form solution that decreases the dual squared loss. + // See page 23 of http://arxiv.org/pdf/1309.2375v2.pdf for the derivation of + // the update rule when the example weights are equal to 1.0. + // Note: There is a typo in the formula in the paper: the denominator should + // be 1 + ||x_i||^2/(\lambda n) (without the 2 multiplier). + // + // The CoCoA+ modification is detailed in readme.md. + double ComputeUpdatedDual(const int num_loss_partitions, const double label, + const double example_weight, + const double current_dual, const double wx, + const double weighted_example_norm) const final { + const double delta_numerator = label - current_dual - wx; + const double delta_denominator = + 1 + num_loss_partitions * weighted_example_norm * example_weight; + return current_dual + delta_numerator / delta_denominator; + } + + // Dual of squared loss function. + // https://en.wikipedia.org/wiki/Convex_conjugate + double ComputeDualLoss(const double current_dual, const double example_label, + const double example_weight) const final { + // Dual of the squared loss function = b * (y + b/2), where b is the + // dual variable and y is the label. This is Dual(-b). + return current_dual * (0.5 * current_dual - example_label) * example_weight; + } + + // Squared loss for linear regression. + double ComputePrimalLoss(const double wx, const double example_label, + const double example_weight) const final { + const double error = wx - example_label; + return error * error * example_weight * 0.5; + } + + inline double PrimalLossDerivative(const double wx, const double label, + const double example_weight) const final { + return (wx - label) * example_weight; + } + + inline double SmoothnessConstant() const final { return 1.0; } + + // Labels don't require conversion for linear regression. + Status ConvertLabel(float* const example_label) const final { + return OkStatus(); + } +}; + +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_SQUARED_LOSS_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/stack.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/stack.h new file mode 100644 index 0000000000000000000000000000000000000000..a9c6a6074059bee7d223326a601c2607e89499ba --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/stack.h @@ -0,0 +1,77 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_KERNELS_STACK_H_ +#define TENSORFLOW_CORE_KERNELS_STACK_H_ + +// See docs in ../ops/data_flow_ops.cc. + +#include "tensorflow/core/framework/op_kernel.h" +#include "tensorflow/core/framework/types.h" +#include "tensorflow/core/platform/types.h" + +namespace tensorflow { + +// A per-run local stack. The stack uses a "per-step" resource manager which +// ensures that correct garbage collection on error or successful completion. +class StackOp : public OpKernel { + public: + explicit StackOp(OpKernelConstruction* context); + void Compute(OpKernelContext* ctx) override; + + private: + DataType elem_type_; + string stack_name_; + + StackOp(const StackOp&) = delete; + void operator=(const StackOp&) = delete; +}; + +class StackPushOp : public AsyncOpKernel { + public: + StackPushOp(OpKernelConstruction* context, bool allow_swapping); + void ComputeAsync(OpKernelContext* ctx, DoneCallback done) override; + bool IsExpensive() override; + + private: + bool swap_memory_ = false; +}; + +// Templated helper to make it easier to register kernels with or without +// swapping. +template +class TemplatedStackPushOp : public StackPushOp { + public: + TemplatedStackPushOp(OpKernelConstruction* context) + : StackPushOp(context, allow_swapping) {} +}; + +class StackPopOp : public AsyncOpKernel { + public: + explicit StackPopOp(OpKernelConstruction* context); + void ComputeAsync(OpKernelContext* ctx, DoneCallback done) override; + bool IsExpensive() override; +}; + +class StackCloseOp : public OpKernel { + public: + explicit StackCloseOp(OpKernelConstruction* context); + void Compute(OpKernelContext* ctx) override; + bool IsExpensive() override; +}; + +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_STACK_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/stateful_random_ops.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/stateful_random_ops.h new file mode 100644 index 0000000000000000000000000000000000000000..21a08fa03778d14d158da0863b9e2a08a489c92b --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/stateful_random_ops.h @@ -0,0 +1,42 @@ +/* Copyright 2019 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_KERNELS_STATEFUL_RANDOM_OPS_H_ +#define TENSORFLOW_CORE_KERNELS_STATEFUL_RANDOM_OPS_H_ + +#include "tensorflow/core/framework/types.h" +#include "tensorflow/core/lib/random/philox_random.h" + +namespace tensorflow { + +// 'Variable' doesn't support uint32 or uint64 yet (due to reasons explained +// in b/111604096 and cl/171681867), so we use signed int here. We choose int64 +// instead of int32 because `VarHandleOp` doesn't support int32 on GPU, and +// because of the "int32 problem". +using StateElementType = int64_t; +static constexpr DataType STATE_ELEMENT_DTYPE = DT_INT64; +static constexpr DataType ALGORITHM_DTYPE = STATE_ELEMENT_DTYPE; + +using random::PhiloxRandom; + +static constexpr int64_t PHILOX_MIN_STATE_SIZE = + (PhiloxRandom::ResultType::kElementCount + + PhiloxRandom::Key::kElementCount) / + 2; +static constexpr int64_t THREEFRY_MIN_STATE_SIZE = 2; + +} // end namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_STATEFUL_RANDOM_OPS_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/stateful_random_ops_cpu_gpu.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/stateful_random_ops_cpu_gpu.h new file mode 100644 index 0000000000000000000000000000000000000000..74eb40f3513fc0bb1c564966d41833221051bb40 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/stateful_random_ops_cpu_gpu.h @@ -0,0 +1,114 @@ +/* Copyright 2019 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_KERNELS_STATEFUL_RANDOM_OPS_CPU_GPU_H_ +#define TENSORFLOW_CORE_KERNELS_STATEFUL_RANDOM_OPS_CPU_GPU_H_ + +#include "tensorflow/core/kernels/random_ops_util.h" +#include "tensorflow/core/kernels/stateful_random_ops.h" + +namespace tensorflow { + +PHILOX_DEVICE_INLINE PhiloxRandom +GetPhiloxRandomFromMem(StateElementType const* ptr) { + auto ptr_ = reinterpret_cast(ptr); + return GetPhiloxRandomFromCounterKeyMem(ptr_, ptr_ + 2); +} + +PHILOX_DEVICE_INLINE void WritePhiloxRandomToMem(PhiloxRandom const& philox, + StateElementType* ptr) { + auto ptr_ = reinterpret_cast(ptr); + WriteCounterToMem(philox.counter(), ptr_); + WriteKeyToMem(philox.key(), ptr_ + 2); +} + +PHILOX_DEVICE_INLINE PhiloxRandom SkipPhiloxRandom(PhiloxRandom const& philox, + uint64 output_size) { + auto new_philox = philox; + // Multiplier 256 is the same as in FillPhiloxRandomTask; do not change it + // just here. + auto delta = output_size * 256; + new_philox.Skip(delta); // do the actual increasing + return new_philox; +} + +PHILOX_DEVICE_INLINE void UpdateMemWithPhiloxRandom(PhiloxRandom const& philox, + uint64 output_size, + StateElementType* ptr) { + auto new_philox = SkipPhiloxRandom(philox, output_size); + WritePhiloxRandomToMem(new_philox, ptr); +} + +PHILOX_DEVICE_INLINE void UpdateCounterMemWithPhiloxRandom( + PhiloxRandom::ResultType const& counter, uint64 output_size, + StateElementType* ptr) { + auto philox = PhiloxRandom(counter, PhiloxRandom::Key() /*dummy*/); + auto new_philox = SkipPhiloxRandom(philox, output_size); + WriteCounterToMem(new_philox.counter(), reinterpret_cast(ptr)); +} + +namespace functor { + +// A per-device helper function that does the actual work for +// `UpdateVariableAndFill`. +// Reason to use functor: C++ doesn't allow function-template partial +// specialization. +template +struct UpdateVariableAndFill_Philox; + +template +struct RngSkip_Philox; + +} // end namespace functor + +using CPUDevice = Eigen::ThreadPoolDevice; + +class ScopedUnlockUnrefVar; + +struct UpdateVariableAndFill_Philox_Arg { + int64_t output_size; + int64_t alg_tag_skip; + ScopedUnlockUnrefVar* state_var_guard; + Tensor* state_tensor; +}; + +#if GOOGLE_CUDA || TENSORFLOW_USE_ROCM + +using GPUDevice = Eigen::GpuDevice; + +namespace functor { + +// Declares the partially GPU-specialized functor structs. +// must be kept at <=6 arguments because of a gcc/clang ABI incompatibility bug +template +struct UpdateVariableAndFill_Philox { + void operator()(OpKernelContext* ctx, const GPUDevice& device, + Distribution dist, UpdateVariableAndFill_Philox_Arg* arg, + typename Distribution::ResultElementType* output_data); +}; + +template <> +struct RngSkip_Philox { + void operator()(const GPUDevice& device, const StateElementType* in_data, + uint64 delta, StateElementType* out_data); +}; + +} // end namespace functor + +#endif // GOOGLE_CUDA || TENSORFLOW_USE_ROCM + +} // end namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_STATEFUL_RANDOM_OPS_CPU_GPU_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/stateless_random_gamma_op.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/stateless_random_gamma_op.h new file mode 100644 index 0000000000000000000000000000000000000000..4b81863cfe0b6919637594e0473db3a2fec720c5 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/stateless_random_gamma_op.h @@ -0,0 +1,90 @@ +/* Copyright 2020 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_KERNELS_STATELESS_RANDOM_GAMMA_OP_H_ +#define TENSORFLOW_CORE_KERNELS_STATELESS_RANDOM_GAMMA_OP_H_ + +#include "tensorflow/core/framework/op_kernel.h" +#include "tensorflow/core/lib/core/status.h" +#include "tensorflow/core/lib/random/philox_random.h" + +namespace tensorflow { + +namespace functor { + +// This functor can take the PhiloxRandom input from either device memory `key` +// and `counter` or a stack value `random`. If both `key` and `counter` are not +// nullptr, they provide the input; otherwise `random` provides the input. +template +struct StatelessRandomGammaFunctor { + static Status Fill(OpKernelContext* ctx, const T* alpha_flat, + int64_t num_samples, int64_t num_alphas, + int64_t samples_per_alpha, const uint64* key, + const uint64* counter, const random::PhiloxRandom& random, + T* samples_flat); +}; + +} // namespace functor + +// Buffer that holds multiple samples. Operator()(random::PhiloxRandom*) returns +// a single sample from this buffer. If the buffer is empty, it first generates +// new samples using the provided distribution. +// +// If the call to Distribution::operator() returns samples[0...N-1], then this +// class returns samples in the following order: +// +// samples[N-1], samples[N-2],..., samples[1], samples[0] +// +// For comparison, random::SingleSampleAdapter returns samples in +// the following order: +// +// samples[0], samples[1],...,samples[N-2], samples[N-1]. +// +template +class RandomSampleBuffer { + public: + typedef typename Distribution::ResultElementType ResultElementType; + + PHILOX_DEVICE_INLINE + explicit RandomSampleBuffer(Distribution* distribution) + : distribution_(distribution), remaining_numbers_(0) {} + + PHILOX_DEVICE_INLINE + ResultElementType operator()(random::PhiloxRandom* random) { + if (remaining_numbers_ == 0) { + results_ = (*distribution_)(random); + remaining_numbers_ = Distribution::kResultElementCount; + } + + remaining_numbers_--; + return results_[remaining_numbers_]; + } + + // Mark this buffer as empty. The next call to operator() will fill it + // with new random numbers. + PHILOX_DEVICE_INLINE + void Clear() { remaining_numbers_ = 0; } + + private: + typedef typename Distribution::ResultType ResultType; + + Distribution* distribution_; + ResultType results_; + int remaining_numbers_; +}; + +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_STATELESS_RANDOM_GAMMA_OP_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/stateless_random_ops.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/stateless_random_ops.h new file mode 100644 index 0000000000000000000000000000000000000000..40f758abc272b9132a25a5f4d9e81fb40b9526fd --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/stateless_random_ops.h @@ -0,0 +1,50 @@ +/* Copyright 2018 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_KERNELS_STATELESS_RANDOM_OPS_H_ +#define TENSORFLOW_CORE_KERNELS_STATELESS_RANDOM_OPS_H_ + +#include "tensorflow/core/framework/op_kernel.h" +#include "tensorflow/core/framework/tensor.h" +#include "tensorflow/core/lib/random/random_distributions.h" + +namespace tensorflow { + +// Generates a key and counter that can be used to seed a PhiloxRandom, +// generator, based on the seed value in `seed_t`. +// +// REQUIRES: `seed_t` must be a length-2 vector of type DT_INT{32,64}. +// `out_key` and `out_counter` must be non-null. +Status GenerateKey(Tensor seed_t, random::PhiloxRandom::Key* out_key, + random::PhiloxRandom::ResultType* out_counter); + +// A base class for kernels of stateless RNG ops that take shape and seed as the +// first 2 inputs. +class StatelessRandomOpBase : public OpKernel { + public: + explicit StatelessRandomOpBase(OpKernelConstruction* context); + + void Compute(OpKernelContext* context) override; + + protected: + // The part of Compute that depends on device, type, and distribution. + // Must be a tail call because it doesn't report error via return value. + virtual void Fill(OpKernelContext* context, random::PhiloxRandom random, + Tensor* output) = 0; +}; + +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_STATELESS_RANDOM_OPS_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/stateless_random_ops_v2.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/stateless_random_ops_v2.h new file mode 100644 index 0000000000000000000000000000000000000000..f88e5330041f6bc021fad6b00af3bf9803cdcd5d --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/stateless_random_ops_v2.h @@ -0,0 +1,61 @@ +/* Copyright 2020 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_KERNELS_STATELESS_RANDOM_OPS_V2_H_ +#define TENSORFLOW_CORE_KERNELS_STATELESS_RANDOM_OPS_V2_H_ + +#include "tensorflow/core/framework/op_kernel.h" +#include "tensorflow/core/framework/rng_alg.h" +#include "tensorflow/core/framework/tensor_shape.h" + +namespace tensorflow { + +inline Status CheckKeyCounterShape(int minimum_counter_size, + TensorShape const& key_shape, + TensorShape const& counter_shape) { + if (!(key_shape.dims() == 1 && key_shape.dim_size(0) == RNG_KEY_SIZE)) { + return errors::InvalidArgument( + "key must have shape [", RNG_KEY_SIZE, "], not ", + key_shape.DebugString(), + ". (Note that batched keys are not supported yet.)"); + } + if (!(counter_shape.dims() == 1 && + counter_shape.dim_size(0) >= minimum_counter_size)) { + return errors::InvalidArgument( + "counter must be a vector with length at least ", minimum_counter_size, + "; got shape: ", counter_shape.DebugString(), + ". (Note that batched counters are not supported yet.)"); + } + return OkStatus(); +} + +// A base class for kernels of stateless RNG ops that take shape, key, counter +// and algorithm as the first 4 inputs. +class StatelessRandomOpBaseWithKeyCounter : public OpKernel { + public: + explicit StatelessRandomOpBaseWithKeyCounter(OpKernelConstruction* ctx); + + void Compute(OpKernelContext* ctx) override; + + protected: + // The part of Compute that depends on device, type, and distribution. + // Must be a tail call because it doesn't report error via return value. + virtual void Fill(OpKernelContext* ctx, Algorithm alg, const Tensor& key, + const Tensor& counter, Tensor* output) = 0; +}; + +} // end namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_STATELESS_RANDOM_OPS_V2_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/stateless_random_ops_v2_util.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/stateless_random_ops_v2_util.h new file mode 100644 index 0000000000000000000000000000000000000000..8744d848e869bae68b4d3efbd3e0bbb4ddbb3abf --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/stateless_random_ops_v2_util.h @@ -0,0 +1,86 @@ +/* Copyright 2022 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_KERNELS_STATELESS_RANDOM_OPS_V2_UTIL_H_ +#define TENSORFLOW_CORE_KERNELS_STATELESS_RANDOM_OPS_V2_UTIL_H_ + +// Utilities for V2 stateless random ops' (non-XLA) kernels. + +#include + +#include "tensorflow/core/framework/op_kernel.h" +#include "tensorflow/core/kernels/random_op.h" +#include "tensorflow/core/kernels/stateless_random_ops_v2.h" +#include "tensorflow/core/lib/random/random_distributions.h" + +namespace tensorflow { + +template +Status GetScalar(const Tensor& tensor, int input_idx, T* result) { + auto dtype = DataTypeToEnum::v(); + if (tensor.dims() != 0) { + return errors::InvalidArgument("input ", std::to_string(input_idx), + " (0-based) must have shape [], not ", + tensor.shape().DebugString()); + } + if (tensor.dtype() != dtype) { + return errors::InvalidArgument("dtype of input ", std::to_string(input_idx), + " (0-based) must be ", DataTypeString(dtype), + ", not ", DataTypeString(tensor.dtype())); + } + *result = tensor.flat()(0); + return OkStatus(); +} + +inline StatusOr > +GetKeyCounterAlgFromInputs(OpKernelContext* ctx, int key_input_idx, + int counter_input_idx, int alg_input_idx) { + const Tensor& key_t = ctx->input(key_input_idx); + const Tensor& counter_t = ctx->input(counter_input_idx); + const Tensor& alg_t = ctx->input(alg_input_idx); + + int alg_id; + TF_RETURN_IF_ERROR(GetScalar(alg_t, alg_input_idx, &alg_id)); + Algorithm alg = Algorithm(alg_id); + if (alg == RNG_ALG_AUTO_SELECT) { + alg = RNG_ALG_PHILOX; + } + + TF_RETURN_IF_ERROR( + CheckKeyCounterShape(alg, key_t.shape(), counter_t.shape())); + return std::make_tuple(key_t, counter_t, alg); +} + +template +void FillRandomTensor(OpKernelContext* ctx, Algorithm alg, const Tensor& key, + const Tensor& counter, Distribution dist, + Tensor* tensor) { + typedef typename Distribution::ResultElementType T; + auto flat = tensor->flat(); + if (alg == RNG_ALG_PHILOX) { + // Reuse the compute kernels from the stateful random ops + auto key_data = key.flat().data(); + auto counter_data = counter.flat().data(); + functor::FillPhiloxRandom()( + ctx, ctx->eigen_device(), key_data, counter_data, + random::PhiloxRandom() /*dummy*/, flat.data(), flat.size(), dist); + } else { + OP_REQUIRES(ctx, false, + errors::InvalidArgument("Unsupported algorithm id: ", alg)); + } +} +} // end namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_STATELESS_RANDOM_OPS_V2_UTIL_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/stochastic_cast_op.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/stochastic_cast_op.h new file mode 100644 index 0000000000000000000000000000000000000000..508bf55bde33f64a7912f404bd422793bd44217a --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/stochastic_cast_op.h @@ -0,0 +1,140 @@ +/* Copyright 2022 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_KERNELS_STOCHASTIC_CAST_OP_H_ +#define TENSORFLOW_CORE_KERNELS_STOCHASTIC_CAST_OP_H_ + +#include +#include + +#include "Eigen/Core" // from @eigen_archive +#include "unsupported/Eigen/CXX11/Tensor" // from @eigen_archive +#include "tensorflow/core/framework/op_kernel.h" +#include "tensorflow/core/framework/rng_alg.h" +#include "tensorflow/core/framework/tensor_shape.h" +#include "tensorflow/core/lib/random/random_distributions.h" +#include "tensorflow/core/platform/macros.h" + +namespace tensorflow { +namespace internal { + +// Base class that dispatches random algorithm, key and counter for +// StochasticCast ops. +class StochasticCastOpBase : public OpKernel { + public: + explicit StochasticCastOpBase(OpKernelConstruction* ctx) : OpKernel(ctx) {} + + void Compute(OpKernelContext* ctx) override; + + protected: + // Subclasses can implement this rounding kernel with assumption that random + // algorithm, key, counter have been given. + virtual void RoundOff(OpKernelContext* ctx, Algorithm alg, const Tensor& key, + const Tensor& counter, Tensor* output) = 0; +}; + +} // namespace internal +} // namespace tensorflow + +namespace Eigen { +namespace internal { + +template +struct StochasticRoundToIntOp { + static_assert(std::is_integral::value, + "Integer type expected"); + typedef tensorflow::random::UniformDistribution + Distribution; + const Scalar max = + static_cast(std::numeric_limits::max()); + const Scalar min = + static_cast(std::numeric_limits::min()); + + EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC explicit StochasticRoundToIntOp( + Generator* g) + : gen(g) {} + + EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC Scalar + operator()(const Scalar& s) const { + if (TF_PREDICT_FALSE(Eigen::numext::isnan(s))) { + return Scalar{0}; + } + if (s >= max) { + return max; + } + if (s <= min) { + return min; + } + // Already integer, doesn't need to be rounded. + if (Eigen::numext::floor(s) == s) { + return s; + } + // In order to match comparison-based algorithm on some hardware + // implementations which rounds abs(operand) up when random < + // abs(fractional), we deal with positive and negative operands differently. + // TODO(b/232442915): Revisit RNG multi-threading issue when needed. + Distribution dist; + Scalar random = dist(gen)[0]; + if (s < 0) { + return Eigen::numext::floor(s + random); + } else { + return Eigen::numext::floor(s + Scalar{1} - random); + } + } + + template + EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC Packet packetOp(const Packet& p) const { + constexpr size_t kPacketSize = + Eigen::internal::unpacket_traits::size; + Scalar unpacked_random[kPacketSize]; + Distribution dist; + auto const sample = dist(gen); + for (int i = 0; i < kPacketSize; i += Distribution::kResultElementCount) { + int granularity = std::min(Distribution::kResultElementCount, + static_cast(kPacketSize - i)); + std::copy(&sample[0], &sample[0] + granularity, &unpacked_random[i]); + } + Packet random = pload(unpacked_random); + Packet rounded = + pselect(pcmp_eq(pfloor(p), p), p, + pselect(pcmp_lt(p, pzero(p)), pfloor(padd(p, random)), + pfloor(padd(p, psub(pset1(1), random))))); + // Handles out of range inputs. + Packet result = + pselect(pcmp_le(pset1(max), p), pset1(max), rounded); + result = + pselect(pcmp_le(p, pset1(min)), pset1(min), result); + // Handles NaN input. + return pselect(pcmp_eq(p, p), result, pset1(0)); + } + Generator* gen; +}; + +template +struct functor_traits< + StochasticRoundToIntOp> { + enum { + Cost = 3 * NumTraits::AddCost, + PacketAccess = + packet_traits::HasCmp && packet_traits::HasFloor, + }; +}; + +// TODO(b/232442915): Add support for rounding floats to lower precision floats. + +} // namespace internal +} // namespace Eigen + +#endif // TENSORFLOW_CORE_KERNELS_STOCHASTIC_CAST_OP_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/strided_slice_op.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/strided_slice_op.h new file mode 100644 index 0000000000000000000000000000000000000000..439f22e751cf95d300aa6b44d3aea80d14b00dfd --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/strided_slice_op.h @@ -0,0 +1,123 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_KERNELS_STRIDED_SLICE_OP_H_ +#define TENSORFLOW_CORE_KERNELS_STRIDED_SLICE_OP_H_ + +// Functor definition for StridedSliceOp, must be compilable by nvcc. + +#include "unsupported/Eigen/CXX11/Tensor" // from @eigen_archive +#include "tensorflow/core/framework/resource_handle.h" +#include "tensorflow/core/framework/tensor_types.h" +#include "tensorflow/core/framework/variant_encode_decode.h" +#include "tensorflow/core/platform/types.h" +#include "tensorflow/core/util/strided_slice_op.h" + +namespace tensorflow { +namespace functor { + +template +struct StridedSlice { + void operator()(const Device& d, typename TTypes::Tensor output, + typename TTypes::ConstTensor input, + const Eigen::DSizes& start_indices, + const Eigen::DSizes& stop_indices, + const Eigen::DSizes& strides) { + MaybeWith32BitIndexing( + [&](auto output32, auto input32, const auto& start_indices32, + const auto& stop_indices32, const auto& strides32) { + output32.device(d) = + input32.stridedSlice(start_indices32, stop_indices32, strides32); + }, + output, input, start_indices, stop_indices, strides); + } +}; + +template +struct InitOutput { + static void run(const Device& d, typename TTypes::Tensor output) { + output.device(d) = output.constant(T(0)); + } +}; + +template +struct InitOutput { + static void run(const Device& d, + typename TTypes::Tensor output) { + output.device(d) = output.constant(ResourceHandle()); + } +}; + +template +struct InitOutput { + static void run(const Device& d, + typename TTypes::Tensor output) { + output.device(d) = output.constant(tstring()); + } +}; + +template +struct StridedSliceGrad { + void operator()(const Device& d, typename TTypes::Tensor output, + typename TTypes::ConstTensor input, + const Eigen::DSizes& start_indices, + const Eigen::DSizes& stop_indices, + const Eigen::DSizes& strides) { + InitOutput::run(d, output); + MaybeWith32BitIndexing( + [&](auto output32, const auto& start_indices32, + const auto& stop_indices32, const auto& strides32) { + output32.stridedSlice(start_indices32, stop_indices32, strides32) + .device(d) = input; + }, + output, start_indices, stop_indices, strides); + } +}; + +template +struct StridedSliceAssign { + void operator()(const Device& d, typename TTypes::Tensor output, + typename TTypes::ConstTensor input, + const Eigen::DSizes& start_indices, + const Eigen::DSizes& stop_indices, + const Eigen::DSizes& strides, + const StridedSliceAssignBCast& bcast) { + MaybeWith32BitIndexing( + [&](auto output32, auto input32, const auto& start_indices32, + const auto& stop_indices32, const auto& strides32) { + if (bcast.IsBroadcastingRequired()) { + output32.stridedSlice(start_indices32, stop_indices32, strides32) + .device(d) = input32.broadcast(bcast.bcast()); + } else { + output32.stridedSlice(start_indices32, stop_indices32, strides32) + .device(d) = input32; + } + }, + output, input, start_indices, stop_indices, strides); + } +}; + +template +struct StridedSliceAssignScalar { + void operator()(const Device& d, typename TTypes::Tensor output, + typename TTypes::ConstTensor input) { + output.device(d) = input; + } +}; + +} // namespace functor +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_STRIDED_SLICE_OP_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/strided_slice_op_gpu_impl.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/strided_slice_op_gpu_impl.h new file mode 100644 index 0000000000000000000000000000000000000000..23a3ff8606e99359bd3a03e1b03d134c7df2c8a4 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/strided_slice_op_gpu_impl.h @@ -0,0 +1,63 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_KERNELS_STRIDED_SLICE_OP_GPU_IMPL_H_ +#define TENSORFLOW_CORE_KERNELS_STRIDED_SLICE_OP_GPU_IMPL_H_ + +#if GOOGLE_CUDA || TENSORFLOW_USE_ROCM + +#define EIGEN_USE_GPU + +#include "tensorflow/core/kernels/strided_slice_op.h" + +#include "tensorflow/core/framework/register_types.h" +#include "tensorflow/core/framework/tensor_types.h" +#include "tensorflow/core/platform/types.h" + +namespace tensorflow { + +typedef Eigen::GpuDevice GPUDevice; + +#define DEFINE_GPU_KERNELS(T) \ + template struct functor::StridedSlice; \ + template struct functor::StridedSlice; \ + template struct functor::StridedSlice; \ + template struct functor::StridedSlice; \ + template struct functor::StridedSlice; \ + template struct functor::StridedSlice; \ + template struct functor::StridedSlice; \ + template struct functor::StridedSlice; \ + template struct functor::StridedSliceGrad; \ + template struct functor::StridedSliceGrad; \ + template struct functor::StridedSliceGrad; \ + template struct functor::StridedSliceGrad; \ + template struct functor::StridedSliceGrad; \ + template struct functor::StridedSliceGrad; \ + template struct functor::StridedSliceGrad; \ + template struct functor::StridedSliceGrad; \ + template struct functor::StridedSliceAssign; \ + template struct functor::StridedSliceAssign; \ + template struct functor::StridedSliceAssign; \ + template struct functor::StridedSliceAssign; \ + template struct functor::StridedSliceAssign; \ + template struct functor::StridedSliceAssign; \ + template struct functor::StridedSliceAssign; \ + template struct functor::StridedSliceAssign; \ + template struct functor::StridedSliceAssignScalar; + +} // end namespace tensorflow + +#endif // GOOGLE_CUDA || TENSORFLOW_USE_ROCM +#endif // TENSORFLOW_CORE_KERNELS_STRIDED_SLICE_OP_GPU_IMPL_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/strided_slice_op_impl.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/strided_slice_op_impl.h new file mode 100644 index 0000000000000000000000000000000000000000..23f3155392ef9a3b42145c048c73cb453d09c605 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/strided_slice_op_impl.h @@ -0,0 +1,302 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_KERNELS_STRIDED_SLICE_OP_IMPL_H_ +#define TENSORFLOW_CORE_KERNELS_STRIDED_SLICE_OP_IMPL_H_ + +// Functor definition for StridedSliceOp, must be compilable by nvcc. + +#include "unsupported/Eigen/CXX11/Tensor" // from @eigen_archive +#include "tensorflow/core/framework/bounds_check.h" +#include "tensorflow/core/framework/op_kernel.h" +#include "tensorflow/core/framework/register_types.h" +#include "tensorflow/core/framework/register_types_traits.h" +#include "tensorflow/core/framework/tensor.h" +#include "tensorflow/core/framework/variant.h" +#include "tensorflow/core/framework/variant_encode_decode.h" +#include "tensorflow/core/kernels/dense_update_functor.h" +#include "tensorflow/core/kernels/ops_util.h" +#include "tensorflow/core/kernels/slice_op.h" +#include "tensorflow/core/kernels/strided_slice_op.h" +#include "tensorflow/core/lib/core/status.h" +#include "tensorflow/core/lib/gtl/array_slice.h" +#include "tensorflow/core/platform/mem.h" + +namespace tensorflow { + +template +void HandleStridedSliceCase(OpKernelContext* context, + const gtl::ArraySlice& begin, + const gtl::ArraySlice& end, + const gtl::ArraySlice& strides, + const TensorShape& processing_shape, + bool is_simple_slice, Tensor* result); + +template +void HandleStridedSliceGradCase(OpKernelContext* context, + const gtl::ArraySlice& begin, + const gtl::ArraySlice& end, + const gtl::ArraySlice& strides, + const TensorShape& processing_shape, + bool is_simple_slice, Tensor* result); + +template +class HandleStridedSliceAssignCase { + public: + void operator()(OpKernelContext* context, + const gtl::ArraySlice& begin, + const gtl::ArraySlice& end, + const gtl::ArraySlice& strides, + const StridedSliceAssignBCast& bcast, Tensor* result); +}; +} // namespace tensorflow + +// The actual implementation. This is designed so multiple +// translation units can include this file in the form +// +// #define STRIDED_SLICE_INSTANTIATE_DIM 1 +// #include +// #undef STRIDED_SLICE_INSTANTIATE_DIM +// +#ifdef STRIDED_SLICE_INSTANTIATE_DIM + +namespace tensorflow { + +template +void HandleStridedSliceCase(OpKernelContext* context, + const gtl::ArraySlice& begin, + const gtl::ArraySlice& end, + const gtl::ArraySlice& strides, + const TensorShape& processing_shape, + bool is_simple_slice, Tensor* result) { + typedef typename proxy_type::type Proxy; + + gtl::InlinedVector processing_dims = processing_shape.dim_sizes(); + if (is_simple_slice) { + Eigen::DSizes begin_di; + Eigen::DSizes sizes_di; + for (int i = 0; i < NDIM; ++i) { + begin_di[i] = begin[i]; + sizes_di[i] = end[i] - begin[i]; + } + functor::Slice()( + context->eigen_device(), + result->bit_casted_shaped(processing_dims), + context->input(0).bit_casted_tensor(), begin_di, sizes_di); + } else { + Eigen::DSizes begin_di; + Eigen::DSizes end_di; + Eigen::DSizes strides_di; + for (int i = 0; i < NDIM; ++i) { + begin_di[i] = begin[i]; + end_di[i] = end[i]; + strides_di[i] = strides[i]; + } + functor::StridedSlice()( + context->eigen_device(), + result->bit_casted_shaped(processing_dims), + context->input(0).bit_casted_tensor(), begin_di, end_di, + strides_di); + } +} + +template +void HandleStridedSliceGradCase(OpKernelContext* context, + const gtl::ArraySlice& begin, + const gtl::ArraySlice& end, + const gtl::ArraySlice& strides, + const TensorShape& processing_shape, + bool is_simple_slice, Tensor* result) { + gtl::InlinedVector processing_dims = processing_shape.dim_sizes(); + + Eigen::DSizes begin_di; + Eigen::DSizes end_di; + Eigen::DSizes strides_di; + for (int i = 0; i < NDIM; ++i) { + begin_di[i] = begin[i]; + end_di[i] = end[i]; + strides_di[i] = strides[i]; + } + + typedef typename proxy_type::type Proxy; + functor::StridedSliceGrad()( + context->eigen_device(), result->bit_casted_tensor(), + context->input(4).bit_casted_shaped(processing_dims), + begin_di, end_di, strides_di); +} + +template +void HandleStridedSliceAssignCase::operator()( + OpKernelContext* context, const gtl::ArraySlice& begin, + const gtl::ArraySlice& end, + const gtl::ArraySlice& strides, + const StridedSliceAssignBCast& bcast, Tensor* result) { + typedef typename proxy_type::type Proxy; + Eigen::DSizes begin_di; + Eigen::DSizes end_di; + Eigen::DSizes strides_di; + for (int i = 0; i < NDIM; ++i) { + begin_di[i] = begin[i]; + end_di[i] = end[i]; + strides_di[i] = strides[i]; + } + + constexpr int kRhsInput = 4; + const Tensor& input = context->input(kRhsInput); + functor::StridedSliceAssign()( + context->eigen_device(), result->bit_casted_tensor(), + input.bit_casted_shaped(bcast.reshape()), begin_di, end_di, + strides_di, bcast); +} + +template +class HandleStridedSliceAssignCase { + public: + enum { NDIM_PROXY = 1 }; + void operator()(OpKernelContext* context, + const gtl::ArraySlice& begin, + const gtl::ArraySlice& end, + const gtl::ArraySlice& strides, + const StridedSliceAssignBCast& bcast, Tensor* result) { + gtl::InlinedVector processing_dims(1); + processing_dims[0] = 1; + + typedef typename proxy_type::type Proxy; + functor::StridedSliceAssignScalar()( + context->eigen_device(), + result->bit_casted_shaped(processing_dims), + context->input(4).bit_casted_shaped(processing_dims)); + } +}; + +// NOTE(aselle): according to bsteiner, we need this because otherwise +// nvcc instantiates templates that are invalid. strided_slice_op_gpu.cu +// handles instantiates externally. It is important that this is done +// before the HandleXXCase's are instantiated to avoid duplicate +// specialization errors. + +#define PREVENT_INSTANTIATE_DIM1_AND_UP(T, NDIM) \ + namespace functor { \ + template <> \ + void StridedSlice::operator()( \ + const GPUDevice& d, typename TTypes::Tensor output, \ + typename TTypes::ConstTensor input, \ + const Eigen::DSizes& start, \ + const Eigen::DSizes& stop, \ + const Eigen::DSizes& strides); \ + extern template struct StridedSlice; \ + template <> \ + void Slice::operator()( \ + const GPUDevice& d, typename TTypes::Tensor output, \ + typename TTypes::ConstTensor input, \ + const Eigen::DSizes& indices, \ + const Eigen::DSizes& sizes); \ + extern template struct Slice; \ + template <> \ + void StridedSliceGrad::operator()( \ + const GPUDevice& d, typename TTypes::Tensor output, \ + typename TTypes::ConstTensor input, \ + const Eigen::DSizes& start, \ + const Eigen::DSizes& stop, \ + const Eigen::DSizes& strides); \ + extern template struct StridedSliceGrad; \ + template <> \ + void StridedSliceAssign::operator()( \ + const GPUDevice& d, typename TTypes::Tensor output, \ + typename TTypes::ConstTensor input, \ + const Eigen::DSizes& start, \ + const Eigen::DSizes& stop, \ + const Eigen::DSizes& strides, \ + const StridedSliceAssignBCast& bcast); \ + extern template struct StridedSliceAssign; \ + } // namespace functor +#define PREVENT_INSTANTIATE_DIM0_ONLY(T, NDIM) \ + namespace functor { \ + template <> \ + void StridedSliceAssignScalar::operator()( \ + const GPUDevice& d, typename TTypes::Tensor output, \ + typename TTypes::ConstTensor input); \ + extern template struct StridedSliceAssignScalar; \ + } // namespace functor + +// Dimension 0 only instantiates some functors. So we only need +// to prevent ones defined by PREVENT_INSTANTIATE_DIM0_ONLY +#if GOOGLE_CUDA || TENSORFLOW_USE_ROCM +#if STRIDED_SLICE_INSTANTIATE_DIM == 0 +#define PREVENT_INSTANTIATE(T, NDIM) PREVENT_INSTANTIATE_DIM0_ONLY(T, NDIM) +#else +#define PREVENT_INSTANTIATE(T, NDIM) PREVENT_INSTANTIATE_DIM1_AND_UP(T, NDIM) +#endif +#else +#define PREVENT_INSTANTIATE(T, NDIM) +#endif + +#define INSTANTIATE_DIM1_AND_UP_HANDLERS(DEVICE, T, DIM) \ + template void HandleStridedSliceCase( \ + OpKernelContext * context, const gtl::ArraySlice& begin, \ + const gtl::ArraySlice& end, \ + const gtl::ArraySlice& strides, \ + const TensorShape& processing_shape, bool is_simple_slice, \ + Tensor* result); \ + template void HandleStridedSliceGradCase( \ + OpKernelContext * context, const gtl::ArraySlice& begin, \ + const gtl::ArraySlice& end, \ + const gtl::ArraySlice& strides, \ + const TensorShape& processing_shape, bool is_simple_slice, \ + Tensor* result); + +#define INSTANTIATE_DIM0_AND_UP_HANDLERS(DEVICE, T, DIM) \ + template class HandleStridedSliceAssignCase; + +// Only some kernels need to be instantiated on dim 0. +#if STRIDED_SLICE_INSTANTIATE_DIM == 0 +#define INSTANTIATE(DEVICE, T, DIM) \ + INSTANTIATE_DIM0_AND_UP_HANDLERS(DEVICE, T, DIM) +#else +#define INSTANTIATE(DEVICE, T, DIM) \ + INSTANTIATE_DIM0_AND_UP_HANDLERS(DEVICE, T, DIM) \ + INSTANTIATE_DIM1_AND_UP_HANDLERS(DEVICE, T, DIM) +#endif + +#define DECLARE_FOR_N_CPU(T) \ + INSTANTIATE(CPUDevice, T, STRIDED_SLICE_INSTANTIATE_DIM) + +#define PREVENT_FOR_N_GPU(T) \ + PREVENT_INSTANTIATE(T, STRIDED_SLICE_INSTANTIATE_DIM) + +#define DECLARE_FOR_N_GPU(T) \ + INSTANTIATE(GPUDevice, T, STRIDED_SLICE_INSTANTIATE_DIM) + +#if GOOGLE_CUDA || TENSORFLOW_USE_ROCM +TF_CALL_GPU_PROXY_TYPES(PREVENT_FOR_N_GPU); +TF_CALL_COMPLEX_TYPES(PREVENT_FOR_N_GPU); + +TF_CALL_INTEGRAL_TYPES(DECLARE_FOR_N_GPU); +TF_CALL_GPU_ALL_TYPES(DECLARE_FOR_N_GPU); +#endif // END GOOGLE_CUDA || TENSORFLOW_USE_ROCM + +TF_CALL_ALL_TYPES(DECLARE_FOR_N_CPU); +TF_CALL_QUANTIZED_TYPES(DECLARE_FOR_N_CPU); +TF_CALL_float8_e5m2(DECLARE_FOR_N_CPU); +TF_CALL_float8_e4m3fn(DECLARE_FOR_N_CPU); + +#undef INSTANTIATE +#undef DECLARE_FOR_N_CPU +#undef DECLARE_FOR_N_GPU + +} // end namespace tensorflow + +#endif // END STRIDED_SLICE_INSTANTIATE_DIM +#endif // TENSORFLOW_CORE_KERNELS_STRIDED_SLICE_OP_IMPL_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/string_to_hash_bucket_fast_op.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/string_to_hash_bucket_fast_op.h new file mode 100644 index 0000000000000000000000000000000000000000..73c55cf54dc8d52bbe65e775894da0fdb1b1363b --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/string_to_hash_bucket_fast_op.h @@ -0,0 +1,67 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_KERNELS_STRING_TO_HASH_BUCKET_FAST_OP_H_ +#define TENSORFLOW_CORE_KERNELS_STRING_TO_HASH_BUCKET_FAST_OP_H_ + +#include + +#include "tensorflow/core/framework/op_kernel.h" +#include "tensorflow/core/framework/tensor.h" +#include "tensorflow/core/lib/core/errors.h" +#include "tensorflow/core/lib/core/status.h" +#include "tensorflow/core/platform/macros.h" + +namespace tensorflow { + +template +class StringToHashBucketOp : public OpKernel { + public: + explicit StringToHashBucketOp(OpKernelConstruction* ctx) : OpKernel(ctx) { + OP_REQUIRES_OK(ctx, ctx->GetAttr("num_buckets", &num_buckets_)); + } + + void Compute(OpKernelContext* context) override { + const Tensor* input_tensor; + OP_REQUIRES_OK(context, context->input("input", &input_tensor)); + const auto& input_flat = input_tensor->flat(); + + Tensor* output_tensor = nullptr; + OP_REQUIRES_OK(context, + context->allocate_output("output", input_tensor->shape(), + &output_tensor)); + auto output_flat = output_tensor->flat(); + + typedef decltype(input_flat.size()) Index; + for (Index i = 0; i < input_flat.size(); ++i) { + const uint64 input_hash = hash(input_flat(i)); + const uint64 bucket_id = input_hash % num_buckets_; + // The number of buckets is always in the positive range of int64 so is + // the resulting bucket_id. Casting the bucket_id from uint64 to int64 is + // safe. + output_flat(i) = static_cast(bucket_id); + } + } + + private: + int64_t num_buckets_; + + StringToHashBucketOp(const StringToHashBucketOp&) = delete; + void operator=(const StringToHashBucketOp&) = delete; +}; + +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_STRING_TO_HASH_BUCKET_FAST_OP_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/string_to_hash_bucket_op.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/string_to_hash_bucket_op.h new file mode 100644 index 0000000000000000000000000000000000000000..71fba9b63ad6d1199609fc63877d120ccbe6f707 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/string_to_hash_bucket_op.h @@ -0,0 +1,75 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_KERNELS_STRING_TO_HASH_BUCKET_OP_H_ +#define TENSORFLOW_CORE_KERNELS_STRING_TO_HASH_BUCKET_OP_H_ + +#include + +#include "tensorflow/core/framework/op_kernel.h" +#include "tensorflow/core/framework/tensor.h" +#include "tensorflow/core/lib/core/errors.h" +#include "tensorflow/core/lib/core/status.h" +#include "tensorflow/core/platform/macros.h" + +namespace tensorflow { + +template +class StringToKeyedHashBucketOp : public OpKernel { + public: + explicit StringToKeyedHashBucketOp(OpKernelConstruction* ctx) + : OpKernel(ctx) { + OP_REQUIRES_OK(ctx, ctx->GetAttr("num_buckets", &num_buckets_)); + + std::vector key; + OP_REQUIRES_OK(ctx, ctx->GetAttr("key", &key)); + OP_REQUIRES(ctx, key.size() == 2, + errors::InvalidArgument("Key must have 2 elements")); + std::memcpy(key_, key.data(), sizeof(key_)); + } + + void Compute(OpKernelContext* context) override { + const Tensor* input_tensor; + OP_REQUIRES_OK(context, context->input("input", &input_tensor)); + const auto& input_flat = input_tensor->flat(); + + Tensor* output_tensor = nullptr; + OP_REQUIRES_OK(context, + context->allocate_output("output", input_tensor->shape(), + &output_tensor)); + auto output_flat = output_tensor->flat(); + + typedef decltype(input_flat.size()) Index; + for (Index i = 0; i < input_flat.size(); ++i) { + const uint64 input_hash = hash(key_, input_flat(i)); + const uint64 bucket_id = input_hash % num_buckets_; + // The number of buckets is always in the positive range of int64 so is + // the resulting bucket_id. Casting the bucket_id from uint64 to int64 is + // safe. + output_flat(i) = static_cast(bucket_id); + } + } + + private: + int64_t num_buckets_; + uint64 key_[2]; + + StringToKeyedHashBucketOp(const StringToKeyedHashBucketOp&) = delete; + void operator=(const StringToKeyedHashBucketOp&) = delete; +}; + +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_STRING_TO_HASH_BUCKET_OP_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/string_util.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/string_util.h new file mode 100644 index 0000000000000000000000000000000000000000..6b32fbf83fe2ec266f113c1d750d735a600ca77b --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/string_util.h @@ -0,0 +1,88 @@ +/* Copyright 2018 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ +#ifndef TENSORFLOW_CORE_KERNELS_STRING_UTIL_H_ +#define TENSORFLOW_CORE_KERNELS_STRING_UTIL_H_ + +#include "tensorflow/core/lib/core/status.h" +#include "tensorflow/core/lib/core/stringpiece.h" + +namespace tensorflow { + +// Enumeration for unicode encodings. Used by ops such as +// tf.strings.unicode_encode and tf.strings.unicode_decode. +enum class UnicodeEncoding { UTF8, UTF16BE, UTF32BE }; + +// Enumeration for character units. Used by string such as +// tf.strings.length and tf.substr. +// TODO(edloper): Add support for: UTF32_CHAR, etc. +enum class CharUnit { BYTE, UTF8_CHAR }; + +// Whether or not the given byte is the trailing byte of a UTF-8/16/32 char. +inline bool IsTrailByte(char x) { return static_cast(x) < -0x40; } + +// Sets `encoding` based on `str`. +Status ParseUnicodeEncoding(const string& str, UnicodeEncoding* encoding); + +// Sets `unit` value based on `str`. +Status ParseCharUnit(const string& str, CharUnit* unit); + +// Returns the number of Unicode characters in a UTF-8 string. +// Result may be incorrect if the input string is not valid UTF-8. +int32 UTF8StrLen(const string& str); + +// Get the next UTF8 character position starting at the given position and +// skipping the given number of characters. Position is a byte offset, and +// should never be `null`. The function return true if successful. However, if +// the end of the string is reached before the requested characters, then the +// position will point to the end of string and this function will return false. +template +bool ForwardNUTF8CharPositions(const StringPiece in, + const T num_utf8_chars_to_shift, T* pos) { + const size_t size = in.size(); + T utf8_chars_counted = 0; + while (utf8_chars_counted < num_utf8_chars_to_shift && *pos < size) { + // move forward one utf-8 character + do { + ++*pos; + } while (*pos < size && IsTrailByte(in[*pos])); + ++utf8_chars_counted; + } + return utf8_chars_counted == num_utf8_chars_to_shift; +} + +// Get the previous UTF8 character position starting at the given position and +// skipping the given number of characters. Position is a byte offset with a +// positive value, relative to the beginning of the string, and should never be +// `null`. The function return true if successful. However, if the beginning of +// the string is reached before the requested character, then the position will +// point to the beginning of the string and this function will return false. +template +bool BackNUTF8CharPositions(const StringPiece in, + const T num_utf8_chars_to_shift, T* pos) { + const size_t start = 0; + T utf8_chars_counted = 0; + while (utf8_chars_counted < num_utf8_chars_to_shift && (*pos > start)) { + // move back one utf-8 character + do { + --*pos; + } while (IsTrailByte(in[*pos]) && *pos > start); + ++utf8_chars_counted; + } + return utf8_chars_counted == num_utf8_chars_to_shift; +} + +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_STRING_UTIL_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/summary_interface.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/summary_interface.h new file mode 100644 index 0000000000000000000000000000000000000000..374fa71dd60c87123436f26635d8efcd1507800d --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/summary_interface.h @@ -0,0 +1,61 @@ +/* Copyright 2017 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ +#ifndef TENSORFLOW_CORE_KERNELS_SUMMARY_INTERFACE_H_ +#define TENSORFLOW_CORE_KERNELS_SUMMARY_INTERFACE_H_ + +#include + +#include "tensorflow/core/framework/resource_mgr.h" +#include "tensorflow/core/lib/core/status.h" +#include "tensorflow/core/platform/types.h" + +namespace tensorflow { + +class Event; +class GraphDef; + +// Main interface for the summary writer resource. +class SummaryWriterInterface : public ResourceBase { + public: + virtual ~SummaryWriterInterface() override {} + + // Flushes all unwritten messages in the queue. + virtual Status Flush() = 0; + + // These are called in the OpKernel::Compute methods for the summary ops. + virtual Status WriteTensor(int64_t global_step, Tensor t, const string& tag, + const string& serialized_metadata) = 0; + + virtual Status WriteScalar(int64_t global_step, Tensor t, + const string& tag) = 0; + + virtual Status WriteHistogram(int64_t global_step, Tensor t, + const string& tag) = 0; + + virtual Status WriteImage(int64_t global_step, Tensor t, const string& tag, + int max_images, Tensor bad_color) = 0; + + virtual Status WriteAudio(int64_t global_step, Tensor t, const string& tag, + int max_outputs_, float sample_rate) = 0; + + virtual Status WriteGraph(int64_t global_step, + std::unique_ptr graph) = 0; + + virtual Status WriteEvent(std::unique_ptr e) = 0; +}; + +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_SUMMARY_INTERFACE_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/tensor_array.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/tensor_array.h new file mode 100644 index 0000000000000000000000000000000000000000..97e4cd45b085fe053c569f11bdfe210f32ed4957 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/tensor_array.h @@ -0,0 +1,627 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_KERNELS_TENSOR_ARRAY_H_ +#define TENSORFLOW_CORE_KERNELS_TENSOR_ARRAY_H_ + +#include + +#include + +#include "tensorflow/core/framework/op_kernel.h" +#include "tensorflow/core/framework/partial_tensor_shape.h" +#include "tensorflow/core/framework/register_types.h" +#include "tensorflow/core/framework/resource_mgr.h" +#include "tensorflow/core/framework/tensor.h" +#include "tensorflow/core/framework/tensor_shape.h" +#include "tensorflow/core/framework/types.h" +#include "tensorflow/core/kernels/aggregate_ops.h" +#include "tensorflow/core/kernels/fill_functor.h" +#include "tensorflow/core/lib/core/errors.h" +#include "tensorflow/core/platform/logging.h" +#include "tensorflow/core/platform/types.h" + +namespace tensorflow { + +typedef Eigen::ThreadPoolDevice CPUDevice; +typedef Eigen::GpuDevice GPUDevice; + +namespace tensor_array { + +// Full implementations are in tensor_array.cc +template +Status AddToTensor(OpKernelContext* ctx, Tensor* sum, const Tensor* current, + const Tensor* add) { + return errors::InvalidArgument( + "tensor_array::AddToTensor type not supported: ", + DataTypeString(DataTypeToEnum::value)); +} + +#define TENSOR_ARRAY_WRITE_OR_ADD(Device, T) \ + template <> \ + Status AddToTensor(OpKernelContext * ctx, Tensor * sum, \ + const Tensor* current, const Tensor* add); + +#define TENSOR_ARRAY_WRITE_OR_ADD_CPU(T) TENSOR_ARRAY_WRITE_OR_ADD(CPUDevice, T) +TF_CALL_NUMBER_TYPES(TENSOR_ARRAY_WRITE_OR_ADD_CPU) +#undef TENSOR_ARRAY_WRITE_OR_ADD_CPU + +#if GOOGLE_CUDA || TENSORFLOW_USE_ROCM + +#define TENSOR_ARRAY_WRITE_OR_ADD_GPU(T) TENSOR_ARRAY_WRITE_OR_ADD(GPUDevice, T) +TF_CALL_GPU_NUMBER_TYPES(TENSOR_ARRAY_WRITE_OR_ADD_GPU); +TF_CALL_COMPLEX_TYPES(TENSOR_ARRAY_WRITE_OR_ADD_GPU); +#undef TENSOR_ARRAY_WRITE_OR_ADD_GPU + +#endif // GOOGLE_CUDA || TENSORFLOW_USE_ROCM + +#undef TENSOR_ARRAY_WRITE_OR_ADD + +template +Status TensorSetZero(OpKernelContext* ctx, Tensor* value) { + return errors::InvalidArgument( + "tensor_array::TensorSetZero type not supported: ", + DataTypeString(DataTypeToEnum::value)); +} + +#define TENSOR_ARRAY_SET_ZERO(Device, T) \ + template <> \ + Status TensorSetZero(OpKernelContext * ctx, Tensor * value); + +#define TENSOR_ARRAY_SET_ZERO_CPU(T) TENSOR_ARRAY_SET_ZERO(CPUDevice, T) +TF_CALL_NUMBER_TYPES(TENSOR_ARRAY_SET_ZERO_CPU); +TF_CALL_bool(TENSOR_ARRAY_SET_ZERO_CPU); +#undef TENSOR_ARRAY_SET_ZERO_CPU + +#if GOOGLE_CUDA || TENSORFLOW_USE_ROCM + +#define TENSOR_ARRAY_SET_ZERO_GPU(T) TENSOR_ARRAY_SET_ZERO(GPUDevice, T) +TF_CALL_GPU_NUMBER_TYPES(TENSOR_ARRAY_SET_ZERO_GPU); +TF_CALL_COMPLEX_TYPES(TENSOR_ARRAY_SET_ZERO_GPU); +#undef TENSOR_ARRAY_SET_ZERO_GPU + +#endif // GOOGLE_CUDA || TENSORFLOW_USE_ROCM + +#undef TENSOR_ARRAY_SET_ZERO + +} // namespace tensor_array + +// The TensorArray object keeps an array of Tensors. It allows reading from the +// array and writing to the array. +// +// Important properties: +// * Usually, writing to a particular index in the TensorArray is allowed at +// most once per index. In a special case, writes with the flag +// multiple_writes_aggregate allow multiple writes to the same +// index. In this case, the writes are summed. +// * Multiple reads are supported. +// * Deep copies of Tensors are rarely made. The only time they are made is +// when WriteOrAggregate is called at least twice on the same index with the +// flag multiple_writes_aggregate = True. +// * Reading and Writing to the array is protected by a mutex. +// All operations on a TensorArray are thread-safe. +// * A TensorArray may be preemptively closed, which releases all +// memory associated with it. +// +// These properties together allow the TensorArray to work as a +// functional object and makes gradient computation easy. For +// example: +// * Write-Once semantics mean the gradient of a TensorArray Read never has to +// worry which of multiple writes to that index the gradient value +// is meant for. +// * Read-Many semantics (when using clear_after_read=false) allow the +// TensorArray to be read, packed, or concatenated multiple times; +// and the gradient operations use the multiple_writes_aggregate +// flag to aggregate the backprop writes. Multiple backprop writes to +// the same index are partial gradients corresponding to the +// multiple reads of that index in the forward phase. +// +class TensorArray : public ResourceBase { + public: + static std::atomic tensor_array_counter; + + // Construct a TensorArray for holding Tensors of type 'dtype' with + // 'N' elements. While the underlying storage is a std::vector and + // can hold more than MAX_INT entries, in practice we do not expect + // users to construct this many Tensors for storage in a TensorArray. + TensorArray(const string& key, const DataType& dtype, const Tensor& handle, + int32_t N, const PartialTensorShape& element_shape, + bool identical_element_shapes, bool dynamic_size, + bool multiple_writes_aggregate, bool is_grad, int32_t marked_size, + bool clear_after_read) + : key_(key), + dtype_(dtype), + handle_(handle), + closed_(false), + dynamic_size_(dynamic_size), + multiple_writes_aggregate_(multiple_writes_aggregate), + gradients_disallowed_(false), + clear_after_read_(clear_after_read), + is_grad_(is_grad), + marked_size_(marked_size), + element_shape_(element_shape), + identical_element_shapes_(identical_element_shapes), + tensors_(N) {} + + // Write Tensor 'value' to index 'index'. + // + // Preconditions: + // * The TensorArray is not closed + // * If the array has dynamic size: + // The index is >= 0 + // Otherwise: + // The index is in [0, N) where N == Size() + // * The dtype of the Tensor in 'value' matches the TensorArray's dtype. + // * If multiple_writes_aggregate is false: + // The Tensor at 'index' has not yet been written to. + // * If multiple_writes_aggregate is true: + // The Tensor at 'index' has the same shape as value. + // + // Side effects: + // * On the first write to 'index': + // - The underlying Tensor in 'value' has a new reference to it. + // - The index 'index' is marked as written. + // * If multiple_writes_aggregate is false, subsequent writes to 'index' + // raise an InvalidArgument error. + // * If multiple_writes_aggregate is true, subsequent writes to 'index': + // - The underlying Tensors in 'value' and from the first write + // are released and a local Tensor is created. + // - Index 'index' is also marked as local_copy. + // - The gradients_disallowed flag is set true (GradientsAllowed() + // will now return false). + // + // Note, value is passed as a pointer because we its underlying + // Tensor's shape is accessed. Otherwise it is not modified. + template + Status WriteOrAggregate(OpKernelContext* ctx, const int32_t index, + const Tensor* value) { + mutex_lock l(mu_); + return LockedWriteOrAggregate(ctx, index, value); + } + + template + Status WriteOrAggregateMany(OpKernelContext* ctx, + const std::vector& indices, + std::vector* values) { + mutex_lock l(mu_); + int32_t i = 0; + for (const int32_t ix : indices) { + Status s = LockedWriteOrAggregate(ctx, ix, &(*values)[i]); + ++i; + TF_RETURN_IF_ERROR(s); + } + return OkStatus(); + } + + // Read from index 'index' into Tensor 'value'. + // + // Preconditions: + // * The TensorArray is not closed + // * The index is in [0, N) + // * The Tensor at 'index' has been written to. + // * The Tensor at 'index' has not been read from with flag + // clear_after_read = true. + // + // Side effects: + // * If clear_after_read is true, the reference to the underlying + // Tensor is deleted. + // * The reference to the underlying Tensor at 'index' is copied to + // the returned '*value'. + // * The index is marked as read (it cannot be rewritten to). + template + Status Read(OpKernelContext* ctx, const int32_t index, Tensor* value) { + mutex_lock l(mu_); + return LockedRead(ctx, index, value); + } + + template + Status ReadMany(OpKernelContext* ctx, const std::vector& indices, + std::vector* values) { + mutex_lock l(mu_); + values->clear(); + values->resize(indices.size()); + int32_t i = 0; + for (const int32_t ix : indices) { + Status s = LockedRead(ctx, ix, &(*values)[i]); + ++i; + if (!s.ok()) return s; + } + return OkStatus(); + } + + DataType ElemType() const { return dtype_; } + + PartialTensorShape ElemShape() { + mutex_lock l(mu_); + return element_shape_; + } + + Status SetElemShape(const PartialTensorShape& candidate) { + mutex_lock l(mu_); + PartialTensorShape new_element_shape_; + Status s = element_shape_.MergeWith(candidate, &new_element_shape_); + if (!s.ok()) { + return s; + } + element_shape_ = new_element_shape_; + return OkStatus(); + } + + string DebugString() const override { + mutex_lock l(mu_); + CHECK(!closed_); + return strings::StrCat("TensorArray[", tensors_.size(), "]"); + } + + bool IsClosed() { + mutex_lock l(mu_); + return closed_; + } + + // Return the size of the TensorArray. + Status Size(int32* size) { + mutex_lock l(mu_); + TF_RETURN_IF_ERROR(LockedReturnIfClosed()); + *size = tensors_.size(); + return OkStatus(); + } + + // Record the size of the TensorArray after an unpack or split. + Status SetMarkedSize(int32_t size) { + mutex_lock l(mu_); + TF_RETURN_IF_ERROR(LockedReturnIfClosed()); + if (!is_grad_) { + marked_size_ = size; + } + return OkStatus(); + } + + // Return the marked size of the TensorArray. + Status MarkedSize(int32* size) { + mutex_lock l(mu_); + TF_RETURN_IF_ERROR(LockedReturnIfClosed()); + *size = marked_size_; + return OkStatus(); + } + + // Return the size that should be used by pack or concat op. + Status PackOrConcatSize(int32* size) { + mutex_lock l(mu_); + TF_RETURN_IF_ERROR(LockedReturnIfClosed()); + *size = is_grad_ ? marked_size_ : tensors_.size(); + return OkStatus(); + } + + // Once a TensorArray is being used for gradient calculations, it + // should be marked as no longer resizeable. + void DisableDynamicSize() { + mutex_lock l(mu_); + dynamic_size_ = false; + } + + bool HasDynamicSize() { + mutex_lock l(mu_); + return dynamic_size_; + } + + bool GradientsAllowed() { + mutex_lock l(mu_); + return !gradients_disallowed_; + } + + bool HasIdenticalElementShapes() const { return identical_element_shapes_; } + + // Copy the TensorShapes from another TensorArray into this one. + // If `shapes_to_prepend` is set, expands the rank of the copied shape by + // prepending the passed in shape prefix to the shape values in `rhs`. + // The sizes of the two TensorArrays must match and this one + // may not have any entries filled in. This performs a "soft copy", + // essentially filling the current TensorArray with virtual + // zero-tensors, which will be replaced by future aggregate writes, + // or instantiated by future reads. Requires a non-const pointer + // to the rhs to access its mutex. + Status CopyShapesFrom(TensorArray* rhs, const TensorShape* shape_to_prepend); + + // Clear the TensorArray, including any Tensor references, and mark as closed. + void ClearAndMarkClosed() { + mutex_lock l(mu_); + tensors_.clear(); + closed_ = true; + } + + mutex* mu() { return &mu_; } + Tensor* handle() { return &handle_; } + + ResourceHandle resource_handle(OpKernelContext* ctx) { + return ctx->step_container()->MakeResourceHandle( + key_, *ctx->device()); + } + + private: + Status LockedWrite(OpKernelContext* ctx, const int32_t index, Tensor* value) + TF_EXCLUSIVE_LOCKS_REQUIRED(mu_); + + template + Status LockedWriteOrAggregate(OpKernelContext* ctx, const int32_t index, + const Tensor* value) + TF_EXCLUSIVE_LOCKS_REQUIRED(mu_); + + template + Status LockedRead(OpKernelContext* ctx, const int32_t index, Tensor* value) + TF_EXCLUSIVE_LOCKS_REQUIRED(mu_); + + Status LockedReturnIfClosed() const TF_EXCLUSIVE_LOCKS_REQUIRED(mu_) { + if (closed_) { + return errors::InvalidArgument("TensorArray ", handle_.vec()(1), + " has already been closed."); + } + return OkStatus(); + } + + const string key_; + + const DataType dtype_; + Tensor handle_; + + mutable mutex mu_; + + // Marks that the tensor_array_ has been cleared. + bool closed_ TF_GUARDED_BY(mu_); + + // Writes are allowed to grow the array. + bool dynamic_size_; + + // Multiple writes to the same index will result in summation of the + // values (used by backprop) + const bool multiple_writes_aggregate_; + + // If multiple Writes were attempted (e.g. via attribute + // multiple_writes_aggregate), then gradients are disallowed. + bool gradients_disallowed_ TF_GUARDED_BY(mu_); + + // After a read at an index, clear away its Tensor to release memory. + const bool clear_after_read_; + + // True iff this is a gradient tensor array. + const bool is_grad_; + + // The size of the TensorArray after a (legacy) unpack or split is performed. + // -1 if there has been no unpack or split performed on the TensorArray. + int32 marked_size_; + + // The shape of each element in the TensorArray, may be partially known or not + // known at all. + PartialTensorShape element_shape_ TF_GUARDED_BY(mu_); + + // Whether all elements in the TensorArray have identical shapes. + // This allows certain behaviors, like dynamically checking for + // consistent shapes on write, and being able to fill in properly + // shaped zero tensors on stack -- even if the initial element_shape + // was not fully defined. + const bool identical_element_shapes_; + + // TensorAndState is used to keep track of the Tensors stored in the + // TensorArray, along with their shapes, and a boolean that determines whether + // they have already been read or not. + struct TensorAndState { + TensorAndState() + : written(false), read(false), cleared(false), local_copy(false) {} + Tensor tensor; + TensorShape shape; + bool written; // True if a Tensor has been written to the index. + bool read; // True if a Tensor has been written to and read from the index. + bool cleared; // True if a tensor has been read with + // clear_after_read = true; + + // Used by writes when multiple_writes_aggregate is true. In this + // case, the first time a value is written, it is a shallow copy. + // The second time a value is written, it is aggregated. However, + // in this case a new Tensor must be constructed to hold the + // aggregated value. This flag marks that such a Tensor is being + // used. All future writes will aggregate to the existing local Tensor. + bool local_copy; + }; + // The list of underlying Tensors and states. + std::vector tensors_ TF_GUARDED_BY(mu_); +}; + +template +Status TensorArray::LockedWriteOrAggregate(OpKernelContext* ctx, + const int32_t index, + const Tensor* value) { + TF_RETURN_IF_ERROR(LockedReturnIfClosed()); + size_t index_size = static_cast(index); + if (index < 0 || (!dynamic_size_ && index_size >= tensors_.size())) { + return errors::InvalidArgument( + "TensorArray ", handle_.vec()(1), ": Tried to write to index ", + index, " but array is not resizeable and size is: ", tensors_.size()); + } + if (dynamic_size_) { + // We must grow the internal TensorArray + if (index_size >= tensors_.capacity()) { + tensors_.reserve(2 * (index_size + 1)); + } + if (index_size >= tensors_.size()) { + tensors_.resize(index_size + 1); + } + } + TensorAndState& t = tensors_[index]; + + if (value->dtype() != dtype_) { + return errors::InvalidArgument( + "TensorArray ", handle_.vec()(1), + ": Could not write to TensorArray index ", index, + " because the value dtype is ", DataTypeString(value->dtype()), + " but TensorArray dtype is ", DataTypeString(dtype_), "."); + } + if (!element_shape_.IsCompatibleWith(value->shape())) { + return errors::InvalidArgument( + "TensorArray ", handle_.vec()(1), + ": Could not write to TensorArray index ", index, + " because the value shape is ", value->shape().DebugString(), + " which is incompatible with the TensorArray's inferred element " + "shape: ", + element_shape_.DebugString(), " (consider setting infer_shape=False)."); + } else if (identical_element_shapes_ && !element_shape_.IsFullyDefined()) { + element_shape_ = PartialTensorShape(value->shape().dim_sizes()); + } + + if (t.read) { + return errors::InvalidArgument("TensorArray ", handle_.vec()(1), + ": Could not write to TensorArray index ", + index, " because it has already been read."); + } + + if (!multiple_writes_aggregate_ && t.written) { + return errors::InvalidArgument("TensorArray ", handle_.vec()(1), + ": Could not write to TensorArray index ", + index, + " because it has already been written to."); + } + + if (t.written) { + DCHECK(multiple_writes_aggregate_); + + // Check that value shape matches t.shape + if (value->shape() != t.shape) { + return errors::InvalidArgument( + "TensorArray ", handle_.vec()(1), + ": Could not aggregate to TensorArray index ", index, + " because the existing shape is ", t.shape.DebugString(), + " but the new input shape is ", value->shape().DebugString(), "."); + } + + if (!t.tensor.IsInitialized() || t.tensor.NumElements() == 0) { + // If existing_t == nullptr but written == true, then what was stored + // was just a shape, which just means zeros. So all we must do in this + // case is copy the reference over and return early. + t.tensor = *value; + return OkStatus(); + } + + Tensor* existing_t = &t.tensor; + + if (t.local_copy) { + Status s = tensor_array::AddToTensor(ctx, existing_t, + existing_t, value); + TF_RETURN_IF_ERROR(s); + } else { + Tensor local_tensor; + TF_RETURN_IF_ERROR( + ctx->allocate_temp(dtype_, existing_t->shape(), &local_tensor)); + Status s = tensor_array::AddToTensor(ctx, &local_tensor, + existing_t, value); + TF_RETURN_IF_ERROR(s); + t.tensor = local_tensor; + t.local_copy = true; + } + + // We've aggregated the values, so disallow backprop on this + // TensorArray. + gradients_disallowed_ = true; + } else { + t.tensor = *value; + t.shape = value->shape(); + t.written = true; + } + return OkStatus(); +} + +template +Status TensorArray::LockedRead(OpKernelContext* ctx, const int32_t index, + Tensor* value) { + TF_RETURN_IF_ERROR(LockedReturnIfClosed()); + if ((index < 0) || + (!is_grad_ && (static_cast(index) >= tensors_.size()))) { + return errors::InvalidArgument("Tried to read from index ", index, + " but array size is: ", tensors_.size()); + } + size_t index_t = static_cast(index); + if ((is_grad_ && (index_t >= tensors_.size() || !tensors_[index].written)) || + (!is_grad_ && (index_t < tensors_.size() && !tensors_[index].written))) { + // Special case returning zeros if this is a gradient read that happens + // after a stop_gradients call with dynamic forward TensorArrays. + // There is sometimes a race condition where the gradient is not + // written due to stop_gradients, but is later read. + TensorShape element_shape; + if (is_grad_ && index_t < tensors_.size() && + tensors_[index].shape.dims() > 0) { + // A gradient TensorArray has more specific gradient information + // available for each entry. A forward TensorArray must rely on + // the global element_shape_ to fill in zeros on read. + element_shape = tensors_[index].shape; + } else if (!element_shape_.IsFullyDefined()) { + return errors::InvalidArgument( + "TensorArray ", handle_.vec()(1), + ": Could not read from TensorArray index ", index, + ". Furthermore, the element shape is not fully defined: ", + element_shape_.DebugString(), + ". It is possible you are working with a resizeable TensorArray and " + "stop_gradients is not allowing the gradients to be written. If you " + "set the full " + "element_shape property on the forward TensorArray, the proper " + "all-zeros tensor " + "will be returned instead of incurring this error."); + } else { + element_shape_.AsTensorShape(&element_shape); // Always succeeds. + } + if (index_t >= tensors_.size()) { + // Fill in tensors_ up to index to have known shape. + size_t old_tensors_size = tensors_.size(); + tensors_.resize(index + 1); + for (size_t i = old_tensors_size; i < index + 1; ++i) { + tensors_[i].shape = element_shape; + tensors_[i].written = true; + } + } else { + tensors_[index].shape = element_shape; + tensors_[index].written = true; + } + } + + TensorAndState& t = tensors_[index]; + + if (t.cleared) { + return errors::InvalidArgument("TensorArray ", handle_.vec()(1), + ": Could not read index ", index, + " twice because it was cleared after a " + "previous read (perhaps try setting " + "clear_after_read = false?)."); + } + + if (!t.tensor.IsInitialized() || t.tensor.NumElements() == 0) { + // We stored just a shape, but no value. This means create and + // return zeros of the appropriate shape. + TF_RETURN_IF_ERROR(ctx->allocate_temp(dtype_, t.shape, &t.tensor)); + if (t.shape.num_elements() > 0) { + Status s = tensor_array::TensorSetZero(ctx, &t.tensor); + if (!s.ok()) return s; + } + } + + // Data is available inside the tensor, copy the reference over. + *value = t.tensor; + + if (clear_after_read_) { + t.tensor = Tensor(); + t.cleared = true; + } + t.read = true; + return OkStatus(); +} + +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_TENSOR_ARRAY_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/tensor_cord.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/tensor_cord.h new file mode 100644 index 0000000000000000000000000000000000000000..2d3d4e3fb01f71ec4687325b89309925d02f3e59 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/tensor_cord.h @@ -0,0 +1,363 @@ +/* Copyright 2019 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_KERNELS_TENSOR_CORD_H_ +#define TENSORFLOW_CORE_KERNELS_TENSOR_CORD_H_ + +#include +#include + +#include "absl/container/inlined_vector.h" +#include "absl/strings/str_cat.h" +#include "absl/strings/string_view.h" +#include "absl/types/span.h" +#include "tensorflow/core/framework/variant_tensor_data.h" + +namespace tensorflow { + +typedef void (*CordRepReleaser)(void*); + +class TensorCord { + // A TensorCord keeps a view into some data, and a cleanup method to clean up + // that data when the TensorCord destructor is called. Copying a TensorCord + // increments a reference count to the cleanup method, and so the cleanup + // method is only called when all copies of the original TensorCord are + // cleared. + // + // Example: + // + // const string& s = t.scalar()(); + // TensorCord tc(s, &t); + // ASSERT_EQ(s, tc.view()); + // TensorCord copy(tc); + // tc = TensorCord(); // cleanup not called; the reference is held by `copy`. + // copy = TensorCord(); // cleanup happens now, the reference is destroyed. + // + // Another example: + // + // void TensorProtoDeleter(void* ptr) { + // delete static_cast(ptr); + // } + // + // auto p = std::make_unique(...); + // absl::string_view content(p->tensor_content()); + // TensorCord tc(content, TensorProtoDeleter, p.release()); + // + + public: + static constexpr const char kTypeName[] = "tensorflow::TensorCord"; + + TensorCord() : chunks_() {} + + ~TensorCord(); + + // Args: + // `view`: should point to a location in memory that is guaranteed to remain + // valid until `releaser` is called. + // `releaser`: A callback that will be executed when there are no references + // left on `view`. It will be called via `releaser(memory)`. + // `memory`: The argument passed to `releaser` when it is called. + // + // You are STRONGLY advised to provide a non-null `releaser`, and a pointer + // to the underlying data (while ensuring that the data will not be deleted + // until `releaser(memory)` is called). Otherwise the TensorCord may + // outlive the data backing `view`. + TensorCord(absl::string_view view, CordRepReleaser releaser, + void* memory = nullptr) + : chunks_({new CordRep(view, releaser, memory)}) {} + + // Args: + // `view`: should point to a location in memory backed by `tensor`, + // e.g., `view` is a string_view on a tstring which is an element + // of `tensor`. Furthermore, the associated tstring is not expected + // to be modified in such a way that the underlying memory will + // be changed after this TensorCord is created. + TensorCord(absl::string_view view, Tensor* tensor) + : chunks_({NewCordRepFromTensor(view, tensor)}) {} + + // Disallow construction with empty callback or empty tensor. + TensorCord(absl::string_view view, std::nullptr_t, void* memory) = delete; + TensorCord(absl::string_view view, std::nullptr_t) = delete; + + TensorCord(const TensorCord& other); + + TensorCord(TensorCord&& other) noexcept; + + TensorCord& operator=(const TensorCord& other); + + TensorCord& operator=(TensorCord&& other) noexcept; + + void Append(const TensorCord& other); + + void Append(absl::string_view view, CordRepReleaser releaser, + void* memory = nullptr); + + void Append(absl::string_view view, Tensor* tensor); + + // Disallow Appends with empty callbacks or empty tensors. + void Append(absl::string_view view, std::nullptr_t, void* memory) = delete; + void Append(absl::string_view view, std::nullptr_t) = delete; + + size_t size() const; + bool empty() const { return size() == 0; } + + // NOTE: This performs an expensive copy of the underlying data. + explicit operator string() const; + + class ChunkIterator { + public: + using iterator_category = std::input_iterator_tag; + using value_type = absl::string_view; + using difference_type = ptrdiff_t; + using pointer = const value_type*; + using reference = value_type; + + ChunkIterator& operator++(); + + ChunkIterator operator++(int) { + ChunkIterator tmp(*this); + operator++(); + return tmp; + } + + bool operator==(const ChunkIterator& other) const { + return (cord_ == other.cord_ && chunk_index_ == other.chunk_index_); + } + + bool operator!=(const ChunkIterator& other) const { + return !(*this == other); + } + reference operator*() const { + assert(cord_ != nullptr); + return view_; + } + pointer operator->() const { + assert(cord_ != nullptr); + return &view_; + } + + friend class TensorCord; + + private: + // Constructs a `begin()` iterator from `cord`. + explicit ChunkIterator(const TensorCord* cord, int chunk_index); + + const TensorCord* const cord_; + int chunk_index_; + absl::string_view view_; + }; + + class ChunkRange { + public: + explicit ChunkRange(const TensorCord* cord) : cord_(cord) {} + + ChunkIterator begin() const { return ChunkIterator(cord_, 0); } + + ChunkIterator end() const { + return ChunkIterator(cord_, cord_->chunks_.size()); + } + + private: + const TensorCord* cord_; + }; + + // Note that the ordinary caveats of temporary lifetime extension apply: + // + // void Process() { + // for (absl::string_view chunk : CordFactory().Chunks()) { + // // The temporary Cord returned by CordFactory has been destroyed! + // } + // } + ChunkRange Chunks() const { return ChunkRange(this); } + + ChunkIterator chunk_begin() const { return ChunkIterator(this, 0); } + + ChunkIterator chunk_end() const { + return ChunkIterator(this, chunks_.size()); + } + + static string TypeName() { return kTypeName; } + + string DebugString() const { + return absl::StrCat(""); + } + + void Encode(VariantTensorData* data) const; + + bool Decode(VariantTensorData data); + + private: + void Cleanup(); + + class CordRep : public core::RefCounted { + public: + CordRep(absl::string_view view, CordRepReleaser releaser, + void* arg = nullptr) + : is_inline_(false), rep_(view, releaser, arg) {} + + // **WARNING** Only use this constructor if + // view.size() < CordRep::kMaxInlineSize. + explicit CordRep(absl::string_view view) : is_inline_(true), rep_(view) {} + + ~CordRep() override; + + absl::string_view view() const { + if (is_inline_) { + return absl::string_view( + rep_.internal.data() + 1, + *reinterpret_cast(rep_.internal.data())); + } else { + return rep_.external.view; + } + } + + private: + friend class TensorCord; + + struct ExternalRep { + absl::string_view view; + CordRepReleaser releaser; + void* arg; + + ExternalRep(absl::string_view view_, CordRepReleaser releaser_, + void* arg_) + : view(view_), releaser(releaser_), arg(arg_) {} + }; + + // We save the size in the first byte, so subtract 1. + static constexpr int kMaxInlineSize = sizeof(ExternalRep) - 1; + static_assert(kMaxInlineSize < 255, + "Cannot store size of InlineRep in a single byte."); + + // The first byte stores the size as a uint8. The rest of the bytes are the + // string itself. + using InlineRep = std::array; + + // Member variables. + const bool is_inline_; + const union _rep_union { + InlineRep internal; + ExternalRep external; + + _rep_union(absl::string_view view, CordRepReleaser releaser, void* arg) + : external(view, releaser, arg) {} + + explicit _rep_union(absl::string_view view) { + DCHECK_LT(view.size(), kMaxInlineSize); + *reinterpret_cast(internal.data()) = view.size(); + std::memcpy(static_cast(internal.data() + 1), view.data(), + view.size()); + } + } rep_; + }; + + static TensorBuffer* TensorBufWithRef(Tensor* tensor); + static void TensorBufReleaser(void* tensor_buffer); + static void StringReleaser(void* str_ptr); + static CordRep* NewCordRepFromTensor(absl::string_view view, Tensor* tensor); + + absl::InlinedVector chunks_; +}; + +inline TensorCord::TensorCord(const TensorCord& other) + : chunks_(other.chunks_) { + for (auto* rep : chunks_) { + rep->Ref(); + } +} + +inline TensorCord::TensorCord(TensorCord&& other) noexcept + : chunks_(std::move(other.chunks_)) { + other.chunks_.clear(); +} + +inline TensorCord& TensorCord::operator=(const TensorCord& other) { + Cleanup(); + chunks_ = other.chunks_; + for (auto* rep : chunks_) { + rep->Ref(); + } + return *this; +} + +inline TensorCord& TensorCord::operator=(TensorCord&& other) noexcept { + Cleanup(); + std::swap(chunks_, other.chunks_); + return *this; +} + +inline void TensorCord::Append(const TensorCord& other) { + for (auto* rep : other.chunks_) { + chunks_.push_back(rep); + rep->Ref(); + } +} + +inline void TensorCord::Append(absl::string_view view, CordRepReleaser releaser, + void* memory) { + chunks_.push_back(new CordRep(view, releaser, memory)); +} + +inline void TensorCord::Append(absl::string_view view, Tensor* tensor) { + chunks_.push_back(NewCordRepFromTensor(view, tensor)); +} + +inline size_t TensorCord::size() const { + return (chunks_.empty()) + ? 0 + : std::accumulate(chunk_begin(), chunk_end(), 0, + [](size_t acc, absl::string_view b) { + return acc + b.size(); + }); +} + +inline TensorCord::ChunkIterator& TensorCord::ChunkIterator::operator++() { + assert(cord_ != nullptr); + assert(chunk_index_ < cord_->chunks_.size()); + chunk_index_ += 1; + if (chunk_index_ != cord_->chunks_.size()) { + view_ = cord_->chunks_[chunk_index_]->view(); + } + return *this; +} + +inline TensorCord::ChunkIterator::ChunkIterator(const TensorCord* cord, + int index) + : cord_(cord), chunk_index_(index) { + if (index < cord_->chunks_.size()) { + view_ = cord_->chunks_[index]->view(); + } +} + +inline TensorCord::CordRep* TensorCord::NewCordRepFromTensor( + absl::string_view view, Tensor* tensor) { + if (view.size() <= TensorCord::CordRep::kMaxInlineSize) { + return new CordRep(view); + } else { + return new CordRep(view, &TensorBufReleaser, TensorBufWithRef(tensor)); + } +} + +inline void TensorCord::Cleanup() { + if (chunks_.empty()) return; + for (auto* rep : chunks_) { + rep->Unref(); + } + chunks_.clear(); +} + +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_TENSOR_CORD_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/tensor_flag_utils.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/tensor_flag_utils.h new file mode 100644 index 0000000000000000000000000000000000000000..f60c192326c40e4184b33bd14212caf4674ff9d1 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/tensor_flag_utils.h @@ -0,0 +1,78 @@ +/* Copyright 2019 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +// Helpers for parsing tensors as runtime flags. +#ifndef TENSORFLOW_CORE_KERNELS_TENSOR_FLAG_UTILS_H_ +#define TENSORFLOW_CORE_KERNELS_TENSOR_FLAG_UTILS_H_ + +#include +#include + +#include "tensorflow/core/framework/tensor.h" +#include "tensorflow/core/framework/tensor_types.h" +#include "tensorflow/core/platform/types.h" + +namespace tensorflow { +namespace tensor_flag_utils { + +// Converts tensor.vec to an std::vector object, appends +// the value num_nonzero_entries_in_sparse_mat, and returns the result. +template +std::vector ParseRowStartIndices( + const tensorflow::Tensor& tensor, + const Tindices num_nonzero_entries_in_sparse_mat); + +// Returns OkStatus() if and only if config is a float scalar or a matrix with +// dimensions M x 3. If config is a scalar then config must be in the range +// [0, 1.0). If config is a matrix then config must have shape M x 3, all of +// its entries must be positive, and entries in the last column may not +// exceed 1.0. If config is a matrix then it may not be empty. +Status ValidateSparseMatrixShardingConfig(const Tensor& config); + +// Returns OkStatus() if and only if config is a float scalar or a non-empty +// matrix with dimensions M x 2. +Status ValidateScalarQuantityShardingConfig(const Tensor& config); + +// Returns the last entry of the first row in config_mat for which the first +// two entries are no smaller than the respective entries in key. If no such +// row exists then returns the last entry in the last row in config_mat. +// config_mat may not be empty. +template +MatrixType FindConfigValueForKey( + const typename TTypes::ConstMatrix& config_mat, + const std::pair& key); + +// Returns the last entry of the first row in config_mat for which the first +// two entries are no smaller than the respective entries in key. If no such +// row exists then returns the last entry in the last row in config_mat. +// config_mat may not be empty. +template +MatrixType FindConfigValueForKey( + const typename TTypes::ConstMatrix& config_mat, const K key); + +// Returns largest multiple of bucket_size less than value. +// Expects 1 <= bucket_size <= value. +template +Tindices GetLinearBucket(const Tindices value, const Tindices bucket_size); + +// Returns the largest power of bucket_size less than value. +// Expects 1 <= bucket_size <= value. If bucket_size = 1, returns 1. +template +Tindices GetPowerBucket(const Tindices value, const Tindices bucket_size); + +} // namespace tensor_flag_utils +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_TENSOR_FLAG_UTILS_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/tensor_list.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/tensor_list.h new file mode 100644 index 0000000000000000000000000000000000000000..5d3921cffe93afaebd18b509915fd06c76d4e513 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/tensor_list.h @@ -0,0 +1,160 @@ +/* Copyright 2018 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ +#ifndef TENSORFLOW_CORE_KERNELS_TENSOR_LIST_H_ +#define TENSORFLOW_CORE_KERNELS_TENSOR_LIST_H_ + +#include + +#include "tensorflow/core/framework/tensor.h" +#include "tensorflow/core/framework/variant.h" +#include "tensorflow/core/framework/variant_tensor_data.h" +#include "tensorflow/core/lib/core/refcount.h" + +namespace tensorflow { + +// Variant compatible type for a list of tensors. This is mutable but instances +// should never be mutated after stored in a variant tensor. +// +// **NOTE**: TensorList stores a refcounted container of tf::Tensor objects, +// which are accessible via TensorList::tensors(). Because it is refcounted, +// straight copies of the form: +// +// TensorList b = a; +// b.tensors().push_back(t); // WARNING: This modifies a.tensors(). +// +// Do not create a true copy of the underlying container - but instead increment +// a reference count. Modifying b.tensors() modifies a.tensors(). In this way, +// TensorList should be considered similar to the tf::Tensor object. +// +// In order to get a copy of the underlying list, use the Copy method: +// +// TensorList b = a.Copy(); +// b.tensors().push_back(t); // This does not modify a.tensors(). +// +// Note that this is not a deep copy: the memory locations of the underlying +// tensors will still point to the same locations of the corresponding tensors +// in the original. To truly perform a deep copy, Device and Type-specific +// code needs to be applied to the underlying tensors as usual. +// +// The most important implication of RefCounted TLs is that OpKernels +// wishing to reuse TensorList inputs as outputs via context->forward_input() +// need to perform an additional check on the refcount of the TensorList, +// to ensure aliasing can be performed safely. For example: +// +// bool can_alias = false; +// auto fw = c->forward_input(..., DT_VARIANT, {}, ...); +// if (fw && fw->dtype() == DT_VARIANT && fw->NumElements() == 1) { +// auto* tl = fw->scalar()().get(); +// if (tl && tl->RefCountIsOne()) { +// can_alias = true; +// } +// } +// +class TensorList { + public: + TensorList() : tensors_(new Tensors) {} + ~TensorList(); + + TensorList(const TensorList& other) + : element_shape(other.element_shape), + element_dtype(other.element_dtype), + max_num_elements(other.max_num_elements), + tensors_(other.tensors_) { + tensors_->Ref(); + } + + TensorList(TensorList&& rhs) + : element_shape(std::move(rhs.element_shape)), + element_dtype(rhs.element_dtype), + max_num_elements(rhs.max_num_elements), + tensors_(rhs.tensors_) { + rhs.tensors_ = nullptr; + } + + TensorList& operator=(const TensorList& rhs) { + if (this == &rhs) return *this; + element_shape = rhs.element_shape; + element_dtype = rhs.element_dtype; + max_num_elements = rhs.max_num_elements; + tensors_->Unref(); + tensors_ = rhs.tensors_; + tensors_->Ref(); + return *this; + } + + TensorList& operator=(TensorList&& rhs) { + if (this == &rhs) return *this; + element_shape = rhs.element_shape; + element_dtype = rhs.element_dtype; + max_num_elements = rhs.max_num_elements; + std::swap(tensors_, rhs.tensors_); + return *this; + } + + static const char kTypeName[]; + + string TypeName() const { return kTypeName; } + + void Encode(VariantTensorData* data) const; + + bool Decode(const VariantTensorData& data); + + // TODO(apassos) fill this out + string DebugString() const { return "TensorList"; } + + PartialTensorShape element_shape; + + DataType element_dtype; + + // The maximum allowed size of `tensors`. Defaults to -1 meaning that the size + // of `tensors` is unbounded. + int max_num_elements = -1; + + // Access to the underlying tensor container. + std::vector& tensors() { return tensors_->values_; } + const std::vector& tensors() const { return tensors_->values_; } + + // Get a new TensorList containing a copy of the underlying tensor container. + TensorList Copy() const { + TensorList out; + out.element_shape = element_shape; + out.element_dtype = element_dtype; + out.max_num_elements = max_num_elements; + // This performs a copy of the std::vector. + out.tensors_->values_ = tensors_->values_; + return out; + } + + // Is this TensorList the only one with a reference to the underlying + // container? + bool RefCountIsOne() const { return tensors_->RefCountIsOne(); } + + private: + class Tensors : public core::RefCounted { + public: + std::vector values_; + }; + Tensors* tensors_; +}; + +#if defined(PLATFORM_GOOGLE) +// TODO(ebrevdo): Identify why Variant inline size is smaller on mobile devices. +// For 32-bit devices, it's acceptable not to inline. +static_assert(Variant::CanInlineType() || sizeof(void*) < 8, + "Must be able to inline TensorList into a Variant"); +#endif +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_TENSOR_LIST_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/tensor_list_util.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/tensor_list_util.h new file mode 100644 index 0000000000000000000000000000000000000000..784b508c5a90d7970f625e0c7326e371ead679aa --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/tensor_list_util.h @@ -0,0 +1,43 @@ +/* Copyright 2022 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ +#ifndef TENSORFLOW_CORE_KERNELS_TENSOR_LIST_UTIL_H_ +#define TENSORFLOW_CORE_KERNELS_TENSOR_LIST_UTIL_H_ + +#include + +#include "tensorflow/core/platform/status.h" + +namespace tensorflow { + +class OpKernelContext; +class TensorList; +class Tensor; + +Status TensorListBinaryAdd( + OpKernelContext* c, const TensorList& a, const TensorList& b, + TensorList* out, + std::function + binary_add_func); + +Status TensorListZerosLike( + OpKernelContext* c, const TensorList& x, TensorList* y, + std::function + zeros_like_func); + +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_TENSOR_LIST_UTIL_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/tensor_map.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/tensor_map.h new file mode 100644 index 0000000000000000000000000000000000000000..cb4c827cc3c605dedb9981b42ab055a2dd0b43c8 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/tensor_map.h @@ -0,0 +1,181 @@ +/* Copyright 2020 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ +#ifndef TENSORFLOW_CORE_KERNELS_TENSOR_MAP_H_ +#define TENSORFLOW_CORE_KERNELS_TENSOR_MAP_H_ + +#include + +#include "absl/container/flat_hash_map.h" +#include "tensorflow/core/framework/tensor.h" +#include "tensorflow/core/framework/tensor_key.h" +#include "tensorflow/core/framework/variant.h" +#include "tensorflow/core/framework/variant_tensor_data.h" +#include "tensorflow/core/lib/core/refcount.h" + +namespace tensorflow { + +// Variant compatible type for a map of tensors. This is mutable but instances +// should never be mutated after stored in a variant tensor. +// +// **NOTE**: TensorMap stores a refcounted container of tf::Tensor objects, +// which are accessible via TensorMap::tensors(). Because it is refcounted, +// straight copies of the form: +// +// TensorMap b = a; +// b.tensors().insert(k,v); // WARNING: This modifies a.tensors(). +// +// Do not create a true copy of the underlying container - but instead increment +// a reference count. Modifying b.tensors() modifies a.tensors(). In this way, +// TensorMap should be considered similar to the tf::Tensor object. +// +// In order to get a copy of the underlying map, use the Copy method: +// +// TensorMap b = a.Copy(); +// b.tensors().insert(k, v); // This does not modify a.tensors(). +// +// Note that this is not a deep copy: the memory locations of the underlying +// tensors will still point to the same locations of the corresponding tensors +// in the original. To truly perform a deep copy, Device and Type-specific +// code needs to be applied to the underlying tensors as usual. +// +// The most important implication of RefCounted TensorMaps is that OpKernels +// wishing to reuse TensorMap inputs as outputs via context->forward_input() +// need to perform an additional check on the refcount of the TensorList, +// to ensure aliasing can be performed safely. For example: +// +// bool can_alias = false; +// auto fw = c->forward_input(..., DT_VARIANT, {}, ...); +// if (fw && fw->dtype() == DT_VARIANT && fw->NumElements() == 1) { +// auto* tl = fw->scalar()().get(); +// if (tl && tl->RefCountIsOne()) { +// can_alias = true; +// } +// } +// +class TensorMap { + public: + TensorMap() : tensors_(new Tensors) {} + ~TensorMap(); + + TensorMap(const TensorMap& other) : tensors_(other.tensors_) { + tensors_->Ref(); + } + + TensorMap(TensorMap&& rhs) : tensors_(rhs.tensors_) { + rhs.tensors_ = nullptr; + } + + TensorMap& operator=(const TensorMap& rhs) { + if (this == &rhs) return *this; + tensors_->Unref(); + tensors_ = rhs.tensors_; + tensors_->Ref(); + return *this; + } + + TensorMap& operator=(TensorMap&& rhs) { + if (this == &rhs) return *this; + std::swap(tensors_, rhs.tensors_); + return *this; + } + + static const char kTypeName[]; + + string TypeName() const { return kTypeName; } + + void Encode(VariantTensorData* data) const; + + bool Decode(const VariantTensorData& data); + + // TODO(apassos) fill this out + string DebugString() const { return "TensorMap"; } + + // Access to the underlying tensor container. + absl::flat_hash_map& tensors() { + return tensors_->values_; + } + + const absl::flat_hash_map& tensors() const { + return tensors_->values_; + } + + // Get a new TensorMap containing a copy of the underlying tensor container. + TensorMap Copy() const { + TensorMap out; + // This performs a copy of the absl::hashmap. + out.tensors_->values_ = tensors_->values_; + return out; + } + + // Insert key and value if the key does not already exist. + // Returns true if the insertion happens. + bool insert(const TensorKey& key, const Tensor& value) { + auto r = tensors_->values_.try_emplace(key, value); + return r.second; + } + + // Lookup given key. Returns iterator to found key or end. + absl::flat_hash_map::iterator find(TensorKey key) { + return tensors_->values_.find(key); + } + + Tensor& lookup(TensorKey key) { return tensors_->values_.find(key)->second; } + + Tensor& operator[](TensorKey& k) { return tensors_->values_[k]; } + + bool replace(const TensorKey& k, const Tensor& v) { + tensors_->values_[k] = v; + return true; + } + + // Removes element with given key. Return size of removed element. + size_t erase(TensorKey key) { return tensors_->values_.erase(key); } + + // Size returns the number of elements in the map + size_t size() const { return tensors_->values_.size(); } + + std::vector keys() const { + std::vector keys; + keys.reserve(tensors_->values_.size()); + absl::flat_hash_map::iterator it = + tensors_->values_.begin(); + while (it != tensors_->values_.end()) { + keys.push_back(it->first); + it++; + } + return keys; + } + + // Is this TensorMap the only one with a reference to the underlying + // container? + bool RefCountIsOne() const { return tensors_->RefCountIsOne(); } + + private: + class Tensors : public core::RefCounted { + public: + absl::flat_hash_map values_; + }; + Tensors* tensors_; +}; + +#if defined(PLATFORM_GOOGLE) +// TODO(ebrevdo): Identify why Variant inline size is smaller on mobile devices. +// For 32-bit devices, it's acceptable not to inline. +static_assert(Variant::CanInlineType() || sizeof(void*) < 8, + "Must be able to inline TensorMap into a Variant"); +#endif +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_TENSOR_MAP_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/tensor_to_hash_bucket_op.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/tensor_to_hash_bucket_op.h new file mode 100644 index 0000000000000000000000000000000000000000..6c75b8cffccd10fd5d6ef7c03b41b717f1e27dbc --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/tensor_to_hash_bucket_op.h @@ -0,0 +1,80 @@ +/* Copyright 2021 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_KERNELS_TENSOR_TO_HASH_BUCKET_OP_H_ +#define TENSORFLOW_CORE_KERNELS_TENSOR_TO_HASH_BUCKET_OP_H_ + +#include + +#include "unsupported/Eigen/CXX11/Tensor" // from @eigen_archive +#include "tensorflow/core/framework/op_kernel.h" +#include "tensorflow/core/framework/tensor.h" +#include "tensorflow/core/lib/core/errors.h" +#include "tensorflow/core/lib/core/status.h" +#include "tensorflow/core/lib/strings/stringprintf.h" +#include "tensorflow/core/platform/fingerprint.h" +#include "tensorflow/core/platform/macros.h" +#include "tensorflow/core/platform/types.h" + +namespace tensorflow { + +namespace functor { + +template +struct LaunchTensorToHashBucket { + void operator()(OpKernelContext* c, const int64_t num_buckets, const T* input, + const int num_elems, int64_t* output) { + string format = "%"; + switch (DataTypeToEnum::value) { + case DT_INT8: + case DT_INT16: + case DT_INT32: + strings::Appendf(&format, "d"); + break; + case DT_INT64: + strings::Appendf(&format, "lld"); + break; + default: + bool type_not_supported = true; + OP_REQUIRES( + c, !type_not_supported, + errors::InvalidArgument("Type not supported: ", + DataTypeString(DataTypeToEnum::value))); + } + + for (int i = 0; i < num_elems; ++i) { + string input_str = strings::Printf(format.c_str(), input[i]); + const uint64 input_hash = Fingerprint64(input_str); + const uint64 bucket_id = input_hash % num_buckets; + // The number of buckets is always in the positive range of int64 so is + // the resulting bucket_id. Casting the bucket_id from uint64 to int64 is + // safe. + output[i] = static_cast(bucket_id); + } + } +}; + +#if GOOGLE_CUDA +template +struct LaunchTensorToHashBucket { + void operator()(OpKernelContext* c, const int64_t num_buckets, const T* input, + const int num_elems, int64_t* output); +}; +#endif // GOOGLE_CUDA +} // namespace functor + +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_TENSOR_TO_HASH_BUCKET_OP_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/tile_functor.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/tile_functor.h new file mode 100644 index 0000000000000000000000000000000000000000..d5f27ecae24dbc96724af6c9b430ac9e4f19621b --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/tile_functor.h @@ -0,0 +1,110 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_KERNELS_TILE_FUNCTOR_H_ +#define TENSORFLOW_CORE_KERNELS_TILE_FUNCTOR_H_ + +#include "unsupported/Eigen/CXX11/Tensor" // from @eigen_archive + +#include "tensorflow/core/framework/tensor.h" +#include "tensorflow/core/framework/tensor_types.h" +#include "tensorflow/core/platform/types.h" + +namespace tensorflow { + +namespace internal { + +// Device-specific naive implementation for Tile. + +template +void TileSimple(const Eigen::ThreadPoolDevice& d, Tensor* out, + const Tensor& in); + +#if GOOGLE_CUDA || TENSORFLOW_USE_ROCM +template +void TileSimple(const Eigen::GpuDevice& d, Tensor* out, const Tensor& in); +#endif // GOOGLE_CUDA || TENSORFLOW_USE_ROCM + +template +void TileUsingEigen(const Device& d, Tensor* out, const Tensor& in, + const gtl::ArraySlice broadcast_array) { + Eigen::array b; + for (int i = 0; i < NDIM; ++i) b[i] = broadcast_array[i]; + MaybeWith32BitIndexing( + [&](auto out32, auto in32) { out32.device(d) = in32.broadcast(b); }, + out->tensor(), in.tensor()); +} + +template +void TileUsingEigen(const Device& d, Tensor* out, const Tensor& in, + const gtl::ArraySlice) { + auto x = in.tensor(); + auto y = out->tensor(); + // In the scalar case we simply copy the input. + y.device(d) = x; +} + +} // end namespace internal + +namespace functor { + +template +struct Tile { + void operator()(const Device& d, Tensor* out, const Tensor& in, + const gtl::ArraySlice broadcast_array) const { + switch (in.dims()) { + case 0: + internal::TileUsingEigen(d, out, in, + broadcast_array); + break; + case 1: + internal::TileUsingEigen(d, out, in, + broadcast_array); + break; + case 2: + internal::TileUsingEigen(d, out, in, + broadcast_array); + break; + case 3: + internal::TileUsingEigen(d, out, in, + broadcast_array); + break; + case 4: + internal::TileUsingEigen(d, out, in, + broadcast_array); + break; + case 5: + internal::TileUsingEigen(d, out, in, + broadcast_array); + break; + case 6: + internal::TileUsingEigen(d, out, in, + broadcast_array); + break; + case 7: + internal::TileUsingEigen(d, out, in, + broadcast_array); + break; + default: + internal::TileSimple(d, out, in); + break; + } + } +}; + +} // end namespace functor +} // end namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_TILE_FUNCTOR_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/tile_functor_cpu.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/tile_functor_cpu.h new file mode 100644 index 0000000000000000000000000000000000000000..163c2f7eef5c043b95d68d88f910167bc605f729 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/tile_functor_cpu.h @@ -0,0 +1,57 @@ +/* Copyright 2016 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ +#ifndef TENSORFLOW_CORE_KERNELS_TILE_FUNCTOR_CPU_H_ +#define TENSORFLOW_CORE_KERNELS_TILE_FUNCTOR_CPU_H_ + +#define EIGEN_USE_THREADS + +#include "tensorflow/core/kernels/ops_util.h" +#include "tensorflow/core/kernels/tile_functor.h" + +namespace tensorflow { +namespace internal { + +template +void TileSimpleImpl(const Device& d, Tensor* out, const Tensor& in) { + const int ndims = in.dims(); + const int64_t nelem = out->NumElements(); + gtl::InlinedVector in_strides = + ComputeStride(in.shape()); + gtl::InlinedVector out_strides = + ComputeStride(out->shape()); + const T* p = in.flat().data(); + T* q = out->flat().data(); + + for (int64_t o_idx = 0; o_idx < nelem; ++o_idx) { + int64_t i_idx = 0; + int64_t t = o_idx; + for (int i = 0; i < ndims; ++i) { + i_idx += t / out_strides[i] % in.dim_size(i) * in_strides[i]; + t %= out_strides[i]; + } + q[o_idx] = p[i_idx]; + } +} + +template +void TileSimple(const Eigen::ThreadPoolDevice& d, Tensor* out, + const Tensor& in) { + return TileSimpleImpl(d, out, in); +} + +} // namespace internal +} // end namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_TILE_FUNCTOR_CPU_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/tile_functor_gpu.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/tile_functor_gpu.h new file mode 100644 index 0000000000000000000000000000000000000000..8d825a682dbf9e9beadb48fc5c6e6e872dc201cd --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/tile_functor_gpu.h @@ -0,0 +1,91 @@ +/* Copyright 2016 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_KERNELS_TILE_FUNCTOR_GPU_H_ +#define TENSORFLOW_CORE_KERNELS_TILE_FUNCTOR_GPU_H_ + +#if GOOGLE_CUDA || TENSORFLOW_USE_ROCM + +#define EIGEN_USE_GPU + +#include "unsupported/Eigen/CXX11/Tensor" // from @eigen_archive +#include "tensorflow/core/framework/register_types.h" +#include "tensorflow/core/kernels/ops_util.h" +#include "tensorflow/core/kernels/tile_functor.h" +#include "tensorflow/core/util/gpu_kernel_helper.h" + +namespace tensorflow { +namespace internal { + +template +__global__ void TileKernel(int nthreads, const T* __restrict__ src, + const int32* __restrict__ buf, const int32 ndims, + T* __restrict__ dst) { + const int32* in_strides = buf; + const int32* out_strides = buf + ndims; + const int32* in_dim_sizes = buf + ndims * 2; + GPU_1D_KERNEL_LOOP(o_idx, nthreads) { + int32 i_idx = 0; + int32 t = o_idx; + for (int i = 0; i < ndims; ++i) { + i_idx += t / out_strides[i] % in_dim_sizes[i] * in_strides[i]; + t %= out_strides[i]; + } + dst[o_idx] = ldg(src + i_idx); + } +} + +template +void TileSimple(const Eigen::GpuDevice& d, Tensor* out, const Tensor& in) { + // Ensures we can use 32-bit index. + const int64 in_nelem = in.NumElements(); + CHECK_LT(in_nelem, kint32max) << "Tensor too large to transpose on GPU"; + const int64 out_nelem = out->NumElements(); + CHECK_LT(out_nelem, kint32max) << "Tensor too large to transpose on GPU"; + // Pack strides and input dimension sizes into one buffer. + const int32 ndims = in.dims(); + gtl::InlinedVector host_buf(ndims * 3); + gtl::InlinedVector in_strides = ComputeStride(in.shape()); + gtl::InlinedVector out_strides = ComputeStride(out->shape()); + for (int i = 0; i < ndims; ++i) { + host_buf[i] = in_strides[i]; + host_buf[ndims + i] = out_strides[i]; + host_buf[ndims * 2 + i] = in.dim_size(i); + } + // Copies the input strides, output strides and input dimension sizes to the + // device. + auto num_bytes = sizeof(int32) * host_buf.size(); + auto dev_buf = d.allocate(num_bytes); + // NOTE: host_buf is not allocated by GpuHostAllocator, and + // therefore we are doing a sync copy effectively. + d.memcpyHostToDevice(dev_buf, host_buf.data(), num_bytes); + // Launch kernel to q[...] = p[...]. + const T* p = in.flat().data(); + T* q = out->flat().data(); + GpuLaunchConfig cfg = GetGpuLaunchConfig(out_nelem, d); + TF_CHECK_OK( + GpuLaunchKernel(TileKernel, cfg.block_count, cfg.thread_per_block, 0, + d.stream(), cfg.virtual_thread_count, p, + reinterpret_cast(dev_buf), ndims, q)); + // Safe to deallocate immediately after the kernel launch. + d.deallocate(dev_buf); +} + +} // end namespace internal +} // namespace tensorflow + +#endif // GOOGLE_CUDA || TENSORFLOW_USE_ROCM + +#endif // TENSORFLOW_CORE_KERNELS_TILE_FUNCTOR_GPU_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/tile_ops_cpu_impl.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/tile_ops_cpu_impl.h new file mode 100644 index 0000000000000000000000000000000000000000..066954a16a71005a2f77773d4be43c7a4791a516 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/tile_ops_cpu_impl.h @@ -0,0 +1,52 @@ +/* Copyright 2016 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ +#ifndef TENSORFLOW_CORE_KERNELS_TILE_OPS_CPU_IMPL_H_ +#define TENSORFLOW_CORE_KERNELS_TILE_OPS_CPU_IMPL_H_ + +#define EIGEN_USE_THREADS + +#include "tensorflow/core/framework/register_types.h" +#include "tensorflow/core/kernels/tile_ops_impl.h" + +namespace tensorflow { + +namespace functor { + +typedef Eigen::ThreadPoolDevice CPUDevice; + +// Register functors used for TileGradientOp. +#define DEFINE_DIM(T, NDIM) \ + template struct TileGrad; \ + template struct ReduceAndReshape; +#define DEFINE_TYPE(T) DEFINE_DIM(T, CPU_PROVIDED_IXDIM) + +TF_CALL_float(DEFINE_TYPE); +TF_CALL_bfloat16(DEFINE_TYPE); +TF_CALL_double(DEFINE_TYPE); +TF_CALL_int16(DEFINE_TYPE); +TF_CALL_int32(DEFINE_TYPE); +TF_CALL_int64(DEFINE_TYPE); +TF_CALL_half(DEFINE_TYPE); +TF_CALL_complex64(DEFINE_TYPE); +TF_CALL_complex128(DEFINE_TYPE); + +#undef DEFINE_DIM +#undef DEFINE_TYPE + + +} // end namespace functor +} // end namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_TILE_OPS_CPU_IMPL_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/tile_ops_gpu_impl.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/tile_ops_gpu_impl.h new file mode 100644 index 0000000000000000000000000000000000000000..f1bbbf1e79de99020ad64433bcb523ff68cef734 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/tile_ops_gpu_impl.h @@ -0,0 +1,60 @@ +/* Copyright 2017 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_KERNELS_TILE_OPS_GPU_IMPL_H_ +#define TENSORFLOW_CORE_KERNELS_TILE_OPS_GPU_IMPL_H_ + +// Header used to split up compilation of GPU tile ops. For each type you want +// to have tile ops, create a .cu.cc file containing +// +// #if GOOGLE_CUDA || TENSORFLOW_USE_ROCM +// #include "tensorflow/core/kernels/tile_ops_gpu_impl.h" +// DEFINE_TILE_OPS(NDIM) +// #endif // GOOGLE_CUDA +// +// where NDIM is an integer. +// +// NOTE(keveman): Eigen's int8 and string versions don't compile yet with nvcc. + +#if !GOOGLE_CUDA && !TENSORFLOW_USE_ROCM +#error "This header must be included inside with CUDA or ROCm defined" +#endif + +#define EIGEN_USE_GPU + +#include +#include "tensorflow/core/framework/numeric_types.h" +#include "tensorflow/core/kernels/tile_ops_impl.h" + +#define DEFINE_DIM(T, NDIM) \ + template struct TileGrad; \ + template struct ReduceAndReshape; + +#define DEFINE_TILE_OPS(NDIM) \ + namespace tensorflow { \ + namespace functor { \ + DEFINE_DIM(int16, NDIM) \ + DEFINE_DIM(int32, NDIM) \ + DEFINE_DIM(int64, NDIM) \ + DEFINE_DIM(Eigen::half, NDIM) \ + DEFINE_DIM(Eigen::bfloat16, NDIM) \ + DEFINE_DIM(float, NDIM) \ + DEFINE_DIM(double, NDIM) \ + DEFINE_DIM(complex64, NDIM) \ + DEFINE_DIM(complex128, NDIM) \ + } \ + } + +#endif // TENSORFLOW_CORE_KERNELS_TILE_OPS_GPU_IMPL_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/tile_ops_impl.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/tile_ops_impl.h new file mode 100644 index 0000000000000000000000000000000000000000..9f9a11b4f77e0866f538d1fe09126971db1ab16e --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/tile_ops_impl.h @@ -0,0 +1,71 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_KERNELS_TILE_OPS_IMPL_H_ +#define TENSORFLOW_CORE_KERNELS_TILE_OPS_IMPL_H_ + +#include "unsupported/Eigen/CXX11/Tensor" // from @eigen_archive +#include "tensorflow/core/framework/tensor_types.h" +#include "tensorflow/core/platform/types.h" + +namespace tensorflow { + +namespace functor { + +template +struct TileGrad { + void operator()(const Device& d, typename TTypes::Tensor out, + typename TTypes::ConstTensor in, + const Eigen::DSizes& indices, + const Eigen::DSizes& sizes, + bool first) const { + if (first) { + out.device(d) = in.slice(indices, sizes); + } else { + out.device(d) += in.slice(indices, sizes); + } + } +}; + +template +struct TileGrad { + void operator()(const Device& d, typename TTypes::Tensor out, + typename TTypes::ConstTensor in, + const Eigen::DSizes&, + const Eigen::DSizes&, + bool first) const { + if (first) { + out.device(d) = in; + } else { + out.device(d) += in; + } + } +}; + +template +struct ReduceAndReshape { + void operator()( + const Device& d, typename TTypes::Tensor out, + typename TTypes::ConstTensor in, + const Eigen::DSizes& reduce_dim, + const Eigen::DSizes& reshape_dim) const { + out.device(d) = in.sum(reduce_dim).reshape(reshape_dim); + } +}; + +} // end namespace functor +} // end namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_TILE_OPS_IMPL_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/topk_op.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/topk_op.h new file mode 100644 index 0000000000000000000000000000000000000000..97528db3dda82cbb5d8a9caf2330823589228431 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/topk_op.h @@ -0,0 +1,42 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_KERNELS_TOPK_OP_H_ +#define TENSORFLOW_CORE_KERNELS_TOPK_OP_H_ + +#include "unsupported/Eigen/CXX11/Tensor" // from @eigen_archive +#include "tensorflow/core/framework/op_kernel.h" +#include "tensorflow/core/framework/tensor_types.h" +#include "tensorflow/core/framework/types.h" +#include "tensorflow/core/lib/core/errors.h" + +namespace tensorflow { + +namespace functor { + +template +struct TopKFunctor { + static Status Compute(OpKernelContext* context, bool sorted, int k, + const typename TTypes::ConstTensor& input, + const int64_t num_rows, const int64_t num_cols, + typename TTypes::Tensor values, + typename TTypes::Tensor indices); +}; + +} // end namespace functor + +} // end namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_TOPK_OP_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/topk_op_gpu.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/topk_op_gpu.h new file mode 100644 index 0000000000000000000000000000000000000000..152dbcd96a0e6347e8e7bdb20d7c605cff739c42 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/topk_op_gpu.h @@ -0,0 +1,606 @@ +/* Copyright 2017 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ +#ifndef TENSORFLOW_CORE_KERNELS_TOPK_OP_GPU_H_ +#define TENSORFLOW_CORE_KERNELS_TOPK_OP_GPU_H_ + +#if GOOGLE_CUDA || TENSORFLOW_USE_ROCM + +#define EIGEN_USE_GPU + +#include +#include +#include + +#include "unsupported/Eigen/CXX11/Tensor" // from @eigen_archive +#include "tensorflow/core/framework/op_kernel.h" +#include "tensorflow/core/framework/register_types.h" +#include "tensorflow/core/framework/tensor.h" +#include "tensorflow/core/framework/tensor_shape.h" +#include "tensorflow/core/kernels/gpu_prim.h" +#include "tensorflow/core/kernels/gpu_prim_helpers.h" +#include "tensorflow/core/kernels/topk_op.h" +#include "tensorflow/core/lib/gtl/top_n.h" +#include "tensorflow/core/platform/logging.h" +#include "tensorflow/core/platform/types.h" +#include "tensorflow/core/util/gpu_kernel_helper.h" + +namespace tensorflow { + +typedef Eigen::GpuDevice GPUDevice; + +namespace impl { + +enum class HeapType { kMinHeap, kMaxHeap }; +enum class PreferIndices { kLower, kHigher }; + +template +struct Entry { + int index; + T value; + + // Test-only. + static bool greater(const Entry& a, const Entry& b) { + if (a.value == b.value) { + return a.index < b.index; + } + return a.value > b.value; + } +}; + +template +struct LinearData { + typedef impl::Entry Entry; + + __device__ Entry& operator[](std::size_t index) const { return data[index]; } + + __device__ int get_index(int i) const { return data[i].index; } + __device__ T get_value(int i) const { return data[i].value; } + + Entry* const data; +}; + +template +struct IndirectLinearData { + typedef impl::Entry Entry; + + __device__ Entry& operator[](std::size_t index) const { return data[index]; } + + __device__ int get_index(int i) const { + return backing_data[data[i].index].index; + } + __device__ T get_value(int i) const { return data[i].value; } + + Entry* const data; + Entry* const backing_data; +}; + +template +struct StridedData { + typedef impl::Entry Entry; + + __device__ Entry& operator[](std::size_t index) const { + return data[index * blockDim.x + threadIdx.x]; + } + + __device__ int get_index(int i) const { return (*this)[i].index; } + __device__ T get_value(int i) const { return (*this)[i].value; } + + Entry* const data; +}; + +// A heap of Entry that can either work as a min-heap or as a max-heap. +template class Data, typename T> +struct IndexedHeap { + typedef typename Data::Entry Entry; + const Data data; + __device__ IndexedHeap(const Data& d) : data(d) {} + + __device__ bool is_above(int left, int right) { + T left_value = data.get_value(left); + T right_value = data.get_value(right); + if (left_value == right_value) { + if (preferIndices == PreferIndices::kLower) { + return data.get_index(left) < data.get_index(right); + } else { + return data.get_index(left) > data.get_index(right); + } + } + if (heapType == HeapType::kMinHeap) { + return left_value < right_value; + } else { + return left_value > right_value; + } + } + + __device__ void assign(int i, const Entry& entry) { data[i] = entry; } + + __device__ void push_up(int i) { + int child = i; + int parent; + for (; child > 0; child = parent) { + parent = (child - 1) / 2; + if (!is_above(child, parent)) { + // Heap property satisfied. + break; + } + swap(child, parent); + } + } + + __device__ void swap(int a, int b) { + auto tmp = data[b]; + data[b] = data[a]; + data[a] = tmp; + } + + __device__ void push_root_down(int k) { push_down(0, k); } + + // MAX-HEAPIFY in Cormen + __device__ void push_down(int node, int k) { + while (true) { + const int left = 2 * node + 1; + const int right = left + 1; + int smallest = node; + if (left < k && is_above(left, smallest)) { + smallest = left; + } + if (right < k && is_above(right, smallest)) { + smallest = right; + } + if (smallest == node) { + break; + } + swap(smallest, node); + node = smallest; + } + } + + // BUILD-MAX-HEAPIFY in Cormen + __device__ void build(int k) { + for (int node = (k - 1) / 2; node >= 0; node--) { + push_down(node, k); + } + } + + // HEAP-EXTRACT-MAX in Cormen + __device__ void remove_root(int k) { + data[0] = data[k - 1]; + push_root_down(k - 1); + } + + // in-place HEAPSORT in Cormen + // This method destroys the heap property. + __device__ void sort(int k) { + for (int slot = k - 1; slot > 0; slot--) { + // This is like remove_root but we insert the element at the end. + swap(slot, 0); + // Heap is now an element smaller. + push_root_down(/*k=*/slot); + } + } + + __device__ void replace_root(const Entry& entry, int k) { + data[0] = entry; + push_root_down(k); + } + + __device__ const Entry& root() { return data[0]; } +}; + +template class Data, typename T> +__device__ IndexedHeap make_indexed_heap( + typename Data::Entry* data) { + return IndexedHeap{Data{data}}; +} + +// heapTopK walks over [input, input+length) with `step_size` stride starting at +// `start_index`. +// It builds a top-`k` heap that is stored in `heap_entries` using `Accessor` to +// access elements in `heap_entries`. If sorted=true, the elements will be +// sorted at the end. +template class Data = LinearData> +__device__ void heapTopK(const T* __restrict__ input, int length, int k, + Entry* __restrict__ heap_entries, + bool sorted = false, int start_index = 0, + int step_size = 1) { + assert(k <= length); + + auto heap = + make_indexed_heap( + heap_entries); + + int heap_end_index = start_index + k * step_size; + if (heap_end_index > length) { + heap_end_index = length; + } + // Initialize the min-heap. + for (int index = start_index, slot = 0; index < heap_end_index; + index += step_size, slot++) { + heap.assign(slot, {index, input[index]}); + } + + heap.build(k); + + // Now iterate over the remaining items. + // If an item is smaller than the min element, it is not amongst the top k. + // Otherwise, replace the min element with it and push upwards. + for (int index = heap_end_index; index < length; index += step_size) { + // We prefer elements with lower indices. This is given here. + // Later elements automatically have higher indices, so can be discarded. + if (input[index] > heap.root().value) { + // This element should replace the min. + heap.replace_root({index, input[index]}, k); + } + } + + // Sort if wanted. + if (sorted) { + heap.sort(k); + } +} + +// mergeShards performs a top-k merge on `num_shards` many sorted streams that +// are sorted and stored in `entries` in a strided way: +// |s_1 1st|s_2 1st|...s_{num_shards} 1st|s_1 2nd|s_2 2nd|... +// The overall top k elements are written to `top_k_values` and their indices +// to top_k_indices. +// `top_k_heap` is used as temporary storage for the merge heap. +template +__device__ void mergeShards(int num_shards, int k, + Entry* __restrict__ entries, + Entry* __restrict__ top_k_heap, T* top_k_values, + int* top_k_indices) { + // If k < num_shards, we can use a min-heap with k elements to get the top k + // of the sorted blocks. + // If k > num_shards, we can initialize a min-heap with the top element from + // each sorted block. + const int heap_size = k < num_shards ? k : num_shards; + + // Min-heap part. + { + auto min_heap = IndexedHeap{ + IndirectLinearData{top_k_heap, entries}}; + // Initialize the heap as a min-heap. + for (int slot = 0; slot < heap_size; slot++) { + min_heap.assign(slot, {slot, entries[slot].value}); + } + min_heap.build(heap_size); + + // Now perform top k with the remaining shards (if num_shards > heap_size). + for (int shard = heap_size; shard < num_shards; shard++) { + const auto entry = entries[shard]; + const auto root = min_heap.root(); + if (entry.value < root.value) { + continue; + } + if (entry.value == root.value && + entry.index > entries[root.index].index) { + continue; + } + // This element should replace the min. + min_heap.replace_root({shard, entry.value}, heap_size); + } + } + + // Max-part. + { + // Turn the min-heap into a max-heap in-place. + auto max_heap = IndexedHeap{ + IndirectLinearData{top_k_heap, entries}}; + // Heapify into a max heap. + max_heap.build(heap_size); + + // Now extract the minimum k-1 times. + // k is treated specially. + const int last_k = k - 1; + for (int rank = 0; rank < last_k; rank++) { + const Entry& max_element = max_heap.root(); + top_k_values[rank] = max_element.value; + int shard_index = max_element.index; + top_k_indices[rank] = entries[shard_index].index; + int next_shard_index = shard_index + num_shards; + // For rank < k-1, each top k heap still contains at least 1 element, + // so we can draw a replacement. + max_heap.replace_root({next_shard_index, entries[next_shard_index].value}, + heap_size); + } + + // rank == last_k. + const Entry& max_element = max_heap.root(); + top_k_values[last_k] = max_element.value; + int shard_index = max_element.index; + top_k_indices[last_k] = entries[shard_index].index; + } +} + +#if GOOGLE_CUDA +extern __shared__ char shared_memory[]; +#endif // GOOGLE_CUDA + +template +#if TENSORFLOW_USE_ROCM +__attribute__((amdgpu_flat_work_group_size(1, 256))) +#endif // TENSORFLOW_USE_ROCM +__global__ void +TopKKernel(const T* __restrict__ input, int length, int k, bool sorted, + T* __restrict__ output, int* __restrict__ indices) { +#if TENSORFLOW_USE_ROCM + HIP_DYNAMIC_SHARED(char, shared_memory); +#endif // TENSORFLOW_USE_ROCM + + const int batch_index = blockIdx.x; + const T* batch_input = input + batch_index * length; + + const int thread_index = threadIdx.x; + const int thread_count = blockDim.x; + + Entry* shared_entries = (Entry*)shared_memory; + + heapTopK(batch_input, length, k, shared_entries, true, + thread_index, thread_count); + + __syncthreads(); + if (thread_index == 0) { + const int offset = batch_index * k; + auto batch_output = output + offset; + auto batch_indices = indices + offset; + Entry* top_k_heap = shared_entries + thread_count * k; + + // TODO(blackhc): Erich says: Performance can likely be improved + // significantly by having the merge be done by multiple threads rather than + // just one. ModernGPU has some nice primitives that could help with this. + mergeShards(thread_count, k, shared_entries, top_k_heap, batch_output, + batch_indices); + } +} + +template +cudaError LaunchTopKKernel(const gpuStream_t& stream, int num_shards, + const T* input, int batch_size, int length, int k, + bool sorted, T* output, int* indices) { + // This code assumes that k is small enough that the computation + // fits inside shared memory (hard coded to 48KB). In practice this + // means k <= 3072 for T=float/int32 and k <= 2048 for T=double/int64. + // The calculation is: + // shared_memory_size / (2 * (sizeof(int) + sizeof(T))) < k. + + // Use as many shards as possible. + if (num_shards <= 0) { + constexpr auto shared_memory_size = 48 << 10; // 48 KB + const auto heap_size = k * sizeof(Entry); + // shared_memory_size = (num_shards + 1) * heap_size <=> + num_shards = shared_memory_size / heap_size - 1; + if (num_shards <= 0) { + num_shards = 1; + } + auto shard_size = length / num_shards; + auto min_shard_size = 2 * k; + if (shard_size < min_shard_size) { + num_shards = length / min_shard_size; + } + if (num_shards <= 0) { + num_shards = 1; +#if GOOGLE_CUDA + } else if (num_shards > 1024) { + num_shards = 1024; + } +#elif TENSORFLOW_USE_ROCM + // ROCm can't execute with 1024 and requires an explicit + // amdgpu_flat_work_group_size attribute with >256 + } else if (num_shards > 256) { + num_shards = 256; + } +#endif // GOOGLE_CUDA || TENSORFLOW_USE_ROCM + } + // We are limited by the amount of shared memory we have per block. + auto shared_memory_size = (num_shards + 1) * k * sizeof(Entry); + + TF_CHECK_OK(GpuLaunchKernel(TopKKernel, batch_size, num_shards, + shared_memory_size, stream, input, length, k, + sorted, output, indices)); + return cudaGetLastError(); +} + +struct SegmentOffsetCreator { + EIGEN_DEVICE_FUNC + SegmentOffsetCreator(int num_cols) : num_cols_(num_cols) {} + + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE int operator()(int idx) const { + return idx * num_cols_; + } + + int num_cols_; +}; + +struct ColumnIndexCreator { + ColumnIndexCreator(int num_cols) : num_cols_(num_cols) {} + + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE int operator()( + const Eigen::array& ix) const { + return ix[0] % num_cols_; + } + + int num_cols_; +}; + +template +Status LaunchSortKernel(OpKernelContext* ctx, const T* input, int num_rows, + int num_cols, int k, + typename TTypes::Tensor values, + TTypes::Tensor indices) { + const GPUDevice& d = ctx->eigen_device(); + const auto& cu_stream = GetGpuStream(ctx); + size_t temp_storage_bytes = -1; + + // TODO(ebrevdo): Once gpuprim supports iterators for ValueT replace that + // tensor with an iterator that directly returns the correct value. + Tensor input_indices; + TF_RETURN_IF_ERROR(ctx->allocate_temp( + DT_INT32, TensorShape({num_rows, num_cols}), &input_indices)); + auto input_indices_t = To32Bit(input_indices.flat()); + input_indices_t.device(d) = + input_indices_t.generate(ColumnIndexCreator(num_cols)); + + gpuprim::CountingInputIterator counting_iter(0); + gpuprim::TransformInputIterator> + segment_offsets_t(counting_iter, SegmentOffsetCreator(num_cols)); + + Tensor temp_values; + Tensor temp_indices; + T* sorted_values_ptr; + int* sorted_indices_ptr; + if (k == num_cols) { + // Doing a full sort, no intermediate values needed. + sorted_values_ptr = values.data(); + sorted_indices_ptr = indices.data(); + } else { + // Need to create intermediate values for sorting. + TF_RETURN_IF_ERROR(ctx->allocate_temp( + DT_INT32, TensorShape({num_rows, num_cols}), &temp_indices)); + TF_RETURN_IF_ERROR(ctx->allocate_temp(DataTypeToEnum::value, + TensorShape({num_rows, num_cols}), + &temp_values)); + sorted_indices_ptr = temp_indices.flat().data(); + sorted_values_ptr = temp_values.flat().data(); + } + + bool ran_nonsegmented_version = false; + if (num_rows == 1) { +#if GOOGLE_CUDA + constexpr bool is_supported = true; +#else + // GpuRadixSortDescending is not supported on ROCm for fp16/bf16. + constexpr bool is_supported = !std::is_same::value && + !std::is_same::value; +#endif + if constexpr (is_supported) { + // Note: DeviceSegmentedRadixSort is very slow when num_segments=1 because + // it only uses 1 SM per segment. Calling the un-segmented version is much + // faster in this case. + TF_RETURN_IF_ERROR( + GpuRadixSortDescending(ctx, num_cols, /*keys_in=*/input, + /*keys_out=*/sorted_values_ptr, + /*indices_in=*/input_indices_t.data(), + /*indices_out=*/sorted_indices_ptr, + /*num_bits=*/sizeof(T) * 8)); + ran_nonsegmented_version = true; + } + } + if (!ran_nonsegmented_version) { + auto err = gpuprim::DeviceSegmentedRadixSort::SortPairsDescending( + /* d_temp_storage */ nullptr, + /* temp_storage_bytes */ temp_storage_bytes, + /* d_keys_in */ input, + /* d_keys_out */ sorted_values_ptr, + /* d_values_in */ input_indices_t.data(), + /* d_values_out */ sorted_indices_ptr, + /* num_items */ num_cols * num_rows, + /* num_segments */ num_rows, + /* d_begin_offsets */ segment_offsets_t, + /* d_end_offsets */ segment_offsets_t + 1, + /* begin_bit */ 0, + /* end_bit */ sizeof(T) * 8, + /* stream */ cu_stream); + if (err != cudaSuccess) { + return errors::Internal( + "TopKOp: Could not launch " + "gpuprim::DeviceSegmentedRadixSort::SortPairsDescending to calculate " + "temp_storage_bytes, status: ", + cudaGetErrorString(err)); + } + Tensor temp_storage; + TF_RETURN_IF_ERROR(ctx->allocate_temp( + DT_INT8, TensorShape({static_cast(temp_storage_bytes)}), + &temp_storage)); + err = gpuprim::DeviceSegmentedRadixSort::SortPairsDescending( + /* d_temp_storage */ temp_storage.flat().data(), + /* temp_storage_bytes */ temp_storage_bytes, + /* d_keys_in */ input, + /* d_keys_out */ sorted_values_ptr, + /* d_values_in */ input_indices_t.data(), + /* d_values_out */ sorted_indices_ptr, + /* num_items */ num_cols * num_rows, + /* num_segments */ num_rows, + /* d_begin_offsets */ segment_offsets_t, + /* d_end_offsets */ segment_offsets_t + 1, + /* begin_bit */ 0, + /* end_bit */ sizeof(T) * 8, + /* stream */ cu_stream); + if (err != cudaSuccess) { + return errors::Internal( + "TopKOp: Could not launch " + "gpuprim::DeviceSegmentedRadixSort::SortPairsDescending to sort " + "input, " + "temp_storage_bytes: ", + temp_storage_bytes, ", status: ", cudaGetErrorString(err)); + } + } + if (k < num_cols) { + // Need to copy subsets of sorted_indices and sorted_outputs to + // indices and outputs. + const Eigen::DSizes slice_indices{0, 0}; + const Eigen::DSizes slice_sizes{num_rows, k}; + To32Bit(indices).device(d) = + To32Bit(temp_indices.matrix()).slice(slice_indices, slice_sizes); + To32Bit(values).device(d) = + To32Bit(temp_values.matrix()).slice(slice_indices, slice_sizes); + } + return OkStatus(); +} + +} // namespace impl + +namespace functor { + +template +struct TopKFunctor { + static EIGEN_ALWAYS_INLINE Status + Compute(OpKernelContext* context, bool sorted, int k, + const typename TTypes::ConstTensor& input, const int64 num_rows, + const int64 num_cols, typename TTypes::Tensor values, + typename TTypes::Tensor indices) { + // For small k, use the heap implementation. For larger k, use + // the in-place gpuprim sort. For k == num_cols, always use the + // in-place gpuprim sort. The thresholds for n and k were determined + // empirically. + if (num_cols <= 1000 || k == num_cols || k >= 100) { + return impl::LaunchSortKernel(context, input.data(), num_rows, num_cols, + k, values, indices); + } else { + const auto& cu_stream = GetGpuStream(context); + auto err = impl::LaunchTopKKernel(cu_stream, /* num_shards */ 0, + input.data(), num_rows, num_cols, k, + sorted, values.data(), indices.data()); + if (err != cudaSuccess) { + return errors::Internal( + "Could not launch TopKKernel: ", cudaGetErrorString(err), "."); + } else { + return OkStatus(); + } + } + } +}; + +} // namespace functor +} // namespace tensorflow + +#endif // GOOGLE_CUDA || TENSORFLOW_USE_ROCM + +#endif // TENSORFLOW_CORE_KERNELS_TOPK_OP_GPU_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/training_op_helpers.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/training_op_helpers.h new file mode 100644 index 0000000000000000000000000000000000000000..fa26c829566a4913297ef4227462cc1ed013a7d7 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/training_op_helpers.h @@ -0,0 +1,285 @@ +/* Copyright 2017 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_KERNELS_TRAINING_OP_HELPERS_H_ +#define TENSORFLOW_CORE_KERNELS_TRAINING_OP_HELPERS_H_ + +#include + +#include "tensorflow/core/framework/op_kernel.h" +#include "tensorflow/core/framework/tensor.h" +#include "tensorflow/core/framework/variant_op_registry.h" +#include "tensorflow/core/kernels/dense_update_functor.h" +#include "tensorflow/core/kernels/variable_ops.h" +#include "tensorflow/core/lib/core/refcount.h" + +namespace tensorflow { + +// Must be called before performing a sparse operation on a variable. Ensures +// that no concurrent dense operations can happen while holding the variable's +// lock. +// @param ctx OpKernelContext for variable tensor cloning +// @param var Variable to be shared +// @param lock_held Whether the variable mutex was already held or not +// NOTE: This function uses variable's `copy_on_read_mode` flag to decide if +// it should immediately return or continue to lock the variable mutex for more +// processing, and always sets the `copy_on_read_mode` flag to true when this +// function returns. However, there is no guarantee that another op won't set +// the `copy_on_read_mode` flag back to false after this function. +// Therefore, for the operation that requires `copy_on_read` to stay true during +// its execution, the caller needs to lock the variable mutex outside and call +// this function with `lock_held = true` to avoid double locking. +template +Status EnsureSparseVariableAccess(OpKernelContext* ctx, Var* var, + bool lock_held = false) { + if (var->copy_on_read_mode.load()) { + return OkStatus(); + } + + std::optional ml; + if (!lock_held) { + ml.emplace(*var->mu()); + } + + // Once copy-on-read mode is True the refcount is guaranteed to be 1. This can + // also happen if there are no concurrent reads of the variable and + // copy-on-read mode is false. + if (var->tensor()->RefCountIsOne()) { + var->copy_on_read_mode.store(true); + return OkStatus(); + } + Tensor tmp; + if (std::is_same::value) { + AllocatorAttributes attr; + attr.set_on_host(true); + TF_RETURN_IF_ERROR(ctx->allocate_temp(var->tensor()->dtype(), + var->tensor()->shape(), &tmp, attr)); + + const auto elements_in = var->tensor()->flat(); + auto elements_out = tmp.flat(); + for (int64_t i = 0; i < elements_in.size(); ++i) { + elements_out(i) = elements_in(i); + } + } else { + AllocatorAttributes attr; + attr.set_gpu_compatible(true); + attr.set_nic_compatible(true); + TF_RETURN_IF_ERROR(ctx->allocate_temp(var->tensor()->dtype(), + var->tensor()->shape(), &tmp, attr)); + functor::DenseUpdate copy_functor; + copy_functor(ctx->eigen_device(), tmp.flat(), + const_cast(var->tensor())->flat()); + } + *var->tensor() = tmp; + var->copy_on_read_mode.store(true); + return OkStatus(); +} + +// Utility structure that releases a sequence of borrowed mutexes when it is +// deleted. +struct VariableInputLockHolder { + public: + VariableInputLockHolder( + std::vector vars, std::unique_ptr> locks, + std::unique_ptr> shared_locks) + : vars_(std::move(vars)), + locks_(std::move(locks)), + shared_locks_(std::move(shared_locks)) {} + + VariableInputLockHolder(VariableInputLockHolder&& other) + : vars_(std::move(other.vars_)), + locks_(std::move(other.locks_)), + shared_locks_(std::move(other.shared_locks_)) {} + + ~VariableInputLockHolder() { + // Release the locks before unreffing the Vars, because each lock + // is potentially borrowed from a Var in vars_. + locks_.reset(); + for (Var* var : vars_) { + var->Unref(); + } + } + + private: + std::vector vars_; + // NOTE: Use a `std::unique_ptr` instead of moving in a vector directly, + // because a `std::vector` is not movable on all platforms. + std::unique_ptr> locks_; + std::unique_ptr> shared_locks_; +}; + +// Returns a borrowed pointer to the mutex for the variable `input` in `ctx`. +// +// If `input` corresponds to a `DT_RESOURCE`-type variable input, +// `*maybe_resource` will be updated to contain the underlying resource, and the +// caller will be responsible for calling `Unref()` on that resource. +template +mutex* GetTrainingVariableMutex(OpKernelContext* ctx, int input, + Var** maybe_resource) { + *maybe_resource = nullptr; + if (ctx->input_dtype(input) == DT_RESOURCE) { + if (LookupResource(ctx, HandleFromInput(ctx, input), maybe_resource).ok()) { + return (*maybe_resource)->mu(); + } else { + ctx->CtxFailureWithWarning( + errors::Internal("Invalid variable reference.")); + return nullptr; + } + } + return ctx->input_ref_mutex(input); +} + +// MaybeLockVariableInputMutexesInOrder is a helper function to acquire mutexes +// in address order to mitigate deadlock. Returns a structure that, when +// deleted, will release the acquired mutexes. Safe to pass duplicates - will +// only lock each distinct mutex once. If sparse is true will ensure the +// variable gets switched to copy-on-read mode before trying to acquire the +// locks. If do_lock is false, returns immediately for reference variables. For +// resource variables in copy-on-read-mode it will grab a shared lock if do_lock +// is false, exclusive lock otherwise. Note that this silently doesn't lock +// mutexes for invalid variable references; in all usages this is followed by +// GetInputTensor which will signal a failure. +template +VariableInputLockHolder MaybeLockVariableInputMutexesInOrder( + OpKernelContext* ctx, bool do_lock, bool sparse, + const std::vector& input_ids) { + bool any_resource = false; + for (auto i : input_ids) { + if (ctx->input_dtype(i) == DT_RESOURCE) { + any_resource = true; + break; + } + } + if (!do_lock && !any_resource) { + return VariableInputLockHolder({}, {}, {}); + } + std::vector vars; + std::vector mutexes; + std::vector acquire_order; + for (auto input : input_ids) { + Var* var; + mutex* mutex = GetTrainingVariableMutex(ctx, input, &var); + if (var) vars.push_back(var); + // Only lock each mutex once if duplicates exist (n^2 but n is 2 or 3). + if (std::find(mutexes.begin(), mutexes.end(), mutex) == mutexes.end()) { + acquire_order.push_back(mutexes.size()); + mutexes.push_back(mutex); + } + } + std::sort(acquire_order.begin(), acquire_order.end(), + [&mutexes](int a, int b) { return mutexes[a] < mutexes[b]; }); + + auto locks = std::make_unique>(); + auto shared_locks = std::make_unique>(); + locks->reserve(acquire_order.size()); + + for (auto acquire : acquire_order) { + mutex* mu = mutexes[acquire]; + if (mu != nullptr) { + if (!sparse || do_lock) { + locks->emplace_back(*mu); + } else { + shared_locks->emplace_back(*mu); + } + } + } + auto variableInputLock = + VariableInputLockHolder(vars, std::move(locks), std::move(shared_locks)); + if (sparse) { + // Enable sparse variables' access. + // NOTE: This can not be done before the variable input locks are held, + // because a race condition can happen between this and another thread that + // turns off some variable's `copy_on_read_mode` after this thread enables + // sparse access; when a later function sees `copy_on_read_mode` is off, it + // will try to lock the variable again for updating `copy_on_read_mode` and + // cause the deadlock, since the variable mutex is non-re-entrant. + for (auto* var : vars) { + EnsureSparseVariableAccess(ctx, var, /*lock_held=*/true) + .IgnoreError(); + } + } + return variableInputLock; +} + +void MaybeForwardRefInputToRefOutput(OpKernelContext* ctx, int input, + int output); + +// This is for use with ResourceVariables to ensure *tensor has a +// reference count of 1 before you update it. +// REQUIRES: If you pass in variable->tensor(), *variable->mu() must be held. +template +Status PrepareToUpdateVariable(OpKernelContext* ctx, Tensor* tensor, + bool copy_on_read_mode) { + if (copy_on_read_mode || !tensor->RefCountIsOne()) { + // Tensor's buffer is in use by some read, so we need to copy before + // updating. + Tensor tmp; + if (std::is_same::value) { + AllocatorAttributes attr; + attr.set_on_host(true); + TF_RETURN_IF_ERROR( + ctx->allocate_temp(tensor->dtype(), tensor->shape(), &tmp, attr)); + + const auto elements_in = tensor->flat(); + auto elements_out = tmp.flat(); + for (int64_t i = 0; i < elements_in.size(); ++i) { + elements_out(i) = elements_in(i); + } + } else { + AllocatorAttributes attr; + attr.set_gpu_compatible(true); + attr.set_nic_compatible(true); + TF_RETURN_IF_ERROR( + ctx->allocate_temp(tensor->dtype(), tensor->shape(), &tmp, attr)); + functor::DenseUpdate copy_functor; + copy_functor(ctx->eigen_device(), tmp.flat(), + const_cast(tensor)->flat()); + } + *tensor = tmp; + } + return OkStatus(); +} + +// This gives you `*out`, a tensor you can update, corresponding to a variable +// passed as input index `input`. This handles the differences between +// reference and resource variables. For reference variables we can just grab +// the tensor, grabbing the lock if lock_held is False. +// +// For resource variables we, if sparse is true, ensure it's in copy-on-read +// mode, and then, regardless of the value of sparse, ensure its refcount is 1 +// (by potentially copying its contents). In this case lock_held is ignored. +template +Status GetInputTensorFromVariable(OpKernelContext* ctx, int input, + bool lock_held, bool sparse, Tensor* out) { + if (ctx->input_dtype(input) == DT_RESOURCE) { + core::RefCountPtr var; + TF_RETURN_IF_ERROR(LookupResource(ctx, HandleFromInput(ctx, input), &var)); + if (sparse) { + TF_RETURN_IF_ERROR(EnsureSparseVariableAccess(ctx, var.get())); + *out = *var->tensor(); + return OkStatus(); + } + TF_RETURN_IF_ERROR(PrepareToUpdateVariable( + ctx, var->tensor(), var->copy_on_read_mode.load())); + *out = *var->tensor(); + return OkStatus(); + } + *out = ctx->mutable_input(input, lock_held); + return OkStatus(); +} + +} // end namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_TRAINING_OP_HELPERS_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/training_ops.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/training_ops.h new file mode 100644 index 0000000000000000000000000000000000000000..e0626c3d8dcd1a107aefee63c775121cbe2b5ca5 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/training_ops.h @@ -0,0 +1,322 @@ +/* Copyright 2016 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_KERNELS_TRAINING_OPS_H_ +#define TENSORFLOW_CORE_KERNELS_TRAINING_OPS_H_ + +#include "unsupported/Eigen/CXX11/Tensor" // from @eigen_archive +#include "tensorflow/core/framework/tensor_types.h" +#include "tensorflow/core/lib/core/status.h" +#include "tensorflow/core/platform/types.h" + +namespace tensorflow { +namespace functor { + +// Each training algorithm has a ApplyXYZ functor struct declared in +// this header file. They are specialized for different devices +// (CPUDevice in training_ops.cc or GPUDevice in training_ops_gpu.cc). + +template +struct ApplyGradientDescent { + void operator()(const Device& d, typename TTypes::Flat var, + typename TTypes::ConstScalar alpha, + typename TTypes::ConstFlat delta); +}; + +template +struct ApplyAdadelta { + void operator()(const Device& d, typename TTypes::Flat var, + typename TTypes::Flat accum, + typename TTypes::Flat accum_update, + typename TTypes::ConstScalar lr, + typename TTypes::ConstScalar rho, + typename TTypes::ConstScalar epsilon, + typename TTypes::ConstFlat grad); +}; + +template +struct SparseApplyAdadelta { + void operator()(const Device& d, typename TTypes::Matrix var, + typename TTypes::Matrix accum, + typename TTypes::Matrix accum_update, + typename TTypes::ConstScalar lr, + typename TTypes::ConstScalar rho, + typename TTypes::ConstScalar epsilon, + typename TTypes::ConstMatrix grad, + typename TTypes::ConstFlat indices); +}; + +template +struct FobosElasticNet { + void operator()(const Device& d, typename TTypes::Flat var, + typename TTypes::ConstScalar lr, + typename TTypes::ConstScalar l1, + typename TTypes::ConstScalar l2, + typename TTypes::ConstFlat grad); +}; + +template +struct ApplyProximalGradientDescent { + void operator()(const Device& d, typename TTypes::Flat var, + typename TTypes::ConstScalar lr, + typename TTypes::ConstScalar l1, + typename TTypes::ConstScalar l2, + typename TTypes::ConstFlat grad); +}; + +template +struct ApplyAdagrad { + void operator()(const Device& d, typename TTypes::Flat var, + typename TTypes::Flat accum, + typename TTypes::ConstScalar lr, + typename TTypes::ConstFlat grad, bool update_slots); +}; + +template +struct ApplyAdagradV2 { + void operator()(const Device& d, typename TTypes::Flat var, + typename TTypes::Flat accum, + typename TTypes::ConstScalar lr, + typename TTypes::ConstScalar epsilon, + typename TTypes::ConstFlat grad, bool update_slots); +}; + +template +struct ApplyAdagradDA { + void operator()(const Device& d, typename TTypes::Flat var, + typename TTypes::Flat gradient_accum, + typename TTypes::Flat gradient_squared_accum, + typename TTypes::ConstScalar lr, int64_t global_step, + typename TTypes::ConstScalar l1, + typename TTypes::ConstScalar l2, + typename TTypes::ConstFlat grad); +}; + +template +struct SparseApplyAdagrad { + // Note that epsilon is ignored if has_epsilon is false. + Status operator()(const Device& d, typename TTypes::Matrix var, + typename TTypes::Matrix accum, + typename TTypes::ConstScalar lr, + typename TTypes::ConstScalar epsilon, + typename TTypes::ConstMatrix grad, + typename TTypes::ConstVec indices, + int64_t inner_dim, bool update_slots); +}; + +template +struct ApplyProximalAdagrad { + void operator()(const Device& d, typename TTypes::Flat var, + typename TTypes::Flat accum, + typename TTypes::ConstScalar lr, + typename TTypes::ConstScalar l1, + typename TTypes::ConstScalar l2, + typename TTypes::ConstFlat grad); +}; + +template +struct SparseApplyProximalAdagrad { + Status operator()(const Device& d, typename TTypes::Matrix var, + typename TTypes::Matrix accum, + typename TTypes::ConstScalar lr, + typename TTypes::ConstScalar l1, + typename TTypes::ConstScalar l2, + typename TTypes::ConstMatrix grad, + typename TTypes::ConstVec indices, + int64_t inner_dim); +}; + +template +struct ApplyFtrl { + void operator()(const Device& d, typename TTypes::Flat var, + typename TTypes::Flat accum, + typename TTypes::Flat linear, + typename TTypes::ConstFlat grad, + typename TTypes::ConstScalar lr, + typename TTypes::ConstScalar l1, + typename TTypes::ConstScalar l2, + typename TTypes::ConstScalar lr_power); +}; + +template +struct ApplyFtrlMultiplyLinearByLr { + void operator()(const Device& d, typename TTypes::Flat var, + typename TTypes::Flat accum, + typename TTypes::Flat linear, + typename TTypes::ConstFlat grad, + typename TTypes::ConstScalar lr, + typename TTypes::ConstScalar l1, + typename TTypes::ConstScalar l2, + typename TTypes::ConstScalar lr_power); +}; + +template +struct ApplyFtrlV2 { + void operator()(const Device& d, typename TTypes::Flat var, + typename TTypes::Flat accum, + typename TTypes::Flat linear, + typename TTypes::ConstFlat grad, + typename TTypes::ConstScalar lr, + typename TTypes::ConstScalar l1, + typename TTypes::ConstScalar l2, + typename TTypes::ConstScalar l2_shrinkage, + typename TTypes::ConstScalar lr_power); +}; + +template +struct ApplyFtrlV2MultiplyLinearByLr { + void operator()(const Device& d, typename TTypes::Flat var, + typename TTypes::Flat accum, + typename TTypes::Flat linear, + typename TTypes::ConstFlat grad, + typename TTypes::ConstScalar lr, + typename TTypes::ConstScalar l1, + typename TTypes::ConstScalar l2, + typename TTypes::ConstScalar l2_shrinkage, + typename TTypes::ConstScalar lr_power); +}; + +template +struct SparseApplyFtrl { + Status operator()(const Device& d, typename TTypes::Matrix var_flat, + typename TTypes::Matrix accum_flat, + typename TTypes::Matrix linear_flat, + typename TTypes::ConstScalar lr, + typename TTypes::ConstScalar l1, + typename TTypes::ConstScalar l2, + typename TTypes::ConstScalar l2_shrinkage, + typename TTypes::ConstScalar lr_power, + typename TTypes::ConstMatrix grad_flat, + typename TTypes::ConstVec indices_vec, + int64_t inner_dim, bool multiply_linear_by_lr); +}; + +template +struct ApplyMomentum { + void operator()(const Device& d, typename TTypes::Flat var, + typename TTypes::Flat accum, + typename TTypes::ConstScalar lr, + typename TTypes::ConstFlat grad, + typename TTypes::ConstScalar momentum, bool use_nesterov); +}; + +template +struct ApplyKerasMomentum { + void operator()(const Device& d, typename TTypes::Flat var, + typename TTypes::Flat accum, + typename TTypes::ConstScalar lr, + typename TTypes::ConstFlat grad, + typename TTypes::ConstScalar momentum, bool use_nesterov); +}; + +template +struct SparseApplyKerasMomentum { + Tindex operator()(const Device& d, typename TTypes::Matrix var, + typename TTypes::Matrix accum, + typename TTypes::ConstScalar lr, + typename TTypes::ConstMatrix grad, + typename TTypes::ConstFlat indices, + typename TTypes::ConstScalar momentum, + bool use_nesterov); +}; + +template +struct ApplyAdam { + void operator()(const Device& d, typename TTypes::Flat var, + typename TTypes::Flat m, typename TTypes::Flat v, + typename TTypes::ConstScalar beta1_power, + typename TTypes::ConstScalar beta2_power, + typename TTypes::ConstScalar lr, + typename TTypes::ConstScalar beta1, + typename TTypes::ConstScalar beta2, + typename TTypes::ConstScalar epsilon, + typename TTypes::ConstFlat grad, bool use_nesterov); +}; + +template +struct ApplyAdamWithAmsgrad { + void operator()(const Device& d, typename TTypes::Flat var, + typename TTypes::Flat m, typename TTypes::Flat v, + typename TTypes::Flat vhat, + typename TTypes::ConstScalar beta1_power, + typename TTypes::ConstScalar beta2_power, + typename TTypes::ConstScalar lr, + typename TTypes::ConstScalar beta1, + typename TTypes::ConstScalar beta2, + typename TTypes::ConstScalar epsilon, + typename TTypes::ConstFlat grad); +}; + +template +struct ApplyAdaMax { + void operator()(const Device& d, typename TTypes::Flat var, + typename TTypes::Flat m, typename TTypes::Flat v, + typename TTypes::ConstScalar beta1_power, + typename TTypes::ConstScalar lr, + typename TTypes::ConstScalar beta1, + typename TTypes::ConstScalar beta2, + typename TTypes::ConstScalar epsilon, + typename TTypes::ConstFlat grad); +}; + +template +struct ApplyRMSProp { + void operator()(const Device& d, typename TTypes::Flat var, + typename TTypes::Flat ms, typename TTypes::Flat mom, + typename TTypes::ConstScalar lr, + typename TTypes::ConstScalar rho, + typename TTypes::ConstScalar momentum, + typename TTypes::ConstScalar epsilon, + typename TTypes::ConstFlat grad); +}; + +template +struct ApplyCenteredRMSProp { + void operator()(const Device& d, typename TTypes::Flat var, + typename TTypes::Flat mg, typename TTypes::Flat ms, + typename TTypes::Flat mom, + typename TTypes::ConstScalar lr, + typename TTypes::ConstScalar rho, + typename TTypes::ConstScalar momentum, + typename TTypes::ConstScalar epsilon, + typename TTypes::ConstFlat grad); +}; + +template +struct ApplyAddSign { + void operator()(const Device& d, typename TTypes::Flat var, + typename TTypes::Flat m, + typename TTypes::ConstScalar lr, + typename TTypes::ConstScalar alpha, + typename TTypes::ConstScalar sign_decay, + typename TTypes::ConstScalar beta, + typename TTypes::ConstFlat grad); +}; + +template +struct ApplyPowerSign { + void operator()(const Device& d, typename TTypes::Flat var, + typename TTypes::Flat m, + typename TTypes::ConstScalar lr, + typename TTypes::ConstScalar logbase, + typename TTypes::ConstScalar sign_decay, + typename TTypes::ConstScalar beta, + typename TTypes::ConstFlat grad); +}; + +} // end namespace functor +} // end namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_TRAINING_OPS_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/transpose_functor.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/transpose_functor.h new file mode 100644 index 0000000000000000000000000000000000000000..2969918c33df1f037b77c60699a9d66d8d8ceeee --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/transpose_functor.h @@ -0,0 +1,255 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_KERNELS_TRANSPOSE_FUNCTOR_H_ +#define TENSORFLOW_CORE_KERNELS_TRANSPOSE_FUNCTOR_H_ + +#include +#include +#include + +#include "tensorflow/core/framework/tensor.h" +#include "tensorflow/core/framework/tensor_types.h" +#include "tensorflow/core/platform/logging.h" + +namespace tensorflow { +// Transpose tensor 'in' into tensor 'out' according to dimension +// permutation 'perm'. +// +// REQUIRES: in.dtype() == out->dtype() +// REQUIRES: in.dims() == out->dims() +// REQUIRES: in.dims() == perm.size() +// REQUIRES: in.dim_size(perm[i]) == out->dim_size(i) +template +Status DoTranspose(const Device& device, const Tensor& in, + const gtl::ArraySlice perm, Tensor* out); + +// Conjugate and transpose tensor 'in' into tensor 'out' according to dimension +// permutation 'perm'. +// +// REQUIRES: in.dtype() == out->dtype() +// REQUIRES: in.dims() == out->dims() +// REQUIRES: in.dims() == perm.size() +// REQUIRES: in.dim_size(perm[i]) == out->dim_size(i) +template +Status DoConjugateTranspose(const Device& device, const Tensor& in, + const gtl::ArraySlice perm, Tensor* out); + +// Convenience versions of DoTranspose that only swap the last (inner) two +// dimensions. +template +Status DoMatrixTranspose(const Device& device, const Tensor& in, Tensor* out); + +// Convenience versions of DoConjugateTranspose that only swap the last (inner) +// two dimensions. +template +Status DoConjugateMatrixTranspose(const Device& device, const Tensor& in, + Tensor* out); + +// Primary device specific functor to be specialized for each device and type. +template +struct Transpose { + static void run(const Device& d, const Tensor& in, + const gtl::ArraySlice perm, Tensor* out); +}; + +// Implementation details. +namespace internal { + +typedef gtl::InlinedVector TransposeDimsVec; +typedef gtl::InlinedVector TransposePermsVec; + +// Helper function that takes a tensor shape, a permutation, combines the +// neighboring shapes if their indices in the permutation are consecutive. +// The function outputs the combined shape and new permutation. +// Example: Tensor shape {2, 3, 4, 5, 120} and permutation {0, 4, 1, 2, 3} will +// produce new shape {2, 60, 120} and new permutation {0, 2, 1}. +inline void ReduceTransposeDimensions(const TensorShape& shape, + gtl::ArraySlice perm, + TransposePermsVec* new_perm, + TransposeDimsVec* new_dims) { + CHECK_EQ(shape.dims(), perm.size()); + if (shape.dims() == 1) { + // If input dimension is already 1, no need to reduce dimension. + new_perm->resize(1); + (*new_perm)[0] = perm[0]; + (*new_dims)[0] = shape.dim_size(0); + return; + } + TransposePermsVec new_dim_position(shape.dims(), -1); + TransposeDimsVec combined_dims(shape.dims(), 0); + int cur_head = perm[0]; + new_dim_position[cur_head] = 0; + combined_dims[0] = shape.dim_size(cur_head); + int dim_idx = 0; + for (int perm_idx = 1; perm_idx < shape.dims(); ++perm_idx) { + // If two indices in permutation are consecutive numbers, combine their + // dimensions. + if (cur_head + 1 == perm[perm_idx]) { + cur_head = perm[perm_idx]; + combined_dims[dim_idx] *= shape.dim_size(cur_head); + } else { + // Else start a new dimension. + cur_head = perm[perm_idx]; + dim_idx++; + new_dim_position[cur_head] = dim_idx; + combined_dims[dim_idx] = shape.dim_size(cur_head); + } + } + // Compact the new permutations and dimension sizes. + new_perm->resize(dim_idx + 1); + new_dims->resize(dim_idx + 1); + dim_idx = 0; + for (int i = 0; i < new_dim_position.size(); ++i) { + if (new_dim_position[i] >= 0) { + int new_perm_idx = new_dim_position[i]; + (*new_perm)[dim_idx] = new_perm_idx; + (*new_dims)[dim_idx] = combined_dims[new_perm_idx]; + dim_idx++; + } + } +} + +// If all non-singleton dimensions remain in ascending order, the shuffled +// singletons can be transposed by a reshape, saving a memory allocation & copy. +// |permutation| must be a permutation of {0, .., input_shape.dims() - 1}. +// That is, for all i, 0 <= perm[i] < input_shape.dims(). +// In practice, this is checked in TransposeOp::Compute prior to calling this +// function, and the function sits here to facilitate unit testing. +inline bool NonSingletonDimensionsAlign(const TensorShape& input_shape, + const std::vector& permutation) { + int last_nonsingleton_perm_dim = -1; + for (int perm_dim : permutation) { + if (input_shape.dim_size(perm_dim) == 1) { + continue; + } + if (perm_dim < last_nonsingleton_perm_dim) { + return false; + } + last_nonsingleton_perm_dim = perm_dim; + } + return true; +} + +// Uses Eigen to transpose. +template +void TransposeUsingEigen(const Device& d, const Tensor& in, + const gtl::ArraySlice perm, bool conjugate, + Tensor* out) { + Eigen::array p; + for (int i = 0; i < NDIMS; ++i) p[i] = perm[i]; + auto x = typename TTypes::ConstTensor( + reinterpret_cast(in.tensor_data().data()), + in.shape().AsEigenDSizes()); + auto y = typename TTypes::Tensor( + reinterpret_cast(const_cast(out->tensor_data().data())), + out->shape().AsEigenDSizes()); + if (conjugate) { + y.device(d) = x.conjugate().shuffle(p); + } else { + y.device(d) = x.shuffle(p); + } +} + +template +Status DoTransposeImpl(const Device& d, const Tensor& in, + const gtl::ArraySlice perm, bool conjugate, + Tensor* out) { + CHECK_EQ(in.dims(), out->dims()); + CHECK_EQ(in.dims(), perm.size()); + CHECK_EQ(in.dtype(), out->dtype()); + switch (in.dtype()) { + case DT_BOOL: + case DT_INT8: + case DT_QINT8: + case DT_QUINT8: + case DT_UINT8: + case DT_FLOAT8_E5M2: + case DT_FLOAT8_E4M3FN: + Transpose::run(d, in, perm, out); + break; + + case DT_BFLOAT16: + case DT_HALF: + case DT_INT16: + case DT_QINT16: + case DT_QUINT16: + case DT_UINT16: + Transpose::run(d, in, perm, out); + break; + + case DT_FLOAT: + case DT_INT32: + case DT_QINT32: + case DT_UINT32: + Transpose::run(d, in, perm, out); + break; + + case DT_DOUBLE: + case DT_INT64: + case DT_UINT64: + Transpose::run(d, in, perm, out); + break; + + case DT_COMPLEX64: + if (conjugate) { +#if defined(__ANDROID__) and !defined(__clang__) + // Workaround for GCC compiler bug in Android toolchain. + return errors::Unimplemented( + "Conjugate transpose of complex64 not supported for GCC on " + "Android."); +#else + Transpose::run(d, in, perm, out); +#endif + } else { + Transpose::run(d, in, perm, out); + } + break; + + case DT_COMPLEX128: + if (conjugate) { + Transpose::run(d, in, perm, + out); + } else { + Transpose::run(d, in, perm, + out); + } + break; + + case DT_STRING: + Transpose::run(d, in, perm, out); + break; + + default: + return errors::Unimplemented("Unsupported dtype on CPU: ", in.dtype()); + } + return OkStatus(); +} + +template +inline Status DoMatrixTransposeImpl(const Device& device, const Tensor& in, + bool conjugate, Tensor* out) { + const int ndims = in.dims(); + if (ndims == 0) return OkStatus(); + TransposePermsVec perm(ndims); + std::iota(perm.begin(), perm.end(), 0); + std::swap(perm[ndims - 2], perm[ndims - 1]); + return DoTransposeImpl(device, in, perm, conjugate, out); +} + +} // namespace internal +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_TRANSPOSE_FUNCTOR_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/transpose_op.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/transpose_op.h new file mode 100644 index 0000000000000000000000000000000000000000..840526468e96f6e1efe273d6503bd6726b18c140 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/transpose_op.h @@ -0,0 +1,105 @@ +/* Copyright 2016 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_KERNELS_TRANSPOSE_OP_H_ +#define TENSORFLOW_CORE_KERNELS_TRANSPOSE_OP_H_ + +#include "tensorflow/core/framework/op_kernel.h" +#include "tensorflow/core/framework/tensor.h" + +namespace tensorflow { + +class TransposeOp : public OpKernel { + public: + explicit TransposeOp(OpKernelConstruction* ctx) : OpKernel(ctx) {} + + void Compute(OpKernelContext* ctx) override; + + protected: + virtual Status DoTranspose(OpKernelContext* ctx, const Tensor& in, + gtl::ArraySlice perm, Tensor* out) = 0; + virtual bool IsConjugate() const { return false; } +}; + +class TransposeCpuOp : public TransposeOp { + public: + explicit TransposeCpuOp(OpKernelConstruction* ctx) : TransposeOp(ctx) {} + + protected: + Status DoTranspose(OpKernelContext* ctx, const Tensor& in, + gtl::ArraySlice perm, Tensor* out) override; +}; + +#if defined(INTEL_MKL) +class MklTransposeCpuOp : public TransposeOp { + public: + explicit MklTransposeCpuOp(OpKernelConstruction* ctx) : TransposeOp(ctx) {} + + protected: + Status DoTranspose(OpKernelContext* ctx, const Tensor& in, + gtl::ArraySlice perm, Tensor* out) override; +}; +#endif // INTEL_MKL + +class TransposeGpuOp : public TransposeOp { + public: + explicit TransposeGpuOp(OpKernelConstruction* ctx) : TransposeOp(ctx) {} + + protected: + Status DoTranspose(OpKernelContext* ctx, const Tensor& in, + gtl::ArraySlice perm, Tensor* out) override; +}; + + +// Conjugating transpose ops. +class ConjugateTransposeCpuOp : public TransposeOp { + public: + explicit ConjugateTransposeCpuOp(OpKernelConstruction* ctx) + : TransposeOp(ctx) {} + + protected: + Status DoTranspose(OpKernelContext* ctx, const Tensor& in, + gtl::ArraySlice perm, Tensor* out) override; + bool IsConjugate() const override { return true; } +}; + +#if defined(INTEL_MKL) +class MklConjugateTransposeCpuOp : public TransposeOp { + public: + explicit MklConjugateTransposeCpuOp(OpKernelConstruction* ctx) + : TransposeOp(ctx) {} + + protected: + Status DoTranspose(OpKernelContext* ctx, const Tensor& in, + gtl::ArraySlice perm, Tensor* out) override; + bool IsConjugate() const override { return true; } +}; +#endif // INTEL_MKL + +class ConjugateTransposeGpuOp : public TransposeOp { + public: + explicit ConjugateTransposeGpuOp(OpKernelConstruction* ctx) + : TransposeOp(ctx) {} + + protected: + Status DoTranspose(OpKernelContext* ctx, const Tensor& in, + gtl::ArraySlice perm, Tensor* out) override; + bool IsConjugate() const override { return true; } +}; + + +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_TRANSPOSE_OP_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/typed_conditional_accumulator_base.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/typed_conditional_accumulator_base.h new file mode 100644 index 0000000000000000000000000000000000000000..f657441686cfea8ba6c0c6bbf5f3720c48a60ffd --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/typed_conditional_accumulator_base.h @@ -0,0 +1,95 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_KERNELS_TYPED_CONDITIONAL_ACCUMULATOR_BASE_H_ +#define TENSORFLOW_CORE_KERNELS_TYPED_CONDITIONAL_ACCUMULATOR_BASE_H_ + +#include "tensorflow/core/kernels/conditional_accumulator_base.h" + +namespace tensorflow { + +/* + * TypedConditionalAccumulatorBase is a templated companion of + * ConditionalAccumulatorBase which allows for subclasses to use different + * types for the input gradients. (See ConditionalAccumulator and + * SparseConditionalAccumulator.) + * + * TypedConditionalAccumulatorBase defines virtual methods and implements + * methods which depend on the gradient type. These are mainly methods that are + * used for adding a new gradient to the accumulator. + */ +template +class TypedConditionalAccumulatorBase : public ConditionalAccumulatorBase { + public: + TypedConditionalAccumulatorBase(const DataType& dtype, + const PartialTensorShape& shape, + const string& name, + const string& reduction_type) + : ConditionalAccumulatorBase(dtype, shape, name, reduction_type) {} + + /** + * Attempts to add a gradient to the accumulator. An ApplyGrad attempt is + * successful (i.e., has its gradient applied) if its local_step >= + * current_global_step_ at the time the attempt is processed. Otherwise, if + * local_step < current_global_step_, the stale gradient is silently dropped. + * + * local_step: Time-step at which the gradient was computed. + * grad: Gradient tensor to be added to the accumulator. + * ctx: Context in which the op is executed. + */ + void TryApplyGrad(int64_t local_step, OpKernelContext* ctx) override { + { + mutex_lock l(mu_); + if (local_step >= current_global_step_) { + GradientTensorType* grad = nullptr; + bool is_valid = GetAndValidateTensorInputForApplyGrad(ctx, &grad); + if (is_valid) { + if (counter_ > 0) { + AddToAccumGradFunction(ctx, grad); + } else { + AllocateAndAssignToAccumGradFunction(ctx, grad); + } + counter_++; + } + CleanUpGradTensor(grad); + } + } + FlushUnlocked(); + } + + protected: + // Virtual methods to be implemented by sub-classes for different datatypes. + // Implements arithmetic operations specific to datatype. + virtual void AllocateAndAssignToAccumGradFunction( + OpKernelContext* ctx, GradientTensorType* grad) = 0; + + virtual void AddToAccumGradFunction(OpKernelContext* ctx, + GradientTensorType* grad) = 0; + + // Method for extracting and validating input provided in an OpKernelContext. + // Returns true if input was successfully retrieved and is valid. + // Gradient is returned via the GradientTensorType** tensor. + virtual bool GetAndValidateTensorInputForApplyGrad( + OpKernelContext* ctx, GradientTensorType** tensor) + TF_EXCLUSIVE_LOCKS_REQUIRED(mu_) = 0; + + // Method for cleaning up any memory allocated in + // GetAndValidateTensorInputForApplyGrad + virtual void CleanUpGradTensor(GradientTensorType* tensor) = 0; +}; + +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_TYPED_CONDITIONAL_ACCUMULATOR_BASE_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/typed_queue.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/typed_queue.h new file mode 100644 index 0000000000000000000000000000000000000000..f11029cddadba2bcd35236507991e5b64ab8e9f2 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/typed_queue.h @@ -0,0 +1,118 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_KERNELS_TYPED_QUEUE_H_ +#define TENSORFLOW_CORE_KERNELS_TYPED_QUEUE_H_ + +#include +#include +#include + +#include "tensorflow/core/framework/op_kernel.h" +#include "tensorflow/core/kernels/queue_base.h" +#include "tensorflow/core/platform/mutex.h" + +namespace tensorflow { + +// TypedQueue builds on QueueBase, with backing class (SubQueue) +// known and stored within. Shared methods that need to have access +// to the backed data sit in this class. +template +class TypedQueue : public QueueBase { + public: + TypedQueue(const int32_t capacity, const DataTypeVector& component_dtypes, + const std::vector& component_shapes, + const string& name); + + virtual Status Initialize(); // Must be called before any other method. + + int64_t MemoryUsed() const override; + + protected: + std::vector queues_ TF_GUARDED_BY(mu_); +}; // class TypedQueue + +template +TypedQueue::TypedQueue( + int32_t capacity, const DataTypeVector& component_dtypes, + const std::vector& component_shapes, const string& name) + : QueueBase(capacity, component_dtypes, component_shapes, name) {} + +template +Status TypedQueue::Initialize() { + if (component_dtypes_.empty()) { + return errors::InvalidArgument("Empty component types for queue ", name_); + } + if (!component_shapes_.empty() && + component_dtypes_.size() != component_shapes_.size()) { + return errors::InvalidArgument( + "Different number of component types. ", + "Types: ", DataTypeSliceString(component_dtypes_), + ", Shapes: ", ShapeListString(component_shapes_)); + } + + mutex_lock lock(mu_); + queues_.reserve(num_components()); + for (int i = 0; i < num_components(); ++i) { + queues_.push_back(SubQueue()); + } + return OkStatus(); +} + +template +inline int64_t SizeOf(const SubQueue& sq) { + static_assert(sizeof(SubQueue) != sizeof(SubQueue), "SubQueue size unknown."); + return 0; +} + +template <> +inline int64_t SizeOf(const std::deque& sq) { + if (sq.empty()) { + return 0; + } + return sq.size() * sq.front().AllocatedBytes(); +} + +template <> +inline int64_t SizeOf(const std::vector& sq) { + if (sq.empty()) { + return 0; + } + return sq.size() * sq.front().AllocatedBytes(); +} + +using TensorPair = std::pair; + +template +int64_t SizeOf(const std::priority_queue& sq) { + if (sq.empty()) { + return 0; + } + return sq.size() * (sizeof(TensorPair) + sq.top().second.AllocatedBytes()); +} + +template +inline int64_t TypedQueue::MemoryUsed() const { + int memory_size = 0; + mutex_lock l(mu_); + for (const auto& sq : queues_) { + memory_size += SizeOf(sq); + } + return memory_size; +} + +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_TYPED_QUEUE_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/uniform_quant_ops/math_utils.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/uniform_quant_ops/math_utils.h new file mode 100644 index 0000000000000000000000000000000000000000..8b342b4295121ef80f85acb9544df428c58b91aa --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/uniform_quant_ops/math_utils.h @@ -0,0 +1,334 @@ +/* Copyright 2022 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ +#ifndef TENSORFLOW_CORE_KERNELS_UNIFORM_QUANT_OPS_MATH_UTILS_H_ +#define TENSORFLOW_CORE_KERNELS_UNIFORM_QUANT_OPS_MATH_UTILS_H_ + +#include +#include +#include + +#include "tensorflow/core/framework/op_kernel.h" +#include "tensorflow/core/framework/tensor.h" +#include "tensorflow/core/platform/errors.h" +#include "tensorflow/core/platform/status.h" + +namespace tensorflow { + +namespace internal { + +// Multiply by the effective quantized multiplier and shift. +// Caller is responsible for guaranteeing: +// quantized_multiplier >= 0 +// shift >= -31 && shift <= 30 +// The usage of this function is restricted to "multiply by quantized_multiplier +// and shift which were calcluated from QuantizeMultiplier() function below", +// so the conditions are expected to be met. +// +// Reference (TFLite MultiplyByQuantizedMultiplier with TFLITE_SINGLE_ROUNDING): +// https://github.com/tensorflow/tensorflow/blob/47c640a961874f644cd071752835c7b792450bb8/tensorflow/lite/kernels/internal/common.h#L145 +// Above implementation refers from ruy MultiplyByQuantizedMultiplier +// (https://github.com/google/ruy/blob/97ebb72aa0655c0af98896b317476a5d0dacad9c/ruy/apply_multiplier.cc) +// +// After mutiplying fixed point quantized_multiplier, apply single rounding +// operation (addition of 'round' to result and then shift right by +// total_shift). where round=(1 << (30 - shift)) and total_shift=(31 - shift) +inline int32_t MultiplyByQuantizedMultiplier(int32_t x, + int32_t quantized_multiplier, + int shift) { + const int64_t total_shift = 31 - shift; + const int64_t round = static_cast(1) << (total_shift - 1); + int64_t result = x * static_cast(quantized_multiplier) + round; + result = result >> total_shift; + + result = std::clamp( + result, static_cast(std::numeric_limits::min()), + static_cast(std::numeric_limits::max())); + return static_cast(result); +} + +} // namespace internal + +// Quantize eigen Tensor input_tensor using given inv_scale and zero_point, +// using the formula: +// quantized_val = floor(input_val * inv_scale + 0.5f) + zero_point +// +// The caller is reponsible for the validity of the inv_scale (Avoid precision +// loss from taking inverse, and ensure that inv_scale is a finite number.) +template +void AffineQuantize(const ConstTensorTin& input_tensor, float inv_scale, + int32_t zero_point, int32_t quantization_min_val, + int32_t quantization_max_val, TensorTout quantized_tensor) { + quantized_tensor = ((input_tensor.template cast() * inv_scale + 0.5f) + .floor() + .template cast() + + zero_point) + .cwiseMin(quantization_max_val) + .cwiseMax(quantization_min_val) + .template cast(); +} + +// Dequantize eigen Tensor input_tensor using given scale and zero_point, using +// the formula: +// dequantized_val = (input_val - zero_point) * scale +template +void AffineDequantize(const ConstTensorTin& input_tensor, float scale, + int32_t zero_point, TensorTout dequantized_tensor) { + dequantized_tensor = (((input_tensor.template cast() - zero_point)) + .template cast() * + scale) + .template cast(); +} + +// Given a portion of input float tensor, quantizes the data and writes output +// to the corresponding portion in quantized_tensor. The quantization scale and +// zero_point is calculated using the input data min and max. +// This function is used for dynamic range quantization in hybrid (float x qint) +// kernels. +// +// This function behavior aligns with TFLite AsymmetricQuantize() +// (https://github.com/tensorflow/tensorflow/blob/779d3824c8b38a622773940011ced0388697b951/tensorflow/lite/kernels/internal/reference/portable_tensor_utils.cc#L72) +// to achieve feature parity with TFLite which is required since supporting +// mobile executions is the one of the major use cases. The behavior is same +// except for following difference: TFLite AsymmetricQuantize() uses round(input +// / scale + zero_point), while AffineQuantize() uses floor(input_val * +// (1./scale) + 0.5) + zero_point +template +Status AsymmetricQuantize(const ConstTensorTin& input_tensor, + int32_t quantization_min_val, + int32_t quantization_max_val, float& scale, + int32& zero_point, TensorTout quantized_tensor) { + if (quantization_min_val >= quantization_max_val) { + // NOLINTNEXTLINE + return errors::InvalidArgument( + "quantization_min_val must be smaller than quantization_max_val. " + "Given ", + quantization_min_val, ", ", quantization_max_val); + } + + Eigen::Tensor input_tensor_min = + input_tensor.minimum(); + Eigen::Tensor input_tensor_max = + input_tensor.maximum(); + const double rmin = static_cast(std::min(0.0f, input_tensor_min())); + const double rmax = static_cast(std::max(0.0f, input_tensor_max())); + const double qmin_double = quantization_min_val; + const double qmax_double = quantization_max_val; + + float inv_scale = 0; + scale = (rmax - rmin) / (qmax_double - qmin_double); + if (rmax - rmin != 0) { + // Re-calculate the inverse instead of using (1./scale), to avoid loss of + // precision. + inv_scale = (qmax_double - qmin_double) / (rmax - rmin); + } + if (scale == 0 || !std::isfinite(inv_scale)) { + quantized_tensor.setZero(); + scale = 1.0; + zero_point = 0; + return OkStatus(); + } + + // Using the scale calculated from the quantization range and data range, + // calculate zero point from quantization min and quantization max. + // Among those two, choose the zero point that has smaller error. + const double zero_point_from_min = qmin_double - rmin / scale; + const double zero_point_from_max = qmax_double - rmax / scale; + const double zero_point_from_min_error = + std::abs(qmin_double) + std::abs(rmin / scale); + const double zero_point_from_max_error = + std::abs(qmax_double) + std::abs(rmax / scale); + const double zero_point_double = + zero_point_from_min_error < zero_point_from_max_error + ? zero_point_from_min + : zero_point_from_max; + + int8_t nudged_zero_point = 0; + if (zero_point_double <= qmin_double) { + nudged_zero_point = quantization_min_val; + } else if (zero_point_double >= qmax_double) { + nudged_zero_point = quantization_max_val; + } else { + nudged_zero_point = static_cast(round(zero_point_double)); + } + zero_point = nudged_zero_point; + + AffineQuantize(input_tensor, inv_scale, zero_point, quantization_min_val, + quantization_max_val, quantized_tensor); + return OkStatus(); +} + +// Given double_multiplier, quantize it where it is represented by two int32_t, +// quantized_multiplier and shift. +// +// double_multiplier must be a positive finite number. Otherwise returns +// InvalidArgument. +// +// Output quantized_multiplier is clamped to range [0, INT32_MAX], +// and shift is clamped to range [-31, 30]. +Status QuantizeMultiplier(double double_multiplier, + int32_t& quantized_multiplier, int32_t& shift); + +// Requantize input_val given quantized effective_muliplier|shift and +// input|output zero_point. +// Effective multiplier and shift should be calculated from effective scale +// which is: +// (product of input scales) / (product of output scales). +template +Tout AffineRequantizeWithQuantizedMultiplierAndShift( + Tin input_val, int32_t effective_quantized_multiplier, int effective_shift, + int32_t input_zero_point, int32_t output_zero_point, + int32_t quantization_min_val, int32_t quantization_max_val) { + const int32_t input = static_cast(input_val) - input_zero_point; + + const int32_t unclamped = + internal::MultiplyByQuantizedMultiplier( + input, effective_quantized_multiplier, effective_shift) + + output_zero_point; + + // Clamp with [quantization_min_val, quantization_max_val]. + return static_cast( + std::max(std::min(unclamped, quantization_max_val), + quantization_min_val)); +} + +namespace internal { + +// Requantize from per-tensor to per-tensor. +template +Status PerTensorToPerTensorRequantize( + const Tensor& input, float input_scale, int32_t input_zero_point, + float output_scale, int32_t output_zero_point, int32_t quantization_min_val, + int32_t quantization_max_val, Tensor& output) { + const double effective_multiplier = + static_cast(input_scale) / output_scale; + int32_t effective_quantized_multiplier; + int32_t effective_shift; + TF_RETURN_IF_ERROR(QuantizeMultiplier( + effective_multiplier, effective_quantized_multiplier, effective_shift)); + + output.flat() = input.flat().unaryExpr( + [effective_quantized_multiplier, effective_shift, input_zero_point, + output_zero_point, quantization_min_val, + quantization_max_val](Tin input_val) { + return AffineRequantizeWithQuantizedMultiplierAndShift( + input_val, effective_quantized_multiplier, effective_shift, + input_zero_point, output_zero_point, quantization_min_val, + quantization_max_val); + }); + return OkStatus(); +} + +// Requantize where the input or output contains any per-axis quantized cases. +// - From per-tensor to per-axis. +// - From per-axis to per-tensor. +// - From per-axis to per-axis. +template +Status PerAxisRequantize(OpKernelContext* context, const Tensor& input, + const Tensor& input_scales, + const Tensor& input_zero_points, + const Tensor& output_scales, + const Tensor& output_zero_points, + int quantization_axis, int32_t quantization_min_val, + int32_t quantization_max_val, Tensor& output) { + const bool input_per_axis_quantization = input_scales.dims() == 1; + const bool output_per_axis_quantization = output_scales.dims() == 1; + const auto& per_axis_scales_shape = input_per_axis_quantization + ? input_scales.shape() + : output_scales.shape(); + + Tensor effective_quantized_multipliers; + TF_RETURN_IF_ERROR(context->allocate_temp(DT_INT32, per_axis_scales_shape, + &effective_quantized_multipliers)); + Tensor effective_shifts; + TF_RETURN_IF_ERROR(context->allocate_temp(DT_INT32, per_axis_scales_shape, + &effective_shifts)); + + const float* input_scales_data = input_scales.flat().data(); + const float* output_scales_data = output_scales.flat().data(); + int32_t* effective_quantized_multipliers_data = + effective_quantized_multipliers.flat().data(); + int32_t* effective_shifts_data = effective_shifts.flat().data(); + + const int64_t quantization_dim_size = output.dim_size(quantization_axis); + + for (int64_t i = 0; i < quantization_dim_size; ++i) { + const double effective_multiplier = + static_cast( + input_scales_data[input_per_axis_quantization ? i : 0]) / + output_scales_data[output_per_axis_quantization ? i : 0]; + TF_RETURN_IF_ERROR(QuantizeMultiplier( + effective_multiplier, effective_quantized_multipliers_data[i], + effective_shifts_data[i])); + } + + const int32* input_zero_points_data = input_zero_points.flat().data(); + const int32* output_zero_points_data = + output_zero_points.flat().data(); + + auto input_tensor = + input.template flat_inner_outer_dims(quantization_axis - 1); + auto output_tensor = + output.template flat_inner_outer_dims(quantization_axis - 1); + + for (int i = 0; i < quantization_dim_size; ++i) { + output_tensor.template chip<1>(i) = + input_tensor.template chip<1>(i).unaryExpr( + [effective_quantized_multipliers_data, effective_shifts_data, + input_zero_points_data, output_zero_points_data, + quantization_min_val, quantization_max_val, + input_per_axis_quantization, output_per_axis_quantization, + i](Tin input_val) { + return AffineRequantizeWithQuantizedMultiplierAndShift( + input_val, effective_quantized_multipliers_data[i], + effective_shifts_data[i], + input_zero_points_data[input_per_axis_quantization ? i : 0], + output_zero_points_data[output_per_axis_quantization ? i : 0], + quantization_min_val, quantization_max_val); + }); + } + return OkStatus(); +} + +} // namespace internal + +template +Status EvalRequantize(OpKernelContext* context, const Tensor& input, + const Tensor& input_scales, + const Tensor& input_zero_points, + const Tensor& output_scales, + const Tensor& output_zero_points, + int input_quantization_axis, int output_quantization_axis, + int32_t quantization_min_val, + int32_t quantization_max_val, Tensor& output) { + if (input_quantization_axis == -1 && output_quantization_axis == -1) { + return internal::PerTensorToPerTensorRequantize( + input, input_scales.scalar()(), + input_zero_points.scalar()(), output_scales.scalar()(), + output_zero_points.scalar()(), quantization_min_val, + quantization_max_val, output); + } else { + const int quantization_axis = input_quantization_axis >= 0 + ? input_quantization_axis + : output_quantization_axis; + return internal::PerAxisRequantize( + context, input, input_scales, input_zero_points, output_scales, + output_zero_points, quantization_axis, quantization_min_val, + quantization_max_val, output); + } +} + +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_UNIFORM_QUANT_OPS_MATH_UTILS_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/uniform_quant_ops/tensor_utils.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/uniform_quant_ops/tensor_utils.h new file mode 100644 index 0000000000000000000000000000000000000000..171a59423a5d7423668b0c0e282f8383ddaf029a --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/uniform_quant_ops/tensor_utils.h @@ -0,0 +1,76 @@ +/* Copyright 2022 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ +#ifndef TENSORFLOW_CORE_KERNELS_UNIFORM_QUANT_OPS_TENSOR_UTILS_H_ +#define TENSORFLOW_CORE_KERNELS_UNIFORM_QUANT_OPS_TENSOR_UTILS_H_ + +#include "tensorflow/core/framework/ops_util.h" +#include "tensorflow/core/framework/tensor.h" +#include "tensorflow/core/framework/tensor_shape.h" +#include "tensorflow/core/lib/gtl/array_slice.h" + +namespace tensorflow { + +// Returns if all elements in given tensors are positive. +template +bool AllElementsPositive(const Tensor& tensor) { + Eigen::Tensor positive = + (tensor.flat() > 0).all(); + return positive(); +} + +// Given data tensor's shape and quantization params, returns if the shapes are +// valid. +Status QuantizationAxisAndShapeValid(const TensorShape& data_shape, + const TensorShape& scales_shape, + const TensorShape& zero_points_shape, + int quantization_axis); + +// Given in_shape and perm to transpose, returns out shape after the transpose. +// perm must be a permutation of [0, 1, ..., in_shape.rank - 1]. The caller is +// responsible for guaranteeing it. +TensorShape TransposedShape(const TensorShape& in_shape, + const gtl::ArraySlice perm); + +// Given in Tensor and perm to transpose, transpose in Tensor and write to out +// Tensor. +// perm must be a permutation of [0, 1, ..., in_shape.rank - 1]. The caller is +// responsible for guaranteeing it. +// Reference: +// https://github.com/tensorflow/tensorflow/blob/c09dc18b15a56f3e72a08c9f3a53e7ef347d159d/tensorflow/core/kernels/transpose_functor_cpu.cc#L35 +template +void Transpose(const Tensor& in, const gtl::ArraySlice perm, + Tensor& out) { + gtl::InlinedVector in_strides = + ComputeStride(in.shape()); + gtl::InlinedVector out_strides = + ComputeStride(out.shape()); + const T* in_data = in.flat().data(); + T* out_data = out.flat().data(); + + for (int64_t out_idx = 0; out_idx < out.NumElements(); ++out_idx) { + int64_t in_idx = 0; + int64_t remain_out_idx = out_idx; + for (int dim = 0; dim < out.dims(); ++dim) { + const int64_t ratio = remain_out_idx / out_strides[dim]; + remain_out_idx -= ratio * out_strides[dim]; + in_idx += ratio * in_strides[perm[dim]]; + } + out_data[out_idx] = in_data[in_idx]; + } +} + +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_UNIFORM_QUANT_OPS_TENSOR_UTILS_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/unique_op_gpu.cu.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/unique_op_gpu.cu.h new file mode 100644 index 0000000000000000000000000000000000000000..27bd6f30a3fb365fc9bc12ba6cfc54cd8bc15439 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/unique_op_gpu.cu.h @@ -0,0 +1,453 @@ +/* Copyright 2021 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_KERNELS_UNIQUE_OP_GPU_CU_H_ +#define TENSORFLOW_CORE_KERNELS_UNIQUE_OP_GPU_CU_H_ + +#if GOOGLE_CUDA || TENSORFLOW_USE_ROCM + +#define EIGEN_USE_GPU + +#include "unsupported/Eigen/CXX11/Tensor" // from @eigen_archive +#include "tensorflow/core/common_runtime/gpu/gpu_event_mgr.h" +#include "tensorflow/core/framework/op_kernel.h" +#include "tensorflow/core/framework/tensor.h" +#include "tensorflow/core/kernels/gpu_prim.h" +#include "tensorflow/core/kernels/gpu_prim_helpers.h" +#include "tensorflow/core/lib/core/bits.h" +#include "tensorflow/core/lib/core/status.h" +#include "tensorflow/core/util/gpu_kernel_helper.h" +#include "tensorflow/core/util/gpu_solvers.h" // For ScratchSpace + +#if GOOGLE_CUDA +#include "xla/stream_executor/cuda/cuda_activation.h" +#elif TENSORFLOW_USE_ROCM +#include "tensorflow/core/platform/rocm.h" +#endif + +namespace tensorflow { + +typedef Eigen::GpuDevice GPUDevice; + +namespace unique_op_gpu { + +// Returns true iff index is at the end of a segment (which is equivalent to the +// beginning of the next segment). +template +struct SegmentIndicatorFunctor { + const T* __restrict__ sorted_input_ptr_; + SegmentIndicatorFunctor(const T* sorted_input_ptr) + : sorted_input_ptr_(sorted_input_ptr) {} + __device__ bool operator()(const TIndex& i) const { + return i > 0 && sorted_input_ptr_[i] != sorted_input_ptr_[i - 1]; + } +}; + +template +__global__ void ExtractFirstOccurrenceIndicesKernel( + int64_t input_size, int64_t uniq_size, + const TIndex* __restrict__ sorted_input_inds, + const TIndex* __restrict__ sorted_input_unique_ids, + TIndex* __restrict__ unique_input_inds, TIndex* __restrict__ segment_ends) { + GPU_1D_KERNEL_LOOP(i, input_size) { + TIndex sorted_input_unique_id = sorted_input_unique_ids[i]; + if (i == 0 || sorted_input_unique_id != sorted_input_unique_ids[i - 1]) { + unique_input_inds[sorted_input_unique_id] = sorted_input_inds[i]; + if (segment_ends) { + if (i == 0) { + // First thread writes the last element. + segment_ends[uniq_size - 1] = input_size; + } else { + segment_ends[sorted_input_unique_id - 1] = i; + } + } + } + } +} + +// Scatters the index of the first occurrence of each unique input value to +// unique_input_inds. +// If segment_ends is not nullptr, it is filled with the end index of each +// unique value's range in the sorted input (the last element is always set +// to input_size). +template +Status ExtractFirstOccurrenceIndices(const GPUDevice& d, int64_t input_size, + int64_t uniq_size, + const TIndex* sorted_input_inds, + const TIndex* sorted_input_unique_ids, + TIndex* unique_input_inds, + TIndex* segment_ends) { + CHECK_GT(input_size, 0); // Crash OK + GpuLaunchConfig config = GetGpuLaunchConfig( + input_size, d, &ExtractFirstOccurrenceIndicesKernel, + /*dynamic_shared_memory_size=*/0, /*block_size_limit=*/0); + return GpuLaunchKernel(ExtractFirstOccurrenceIndicesKernel, + config.block_count, config.thread_per_block, 0, + d.stream(), input_size, uniq_size, sorted_input_inds, + sorted_input_unique_ids, unique_input_inds, + segment_ends); +} + +template +__global__ void GatherOutputsAndInvertPermutationKernel( + int64_t uniq_size, const T* __restrict__ input, + const TIndex* __restrict__ sorted_unique_input_inds, + const TIndex* __restrict__ sorted_unique_perm, + const TIndex* __restrict__ segment_ends, T* __restrict__ output, + TIndex* __restrict__ inv_sorted_unique_perm, TIndex* __restrict__ count) { + GPU_1D_KERNEL_LOOP(i, uniq_size) { + output[i] = input[sorted_unique_input_inds[i]]; + auto j = sorted_unique_perm[i]; + inv_sorted_unique_perm[j] = i; + if (count) { + TIndex beg = j == 0 ? 0 : segment_ends[j - 1]; + TIndex end = segment_ends[j]; + count[i] = end - beg; + } + } +} + +// Gathers input values using sorted_unique_input_inds, and inverts the +// permutation specified by sorted_unique_perm. +template +Status GatherOutputsAndInvertPermutation(const GPUDevice& d, int64_t uniq_size, + const T* input, + const TIndex* sorted_unique_input_inds, + const TIndex* sorted_unique_perm, + const TIndex* segment_ends, T* output, + TIndex* inv_sorted_unique_perm, + TIndex* count) { + if (uniq_size == 0) return OkStatus(); + GpuLaunchConfig config = GetGpuLaunchConfig( + uniq_size, d, &GatherOutputsAndInvertPermutationKernel, + /*dynamic_shared_memory_size=*/0, /*block_size_limit=*/0); + return GpuLaunchKernel(GatherOutputsAndInvertPermutationKernel, + config.block_count, config.thread_per_block, 0, + d.stream(), uniq_size, input, sorted_unique_input_inds, + sorted_unique_perm, segment_ends, output, + inv_sorted_unique_perm, count); +} + +template +__global__ void LookupAndScatterUniqueIdsKernel( + int64_t input_size, const TIndex* sorted_input_inds, + const TIndex* __restrict__ sorted_input_unique_ids, + const TIndex* __restrict__ inv_sorted_unique_perm, + TIndex* __restrict__ idx) { + GPU_1D_KERNEL_LOOP(i, input_size) { + idx[sorted_input_inds[i]] = + inv_sorted_unique_perm[sorted_input_unique_ids[i]]; + } +} + +// Maps the values of sorted_input_unique_ids and scatters them to idx using +// sorted_input_inds. +template +Status LookupAndScatterUniqueIds(const GPUDevice& d, int64_t input_size, + const TIndex* sorted_input_inds, + const TIndex* sorted_input_unique_ids, + const TIndex* inv_sorted_unique_perm, + TIndex* idx) { + CHECK_GT(input_size, 0); // Crash OK + GpuLaunchConfig config = GetGpuLaunchConfig( + input_size, d, &LookupAndScatterUniqueIdsKernel, + /*dynamic_shared_memory_size=*/0, /*block_size_limit=*/0); + return GpuLaunchKernel(LookupAndScatterUniqueIdsKernel, + config.block_count, config.thread_per_block, 0, + d.stream(), input_size, sorted_input_inds, + sorted_input_unique_ids, inv_sorted_unique_perm, idx); +} + +} // namespace unique_op_gpu + +// This only supports Unique[WithCounts], not Unique[WithCounts]V2. +template +class UniqueOpGPU : public AsyncOpKernel { + public: + explicit UniqueOpGPU(OpKernelConstruction* context) + : AsyncOpKernel(context) {} + + template + void AllocateTemp(OpKernelContext* context, int64_t size, Tensor* tensor, + U** tensor_data, DoneCallback done) const { + OP_REQUIRES_OK_ASYNC(context, + context->allocate_temp(DataTypeToEnum::value, + TensorShape({size}), tensor), + done); + *tensor_data = tensor->flat().data(); + } + + void ComputeAsync(OpKernelContext* context, DoneCallback done) override { + const Tensor& input = context->input(0); + // TODO(dga): Make unique polymorphic for returning int32 and int64 + // vectors to support large tensors. + OP_REQUIRES_ASYNC(context, + input.NumElements() <= std::numeric_limits::max(), + errors::InvalidArgument( + "unique does not support input tensors larger than ", + std::numeric_limits::max(), " elements"), + done); + + OP_REQUIRES_ASYNC(context, TensorShapeUtils::IsVector(input.shape()), + errors::InvalidArgument("unique expects a 1D vector."), + done); + + se::Stream* stream = context->op_device_context()->stream(); + OP_REQUIRES_ASYNC(context, stream, + errors::Internal("No GPU stream available."), done); + + int64_t input_size = input.NumElements(); + bool has_count_output = num_outputs() > 2; + if (input_size == 0) { + // Early exit for trivial case. + Tensor* t = nullptr; + OP_REQUIRES_OK_ASYNC( + context, context->allocate_output(0, TensorShape({0}), &t), done); + OP_REQUIRES_OK_ASYNC( + context, context->allocate_output(1, TensorShape({0}), &t), done); + if (has_count_output) { + OP_REQUIRES_OK_ASYNC( + context, context->allocate_output(2, TensorShape({0}), &t), done); + } + done(); + return; + } + + // The algorithm implemented here is as follows: + // input = [3, 5, 3, 4, 1, 4, 9, 8, 6, 3, 5, 7, 8, 8, 4, 6, 4, 2, 5, 6] + // 1) Sort the input to group equal values together in segments. + // sorted_input, sorted_input_inds = sort(input) + // sorted_input: + // [1, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 6, 6, 6, 7, 8, 8, 8, 9] + // sorted_input_inds: + // [4, 17, 0, 2, 9, 3, 5, 14, 16, 1, 10, 18, 8, 15, 19, 11, 7, 12, 13, 6] + // 2) Identify the boundaries between segments and use prefix sum to + // compute the unique ID for each sorted value. + // sorted_input_unique_ids = prefix_sum(indicator(sorted_input)) + // indicator(sorted_input): + // [0, 1, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1] + // sorted_input_unique_ids: + // [0, 1, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 5, 5, 5, 6, 7, 7, 7, 8] + // 3) Extract the input index of the first occurrence of each unique value. + // If counts are required, also extract the end index of each segment. + // unique_input_inds[sorted_input_unique_ids] = + // sorted_input_inds (@ indicator) + // segment_ends[sorted_input_unique_ids[i] - 1] = i (@ indicator) + // unique_input_inds: [4, 17, 0, 3, 1, 8, 11, 7, 6] + // segment_ends: [1, 2, 5, 9, 12, 15, 16, 19, 20] + // 4) Sort the extracted unique input indices to put them in order of + // first appearance. + // sorted_unique_input_inds, sorted_unique_perm = + // sort(unique_input_inds) + // sorted_unique_input_inds: [0, 1, 3, 4, 6, 7, 8, 11, 17] + // sorted_unique_perm: [2, 4, 3, 0, 8, 7, 5, 6, 1] + // 5) Gather the sorted unique input values to produce output, and invert + // the second sort permutation to produce an inverse ID mapping. If + // counts are required, also take the adjacent difference between + // segment_ends indices to produce counts. + // output = input[sorted_unique_input_inds] + // inv_sorted_unique_perm[sorted_unique_perm[i]] = i + // counts = adjacent_difference(segment_ends) + // output: [3, 5, 4, 1, 9, 8, 6, 7, 2] + // inv_sorted_unique_perm: [3, 8, 0, 2, 1, 6, 7, 5, 4] + // counts: [3, 3, 4, 1, 1, 3, 3, 1, 1] + // 6) Look up unique IDs via the inverse ID mapping and scatter them using + // the original sort permutation to produce the indices output. + // idx[sorted_input_inds] = + // inv_sorted_unique_perm[sorted_input_unique_ids] + // idx: [0, 1, 0, 2, 3, 2, 4, 5, 6, 0, 1, 7, 5, 5, 2, 6, 2, 8, 1, 6] + + Tensor sorted_input_inds; + TIndex* sorted_input_inds_ptr = nullptr; + AllocateTemp(context, input_size, &sorted_input_inds, + &sorted_input_inds_ptr, done); + if (!context->status().ok()) return; + + Tensor sorted_input; + T* sorted_input_ptr = nullptr; + AllocateTemp(context, input_size, &sorted_input, &sorted_input_ptr, done); + if (!context->status().ok()) return; + + const T* input_ptr = input.flat().data(); + OP_REQUIRES_OK_ASYNC( + context, + GpuRadixSort(context, input_size, /*keys_in=*/input_ptr, + /*keys_out=*/sorted_input_ptr, + /*indices_in=*/static_cast(nullptr), + /*indices_out=*/sorted_input_inds_ptr), + done); + + using namespace unique_op_gpu; + + // Create a fancy input iterator to indicate segment boundaries. + gpuprim::CountingInputIterator counting_iter(0); + gpuprim::TransformInputIterator, + gpuprim::CountingInputIterator> + segment_indicator_iter(counting_iter, {sorted_input_ptr}); + + Tensor sorted_input_unique_ids; + TIndex* sorted_input_unique_ids_ptr = nullptr; + AllocateTemp(context, input_size, &sorted_input_unique_ids, + &sorted_input_unique_ids_ptr, done); + if (!context->status().ok()) return; + + OP_REQUIRES_OK_ASYNC( + context, + GpuInclusivePrefixSum(context, input_size, segment_indicator_iter, + sorted_input_unique_ids_ptr), + done); + + // Copy the last element of sorted_input_unique_ids back to the host to + // obtain uniq_size. + ScratchSpace last_idx_host(context, 1, /*on_host=*/true); + OP_REQUIRES_ASYNC( + context, + stream + ->ThenMemcpy(last_idx_host.mutable_data(), + se::DeviceMemoryBase( + const_cast(sorted_input_unique_ids_ptr) + + (input_size - 1), + sizeof(*last_idx_host.data())), + sizeof(*last_idx_host.data())) + .ok(), + errors::Internal("Failed to copy last_idx to host"), done); + + auto async_finish_computation = [this, context, input_size, input_ptr, + sorted_input_inds, sorted_input_inds_ptr, + sorted_input_unique_ids, + sorted_input_unique_ids_ptr, last_idx_host, + has_count_output, done]() -> void { + const GPUDevice& device = context->eigen_gpu_device(); + int64 uniq_size = (*last_idx_host.data()) + 1; + + se::gpu::ScopedActivateExecutorContext scoped_activation{ + context->op_device_context()->stream()->parent()}; + + Tensor unique_input_inds; + TIndex* unique_input_inds_ptr = nullptr; + AllocateTemp(context, uniq_size, &unique_input_inds, + &unique_input_inds_ptr, done); + if (!context->status().ok()) return; + + Tensor segment_ends; + TIndex* segment_ends_ptr = nullptr; + if (has_count_output) { + AllocateTemp(context, uniq_size, &segment_ends, &segment_ends_ptr, + done); + if (!context->status().ok()) return; + } + + OP_REQUIRES_OK_ASYNC( + context, + ExtractFirstOccurrenceIndices( + device, input_size, uniq_size, sorted_input_inds_ptr, + sorted_input_unique_ids_ptr, unique_input_inds_ptr, + segment_ends_ptr), + done); + + Tensor sorted_unique_input_inds; + TIndex* sorted_unique_input_inds_ptr = nullptr; + AllocateTemp(context, uniq_size, &sorted_unique_input_inds, + &sorted_unique_input_inds_ptr, done); + if (!context->status().ok()) return; + + Tensor sorted_unique_perm; + TIndex* sorted_unique_perm_ptr = nullptr; + AllocateTemp(context, uniq_size, &sorted_unique_perm, + &sorted_unique_perm_ptr, done); + if (!context->status().ok()) return; + + // Sort by input index so that output is in order of appearance. + OP_REQUIRES_OK_ASYNC( + context, + GpuRadixSort(context, uniq_size, + /*keys_in=*/unique_input_inds_ptr, + /*keys_out=*/sorted_unique_input_inds_ptr, + /*indices_in=*/static_cast(nullptr), + /*indices_out=*/sorted_unique_perm_ptr, + /*num_bits=*/Log2Ceiling(input_size)), + done); + + // Free temporary tensor that is no longer needed. + unique_input_inds = Tensor(); + unique_input_inds_ptr = nullptr; + + Tensor* output = nullptr; + OP_REQUIRES_OK_ASYNC( + context, + context->allocate_output(0, TensorShape({uniq_size}), &output), done); + T* output_ptr = output->flat().data(); + + Tensor inv_sorted_unique_perm; + TIndex* inv_sorted_unique_perm_ptr = nullptr; + AllocateTemp(context, uniq_size, &inv_sorted_unique_perm, + &inv_sorted_unique_perm_ptr, done); + if (!context->status().ok()) return; + + TIndex* count_ptr = nullptr; + if (has_count_output) { + Tensor* count = nullptr; + OP_REQUIRES_OK_ASYNC( + context, + context->allocate_output(2, TensorShape({uniq_size}), &count), + done); + count_ptr = count->flat().data(); + } + + // Compute output and counts (if necessary). + OP_REQUIRES_OK_ASYNC( + context, + GatherOutputsAndInvertPermutation( + device, uniq_size, input_ptr, sorted_unique_input_inds_ptr, + sorted_unique_perm_ptr, segment_ends_ptr, output_ptr, + inv_sorted_unique_perm_ptr, count_ptr), + done); + + // Free temporary tensors that are no longer needed. + sorted_unique_perm = Tensor(); + sorted_unique_perm_ptr = nullptr; + sorted_unique_input_inds = Tensor(); + sorted_unique_input_inds_ptr = nullptr; + segment_ends = Tensor(); + segment_ends_ptr = nullptr; + + Tensor* idx = nullptr; + OP_REQUIRES_OK_ASYNC( + context, context->allocate_output(1, TensorShape({input_size}), &idx), + done); + TIndex* idx_ptr = idx->flat().data(); + + // Compute indices output. + OP_REQUIRES_OK_ASYNC( + context, + LookupAndScatterUniqueIds(device, input_size, sorted_input_inds_ptr, + sorted_input_unique_ids_ptr, + inv_sorted_unique_perm_ptr, idx_ptr), + done); + + done(); + }; + + context->device() + ->tensorflow_accelerator_device_info() + ->event_mgr->ThenExecute(stream, async_finish_computation); + } +}; + +} // end namespace tensorflow + +#endif // GOOGLE_CUDA + +#endif // TENSORFLOW_CORE_KERNELS_UNIQUE_OP_GPU_CU_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/variable_ops.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/variable_ops.h new file mode 100644 index 0000000000000000000000000000000000000000..035b583a5238e6167cfc44f4238f2b4cb54d7e6a --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/variable_ops.h @@ -0,0 +1,47 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_KERNELS_VARIABLE_OPS_H_ +#define TENSORFLOW_CORE_KERNELS_VARIABLE_OPS_H_ + +#include "tensorflow/core/framework/allocator.h" +#include "tensorflow/core/framework/op_kernel.h" +#include "tensorflow/core/framework/register_types.h" +#include "tensorflow/core/framework/resource_mgr.h" +#include "tensorflow/core/framework/resource_var.h" +#include "tensorflow/core/lib/core/errors.h" +#include "tensorflow/core/platform/macros.h" +#include "tensorflow/core/platform/mutex.h" +#include "tensorflow/core/platform/types.h" + +namespace tensorflow { + +class VariableOp : public OpKernel { + public: + explicit VariableOp(OpKernelConstruction* context); + void Compute(OpKernelContext* ctx) override; + + private: + DataType dtype_; + TensorShape shape_; + ContainerInfo cinfo_; + + VariableOp(const VariableOp&) = delete; + void operator=(const VariableOp&) = delete; +}; + +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_VARIABLE_OPS_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/variant_ops_util.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/variant_ops_util.h new file mode 100644 index 0000000000000000000000000000000000000000..7ebe4fb87dfb8d7b9a095208d367417a8358d980 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/variant_ops_util.h @@ -0,0 +1,36 @@ +/* Copyright 2022 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_KERNELS_VARIANT_OPS_UTIL_H_ +#define TENSORFLOW_CORE_KERNELS_VARIANT_OPS_UTIL_H_ + +#include + +#include "tensorflow/core/platform/status.h" + +namespace tensorflow { + +class OpKernelContext; +class Tensor; +class Variant; + +void AddNVariant(OpKernelContext* ctx, + std::function + binary_add_variant); + +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_VARIANT_OPS_UTIL_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/where_op.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/where_op.h new file mode 100644 index 0000000000000000000000000000000000000000..9388c8a5557c80ac4b9fc1ed7ac9a2b17e46b391 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/where_op.h @@ -0,0 +1,65 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_KERNELS_WHERE_OP_H_ +#define TENSORFLOW_CORE_KERNELS_WHERE_OP_H_ + +#include "unsupported/Eigen/CXX11/Tensor" // from @eigen_archive +#include "tensorflow/core/framework/op_kernel.h" +#include "tensorflow/core/framework/tensor_types.h" +#include "tensorflow/core/platform/macros.h" +#include "tensorflow/core/platform/types.h" + +namespace tensorflow { + +#define TF_CALL_WHERE_GPU_TYPES(m) \ + TF_CALL_int8(m); \ + TF_CALL_uint8(m); \ + TF_CALL_int64(m); \ + TF_CALL_float(m); \ + TF_CALL_double(m); \ + TF_CALL_complex64(m); \ + TF_CALL_complex128(m); \ + TF_CALL_bool(m); + +namespace functor { + +template +struct NumTrue { + EIGEN_ALWAYS_INLINE static Status Compute( + OpKernelContext* ctx, const Device& d, + typename TTypes::ConstFlat input, + typename TTypes::UnalignedScalar num_true); +}; + +template +struct Where { + // Copies indices of true values in input into output. The pointer + // found_true should sit on the host. Compute should copy the + // number of true elements found into it. At the end, if + // *found_true != output.dimension(0), + // then the input may have changed between the initial counting of + // the true values and the call to Where. + EIGEN_ALWAYS_INLINE static Status Compute( + OpKernelContext* ctx, const Device& d, + typename TTypes::ConstTensor input, + typename TTypes::Matrix output, TIndex* found_true); +}; + +} // namespace functor + +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_WHERE_OP_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/where_op_gpu.cu.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/where_op_gpu.cu.h new file mode 100644 index 0000000000000000000000000000000000000000..5eb03ec60addd830cb241042bcb234533e7f70c7 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/where_op_gpu.cu.h @@ -0,0 +1,353 @@ +/* Copyright 2017 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_KERNELS_WHERE_OP_GPU_CU_H_ +#define TENSORFLOW_CORE_KERNELS_WHERE_OP_GPU_CU_H_ + +#if GOOGLE_CUDA || TENSORFLOW_USE_ROCM + +#define EIGEN_USE_GPU + +#include "unsupported/Eigen/CXX11/Tensor" // from @eigen_archive +#include "tensorflow/core/framework/bounds_check.h" +#include "tensorflow/core/framework/register_types.h" +#include "tensorflow/core/framework/tensor_types.h" +#include "tensorflow/core/kernels/gpu_prim.h" +#include "tensorflow/core/kernels/where_op.h" +#include "tensorflow/core/platform/macros.h" +#include "tensorflow/core/platform/types.h" +#include "tensorflow/core/util/gpu_kernel_helper.h" + +namespace tensorflow { + +typedef Eigen::GpuDevice GPUDevice; + +namespace functor { + +template +__global__ void PropagateWhereIndicesKernel( + const TIndex output_rows, const typename Eigen::array strides, + int64* __restrict__ output) { + // TODO(ebrevdo): Use a multi-dimensional loop, increasing the + // dimensions of individual indices manually, instead of relying on + // a scalar loop variable and using integer division. + GPU_1D_KERNEL_LOOP(i, output_rows) { + TIndex index_value = ldg(output + NDIM * i); +#pragma unroll + for (int c = 0; c < NDIM; ++c) { + *(output + NDIM * i + c) = index_value / strides[c]; + index_value %= strides[c]; + } + } +} + +namespace { + +template +struct IsNonzero { + EIGEN_DEVICE_FUNC IsNonzero() : zero(T(0)) {} + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE bool operator()(const T& x) const { + return (x != zero); + } + const T zero; +}; + +template +struct CubDeviceReduceCount { + gpuError_t operator()(void* d_temp_storage, size_t& temp_storage_bytes, + const T* d_in, TIndex* d_out, int num_items, + gpuStream_t stream = 0, + bool debug_synchronous = false) { + IsNonzero is_nonzero; + gpuprim::TransformInputIterator, const T*> + is_nonzero_iter(d_in, is_nonzero); + return gpuprim::DeviceReduce::Sum(d_temp_storage, temp_storage_bytes, + is_nonzero_iter, d_out, num_items, stream, + debug_synchronous); + } +}; + +template +struct CubDeviceReduceCount { + gpuError_t operator()(void* d_temp_storage, size_t& temp_storage_bytes, + const bool* d_in, TIndex* d_out, int num_items, + gpuStream_t stream = 0, + bool debug_synchronous = false) { + return gpuprim::DeviceReduce::Sum(d_temp_storage, temp_storage_bytes, d_in, + d_out, num_items, stream, + debug_synchronous); + } +}; + +template +struct CubDeviceSelectFlaggedCounter; + +template +struct CubDeviceSelectFlaggedCounter { + gpuError_t operator()(void* d_temp_storage, size_t& temp_storage_bytes, + const T* d_flags, OutputIterator d_out, + TIndex* d_num_selected_out, int num_items, + gpuStream_t stream = 0, + bool debug_synchronous = false) { + gpuprim::CountingInputIterator select_counter(0); + IsNonzero is_nonzero; + gpuprim::TransformInputIterator, const T*> + is_nonzero_iter(d_flags, is_nonzero); + return gpuprim::DeviceSelect::Flagged( + d_temp_storage, temp_storage_bytes, select_counter /*d_in*/, + is_nonzero_iter /*d_flags*/, d_out, d_num_selected_out, num_items, + stream, debug_synchronous); + } +}; + +template +struct CubDeviceSelectFlaggedCounter { + gpuError_t operator()(void* d_temp_storage, size_t& temp_storage_bytes, + const T* d_flags, OutputIterator d_out, + TIndex* d_num_selected_out, int num_items, + gpuStream_t stream = 0, + bool debug_synchronous = false) { + gpuprim::CountingInputIterator select_counter(0); + return gpuprim::DeviceSelect::Flagged( + d_temp_storage, temp_storage_bytes, select_counter /*d_in*/, d_flags, + d_out, d_num_selected_out, num_items, stream, debug_synchronous); + } +}; + +} // namespace + +template +struct NumTrue { + EIGEN_ALWAYS_INLINE static Status Compute( + OpKernelContext* ctx, const GPUDevice& d, + typename TTypes::ConstFlat input, + typename TTypes::UnalignedScalar num_true) { + const auto& cu_stream = GetGpuStream(ctx); + + std::size_t temp_storage_bytes = 0; + const T* input_data = input.data(); + TIndex* num_true_data = num_true.data(); + + // TODO(ebrevdo): sum doesn't work; perhaps need a different + // iterator? + auto reducer = CubDeviceReduceCount(); + auto first_success = reducer(/*temp_storage*/ nullptr, temp_storage_bytes, + /*d_in*/ input_data, + /*d_out*/ num_true_data, + /*num_items*/ input.size(), + /*stream*/ cu_stream); + + if (first_success != gpuSuccess) { + return errors::Internal( + "WhereOp: Could not launch gpuprim::DeviceReduce::Sum to calculate " + "temp_storage_bytes, status: ", + GpuGetErrorString(first_success)); + } + + Tensor temp_storage; + TF_RETURN_IF_ERROR(ctx->allocate_temp( + DT_INT8, TensorShape({static_cast(temp_storage_bytes)}), + &temp_storage)); + + auto second_success = reducer( + /*temp_storage*/ temp_storage.flat().data(), temp_storage_bytes, + /*d_in*/ input_data, + /*d_out*/ num_true_data, + /*num_items*/ input.size(), + /*stream*/ cu_stream); + + if (second_success != gpuSuccess) { + return errors::Internal( + "WhereOp: Could not launch gpuprim::DeviceReduce::Sum to count " + "number of true / nonzero indices. temp_storage_bytes: ", + temp_storage_bytes, ", status: ", GpuGetErrorString(second_success)); + } + + return OkStatus(); + } +}; + +#define NUMTRUE_GPU_FUNCTOR(T) \ + template struct NumTrue; \ + template struct NumTrue; + +// We only need to declare the NumTrue functor once, but this file is +// included from where_op_gpu_impl_X.cu.cc for X=1,2,... +// Only declare for X = 1. +#if GPU_PROVIDED_DIM == 1 + +TF_CALL_WHERE_GPU_TYPES(NUMTRUE_GPU_FUNCTOR); + +#endif // GPU_PROVIDED_DIM == 1 + +#undef NUMTRUE_GPU_FUNCTOR + +template +class WhereOutputIterator { + public: + // Required iterator traits + typedef WhereOutputIterator self_type; + typedef std::ptrdiff_t difference_type; + typedef void value_type; + typedef void pointer; + typedef int64& reference; + +#if (THRUST_VERSION >= 100700) + // Use Thrust's iterator categories so we can use these iterators in Thrust + // 1.7 (or newer) methods + typedef typename thrust::detail::iterator_facade_category< + thrust::device_system_tag, thrust::random_access_traversal_tag, + value_type, + reference>::type iterator_category; ///< The iterator category +#else + typedef std::random_access_iterator_tag + iterator_category; ///< The iterator category +#endif // THRUST_VERSION + + WhereOutputIterator(int64* ptr, const Eigen::DenseIndex max_row) + : ptr_(ptr), max_row_(max_row) {} + + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE int64& operator[](int n) const { + // If the selection mechanism finds too many true values (because + // the input tensor changed between allocation of output and now), + // we may accidentally try to write past the allowable memory. If + // valid is false, then we don't do this. Instead, we'll read off + // the number of items found in Flagged()'s d_num_selected_out at + // the end and confirm that it matches the number of rows of output. + const bool valid = FastBoundsCheck(n, max_row_); + return *(ptr_ + (valid ? (NDIM * n) : 0)); + } + + private: + int64* ptr_; + const Eigen::DenseIndex max_row_; +}; + +template +Eigen::array CalculateStrides( + typename TTypes::ConstTensor input) { + const Eigen::DSizes dims = input.dimensions(); + Eigen::array strides; + EIGEN_STATIC_ASSERT((static_cast(decltype(input)::Layout) == + static_cast(Eigen::RowMajor)), + INTERNAL_ERROR_INPUT_SHOULD_BE_ROWMAJOR); + strides[NDIM - 1] = 1; + for (int i = NDIM - 2; i >= 0; --i) { + strides[i] = strides[i + 1] * dims[i + 1]; + } + return strides; +} + +template +struct Where { + EIGEN_ALWAYS_INLINE static Status Compute( + OpKernelContext* ctx, const GPUDevice& d, + typename TTypes::ConstTensor input, + typename TTypes::Matrix output, TIndex* found_true_host) { + if (output.dimension(0) == 0) { + // Nothing to do. + return OkStatus(); + } + + const auto& cu_stream = GetGpuStream(ctx); + + std::size_t temp_storage_bytes = 0; + + Tensor found_true_t; + TF_RETURN_IF_ERROR(ctx->allocate_temp(DataTypeToEnum::v(), + TensorShape({}), &found_true_t)); + TIndex* found_true_device = found_true_t.scalar().data(); + + WhereOutputIterator output_iterator( + output.data(), + /* max_row */ output.dimension(0)); + + typedef std::decay DT; + CubDeviceSelectFlaggedCounter< + T, TIndex, decltype(output_iterator) /*OutputIterator*/, + std::is_convertible::value /*IsConvertibleToBool*/> + counter; + auto first_success = counter(/*temp_storage*/ nullptr, temp_storage_bytes, + /*d_flags*/ input.data(), + /*d_out*/ output_iterator, + /*d_num_selected_out*/ found_true_device, + /*num_items*/ input.size(), + /*stream*/ cu_stream); + if (first_success != gpuSuccess) { + return errors::Internal( + "WhereOp: Could not launch gpuprim::DeviceSelect::Flagged to " + "calculate " + "temp_storage_bytes, status: ", + GpuGetErrorString(first_success)); + } + + Tensor temp_storage; + TF_RETURN_IF_ERROR(ctx->allocate_temp( + DT_INT8, TensorShape({static_cast(temp_storage_bytes)}), + &temp_storage)); + + auto second_success = counter( + /*temp_storage*/ temp_storage.flat().data(), temp_storage_bytes, + /*d_flags*/ input.data(), + /*d_out*/ output_iterator, + /*d_num_selected_out*/ found_true_device, + /*num_items*/ input.size(), + /*stream*/ cu_stream); + + if (second_success != gpuSuccess) { + return errors::Internal( + "WhereOp: Could not launch gpuprim::DeviceSelect::Flagged to copy " + "indices out, status: ", + GpuGetErrorString(second_success)); + } + + // TODO(ebrevdo): Find a way to synchronously copy back data from + // found_true_device to *found_true_host. + + const Eigen::array strides = + CalculateStrides(input); + const TIndex output_rows = output.dimension(0); + GpuLaunchConfig config = GetGpuLaunchConfig(output_rows, d); + TF_CHECK_OK(GpuLaunchKernel(PropagateWhereIndicesKernel, + config.block_count, config.thread_per_block, 0, + d.stream(), output_rows, strides, + output.data())); + + return OkStatus(); + } +}; + +#define DECLARE_GPU_SPEC_INDEX(Dims, T, TIndex) \ + template struct Where + +#define DECLARE_GPU_SPEC(T) \ + DECLARE_GPU_SPEC_INDEX(GPU_PROVIDED_DIM, T, int32); \ + DECLARE_GPU_SPEC_INDEX(GPU_PROVIDED_DIM, T, int64) + +TF_CALL_WHERE_GPU_TYPES(DECLARE_GPU_SPEC); + +#undef DECLARE_GPU_SPEC +#undef DECLARE_GPU_SPEC_INDEX + +} // namespace functor + +} // namespace tensorflow + +#endif // GOOGLE_CUDA || TENSORFLOW_USE_ROCM + +#endif // TENSORFLOW_CORE_KERNELS_WHERE_OP_GPU_CU_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/winograd_transform.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/winograd_transform.h new file mode 100644 index 0000000000000000000000000000000000000000..4f4067e37e6fa0ddb84ca1550174b15e119cc717 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/winograd_transform.h @@ -0,0 +1,377 @@ +/* Copyright 2016 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_KERNELS_WINOGRAD_TRANSFORM_H_ +#define TENSORFLOW_CORE_KERNELS_WINOGRAD_TRANSFORM_H_ + +#include "tensorflow/core/kernels/deep_conv2d.h" + +namespace tensorflow { + +// Winograd DeepConv2DTransform implementation for 3x3 filters. +// Details: +// *) Arithmetic complexity of computations: Shmuel Winograd +// *) Fast Algorithms for Convolutional Neural Networks: Lavin, Gray + +template +class WinogradTransform : public DeepConv2DTransform { + public: + typedef typename DeepConv2DTransform::Shape Shape; + + WinogradTransform() + : filter_shape_(3, 3), input_shape_(4, 4), output_shape_(2, 2) {} + + virtual void GetFilterTransformMatrix(const int64_t rows, const int64_t cols, + T* transform_matrix) const; + + virtual void GetInputTransformMatrix(const int64_t rows, const int64_t cols, + T* transform_matrix) const; + + virtual void GetOutputTransformMatrix(const int64_t rows, const int64_t cols, + T* transform_matrix) const; + + virtual const Shape& filter_shape() const { return filter_shape_; } + virtual const Shape& input_shape() const { return input_shape_; } + virtual const Shape& output_shape() const { return output_shape_; } + + private: + const Shape filter_shape_; + const Shape input_shape_; + const Shape output_shape_; +}; + +// The filter transform matrix is the kronecker product 'M * M' of the +// following matrix 'M': +// +// [ 1 0 0 ] +// [ 1/2 1/2 1/2 ] +// [ 1/2 -1/2 1/2 ] +// [ 0 0 1 ] +// +// The data layout of 'transform_matrix': +// [input_tile_spatial_size, filter_spatial_size] +// +template +void WinogradTransform::GetFilterTransformMatrix(const int64_t rows, + const int64_t cols, + T* transform_matrix) const { + CHECK_GT(rows, 0); + CHECK_GT(cols, 0); + memset(transform_matrix, 0, sizeof(T) * rows * cols); + + // Sub matrix [0,0] + transform_matrix[0 * cols + 0] = T(1.0); + + transform_matrix[1 * cols + 0] = T(0.5); + transform_matrix[1 * cols + 1] = T(0.5); + transform_matrix[1 * cols + 2] = T(0.5); + + transform_matrix[2 * cols + 0] = T(0.5); + transform_matrix[2 * cols + 1] = T(-0.5); + transform_matrix[2 * cols + 2] = T(0.5); + + transform_matrix[3 * cols + 2] = T(1.0); + + // Sub matrix [1,0] + transform_matrix[4 * cols + 0] = T(0.5); + + transform_matrix[5 * cols + 0] = T(0.25); + transform_matrix[5 * cols + 1] = T(0.25); + transform_matrix[5 * cols + 2] = T(0.25); + + transform_matrix[6 * cols + 0] = T(0.25); + transform_matrix[6 * cols + 1] = T(-0.25); + transform_matrix[6 * cols + 2] = T(0.25); + + transform_matrix[7 * cols + 2] = T(0.5); + + // Sub matrix [1,1] + transform_matrix[4 * cols + 3] = T(0.5); + + transform_matrix[5 * cols + 3] = T(0.25); + transform_matrix[5 * cols + 4] = T(0.25); + transform_matrix[5 * cols + 5] = T(0.25); + + transform_matrix[6 * cols + 3] = T(0.25); + transform_matrix[6 * cols + 4] = T(-0.25); + transform_matrix[6 * cols + 5] = T(0.25); + + transform_matrix[7 * cols + 5] = T(0.5); + + // Sub matrix [1,2] + transform_matrix[4 * cols + 6] = T(0.5); + + transform_matrix[5 * cols + 6] = T(0.25); + transform_matrix[5 * cols + 7] = T(0.25); + transform_matrix[5 * cols + 8] = T(0.25); + + transform_matrix[6 * cols + 6] = T(0.25); + transform_matrix[6 * cols + 7] = T(-0.25); + transform_matrix[6 * cols + 8] = T(0.25); + + transform_matrix[7 * cols + 8] = T(0.5); + + // Sub matrix [2,0] + transform_matrix[8 * cols + 0] = T(0.5); + + transform_matrix[9 * cols + 0] = T(0.25); + transform_matrix[9 * cols + 1] = T(0.25); + transform_matrix[9 * cols + 2] = T(0.25); + + transform_matrix[10 * cols + 0] = T(0.25); + transform_matrix[10 * cols + 1] = T(-0.25); + transform_matrix[10 * cols + 2] = T(0.25); + + transform_matrix[11 * cols + 2] = T(0.5); + + // Sub matrix [2,1] + transform_matrix[8 * cols + 3] = T(-0.5); + + transform_matrix[9 * cols + 3] = T(-0.25); + transform_matrix[9 * cols + 4] = T(-0.25); + transform_matrix[9 * cols + 5] = T(-0.25); + + transform_matrix[10 * cols + 3] = T(-0.25); + transform_matrix[10 * cols + 4] = T(0.25); + transform_matrix[10 * cols + 5] = T(-0.25); + + transform_matrix[11 * cols + 5] = T(-0.5); + + // Sub matrix [2,2] + transform_matrix[8 * cols + 6] = T(0.5); + + transform_matrix[9 * cols + 6] = T(0.25); + transform_matrix[9 * cols + 7] = T(0.25); + transform_matrix[9 * cols + 8] = T(0.25); + + transform_matrix[10 * cols + 6] = T(0.25); + transform_matrix[10 * cols + 7] = T(-0.25); + transform_matrix[10 * cols + 8] = T(0.25); + + transform_matrix[11 * cols + 8] = T(0.5); + + // Sub matrix [3,2] + transform_matrix[12 * cols + 6] = T(1.0); + + transform_matrix[13 * cols + 6] = T(0.5); + transform_matrix[13 * cols + 7] = T(0.5); + transform_matrix[13 * cols + 8] = T(0.5); + + transform_matrix[14 * cols + 6] = T(0.5); + transform_matrix[14 * cols + 7] = T(-0.5); + transform_matrix[14 * cols + 8] = T(0.5); + + transform_matrix[15 * cols + 8] = T(1.0); +} + +// The input transform matrix is the kronecker product 'M * M' of the +// following matrix 'M': +// +// [1 0 -1 0] +// [0 1 1 0] +// [0 -1 1 0] +// [0 1 0 -1] +// +// Data layout of 'transform_matrix': +// [tile_spatial_size, tile_spatial_size] +// +template +void WinogradTransform::GetInputTransformMatrix(const int64_t rows, + const int64_t cols, + T* transform_matrix) const { + CHECK_GT(rows, 0); + CHECK_GT(cols, 0); + memset(transform_matrix, 0, sizeof(T) * rows * cols); + + // Sub matrix [0,0] + transform_matrix[0 * cols + 0] = T(1.0); + transform_matrix[0 * cols + 2] = T(-1.0); + + transform_matrix[1 * cols + 1] = T(1.0); + transform_matrix[1 * cols + 2] = T(1.0); + + transform_matrix[2 * cols + 1] = T(-1.0); + transform_matrix[2 * cols + 2] = T(1.0); + + transform_matrix[3 * cols + 1] = T(1.0); + transform_matrix[3 * cols + 3] = T(-1.0); + + // Sub matrix [0,2] + transform_matrix[0 * cols + 8] = T(-1.0); + transform_matrix[0 * cols + 10] = T(1.0); + + transform_matrix[1 * cols + 9] = T(-1.0); + transform_matrix[1 * cols + 10] = T(-1.0); + + transform_matrix[2 * cols + 9] = T(1.0); + transform_matrix[2 * cols + 10] = T(-1.0); + + transform_matrix[3 * cols + 9] = T(-1.0); + transform_matrix[3 * cols + 11] = T(1.0); + + // Sub matrix [1,1] + transform_matrix[4 * cols + 4] = T(1.0); + transform_matrix[4 * cols + 6] = T(-1.0); + + transform_matrix[5 * cols + 5] = T(1.0); + transform_matrix[5 * cols + 6] = T(1.0); + + transform_matrix[6 * cols + 5] = T(-1.0); + transform_matrix[6 * cols + 6] = T(1.0); + + transform_matrix[7 * cols + 5] = T(1.0); + transform_matrix[7 * cols + 7] = T(-1.0); + + // Sub matrix [1,2] + transform_matrix[4 * cols + 8] = T(1.0); + transform_matrix[4 * cols + 10] = T(-1.0); + + transform_matrix[5 * cols + 9] = T(1.0); + transform_matrix[5 * cols + 10] = T(1.0); + + transform_matrix[6 * cols + 9] = T(-1.0); + transform_matrix[6 * cols + 10] = T(1.0); + + transform_matrix[7 * cols + 9] = T(1.0); + transform_matrix[7 * cols + 11] = T(-1.0); + + // Sub matrix [2,1] + transform_matrix[8 * cols + 4] = T(-1.0); + transform_matrix[8 * cols + 6] = T(1.0); + + transform_matrix[9 * cols + 5] = T(-1.0); + transform_matrix[9 * cols + 6] = T(-1.0); + + transform_matrix[10 * cols + 5] = T(1.0); + transform_matrix[10 * cols + 6] = T(-1.0); + + transform_matrix[11 * cols + 5] = T(-1.0); + transform_matrix[11 * cols + 7] = T(1.0); + + // Sub matrix [2,2] + transform_matrix[8 * cols + 8] = T(1.0); + transform_matrix[8 * cols + 10] = T(-1.0); + + transform_matrix[9 * cols + 9] = T(1.0); + transform_matrix[9 * cols + 10] = T(1.0); + + transform_matrix[10 * cols + 9] = T(-1.0); + transform_matrix[10 * cols + 10] = T(1.0); + + transform_matrix[11 * cols + 9] = T(1.0); + transform_matrix[11 * cols + 11] = T(-1.0); + + // Sub matrix [3,1] + transform_matrix[12 * cols + 4] = T(1.0); + transform_matrix[12 * cols + 6] = T(-1.0); + + transform_matrix[13 * cols + 5] = T(1.0); + transform_matrix[13 * cols + 6] = T(1.0); + + transform_matrix[14 * cols + 5] = T(-1.0); + transform_matrix[14 * cols + 6] = T(1.0); + + transform_matrix[15 * cols + 5] = T(1.0); + transform_matrix[15 * cols + 7] = T(-1.0); + + // Sub matrix [3,3] + transform_matrix[12 * cols + 12] = T(-1.0); + transform_matrix[12 * cols + 14] = T(1.0); + + transform_matrix[13 * cols + 13] = T(-1.0); + transform_matrix[13 * cols + 14] = T(-1.0); + + transform_matrix[14 * cols + 13] = T(1.0); + transform_matrix[14 * cols + 14] = T(-1.0); + + transform_matrix[15 * cols + 13] = T(-1.0); + transform_matrix[15 * cols + 15] = T(1.0); +}; + +// The output transform matrix is the kronecker product 'M * M' of the +// following matrix 'M': +// +// [1 1 1 0] +// [0 1 -1 -1] +// +// Data layout of 'transform_matrix': +// [out_tile_spatial_size, tile_spatial_size] +// +template +void WinogradTransform::GetOutputTransformMatrix(const int64_t rows, + const int64_t cols, + T* transform_matrix) const { + CHECK_GT(rows, 0); + CHECK_GT(cols, 0); + memset(transform_matrix, 0, sizeof(T) * rows * cols); + + // Sub matrix [0,0] + transform_matrix[0 * cols + 0] = T(1.0); + transform_matrix[0 * cols + 1] = T(1.0); + transform_matrix[0 * cols + 2] = T(1.0); + + transform_matrix[1 * cols + 1] = T(1.0); + transform_matrix[1 * cols + 2] = T(-1.0); + transform_matrix[1 * cols + 3] = T(-1.0); + + // Sub matrix [0,1] + transform_matrix[0 * cols + 4] = T(1.0); + transform_matrix[0 * cols + 5] = T(1.0); + transform_matrix[0 * cols + 6] = T(1.0); + + transform_matrix[1 * cols + 5] = T(1.0); + transform_matrix[1 * cols + 6] = T(-1.0); + transform_matrix[1 * cols + 7] = T(-1.0); + + // Sub matrix [0,2] + transform_matrix[0 * cols + 8] = T(1.0); + transform_matrix[0 * cols + 9] = T(1.0); + transform_matrix[0 * cols + 10] = T(1.0); + + transform_matrix[1 * cols + 9] = T(1.0); + transform_matrix[1 * cols + 10] = T(-1.0); + transform_matrix[1 * cols + 11] = T(-1.0); + + // Sub matrix [1,1] + transform_matrix[2 * cols + 4] = T(1.0); + transform_matrix[2 * cols + 5] = T(1.0); + transform_matrix[2 * cols + 6] = T(1.0); + + transform_matrix[3 * cols + 5] = T(1.0); + transform_matrix[3 * cols + 6] = T(-1.0); + transform_matrix[3 * cols + 7] = T(-1.0); + + // Sub matrix [1,2] + transform_matrix[2 * cols + 8] = T(-1.0); + transform_matrix[2 * cols + 9] = T(-1.0); + transform_matrix[2 * cols + 10] = T(-1.0); + + transform_matrix[3 * cols + 9] = T(-1.0); + transform_matrix[3 * cols + 10] = T(1.0); + transform_matrix[3 * cols + 11] = T(1.0); + + // Sub matrix [1,3] + transform_matrix[2 * cols + 12] = T(-1.0); + transform_matrix[2 * cols + 13] = T(-1.0); + transform_matrix[2 * cols + 14] = T(-1.0); + + transform_matrix[3 * cols + 13] = T(-1.0); + transform_matrix[3 * cols + 14] = T(1.0); + transform_matrix[3 * cols + 15] = T(1.0); +}; + +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_WINOGRAD_TRANSFORM_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/xent_op.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/xent_op.h new file mode 100644 index 0000000000000000000000000000000000000000..07870f504751a0e38d28fb04bade41ebd2fc552e --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/kernels/xent_op.h @@ -0,0 +1,115 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_KERNELS_XENT_OP_H_ +#define TENSORFLOW_CORE_KERNELS_XENT_OP_H_ +// Functor definition for XentOp, must be compilable by nvcc. + +#include "unsupported/Eigen/CXX11/Tensor" // from @eigen_archive + +#include "tensorflow/core/framework/tensor_types.h" + +namespace tensorflow { +namespace functor { + +// Functor used by XentOp to do the computations. +template +struct XentFunctor { + // Computes Cross Entropy loss and backprop. + // + // logits: batch_size, num_classes. + // labels: batch_size, num_classes. + // scratch: temporary tensor, dims: batch_size, 1 + // loss: output tensor for the loss, dims: batch_size. + // backprop: output tensor for the backprop, dims: batch_size, num_classes. + void operator()(const Device &d, + const Eigen::DSizes &shape, + const Eigen::array &logits_bcast, + const Eigen::array &labels_bcast, + typename TTypes::ConstMatrix logits, + typename TTypes::ConstMatrix labels, + typename TTypes::Matrix scratch, + typename TTypes::Vec loss, + typename TTypes::Matrix backprop); +}; + +// Eigen code implementing XentFunctor::operator(). +// This code works for both CPU and GPU and is used by the functor +// specializations for both device types. +template +struct XentEigenImpl { + static void Compute(const Device &d, + const Eigen::DSizes &shape, + const Eigen::array &logits_bcast, + const Eigen::array &labels_bcast, + typename TTypes::ConstMatrix logits, + typename TTypes::ConstMatrix labels, + typename TTypes::Matrix scratch, + typename TTypes::Vec loss, + typename TTypes::Matrix backprop) { + // NOTE(touts): This duplicates some of the computations in softmax_op + // because we need the intermediate (logits -max(logits)) values to + // avoid a log(exp()) in the computation of the loss. + + const int kBatchDim = 0; + const int kClassDim = 1; + + const int batch_size = shape[kBatchDim]; + const int num_classes = shape[kClassDim]; + +// These arrays are used to reduce along the class dimension, and broadcast +// the resulting value to all classes. + Eigen::IndexList > along_class; + Eigen::IndexList > batch_by_one; + batch_by_one.set(0, batch_size); + Eigen::IndexList batch_only; + batch_only.set(0, batch_size); + Eigen::IndexList, int> one_by_class; + one_by_class.set(1, num_classes); + + // max_logits along classes. + scratch.reshape(batch_only).device(d) = + logits.broadcast(logits_bcast).maximum(along_class); + + // logits - max_logits. + backprop.device(d) = + logits.broadcast(logits_bcast) - scratch.broadcast(one_by_class); + + // sum(exp(logits - max_logits)) along classes. + scratch.reshape(batch_only).device(d) = backprop.exp().sum(along_class); + + // NOTE(keveman): Eigen on GPU dispatches to an optimized implementation + // for an expression of the form lhs = rhs.sum(). + // lhs = -rhs.sum() doesn't match the above pattern, so folding in the + // negation before calling sum(). + // sum(-labels * + // ((logits - max_logits) - log(sum(exp(logits - max_logits))))) + // along classes + loss.device(d) = (labels.broadcast(labels_bcast) * + (scratch.log().eval().broadcast(one_by_class) - backprop)) + .eval() + .sum(along_class); + + // backprop: prob - labels, where + // prob = exp(logits - max_logits) / sum(exp(logits - max_logits)) + backprop.device(d) = (backprop.exp() / scratch.broadcast(one_by_class)) - + labels.broadcast(labels_bcast); + } +}; + +} // namespace functor +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_KERNELS_XENT_OP_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/bfloat16/bfloat16.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/bfloat16/bfloat16.h new file mode 100644 index 0000000000000000000000000000000000000000..d6ac77b6750fd985ac0136f3786bc49438be6587 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/bfloat16/bfloat16.h @@ -0,0 +1,21 @@ +/* Copyright 2017 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_LIB_BFLOAT16_BFLOAT16_H_ +#define TENSORFLOW_CORE_LIB_BFLOAT16_BFLOAT16_H_ + +#include "tensorflow/core/platform/bfloat16.h" + +#endif // TENSORFLOW_CORE_LIB_BFLOAT16_BFLOAT16_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/core/arena.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/core/arena.h new file mode 100644 index 0000000000000000000000000000000000000000..14d80422496bd260f08f7041d9e44879b46e123a --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/core/arena.h @@ -0,0 +1,111 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +// TODO(vrv): Switch this to an open-sourced version of Arena. + +#ifndef TENSORFLOW_CORE_LIB_CORE_ARENA_H_ +#define TENSORFLOW_CORE_LIB_CORE_ARENA_H_ + +#include + +#include + +#include "tensorflow/core/platform/logging.h" +#include "tensorflow/core/platform/macros.h" +#include "tensorflow/core/platform/types.h" + +namespace tensorflow { +namespace core { + +// This class is "thread-compatible": different threads can access the +// arena at the same time without locking, as long as they use only +// const methods. +class Arena { + public: + // Allocates a thread-compatible arena with the specified block size. + explicit Arena(const size_t block_size); + ~Arena(); + + char* Alloc(const size_t size) { + return reinterpret_cast(GetMemory(size, 1)); + } + + char* AllocAligned(const size_t size, const size_t alignment) { + return reinterpret_cast(GetMemory(size, alignment)); + } + + void Reset(); + +// This should be the worst-case alignment for any type. This is +// good for IA-32, SPARC version 7 (the last one I know), and +// supposedly Alpha. i386 would be more time-efficient with a +// default alignment of 8, but ::operator new() uses alignment of 4, +// and an assertion will fail below after the call to MakeNewBlock() +// if you try to use a larger alignment. +#ifdef __i386__ + static const int kDefaultAlignment = 4; +#else + static constexpr int kDefaultAlignment = 8; +#endif + + protected: + bool SatisfyAlignment(const size_t alignment); + void MakeNewBlock(const uint32 alignment); + void* GetMemoryFallback(const size_t size, const int align); + void* GetMemory(const size_t size, const int align) { + assert(remaining_ <= block_size_); // an invariant + if (size > 0 && size < remaining_ && align == 1) { // common case + void* result = freestart_; + freestart_ += size; + remaining_ -= size; + return result; + } + return GetMemoryFallback(size, align); + } + + size_t remaining_; + + private: + struct AllocatedBlock { + char* mem; + size_t size; + }; + + // Allocate new block of at least block_size, with the specified + // alignment. + // The returned AllocatedBlock* is valid until the next call to AllocNewBlock + // or Reset (i.e. anything that might affect overflow_blocks_). + AllocatedBlock* AllocNewBlock(const size_t block_size, + const uint32 alignment); + + const size_t block_size_; + char* freestart_; // beginning of the free space in most recent block + char* freestart_when_empty_; // beginning of the free space when we're empty + // STL vector isn't as efficient as it could be, so we use an array at first + size_t blocks_alloced_; // how many of the first_blocks_ have been alloced + AllocatedBlock first_blocks_[16]; // the length of this array is arbitrary + // if the first_blocks_ aren't enough, expand into overflow_blocks_. + std::vector* overflow_blocks_; + + void FreeBlocks(); // Frees all except first block + + Arena(const Arena&) = delete; + void operator=(const Arena&) = delete; +}; + +} // namespace core +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_LIB_CORE_ARENA_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/core/bitmap.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/core/bitmap.h new file mode 100644 index 0000000000000000000000000000000000000000..94468c5be5a250e22228b72c9d5ecbc4408e0d03 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/core/bitmap.h @@ -0,0 +1,29 @@ +/* Copyright 2016 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_LIB_CORE_BITMAP_H_ +#define TENSORFLOW_CORE_LIB_CORE_BITMAP_H_ + +#include "tsl/lib/core/bitmap.h" + +namespace tensorflow { +namespace core { + +using Bitmap = tsl::core::Bitmap; + +} // namespace core +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_LIB_CORE_BITMAP_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/core/bits.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/core/bits.h new file mode 100644 index 0000000000000000000000000000000000000000..19b06e2107646cbd73ae35a5190998bcdb19950f --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/core/bits.h @@ -0,0 +1,42 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_LIB_CORE_BITS_H_ +#define TENSORFLOW_CORE_LIB_CORE_BITS_H_ + +#include "tensorflow/core/platform/logging.h" +#include "tensorflow/core/platform/types.h" +#include "tsl/lib/core/bits.h" + +namespace tensorflow { + +// NOLINTBEGIN(misc-unused-using-decls) + +// Return floor(log2(n)) for positive integer n. Returns -1 iff n == 0. +using ::tsl::Log2Floor; +using ::tsl::Log2Floor64; + +// Return ceiling(log2(n)) for positive integer n. Returns -1 iff n == 0. +using ::tsl::Log2Ceiling; +using ::tsl::Log2Ceiling64; + +using ::tsl::NextPowerOfTwo; +using ::tsl::NextPowerOfTwo64; + +// NOLINTEND(misc-unused-using-decls) + +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_LIB_CORE_BITS_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/core/coding.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/core/coding.h new file mode 100644 index 0000000000000000000000000000000000000000..47b645eb7cb0d378c89badc1f8b8f5692ccc1cad --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/core/coding.h @@ -0,0 +1,26 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +// Endian-neutral encoding: +// * Fixed-length numbers are encoded with least-significant byte first +// * In addition we support variable length "varint" encoding +// * Strings are encoded prefixed by their length in varint format + +#ifndef TENSORFLOW_CORE_LIB_CORE_CODING_H_ +#define TENSORFLOW_CORE_LIB_CORE_CODING_H_ + +#include "tensorflow/core/platform/coding.h" // IWYU pragma: export + +#endif // TENSORFLOW_CORE_LIB_CORE_CODING_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/core/error_codes.pb.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/core/error_codes.pb.h new file mode 100644 index 0000000000000000000000000000000000000000..9fbcd25b93288c351e3cc8485ec9b22b1c303936 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/core/error_codes.pb.h @@ -0,0 +1,71 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/lib/core/error_codes.proto + +#ifndef GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2flib_2fcore_2ferror_5fcodes_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2flib_2fcore_2ferror_5fcodes_2eproto + +#include +#include + +#include +#if PROTOBUF_VERSION < 3021000 +#error This file was generated by a newer version of protoc which is +#error incompatible with your Protocol Buffer headers. Please update +#error your headers. +#endif +#if 3021009 < PROTOBUF_MIN_PROTOC_VERSION +#error This file was generated by an older version of protoc which is +#error incompatible with your Protocol Buffer headers. Please +#error regenerate this file with a newer version of protoc. +#endif + +#include +#include +#include +#include +#include +#include +#include +#include // IWYU pragma: export +#include // IWYU pragma: export +#include "tsl/protobuf/error_codes.pb.h" +// @@protoc_insertion_point(includes) +#include +#define PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2flib_2fcore_2ferror_5fcodes_2eproto +PROTOBUF_NAMESPACE_OPEN +namespace internal { +class AnyMetadata; +} // namespace internal +PROTOBUF_NAMESPACE_CLOSE + +// Internal implementation detail -- do not use these members. +struct TableStruct_tensorflow_2fcore_2flib_2fcore_2ferror_5fcodes_2eproto { + static const uint32_t offsets[]; +}; +extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_tensorflow_2fcore_2flib_2fcore_2ferror_5fcodes_2eproto; +PROTOBUF_NAMESPACE_OPEN +PROTOBUF_NAMESPACE_CLOSE + +// =================================================================== + + +// =================================================================== + + +// =================================================================== + +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ + +// @@protoc_insertion_point(namespace_scope) + + +// @@protoc_insertion_point(global_scope) + +#include +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2flib_2fcore_2ferror_5fcodes_2eproto diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/core/error_codes.proto b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/core/error_codes.proto new file mode 100644 index 0000000000000000000000000000000000000000..4038d5935d7bfd467dafb68a430a1a795f059a42 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/core/error_codes.proto @@ -0,0 +1,3 @@ +syntax = "proto3"; + +import public "tsl/protobuf/error_codes.proto"; diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/core/errors.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/core/errors.h new file mode 100644 index 0000000000000000000000000000000000000000..94154429c480be1943a68588346bdaedaca6924e --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/core/errors.h @@ -0,0 +1,21 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_LIB_CORE_ERRORS_H_ +#define TENSORFLOW_CORE_LIB_CORE_ERRORS_H_ + +#include "tensorflow/core/platform/errors.h" // IWYU pragma: export + +#endif // TENSORFLOW_CORE_LIB_CORE_ERRORS_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/core/notification.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/core/notification.h new file mode 100644 index 0000000000000000000000000000000000000000..c22f695f8a49a594dcfbfbd58a69e73f2bb3ada4 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/core/notification.h @@ -0,0 +1,23 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_LIB_CORE_NOTIFICATION_H_ +#define TENSORFLOW_CORE_LIB_CORE_NOTIFICATION_H_ + +// Notification implementation is platform-dependent, to support +// alternative synchronization primitives. +#include "tensorflow/core/platform/notification.h" // IWYU pragma: export + +#endif // TENSORFLOW_CORE_LIB_CORE_NOTIFICATION_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/core/raw_coding.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/core/raw_coding.h new file mode 100644 index 0000000000000000000000000000000000000000..b4adbb7faf60c44fce8a561d69b48080ffcd89c7 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/core/raw_coding.h @@ -0,0 +1,21 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_LIB_CORE_RAW_CODING_H_ +#define TENSORFLOW_CORE_LIB_CORE_RAW_CODING_H_ + +#include "tensorflow/core/platform/raw_coding.h" // IWYU pragma: export + +#endif // TENSORFLOW_CORE_LIB_CORE_RAW_CODING_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/core/refcount.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/core/refcount.h new file mode 100644 index 0000000000000000000000000000000000000000..3bc634afce1dd173b5417f65bd65b7b7f6e6d460 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/core/refcount.h @@ -0,0 +1,21 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_LIB_CORE_REFCOUNT_H_ +#define TENSORFLOW_CORE_LIB_CORE_REFCOUNT_H_ + +#include "tensorflow/core/platform/refcount.h" // IWYU pragma: export + +#endif // TENSORFLOW_CORE_LIB_CORE_REFCOUNT_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/core/status.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/core/status.h new file mode 100644 index 0000000000000000000000000000000000000000..2146cbd5c2fb39bfd23b3f61aef82544b6b79d87 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/core/status.h @@ -0,0 +1,21 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_LIB_CORE_STATUS_H_ +#define TENSORFLOW_CORE_LIB_CORE_STATUS_H_ + +#include "tensorflow/core/platform/status.h" // IWYU pragma: export + +#endif // TENSORFLOW_CORE_LIB_CORE_STATUS_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/core/status_test_util.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/core/status_test_util.h new file mode 100644 index 0000000000000000000000000000000000000000..ef333ef2d1d7c9e2dbb770590a3c76eb851096d5 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/core/status_test_util.h @@ -0,0 +1,22 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_LIB_CORE_STATUS_TEST_UTIL_H_ +#define TENSORFLOW_CORE_LIB_CORE_STATUS_TEST_UTIL_H_ + +#include "tensorflow/core/platform/test.h" +#include "tsl/lib/core/status_test_util.h" + +#endif // TENSORFLOW_CORE_LIB_CORE_STATUS_TEST_UTIL_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/core/stringpiece.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/core/stringpiece.h new file mode 100644 index 0000000000000000000000000000000000000000..d00ce8c1e2fcc2bb3f4defccfbbb2f6baae3e886 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/core/stringpiece.h @@ -0,0 +1,31 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +// StringPiece is a simple structure containing a pointer into some external +// storage and a size. The user of a StringPiece must ensure that the slice +// is not used after the corresponding external storage has been +// deallocated. +// +// Multiple threads can invoke const methods on a StringPiece without +// external synchronization, but if any of the threads may call a +// non-const method, all threads accessing the same StringPiece must use +// external synchronization. + +#ifndef TENSORFLOW_CORE_LIB_CORE_STRINGPIECE_H_ +#define TENSORFLOW_CORE_LIB_CORE_STRINGPIECE_H_ + +#include "tensorflow/core/platform/stringpiece.h" // IWYU pragma: export + +#endif // TENSORFLOW_CORE_LIB_CORE_STRINGPIECE_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/core/threadpool.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/core/threadpool.h new file mode 100644 index 0000000000000000000000000000000000000000..4aa4b69b56bd8afd0b27df3871bc5948ff5c944e --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/core/threadpool.h @@ -0,0 +1,21 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_LIB_CORE_THREADPOOL_H_ +#define TENSORFLOW_CORE_LIB_CORE_THREADPOOL_H_ + +#include "tensorflow/core/platform/threadpool.h" // IWYU pragma: export + +#endif // TENSORFLOW_CORE_LIB_CORE_THREADPOOL_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/core/threadpool_interface.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/core/threadpool_interface.h new file mode 100644 index 0000000000000000000000000000000000000000..1a51e38ecc11c840abf93ea6896ab14f3c521dc3 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/core/threadpool_interface.h @@ -0,0 +1,21 @@ +/* Copyright 2019 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_LIB_CORE_THREADPOOL_INTERFACE_H_ +#define TENSORFLOW_CORE_LIB_CORE_THREADPOOL_INTERFACE_H_ + +#include "tensorflow/core/platform/threadpool_interface.h" // IWYU pragma: export + +#endif // TENSORFLOW_CORE_LIB_CORE_THREADPOOL_INTERFACE_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/core/threadpool_options.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/core/threadpool_options.h new file mode 100644 index 0000000000000000000000000000000000000000..64f7e647c888e61ace92071174915c68ad73f383 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/core/threadpool_options.h @@ -0,0 +1,21 @@ +/* Copyright 2019 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_LIB_CORE_THREADPOOL_OPTIONS_H_ +#define TENSORFLOW_CORE_LIB_CORE_THREADPOOL_OPTIONS_H_ + +#include "tensorflow/core/platform/threadpool_options.h" // IWYU pragma: export + +#endif // TENSORFLOW_CORE_LIB_CORE_THREADPOOL_OPTIONS_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/db/sqlite.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/db/sqlite.h new file mode 100644 index 0000000000000000000000000000000000000000..5c286403aa687e318af114db05edd87ed667860b --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/db/sqlite.h @@ -0,0 +1,453 @@ +/* Copyright 2017 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ +#ifndef TENSORFLOW_CORE_LIB_DB_SQLITE_H_ +#define TENSORFLOW_CORE_LIB_DB_SQLITE_H_ + +#include + +#include "sqlite3.h" +#include "tensorflow/core/lib/core/refcount.h" +#include "tensorflow/core/lib/core/status.h" +#include "tensorflow/core/lib/core/stringpiece.h" +#include "tensorflow/core/platform/macros.h" +#include "tensorflow/core/platform/thread_annotations.h" +#include "tensorflow/core/platform/types.h" + +/// TensorFlow SQLite Veneer +/// +/// - Memory safety +/// - Less boilerplate +/// - Removes deprecated stuff +/// - Pretends UTF16 doesn't exist +/// - Transaction compile-time safety +/// - Statically loads our native extensions +/// - Error reporting via tensorflow::Status et al. +/// +/// SQLite>=3.8.2 needs to be supported until April 2019, which is when +/// Ubuntu 14.04 LTS becomes EOL. + +namespace tensorflow { + +class SqliteLock; +class SqliteStatement; +class SqliteTransaction; + +/// \brief SQLite connection object. +/// +/// The SQLite connection is closed automatically by the destructor. +/// Reference counting ensures that happens after its statements are +/// destructed. +/// +/// Instances are reference counted and can be shared between threads. +/// This class offers the same thread safety behaviors as the SQLite +/// API itself. +/// +/// This veneer uses auto-commit mode by default, which means a 4ms +/// fsync() happens after every write unless a SqliteTransaction is +/// used or WAL mode is enabled beforehand. +class TF_LOCKABLE Sqlite : public core::RefCounted { + public: + /// \brief Closes SQLite connection, which can take milliseconds. + ~Sqlite() override; + + /// \brief Opens SQLite database file. + /// + /// Most users will want to set flags to SQLITE_OPEN_READWRITE | + /// SQLITE_OPEN_CREATE. There are many other open flags; here are + /// notes on a few of them: + /// + /// - SQLITE_OPEN_READONLY: Allowed if no WAL journal is active. + /// - SQLITE_OPEN_SHAREDCACHE: Will be ignored because this veneer + /// doesn't support the unlock notify API. + /// - SQLITE_OPEN_NOMUTEX: Means access to this connection MUST be + /// serialized by the caller in accordance with the same contracts + /// implemented by this API. + /// + /// This function sets PRAGMA values from TF_SQLITE_* environment + /// variables. See sqlite.cc to learn more. + static Status Open(const string& path, int flags, Sqlite** db); + + /// \brief Creates SQLite statement. + /// + /// This routine should never fail if sql is valid and does not + /// reference tables. When tables are referenced, system calls are + /// needed which can take microseconds. When the schema changes, this + /// routine will retry automatically and then possibly fail. + /// + /// The returned statement holds a reference to this object. + Status Prepare(const StringPiece& sql, SqliteStatement* stmt); + SqliteStatement PrepareOrDie(const StringPiece& sql); + + /// \brief Returns extended result code of last error. + /// + /// If the most recent API call was successful, the result is + /// undefined. The legacy result code can be obtained by saying + /// errcode() & 0xff. + int errcode() const TF_EXCLUSIVE_LOCKS_REQUIRED(this) { + return sqlite3_extended_errcode(db_); + } + + /// \brief Returns pointer to current error message state. + const char* errmsg() const TF_EXCLUSIVE_LOCKS_REQUIRED(this) { + return sqlite3_errmsg(db_); + } + + /// \brief Returns rowid assigned to last successful insert. + int64_t last_insert_rowid() const TF_EXCLUSIVE_LOCKS_REQUIRED(this) { + return sqlite3_last_insert_rowid(db_); + } + + /// \brief Returns number of rows directly changed by last write. + int64_t changes() const TF_EXCLUSIVE_LOCKS_REQUIRED(this) { + return sqlite3_changes(db_); + } + + private: + friend class SqliteLock; + friend class SqliteStatement; + friend class SqliteTransaction; + + Sqlite(sqlite3* db, sqlite3_stmt* begin, sqlite3_stmt* commit, + sqlite3_stmt* rollback) noexcept + : db_(db), begin_(begin), commit_(commit), rollback_(rollback) {} + + sqlite3* const db_; + sqlite3_stmt* const begin_; + sqlite3_stmt* const commit_; + sqlite3_stmt* const rollback_; + bool is_in_transaction_ = false; + + Sqlite(const Sqlite&) = delete; + void operator=(const Sqlite&) = delete; +}; + +/// \brief SQLite prepared statement. +/// +/// Instances can only be shared between threads if caller serializes +/// access from first Bind*() to *Reset(). +/// +/// When reusing a statement in a loop, be certain to not have jumps +/// betwixt Bind*() and *Reset(). +class SqliteStatement { + public: + /// \brief Initializes an empty statement to be assigned later. + SqliteStatement() noexcept = default; + + /// \brief Finalizes statement. + /// + /// This can take milliseconds if it was blocking the Sqlite + /// connection object from being freed. + ~SqliteStatement() { + sqlite3_finalize(stmt_); + if (db_ != nullptr) db_->Unref(); + } + + /// \brief Returns true if statement is initialized. + explicit operator bool() const { return stmt_ != nullptr; } + + /// \brief Returns SQL text from when this query was prepared. + const char* sql() const { return sqlite3_sql(stmt_); } + + /// \brief Number of bytes bound since last *Reset(). + uint64 size() { return size_; } + + /// \brief Executes query for fetching arbitrary rows. + /// + /// `is_done` will always be set to true unless SQLITE_ROW is + /// returned by the underlying API. If status() is already in an + /// error state, then this method is a no-op and the existing status + /// is returned. + /// + /// The OrDie version returns `!is_done` which, if true, indicates a + /// row is available. + /// + /// This statement should be Reset() or destructed when finished with + /// the result. + Status Step(bool* is_done); + bool StepOrDie() TF_MUST_USE_RESULT; + + /// \brief Executes query when only one row is desired. + /// + /// If a row isn't returned, an internal error Status is returned + /// that won't be reflected in the connection error state. + /// + /// This statement should be Reset() or destructed when finished with + /// the result. + Status StepOnce(); + const SqliteStatement& StepOnceOrDie(); + + /// \brief Executes query, ensures zero rows returned, then Reset(). + /// + /// If a row is returned, an internal error Status is returned that + /// won't be reflected in the connection error state. + Status StepAndReset(); + void StepAndResetOrDie(); + + /// \brief Resets statement so it can be executed again. + /// + /// Implementation note: This method diverges from canonical API + /// behavior by calling sqlite3_clear_bindings() in addition to + /// sqlite3_reset(). That makes the veneer safer; we haven't found a + /// super compelling reason yet to call them independently. + void Reset(); + + /// \brief Binds signed 64-bit integer to 1-indexed query parameter. + void BindInt(int parameter, int64_t value) { + Update(sqlite3_bind_int64(stmt_, parameter, value), parameter); + size_ += sizeof(int64_t); + } + void BindInt(const char* parameter, int64_t value) { + BindInt(GetParameterIndex(parameter), value); + } + + /// \brief Binds double to 1-indexed query parameter. + void BindDouble(int parameter, double value) { + Update(sqlite3_bind_double(stmt_, parameter, value), parameter); + size_ += sizeof(double); + } + void BindDouble(const char* parameter, double value) { + BindDouble(GetParameterIndex(parameter), value); + } + + /// \brief Copies UTF-8 text to 1-indexed query parameter. + /// + /// If NUL characters are present, they will still go in the DB and + /// be successfully retrieved by ColumnString(); however, the + /// behavior of these values with SQLite functions is undefined. + /// + /// When using the unsafe methods, the data must not be changed or + /// freed until this statement is Reset() or finalized. + void BindText(int parameter, const StringPiece& text) { + Update(sqlite3_bind_text64(stmt_, parameter, text.data(), text.size(), + SQLITE_TRANSIENT, SQLITE_UTF8), + parameter); + size_ += text.size(); + } + void BindText(const char* parameter, const StringPiece& text) { + BindText(GetParameterIndex(parameter), text); + } + void BindTextUnsafe(int parameter, const StringPiece& text) { + Update(sqlite3_bind_text64(stmt_, parameter, text.data(), text.size(), + SQLITE_STATIC, SQLITE_UTF8), + parameter); + size_ += text.size(); + } + void BindTextUnsafe(const char* parameter, const StringPiece& text) { + BindTextUnsafe(GetParameterIndex(parameter), text); + } + + /// \brief Copies binary data to 1-indexed query parameter. + /// + /// When using the unsafe methods, the data must not be changed or + /// freed until this statement is Reset() or finalized. + void BindBlob(int parameter, const StringPiece& blob) { + Update(sqlite3_bind_blob64(stmt_, parameter, blob.data(), blob.size(), + SQLITE_TRANSIENT), + parameter); + size_ += blob.size(); + } + void BindBlob(const char* parameter, const StringPiece& blob) { + BindBlob(GetParameterIndex(parameter), blob); + } + void BindBlobUnsafe(int parameter, const StringPiece& blob) { + Update(sqlite3_bind_blob64(stmt_, parameter, blob.data(), blob.size(), + SQLITE_STATIC), + parameter); + size_ += blob.size(); + } + void BindBlobUnsafe(const char* parameter, const StringPiece& text) { + BindBlobUnsafe(GetParameterIndex(parameter), text); + } + + /// \brief Returns number of columns in result set. + int ColumnCount() const TF_MUST_USE_RESULT { + return sqlite3_column_count(stmt_); + } + + /// \brief Returns type of 0-indexed column value in row data. + /// + /// Please note that SQLite is dynamically typed and the type of a + /// particular column can vary from row to row. + int ColumnType(int column) const TF_MUST_USE_RESULT { + return sqlite3_column_type(stmt_, column); + } + + /// \brief Returns 0-indexed column from row result coerced as an integer. + int64_t ColumnInt(int column) const TF_MUST_USE_RESULT { + return sqlite3_column_int64(stmt_, column); + } + + /// \brief Returns 0-indexed column from row result coerced as a double. + double ColumnDouble(int column) const TF_MUST_USE_RESULT { + return sqlite3_column_double(stmt_, column); + } + + /// \brief Copies 0-indexed column from row result coerced as a string. + /// + /// NULL values are returned as empty string. This method should be + /// used for both BLOB and TEXT columns. See also: ColumnType(). + string ColumnString(int column) const TF_MUST_USE_RESULT { + auto data = sqlite3_column_blob(stmt_, column); + if (data == nullptr) return ""; + return {static_cast(data), + static_cast(ColumnSize(column))}; + } + + /// \brief Returns pointer to binary data at 0-indexed column. + /// + /// Empty values are returned as NULL. The returned memory will no + /// longer be valid the next time Step() or Reset() is called. No NUL + /// terminator is added. + StringPiece ColumnStringUnsafe(int column) const TF_MUST_USE_RESULT { + return {static_cast(sqlite3_column_blob(stmt_, column)), + static_cast(ColumnSize(column))}; + } + + /// \brief Returns number of bytes stored at 0-indexed column. + int ColumnSize(int column) const TF_MUST_USE_RESULT { + return sqlite3_column_bytes(stmt_, column); + } + + /// \brief Move constructor, after which is reset to empty. + SqliteStatement(SqliteStatement&& other) noexcept + : db_(other.db_), stmt_(other.stmt_), bind_error_(other.bind_error_) { + other.db_ = nullptr; + other.stmt_ = nullptr; + other.bind_error_ = SQLITE_OK; + } + + /// \brief Move assignment, after which is reset to empty. + SqliteStatement& operator=(SqliteStatement&& other) noexcept { + if (&other != this) { + if (db_ != nullptr) db_->Unref(); + if (stmt_ != nullptr) sqlite3_finalize(stmt_); + db_ = other.db_; + stmt_ = other.stmt_; + bind_error_ = other.bind_error_; + size_ = other.size_; + other.db_ = nullptr; + other.stmt_ = nullptr; + other.bind_error_ = SQLITE_OK; + other.size_ = 0; + } + return *this; + } + + private: + friend class Sqlite; + + SqliteStatement(Sqlite* db, sqlite3_stmt* stmt) noexcept + : db_(db), stmt_(stmt) { + db_->Ref(); + } + + void Update(int rc, int parameter) { + // Binding strings can fail if they exceed length limit. + if (TF_PREDICT_FALSE(rc != SQLITE_OK)) { + if (bind_error_ == SQLITE_OK) { + bind_error_ = rc; + bind_error_parameter_ = parameter; + } + } + } + + int GetParameterIndex(const char* parameter) { + int index = sqlite3_bind_parameter_index(stmt_, parameter); + DCHECK(index > 0); // OK to compile away since it'll fail again + return index; + } + + Sqlite* db_ = nullptr; + sqlite3_stmt* stmt_ = nullptr; + int bind_error_ = SQLITE_OK; + int bind_error_parameter_ = 0; + uint64 size_ = 0; + + SqliteStatement(const SqliteStatement&) = delete; + void operator=(const SqliteStatement&) = delete; +}; + +/// \brief Reentrant SQLite connection object lock +/// +/// This is a no-op if SQLITE_OPEN_NOMUTEX was used. +class TF_SCOPED_LOCKABLE SqliteLock { + public: + explicit SqliteLock(Sqlite& db) TF_EXCLUSIVE_LOCK_FUNCTION(db) + : mutex_(sqlite3_db_mutex(db.db_)) { + sqlite3_mutex_enter(mutex_); + } + SqliteLock(Sqlite& db, std::try_to_lock_t) TF_EXCLUSIVE_LOCK_FUNCTION(db) + : mutex_(sqlite3_db_mutex(db.db_)) { + if (TF_PREDICT_FALSE(sqlite3_mutex_try(mutex_) != SQLITE_OK)) { + is_locked_ = false; + } + } + ~SqliteLock() TF_UNLOCK_FUNCTION() { + if (is_locked_) sqlite3_mutex_leave(mutex_); + } + explicit operator bool() const { return is_locked_; } + + private: + sqlite3_mutex* const mutex_; + bool is_locked_ = true; + SqliteLock(const SqliteLock&) = delete; + void operator=(const SqliteLock&) = delete; +}; +#define SqliteLock(x) static_assert(0, "sqlite_lock_decl_missing_name"); + +/// \brief SQLite transaction scope. +/// +/// This class acquires an exclusive lock on the connection object (if +/// mutexes weren't disabled) and runs BEGIN / ROLLBACK automatically. +/// Unlike SqliteLock this scope is non-reentrant. To avoid program +/// crashes, business logic should use the TF_EXCLUSIVE_LOCK_FUNCTION and +/// TF_LOCKS_EXCLUDED annotations as much as possible. +class TF_SCOPED_LOCKABLE SqliteTransaction { + public: + /// \brief Locks db and begins deferred transaction. + /// + /// This will crash if a transaction is already active. + explicit SqliteTransaction(Sqlite& db) TF_EXCLUSIVE_LOCK_FUNCTION(db); + + /// \brief Runs ROLLBACK and unlocks. + ~SqliteTransaction() TF_UNLOCK_FUNCTION(); + + /// \brief Commits transaction. + /// + /// If this is successful, a new transaction will be started, which + /// is rolled back when exiting the scope. + Status Commit(); + + private: + void Begin(); + Sqlite* const db_; + + SqliteTransaction(const SqliteTransaction&) = delete; + void operator=(const SqliteTransaction&) = delete; +}; + +#define SQLITE_EXCLUSIVE_TRANSACTIONS_REQUIRED(...) \ + TF_EXCLUSIVE_LOCKS_REQUIRED(__VA_ARGS__) +#define SQLITE_TRANSACTIONS_EXCLUDED(...) TF_LOCKS_EXCLUDED(__VA_ARGS__) + +inline SqliteStatement Sqlite::PrepareOrDie(const StringPiece& sql) { + SqliteStatement stmt; + TF_CHECK_OK(Prepare(sql, &stmt)); + return stmt; +} + +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_LIB_DB_SQLITE_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/gif/gif_io.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/gif/gif_io.h new file mode 100644 index 0000000000000000000000000000000000000000..ae7d5125bd7033c41ed62b39d564a2f47a5ec97d --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/gif/gif_io.h @@ -0,0 +1,52 @@ +/* Copyright 2016 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +// Functions to read and write images in GIF format. +// +// The advantage over image/codec/png{enc,dec}oder.h is that this library +// supports both 8 and 16 bit images. +// +// The decoding routine accepts binary image data as a StringPiece. These are +// implicitly constructed from strings or char* so they're completely +// transparent to the caller. They're also very cheap to construct so this +// doesn't introduce any additional overhead. +// +// The primary benefit of StringPieces being, in this case, that APIs already +// returning StringPieces (e.g., Bigtable Scanner) or Cords (e.g., IOBuffer; +// only when they're flat, though) or protocol buffer fields typed to either of +// these can be decoded without copying the data into a C++ string. + +#ifndef TENSORFLOW_CORE_LIB_GIF_GIF_IO_H_ +#define TENSORFLOW_CORE_LIB_GIF_GIF_IO_H_ + +#include +#include +#include +#include + +#include "tensorflow/core/lib/core/stringpiece.h" +#include "tensorflow/core/platform/types.h" + +namespace tensorflow { +namespace gif { + +uint8* Decode(const void* srcdata, int datasize, + const std::function& allocate_output, + string* error_string, bool expand_animations = true); + +} // namespace gif +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_LIB_GIF_GIF_IO_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/gtl/array_slice.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/gtl/array_slice.h new file mode 100644 index 0000000000000000000000000000000000000000..8f47faf89e4d019ca6e7d08abe14cc0f5afe085b --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/gtl/array_slice.h @@ -0,0 +1,36 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_LIB_GTL_ARRAY_SLICE_H_ +#define TENSORFLOW_CORE_LIB_GTL_ARRAY_SLICE_H_ + +#include "absl/types/span.h" +// TODO(timshen): This is kept only because lots of targets transitively depend +// on it. Remove all targets' dependencies. +#include "tensorflow/core/lib/gtl/inlined_vector.h" + +namespace tensorflow { +namespace gtl { + +template +using ArraySlice = absl::Span; + +template +using MutableArraySlice = absl::Span; + +} // namespace gtl +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_LIB_GTL_ARRAY_SLICE_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/gtl/cleanup.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/gtl/cleanup.h new file mode 100644 index 0000000000000000000000000000000000000000..3e54f82860d9da9b9813f512a40eac0082274e26 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/gtl/cleanup.h @@ -0,0 +1,113 @@ +/* Copyright 2016 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +// MakeCleanup(f) returns an RAII cleanup object that calls 'f' in its +// destructor. The easiest way to use MakeCleanup is with a lambda argument, +// capturing the return value in an 'auto' local variable. Most users will not +// need more sophisticated syntax than that. +// +// Example: +// void func() { +// FILE* fp = fopen("data.txt", "r"); +// if (fp == nullptr) return; +// auto fp_cleaner = gtl::MakeCleanup([fp] { fclose(fp); }); +// // No matter what, fclose(fp) will happen. +// DataObject d; +// while (ReadDataObject(fp, &d)) { +// if (d.IsBad()) { +// LOG(ERROR) << "Bad Data"; +// return; +// } +// PushGoodData(d); +// } +// } +// +// You can use Cleanup directly, instead of using MakeCleanup and auto, +// but there's rarely a reason to do that. +// +// You can call 'release()' on a Cleanup object to cancel the cleanup. + +#ifndef TENSORFLOW_CORE_LIB_GTL_CLEANUP_H_ +#define TENSORFLOW_CORE_LIB_GTL_CLEANUP_H_ + +#include +#include + +#include "tensorflow/core/platform/macros.h" + +namespace tensorflow { +namespace gtl { + +// A move-only RAII object that calls a stored cleanup functor when +// destroyed. Cleanup is the return type of gtl::MakeCleanup(F). +template +class Cleanup { + public: + Cleanup() : released_(true), f_() {} + + template + explicit Cleanup(G&& f) // NOLINT + : f_(std::forward(f)) {} // NOLINT(build/c++11) + + Cleanup(Cleanup&& src) // NOLINT + : released_(src.is_released()), f_(src.release()) {} + + // Implicitly move-constructible from any compatible Cleanup. + // The source will be released as if src.release() were called. + // A moved-from Cleanup can be safely destroyed or reassigned. + template + Cleanup(Cleanup&& src) // NOLINT + : released_(src.is_released()), f_(src.release()) {} + + // Assignment to a Cleanup object behaves like destroying it + // and making a new one in its place, analogous to unique_ptr + // semantics. + Cleanup& operator=(Cleanup&& src) { // NOLINT + if (!released_) f_(); + released_ = src.released_; + f_ = src.release(); + return *this; + } + + ~Cleanup() { + if (!released_) f_(); + } + + // Releases the cleanup function instead of running it. + // Hint: use c.release()() to run early. + F release() { + released_ = true; + return std::move(f_); + } + + bool is_released() const { return released_; } + + private: + static_assert(!std::is_reference::value, "F must not be a reference"); + + bool released_ = false; + F f_; +}; + +template ::type> +TF_MUST_USE_RESULT Cleanup MakeCleanup(F&& f) { + return Cleanup(std::forward(f)); +} + +} // namespace gtl +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_LIB_GTL_CLEANUP_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/gtl/compactptrset.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/gtl/compactptrset.h new file mode 100644 index 0000000000000000000000000000000000000000..326aca55d34f0e28f07989a8217f7582a0c0d1a7 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/gtl/compactptrset.h @@ -0,0 +1,29 @@ +/* Copyright 2017 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_LIB_GTL_COMPACTPTRSET_H_ +#define TENSORFLOW_CORE_LIB_GTL_COMPACTPTRSET_H_ + +#include "tsl/lib/gtl/compactptrset.h" + +namespace tensorflow { +namespace gtl { + +using ::tsl::gtl::CompactPointerSet; // NOLINT(misc-unused-using-decls) + +} // namespace gtl +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_LIB_GTL_COMPACTPTRSET_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/gtl/edit_distance.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/gtl/edit_distance.h new file mode 100644 index 0000000000000000000000000000000000000000..9481ba75f96bb3995203cec65aa449d9777d6be1 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/gtl/edit_distance.h @@ -0,0 +1,109 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_LIB_GTL_EDIT_DISTANCE_H_ +#define TENSORFLOW_CORE_LIB_GTL_EDIT_DISTANCE_H_ + +#include + +#include "tensorflow/core/lib/gtl/array_slice.h" +#include "tensorflow/core/lib/gtl/inlined_vector.h" + +namespace tensorflow { +namespace gtl { + +// Calculate the Levenshtein Edit Distance between two contiguous +// sequences, s and t, of type T. +// +// The Levenshtein distance is a symmetric distance defined as the +// smallest number of insertions, deletions, and substitutions +// required to convert sequence s to t (and vice versa). +// Note, this distance does not consider transpositions. +// +// For more details and a reference implementation, see: +// https://en.wikipedia.org/wiki/Levenshtein_distance +// +// This implementation has time complexity O(|s|*|t|) +// and space complexity O(min(|s|, |t|)), where +// |x| := x.size() +// +// A simple call to LevenshteinDistance looks like: +// +// int64 dist = LevenshteinDistance("hi", "bye", std::equal_to()); +// +template +inline int64_t LevenshteinDistance(const gtl::ArraySlice& s, + const gtl::ArraySlice& t, + const Cmp& cmp) { + const int64_t s_size = s.size(); + const int64_t t_size = t.size(); + + if (t_size > s_size) return LevenshteinDistance(t, s, cmp); + + const T* s_data = s.data(); + const T* t_data = t.data(); + + if (t_size == 0) return s_size; + if (s == t) return 0; + + // Create work vector + gtl::InlinedVector scratch_holder(t_size); + + int64_t* scratch = scratch_holder.data(); + + // Special case for i = 0: Distance between empty string and string + // of length j is just j. + for (size_t j = 1; j < t_size; ++j) scratch[j - 1] = j; + + for (size_t i = 1; i <= s_size; ++i) { + // Invariant: scratch[j - 1] equals cost(i - 1, j). + int substitution_base_cost = i - 1; + int insertion_cost = i + 1; + for (size_t j = 1; j <= t_size; ++j) { + // Invariants: + // scratch[k - 1] = cost(i, k) for 0 < k < j. + // scratch[k - 1] = cost(i - 1, k) for j <= k <= t_size. + // substitution_base_cost = cost(i - 1, j - 1) + // insertion_cost = cost(i, j - 1) + const int replacement_cost = cmp(s_data[i - 1], t_data[j - 1]) ? 0 : 1; + const int substitution_cost = substitution_base_cost + replacement_cost; + const int deletion_cost = scratch[j - 1] + 1; + + // Select the cheapest edit. + const int cheapest = // = cost(i, j) + std::min(deletion_cost, std::min(insertion_cost, substitution_cost)); + + // Restore invariant for the next iteration of the loop. + substitution_base_cost = scratch[j - 1]; // = cost(i - 1, j) + scratch[j - 1] = cheapest; // = cost(i, j) + insertion_cost = cheapest + 1; // = cost(i, j) + 1 + } + } + return scratch[t_size - 1]; +} + +template +inline int64_t LevenshteinDistance(const Container1& s, const Container2& t, + const Cmp& cmp) { + return LevenshteinDistance( + gtl::ArraySlice(s.data(), s.size()), + gtl::ArraySlice(t.data(), t.size()), + cmp); +} + +} // namespace gtl +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_LIB_GTL_EDIT_DISTANCE_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/gtl/flatmap.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/gtl/flatmap.h new file mode 100644 index 0000000000000000000000000000000000000000..15c02b381daa19f0b72a31371bc5f6561aab0b17 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/gtl/flatmap.h @@ -0,0 +1,33 @@ +/* Copyright 2016 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_LIB_GTL_FLATMAP_H_ +#define TENSORFLOW_CORE_LIB_GTL_FLATMAP_H_ + +#include "tensorflow/core/lib/gtl/flatrep.h" +#include "tensorflow/core/lib/hash/hash.h" +#include "tensorflow/core/platform/logging.h" +#include "tensorflow/core/platform/types.h" +#include "tsl/lib/gtl/flatmap.h" + +namespace tensorflow { +namespace gtl { + +using tsl::gtl::FlatMap; // NOLINT(misc-unused-using-decls) + +} // namespace gtl +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_LIB_GTL_FLATMAP_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/gtl/flatrep.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/gtl/flatrep.h new file mode 100644 index 0000000000000000000000000000000000000000..dfc8af5ef01dfa4dc2c50299609a5885fd608a93 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/gtl/flatrep.h @@ -0,0 +1,31 @@ +/* Copyright 2016 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_LIB_GTL_FLATREP_H_ +#define TENSORFLOW_CORE_LIB_GTL_FLATREP_H_ + +#include "tsl/lib/gtl/flatrep.h" + +namespace tensorflow { +namespace gtl { +namespace internal { + +using tsl::gtl::internal::FlatRep; // NOLINT(misc-unused-using-decls) + +} // namespace internal +} // namespace gtl +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_LIB_GTL_FLATREP_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/gtl/flatset.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/gtl/flatset.h new file mode 100644 index 0000000000000000000000000000000000000000..659bf98f74f9b15224360fc86ed8d3f07fd046dc --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/gtl/flatset.h @@ -0,0 +1,29 @@ +/* Copyright 2016 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_LIB_GTL_FLATSET_H_ +#define TENSORFLOW_CORE_LIB_GTL_FLATSET_H_ + +#include "tsl/lib/gtl/flatset.h" + +namespace tensorflow { +namespace gtl { + +using tsl::gtl::FlatSet; // NOLINT(misc-unused-using-decls) + +} // namespace gtl +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_LIB_GTL_FLATSET_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/gtl/inlined_vector.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/gtl/inlined_vector.h new file mode 100644 index 0000000000000000000000000000000000000000..b94af28b8393460fcf9605062817eb21cb63ba56 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/gtl/inlined_vector.h @@ -0,0 +1,33 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_LIB_GTL_INLINED_VECTOR_H_ +#define TENSORFLOW_CORE_LIB_GTL_INLINED_VECTOR_H_ + +#include "tsl/lib/gtl/inlined_vector.h" // IWYU pragma: export +// TODO(kramerb): This is kept only because lots of targets transitively depend +// on it. Remove all targets' dependencies. +#include "tensorflow/core/platform/macros.h" +#include "tensorflow/core/platform/types.h" + +namespace tensorflow { +namespace gtl { + +using ::tsl::gtl::InlinedVector; // NOLINT(misc-unused-using-decls) + +} // namespace gtl +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_LIB_GTL_INLINED_VECTOR_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/gtl/int_type.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/gtl/int_type.h new file mode 100644 index 0000000000000000000000000000000000000000..2259cb8bc3b84d82cca2c0b1704b63ba0e440e21 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/gtl/int_type.h @@ -0,0 +1,30 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + + +#ifndef TENSORFLOW_CORE_LIB_GTL_INT_TYPE_H_ +#define TENSORFLOW_CORE_LIB_GTL_INT_TYPE_H_ + +#include "tsl/lib/gtl/int_type.h" + +namespace tensorflow { +namespace gtl { + +using ::tsl::gtl::IntType; // NOLINT(misc-unused-using-decls) + +} // namespace gtl +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_LIB_GTL_INT_TYPE_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/gtl/iterator_range.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/gtl/iterator_range.h new file mode 100644 index 0000000000000000000000000000000000000000..4748761d8da0a8fabd55bee2a85ad957e9c09849 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/gtl/iterator_range.h @@ -0,0 +1,39 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +// This provides a very simple, boring adaptor for a begin and end iterator +// into a range type. This should be used to build range views that work well +// with range based for loops and range based constructors. +// +// Note that code here follows more standards-based coding conventions as it +// is mirroring proposed interfaces for standardization. +// +// Converted from chandlerc@'s code to Google style by joshl@. + +#ifndef TENSORFLOW_CORE_LIB_GTL_ITERATOR_RANGE_H_ +#define TENSORFLOW_CORE_LIB_GTL_ITERATOR_RANGE_H_ + +#include "tsl/lib/gtl/iterator_range.h" + +namespace tensorflow { +namespace gtl { +// NOLINTBEGIN(misc-unused-using-decls) +using ::tsl::gtl::iterator_range; +using ::tsl::gtl::make_range; +// NOLINTEND(misc-unused-using-decls) +} // namespace gtl +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_LIB_GTL_ITERATOR_RANGE_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/gtl/manual_constructor.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/gtl/manual_constructor.h new file mode 100644 index 0000000000000000000000000000000000000000..c5a4e8947cf7e0da6ad525c52ad8205c10aea15e --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/gtl/manual_constructor.h @@ -0,0 +1,246 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +// ManualConstructor statically-allocates space in which to store some +// object, but does not initialize it. You can then call the constructor +// and destructor for the object yourself as you see fit. This is useful +// for memory management optimizations, where you want to initialize and +// destroy an object multiple times but only allocate it once. +// +// (When I say ManualConstructor statically allocates space, I mean that +// the ManualConstructor object itself is forced to be the right size.) + +#ifndef TENSORFLOW_CORE_LIB_GTL_MANUAL_CONSTRUCTOR_H_ +#define TENSORFLOW_CORE_LIB_GTL_MANUAL_CONSTRUCTOR_H_ + +#include +#include +#include + +#include "tensorflow/core/platform/macros.h" +#include "tensorflow/core/platform/mem.h" + +namespace tensorflow { +namespace gtl { +namespace internal { + +// +// Provides a char array with the exact same alignment as another type. The +// first parameter must be a complete type, the second parameter is how many +// of that type to provide space for. +// +// TF_LIB_GTL_ALIGNED_CHAR_ARRAY(struct stat, 16) storage_; +// +// Because MSVC and older GCCs require that the argument to their alignment +// construct to be a literal constant integer, we use a template instantiated +// at all the possible powers of two. +#ifndef SWIG +template +struct AlignType {}; +template +struct AlignType<0, size> { + typedef char result[size]; +}; +#if defined(_MSC_VER) +#define TF_LIB_GTL_ALIGN_ATTRIBUTE(X) __declspec(align(X)) +#define TF_LIB_GTL_ALIGN_OF(T) __alignof(T) +#elif defined(COMPILER_GCC3) || __GNUC__ >= 3 || defined(__APPLE__) || \ + defined(COMPILER_ICC) || defined(OS_NACL) || defined(__clang__) +#define TF_LIB_GTL_ALIGN_ATTRIBUTE(X) __attribute__((aligned(X))) +#define TF_LIB_GTL_ALIGN_OF(T) __alignof__(T) +#endif + +#if defined(TF_LIB_GTL_ALIGN_ATTRIBUTE) + +#define TF_LIB_GTL_ALIGNTYPE_TEMPLATE(X) \ + template \ + struct AlignType { \ + typedef TF_LIB_GTL_ALIGN_ATTRIBUTE(X) char result[size]; \ + } + +TF_LIB_GTL_ALIGNTYPE_TEMPLATE(1); +TF_LIB_GTL_ALIGNTYPE_TEMPLATE(2); +TF_LIB_GTL_ALIGNTYPE_TEMPLATE(4); +TF_LIB_GTL_ALIGNTYPE_TEMPLATE(8); +TF_LIB_GTL_ALIGNTYPE_TEMPLATE(16); +TF_LIB_GTL_ALIGNTYPE_TEMPLATE(32); +TF_LIB_GTL_ALIGNTYPE_TEMPLATE(64); +TF_LIB_GTL_ALIGNTYPE_TEMPLATE(128); +TF_LIB_GTL_ALIGNTYPE_TEMPLATE(256); +TF_LIB_GTL_ALIGNTYPE_TEMPLATE(512); +TF_LIB_GTL_ALIGNTYPE_TEMPLATE(1024); +TF_LIB_GTL_ALIGNTYPE_TEMPLATE(2048); +TF_LIB_GTL_ALIGNTYPE_TEMPLATE(4096); +TF_LIB_GTL_ALIGNTYPE_TEMPLATE(8192); +// Any larger and MSVC++ will complain. + +#define TF_LIB_GTL_ALIGNED_CHAR_ARRAY(T, Size) \ + typename tensorflow::gtl::internal::AlignType::result + +#undef TF_LIB_GTL_ALIGNTYPE_TEMPLATE +#undef TF_LIB_GTL_ALIGN_ATTRIBUTE + +#else // defined(TF_LIB_GTL_ALIGN_ATTRIBUTE) +#error "You must define TF_LIB_GTL_ALIGNED_CHAR_ARRAY for your compiler." +#endif // defined(TF_LIB_GTL_ALIGN_ATTRIBUTE) + +#else // !SWIG + +// SWIG can't represent alignment and doesn't care about alignment on data +// members (it works fine without it). +template +struct AlignType { + typedef char result[Size]; +}; +#define TF_LIB_GTL_ALIGNED_CHAR_ARRAY(T, Size) \ + tensorflow::gtl::internal::AlignType::result + +// Enough to parse with SWIG, will never be used by running code. +#define TF_LIB_GTL_ALIGN_OF(Type) 16 + +#endif // !SWIG + +} // namespace internal +} // namespace gtl + +template +class ManualConstructor { + public: + // No constructor or destructor because one of the most useful uses of + // this class is as part of a union, and members of a union cannot have + // constructors or destructors. And, anyway, the whole point of this + // class is to bypass these. + + // Support users creating arrays of ManualConstructor<>s. This ensures that + // the array itself has the correct alignment. + static void* operator new[](size_t size) { + return port::AlignedMalloc(size, TF_LIB_GTL_ALIGN_OF(Type)); + } + static void operator delete[](void* mem) { port::AlignedFree(mem); } + + inline Type* get() { return reinterpret_cast(space_); } + inline const Type* get() const { + return reinterpret_cast(space_); + } + + inline Type* operator->() { return get(); } + inline const Type* operator->() const { return get(); } + + inline Type& operator*() { return *get(); } + inline const Type& operator*() const { return *get(); } + + inline void Init() { new (space_) Type; } + +// Init() constructs the Type instance using the given arguments +// (which are forwarded to Type's constructor). In C++11, Init() can +// take any number of arguments of any type, and forwards them perfectly. +// On pre-C++11 platforms, it can take up to 11 arguments, and may not be +// able to forward certain kinds of arguments. +// +// Note that Init() with no arguments performs default-initialization, +// not zero-initialization (i.e it behaves the same as "new Type;", not +// "new Type();"), so it will leave non-class types uninitialized. +#ifdef LANG_CXX11 + template + inline void Init(Ts&&... args) { // NOLINT + new (space_) Type(std::forward(args)...); // NOLINT + } +#else // !defined(LANG_CXX11) + template + inline void Init(const T1& p1) { + new (space_) Type(p1); + } + + template + inline void Init(const T1& p1, const T2& p2) { + new (space_) Type(p1, p2); + } + + template + inline void Init(const T1& p1, const T2& p2, const T3& p3) { + new (space_) Type(p1, p2, p3); + } + + template + inline void Init(const T1& p1, const T2& p2, const T3& p3, const T4& p4) { + new (space_) Type(p1, p2, p3, p4); + } + + template + inline void Init(const T1& p1, const T2& p2, const T3& p3, const T4& p4, + const T5& p5) { + new (space_) Type(p1, p2, p3, p4, p5); + } + + template + inline void Init(const T1& p1, const T2& p2, const T3& p3, const T4& p4, + const T5& p5, const T6& p6) { + new (space_) Type(p1, p2, p3, p4, p5, p6); + } + + template + inline void Init(const T1& p1, const T2& p2, const T3& p3, const T4& p4, + const T5& p5, const T6& p6, const T7& p7) { + new (space_) Type(p1, p2, p3, p4, p5, p6, p7); + } + + template + inline void Init(const T1& p1, const T2& p2, const T3& p3, const T4& p4, + const T5& p5, const T6& p6, const T7& p7, const T8& p8) { + new (space_) Type(p1, p2, p3, p4, p5, p6, p7, p8); + } + + template + inline void Init(const T1& p1, const T2& p2, const T3& p3, const T4& p4, + const T5& p5, const T6& p6, const T7& p7, const T8& p8, + const T9& p9) { + new (space_) Type(p1, p2, p3, p4, p5, p6, p7, p8, p9); + } + + template + inline void Init(const T1& p1, const T2& p2, const T3& p3, const T4& p4, + const T5& p5, const T6& p6, const T7& p7, const T8& p8, + const T9& p9, const T10& p10) { + new (space_) Type(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10); + } + + template + inline void Init(const T1& p1, const T2& p2, const T3& p3, const T4& p4, + const T5& p5, const T6& p6, const T7& p7, const T8& p8, + const T9& p9, const T10& p10, const T11& p11) { + new (space_) Type(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11); + } +#endif // LANG_CXX11 + + inline void Destroy() { get()->~Type(); } + + private: + TF_LIB_GTL_ALIGNED_CHAR_ARRAY(Type, 1) space_; +}; + +#undef TF_LIB_GTL_ALIGNED_CHAR_ARRAY +#undef TF_LIB_GTL_ALIGN_OF + +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_LIB_GTL_MANUAL_CONSTRUCTOR_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/gtl/map_util.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/gtl/map_util.h new file mode 100644 index 0000000000000000000000000000000000000000..3b2d767548809db29b5009815f1eae6065412042 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/gtl/map_util.h @@ -0,0 +1,40 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +// This file provides utility functions for use with STL map-like data +// structures, such as std::map and hash_map. Some functions will also work with +// sets, such as ContainsKey(). + +#ifndef TENSORFLOW_CORE_LIB_GTL_MAP_UTIL_H_ +#define TENSORFLOW_CORE_LIB_GTL_MAP_UTIL_H_ + +#include "tsl/lib/gtl/map_util.h" + +namespace tensorflow { +namespace gtl { +// NOLINTBEGIN(misc-unused-using-decls) +using ::tsl::gtl::EraseKeyReturnValuePtr; +using ::tsl::gtl::FindOrNull; +using ::tsl::gtl::FindPtrOrNull; +using ::tsl::gtl::FindWithDefault; +using ::tsl::gtl::InsertIfNotPresent; +using ::tsl::gtl::InsertOrUpdate; +using ::tsl::gtl::LookupOrInsert; +using ::tsl::gtl::ReverseMap; +// NOLINTEND(misc-unused-using-decls) +} // namespace gtl +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_LIB_GTL_MAP_UTIL_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/gtl/priority_queue_util.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/gtl/priority_queue_util.h new file mode 100644 index 0000000000000000000000000000000000000000..93bf3d30371ed861c89c68a67548f68963d75a41 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/gtl/priority_queue_util.h @@ -0,0 +1,55 @@ +/* Copyright 2016 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_LIB_GTL_PRIORITY_QUEUE_UTIL_H_ +#define TENSORFLOW_CORE_LIB_GTL_PRIORITY_QUEUE_UTIL_H_ + +#include +#include +#include + +namespace tensorflow { +namespace gtl { + +// Removes the top element from a std::priority_queue and returns it. +// Supports movable types. +template +T ConsumeTop(std::priority_queue* q) { + // std::priority_queue is required to implement pop() as if it + // called: + // std::pop_heap() + // c.pop_back() + // unfortunately, it does not provide access to the removed element. + // If the element is move only (such as a unique_ptr), there is no way to + // reclaim it in the standard API. std::priority_queue does, however, expose + // the underlying container as a protected member, so we use that access + // to extract the desired element between those two calls. + using Q = std::priority_queue; + struct Expose : Q { + using Q::c; + using Q::comp; + }; + auto& c = q->*&Expose::c; + auto& comp = q->*&Expose::comp; + std::pop_heap(c.begin(), c.end(), comp); + auto r = std::move(c.back()); + c.pop_back(); + return r; +} + +} // namespace gtl +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_LIB_GTL_PRIORITY_QUEUE_UTIL_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/gtl/subtle/map_traits.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/gtl/subtle/map_traits.h new file mode 100644 index 0000000000000000000000000000000000000000..a5296b8b93a010c3bbb46cb4e41875caf26ef20f --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/gtl/subtle/map_traits.h @@ -0,0 +1,44 @@ +/* Copyright 2019 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +// Traits classes for performing uniform lookup on different map value types. +// +// The access is computed as follows: +// +// 1. If T has a `first` or `second` field, use them. +// 2. Otherwise if it has `key()` or `value()` methods, use them. +// 3. Otherwise the program is ill-formed. +#ifndef TENSORFLOW_CORE_LIB_GTL_SUBTLE_MAP_TRAITS_H_ +#define TENSORFLOW_CORE_LIB_GTL_SUBTLE_MAP_TRAITS_H_ + +#include "tsl/lib/gtl/subtle/map_traits.h" + +namespace tensorflow { +namespace gtl { +namespace subtle { +namespace internal_map_traits { +// NOLINTBEGIN(misc-unused-using-decls) +using ::tsl::gtl::subtle::internal_map_traits::GetKey; +using ::tsl::gtl::subtle::internal_map_traits::GetMapped; +using ::tsl::gtl::subtle::internal_map_traits::Rank0; +using ::tsl::gtl::subtle::internal_map_traits::Rank1; +// NOLINTEND(misc-unused-using-decls) + +} // namespace internal_map_traits +} // namespace subtle +} // namespace gtl +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_LIB_GTL_SUBTLE_MAP_TRAITS_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/gtl/top_n.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/gtl/top_n.h new file mode 100644 index 0000000000000000000000000000000000000000..1f871e61dab0c7e68d6683968e23c1deac3a53c5 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/gtl/top_n.h @@ -0,0 +1,336 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +// This simple class finds the top n elements of an incrementally provided set +// of elements which you push one at a time. If the number of elements exceeds +// n, the lowest elements are incrementally dropped. At the end you get +// a vector of the top elements sorted in descending order (through Extract() or +// ExtractNondestructive()), or a vector of the top elements but not sorted +// (through ExtractUnsorted() or ExtractUnsortedNondestructive()). +// +// The value n is specified in the constructor. If there are p elements pushed +// altogether: +// The total storage requirements are O(min(n, p)) elements +// The running time is O(p * log(min(n, p))) comparisons +// If n is a constant, the total storage required is a constant and the running +// time is linear in p. +// +// NOTE(zhifengc): There is a way to do this in O(min(n, p)) storage and O(p) +// runtime. The basic idea is to repeatedly fill up a buffer of 2 * n elements, +// discarding the lowest n elements whenever the buffer is full using a linear- +// time median algorithm. This may have better performance when the input +// sequence is partially sorted. +// +// NOTE(zhifengc): This class should be redesigned to avoid reallocating a +// vector for each Extract. + +#ifndef TENSORFLOW_CORE_LIB_GTL_TOP_N_H_ +#define TENSORFLOW_CORE_LIB_GTL_TOP_N_H_ + +#include +#include +#include +#include +#include + +#include "tensorflow/core/platform/logging.h" + +namespace tensorflow { +namespace gtl { + +// Cmp is an stl binary predicate. Note that Cmp is the "greater" predicate, +// not the more commonly used "less" predicate. +// +// If you use a "less" predicate here, the TopN will pick out the bottom N +// elements out of the ones passed to it, and it will return them sorted in +// ascending order. +// +// TopN is rule-of-zero copyable and movable if its members are. +template > +class TopN { + public: + // The TopN is in one of the three states: + // + // o UNORDERED: this is the state an instance is originally in, + // where the elements are completely orderless. + // + // o BOTTOM_KNOWN: in this state, we keep the invariant that there + // is at least one element in it, and the lowest element is at + // position 0. The elements in other positions remain + // unsorted. This state is reached if the state was originally + // UNORDERED and a peek_bottom() function call is invoked. + // + // o HEAP_SORTED: in this state, the array is kept as a heap and + // there are exactly limit_ elements in the array. This + // state is reached when at least (limit_+1) elements are + // pushed in. + // + // The state transition graph is at follows: + // + // peek_bottom() (limit_+1) elements pushed + // UNORDERED --------------> BOTTOM_KNOWN --------------------> HEAP_SORTED + // | ^ + // | (limit_+1) elements pushed | + // +-----------------------------------------------------------+ + + enum State { UNORDERED, BOTTOM_KNOWN, HEAP_SORTED }; + using UnsortedIterator = typename std::vector::const_iterator; + + // 'limit' is the maximum number of top results to return. + explicit TopN(size_t limit) : TopN(limit, Cmp()) {} + TopN(size_t limit, const Cmp &cmp) : limit_(limit), cmp_(cmp) {} + + size_t limit() const { return limit_; } + + // Number of elements currently held by this TopN object. This + // will be no greater than 'limit' passed to the constructor. + size_t size() const { return elements_.size(); } + + bool empty() const { return size() == 0; } + + // If you know how many elements you will push at the time you create the + // TopN object, you can call reserve to preallocate the memory that TopN + // will need to process all 'n' pushes. Calling this method is optional. + void reserve(size_t n) { + // We may need limit_+1 for the case where we transition from an unsorted + // set of limit_ elements to a heap. + elements_.reserve(std::min(n, limit_ + 1)); + } + + // Push 'v'. If the maximum number of elements was exceeded, drop the + // lowest element and return it in 'dropped' (if given). If the maximum is not + // exceeded, 'dropped' will remain unchanged. 'dropped' may be omitted or + // nullptr, in which case it is not filled in. + // Requires: T is CopyAssignable, Swappable + void push(const T &v) { push(v, nullptr); } + void push(const T &v, T *dropped) { PushInternal(v, dropped); } + + // Move overloads of push. + // Requires: T is MoveAssignable, Swappable + void push(T &&v) { // NOLINT(build/c++11) + push(std::move(v), nullptr); + } + void push(T &&v, T *dropped) { // NOLINT(build/c++11) + PushInternal(std::move(v), dropped); + } + + // Peeks the bottom result without calling Extract() + const T &peek_bottom(); + + // Extract the elements as a vector sorted in descending order. The caller + // assumes ownership of the vector and must delete it when done. This is a + // destructive operation. The only method that can be called immediately + // after Extract() is Reset(). + std::vector *Extract(); + + // Similar to Extract(), but makes no guarantees the elements are in sorted + // order. As with Extract(), the caller assumes ownership of the vector and + // must delete it when done. This is a destructive operation. The only + // method that can be called immediately after ExtractUnsorted() is Reset(). + std::vector *ExtractUnsorted(); + + // A non-destructive version of Extract(). Copy the elements in a new vector + // sorted in descending order and return it. The caller assumes ownership of + // the new vector and must delete it when done. After calling + // ExtractNondestructive(), the caller can continue to push() new elements. + std::vector *ExtractNondestructive() const; + + // A non-destructive version of Extract(). Copy the elements to a given + // vector sorted in descending order. After calling + // ExtractNondestructive(), the caller can continue to push() new elements. + // Note: + // 1. The given argument must to be allocated. + // 2. Any data contained in the vector prior to the call will be deleted + // from it. After the call the vector will contain only the elements + // from the data structure. + void ExtractNondestructive(std::vector *output) const; + + // A non-destructive version of ExtractUnsorted(). Copy the elements in a new + // vector and return it, with no guarantees the elements are in sorted order. + // The caller assumes ownership of the new vector and must delete it when + // done. After calling ExtractUnsortedNondestructive(), the caller can + // continue to push() new elements. + std::vector *ExtractUnsortedNondestructive() const; + + // A non-destructive version of ExtractUnsorted(). Copy the elements into + // a given vector, with no guarantees the elements are in sorted order. + // After calling ExtractUnsortedNondestructive(), the caller can continue + // to push() new elements. + // Note: + // 1. The given argument must to be allocated. + // 2. Any data contained in the vector prior to the call will be deleted + // from it. After the call the vector will contain only the elements + // from the data structure. + void ExtractUnsortedNondestructive(std::vector *output) const; + + // Return an iterator to the beginning (end) of the container, + // with no guarantees about the order of iteration. These iterators are + // invalidated by mutation of the data structure. + UnsortedIterator unsorted_begin() const { return elements_.begin(); } + UnsortedIterator unsorted_end() const { return elements_.end(); } + + // Accessor for comparator template argument. + Cmp *comparator() { return &cmp_; } + + // This removes all elements. If Extract() or ExtractUnsorted() have been + // called, this will put it back in an empty but useable state. + void Reset(); + + private: + template + void PushInternal(U &&v, T *dropped); // NOLINT(build/c++11) + + // elements_ can be in one of two states: + // elements_.size() <= limit_ && state_ != HEAP_SORTED: + // elements_ is an unsorted vector of elements pushed so far. + // elements_.size() == limit_ && state_ == HEAP_SORTED: + // elements_ is an stl heap. + std::vector elements_; + size_t limit_; // Maximum number of elements to find + Cmp cmp_; // Greater-than comparison function + State state_ = UNORDERED; +}; + +// ---------------------------------------------------------------------- +// Implementations of non-inline functions + +template +template +void TopN::PushInternal(U &&v, T *dropped) { // NOLINT(build/c++11) + if (limit_ == 0) { + if (dropped) *dropped = std::forward(v); // NOLINT(build/c++11) + return; + } + if (state_ != HEAP_SORTED) { + // We may temporarily extend one beyond limit_ elements here. This is + // necessary for finding and removing the smallest element. + elements_.push_back(std::forward(v)); // NOLINT(build/c++11) + if (elements_.size() == limit_ + 1) { + // Transition from unsorted vector to a heap. + std::make_heap(elements_.begin(), elements_.end(), cmp_); + std::pop_heap(elements_.begin(), elements_.end(), cmp_); + if (dropped) *dropped = std::move(elements_.back()); + elements_.pop_back(); // Restore to size limit_. + state_ = HEAP_SORTED; + } else if (state_ == UNORDERED || + cmp_(elements_.back(), elements_.front())) { + // Easy case: we just push the new element back + } else { + // To maintain the BOTTOM_KNOWN state, we need to make sure that + // the element at position 0 is always the smallest. So we put + // the new element at position 0 and push the original bottom + // element in the back. + // Warning: this code is subtle. + using std::swap; + swap(elements_.front(), elements_.back()); + } + + } else { + // Only insert the new element if it is greater than the least element. + if (cmp_(v, elements_.front())) { + // Remove the top (smallest) element of the min heap, then push the new + // value in. + std::pop_heap(elements_.begin(), elements_.end(), cmp_); + if (dropped) *dropped = std::move(elements_.back()); + elements_.back() = std::forward(v); + std::push_heap(elements_.begin(), elements_.end(), cmp_); + } else { + if (dropped) *dropped = std::forward(v); // NOLINT(build/c++11) + } + } +} + +template +const T &TopN::peek_bottom() { + CHECK(!empty()); + if (state_ == UNORDERED) { + // We need to do a linear scan to find out the bottom element + int min_candidate = 0; + for (size_t i = 1; i < elements_.size(); ++i) { + if (cmp_(elements_[min_candidate], elements_[i])) { + min_candidate = i; + } + } + // By swapping the element at position 0 and the minimal + // element, we transition to the BOTTOM_KNOWN state + if (min_candidate != 0) { + using std::swap; + swap(elements_[0], elements_[min_candidate]); + } + state_ = BOTTOM_KNOWN; + } + return elements_.front(); +} + +template +std::vector *TopN::Extract() { + auto out = new std::vector; + out->swap(elements_); + if (state_ != HEAP_SORTED) { + std::sort(out->begin(), out->end(), cmp_); + } else { + std::sort_heap(out->begin(), out->end(), cmp_); + } + return out; +} + +template +std::vector *TopN::ExtractUnsorted() { + auto out = new std::vector; + out->swap(elements_); + return out; +} + +template +std::vector *TopN::ExtractNondestructive() const { + auto out = new std::vector; + ExtractNondestructive(out); + return out; +} + +template +void TopN::ExtractNondestructive(std::vector *output) const { + CHECK(output); + *output = elements_; + if (state_ != HEAP_SORTED) { + std::sort(output->begin(), output->end(), cmp_); + } else { + std::sort_heap(output->begin(), output->end(), cmp_); + } +} + +template +std::vector *TopN::ExtractUnsortedNondestructive() const { + auto elements = new std::vector; + ExtractUnsortedNondestructive(elements); + return elements; +} + +template +void TopN::ExtractUnsortedNondestructive(std::vector *output) const { + CHECK(output); + *output = elements_; +} + +template +void TopN::Reset() { + elements_.clear(); + state_ = UNORDERED; +} + +} // namespace gtl +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_LIB_GTL_TOP_N_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/hash/crc32c.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/hash/crc32c.h new file mode 100644 index 0000000000000000000000000000000000000000..07945b10a92b0ec1f8ffdf6c5d884e9de08fb56b --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/hash/crc32c.h @@ -0,0 +1,38 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_LIB_HASH_CRC32C_H_ +#define TENSORFLOW_CORE_LIB_HASH_CRC32C_H_ + +#include + +#include "tensorflow/core/platform/cord.h" +#include "tensorflow/core/platform/platform.h" +#include "tensorflow/core/platform/types.h" +#include "tsl/lib/hash/crc32c.h" + +namespace tensorflow { +namespace crc32c { +// NOLINTBEGIN(misc-unused-using-decls) +using tsl::crc32c::Extend; +using tsl::crc32c::kMaskDelta; +using tsl::crc32c::Mask; +using tsl::crc32c::Unmask; +using tsl::crc32c::Value; +// NOLINTEND(misc-unused-using-decls) +} // namespace crc32c +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_LIB_HASH_CRC32C_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/hash/hash.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/hash/hash.h new file mode 100644 index 0000000000000000000000000000000000000000..fa2cc295b15ed4a448442267c04dceb161ded06b --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/hash/hash.h @@ -0,0 +1,23 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +// Simple hash functions used for internal data structures + +#ifndef TENSORFLOW_CORE_LIB_HASH_HASH_H_ +#define TENSORFLOW_CORE_LIB_HASH_HASH_H_ + +#include "tensorflow/core/platform/hash.h" + +#endif // TENSORFLOW_CORE_LIB_HASH_HASH_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/histogram/histogram.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/histogram/histogram.h new file mode 100644 index 0000000000000000000000000000000000000000..551477cf483961c655acd792032996e973d22c6e --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/histogram/histogram.h @@ -0,0 +1,41 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_LIB_HISTOGRAM_HISTOGRAM_H_ +#define TENSORFLOW_CORE_LIB_HISTOGRAM_HISTOGRAM_H_ + +#include +#include + +#include "tensorflow/core/lib/gtl/array_slice.h" +#include "tensorflow/core/platform/macros.h" +#include "tensorflow/core/platform/mutex.h" +#include "tensorflow/core/platform/thread_annotations.h" +#include "tensorflow/core/platform/types.h" +#include "tsl/lib/histogram/histogram.h" + +namespace tensorflow { + +using tsl::HistogramProto; // NOLINT + +namespace histogram { + +using tsl::histogram::Histogram; // NOLINT +using tsl::histogram::ThreadSafeHistogram; // NOLINT + +} // namespace histogram +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_LIB_HISTOGRAM_HISTOGRAM_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/io/block.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/io/block.h new file mode 100644 index 0000000000000000000000000000000000000000..e641788171806060a8582bae0980d5652dee3b19 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/io/block.h @@ -0,0 +1,28 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_LIB_IO_BLOCK_H_ +#define TENSORFLOW_CORE_LIB_IO_BLOCK_H_ + +#include "tensorflow/core/lib/io/iterator.h" +#include "tsl/lib/io/block.h" + +namespace tensorflow { +namespace table { +using tsl::table::Block; // NOLINT(misc-unused-using-decls) +} +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_LIB_IO_BLOCK_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/io/block_builder.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/io/block_builder.h new file mode 100644 index 0000000000000000000000000000000000000000..b83db6dbfa572693cf30d685b25a5c4f2a39fcf4 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/io/block_builder.h @@ -0,0 +1,29 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_LIB_IO_BLOCK_BUILDER_H_ +#define TENSORFLOW_CORE_LIB_IO_BLOCK_BUILDER_H_ + +#include "tensorflow/core/platform/stringpiece.h" +#include "tensorflow/core/platform/types.h" +#include "tsl/lib/io/block_builder.h" + +namespace tensorflow { +namespace table { +using tsl::table::BlockBuilder; // NOLINT(misc-unused-using-decls) +} +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_LIB_IO_BLOCK_BUILDER_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/io/buffered_inputstream.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/io/buffered_inputstream.h new file mode 100644 index 0000000000000000000000000000000000000000..b211dc05efefc14970f5d5d5a117d7d9474bbf35 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/io/buffered_inputstream.h @@ -0,0 +1,29 @@ +/* Copyright 2016 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_LIB_IO_BUFFERED_INPUTSTREAM_H_ +#define TENSORFLOW_CORE_LIB_IO_BUFFERED_INPUTSTREAM_H_ + +#include "tensorflow/core/lib/io/inputstream_interface.h" +#include "tensorflow/core/platform/file_system.h" +#include "tsl/lib/io/buffered_inputstream.h" + +namespace tensorflow { +namespace io { +using tsl::io::BufferedInputStream; // NOLINT(misc-unused-using-decls) +} +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_LIB_IO_BUFFERED_INPUTSTREAM_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/io/cache.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/io/cache.h new file mode 100644 index 0000000000000000000000000000000000000000..7c647d80090fdfbe3d97339156f8b25095efd62c --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/io/cache.h @@ -0,0 +1,32 @@ +/* Copyright 2020 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_LIB_IO_CACHE_H_ +#define TENSORFLOW_CORE_LIB_IO_CACHE_H_ + +#include "tensorflow/core/platform/stringpiece.h" +#include "tsl/lib/io/cache.h" + +namespace tensorflow { +using tsl::Slice; // NOLINT(misc-unused-using-decls) +namespace table { +// NOLINTBEGIN(misc-unused-using-decls) +using tsl::table::Cache; +using tsl::table::NewLRUCache; +// NOLINTEND(misc-unused-using-decls) +} // namespace table +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_LIB_IO_CACHE_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/io/compression.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/io/compression.h new file mode 100644 index 0000000000000000000000000000000000000000..326e1a17e5144dde90809df287cb8d05344a0534 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/io/compression.h @@ -0,0 +1,34 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_LIB_IO_COMPRESSION_H_ +#define TENSORFLOW_CORE_LIB_IO_COMPRESSION_H_ + +#include "tsl/lib/io/compression.h" + +namespace tensorflow { +namespace io { +namespace compression { +// NOLINTBEGIN(misc-unused-using-decls) +using tsl::io::compression::kGzip; +using tsl::io::compression::kNone; +using tsl::io::compression::kSnappy; +using tsl::io::compression::kZlib; +// NOLINTEND(misc-unused-using-decls) +} // namespace compression +} // namespace io +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_LIB_IO_COMPRESSION_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/io/format.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/io/format.h new file mode 100644 index 0000000000000000000000000000000000000000..0ea77614bc4a5cd6b14497ab4af5644e18e92bb4 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/io/format.h @@ -0,0 +1,36 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_LIB_IO_FORMAT_H_ +#define TENSORFLOW_CORE_LIB_IO_FORMAT_H_ + +#include "tensorflow/core/lib/io/table_builder.h" +#include "tensorflow/core/platform/status.h" +#include "tensorflow/core/platform/stringpiece.h" +#include "tsl/lib/io/format.h" + +namespace tensorflow { +namespace table { +// NOLINTBEGIN(misc-unused-using-decls) +using tsl::table::BlockContents; +using tsl::table::BlockHandle; +using tsl::table::kBlockTrailerSize; +using tsl::table::kTableMagicNumber; +using tsl::table::ReadBlock; +// NOLINTEND(misc-unused-using-decls) +} // namespace table +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_LIB_IO_FORMAT_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/io/inputbuffer.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/io/inputbuffer.h new file mode 100644 index 0000000000000000000000000000000000000000..0cc33cb1aac895487911bbf8326b10385400add4 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/io/inputbuffer.h @@ -0,0 +1,32 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_LIB_IO_INPUTBUFFER_H_ +#define TENSORFLOW_CORE_LIB_IO_INPUTBUFFER_H_ + +#include "tensorflow/core/platform/coding.h" +#include "tensorflow/core/platform/env.h" +#include "tensorflow/core/platform/macros.h" +#include "tensorflow/core/platform/status.h" +#include "tensorflow/core/platform/types.h" +#include "tsl/lib/io/inputbuffer.h" + +namespace tensorflow { +namespace io { +using tsl::io::InputBuffer; // NOLINT(misc-unused-using-decls) +} +} + +#endif // TENSORFLOW_CORE_LIB_IO_INPUTBUFFER_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/io/inputstream_interface.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/io/inputstream_interface.h new file mode 100644 index 0000000000000000000000000000000000000000..135043a4f356bad1f627900c7168aba86f871eda --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/io/inputstream_interface.h @@ -0,0 +1,31 @@ +/* Copyright 2016 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_LIB_IO_INPUTSTREAM_INTERFACE_H_ +#define TENSORFLOW_CORE_LIB_IO_INPUTSTREAM_INTERFACE_H_ + +#include "tensorflow/core/platform/cord.h" +#include "tensorflow/core/platform/errors.h" +#include "tensorflow/core/platform/status.h" +#include "tensorflow/core/platform/types.h" +#include "tsl/lib/io/inputstream_interface.h" + +namespace tensorflow { +namespace io { +using tsl::io::InputStreamInterface; // NOLINT(misc-unused-using-decls) +} +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_LIB_IO_INPUTSTREAM_INTERFACE_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/io/iterator.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/io/iterator.h new file mode 100644 index 0000000000000000000000000000000000000000..a758cf51ef10e90cd33016c32ec8a39ed54ca1f8 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/io/iterator.h @@ -0,0 +1,43 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +// An iterator yields a sequence of key/value pairs from a source. +// The following class defines the interface. Multiple implementations +// are provided by this library. In particular, iterators are provided +// to access the contents of a Table or a DB. +// +// Multiple threads can invoke const methods on an Iterator without +// external synchronization, but if any of the threads may call a +// non-const method, all threads accessing the same Iterator must use +// external synchronization. + +#ifndef TENSORFLOW_CORE_LIB_IO_ITERATOR_H_ +#define TENSORFLOW_CORE_LIB_IO_ITERATOR_H_ + +#include "tensorflow/core/platform/status.h" +#include "tensorflow/core/platform/stringpiece.h" +#include "tsl/lib/io/iterator.h" + +namespace tensorflow { +namespace table { +// NOLINTBEGIN(misc-unused-using-decls) +using tsl::table::Iterator; +using tsl::table::NewEmptyIterator; +using tsl::table::NewErrorIterator; +// NOLINTEND(misc-unused-using-decls) +} // namespace table +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_LIB_IO_ITERATOR_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/io/path.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/io/path.h new file mode 100644 index 0000000000000000000000000000000000000000..f5deacd1026a1e64509ca9821a7ec27cca6b4431 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/io/path.h @@ -0,0 +1,21 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_LIB_IO_PATH_H_ +#define TENSORFLOW_CORE_LIB_IO_PATH_H_ + +#include "tensorflow/core/platform/path.h" + +#endif // TENSORFLOW_CORE_LIB_IO_PATH_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/io/proto_encode_helper.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/io/proto_encode_helper.h new file mode 100644 index 0000000000000000000000000000000000000000..97b98bac26630b013e1047ba89e546b1f32e19c4 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/io/proto_encode_helper.h @@ -0,0 +1,31 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_LIB_IO_PROTO_ENCODE_HELPER_H_ +#define TENSORFLOW_CORE_LIB_IO_PROTO_ENCODE_HELPER_H_ + +#include "tensorflow/core/platform/coding.h" +#include "tensorflow/core/platform/logging.h" +#include "tensorflow/core/platform/protobuf.h" +#include "tensorflow/core/platform/stringpiece.h" +#include "tsl/lib/io/proto_encode_helper.h" + +namespace tensorflow { +namespace io { +using tsl::io::ProtoEncodeHelper; // NOLINT(misc-unused-using-decls) +} +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_LIB_IO_PROTO_ENCODE_HELPER_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/io/random_inputstream.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/io/random_inputstream.h new file mode 100644 index 0000000000000000000000000000000000000000..cb3c5ed6f98326ea466be562349860fa0803a632 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/io/random_inputstream.h @@ -0,0 +1,30 @@ +/* Copyright 2016 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_LIB_IO_RANDOM_INPUTSTREAM_H_ +#define TENSORFLOW_CORE_LIB_IO_RANDOM_INPUTSTREAM_H_ + +#include "tensorflow/core/lib/io/inputstream_interface.h" +#include "tensorflow/core/platform/cord.h" +#include "tensorflow/core/platform/file_system.h" +#include "tsl/lib/io/random_inputstream.h" + +namespace tensorflow { +namespace io { +using tsl::io::RandomAccessInputStream; // NOLINT(misc-unused-using-decls) +} +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_LIB_IO_RANDOM_INPUTSTREAM_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/io/record_reader.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/io/record_reader.h new file mode 100644 index 0000000000000000000000000000000000000000..51a332b6fbd0dbd4b424fd0eab854cfc4effb808 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/io/record_reader.h @@ -0,0 +1,40 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_LIB_IO_RECORD_READER_H_ +#define TENSORFLOW_CORE_LIB_IO_RECORD_READER_H_ + +#include "tensorflow/core/lib/io/inputstream_interface.h" +#include "tensorflow/core/platform/errors.h" +#include "tensorflow/core/platform/stringpiece.h" +#if !defined(IS_SLIM_BUILD) +#include "tensorflow/core/lib/io/zlib_compression_options.h" +#include "tensorflow/core/lib/io/zlib_inputstream.h" +#endif // IS_SLIM_BUILD +#include "tensorflow/core/platform/macros.h" +#include "tensorflow/core/platform/types.h" +#include "tsl/lib/io/record_reader.h" + +namespace tensorflow { +namespace io { +// NOLINTBEGIN(misc-unused-using-decls) +using tsl::io::RecordReader; +using tsl::io::RecordReaderOptions; +using tsl::io::SequentialRecordReader; +// NOLINTEND(misc-unused-using-decls) +} // namespace io +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_LIB_IO_RECORD_READER_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/io/record_writer.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/io/record_writer.h new file mode 100644 index 0000000000000000000000000000000000000000..63dd44427a2ea18b410c9973cbb34ab21c2bc6ab --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/io/record_writer.h @@ -0,0 +1,41 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_LIB_IO_RECORD_WRITER_H_ +#define TENSORFLOW_CORE_LIB_IO_RECORD_WRITER_H_ + +#include "tensorflow/core/lib/hash/crc32c.h" +#include "tensorflow/core/platform/coding.h" +#include "tensorflow/core/platform/status.h" +#include "tensorflow/core/platform/stringpiece.h" +#if !defined(IS_SLIM_BUILD) +#include "tensorflow/core/lib/io/zlib_compression_options.h" +#include "tensorflow/core/lib/io/zlib_outputbuffer.h" +#endif // IS_SLIM_BUILD +#include "tensorflow/core/platform/cord.h" +#include "tensorflow/core/platform/macros.h" +#include "tensorflow/core/platform/types.h" +#include "tsl/lib/io/record_writer.h" + +namespace tensorflow { +namespace io { +// NOLINTBEGIN(misc-unused-using-decls) +using tsl::io::RecordWriter; +using tsl::io::RecordWriterOptions; +// NOLINTEND(misc-unused-using-decls) +} // namespace io +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_LIB_IO_RECORD_WRITER_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/io/table.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/io/table.h new file mode 100644 index 0000000000000000000000000000000000000000..93466ddaa6e3153ef72c118f56c4a0342818663c --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/io/table.h @@ -0,0 +1,28 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_LIB_IO_TABLE_H_ +#define TENSORFLOW_CORE_LIB_IO_TABLE_H_ + +#include "tensorflow/core/lib/io/iterator.h" +#include "tsl/lib/io/table.h" + +namespace tensorflow { +namespace table { +using tsl::table::Table; // NOLINT(misc-unused-using-decls) +} +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_LIB_IO_TABLE_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/io/table_builder.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/io/table_builder.h new file mode 100644 index 0000000000000000000000000000000000000000..a895387a2c3fbe4a448e03141c1924e839a106c3 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/io/table_builder.h @@ -0,0 +1,38 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +// TableBuilder provides the interface used to build a Table +// (an immutable and sorted map from keys to values). +// +// Multiple threads can invoke const methods on a TableBuilder without +// external synchronization, but if any of the threads may call a +// non-const method, all threads accessing the same TableBuilder must use +// external synchronization. + +#ifndef TENSORFLOW_CORE_LIB_IO_TABLE_BUILDER_H_ +#define TENSORFLOW_CORE_LIB_IO_TABLE_BUILDER_H_ + +#include "tensorflow/core/lib/io/table_options.h" +#include "tensorflow/core/platform/status.h" +#include "tensorflow/core/platform/stringpiece.h" +#include "tsl/lib/io/table_builder.h" + +namespace tensorflow { +namespace table { +using tsl::table::TableBuilder; // NOLINT(misc-unused-using-decls) +} +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_LIB_IO_TABLE_BUILDER_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/io/table_options.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/io/table_options.h new file mode 100644 index 0000000000000000000000000000000000000000..b751aefdbeaef360b9d8ed75c42be56090d3ba47 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/io/table_options.h @@ -0,0 +1,32 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_LIB_IO_TABLE_OPTIONS_H_ +#define TENSORFLOW_CORE_LIB_IO_TABLE_OPTIONS_H_ + +#include "tsl/lib/io/table_options.h" + +namespace tensorflow { +namespace table { +// NOLINTBEGIN(misc-unused-using-decls) +using tsl::table::CompressionType; +using tsl::table::kNoCompression; +using tsl::table::kSnappyCompression; +using tsl::table::Options; +// NOLINTEND(misc-unused-using-decls) +} // namespace table +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_LIB_IO_TABLE_OPTIONS_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/io/two_level_iterator.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/io/two_level_iterator.h new file mode 100644 index 0000000000000000000000000000000000000000..357efd1d5993b0f23ce0beb419e1e84738c14539 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/io/two_level_iterator.h @@ -0,0 +1,28 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_LIB_IO_TWO_LEVEL_ITERATOR_H_ +#define TENSORFLOW_CORE_LIB_IO_TWO_LEVEL_ITERATOR_H_ + +#include "tensorflow/core/lib/io/iterator.h" +#include "tsl/lib/io/two_level_iterator.h" + +namespace tensorflow { +namespace table { +using tsl::table::NewTwoLevelIterator; // NOLINT(misc-unused-using-decls) +} +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_LIB_IO_TWO_LEVEL_ITERATOR_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/io/zlib_compression_options.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/io/zlib_compression_options.h new file mode 100644 index 0000000000000000000000000000000000000000..643c041ec6efc075596b30c26c4ffc878902b108 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/io/zlib_compression_options.h @@ -0,0 +1,28 @@ +/* Copyright 2016 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_LIB_IO_ZLIB_COMPRESSION_OPTIONS_H_ +#define TENSORFLOW_CORE_LIB_IO_ZLIB_COMPRESSION_OPTIONS_H_ + +#include "tensorflow/core/platform/types.h" +#include "tsl/lib/io/zlib_compression_options.h" + +namespace tensorflow { +namespace io { +using tsl::io::ZlibCompressionOptions; // NOLINT(misc-unused-using-decls) +} +} + +#endif // TENSORFLOW_CORE_LIB_IO_ZLIB_COMPRESSION_OPTIONS_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/io/zlib_inputstream.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/io/zlib_inputstream.h new file mode 100644 index 0000000000000000000000000000000000000000..75bef87ca38c2ef75eaa14e1020dd4c28cc97d50 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/io/zlib_inputstream.h @@ -0,0 +1,33 @@ +/* Copyright 2016 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_LIB_IO_ZLIB_INPUTSTREAM_H_ +#define TENSORFLOW_CORE_LIB_IO_ZLIB_INPUTSTREAM_H_ + +#include "tensorflow/core/lib/io/inputstream_interface.h" +#include "tensorflow/core/lib/io/zlib_compression_options.h" +#include "tensorflow/core/platform/env.h" +#include "tensorflow/core/platform/macros.h" +#include "tensorflow/core/platform/status.h" +#include "tensorflow/core/platform/types.h" +#include "tsl/lib/io/zlib_inputstream.h" + +namespace tensorflow { +namespace io { +using tsl::io::ZlibInputStream; // NOLINT(misc-unused-using-decls); +} +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_LIB_IO_ZLIB_INPUTSTREAM_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/io/zlib_outputbuffer.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/io/zlib_outputbuffer.h new file mode 100644 index 0000000000000000000000000000000000000000..f68a594bda85518b027e5c2207ac418a3a862679 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/io/zlib_outputbuffer.h @@ -0,0 +1,34 @@ +/* Copyright 2016 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_LIB_IO_ZLIB_OUTPUTBUFFER_H_ +#define TENSORFLOW_CORE_LIB_IO_ZLIB_OUTPUTBUFFER_H_ + +#include "tensorflow/core/lib/io/zlib_compression_options.h" +#include "tensorflow/core/platform/env.h" +#include "tensorflow/core/platform/file_system.h" +#include "tensorflow/core/platform/macros.h" +#include "tensorflow/core/platform/status.h" +#include "tensorflow/core/platform/stringpiece.h" +#include "tensorflow/core/platform/types.h" +#include "tsl/lib/io/zlib_outputbuffer.h" + +namespace tensorflow { +namespace io { +using tsl::io::ZlibOutputBuffer; // NOLINT(misc-unused-using-decls) +} +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_LIB_IO_ZLIB_OUTPUTBUFFER_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/jpeg/jpeg_handle.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/jpeg/jpeg_handle.h new file mode 100644 index 0000000000000000000000000000000000000000..d40cbaae93935959c6794ed3d56083b20166172d --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/jpeg/jpeg_handle.h @@ -0,0 +1,60 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +// This file declares the functions and structures for memory I/O with libjpeg +// These functions are not meant to be used directly, see jpeg_mem.h instead. + +#ifndef TENSORFLOW_CORE_LIB_JPEG_JPEG_HANDLE_H_ +#define TENSORFLOW_CORE_LIB_JPEG_JPEG_HANDLE_H_ + +#include "tensorflow/core/platform/jpeg.h" +#include "tensorflow/core/platform/types.h" + +namespace tensorflow { +namespace jpeg { + +// Handler for fatal JPEG library errors: clean up & return +void CatchError(j_common_ptr cinfo); + +typedef struct { + struct jpeg_destination_mgr pub; + JOCTET *buffer; + int bufsize; + int datacount; + tstring *dest; +} MemDestMgr; + +typedef struct { + struct jpeg_source_mgr pub; + const unsigned char *data; + unsigned long int datasize; + bool try_recover_truncated_jpeg; +} MemSourceMgr; + +void SetSrc(j_decompress_ptr cinfo, const void *data, + unsigned long int datasize, bool try_recover_truncated_jpeg); + +// JPEG destination: we will store all the data in a buffer "buffer" of total +// size "bufsize", if the buffer overflows, we will be in trouble. +void SetDest(j_compress_ptr cinfo, void *buffer, int bufsize); +// Same as above, except that buffer is only used as a temporary structure and +// is emptied into "destination" as soon as it fills up. +void SetDest(j_compress_ptr cinfo, void *buffer, int bufsize, + tstring *destination); + +} // namespace jpeg +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_LIB_JPEG_JPEG_HANDLE_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/jpeg/jpeg_mem.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/jpeg/jpeg_mem.h new file mode 100644 index 0000000000000000000000000000000000000000..ead9ff164cbe40ca31c2a068691f866f923ba41a --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/jpeg/jpeg_mem.h @@ -0,0 +1,162 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +// This file defines functions to compress and uncompress JPEG files +// to and from memory. It provides interfaces for raw images +// (data array and size fields). +// Direct manipulation of JPEG strings are supplied: Flip, Rotate, Crop.. + +#ifndef TENSORFLOW_CORE_LIB_JPEG_JPEG_MEM_H_ +#define TENSORFLOW_CORE_LIB_JPEG_JPEG_MEM_H_ + +#include +#include + +#include "tensorflow/core/lib/core/stringpiece.h" +#include "tensorflow/core/platform/jpeg.h" +#include "tensorflow/core/platform/types.h" + +namespace tensorflow { +namespace jpeg { + +// Flags for Uncompress +struct UncompressFlags { + // ratio can be 1, 2, 4, or 8 and represent the denominator for the scaling + // factor (eg ratio = 4 means that the resulting image will be at 1/4 original + // size in both directions). + int ratio = 1; + + // The number of bytes per pixel (1, 3 or 4), or 0 for autodetect. + int components = 0; + + // If true, decoder will use a slower but nicer upscaling of the chroma + // planes (yuv420/422 only). + bool fancy_upscaling = true; + + // If true, will attempt to fill in missing lines of truncated files + bool try_recover_truncated_jpeg = false; + + // The minimum required fraction of lines read before the image is accepted. + float min_acceptable_fraction = 1.0; + + // The distance in bytes from one scanline to the other. Should be at least + // equal to width*components*sizeof(JSAMPLE). If 0 is passed, the stride + // used will be this minimal value. + int stride = 0; + + // Setting of J_DCT_METHOD enum in jpeglib.h, for choosing which + // algorithm to use for DCT/IDCT. + // + // Setting this has a quality/speed trade-off implication. + J_DCT_METHOD dct_method = JDCT_DEFAULT; + + // Settings of crop window before decompression. + bool crop = false; + // Vertical coordinate of the top-left corner of the result in the input. + int crop_x = 0; + // Horizontal coordinate of the top-left corner of the result in the input. + int crop_y = 0; + // Width of the output image. + int crop_width = 0; + // Height of the output image. + int crop_height = 0; +}; + +// Uncompress some raw JPEG data given by the pointer srcdata and the length +// datasize. +// - width and height are the address where to store the size of the +// uncompressed image in pixels. May be nullptr. +// - components is the address where the number of read components are +// stored. This is *output only*: to request a specific number of +// components use flags.components. May be nullptr. +// - nwarn is the address in which to store the number of warnings. +// May be nullptr. +// The function returns a pointer to the raw uncompressed data or NULL if +// there was an error. The caller of the function is responsible for +// freeing the memory (using delete []). +uint8* Uncompress(const void* srcdata, int datasize, + const UncompressFlags& flags, int* width, int* height, + int* components, // Output only: useful with autodetect + int64_t* nwarn); + +// Version of Uncompress that allocates memory via a callback. The callback +// arguments are (width, height, components). If the size is known ahead of +// time this function can return an existing buffer; passing a callback allows +// the buffer to be shaped based on the JPEG header. The caller is responsible +// for freeing the memory *even along error paths*. +uint8* Uncompress(const void* srcdata, int datasize, + const UncompressFlags& flags, int64_t* nwarn, + std::function allocate_output); + +// Read jpeg header and get image information. Returns true on success. +// The width, height, and components points may be null. +bool GetImageInfo(const void* srcdata, int datasize, int* width, int* height, + int* components); + +// Note: (format & 0xff) = number of components (<=> bytes per pixels) +enum Format { + FORMAT_GRAYSCALE = 0x001, // 1 byte/pixel + FORMAT_RGB = 0x003, // 3 bytes/pixel RGBRGBRGBRGB... + FORMAT_RGBA = 0x004, // 4 bytes/pixel RGBARGBARGBARGBA... + FORMAT_ABGR = 0x104 // 4 bytes/pixel ABGRABGRABGR... +}; + +// Flags for compression +struct CompressFlags { + // Encoding of the input data for compression + Format format; + + // Quality of the compression from 0-100 + int quality = 95; + + // If true, create a jpeg image that loads progressively + bool progressive = false; + + // If true, reduce jpeg size without changing quality (at the cost of CPU/RAM) + bool optimize_jpeg_size = false; + + // See http://en.wikipedia.org/wiki/Chroma_subsampling + bool chroma_downsampling = true; + + // Resolution + int density_unit = 1; // 1 = in, 2 = cm + int x_density = 300; + int y_density = 300; + + // If not empty, embed this XMP metadata in the image header + StringPiece xmp_metadata; + + // The distance in bytes from one scanline to the other. Should be at least + // equal to width*components*sizeof(JSAMPLE). If 0 is passed, the stride + // used will be this minimal value. + int stride = 0; +}; + +// Compress some raw image given in srcdata, the data is a 2D array of size +// stride*height with one of the formats enumerated above. +// The encoded data is returned as a string. +// If not empty, XMP metadata can be embedded in the image header +// On error, returns the empty string (which is never a valid jpeg). +tstring Compress(const void* srcdata, int width, int height, + const CompressFlags& flags); + +// On error, returns false and sets output to empty. +bool Compress(const void* srcdata, int width, int height, + const CompressFlags& flags, tstring* output); + +} // namespace jpeg +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_LIB_JPEG_JPEG_MEM_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/llvm_rtti/llvm_rtti.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/llvm_rtti/llvm_rtti.h new file mode 100644 index 0000000000000000000000000000000000000000..a159e76c4f045cfc0683d9cf78ea759d791f8371 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/llvm_rtti/llvm_rtti.h @@ -0,0 +1,25 @@ +/* Copyright 2020 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ +#ifndef TENSORFLOW_CORE_LIB_LLVM_RTTI_LLVM_RTTI_H_ +#define TENSORFLOW_CORE_LIB_LLVM_RTTI_LLVM_RTTI_H_ + +#include "llvm/Support/Casting.h" + +namespace tensorflow { +using llvm::dyn_cast; +using llvm::isa; +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_LIB_LLVM_RTTI_LLVM_RTTI_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/math/math_util.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/math/math_util.h new file mode 100644 index 0000000000000000000000000000000000000000..b92e421b6e2821603deb1583bf7dd0e1ee3793ec --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/math/math_util.h @@ -0,0 +1,29 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_LIB_MATH_MATH_UTIL_H_ +#define TENSORFLOW_CORE_LIB_MATH_MATH_UTIL_H_ + +#include "tensorflow/core/platform/logging.h" +#include "tensorflow/core/platform/types.h" +#include "tsl/lib/math/math_util.h" + +namespace tensorflow { +// NOLINTBEGIN(misc-unused-using-decls) +using tsl::MathUtil; +// NOLINTEND(misc-unused-using-decls) +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_LIB_MATH_MATH_UTIL_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/monitoring/cell_reader.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/monitoring/cell_reader.h new file mode 100644 index 0000000000000000000000000000000000000000..65743fe5ef38a8cdcd46d0161fdfe6ecd0b0fc8d --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/monitoring/cell_reader.h @@ -0,0 +1,37 @@ +/* Copyright 2022 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ +#ifndef TENSORFLOW_CORE_LIB_MONITORING_CELL_READER_H_ +#define TENSORFLOW_CORE_LIB_MONITORING_CELL_READER_H_ + +#include +#include +#include +#include + +#include "absl/container/flat_hash_map.h" +#include "tensorflow/core/lib/monitoring/cell_reader-inl.h" +#include "tensorflow/core/lib/monitoring/collected_metrics.h" +#include "tensorflow/core/lib/monitoring/metric_def.h" +#include "tsl/lib/monitoring/cell_reader.h" +// NOLINTBEGIN(misc-unused-using-decls) +namespace tensorflow { +namespace monitoring { +namespace testing { +using tsl::monitoring::testing::CellReader; +} // namespace testing +} // namespace monitoring +} // namespace tensorflow +// NOLINTEND(misc-unused-using-decls) +#endif // TENSORFLOW_CORE_LIB_MONITORING_CELL_READER_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/monitoring/collected_metrics.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/monitoring/collected_metrics.h new file mode 100644 index 0000000000000000000000000000000000000000..c7382341cb44c70493244cbd681b4fb9a2298043 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/monitoring/collected_metrics.h @@ -0,0 +1,42 @@ +/* Copyright 2016 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +// Standard format in which the metrics are collected, before being exported. +// These are to be used only by the CollectionRegistry and exporters which +// collect metrics using the CollectionRegistry. + +#ifndef TENSORFLOW_CORE_LIB_MONITORING_COLLECTED_METRICS_H_ +#define TENSORFLOW_CORE_LIB_MONITORING_COLLECTED_METRICS_H_ + +#include +#include +#include +#include + +#include "tensorflow/core/framework/summary.pb.h" +#include "tensorflow/core/lib/monitoring/metric_def.h" +#include "tensorflow/core/lib/monitoring/types.h" +#include "tsl/lib/monitoring/collected_metrics.h" +// NOLINTBEGIN(misc-unused-using-decls) +namespace tensorflow { +namespace monitoring { +using tsl::monitoring::CollectedMetrics; +using tsl::monitoring::MetricDescriptor; +using tsl::monitoring::Point; +using tsl::monitoring::PointSet; +} // namespace monitoring +} // namespace tensorflow +// NOLINTEND(misc-unused-using-decls) +#endif // TENSORFLOW_CORE_LIB_MONITORING_COLLECTED_METRICS_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/monitoring/collection_registry.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/monitoring/collection_registry.h new file mode 100644 index 0000000000000000000000000000000000000000..f759c1ebcc20129252bdcd3c3d2ea3d34f0ab701 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/monitoring/collection_registry.h @@ -0,0 +1,79 @@ +/* Copyright 2016 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_LIB_MONITORING_COLLECTION_REGISTRY_H_ +#define TENSORFLOW_CORE_LIB_MONITORING_COLLECTION_REGISTRY_H_ + +#include "tsl/lib/monitoring/collection_registry.h" +// clang-format off +// Required for IS_MOBILE_PLATFORM +#include "tensorflow/core/platform/platform.h" +// clang-format on +// We use a null implementation for mobile platforms. +#ifdef IS_MOBILE_PLATFORM + +#include +#include +#include + +#include "tensorflow/core/lib/monitoring/metric_def.h" +#include "tensorflow/core/platform/macros.h" +// NOLINTBEGIN(misc-unused-using-decls) +namespace tensorflow { +namespace monitoring { +using tsl::monitoring::CollectionRegistry; +using tsl::monitoring::MetricCollector; +using tsl::monitoring::MetricCollectorGetter; +} // namespace monitoring +} // namespace tensorflow +// NOLINTEND(misc-unused-using-decls) +#else // !defined(IS_MOBILE_PLATFORM) + +#include +#include +#include +#include + +#include "tensorflow/core/framework/summary.pb.h" +#include "tensorflow/core/lib/monitoring/collected_metrics.h" +#include "tensorflow/core/lib/monitoring/metric_def.h" +#include "tensorflow/core/lib/monitoring/types.h" +#include "tensorflow/core/platform/env.h" +#include "tensorflow/core/platform/logging.h" +#include "tensorflow/core/platform/macros.h" +#include "tensorflow/core/platform/mutex.h" +#include "tensorflow/core/platform/stringpiece.h" +#include "tensorflow/core/platform/thread_annotations.h" +#include "tensorflow/core/platform/types.h" + +namespace tensorflow { +namespace monitoring { +// NOLINTBEGIN(misc-unused-using-decls) +using tsl::monitoring::CollectionRegistry; +using tsl::monitoring::Exporter; +using tsl::monitoring::MetricCollector; +using tsl::monitoring::MetricCollectorGetter; +using tsl::monitoring::exporter_registration::ExporterRegistration; +using tsl::monitoring::internal::Collector; +namespace test_util { +class CollectionRegistryTestAccess; +} // namespace test_util +// NOLINTEND(misc-unused-using-decls) +} // namespace monitoring +} // namespace tensorflow + +#endif // IS_MOBILE_PLATFORM + +#endif // TENSORFLOW_CORE_LIB_MONITORING_COLLECTION_REGISTRY_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/monitoring/counter.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/monitoring/counter.h new file mode 100644 index 0000000000000000000000000000000000000000..3dd095acd4c7ec05b0b53f546933b23a237cf603 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/monitoring/counter.h @@ -0,0 +1,43 @@ +/* Copyright 2016 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_LIB_MONITORING_COUNTER_H_ +#define TENSORFLOW_CORE_LIB_MONITORING_COUNTER_H_ + +#include "tsl/lib/monitoring/counter.h" +#ifdef IS_MOBILE_PLATFORM +#include "tensorflow/core/lib/core/status.h" +#include "tensorflow/core/platform/macros.h" +#include "tensorflow/core/platform/types.h" +#else +#include "tensorflow/core/lib/core/status.h" +#include "tensorflow/core/lib/monitoring/collection_registry.h" +#include "tensorflow/core/lib/monitoring/metric_def.h" +#include "tensorflow/core/platform/logging.h" +#include "tensorflow/core/platform/macros.h" +#include "tensorflow/core/platform/mutex.h" +#include "tensorflow/core/platform/thread_annotations.h" +#endif +// NOLINTBEGIN(misc-unused-using-decls) +namespace tensorflow { +namespace monitoring { + +using tsl::monitoring::Counter; +using tsl::monitoring::CounterCell; + +} // namespace monitoring +} // namespace tensorflow +// NOLINTEND(misc-unused-using-decls) +#endif // TENSORFLOW_CORE_LIB_MONITORING_COUNTER_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/monitoring/gauge.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/monitoring/gauge.h new file mode 100644 index 0000000000000000000000000000000000000000..4aeace7122c9be9d3d744230b5a3f29e58080399 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/monitoring/gauge.h @@ -0,0 +1,31 @@ +/* Copyright 2017 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_LIB_MONITORING_GAUGE_H_ +#define TENSORFLOW_CORE_LIB_MONITORING_GAUGE_H_ + +#include "tensorflow/core/lib/monitoring/collection_registry.h" +#include "tensorflow/core/lib/monitoring/metric_def.h" +#include "tsl/lib/monitoring/gauge.h" +// NOLINTBEGIN(misc-unused-using-decls) +namespace tensorflow { +namespace monitoring { +using tsl::monitoring::Gauge; +using tsl::monitoring::GaugeCell; + +} // namespace monitoring +} // namespace tensorflow +// NOLINTEND(misc-unused-using-decls) +#endif // TENSORFLOW_CORE_LIB_MONITORING_GAUGE_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/monitoring/metric_def.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/monitoring/metric_def.h new file mode 100644 index 0000000000000000000000000000000000000000..28a5d54e1887918da1a67d6f7cdc78f10edace26 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/monitoring/metric_def.h @@ -0,0 +1,38 @@ +/* Copyright 2016 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_LIB_MONITORING_METRIC_DEF_H_ +#define TENSORFLOW_CORE_LIB_MONITORING_METRIC_DEF_H_ + +#include +#include +#include +#include + +#include "tensorflow/core/framework/summary.pb.h" +#include "tensorflow/core/lib/monitoring/types.h" +#include "tensorflow/core/platform/stringpiece.h" +#include "tensorflow/core/platform/types.h" +#include "tsl/lib/monitoring/metric_def.h" +// NOLINTBEGIN(misc-unused-using-decls) +namespace tensorflow { +namespace monitoring { +using tsl::monitoring::MetricDef; +using tsl::monitoring::MetricKind; +using tsl::monitoring::ValueType; +} // namespace monitoring +} // namespace tensorflow +// NOLINTEND(misc-unused-using-decls) +#endif // TENSORFLOW_CORE_LIB_MONITORING_METRIC_DEF_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/monitoring/percentile_sampler.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/monitoring/percentile_sampler.h new file mode 100644 index 0000000000000000000000000000000000000000..8ac2bc73a3a64cf5c65a7be3513460cfad42a49b --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/monitoring/percentile_sampler.h @@ -0,0 +1,67 @@ +/* Copyright 2019 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_LIB_MONITORING_PERCENTILE_SAMPLER_H_ +#define TENSORFLOW_CORE_LIB_MONITORING_PERCENTILE_SAMPLER_H_ + +// clang-format off +// Required for IS_MOBILE_PLATFORM +#include "tensorflow/core/platform/platform.h" +#include "tsl/lib/monitoring/percentile_sampler.h" +// clang-format on + +// We replace this implementation with a null implementation for mobile +// platforms. +#ifdef IS_MOBILE_PLATFORM + +#include "tensorflow/core/lib/core/status.h" +#include "tensorflow/core/lib/monitoring/collection_registry.h" +#include "tensorflow/core/lib/monitoring/metric_def.h" +#include "tensorflow/core/lib/monitoring/types.h" +#include "tensorflow/core/platform/macros.h" +// NOLINTBEGIN(misc-unused-using-decls) +namespace tensorflow { +namespace monitoring { + +using tsl::monitoring::PercentileSampler; +using tsl::monitoring::PercentileSamplerCell; + +} // namespace monitoring +} // namespace tensorflow +// NOLINTEND(misc-unused-using-decls) +#else // IS_MOBILE_PLATFORM + +#include +#include + +#include "tensorflow/core/lib/core/status.h" +#include "tensorflow/core/lib/monitoring/collection_registry.h" +#include "tensorflow/core/lib/monitoring/metric_def.h" +#include "tensorflow/core/lib/monitoring/types.h" +#include "tensorflow/core/platform/macros.h" +#include "tensorflow/core/platform/mutex.h" +#include "tensorflow/core/platform/thread_annotations.h" + +namespace tensorflow { +namespace monitoring { +// NOLINTBEGIN(misc-unused-using-decls) +using tsl::monitoring::PercentileSampler; +using tsl::monitoring::PercentileSamplerCell; +// NOLINTEND(misc-unused-using-decls) +} // namespace monitoring +} // namespace tensorflow + +#endif // IS_MOBILE_PLATFORM +#endif // TENSORFLOW_CORE_LIB_MONITORING_PERCENTILE_SAMPLER_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/monitoring/sampler.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/monitoring/sampler.h new file mode 100644 index 0000000000000000000000000000000000000000..70948847433b7afec3a36f36a7e8de45e8ca4415 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/monitoring/sampler.h @@ -0,0 +1,54 @@ +/* Copyright 2016 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_LIB_MONITORING_SAMPLER_H_ +#define TENSORFLOW_CORE_LIB_MONITORING_SAMPLER_H_ + +#include "tsl/lib/monitoring/sampler.h" +#ifdef IS_MOBILE_PLATFORM + +#include + +#include "tensorflow/core/framework/summary.pb.h" +#include "tensorflow/core/lib/core/status.h" +#include "tensorflow/core/lib/monitoring/metric_def.h" +#include "tensorflow/core/platform/macros.h" +#include "tensorflow/core/platform/types.h" +#else // IS_MOBILE_PLATFORM + +#include + +#include + +#include "tensorflow/core/framework/summary.pb.h" +#include "tensorflow/core/lib/core/status.h" +#include "tensorflow/core/lib/histogram/histogram.h" +#include "tensorflow/core/lib/monitoring/collection_registry.h" +#include "tensorflow/core/lib/monitoring/metric_def.h" +#include "tensorflow/core/platform/macros.h" +#include "tensorflow/core/platform/mutex.h" +#include "tensorflow/core/platform/thread_annotations.h" +#endif +// NOLINTBEGIN(misc-unused-using-decls) +namespace tensorflow { +namespace monitoring { + +using tsl::monitoring::Buckets; +using tsl::monitoring::Sampler; +using tsl::monitoring::SamplerCell; +} // namespace monitoring +} // namespace tensorflow +// NOLINTEND(misc-unused-using-decls) +#endif // TENSORFLOW_CORE_LIB_MONITORING_SAMPLER_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/monitoring/test_utils.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/monitoring/test_utils.h new file mode 100644 index 0000000000000000000000000000000000000000..a32b97069cb16021bc3e7e620e06a8c5e47e072e --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/monitoring/test_utils.h @@ -0,0 +1,35 @@ +/* Copyright 2022 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ +#ifndef TENSORFLOW_CORE_LIB_MONITORING_TEST_UTILS_H_ +#define TENSORFLOW_CORE_LIB_MONITORING_TEST_UTILS_H_ + +#include + +#include "tensorflow/core/framework/summary.pb.h" +#include "tensorflow/core/lib/monitoring/types.h" +#include "tensorflow/core/platform/statusor.h" +#include "tsl/lib/monitoring/test_utils.h" +// NOLINTBEGIN(misc-unused-using-decls) +namespace tensorflow { +namespace monitoring { +namespace testing { +using tsl::monitoring::testing::Histogram; +using tsl::monitoring::testing::Percentiles; + +} // namespace testing +} // namespace monitoring +} // namespace tensorflow +// NOLINTEND(misc-unused-using-decls) +#endif // TENSORFLOW_CORE_LIB_MONITORING_TEST_UTILS_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/monitoring/timed.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/monitoring/timed.h new file mode 100644 index 0000000000000000000000000000000000000000..1b5600fa8c578bf92f151f4e08e62e856bf7057e --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/monitoring/timed.h @@ -0,0 +1,29 @@ +/* Copyright 2019 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_LIB_MONITORING_TIMED_H_ +#define TENSORFLOW_CORE_LIB_MONITORING_TIMED_H_ + +#include "tensorflow/core/platform/env_time.h" +#include "tsl/lib/monitoring/timed.h" +// NOLINTBEGIN(misc-unused-using-decls) +namespace tensorflow { +namespace monitoring { +using tsl::monitoring::MakeTimed; +using tsl::monitoring::Timed; +} // namespace monitoring +} // namespace tensorflow +// NOLINTEND(misc-unused-using-decls) +#endif // TENSORFLOW_CORE_LIB_MONITORING_TIMED_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/monitoring/types.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/monitoring/types.h new file mode 100644 index 0000000000000000000000000000000000000000..347951791a81634ee1ccdf416aa4dd1b42977b78 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/monitoring/types.h @@ -0,0 +1,35 @@ +/* Copyright 2019 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_LIB_MONITORING_TYPES_H_ +#define TENSORFLOW_CORE_LIB_MONITORING_TYPES_H_ + +#include +#include + +#include "tensorflow/core/platform/types.h" +#include "tsl/lib/monitoring/types.h" + +// NOLINTBEGIN(misc-unused-using-decls) +namespace tensorflow { +namespace monitoring { +using tsl::monitoring::PercentilePoint; +using tsl::monitoring::Percentiles; +using tsl::monitoring::UnitOfMeasure; + +} // namespace monitoring +} // namespace tensorflow +// NOLINTEND(misc-unused-using-decls) +#endif // TENSORFLOW_CORE_LIB_MONITORING_TYPES_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/png/png_io.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/png/png_io.h new file mode 100644 index 0000000000000000000000000000000000000000..8afce9385a10b7ff925ad94fd97d885587d7c0ea --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/png/png_io.h @@ -0,0 +1,116 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +// Functions to read and write images in PNG format. +// +// The advantage over image/codec/png{enc,dec}ocder.h is that this library +// supports both 8 and 16 bit images. +// +// The decoding routine accepts binary image data as a StringPiece. These are +// implicitly constructed from strings or char* so they're completely +// transparent to the caller. They're also very cheap to construct so this +// doesn't introduce any additional overhead. +// +// The primary benefit of StringPieces being, in this case, that APIs already +// returning StringPieces (e.g., Bigtable Scanner) or Cords (e.g., IOBuffer; +// only when they're flat, though) or protocol buffer fields typed to either of +// these can be decoded without copying the data into a C++ string. + +#ifndef TENSORFLOW_CORE_LIB_PNG_PNG_IO_H_ +#define TENSORFLOW_CORE_LIB_PNG_PNG_IO_H_ + +#include +#include +#include + +#include "absl/base/casts.h" +#include "tensorflow/core/platform/png.h" +#include "tensorflow/core/platform/stringpiece.h" +#include "tensorflow/core/platform/types.h" + +namespace tensorflow { +namespace png { + +// Handy container for decoding informations and struct pointers +struct DecodeContext { + const uint8* data; + int data_left; + png_structp png_ptr; + png_infop info_ptr; + png_uint_32 width, height; + int num_passes; + int color_type; + int bit_depth; + int channels; + bool need_to_synthesize_16; + bool error_condition; + DecodeContext() : png_ptr(nullptr), info_ptr(nullptr) {} +}; + +bool DecodeHeader(StringPiece png_string, int* width, int* height, + int* components, int* channel_bit_depth, + std::vector >* metadata); + +// Sample usage for reading PNG: +// +// string png_string; /* fill with input PNG format data */ +// DecodeContext context; +// CHECK(CommonInitDecode(png_string, 3 /*RGB*/, 8 /*uint8*/, &context)); +// char* image_buffer = new char[3*context.width*context.height]; +// CHECK(CommonFinishDecode(absl::bit_cast(image_buffer), +// 3*context.width /*stride*/, &context)); +// +// desired_channels may be 0 to detected it from the input. + +bool CommonInitDecode(StringPiece png_string, int desired_channels, + int desired_channel_bits, DecodeContext* context); + +bool CommonFinishDecode(png_bytep data, int row_bytes, DecodeContext* context); + +// Normally called automatically from CommonFinishDecode. If CommonInitDecode +// is called but not CommonFinishDecode, call this to clean up. Safe to call +// extra times. +void CommonFreeDecode(DecodeContext* context); + +// Sample usage for writing PNG: +// +// uint16* image_buffer = new uint16[width*height]; /* fill with pixels */ +// string png_string; +// CHECK(WriteImageToBuffer(image_buffer, width, height, 2*width /*stride*/, +// 1 /*gray*/, 16 /*uint16*/, &png_string, NULL)); +// +// compression is in [-1,9], where 0 is fast and weak compression, 9 is slow +// and strong, and -1 is the zlib default. + +template +bool WriteImageToBuffer( + const void* image, int width, int height, int row_bytes, int num_channels, + int channel_bits, int compression, T* png_string, + const std::vector >* metadata); + +// Explicit instantiations defined in png_io.cc. +extern template bool WriteImageToBuffer( + const void* image, int width, int height, int row_bytes, int num_channels, + int channel_bits, int compression, std::string* png_string, + const std::vector >* metadata); +extern template bool WriteImageToBuffer( + const void* image, int width, int height, int row_bytes, int num_channels, + int channel_bits, int compression, tstring* png_string, + const std::vector >* metadata); + +} // namespace png +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_LIB_PNG_PNG_IO_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/random/distribution_sampler.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/random/distribution_sampler.h new file mode 100644 index 0000000000000000000000000000000000000000..585def64e91b738857e9a8ef1d6098aed7d74883 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/random/distribution_sampler.h @@ -0,0 +1,47 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +// DistributionSampler allows generating a discrete random variable with a given +// distribution. +// The values taken by the variable are [0, N) and relative weights for each +// value are specified using a vector of size N. +// +// The Algorithm takes O(N) time to precompute data at construction time and +// takes O(1) time (2 random number generation, 2 lookups) for each sample. +// The data structure takes O(N) memory. +// +// In contrast, util/random/weighted-picker.h provides O(lg N) sampling. +// The advantage of that implementation is that weights can be adjusted +// dynamically, while DistributionSampler doesn't allow weight adjustment. +// +// The algorithm used is Walker's Aliasing algorithm, described in Knuth, Vol 2. + +#ifndef TENSORFLOW_CORE_LIB_RANDOM_DISTRIBUTION_SAMPLER_H_ +#define TENSORFLOW_CORE_LIB_RANDOM_DISTRIBUTION_SAMPLER_H_ + +#include "tensorflow/core/lib/gtl/array_slice.h" +#include "tensorflow/core/lib/random/simple_philox.h" +#include "tensorflow/core/platform/logging.h" +#include "tensorflow/core/platform/macros.h" +#include "tensorflow/core/platform/types.h" +#include "tsl/lib/random/distribution_sampler.h" + +namespace tensorflow { +namespace random { +using tsl::random::DistributionSampler; // NOLINT(misc-unused-using-decls) +} // namespace random +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_LIB_RANDOM_DISTRIBUTION_SAMPLER_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/random/exact_uniform_int.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/random/exact_uniform_int.h new file mode 100644 index 0000000000000000000000000000000000000000..5f02c664b74f0bae68c919b5525f2b9d838f02d7 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/random/exact_uniform_int.h @@ -0,0 +1,29 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +// Exact uniform integers using rejection sampling + +#ifndef TENSORFLOW_CORE_LIB_RANDOM_EXACT_UNIFORM_INT_H_ +#define TENSORFLOW_CORE_LIB_RANDOM_EXACT_UNIFORM_INT_H_ + +#include "tsl/lib/random/exact_uniform_int.h" + +namespace tensorflow { +namespace random { +using tsl::random::ExactUniformInt; // NOLINT(misc-unused-using-decls) +} // namespace random +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_LIB_RANDOM_EXACT_UNIFORM_INT_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/random/philox_random.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/random/philox_random.h new file mode 100644 index 0000000000000000000000000000000000000000..c2d44ecfd541de9c77a8b8eaced47e721502b6cf --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/random/philox_random.h @@ -0,0 +1,35 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +// Implement the Philox algorithm to generate random numbers in parallel. +// Salmon et al. SC 2011. Parallel random numbers: as easy as 1, 2, 3. +// http://www.thesalmons.org/john/random123/papers/random123sc11.pdf + +#ifndef TENSORFLOW_CORE_LIB_RANDOM_PHILOX_RANDOM_H_ +#define TENSORFLOW_CORE_LIB_RANDOM_PHILOX_RANDOM_H_ + +#include "tsl/lib/random/philox_random.h" + +namespace tensorflow { +namespace random { +// NOLINTBEGIN(misc-unused-using-decls) +using tsl::random::Array; +using tsl::random::PhiloxRandom; +// NOLINTEND(misc-unused-using-decls) + +} // namespace random +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_LIB_RANDOM_PHILOX_RANDOM_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/random/random.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/random/random.h new file mode 100644 index 0000000000000000000000000000000000000000..78dedde0268f9a75da39e3b219602dba5426a92f --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/random/random.h @@ -0,0 +1,21 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_LIB_RANDOM_RANDOM_H_ +#define TENSORFLOW_CORE_LIB_RANDOM_RANDOM_H_ + +#include "tensorflow/core/platform/random.h" + +#endif // TENSORFLOW_CORE_LIB_RANDOM_RANDOM_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/random/random_distributions.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/random/random_distributions.h new file mode 100644 index 0000000000000000000000000000000000000000..0a9e4f94f3d72d83a6ae0717b9a4d5517d7bbc77 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/random/random_distributions.h @@ -0,0 +1,41 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_LIB_RANDOM_RANDOM_DISTRIBUTIONS_H_ +#define TENSORFLOW_CORE_LIB_RANDOM_RANDOM_DISTRIBUTIONS_H_ + +#include "unsupported/Eigen/CXX11/Tensor" // from @eigen_archive +#include "tensorflow/core/lib/random/philox_random.h" +#include "tensorflow/core/lib/random/random_distributions_utils.h" +#include "tensorflow/core/platform/types.h" +#include "tsl/lib/random/random_distributions.h" + +namespace tensorflow { +namespace random { +// NOLINTBEGIN(misc-unused-using-decls) +using tsl::random::BoxMullerDouble; +using tsl::random::NormalDistribution; +using tsl::random::SignedAdd; +using tsl::random::SingleSampleAdapter; +using tsl::random::TruncatedNormalDistribution; +using tsl::random::Uint16ToGfloat16; +using tsl::random::Uint16ToHalf; +using tsl::random::UniformDistribution; +using tsl::random::UniformFullIntDistribution; +// NOLINTEND(misc-unused-using-decls) +} // namespace random +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_LIB_RANDOM_RANDOM_DISTRIBUTIONS_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/random/random_distributions_utils.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/random/random_distributions_utils.h new file mode 100644 index 0000000000000000000000000000000000000000..4b7267031bdd86a45463236f531e70bd1d1a6a33 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/random/random_distributions_utils.h @@ -0,0 +1,36 @@ +/* Copyright 2021 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_LIB_RANDOM_RANDOM_DISTRIBUTIONS_UTILS_H_ +#define TENSORFLOW_CORE_LIB_RANDOM_RANDOM_DISTRIBUTIONS_UTILS_H_ + +#include + +#include + +#include "tensorflow/core/lib/random/philox_random.h" +#include "tsl/lib/random/random_distributions_utils.h" + +namespace tensorflow { +namespace random { +// NOLINTBEGIN(misc-unused-using-decls) +using tsl::random::BoxMullerFloat; +using tsl::random::Uint32ToFloat; +using tsl::random::Uint64ToDouble; +// NOLINTEND(misc-unused-using-decls) +} // namespace random +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_LIB_RANDOM_RANDOM_DISTRIBUTIONS_UTILS_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/random/simple_philox.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/random/simple_philox.h new file mode 100644 index 0000000000000000000000000000000000000000..fa7f49ebecfaafea4ceb85c67435c6a680f1ea4f --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/random/simple_philox.h @@ -0,0 +1,29 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_LIB_RANDOM_SIMPLE_PHILOX_H_ +#define TENSORFLOW_CORE_LIB_RANDOM_SIMPLE_PHILOX_H_ + +#include "tensorflow/core/lib/random/philox_random.h" +#include "tensorflow/core/lib/random/random_distributions.h" +#include "tsl/lib/random/simple_philox.h" + +namespace tensorflow { +namespace random { +using tsl::random::SimplePhilox; // NOLINT(misc-unused-using-decls) +} // namespace random +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_LIB_RANDOM_SIMPLE_PHILOX_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/random/weighted_picker.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/random/weighted_picker.h new file mode 100644 index 0000000000000000000000000000000000000000..58d4198ae97d4a6d49ce1c8b5f1de7757b5c950d --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/random/weighted_picker.h @@ -0,0 +1,43 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +// An abstraction to pick from one of N elements with a specified +// weight per element. +// +// The weight for a given element can be changed in O(lg N) time +// An element can be picked in O(lg N) time. +// +// Uses O(N) bytes of memory. +// +// Alternative: distribution-sampler.h allows O(1) time picking, but no weight +// adjustment after construction. + +#ifndef TENSORFLOW_CORE_LIB_RANDOM_WEIGHTED_PICKER_H_ +#define TENSORFLOW_CORE_LIB_RANDOM_WEIGHTED_PICKER_H_ + +#include + +#include "tensorflow/core/platform/logging.h" +#include "tensorflow/core/platform/macros.h" +#include "tensorflow/core/platform/types.h" +#include "tsl/lib/random/weighted_picker.h" + +namespace tensorflow { +namespace random { +using tsl::random::WeightedPicker; // NOLINT(misc-unused-using-decls) +} // namespace random +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_LIB_RANDOM_WEIGHTED_PICKER_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/strings/base64.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/strings/base64.h new file mode 100644 index 0000000000000000000000000000000000000000..bb7cbfb3777019a48c4a47f36b3d4c0f60d5855c --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/strings/base64.h @@ -0,0 +1,21 @@ +/* Copyright 2016 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_LIB_STRINGS_BASE64_H_ +#define TENSORFLOW_CORE_LIB_STRINGS_BASE64_H_ + +#include "tensorflow/core/platform/base64.h" + +#endif // TENSORFLOW_CORE_LIB_STRINGS_BASE64_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/strings/numbers.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/strings/numbers.h new file mode 100644 index 0000000000000000000000000000000000000000..cbc53d47a8ff54f1810907482c60ee7f56df81d5 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/strings/numbers.h @@ -0,0 +1,21 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_LIB_STRINGS_NUMBERS_H_ +#define TENSORFLOW_CORE_LIB_STRINGS_NUMBERS_H_ + +#include "tensorflow/core/platform/numbers.h" + +#endif // TENSORFLOW_CORE_LIB_STRINGS_NUMBERS_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/strings/ordered_code.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/strings/ordered_code.h new file mode 100644 index 0000000000000000000000000000000000000000..bfccfc54938d7a4b8fa9ce6c3095714f4562a0e2 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/strings/ordered_code.h @@ -0,0 +1,95 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +// This module provides routines for encoding a sequence of typed +// entities into a string. The resulting strings can be +// lexicographically compared to yield the same comparison value that +// would have been generated if the encoded items had been compared +// one by one according to their type. +// +// More precisely, suppose: +// 1. string A is generated by encoding the sequence of items [A_1..A_n] +// 2. string B is generated by encoding the sequence of items [B_1..B_n] +// 3. The types match; i.e., for all i: A_i was encoded using +// the same routine as B_i +// Then: +// Comparing A vs. B lexicographically is the same as comparing +// the vectors [A_1..A_n] and [B_1..B_n] lexicographically. +// +// Furthermore, if n < m, the encoding of [A_1..A_n] is a strict prefix of +// [A_1..A_m] (unless m = n+1 and A_m is the empty string encoded with +// WriteTrailingString, in which case the encodings are equal). +// +// This module is often useful when generating multi-part sstable +// keys that have to be ordered in a particular fashion. + +#ifndef TENSORFLOW_CORE_LIB_STRINGS_ORDERED_CODE_H_ +#define TENSORFLOW_CORE_LIB_STRINGS_ORDERED_CODE_H_ + +#include + +#include "tensorflow/core/platform/macros.h" +#include "tensorflow/core/platform/stringpiece.h" +#include "tensorflow/core/platform/types.h" + +namespace tensorflow { + +namespace strings { + +class OrderedCode { + public: + // ------------------------------------------------------------------- + // Encoding routines: each one of the following routines append + // one item to "*dest" in an encoding where larger values are + // ordered lexicographically after smaller values. + static void WriteString(string* dest, StringPiece str); + static void WriteNumIncreasing(string* dest, uint64 num); + static void WriteSignedNumIncreasing(string* dest, int64_t num); + + // ------------------------------------------------------------------- + // Decoding routines: these extract an item earlier encoded using + // the corresponding WriteXXX() routines above. The item is read + // from "*src"; "*src" is modified to point past the decoded item; + // and if "result" is non-NULL, "*result" is modified to contain the + // result. In case of string result, the decoded string is appended to + // "*result". Returns true if the next item was read successfully, false + // otherwise. + static bool ReadString(StringPiece* src, string* result); + static bool ReadNumIncreasing(StringPiece* src, uint64* result); + static bool ReadSignedNumIncreasing(StringPiece* src, int64_t* result); + + // Helper for testing: corrupt "*str" by changing the kth item separator + // in the string. + static void TEST_Corrupt(string* str, int k); + + // Helper for testing. + // SkipToNextSpecialByte is an internal routine defined in the .cc file + // with the following semantics. Return a pointer to the first byte + // in the range "[start..limit)" whose value is 0 or 255. If no such + // byte exists in the range, returns "limit". + static const char* TEST_SkipToNextSpecialByte(const char* start, + const char* limit); + + private: + // This has only static methods, so disallow construction entirely + OrderedCode(); + OrderedCode(const OrderedCode&) = delete; + void operator=(const OrderedCode&) = delete; +}; + +} // namespace strings +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_LIB_STRINGS_ORDERED_CODE_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/strings/proto_serialization.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/strings/proto_serialization.h new file mode 100644 index 0000000000000000000000000000000000000000..0c01708dadf4b246811b273bd00529d9321d9386 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/strings/proto_serialization.h @@ -0,0 +1,29 @@ +/* Copyright 2018 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ +#ifndef TENSORFLOW_CORE_LIB_STRINGS_PROTO_SERIALIZATION_H_ +#define TENSORFLOW_CORE_LIB_STRINGS_PROTO_SERIALIZATION_H_ + +#include "tsl/lib/strings/proto_serialization.h" + +namespace tensorflow { +// NOLINTBEGIN(misc-unused-using-decls) +using ::tsl::AreSerializedProtosEqual; +using ::tsl::DeterministicProtoHash64; +using ::tsl::SerializeToBufferDeterministic; +using ::tsl::SerializeToStringDeterministic; +// NOLINTEND(misc-unused-using-decls) +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_LIB_STRINGS_PROTO_SERIALIZATION_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/strings/proto_text_util.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/strings/proto_text_util.h new file mode 100644 index 0000000000000000000000000000000000000000..44559578da02e9973aca165dac1f8314fb980521 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/strings/proto_text_util.h @@ -0,0 +1,169 @@ +/* Copyright 2016 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_LIB_STRINGS_PROTO_TEXT_UTIL_H_ +#define TENSORFLOW_CORE_LIB_STRINGS_PROTO_TEXT_UTIL_H_ + +#include "absl/strings/str_cat.h" +#include "tensorflow/core/lib/strings/scanner.h" +#include "tensorflow/core/platform/macros.h" +#include "tensorflow/core/platform/numbers.h" +#include "tensorflow/core/platform/protobuf.h" +#include "tensorflow/core/platform/str_util.h" +#include "tensorflow/core/platform/strcat.h" + +namespace tensorflow { +namespace strings { + +static constexpr char kColonSeparator[] = ": "; + +// Helper functions for writing proto-text output. +// Used by the code generated from tools/proto_text/gen_proto_text_lib.cc. +class ProtoTextOutput { + public: + // Construct a ProtoTextOutput that writes to If short_debug is true, + // outputs text to match proto.ShortDebugString(); else matches + // proto.DebugString(). + ProtoTextOutput(string* output, bool short_debug) + : output_(output), + short_debug_(short_debug), + field_separator_(short_debug ? " " : "\n") {} + + // Writes opening of nested message and increases indent level. + void OpenNestedMessage(const char field_name[]) { + StrAppend(output_, level_empty_ ? "" : field_separator_, indent_, + field_name, " {", field_separator_); + if (!short_debug_) StrAppend(&indent_, " "); + level_empty_ = true; + } + + // Writes close of nested message and decreases indent level. + void CloseNestedMessage() { + if (!short_debug_) indent_.resize(indent_.size() - 2); + StrAppend(output_, level_empty_ ? "" : field_separator_, indent_, "}"); + level_empty_ = false; + } + + // Print the close of the top-level message that was printed. + void CloseTopMessage() { + if (!short_debug_ && !level_empty_) StrAppend(output_, "\n"); + } + + // Appends a numeric value, like my_field: 123 + template + void AppendNumeric(const char field_name[], T value) { + AppendFieldAndValue(field_name, StrCat(value)); + } + + // Appends a numeric value, like my_field: 123, but only if value != 0. + template + void AppendNumericIfNotZero(const char field_name[], T value) { + if (value != 0) AppendNumeric(field_name, value); + } + + // Appends a bool value, either my_field: true or my_field: false. + void AppendBool(const char field_name[], bool value) { + AppendFieldAndValue(field_name, value ? "true" : "false"); + } + + // Appends a bool value, as my_field: true, only if value is true. + void AppendBoolIfTrue(const char field_name[], bool value) { + if (value) AppendBool(field_name, value); + } + + // Appends a string value, like my_field: "abc123". + void AppendString(const char field_name[], const string& value) { + AppendFieldAndValue( + field_name, StrCat("\"", ::tensorflow::str_util::CEscape(value), "\"")); + } + + // Appends a string value, like my_field: "abc123", but only if value is not + // empty. + void AppendStringIfNotEmpty(const char field_name[], const string& value) { + if (!value.empty()) AppendString(field_name, value); + } + + // Appends the string name of an enum, like my_field: FIRST_ENUM. + void AppendEnumName(const char field_name[], const string& name) { + AppendFieldAndValue(field_name, name); + } + + private: + void AppendFieldAndValue(const char field_name[], StringPiece value_text) { + absl::StrAppend(output_, level_empty_ ? "" : field_separator_, indent_, + field_name, kColonSeparator, value_text); + level_empty_ = false; + } + + string* const output_; + const bool short_debug_; + const string field_separator_; + string indent_; + + // False when at least one field has been output for the message at the + // current deepest level of nesting. + bool level_empty_ = true; + + ProtoTextOutput(const ProtoTextOutput&) = delete; + void operator=(const ProtoTextOutput&) = delete; +}; + +inline void ProtoSpaceAndComments(Scanner* scanner) { + for (;;) { + scanner->AnySpace(); + if (scanner->Peek() != '#') return; + // Skip until newline. + while (scanner->Peek('\n') != '\n') scanner->One(Scanner::ALL); + } +} + +// Parse the next numeric value from , returning false if parsing +// failed. +template +bool ProtoParseNumericFromScanner(Scanner* scanner, T* value) { + StringPiece numeric_str; + scanner->RestartCapture(); + if (!scanner->Many(Scanner::LETTER_DIGIT_DOT_PLUS_MINUS) + .GetResult(nullptr, &numeric_str)) { + return false; + } + + // Special case to disallow multiple leading zeroes, to match proto parsing. + int leading_zero = 0; + for (size_t i = 0; i < numeric_str.size(); ++i) { + const char ch = numeric_str[i]; + if (ch == '0') { + if (++leading_zero > 1) return false; + } else if (ch != '-') { + break; + } + } + + ProtoSpaceAndComments(scanner); + return SafeStringToNumeric(numeric_str, value); +} + +// Parse the next boolean value from , returning false if parsing +// failed. +bool ProtoParseBoolFromScanner(Scanner* scanner, bool* value); + +// Parse the next string literal from , returning false if parsing +// failed. +bool ProtoParseStringLiteralFromScanner(Scanner* scanner, string* value); + +} // namespace strings +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_LIB_STRINGS_PROTO_TEXT_UTIL_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/strings/scanner.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/strings/scanner.h new file mode 100644 index 0000000000000000000000000000000000000000..c41e4475482764cf8e7b0f510f45aef3ebc3c1ba --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/strings/scanner.h @@ -0,0 +1,21 @@ +/* Copyright 2016 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_LIB_STRINGS_SCANNER_H_ +#define TENSORFLOW_CORE_LIB_STRINGS_SCANNER_H_ + +#include "tensorflow/core/platform/scanner.h" // IWYU pragma: export + +#endif // TENSORFLOW_CORE_LIB_STRINGS_SCANNER_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/strings/str_util.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/strings/str_util.h new file mode 100644 index 0000000000000000000000000000000000000000..a20cbdb58c9bebe70d5c1a0facadf6423a618f3d --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/strings/str_util.h @@ -0,0 +1,21 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_LIB_STRINGS_STR_UTIL_H_ +#define TENSORFLOW_CORE_LIB_STRINGS_STR_UTIL_H_ + +#include "tensorflow/core/platform/str_util.h" // IWYU pragma: export + +#endif // TENSORFLOW_CORE_LIB_STRINGS_STR_UTIL_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/strings/strcat.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/strings/strcat.h new file mode 100644 index 0000000000000000000000000000000000000000..d728231f37d796bfe74b562be1626ef0888430ee --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/strings/strcat.h @@ -0,0 +1,25 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +// #status: RECOMMENDED +// #category: operations on strings +// #summary: Merges strings or numbers with no delimiter. +// +#ifndef TENSORFLOW_CORE_LIB_STRINGS_STRCAT_H_ +#define TENSORFLOW_CORE_LIB_STRINGS_STRCAT_H_ + +#include "tensorflow/core/platform/strcat.h" // IWYU pragma: export + +#endif // TENSORFLOW_CORE_LIB_STRINGS_STRCAT_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/strings/stringprintf.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/strings/stringprintf.h new file mode 100644 index 0000000000000000000000000000000000000000..836632d786631c37d79ebc45b9d3418a52f6a497 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/strings/stringprintf.h @@ -0,0 +1,28 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +// Printf variants that place their output in a C++ string. +// +// Usage: +// string result = strings::Printf("%d %s\n", 10, "hello"); +// strings::SPrintf(&result, "%d %s\n", 10, "hello"); +// strings::Appendf(&result, "%d %s\n", 20, "there"); + +#ifndef TENSORFLOW_CORE_LIB_STRINGS_STRINGPRINTF_H_ +#define TENSORFLOW_CORE_LIB_STRINGS_STRINGPRINTF_H_ + +#include "tensorflow/core/platform/stringprintf.h" + +#endif // TENSORFLOW_CORE_LIB_STRINGS_STRINGPRINTF_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/wav/wav_io.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/wav/wav_io.h new file mode 100644 index 0000000000000000000000000000000000000000..f404b13db630307209029c188a9d7df78d478c99 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/lib/wav/wav_io.h @@ -0,0 +1,104 @@ +/* Copyright 2016 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +// Functions to write audio in WAV format. + +#ifndef TENSORFLOW_CORE_LIB_WAV_WAV_IO_H_ +#define TENSORFLOW_CORE_LIB_WAV_WAV_IO_H_ + +#include +#include + +#include "tensorflow/core/lib/core/coding.h" +#include "tensorflow/core/lib/core/errors.h" +#include "tensorflow/core/lib/core/status.h" +#include "tensorflow/core/platform/types.h" + +namespace tensorflow { +namespace wav { + +// Encode the provided interleaved buffer of audio as a signed 16-bit PCM +// little-endian WAV file. +// +// Example usage for 4 frames of an 8kHz stereo signal: +// First channel is -1, 1, -1, 1. +// Second channel is 0, 0, 0, 0. +// +// float audio_buffer[] = { -1.0f, 0.0f, 1.0f, 0.0f, -1.0f, 0.0f, 1.0f, 0.0f}; +// string wav_string; +// if (EncodeAudioAsS16LEWav(audio_buffer, 8000, 2, 4, &wav_string).ok()) { +// // Use wav_string. +// } +template +Status EncodeAudioAsS16LEWav(const float* audio, size_t sample_rate, + size_t num_channels, size_t num_frames, + T* wav_string); + +// Explicit instantiations defined in wav_io.cc. +extern template Status EncodeAudioAsS16LEWav( + const float* audio, size_t sample_rate, size_t num_channels, + size_t num_frames, std::string* wav_string); +extern template Status EncodeAudioAsS16LEWav(const float* audio, + size_t sample_rate, + size_t num_channels, + size_t num_frames, + tstring* wav_string); + +// Decodes the little-endian signed 16-bit PCM WAV file data (aka LIN16 +// encoding) into a float Tensor. The channels are encoded as the lowest +// dimension of the tensor, with the number of frames as the second. This means +// that a four frame stereo signal will have the shape [4, 2]. The sample rate +// is read from the file header, and an error is returned if the format is not +// supported. +// The results are output as floats within the range -1 to 1, +Status DecodeLin16WaveAsFloatVector(const std::string& wav_string, + std::vector* float_values, + uint32* sample_count, uint16* channel_count, + uint32* sample_rate); + +// Everything below here is only exposed publicly for testing purposes. + +// Handles moving the data index forward, validating the arguments, and avoiding +// overflow or underflow. +Status IncrementOffset(int old_offset, int64_t increment, size_t max_size, + int* new_offset); + +// This function is only exposed in the header for testing purposes, as a +// template that needs to be instantiated. Reads a typed numeric value from a +// stream of data. +template +Status ReadValue(const std::string& data, T* value, int* offset) { + int new_offset; + TF_RETURN_IF_ERROR( + IncrementOffset(*offset, sizeof(T), data.size(), &new_offset)); + if (port::kLittleEndian) { + memcpy(value, data.data() + *offset, sizeof(T)); + } else { + *value = 0; + const uint8* data_buf = + reinterpret_cast(data.data() + *offset); + int shift = 0; + for (int i = 0; i < sizeof(T); ++i, shift += 8) { + *value = *value | (data_buf[i] << shift); + } + } + *offset = new_offset; + return OkStatus(); +} + +} // namespace wav +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_LIB_WAV_WAV_IO_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/nccl/collective_communicator.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/nccl/collective_communicator.h new file mode 100644 index 0000000000000000000000000000000000000000..f746a9fea67de809294e168a490e0a22340eb06b --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/nccl/collective_communicator.h @@ -0,0 +1,29 @@ +/* Copyright 2020 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ +#ifndef TENSORFLOW_CORE_NCCL_COLLECTIVE_COMMUNICATOR_H_ +#define TENSORFLOW_CORE_NCCL_COLLECTIVE_COMMUNICATOR_H_ + +#include "tensorflow/core/framework/collective.h" + +namespace tensorflow { + +// Creates a NcclCommunicator if built with NCCL support (unless configured to +// use no GPU devices), otherwise it returns nullptr. +std::unique_ptr MaybeCreateNcclCommunicator( + const ConfigProto& config); + +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_NCCL_COLLECTIVE_COMMUNICATOR_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/nccl/nccl_manager.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/nccl/nccl_manager.h new file mode 100644 index 0000000000000000000000000000000000000000..0e62013949bc1ab1e608e48316534855d8ca4501 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/nccl/nccl_manager.h @@ -0,0 +1,283 @@ +/* Copyright 2016 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ +#ifndef TENSORFLOW_CORE_NCCL_NCCL_MANAGER_H_ +#define TENSORFLOW_CORE_NCCL_NCCL_MANAGER_H_ + +#if GOOGLE_CUDA || TENSORFLOW_USE_ROCM + +#include + +// TODO(rmlarsen): Get rid of this workaround. "gpu_assert" is defined when +// setting EIGEN_USE_THREADS. But when defining EIGEN_USE_THREADS here, +// incAtomic and other CUDA specific symbols are no longer recognized. +#ifndef gpu_assert +#define gpu_assert(x) +#endif + +#include "absl/container/flat_hash_map.h" +#if GOOGLE_CUDA +#include "third_party/nccl/nccl.h" +#elif TENSORFLOW_USE_ROCM +#include "rocm/rocm_config.h" +#if (TF_ROCM_VERSION >= 50200) +#include "rocm/include/rccl/rccl.h" +#else +#include "rocm/include/rccl.h" +#endif +#include "tensorflow/core/common_runtime/gpu_device_context.h" +#endif +#include "tensorflow/core/common_runtime/gpu/gpu_event_mgr.h" +#include "tensorflow/core/framework/device_base.h" +#include "tensorflow/core/framework/tensor.h" +#include "tensorflow/core/platform/mutex.h" +#include "tensorflow/core/platform/stream_executor.h" + +namespace tensorflow { + +// NCCL manager is used to make the asynchronous communicator calls and to +// manage the per-device streams used for communication. +// +// See nccl_ops.cc for example usage, including description of memory +// management and stream synchronization. +class NcclManager { + public: + typedef std::function DoneCallback; + NcclManager(); + ~NcclManager(); + + static NcclManager* instance(); + +#if TENSORFLOW_USE_ROCM + static int instance_count; +#endif + + // Calls `ncclGetUniqueId` and returns the id as a string. The returned value + // may be shared with other participants on different nodes and passed in to + // multi-node collective invocations. + string GenerateCommunicatorKey(); + + // A participant in a Collective. + struct Participant { + Participant(se::StreamExecutor* executor, se::Stream* tensor_stream, + const DeviceBase::AcceleratorDeviceInfo* info, + const Tensor* input, Tensor* output, int global_rank, + DoneCallback done_callback) + : executor(executor), + tensor_stream(tensor_stream), + event_mgr(info->event_mgr), + gpu_device_id(info->gpu_id), +#if TENSORFLOW_USE_ROCM + context(static_cast(info->default_context)), +#endif + input(input), + output(output), + global_rank(global_rank), + done_callback(std::move(done_callback)), + root(false) { + DCHECK(executor != nullptr); + DCHECK(event_mgr != nullptr); + DCHECK(tensor_stream != nullptr); + } + + // StreamExecutor for the device. Expected to be live for process lifetime. + se::StreamExecutor* const executor = nullptr; + + // `tensor_stream` is the stream that should be waited on to ensure + // `input`'s data is available on the GPU for the communication stream to + // access. It is also the stream that will use the produced data; + // `done_callback` is not called until the next kernel launched on `stream` + // would see the data. Owned by the caller, who must keep it live until + // `done_callback` is called. + se::Stream* const tensor_stream; + + // EventMgr which polls on executor. + // Owned by the caller, who must keep it live until `done_callback` is + // called. + EventMgr* const event_mgr; + + const int gpu_device_id; + +#if TENSORFLOW_USE_ROCM + GPUDeviceContext* const context; +#endif + + // Owned by the caller, who must keep it live until `done_callback` is + // called. Is NULL for participants that only receive data. + const Tensor* input; + + // Owned by the caller, who must keep it live until `done_callback` is + // called. Is NULL for participants that only send data. + Tensor* output; + + // Rank across all devices and all nodes. + // `global_rank` is not required for single-node collectives. + const int global_rank; + + // The callback which is called at the completion of the NCCL operation. + // When called, `output` has been set to the result of the operation. (note: + // the stream may not yet have been synced) + DoneCallback done_callback; + + // True if this is the root of the collective, e.g. source of broadcast. + bool root; + }; + + // Data that provides context for the collective operation, including the + // operation key, number of participants, and communicator key. + struct Context { + Context(const string& collective_key, int num_local_devices, + int num_global_devices, const string& communicator_key, + int source_rank) + : collective_key(collective_key), + num_local_devices(num_local_devices), + num_global_devices(num_global_devices), + communicator_key(communicator_key), + source_rank(source_rank) {} + + // Unique key for this collective instance + const string& collective_key; + + // Devices local to this node + int num_local_devices; + + // Devices across all nodes + int num_global_devices; + + // In order to use NCCL across nodes, the callee first has to generate a + // `communicator_key` via `GenerateCommunicatorKey()` function and share + // this with all the other nodes. Each node should pass in this + // `communicator_key` to the `NcclManager` functions. + // `communicator_key` is not required for single-node collectives and can be + // empty. + const string& communicator_key; + + // Rank of broadcast source. + int source_rank; + }; + + // Adds one participant to an all-reduce. + void AddToAllReduce(std::unique_ptr participant, + const Context& context, ncclRedOp_t reduction_op); + + // Adds one participant to an all-gather. + void AddToAllGather(std::unique_ptr participant, + const Context& context); + + // Adds one participant to a reduce-scatter. + void AddToReduceScatter(std::unique_ptr participant, + const Context& context, ncclRedOp_t reduction_op); + + // AddBroadcastSend and AddBroadcastRecv combine to send data from one sender + // to all receivers. + void AddBroadcastSend(std::unique_ptr participant, + const Context& context); + void AddBroadcastRecv(std::unique_ptr participant, + const Context& context); + + // AddReduceSend and AddReduceRecv combine to send data from all senders + // to one receiver. + void AddReduceSend(std::unique_ptr participant, + const Context& context, ncclRedOp_t reduction_op); + void AddReduceRecv(std::unique_ptr participant, + const Context& context, ncclRedOp_t reduction_op); + + // Adds one participant to an all-to-all. + void AddToAllToAll(std::unique_ptr participant, + const Context& context); + + // Signals that the `Collective` corresponding to `key` is ready to launch + // across all nodes participating in this multi-node collective operation. + // + // This should only be called for multi-node collectives; single-node + // collectives are implicitly ready when all participants have called Add* + // function. + void SignalMultiNodeReady(const string& collective_key); + + // Aborts all collectives. After abortion, no further collectives can be + // launched with this NcclManager. + void StartAbort(const Status& s); + + // Resets a previously aborted NcclManager, making it available for future + // collectives. + void Reset(); + + private: + enum CollectiveType { + kAllReduce = 1, + kBroadcast = 2, + kReduce = 3, + kAllGather = 4, + kReduceScatter = 5, + kAllToAll = 6, + }; + struct Collective; + struct Communicator; + struct CommunicatorMember; + struct NcclStream; + + // Gets the `Communicator` object that will be used to enqueue NCCL kernels + // for `collective`, and returns it via `communicator`. + // + // This may involve creating CUDA streams and NCCL initialization. If a NCCL + // or CUDA error occurs in the process, this returns an INTERNAL error with + // the corresponding NCCL/CUDA error string. + Status GetCommunicator(Collective* collective, Communicator** communicator); + + // Adds a participant device to the local `Collective` instance corresponding + // to `collective_key`. Launches the `Collective` if it is ready, which it + // checks by calling `CheckReady()`. Also performs consistency and sanity + // checks before launching. + void AddParticipant(std::unique_ptr participant, + const Context& context, CollectiveType collective_type, + ncclRedOp_t reduction_op); + + // If `collective` is ready to run, removes it from the `collectives_` map and + // returns true. Otherwise returns false. + // Assumes `collective_key` corresponds to `collective`. + // + // A collective is ready to run when all local participants have called Add* + // function, and the collective is signalled globally ready via + // `SetMultiNodeReady`. + bool CheckReady(const string& collective_key, Collective* collective) + TF_EXCLUSIVE_LOCKS_REQUIRED(mu_); + + // Run . This calls takes ownership of . + void RunCollective(Collective* collective); + void LoopKernelLaunches(NcclStream* stream); + + mutex mu_; + + // Maps key to collectives currently being assembled or run. + absl::flat_hash_map collectives_ TF_GUARDED_BY(mu_); + + // Maps a device to the communication streams that make up its collective. + // This is used to share the stream across different communicators that + // include the same device. + absl::flat_hash_map> + device_to_comm_streams_ TF_GUARDED_BY(mu_); + + std::vector> communicators_ TF_GUARDED_BY(mu_); + + Status status_ TF_GUARDED_BY(mu_); + + NcclManager(const NcclManager&) = delete; + void operator=(const NcclManager&) = delete; +}; + +} // namespace tensorflow + +#endif // GOOGLE_CUDA || TENSORFLOW_USE_ROCM + +#endif // TENSORFLOW_CORE_NCCL_NCCL_MANAGER_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/abi.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/abi.h new file mode 100644 index 0000000000000000000000000000000000000000..8191011a2c39718848a2d26836a925a423fa9090 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/abi.h @@ -0,0 +1,29 @@ +/* Copyright 2017 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_PLATFORM_ABI_H_ +#define TENSORFLOW_CORE_PLATFORM_ABI_H_ + +#include "tsl/platform/abi.h" + +namespace tensorflow { +namespace port { + +using ::tsl::port::MaybeAbiDemangle; // NOLINT(misc-unused-using-decls) + +} // namespace port +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_PLATFORM_ABI_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/base64.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/base64.h new file mode 100644 index 0000000000000000000000000000000000000000..126455fc0973aa74882dd212f32bbb5d643c5b83 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/base64.h @@ -0,0 +1,32 @@ +/* Copyright 2016 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_PLATFORM_BASE64_H_ +#define TENSORFLOW_CORE_PLATFORM_BASE64_H_ + +#include + +#include "tensorflow/core/platform/status.h" +#include "tensorflow/core/platform/stringpiece.h" +#include "tsl/platform/base64.h" + +namespace tensorflow { + +using tsl::Base64Decode; // NOLINT +using tsl::Base64Encode; // NOLINT + +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_PLATFORM_BASE64_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/bfloat16.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/bfloat16.h new file mode 100644 index 0000000000000000000000000000000000000000..d6091aa26a4e5ce80cf99e1c5cefedd4f1105d8f --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/bfloat16.h @@ -0,0 +1,28 @@ +/* Copyright 2020 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_PLATFORM_BFLOAT16_H_ +#define TENSORFLOW_CORE_PLATFORM_BFLOAT16_H_ + +// clang-format off +#include "tensorflow/core/platform/byte_order.h" +#include "tsl/platform/bfloat16.h" +// clang-format on + +namespace tensorflow { +typedef tsl::bfloat16 bfloat16; +} // end namespace tensorflow + +#endif // TENSORFLOW_CORE_PLATFORM_BFLOAT16_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/blocking_counter.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/blocking_counter.h new file mode 100644 index 0000000000000000000000000000000000000000..4e629804b13f517948987980e24f9c55b8e13325 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/blocking_counter.h @@ -0,0 +1,29 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_PLATFORM_BLOCKING_COUNTER_H_ +#define TENSORFLOW_CORE_PLATFORM_BLOCKING_COUNTER_H_ + +#include + +#include "tensorflow/core/platform/logging.h" +#include "tensorflow/core/platform/mutex.h" +#include "tsl/platform/blocking_counter.h" + +namespace tensorflow { +using tsl::BlockingCounter; // NOLINT +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_PLATFORM_BLOCKING_COUNTER_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/byte_order.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/byte_order.h new file mode 100644 index 0000000000000000000000000000000000000000..f6e1d17233657619d08352e25e59a33770cd75db --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/byte_order.h @@ -0,0 +1,29 @@ +/* Copyright 2018 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_PLATFORM_BYTE_ORDER_H_ +#define TENSORFLOW_CORE_PLATFORM_BYTE_ORDER_H_ + +#include "tsl/platform/byte_order.h" + +namespace tensorflow { +namespace port { + +constexpr bool kLittleEndian = tsl::port::kLittleEndian; + +} // namespace port +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_PLATFORM_BYTE_ORDER_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/casts.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/casts.h new file mode 100644 index 0000000000000000000000000000000000000000..791ac0953302aecdefa45fb7f74aff116a6faab2 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/casts.h @@ -0,0 +1,21 @@ +/* Copyright 2020 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_PLATFORM_CASTS_H_ +#define TENSORFLOW_CORE_PLATFORM_CASTS_H_ + +#include "tsl/platform/casts.h" + +#endif // TENSORFLOW_CORE_PLATFORM_CASTS_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/coding.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/coding.h new file mode 100644 index 0000000000000000000000000000000000000000..091d7544ff7c2825f5d8110f57fe721dd7419e92 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/coding.h @@ -0,0 +1,54 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +// Endian-neutral encoding: +// * Fixed-length numbers are encoded with least-significant byte first +// * In addition we support variable length "varint" encoding +// * Strings are encoded prefixed by their length in varint format + +#ifndef TENSORFLOW_CORE_PLATFORM_CODING_H_ +#define TENSORFLOW_CORE_PLATFORM_CODING_H_ + +#include "tensorflow/core/platform/raw_coding.h" +#include "tensorflow/core/platform/stringpiece.h" +#include "tensorflow/core/platform/types.h" +#include "tsl/platform/coding.h" + +namespace tensorflow { +namespace core { +// NOLINTBEGIN(misc-unused-using-decls) +using tsl::core::EncodeFixed16; +using tsl::core::EncodeFixed32; +using tsl::core::EncodeFixed64; +using tsl::core::EncodeVarint32; +using tsl::core::EncodeVarint64; +using tsl::core::GetVarint32; +using tsl::core::GetVarint32Ptr; +using tsl::core::GetVarint32PtrFallback; +using tsl::core::GetVarint64; +using tsl::core::GetVarint64Ptr; +using tsl::core::kMaxVarint32Bytes; +using tsl::core::kMaxVarint64Bytes; +using tsl::core::PutFixed16; +using tsl::core::PutFixed32; +using tsl::core::PutFixed64; +using tsl::core::PutVarint32; +using tsl::core::PutVarint64; +using tsl::core::VarintLength; +// NOLINTEND(misc-unused-using-decls) +} // namespace core +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_PLATFORM_CODING_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/context.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/context.h new file mode 100644 index 0000000000000000000000000000000000000000..f93b56956dc6a517830dd0367a509380b2e22631 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/context.h @@ -0,0 +1,32 @@ +/* Copyright 2016 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_PLATFORM_CONTEXT_H_ +#define TENSORFLOW_CORE_PLATFORM_CONTEXT_H_ + +#include "tensorflow/core/platform/platform.h" +#include "tsl/platform/context.h" + +namespace tensorflow { + +// NOLINTBEGIN(misc-unused-using-decls) +using tsl::Context; +using tsl::ContextKind; +using tsl::WithContext; +// NOLINTEND(misc-unused-using-decls) + +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_PLATFORM_CONTEXT_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/cord.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/cord.h new file mode 100644 index 0000000000000000000000000000000000000000..fa7d2a5dc2ef9de24ad45040143f689d6f52de7f --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/cord.h @@ -0,0 +1,21 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_PLATFORM_CORD_H_ +#define TENSORFLOW_CORE_PLATFORM_CORD_H_ + +#include "tsl/platform/cord.h" // IWYU pragma: export + +#endif // TENSORFLOW_CORE_PLATFORM_CORD_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/cpu_feature_guard.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/cpu_feature_guard.h new file mode 100644 index 0000000000000000000000000000000000000000..3d7bfe95b1c35063c784f4604237dd20f446451a --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/cpu_feature_guard.h @@ -0,0 +1,32 @@ +/* Copyright 2017 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_PLATFORM_CPU_FEATURE_GUARD_H_ +#define TENSORFLOW_CORE_PLATFORM_CPU_FEATURE_GUARD_H_ + +namespace tensorflow { +namespace port { + +// Called by the framework when we expect heavy CPU computation and we want to +// be sure that the code has been compiled to run optimally on the current +// hardware. The first time it's called it will run lightweight checks of +// available SIMD acceleration features and log warnings about any that aren't +// used. +void InfoAboutUnusedCPUFeatures(); + +} // namespace port +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_PLATFORM_CPU_FEATURE_GUARD_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/cpu_info.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/cpu_info.h new file mode 100644 index 0000000000000000000000000000000000000000..c5584c3bc4107e67bc7c1b2db36afedf720f84f6 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/cpu_info.h @@ -0,0 +1,90 @@ +/* Copyright 2016 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_PLATFORM_CPU_INFO_H_ +#define TENSORFLOW_CORE_PLATFORM_CPU_INFO_H_ + +#include + +// TODO(ahentz): This is not strictly required here but, for historical +// reasons, many people depend on cpu_info.h in order to use kLittleEndian. +#include "tensorflow/core/platform/byte_order.h" +#include "tsl/platform/cpu_info.h" + +namespace tensorflow { +namespace port { +using tsl::port::Aarch64CPU; +using tsl::port::ADX; +using tsl::port::AES; +using tsl::port::AMX_BF16; +using tsl::port::AMX_INT8; +using tsl::port::AMX_TILE; +using tsl::port::AVX; +using tsl::port::AVX2; +using tsl::port::AVX512_4FMAPS; +using tsl::port::AVX512_4VNNIW; +using tsl::port::AVX512_BF16; +using tsl::port::AVX512_VNNI; +using tsl::port::AVX512BW; +using tsl::port::AVX512CD; +using tsl::port::AVX512DQ; +using tsl::port::AVX512ER; +using tsl::port::AVX512F; +using tsl::port::AVX512IFMA; +using tsl::port::AVX512PF; +using tsl::port::AVX512VBMI; +using tsl::port::AVX512VL; +using tsl::port::AVX_VNNI; +using tsl::port::BMI1; +using tsl::port::BMI2; +using tsl::port::CMOV; +using tsl::port::CMPXCHG16B; +using tsl::port::CMPXCHG8B; +using tsl::port::CPUFamily; +using tsl::port::CPUFeature; +using tsl::port::CPUIDNumSMT; +using tsl::port::CPUModelNum; +using tsl::port::CPUVendorIDString; +using tsl::port::F16C; +using tsl::port::FMA; +using tsl::port::GetCurrentCPU; +using tsl::port::HYPERVISOR; +using tsl::port::kUnknownCPU; +using tsl::port::MaxParallelism; +using tsl::port::MMX; +using tsl::port::NominalCPUFrequency; +using tsl::port::NumHyperthreadsPerCore; +using tsl::port::NumSchedulableCPUs; +using tsl::port::NumTotalCPUs; +using tsl::port::PCLMULQDQ; +using tsl::port::POPCNT; +using tsl::port::PREFETCHW; +using tsl::port::PREFETCHWT1; +using tsl::port::RDRAND; +using tsl::port::RDSEED; +using tsl::port::SMAP; +using tsl::port::SSE; +using tsl::port::SSE2; +using tsl::port::SSE3; +using tsl::port::SSE4_1; +using tsl::port::SSE4_2; +using tsl::port::SSSE3; +using tsl::port::TestAarch64CPU; +using tsl::port::TestCPUFeature; + +} // namespace port +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_PLATFORM_CPU_INFO_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/crash_analysis.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/crash_analysis.h new file mode 100644 index 0000000000000000000000000000000000000000..c4555ee9f9bddb8bdb8c76f642e62db92b822d7c --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/crash_analysis.h @@ -0,0 +1,22 @@ +/* Copyright 2021 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_PLATFORM_CRASH_ANALYSIS_H_ +#define TENSORFLOW_CORE_PLATFORM_CRASH_ANALYSIS_H_ + +#include "tensorflow/core/platform/platform.h" +#include "tsl/platform/crash_analysis.h" + +#endif // TENSORFLOW_CORE_PLATFORM_CRASH_ANALYSIS_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/ctstring.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/ctstring.h new file mode 100644 index 0000000000000000000000000000000000000000..3b9359d4752840e8d321e4866c9ad2c460155419 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/ctstring.h @@ -0,0 +1,21 @@ +/* Copyright 2019 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_PLATFORM_CTSTRING_H_ +#define TENSORFLOW_CORE_PLATFORM_CTSTRING_H_ + +#include "tsl/platform/ctstring.h" + +#endif // TENSORFLOW_CORE_PLATFORM_CTSTRING_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/ctstring_internal.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/ctstring_internal.h new file mode 100644 index 0000000000000000000000000000000000000000..c087dbcaad70a5f1850a98d10453f87745f8ffd8 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/ctstring_internal.h @@ -0,0 +1,21 @@ +/* Copyright 2019 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_PLATFORM_CTSTRING_INTERNAL_H_ +#define TENSORFLOW_CORE_PLATFORM_CTSTRING_INTERNAL_H_ + +#include "tsl/platform/ctstring_internal.h" + +#endif // TENSORFLOW_CORE_PLATFORM_CTSTRING_INTERNAL_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/cuda.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/cuda.h new file mode 100644 index 0000000000000000000000000000000000000000..9a96a722bdb67c934c1cc4762f51c4a1ffed1ed1 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/cuda.h @@ -0,0 +1,22 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_PLATFORM_CUDA_H_ +#define TENSORFLOW_CORE_PLATFORM_CUDA_H_ + +#include "xla/stream_executor/cuda/cuda_activation.h" // IWYU pragma: keep +#include "tensorflow/core/platform/platform.h" // IWYU pragma: keep + +#endif // TENSORFLOW_CORE_PLATFORM_CUDA_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/demangle.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/demangle.h new file mode 100644 index 0000000000000000000000000000000000000000..fd5691221f4e178d81ce6407135fcf0d8560db0e --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/demangle.h @@ -0,0 +1,28 @@ +/* Copyright 2016 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_PLATFORM_DEMANGLE_H_ +#define TENSORFLOW_CORE_PLATFORM_DEMANGLE_H_ + +#include "tensorflow/core/platform/types.h" +#include "tsl/platform/demangle.h" + +namespace tensorflow { +namespace port { +using tsl::port::Demangle; +} // namespace port +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_PLATFORM_DEMANGLE_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/denormal.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/denormal.h new file mode 100644 index 0000000000000000000000000000000000000000..47dcf75c93f7b5b909ec020348dc1f64521a9b8c --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/denormal.h @@ -0,0 +1,35 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_PLATFORM_DENORMAL_H_ +#define TENSORFLOW_CORE_PLATFORM_DENORMAL_H_ + +#include "tensorflow/core/platform/macros.h" +#include "tsl/platform/denormal.h" + +namespace tensorflow { +namespace port { +// NOLINTBEGIN(misc-unused-using-decls) +using tsl::port::DenormalState; +using tsl::port::GetDenormalState; +using tsl::port::ScopedDontFlushDenormal; +using tsl::port::ScopedFlushDenormal; +using tsl::port::ScopedRestoreFlushDenormalState; +using tsl::port::SetDenormalState; +// NOLINTEND(misc-unused-using-decls) +} // namespace port +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_PLATFORM_DENORMAL_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/dynamic_annotations.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/dynamic_annotations.h new file mode 100644 index 0000000000000000000000000000000000000000..795c978f5549356419ac3ab2031a9ab6cc9452d2 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/dynamic_annotations.h @@ -0,0 +1,22 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_PLATFORM_DYNAMIC_ANNOTATIONS_H_ +#define TENSORFLOW_CORE_PLATFORM_DYNAMIC_ANNOTATIONS_H_ + +#include "tensorflow/core/platform/platform.h" +#include "tsl/platform/dynamic_annotations.h" // IWYU pragma: export + +#endif // TENSORFLOW_CORE_PLATFORM_DYNAMIC_ANNOTATIONS_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/enable_tf2_utils.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/enable_tf2_utils.h new file mode 100644 index 0000000000000000000000000000000000000000..856ee1f601ba376a784d185708e48782b284a53d --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/enable_tf2_utils.h @@ -0,0 +1,31 @@ +/* Copyright 2020 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_PLATFORM_ENABLE_TF2_UTILS_H_ +#define TENSORFLOW_CORE_PLATFORM_ENABLE_TF2_UTILS_H_ + +namespace tensorflow { + +// Sets the tf2 execution state. This can be used to indicate whether the user +// has explicitly asked for tf2 execution. +void set_tf2_execution(bool enabled); + +// Returns true or false depending on whether the user flag for tf2 execution +// has been set. The default is false. +bool tf2_execution_enabled(); + +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_PLATFORM_ENABLE_TF2_UTILS_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/env.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/env.h new file mode 100644 index 0000000000000000000000000000000000000000..c88c758acf488a65834e2bbd152264ad9b312a57 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/env.h @@ -0,0 +1,61 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_PLATFORM_ENV_H_ +#define TENSORFLOW_CORE_PLATFORM_ENV_H_ + +#include + +#include +#include +#include +#include + +#include "tensorflow/core/platform/env_time.h" +#include "tensorflow/core/platform/errors.h" +#include "tensorflow/core/platform/file_system.h" +#include "tensorflow/core/platform/macros.h" +#include "tensorflow/core/platform/mutex.h" +#include "tensorflow/core/platform/numa.h" +#include "tensorflow/core/platform/platform.h" +#include "tensorflow/core/platform/protobuf.h" +#include "tensorflow/core/platform/status.h" +#include "tensorflow/core/platform/stringpiece.h" +#include "tensorflow/core/platform/types.h" +#include "tsl/platform/env.h" + +namespace tensorflow { +// NOLINTBEGIN(misc-unused-using-decls) +using tsl::Env; +using tsl::EnvWrapper; +using tsl::FileSystemCopyFile; +using tsl::ReadBinaryProto; +using tsl::ReadFileToString; +using tsl::ReadTextOrBinaryProto; +using tsl::ReadTextProto; +using tsl::setenv; +using tsl::Thread; +using tsl::ThreadOptions; +using tsl::unsetenv; +using tsl::WriteBinaryProto; +using tsl::WriteStringToFile; +using tsl::WriteTextProto; +namespace register_file_system { +using tsl::register_file_system::Register; +} // namespace register_file_system +// NOLINTEND(misc-unused-using-decls) +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_PLATFORM_ENV_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/env_time.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/env_time.h new file mode 100644 index 0000000000000000000000000000000000000000..b2831965bb2ac596f01cd63999ec261ab9c405e8 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/env_time.h @@ -0,0 +1,27 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ +#ifndef TENSORFLOW_CORE_PLATFORM_ENV_TIME_H_ +#define TENSORFLOW_CORE_PLATFORM_ENV_TIME_H_ + +#include + +#include "tensorflow/core/platform/types.h" +#include "tsl/platform/env_time.h" + +namespace tensorflow { +using tsl::EnvTime; // NOLINT +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_PLATFORM_ENV_TIME_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/error_logging.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/error_logging.h new file mode 100644 index 0000000000000000000000000000000000000000..378a0cb6f10d29c8abd1d8439b92c3a187bc5a57 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/error_logging.h @@ -0,0 +1,25 @@ +/* Copyright 2023 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_PLATFORM_ERROR_LOGGING_H_ +#define TENSORFLOW_CORE_PLATFORM_ERROR_LOGGING_H_ + +#include "tsl/platform/error_logging.h" + +namespace tensorflow { +using tsl::error_logging::Log; +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_PLATFORM_ERROR_LOGGING_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/error_payloads.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/error_payloads.h new file mode 100644 index 0000000000000000000000000000000000000000..b806b3cbb4b9f2b2bd225327fb2b29a1b358bf5a --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/error_payloads.h @@ -0,0 +1,49 @@ +/* Copyright 2022 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_PLATFORM_ERROR_PAYLOADS_H_ +#define TENSORFLOW_CORE_PLATFORM_ERROR_PAYLOADS_H_ + +#include "tensorflow/core/lib/core/status.h" +#include "tensorflow/core/protobuf/core_platform_payloads.pb.h" +// This file contains macros and payload keys for the error counter in +// EagerClient. + +namespace tsl { + +// Proto: tensorflow::core::platform::ErrorSourceProto +// Location: tensorflow/core/protobuf/core_platform_payloads.proto +// Usage: Payload key for recording the error raised source. Payload value is +// retrieved to update counter in +// tensorflow/core/distributed_runtime/rpc/eager/grpc_eager_client.cc. +constexpr char kErrorSource[] = + "type.googleapis.com/tensorflow.core.platform.ErrorSourceProto"; + +// Set payload when status is not ok and ErrorSource payload hasn't been set. +// The code below will be used at every place where we would like to catch +// the error for the error counter in EagerClient. + +void OkOrSetErrorCounterPayload( + const tensorflow::core::platform::ErrorSourceProto::ErrorSource& + error_source, + tensorflow::Status& status); +} // namespace tsl + +namespace tensorflow { +using tsl::kErrorSource; // NOLINT +using tsl::OkOrSetErrorCounterPayload; // NOLINT +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_PLATFORM_ERROR_PAYLOADS_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/errors.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/errors.h new file mode 100644 index 0000000000000000000000000000000000000000..343edd91cb3978d5ac2ab152e180bf6daa282b28 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/errors.h @@ -0,0 +1,107 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_PLATFORM_ERRORS_H_ +#define TENSORFLOW_CORE_PLATFORM_ERRORS_H_ + +#include +#include +#include + +#include "absl/base/attributes.h" +#include "absl/strings/str_join.h" +#include "tensorflow/core/platform/logging.h" +#include "tensorflow/core/platform/macros.h" +#include "tensorflow/core/platform/status.h" +#include "tensorflow/core/platform/str_util.h" +#include "tensorflow/core/platform/strcat.h" +#include "tsl/platform/errors.h" + +namespace tensorflow { +namespace errors { + +// NOLINTBEGIN(misc-unused-using-decls) +// Maps UNIX errors into a Status. +using error::OK; +using tsl::errors::Aborted; +using tsl::errors::AbortedWithPayloads; +using tsl::errors::AlreadyExists; +using tsl::errors::AlreadyExistsWithPayloads; +using tsl::errors::AppendToMessage; +using tsl::errors::Cancelled; +using tsl::errors::CancelledWithPayloads; +using tsl::errors::CopyPayloads; +using tsl::errors::Create; +using tsl::errors::CreateWithUpdatedMessage; +using tsl::errors::DataLoss; +using tsl::errors::DataLossWithPayloads; +using tsl::errors::DeadlineExceeded; +using tsl::errors::DeadlineExceededWithPayloads; +using tsl::errors::FailedPrecondition; +using tsl::errors::FailedPreconditionWithPayloads; +using tsl::errors::FormatColocationNodeForError; +using tsl::errors::FormatFunctionForError; +using tsl::errors::FormatNodeNameForError; +using tsl::errors::FormatNodeNamesForError; +using tsl::errors::FormatOriginalNodeLocationForError; +using tsl::errors::GetPayloads; +using tsl::errors::InsertPayloads; +using tsl::errors::Internal; +using tsl::errors::InternalWithPayloads; +using tsl::errors::InvalidArgument; +using tsl::errors::InvalidArgumentWithPayloads; +using tsl::errors::IOError; +using tsl::errors::IsAborted; +using tsl::errors::IsAlreadyExists; +using tsl::errors::IsCancelled; +using tsl::errors::IsDataLoss; +using tsl::errors::IsDeadlineExceeded; +using tsl::errors::IsFailedPrecondition; +using tsl::errors::IsInternal; +using tsl::errors::IsInvalidArgument; +using tsl::errors::IsNotFound; +using tsl::errors::IsOutOfRange; +using tsl::errors::IsPermissionDenied; +using tsl::errors::IsResourceExhausted; +using tsl::errors::IsUnauthenticated; +using tsl::errors::IsUnavailable; +using tsl::errors::IsUnimplemented; +using tsl::errors::IsUnknown; +using tsl::errors::NotFound; +using tsl::errors::NotFoundWithPayloads; +using tsl::errors::OutOfRange; +using tsl::errors::OutOfRangeWithPayloads; +using tsl::errors::PermissionDenied; +using tsl::errors::PermissionDeniedWithPayloads; +using tsl::errors::ReplaceErrorFromNonCommunicationOps; +using tsl::errors::ResourceExhausted; +using tsl::errors::ResourceExhaustedWithPayloads; +using tsl::errors::Unauthenticated; +using tsl::errors::UnauthenticatedWithPayloads; +using tsl::errors::Unavailable; +using tsl::errors::UnavailableWithPayloads; +using tsl::errors::Unimplemented; +using tsl::errors::UnimplementedWithPayloads; +using tsl::errors::Unknown; +using tsl::errors::UnknownPayloads; +namespace internal { +using tsl::errors::internal::PrepareForStrCat; +} +// NOLINTEND(misc-unused-using-decls) + +} // namespace errors +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_PLATFORM_ERRORS_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/file_statistics.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/file_statistics.h new file mode 100644 index 0000000000000000000000000000000000000000..b9059288eca2c88ece7d90485e179e2cab9cfbc7 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/file_statistics.h @@ -0,0 +1,26 @@ +/* Copyright 2016 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_PLATFORM_FILE_STATISTICS_H_ +#define TENSORFLOW_CORE_PLATFORM_FILE_STATISTICS_H_ + +#include "tensorflow/core/platform/types.h" +#include "tsl/platform/file_statistics.h" + +namespace tensorflow { +using tsl::FileStatistics; // NOLINT +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_PLATFORM_FILE_STATISTICS_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/file_system.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/file_system.h new file mode 100644 index 0000000000000000000000000000000000000000..14826a90965b29f9590e6a730a7d43fe4606d8ae --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/file_system.h @@ -0,0 +1,48 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_PLATFORM_FILE_SYSTEM_H_ +#define TENSORFLOW_CORE_PLATFORM_FILE_SYSTEM_H_ + +#include + +#include +#include +#include +#include +#include + +#include "tensorflow/core/platform/cord.h" +#include "tensorflow/core/platform/errors.h" +#include "tensorflow/core/platform/file_statistics.h" +#include "tensorflow/core/platform/macros.h" +#include "tensorflow/core/platform/platform.h" +#include "tensorflow/core/platform/stringpiece.h" +#include "tensorflow/core/platform/types.h" +#include "tsl/platform/file_system.h" + +namespace tensorflow { +// NOLINTBEGIN(misc-unused-using-decls) +using tsl::FileSystem; +using tsl::FileSystemRegistry; +using tsl::RandomAccessFile; +using tsl::ReadOnlyMemoryRegion; +using tsl::TransactionToken; +using tsl::WrappedFileSystem; +using tsl::WritableFile; +// NOLINTEND(misc-unused-using-decls) +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_PLATFORM_FILE_SYSTEM_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/file_system_helper.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/file_system_helper.h new file mode 100644 index 0000000000000000000000000000000000000000..01b3a92debe7acfd7956883045c8494b5298ba1c --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/file_system_helper.h @@ -0,0 +1,39 @@ +/* Copyright 2018 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_PLATFORM_FILE_SYSTEM_HELPER_H_ +#define TENSORFLOW_CORE_PLATFORM_FILE_SYSTEM_HELPER_H_ + +#include +#include + +#include "tensorflow/core/platform/env.h" +#include "tensorflow/core/platform/status.h" +#include "tensorflow/core/platform/statusor.h" +#include "tsl/platform/file_system_helper.h" + +namespace tensorflow { +// NOLINTBEGIN(misc-unused-using-decls) +using tsl::Env; +using tsl::FileSystem; + +namespace internal { +using tsl::internal::FileExists; +using tsl::internal::GetMatchingPaths; +} // namespace internal +// NOLINTEND(misc-unused-using-decls) +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_PLATFORM_FILE_SYSTEM_HELPER_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/fingerprint.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/fingerprint.h new file mode 100644 index 0000000000000000000000000000000000000000..d209799ccab77dc43e9955d32ee4eb98d4b7777c --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/fingerprint.h @@ -0,0 +1,37 @@ +/* Copyright 2016 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_PLATFORM_FINGERPRINT_H_ +#define TENSORFLOW_CORE_PLATFORM_FINGERPRINT_H_ + +#include "tensorflow/core/platform/stringpiece.h" +#include "tensorflow/core/platform/types.h" +#include "tsl/platform/fingerprint.h" + +namespace tensorflow { + +using Fprint128 = tsl::Fprint128; +using Fprint128Hasher = tsl::Fprint128Hasher; + +// NOLINTBEGIN(misc-unused-using-decls) +using tsl::Fingerprint128; +using tsl::Fingerprint32; +using tsl::Fingerprint64; +using tsl::FingerprintCat64; +// NOLINTEND(misc-unused-using-decls) + +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_PLATFORM_FINGERPRINT_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/float8.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/float8.h new file mode 100644 index 0000000000000000000000000000000000000000..e2cad449d4aa13a6b4039c759a8f3d26908b6426 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/float8.h @@ -0,0 +1,26 @@ +/* Copyright 2022 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_PLATFORM_FLOAT8_H_ +#define TENSORFLOW_CORE_PLATFORM_FLOAT8_H_ + +#include "tsl/platform/ml_dtypes.h" + +namespace tensorflow { +typedef tsl::float8_e4m3fn float8_e4m3fn; +typedef tsl::float8_e5m2 float8_e5m2; +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_PLATFORM_FLOAT8_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/gif.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/gif.h new file mode 100644 index 0000000000000000000000000000000000000000..0b9dc9289c6ba28b52369785ed92546edf364272 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/gif.h @@ -0,0 +1,21 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_PLATFORM_GIF_H_ +#define TENSORFLOW_CORE_PLATFORM_GIF_H_ + +#include "tsl/platform/gif.h" // IWYU pragma: export + +#endif // TENSORFLOW_CORE_PLATFORM_GIF_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/hash.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/hash.h new file mode 100644 index 0000000000000000000000000000000000000000..8536424309706430b56433b5fb5cb0612416fb6b --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/hash.h @@ -0,0 +1,35 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +// Simple hash functions used for internal data structures + +#ifndef TENSORFLOW_CORE_PLATFORM_HASH_H_ +#define TENSORFLOW_CORE_PLATFORM_HASH_H_ + +#include "tsl/platform/hash.h" + +namespace tensorflow { +// NOLINTBEGIN(misc-unused-using-decls) +using ::tsl::hash; +using ::tsl::Hash32; +using ::tsl::Hash64; +using ::tsl::Hash64Combine; +using ::tsl::Hash64CombineUnordered; +using ::tsl::StringPieceHasher; +// NOLINTEND(misc-unused-using-decls) +} // namespace tensorflow + + +#endif // TENSORFLOW_CORE_PLATFORM_HASH_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/host_info.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/host_info.h new file mode 100644 index 0000000000000000000000000000000000000000..89d495d6e41229c3ac717d31cb509cfa8deb44c6 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/host_info.h @@ -0,0 +1,30 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_PLATFORM_HOST_INFO_H_ +#define TENSORFLOW_CORE_PLATFORM_HOST_INFO_H_ + +#include "tensorflow/core/platform/types.h" +#include "tsl/platform/host_info.h" + +namespace tensorflow { +namespace port { +using tsl::port::Hostname; +using tsl::port::JobName; +using tsl::port::JobUid; +} // namespace port +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_PLATFORM_HOST_INFO_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/human_readable_json.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/human_readable_json.h new file mode 100644 index 0000000000000000000000000000000000000000..73cc5165e93c364a949d900a81748974a016cbde --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/human_readable_json.h @@ -0,0 +1,28 @@ +/* Copyright 2018 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_PLATFORM_HUMAN_READABLE_JSON_H_ +#define TENSORFLOW_CORE_PLATFORM_HUMAN_READABLE_JSON_H_ + +#include "tensorflow/core/platform/protobuf.h" +#include "tensorflow/core/platform/status.h" +#include "tsl/platform/human_readable_json.h" + +namespace tensorflow { +using tsl::HumanReadableJsonToProto; +using tsl::ProtoToHumanReadableJson; +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_PLATFORM_HUMAN_READABLE_JSON_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/init_main.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/init_main.h new file mode 100644 index 0000000000000000000000000000000000000000..07b0620e48f0d5ba4b07a54f706f16dec8e97311 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/init_main.h @@ -0,0 +1,27 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_PLATFORM_INIT_MAIN_H_ +#define TENSORFLOW_CORE_PLATFORM_INIT_MAIN_H_ + +#include "tsl/platform/init_main.h" + +namespace tensorflow { +namespace port { +using tsl::port::InitMain; +} // namespace port +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_PLATFORM_INIT_MAIN_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/intrusive_ptr.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/intrusive_ptr.h new file mode 100644 index 0000000000000000000000000000000000000000..b46bf5d895b104532be71655309b920925806232 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/intrusive_ptr.h @@ -0,0 +1,31 @@ +/* Copyright 2021 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ +#ifndef TENSORFLOW_CORE_PLATFORM_INTRUSIVE_PTR_H_ +#define TENSORFLOW_CORE_PLATFORM_INTRUSIVE_PTR_H_ + +#include + +#include "tsl/platform/intrusive_ptr.h" + +namespace tensorflow { +namespace core { + +template +using IntrusivePtr = tsl::core::IntrusivePtr; + +} // namespace core +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_PLATFORM_INTRUSIVE_PTR_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/jpeg.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/jpeg.h new file mode 100644 index 0000000000000000000000000000000000000000..7f205d8cfd1503ad91965b1f2afc011d8f97a225 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/jpeg.h @@ -0,0 +1,21 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_PLATFORM_JPEG_H_ +#define TENSORFLOW_CORE_PLATFORM_JPEG_H_ + +#include "tsl/platform/jpeg.h" + +#endif // TENSORFLOW_CORE_PLATFORM_JPEG_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/load_library.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/load_library.h new file mode 100644 index 0000000000000000000000000000000000000000..6bb4a41614790c3506d3261bbe9388c734bffa29 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/load_library.h @@ -0,0 +1,33 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_PLATFORM_LOAD_LIBRARY_H_ +#define TENSORFLOW_CORE_PLATFORM_LOAD_LIBRARY_H_ + +#include "tsl/platform/load_library.h" + +namespace tensorflow { + +namespace internal { + +using ::tsl::internal::FormatLibraryFileName; +using ::tsl::internal::GetSymbolFromLibrary; +using ::tsl::internal::LoadDynamicLibrary; + +} // namespace internal + +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_PLATFORM_LOAD_LIBRARY_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/logger.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/logger.h new file mode 100644 index 0000000000000000000000000000000000000000..399be9772adb1820f3e7eb48c3e1ad0c6cb69241 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/logger.h @@ -0,0 +1,27 @@ +/* Copyright 2018 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_PLATFORM_LOGGER_H_ +#define TENSORFLOW_CORE_PLATFORM_LOGGER_H_ + +#include "google/protobuf/any.pb.h" +#include "tensorflow/core/platform/protobuf.h" +#include "tsl/platform/logger.h" + +namespace tensorflow { +using tsl::Logger; // NOLINT +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_PLATFORM_LOGGER_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/logging.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/logging.h new file mode 100644 index 0000000000000000000000000000000000000000..7412859515c1df6cfaa3b05158667a4208a5d62b --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/logging.h @@ -0,0 +1,41 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_PLATFORM_LOGGING_H_ +#define TENSORFLOW_CORE_PLATFORM_LOGGING_H_ + +#include "tensorflow/core/platform/types.h" // IWYU pragma: export +#include "tsl/platform/logging.h" // IWYU pragma: export + +// NOLINTBEGIN(misc-unused-using-decls) +namespace tensorflow { +namespace internal { +using tsl::internal::LogString; +} // namespace internal +using tsl::ERROR; +using tsl::FATAL; +using tsl::INFO; +using tsl::NUM_SEVERITIES; +using tsl::TFAddLogSink; +using tsl::TFGetLogSinks; +using tsl::TFLogEntry; +using tsl::TFLogSink; +using tsl::TFRemoveLogSink; +using tsl::UpdateLogVerbosityIfDefined; +using tsl::WARNING; +} // namespace tensorflow +// NOLINTEND(misc-unused-using-decls) + +#endif // TENSORFLOW_CORE_PLATFORM_LOGGING_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/macros.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/macros.h new file mode 100644 index 0000000000000000000000000000000000000000..975f1c5939cbfe21c05268055cd20ecbfce9879d --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/macros.h @@ -0,0 +1,29 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_PLATFORM_MACROS_H_ +#define TENSORFLOW_CORE_PLATFORM_MACROS_H_ + +#include "tsl/platform/macros.h" // IWYU pragma: export + +namespace tensorflow { +namespace internal { +template +constexpr auto remove_unused_variable_compiler_warning = + tsl::internal::remove_unused_variable_compiler_warning; +} // namespace internal +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_PLATFORM_MACROS_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/mem.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/mem.h new file mode 100644 index 0000000000000000000000000000000000000000..20acf8593f55b41dfaa8b55a9a498011c2523f67 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/mem.h @@ -0,0 +1,42 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_PLATFORM_MEM_H_ +#define TENSORFLOW_CORE_PLATFORM_MEM_H_ + +#include "tsl/platform/mem.h" +// TODO(cwhipkey): remove this when callers use annotations directly. +#include "tensorflow/core/platform/dynamic_annotations.h" + +namespace tensorflow { +namespace port { +// NOLINTBEGIN(misc-unused-using-decls) +using ::tsl::port::AlignedFree; +using ::tsl::port::AlignedMalloc; +using ::tsl::port::AvailableRam; +using ::tsl::port::Free; +using ::tsl::port::GetMemoryBandwidthInfo; +using ::tsl::port::GetMemoryInfo; +using ::tsl::port::Malloc; +using ::tsl::port::MallocExtension_GetAllocatedSize; +using ::tsl::port::MallocExtension_ReleaseToSystem; +using ::tsl::port::MemoryBandwidthInfo; +using ::tsl::port::MemoryInfo; +using ::tsl::port::Realloc; +// NOLINTEND(misc-unused-using-decls) +} // namespace port +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_PLATFORM_MEM_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/mutex.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/mutex.h new file mode 100644 index 0000000000000000000000000000000000000000..4a8d76c48942571c9f733b709a70d2677b8eafd0 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/mutex.h @@ -0,0 +1,39 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_PLATFORM_MUTEX_H_ +#define TENSORFLOW_CORE_PLATFORM_MUTEX_H_ + +#include "tensorflow/core/platform/platform.h" +#include "tensorflow/core/platform/thread_annotations.h" +#include "tensorflow/core/platform/types.h" +#include "tsl/platform/mutex.h" + +namespace tensorflow { + +using tsl::Condition; +using tsl::condition_variable; +using tsl::ConditionResult; +using tsl::kCond_MaybeNotified; +using tsl::kCond_Timeout; +using tsl::LINKER_INITIALIZED; +using tsl::LinkerInitialized; +using tsl::mutex; +using tsl::mutex_lock; +using tsl::tf_shared_lock; +using tsl::WaitForMilliseconds; +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_PLATFORM_MUTEX_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/net.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/net.h new file mode 100644 index 0000000000000000000000000000000000000000..4b9d51fcfd2408032d9a6120dda51349cbcc322f --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/net.h @@ -0,0 +1,27 @@ +/* Copyright 2016 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_PLATFORM_NET_H_ +#define TENSORFLOW_CORE_PLATFORM_NET_H_ + +#include "tsl/platform/net.h" + +namespace tensorflow { +namespace internal { +using ::tsl::internal::PickUnusedPortOrDie; // NOLINT(misc-unused-using-decls) +} // namespace internal +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_PLATFORM_NET_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/notification.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/notification.h new file mode 100644 index 0000000000000000000000000000000000000000..a2d48a638be3ab97db83b73e2cc213654ca420f4 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/notification.h @@ -0,0 +1,29 @@ +/* Copyright 2016 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_PLATFORM_NOTIFICATION_H_ +#define TENSORFLOW_CORE_PLATFORM_NOTIFICATION_H_ + +#include "tensorflow/core/platform/platform.h" +#include "tsl/platform/notification.h" + +namespace tensorflow { +// NOLINTBEGIN(misc-unused-using-decls) +using tsl::Notification; +using tsl::WaitForNotificationWithTimeout; +// NOLINTEND(misc-unused-using-decls) +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_PLATFORM_NOTIFICATION_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/null_file_system.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/null_file_system.h new file mode 100644 index 0000000000000000000000000000000000000000..3fc7d1795afcd82e276ce1fc09bb486a53f1dcf0 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/null_file_system.h @@ -0,0 +1,29 @@ +/* Copyright 2018 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_PLATFORM_NULL_FILE_SYSTEM_H_ +#define TENSORFLOW_CORE_PLATFORM_NULL_FILE_SYSTEM_H_ + +#include "tsl/platform/null_file_system.h" + +namespace tensorflow { +#ifndef SWIG +using ::tsl::NullFileSystem; // NOLINT(misc-unused-using-decls) +#endif + +// END_SKIP_DOXYGEN +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_PLATFORM_NULL_FILE_SYSTEM_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/numa.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/numa.h new file mode 100644 index 0000000000000000000000000000000000000000..6333c01fc6f9394bb4faef2f830a4ef44844446b --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/numa.h @@ -0,0 +1,35 @@ +/* Copyright 2018 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_PLATFORM_NUMA_H_ +#define TENSORFLOW_CORE_PLATFORM_NUMA_H_ + +#include "tensorflow/core/platform/platform.h" +#include "tensorflow/core/platform/types.h" +#include "tsl/platform/numa.h" + +namespace tensorflow { +namespace port { +using tsl::port::kNUMANoAffinity; +using tsl::port::NUMAEnabled; +using tsl::port::NUMAFree; +using tsl::port::NUMAGetMemAffinity; +using tsl::port::NUMAGetThreadNodeAffinity; +using tsl::port::NUMAMalloc; +using tsl::port::NUMANumNodes; +using tsl::port::NUMASetThreadNodeAffinity; +} // namespace port +} // namespace tensorflow +#endif // TENSORFLOW_CORE_PLATFORM_NUMA_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/numbers.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/numbers.h new file mode 100644 index 0000000000000000000000000000000000000000..08732fcf6ca056d47f89ce1a195de662f18b3ae7 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/numbers.h @@ -0,0 +1,54 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_PLATFORM_NUMBERS_H_ +#define TENSORFLOW_CORE_PLATFORM_NUMBERS_H_ + +#include + +#include "tensorflow/core/platform/stringpiece.h" +#include "tensorflow/core/platform/types.h" +#include "tsl/platform/numbers.h" + +namespace tensorflow { +namespace strings { +// NOLINTBEGIN(misc-unused-using-decls) +using tsl::strings::DoubleToBuffer; +using tsl::strings::FastInt32ToBufferLeft; +using tsl::strings::FastInt64ToBufferLeft; +using tsl::strings::FastUInt32ToBufferLeft; +using tsl::strings::FastUInt64ToBufferLeft; +using tsl::strings::FloatToBuffer; +using tsl::strings::FpToString; +using tsl::strings::HexStringToUint64; +using tsl::strings::HumanReadableElapsedTime; +using tsl::strings::HumanReadableNum; +using tsl::strings::HumanReadableNumBytes; +using tsl::strings::kFastToBufferSize; +using tsl::strings::ProtoParseNumeric; +using tsl::strings::safe_strto32; +using tsl::strings::safe_strto64; +using tsl::strings::safe_strtod; +using tsl::strings::safe_strtof; +using tsl::strings::safe_strtou32; +using tsl::strings::safe_strtou64; +using tsl::strings::SafeStringToNumeric; +using tsl::strings::StringToFp; +using tsl::strings::Uint64ToHexString; +// NOLINTEND(misc-unused-using-decls) +} // namespace strings +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_PLATFORM_NUMBERS_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/path.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/path.h new file mode 100644 index 0000000000000000000000000000000000000000..ca13a99fdc389bd075c8dc2436d0c83efbcdd4c0 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/path.h @@ -0,0 +1,47 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_PLATFORM_PATH_H_ +#define TENSORFLOW_CORE_PLATFORM_PATH_H_ + +#include "tensorflow/core/platform/stringpiece.h" +#include "tensorflow/core/platform/types.h" +#include "tsl/platform/path.h" + +// NOLINTBEGIN(misc-unused-using-decls) +namespace tensorflow { +namespace io { +namespace internal { +using tsl::io::internal::JoinPathImpl; +} +#ifndef SWIG // variadic templates +using tsl::io::JoinPath; +#endif /* SWIG */ +using tsl::io::Basename; +using tsl::io::BasenamePrefix; +using tsl::io::CleanPath; +using tsl::io::CommonPathPrefix; +using tsl::io::CreateURI; +using tsl::io::Dirname; +using tsl::io::Extension; +using tsl::io::GetTempFilename; +using tsl::io::GetTestUndeclaredOutputsDir; +using tsl::io::IsAbsolutePath; +using tsl::io::ParseURI; +} // namespace io +} // namespace tensorflow +// NOLINTEND(misc-unused-using-decls) + +#endif // TENSORFLOW_CORE_PLATFORM_PATH_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/platform.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/platform.h new file mode 100644 index 0000000000000000000000000000000000000000..6d5d987934655d43f07b37ae2ae5ea8f3d433fa7 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/platform.h @@ -0,0 +1,21 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_PLATFORM_PLATFORM_H_ +#define TENSORFLOW_CORE_PLATFORM_PLATFORM_H_ + +#include "tsl/platform/platform.h" + +#endif // TENSORFLOW_CORE_PLATFORM_PLATFORM_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/platform_strings.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/platform_strings.h new file mode 100644 index 0000000000000000000000000000000000000000..a42f7c76e32e4b4e45e73a1a89e0425924a8a6ae --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/platform_strings.h @@ -0,0 +1,362 @@ +/* Copyright 2018 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_PLATFORM_PLATFORM_STRINGS_H_ +#define TENSORFLOW_CORE_PLATFORM_PLATFORM_STRINGS_H_ + +// This header defines the macro TF_PLATFORM_STRINGS() which should be used +// once in each dynamically loadable TensorFlow module. It embeds static +// strings into the compilation unit that allow TensorFlow to determine what +// compilation options were in effect when the compilation unit was built. All +// compilation units within the same dynamically loadable library should be +// built with the same options (or at least, the strings should be embedded in +// the compilation unit built with the most restrictive options). + +// The platform strings embedded into a binary may be retrieved with the +// GetPlatformStrings function. + +// Rationale: +// We wish to load only those libraries that this CPU can execute. For +// example, we should not load a library compiled with avx256 instructions on a +// CPU that cannot execute them. +// +// One might think that one could dlopen() the library, and call a routine that +// would return which cpu type it was compiled for. Alas, this does not work, +// because at dlopen() time, a library containing C++ will execute constructors +// of class variables with static storage class. Even code that looks +// innocuous may use optional platform-specific instructions. For example, +// the fastest way to zero a region of memory might use optional instructions. +// +// One might think one could run a tool such as "objdump" to read flags from +// the libraries' headers, or perhaps disassemble each library to look for +// particular instructions. Unfortunately, the desired flags are not present +// in the headers, and disassembly can be prohibitively slow ("objdump -d" is +// very slow, for example). Moreover, a tool to examine the library may not +// be present on the system unless the user has installed special packages (for +// example, on Windows). +// +// Instead, we adopt a crude but straightforward solution: We require +// developers to use the macro TF_PLATFORM_STRINGS() in their library, to +// embed the compilation options as constant strings. The compiler's +// predefined macros pick which strings are included. We then search for the +// strings in the files, and then dlopen() only those libraries that have or +// lack strings as needed. +// +// We adopt the approach of placing in the binary a fairly raw copy of the +// predefined macros, rather than trying to interpret them in complex ways at +// compile time. This allows the loading binary to alter its interpretation of +// the strings without library developers having to recompile. + +#include + +#include +#include + +// Aside from the header guard, the internal macros defined here have the form: +// TF_PLAT_STR_* + +// If a macro is removed from the list of tested macros, the major version in +// the following version number should be incremented, and the minor version +// set to zero. Otherwise, if a macro is added to the list of tested macros, +// the minor number should be incremented. +#define TF_PLAT_STR_VERSION_ "1.0" + +// Prefix of each option string indicator in the binary. +// After the prefix, such strings have the form: +// [A-Za-z_0-9]= +// followed by a terminating nul. To simplify searching, this prefix is all +// ASCII, starts with a nul, and contains no character twice. +#define TF_PLAT_STR_MAGIC_PREFIX_ "\0S\\s\":^p*L}" + +// A helper macro for TF_PLAT_STR_AS_STR_(). +#define TF_PLAT_STR_STR_1_(x) #x + +// Yield a constant string corresponding to x, after macro expansion. +#define TF_PLAT_STR_AS_STR_(x) TF_PLAT_STR_STR_1_(x) + +// An empty definition to make lists more uniform. +#define TF_PLAT_STR_TERMINATOR_ + +// TF_PLAT_STR_(x) introduces a constant string indicating whether a +// particular compilation option has been turned on. +// +// In gcc and clang, we might imagine using something like +// #define TF_PLAT_STR_(x) \ +// (sizeof (#x) != sizeof (TF_PLAT_STR_AS_STR_ (x))? \ +// TF_PLAT_STR_MAGIC_PREFIX_ #x "=" TF_PLAT_STR_AS_STR_ (x) : \ +// TF_PLAT_STR_MAGIC_PREFIX_ #x "=0"), +// but some compilers (notably MSVC) place both "foo" and "bar" in the binary +// when presented with +// (true? "foo" : "bar") +// so we must use #if to select the strings we need, which is rather verbose. +#define TF_PLAT_STR_(x) TF_PLAT_STR_MAGIC_PREFIX_ #x "=" TF_PLAT_STR_AS_STR_(x) + +// Include the #if machinery that sets the macros used below. +// platform_strings_computed.h can be generated by filtering this header file +// through: +// awk ' +// header == "" { print; } +// /\*\// && header == "" { +// print "// Generated from platform_strings.h."; +// print ""; +// print "#ifndef TENSORFLOW_CORE_PLATFORM_PLATFORM_STRINGS_COMPUTED_H_"; +// print "#define TENSORFLOW_CORE_PLATFORM_PLATFORM_STRINGS_COMPUTED_H_"; +// print ""; +// header = 1; +// } +// /^#define TF_PLAT_STR_LIST_[a-zA-Z0-9_]*\(\) *\\$/ { active = 1; } +// /TF_PLAT_STR_TERMINATOR_/ { active = 0; } +// /^ *TF_PLAT_STR_[A-Za-z0-9_]* *\\$/ && active { +// x = $0; +// sub(/^ *TF_PLAT_STR_/, "", x); +// sub(/ *\\$/, "", x); +// printf ("#if defined(%s)\n", x); +// printf ("#define TF_PLAT_STR_%s TF_PLAT_STR_(%s)\n", x, x); +// printf ("#else\n"); +// printf ("#define TF_PLAT_STR_%s\n", x); +// printf ("#endif\n"); +// } +// END { +// print ""; +// print "#endif // TENSORFLOW_CORE_PLATFORM_PLATFORM_STRINGS_COMPUTED_H_"; +// }' +#include "tensorflow/core/platform/platform_strings_computed.h" + +// clang-format butchers the following lines. +// clang-format off + +// x86_64 and x86_32 optional features. +#define TF_PLAT_STR_LIST___x86_64__() \ + TF_PLAT_STR__M_IX86_FP \ + TF_PLAT_STR__NO_PREFETCHW \ + TF_PLAT_STR___3dNOW_A__ \ + TF_PLAT_STR___3dNOW__ \ + TF_PLAT_STR___ABM__ \ + TF_PLAT_STR___ADX__ \ + TF_PLAT_STR___AES__ \ + TF_PLAT_STR___AVX2__ \ + TF_PLAT_STR___AVX512BW__ \ + TF_PLAT_STR___AVX512CD__ \ + TF_PLAT_STR___AVX512DQ__ \ + TF_PLAT_STR___AVX512ER__ \ + TF_PLAT_STR___AVX512F__ \ + TF_PLAT_STR___AVX512IFMA__ \ + TF_PLAT_STR___AVX512PF__ \ + TF_PLAT_STR___AVX512VBMI__ \ + TF_PLAT_STR___AVX512VL__ \ + TF_PLAT_STR___AVX__ \ + TF_PLAT_STR___BMI2__ \ + TF_PLAT_STR___BMI__ \ + TF_PLAT_STR___CLFLUSHOPT__ \ + TF_PLAT_STR___CLZERO__ \ + TF_PLAT_STR___F16C__ \ + TF_PLAT_STR___FMA4__ \ + TF_PLAT_STR___FMA__ \ + TF_PLAT_STR___FP_FAST_FMA \ + TF_PLAT_STR___FP_FAST_FMAF \ + TF_PLAT_STR___FSGSBASE__ \ + TF_PLAT_STR___FXSR__ \ + TF_PLAT_STR___LWP__ \ + TF_PLAT_STR___LZCNT__ \ + TF_PLAT_STR___MMX__ \ + TF_PLAT_STR___MWAITX__ \ + TF_PLAT_STR___PCLMUL__ \ + TF_PLAT_STR___PKU__ \ + TF_PLAT_STR___POPCNT__ \ + TF_PLAT_STR___PRFCHW__ \ + TF_PLAT_STR___RDRND__ \ + TF_PLAT_STR___RDSEED__ \ + TF_PLAT_STR___RTM__ \ + TF_PLAT_STR___SHA__ \ + TF_PLAT_STR___SSE2_MATH__ \ + TF_PLAT_STR___SSE2__ \ + TF_PLAT_STR___SSE_MATH__ \ + TF_PLAT_STR___SSE__ \ + TF_PLAT_STR___SSE3__ \ + TF_PLAT_STR___SSE4A__ \ + TF_PLAT_STR___SSE4_1__ \ + TF_PLAT_STR___SSE4_2__ \ + TF_PLAT_STR___SSSE3__ \ + TF_PLAT_STR___TBM__ \ + TF_PLAT_STR___XOP__ \ + TF_PLAT_STR___XSAVEC__ \ + TF_PLAT_STR___XSAVEOPT__ \ + TF_PLAT_STR___XSAVES__ \ + TF_PLAT_STR___XSAVE__ \ + TF_PLAT_STR_TERMINATOR_ + +// PowerPC (64- and 32-bit) optional features. +#define TF_PLAT_STR_LIST___powerpc64__() \ + TF_PLAT_STR__SOFT_DOUBLE \ + TF_PLAT_STR__SOFT_FLOAT \ + TF_PLAT_STR___ALTIVEC__ \ + TF_PLAT_STR___APPLE_ALTIVEC__ \ + TF_PLAT_STR___CRYPTO__ \ + TF_PLAT_STR___FLOAT128_HARDWARE__ \ + TF_PLAT_STR___FLOAT128_TYPE__ \ + TF_PLAT_STR___FP_FAST_FMA \ + TF_PLAT_STR___FP_FAST_FMAF \ + TF_PLAT_STR___HTM__ \ + TF_PLAT_STR___NO_FPRS__ \ + TF_PLAT_STR___NO_LWSYNC__ \ + TF_PLAT_STR___POWER8_VECTOR__ \ + TF_PLAT_STR___POWER9_VECTOR__ \ + TF_PLAT_STR___PPC405__ \ + TF_PLAT_STR___QUAD_MEMORY_ATOMIC__ \ + TF_PLAT_STR___RECIPF__ \ + TF_PLAT_STR___RECIP_PRECISION__ \ + TF_PLAT_STR___RECIP__ \ + TF_PLAT_STR___RSQRTEF__ \ + TF_PLAT_STR___RSQRTE__ \ + TF_PLAT_STR___TM_FENCE__ \ + TF_PLAT_STR___UPPER_REGS_DF__ \ + TF_PLAT_STR___UPPER_REGS_SF__ \ + TF_PLAT_STR___VEC__ \ + TF_PLAT_STR___VSX__ \ + TF_PLAT_STR_TERMINATOR_ + +// aarch64 and 32-bit arm optional features +#define TF_PLAT_STR_LIST___aarch64__() \ + TF_PLAT_STR___ARM_ARCH \ + TF_PLAT_STR___ARM_FEATURE_CLZ \ + TF_PLAT_STR___ARM_FEATURE_CRC32 \ + TF_PLAT_STR___ARM_FEATURE_CRC32 \ + TF_PLAT_STR___ARM_FEATURE_CRYPTO \ + TF_PLAT_STR___ARM_FEATURE_DIRECTED_ROUNDING \ + TF_PLAT_STR___ARM_FEATURE_DSP \ + TF_PLAT_STR___ARM_FEATURE_FMA \ + TF_PLAT_STR___ARM_FEATURE_IDIV \ + TF_PLAT_STR___ARM_FEATURE_LDREX \ + TF_PLAT_STR___ARM_FEATURE_NUMERIC_MAXMIN \ + TF_PLAT_STR___ARM_FEATURE_QBIT \ + TF_PLAT_STR___ARM_FEATURE_QRDMX \ + TF_PLAT_STR___ARM_FEATURE_SAT \ + TF_PLAT_STR___ARM_FEATURE_SIMD32 \ + TF_PLAT_STR___ARM_FEATURE_UNALIGNED \ + TF_PLAT_STR___ARM_FP \ + TF_PLAT_STR___ARM_NEON_FP \ + TF_PLAT_STR___ARM_NEON__ \ + TF_PLAT_STR___ARM_WMMX \ + TF_PLAT_STR___IWMMXT2__ \ + TF_PLAT_STR___IWMMXT__ \ + TF_PLAT_STR___VFP_FP__ \ + TF_PLAT_STR_TERMINATOR_ + +// Generic features, including indication of architecture and OS. +// The _M_* macros are defined by Visual Studio. +// It doesn't define __LITTLE_ENDIAN__ or __BYTE_ORDER__; +// Windows is assumed to be little endian. +#define TF_PLAT_STR_LIST___generic__() \ + TF_PLAT_STR_TARGET_IPHONE_SIMULATOR \ + TF_PLAT_STR_TARGET_OS_IOS \ + TF_PLAT_STR_TARGET_OS_IPHONE \ + TF_PLAT_STR__MSC_VER \ + TF_PLAT_STR__M_ARM \ + TF_PLAT_STR__M_ARM64 \ + TF_PLAT_STR__M_ARM_ARMV7VE \ + TF_PLAT_STR__M_ARM_FP \ + TF_PLAT_STR__M_IX86 \ + TF_PLAT_STR__M_X64 \ + TF_PLAT_STR__WIN32 \ + TF_PLAT_STR__WIN64 \ + TF_PLAT_STR___ANDROID__ \ + TF_PLAT_STR___APPLE__ \ + TF_PLAT_STR___BYTE_ORDER__ \ + TF_PLAT_STR___CYGWIN__ \ + TF_PLAT_STR___FreeBSD__ \ + TF_PLAT_STR___LITTLE_ENDIAN__ \ + TF_PLAT_STR___NetBSD__ \ + TF_PLAT_STR___OpenBSD__ \ + TF_PLAT_STR_____MSYS__ \ + TF_PLAT_STR___aarch64__ \ + TF_PLAT_STR___alpha__ \ + TF_PLAT_STR___arm__ \ + TF_PLAT_STR___i386__ \ + TF_PLAT_STR___i686__ \ + TF_PLAT_STR___ia64__ \ + TF_PLAT_STR___linux__ \ + TF_PLAT_STR___mips32__ \ + TF_PLAT_STR___mips64__ \ + TF_PLAT_STR___powerpc64__ \ + TF_PLAT_STR___powerpc__ \ + TF_PLAT_STR___riscv___ \ + TF_PLAT_STR___s390x__ \ + TF_PLAT_STR___sparc64__ \ + TF_PLAT_STR___sparc__ \ + TF_PLAT_STR___x86_64__ \ + TF_PLAT_STR_TERMINATOR_ + +#if !defined(__x86_64__) && !defined(_M_X64) && \ + !defined(__i386__) && !defined(_M_IX86) +#undef TF_PLAT_STR_LIST___x86_64__ +#define TF_PLAT_STR_LIST___x86_64__() +#endif +#if !defined(__powerpc64__) && !defined(__powerpc__) +#undef TF_PLAT_STR_LIST___powerpc64__ +#define TF_PLAT_STR_LIST___powerpc64__() +#endif +#if !defined(__aarch64__) && !defined(_M_ARM64) && \ + !defined(__arm__) && !defined(_M_ARM) +#undef TF_PLAT_STR_LIST___aarch64__ +#define TF_PLAT_STR_LIST___aarch64__() +#endif + +// Macro to be used in each dynamically loadable library. +// +// The BSS global variable tf_cpu_option_global and the class +// instance tf_cpu_option_avoid_omit_class are needed to prevent +// compilers/linkers such as clang from omitting the static variable +// tf_cpu_option[], which would otherwise appear to be unused. We cannot make +// tf_cpu_option[] global, because we then might get multiply-defined symbols +// if TF_PLAT_STR() is used twice in the same library. +// (tf_cpu_option_global doesn't see such errors because it is +// defined in BSS, so multiple definitions are combined by the linker.) gcc's +// __attribute__((used)) is insufficient because it seems to be ignored by +// linkers. +#define TF_PLATFORM_STRINGS() \ + static const char tf_cpu_option[] = \ + TF_PLAT_STR_MAGIC_PREFIX_ "TF_PLAT_STR_VERSION=" TF_PLAT_STR_VERSION_ \ + TF_PLAT_STR_LIST___x86_64__() \ + TF_PLAT_STR_LIST___powerpc64__() \ + TF_PLAT_STR_LIST___aarch64__() \ + TF_PLAT_STR_LIST___generic__() \ + ; \ + const char *tf_cpu_option_global; \ + namespace { \ + class TFCPUOptionHelper { \ + public: \ + TFCPUOptionHelper() { \ + /* Compilers/linkers remove unused variables aggressively. The */ \ + /* following gyrations subvert most such optimizations. */ \ + tf_cpu_option_global = tf_cpu_option; \ + /* Nothing is printed because the string starts with a nul. */ \ + printf("%s%s", tf_cpu_option, ""); \ + } \ + } tf_cpu_option_avoid_omit_class; \ + } /* anonymous namespace */ +// clang-format on + +namespace tensorflow { + +// Retrieves the platform strings from the file at the given path and appends +// them to the given vector. If the returned int is non-zero, an error occurred +// reading the file and vector may or may not be modified. The returned error +// code is suitable for use with strerror(). +int GetPlatformStrings(const std::string& path, + std::vector* found); + +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_PLATFORM_PLATFORM_STRINGS_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/platform_strings_computed.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/platform_strings_computed.h new file mode 100644 index 0000000000000000000000000000000000000000..6a17f3bfc3a866ee1fd4945e9ade5a3e379eefa3 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/platform_strings_computed.h @@ -0,0 +1,735 @@ +/* Copyright 2018 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ +// Generated from platform_strings.h. + +#ifndef TENSORFLOW_CORE_PLATFORM_PLATFORM_STRINGS_COMPUTED_H_ +#define TENSORFLOW_CORE_PLATFORM_PLATFORM_STRINGS_COMPUTED_H_ + +#if defined(_M_IX86_FP) +#define TF_PLAT_STR__M_IX86_FP TF_PLAT_STR_(_M_IX86_FP) +#else +#define TF_PLAT_STR__M_IX86_FP +#endif +#if defined(_NO_PREFETCHW) +#define TF_PLAT_STR__NO_PREFETCHW TF_PLAT_STR_(_NO_PREFETCHW) +#else +#define TF_PLAT_STR__NO_PREFETCHW +#endif +#if defined(__3dNOW_A__) +#define TF_PLAT_STR___3dNOW_A__ TF_PLAT_STR_(__3dNOW_A__) +#else +#define TF_PLAT_STR___3dNOW_A__ +#endif +#if defined(__3dNOW__) +#define TF_PLAT_STR___3dNOW__ TF_PLAT_STR_(__3dNOW__) +#else +#define TF_PLAT_STR___3dNOW__ +#endif +#if defined(__ABM__) +#define TF_PLAT_STR___ABM__ TF_PLAT_STR_(__ABM__) +#else +#define TF_PLAT_STR___ABM__ +#endif +#if defined(__ADX__) +#define TF_PLAT_STR___ADX__ TF_PLAT_STR_(__ADX__) +#else +#define TF_PLAT_STR___ADX__ +#endif +#if defined(__AES__) +#define TF_PLAT_STR___AES__ TF_PLAT_STR_(__AES__) +#else +#define TF_PLAT_STR___AES__ +#endif +#if defined(__AVX2__) +#define TF_PLAT_STR___AVX2__ TF_PLAT_STR_(__AVX2__) +#else +#define TF_PLAT_STR___AVX2__ +#endif +#if defined(__AVX512BW__) +#define TF_PLAT_STR___AVX512BW__ TF_PLAT_STR_(__AVX512BW__) +#else +#define TF_PLAT_STR___AVX512BW__ +#endif +#if defined(__AVX512CD__) +#define TF_PLAT_STR___AVX512CD__ TF_PLAT_STR_(__AVX512CD__) +#else +#define TF_PLAT_STR___AVX512CD__ +#endif +#if defined(__AVX512DQ__) +#define TF_PLAT_STR___AVX512DQ__ TF_PLAT_STR_(__AVX512DQ__) +#else +#define TF_PLAT_STR___AVX512DQ__ +#endif +#if defined(__AVX512ER__) +#define TF_PLAT_STR___AVX512ER__ TF_PLAT_STR_(__AVX512ER__) +#else +#define TF_PLAT_STR___AVX512ER__ +#endif +#if defined(__AVX512F__) +#define TF_PLAT_STR___AVX512F__ TF_PLAT_STR_(__AVX512F__) +#else +#define TF_PLAT_STR___AVX512F__ +#endif +#if defined(__AVX512IFMA__) +#define TF_PLAT_STR___AVX512IFMA__ TF_PLAT_STR_(__AVX512IFMA__) +#else +#define TF_PLAT_STR___AVX512IFMA__ +#endif +#if defined(__AVX512PF__) +#define TF_PLAT_STR___AVX512PF__ TF_PLAT_STR_(__AVX512PF__) +#else +#define TF_PLAT_STR___AVX512PF__ +#endif +#if defined(__AVX512VBMI__) +#define TF_PLAT_STR___AVX512VBMI__ TF_PLAT_STR_(__AVX512VBMI__) +#else +#define TF_PLAT_STR___AVX512VBMI__ +#endif +#if defined(__AVX512VL__) +#define TF_PLAT_STR___AVX512VL__ TF_PLAT_STR_(__AVX512VL__) +#else +#define TF_PLAT_STR___AVX512VL__ +#endif +#if defined(__AVX__) +#define TF_PLAT_STR___AVX__ TF_PLAT_STR_(__AVX__) +#else +#define TF_PLAT_STR___AVX__ +#endif +#if defined(__BMI2__) +#define TF_PLAT_STR___BMI2__ TF_PLAT_STR_(__BMI2__) +#else +#define TF_PLAT_STR___BMI2__ +#endif +#if defined(__BMI__) +#define TF_PLAT_STR___BMI__ TF_PLAT_STR_(__BMI__) +#else +#define TF_PLAT_STR___BMI__ +#endif +#if defined(__CLFLUSHOPT__) +#define TF_PLAT_STR___CLFLUSHOPT__ TF_PLAT_STR_(__CLFLUSHOPT__) +#else +#define TF_PLAT_STR___CLFLUSHOPT__ +#endif +#if defined(__CLZERO__) +#define TF_PLAT_STR___CLZERO__ TF_PLAT_STR_(__CLZERO__) +#else +#define TF_PLAT_STR___CLZERO__ +#endif +#if defined(__F16C__) +#define TF_PLAT_STR___F16C__ TF_PLAT_STR_(__F16C__) +#else +#define TF_PLAT_STR___F16C__ +#endif +#if defined(__FMA4__) +#define TF_PLAT_STR___FMA4__ TF_PLAT_STR_(__FMA4__) +#else +#define TF_PLAT_STR___FMA4__ +#endif +#if defined(__FMA__) +#define TF_PLAT_STR___FMA__ TF_PLAT_STR_(__FMA__) +#else +#define TF_PLAT_STR___FMA__ +#endif +#if defined(__FP_FAST_FMA) +#define TF_PLAT_STR___FP_FAST_FMA TF_PLAT_STR_(__FP_FAST_FMA) +#else +#define TF_PLAT_STR___FP_FAST_FMA +#endif +#if defined(__FP_FAST_FMAF) +#define TF_PLAT_STR___FP_FAST_FMAF TF_PLAT_STR_(__FP_FAST_FMAF) +#else +#define TF_PLAT_STR___FP_FAST_FMAF +#endif +#if defined(__FSGSBASE__) +#define TF_PLAT_STR___FSGSBASE__ TF_PLAT_STR_(__FSGSBASE__) +#else +#define TF_PLAT_STR___FSGSBASE__ +#endif +#if defined(__FXSR__) +#define TF_PLAT_STR___FXSR__ TF_PLAT_STR_(__FXSR__) +#else +#define TF_PLAT_STR___FXSR__ +#endif +#if defined(__LWP__) +#define TF_PLAT_STR___LWP__ TF_PLAT_STR_(__LWP__) +#else +#define TF_PLAT_STR___LWP__ +#endif +#if defined(__LZCNT__) +#define TF_PLAT_STR___LZCNT__ TF_PLAT_STR_(__LZCNT__) +#else +#define TF_PLAT_STR___LZCNT__ +#endif +#if defined(__MMX__) +#define TF_PLAT_STR___MMX__ TF_PLAT_STR_(__MMX__) +#else +#define TF_PLAT_STR___MMX__ +#endif +#if defined(__MWAITX__) +#define TF_PLAT_STR___MWAITX__ TF_PLAT_STR_(__MWAITX__) +#else +#define TF_PLAT_STR___MWAITX__ +#endif +#if defined(__PCLMUL__) +#define TF_PLAT_STR___PCLMUL__ TF_PLAT_STR_(__PCLMUL__) +#else +#define TF_PLAT_STR___PCLMUL__ +#endif +#if defined(__PKU__) +#define TF_PLAT_STR___PKU__ TF_PLAT_STR_(__PKU__) +#else +#define TF_PLAT_STR___PKU__ +#endif +#if defined(__POPCNT__) +#define TF_PLAT_STR___POPCNT__ TF_PLAT_STR_(__POPCNT__) +#else +#define TF_PLAT_STR___POPCNT__ +#endif +#if defined(__PRFCHW__) +#define TF_PLAT_STR___PRFCHW__ TF_PLAT_STR_(__PRFCHW__) +#else +#define TF_PLAT_STR___PRFCHW__ +#endif +#if defined(__RDRND__) +#define TF_PLAT_STR___RDRND__ TF_PLAT_STR_(__RDRND__) +#else +#define TF_PLAT_STR___RDRND__ +#endif +#if defined(__RDSEED__) +#define TF_PLAT_STR___RDSEED__ TF_PLAT_STR_(__RDSEED__) +#else +#define TF_PLAT_STR___RDSEED__ +#endif +#if defined(__RTM__) +#define TF_PLAT_STR___RTM__ TF_PLAT_STR_(__RTM__) +#else +#define TF_PLAT_STR___RTM__ +#endif +#if defined(__SHA__) +#define TF_PLAT_STR___SHA__ TF_PLAT_STR_(__SHA__) +#else +#define TF_PLAT_STR___SHA__ +#endif +#if defined(__SSE2_MATH__) +#define TF_PLAT_STR___SSE2_MATH__ TF_PLAT_STR_(__SSE2_MATH__) +#else +#define TF_PLAT_STR___SSE2_MATH__ +#endif +#if defined(__SSE2__) +#define TF_PLAT_STR___SSE2__ TF_PLAT_STR_(__SSE2__) +#else +#define TF_PLAT_STR___SSE2__ +#endif +#if defined(__SSE_MATH__) +#define TF_PLAT_STR___SSE_MATH__ TF_PLAT_STR_(__SSE_MATH__) +#else +#define TF_PLAT_STR___SSE_MATH__ +#endif +#if defined(__SSE__) +#define TF_PLAT_STR___SSE__ TF_PLAT_STR_(__SSE__) +#else +#define TF_PLAT_STR___SSE__ +#endif +#if defined(__SSE3__) +#define TF_PLAT_STR___SSE3__ TF_PLAT_STR_(__SSE3__) +#else +#define TF_PLAT_STR___SSE3__ +#endif +#if defined(__SSE4A__) +#define TF_PLAT_STR___SSE4A__ TF_PLAT_STR_(__SSE4A__) +#else +#define TF_PLAT_STR___SSE4A__ +#endif +#if defined(__SSE4_1__) +#define TF_PLAT_STR___SSE4_1__ TF_PLAT_STR_(__SSE4_1__) +#else +#define TF_PLAT_STR___SSE4_1__ +#endif +#if defined(__SSE4_2__) +#define TF_PLAT_STR___SSE4_2__ TF_PLAT_STR_(__SSE4_2__) +#else +#define TF_PLAT_STR___SSE4_2__ +#endif +#if defined(__SSSE3__) +#define TF_PLAT_STR___SSSE3__ TF_PLAT_STR_(__SSSE3__) +#else +#define TF_PLAT_STR___SSSE3__ +#endif +#if defined(__TBM__) +#define TF_PLAT_STR___TBM__ TF_PLAT_STR_(__TBM__) +#else +#define TF_PLAT_STR___TBM__ +#endif +#if defined(__XOP__) +#define TF_PLAT_STR___XOP__ TF_PLAT_STR_(__XOP__) +#else +#define TF_PLAT_STR___XOP__ +#endif +#if defined(__XSAVEC__) +#define TF_PLAT_STR___XSAVEC__ TF_PLAT_STR_(__XSAVEC__) +#else +#define TF_PLAT_STR___XSAVEC__ +#endif +#if defined(__XSAVEOPT__) +#define TF_PLAT_STR___XSAVEOPT__ TF_PLAT_STR_(__XSAVEOPT__) +#else +#define TF_PLAT_STR___XSAVEOPT__ +#endif +#if defined(__XSAVES__) +#define TF_PLAT_STR___XSAVES__ TF_PLAT_STR_(__XSAVES__) +#else +#define TF_PLAT_STR___XSAVES__ +#endif +#if defined(__XSAVE__) +#define TF_PLAT_STR___XSAVE__ TF_PLAT_STR_(__XSAVE__) +#else +#define TF_PLAT_STR___XSAVE__ +#endif +#if defined(_SOFT_DOUBLE) +#define TF_PLAT_STR__SOFT_DOUBLE TF_PLAT_STR_(_SOFT_DOUBLE) +#else +#define TF_PLAT_STR__SOFT_DOUBLE +#endif +#if defined(_SOFT_FLOAT) +#define TF_PLAT_STR__SOFT_FLOAT TF_PLAT_STR_(_SOFT_FLOAT) +#else +#define TF_PLAT_STR__SOFT_FLOAT +#endif +#if defined(__ALTIVEC__) +#define TF_PLAT_STR___ALTIVEC__ TF_PLAT_STR_(__ALTIVEC__) +#else +#define TF_PLAT_STR___ALTIVEC__ +#endif +#if defined(__APPLE_ALTIVEC__) +#define TF_PLAT_STR___APPLE_ALTIVEC__ TF_PLAT_STR_(__APPLE_ALTIVEC__) +#else +#define TF_PLAT_STR___APPLE_ALTIVEC__ +#endif +#if defined(__CRYPTO__) +#define TF_PLAT_STR___CRYPTO__ TF_PLAT_STR_(__CRYPTO__) +#else +#define TF_PLAT_STR___CRYPTO__ +#endif +#if defined(__FLOAT128_HARDWARE__) +#define TF_PLAT_STR___FLOAT128_HARDWARE__ TF_PLAT_STR_(__FLOAT128_HARDWARE__) +#else +#define TF_PLAT_STR___FLOAT128_HARDWARE__ +#endif +#if defined(__FLOAT128_TYPE__) +#define TF_PLAT_STR___FLOAT128_TYPE__ TF_PLAT_STR_(__FLOAT128_TYPE__) +#else +#define TF_PLAT_STR___FLOAT128_TYPE__ +#endif +#if defined(__FP_FAST_FMA) +#define TF_PLAT_STR___FP_FAST_FMA TF_PLAT_STR_(__FP_FAST_FMA) +#else +#define TF_PLAT_STR___FP_FAST_FMA +#endif +#if defined(__FP_FAST_FMAF) +#define TF_PLAT_STR___FP_FAST_FMAF TF_PLAT_STR_(__FP_FAST_FMAF) +#else +#define TF_PLAT_STR___FP_FAST_FMAF +#endif +#if defined(__HTM__) +#define TF_PLAT_STR___HTM__ TF_PLAT_STR_(__HTM__) +#else +#define TF_PLAT_STR___HTM__ +#endif +#if defined(__NO_FPRS__) +#define TF_PLAT_STR___NO_FPRS__ TF_PLAT_STR_(__NO_FPRS__) +#else +#define TF_PLAT_STR___NO_FPRS__ +#endif +#if defined(__NO_LWSYNC__) +#define TF_PLAT_STR___NO_LWSYNC__ TF_PLAT_STR_(__NO_LWSYNC__) +#else +#define TF_PLAT_STR___NO_LWSYNC__ +#endif +#if defined(__POWER8_VECTOR__) +#define TF_PLAT_STR___POWER8_VECTOR__ TF_PLAT_STR_(__POWER8_VECTOR__) +#else +#define TF_PLAT_STR___POWER8_VECTOR__ +#endif +#if defined(__POWER9_VECTOR__) +#define TF_PLAT_STR___POWER9_VECTOR__ TF_PLAT_STR_(__POWER9_VECTOR__) +#else +#define TF_PLAT_STR___POWER9_VECTOR__ +#endif +#if defined(__PPC405__) +#define TF_PLAT_STR___PPC405__ TF_PLAT_STR_(__PPC405__) +#else +#define TF_PLAT_STR___PPC405__ +#endif +#if defined(__QUAD_MEMORY_ATOMIC__) +#define TF_PLAT_STR___QUAD_MEMORY_ATOMIC__ TF_PLAT_STR_(__QUAD_MEMORY_ATOMIC__) +#else +#define TF_PLAT_STR___QUAD_MEMORY_ATOMIC__ +#endif +#if defined(__RECIPF__) +#define TF_PLAT_STR___RECIPF__ TF_PLAT_STR_(__RECIPF__) +#else +#define TF_PLAT_STR___RECIPF__ +#endif +#if defined(__RECIP_PRECISION__) +#define TF_PLAT_STR___RECIP_PRECISION__ TF_PLAT_STR_(__RECIP_PRECISION__) +#else +#define TF_PLAT_STR___RECIP_PRECISION__ +#endif +#if defined(__RECIP__) +#define TF_PLAT_STR___RECIP__ TF_PLAT_STR_(__RECIP__) +#else +#define TF_PLAT_STR___RECIP__ +#endif +#if defined(__RSQRTEF__) +#define TF_PLAT_STR___RSQRTEF__ TF_PLAT_STR_(__RSQRTEF__) +#else +#define TF_PLAT_STR___RSQRTEF__ +#endif +#if defined(__RSQRTE__) +#define TF_PLAT_STR___RSQRTE__ TF_PLAT_STR_(__RSQRTE__) +#else +#define TF_PLAT_STR___RSQRTE__ +#endif +#if defined(__TM_FENCE__) +#define TF_PLAT_STR___TM_FENCE__ TF_PLAT_STR_(__TM_FENCE__) +#else +#define TF_PLAT_STR___TM_FENCE__ +#endif +#if defined(__UPPER_REGS_DF__) +#define TF_PLAT_STR___UPPER_REGS_DF__ TF_PLAT_STR_(__UPPER_REGS_DF__) +#else +#define TF_PLAT_STR___UPPER_REGS_DF__ +#endif +#if defined(__UPPER_REGS_SF__) +#define TF_PLAT_STR___UPPER_REGS_SF__ TF_PLAT_STR_(__UPPER_REGS_SF__) +#else +#define TF_PLAT_STR___UPPER_REGS_SF__ +#endif +#if defined(__VEC__) +#define TF_PLAT_STR___VEC__ TF_PLAT_STR_(__VEC__) +#else +#define TF_PLAT_STR___VEC__ +#endif +#if defined(__VSX__) +#define TF_PLAT_STR___VSX__ TF_PLAT_STR_(__VSX__) +#else +#define TF_PLAT_STR___VSX__ +#endif +#if defined(__ARM_ARCH) +#define TF_PLAT_STR___ARM_ARCH TF_PLAT_STR_(__ARM_ARCH) +#else +#define TF_PLAT_STR___ARM_ARCH +#endif +#if defined(__ARM_FEATURE_CLZ) +#define TF_PLAT_STR___ARM_FEATURE_CLZ TF_PLAT_STR_(__ARM_FEATURE_CLZ) +#else +#define TF_PLAT_STR___ARM_FEATURE_CLZ +#endif +#if defined(__ARM_FEATURE_CRC32) +#define TF_PLAT_STR___ARM_FEATURE_CRC32 TF_PLAT_STR_(__ARM_FEATURE_CRC32) +#else +#define TF_PLAT_STR___ARM_FEATURE_CRC32 +#endif +#if defined(__ARM_FEATURE_CRC32) +#define TF_PLAT_STR___ARM_FEATURE_CRC32 TF_PLAT_STR_(__ARM_FEATURE_CRC32) +#else +#define TF_PLAT_STR___ARM_FEATURE_CRC32 +#endif +#if defined(__ARM_FEATURE_CRYPTO) +#define TF_PLAT_STR___ARM_FEATURE_CRYPTO TF_PLAT_STR_(__ARM_FEATURE_CRYPTO) +#else +#define TF_PLAT_STR___ARM_FEATURE_CRYPTO +#endif +#if defined(__ARM_FEATURE_DIRECTED_ROUNDING) +#define TF_PLAT_STR___ARM_FEATURE_DIRECTED_ROUNDING \ + TF_PLAT_STR_(__ARM_FEATURE_DIRECTED_ROUNDING) +#else +#define TF_PLAT_STR___ARM_FEATURE_DIRECTED_ROUNDING +#endif +#if defined(__ARM_FEATURE_DSP) +#define TF_PLAT_STR___ARM_FEATURE_DSP TF_PLAT_STR_(__ARM_FEATURE_DSP) +#else +#define TF_PLAT_STR___ARM_FEATURE_DSP +#endif +#if defined(__ARM_FEATURE_FMA) +#define TF_PLAT_STR___ARM_FEATURE_FMA TF_PLAT_STR_(__ARM_FEATURE_FMA) +#else +#define TF_PLAT_STR___ARM_FEATURE_FMA +#endif +#if defined(__ARM_FEATURE_IDIV) +#define TF_PLAT_STR___ARM_FEATURE_IDIV TF_PLAT_STR_(__ARM_FEATURE_IDIV) +#else +#define TF_PLAT_STR___ARM_FEATURE_IDIV +#endif +#if defined(__ARM_FEATURE_LDREX) +#define TF_PLAT_STR___ARM_FEATURE_LDREX TF_PLAT_STR_(__ARM_FEATURE_LDREX) +#else +#define TF_PLAT_STR___ARM_FEATURE_LDREX +#endif +#if defined(__ARM_FEATURE_NUMERIC_MAXMIN) +#define TF_PLAT_STR___ARM_FEATURE_NUMERIC_MAXMIN \ + TF_PLAT_STR_(__ARM_FEATURE_NUMERIC_MAXMIN) +#else +#define TF_PLAT_STR___ARM_FEATURE_NUMERIC_MAXMIN +#endif +#if defined(__ARM_FEATURE_QBIT) +#define TF_PLAT_STR___ARM_FEATURE_QBIT TF_PLAT_STR_(__ARM_FEATURE_QBIT) +#else +#define TF_PLAT_STR___ARM_FEATURE_QBIT +#endif +#if defined(__ARM_FEATURE_QRDMX) +#define TF_PLAT_STR___ARM_FEATURE_QRDMX TF_PLAT_STR_(__ARM_FEATURE_QRDMX) +#else +#define TF_PLAT_STR___ARM_FEATURE_QRDMX +#endif +#if defined(__ARM_FEATURE_SAT) +#define TF_PLAT_STR___ARM_FEATURE_SAT TF_PLAT_STR_(__ARM_FEATURE_SAT) +#else +#define TF_PLAT_STR___ARM_FEATURE_SAT +#endif +#if defined(__ARM_FEATURE_SIMD32) +#define TF_PLAT_STR___ARM_FEATURE_SIMD32 TF_PLAT_STR_(__ARM_FEATURE_SIMD32) +#else +#define TF_PLAT_STR___ARM_FEATURE_SIMD32 +#endif +#if defined(__ARM_FEATURE_UNALIGNED) +#define TF_PLAT_STR___ARM_FEATURE_UNALIGNED \ + TF_PLAT_STR_(__ARM_FEATURE_UNALIGNED) +#else +#define TF_PLAT_STR___ARM_FEATURE_UNALIGNED +#endif +#if defined(__ARM_FP) +#define TF_PLAT_STR___ARM_FP TF_PLAT_STR_(__ARM_FP) +#else +#define TF_PLAT_STR___ARM_FP +#endif +#if defined(__ARM_NEON_FP) +#define TF_PLAT_STR___ARM_NEON_FP TF_PLAT_STR_(__ARM_NEON_FP) +#else +#define TF_PLAT_STR___ARM_NEON_FP +#endif +#if defined(__ARM_NEON__) +#define TF_PLAT_STR___ARM_NEON__ TF_PLAT_STR_(__ARM_NEON__) +#else +#define TF_PLAT_STR___ARM_NEON__ +#endif +#if defined(__ARM_WMMX) +#define TF_PLAT_STR___ARM_WMMX TF_PLAT_STR_(__ARM_WMMX) +#else +#define TF_PLAT_STR___ARM_WMMX +#endif +#if defined(__IWMMXT2__) +#define TF_PLAT_STR___IWMMXT2__ TF_PLAT_STR_(__IWMMXT2__) +#else +#define TF_PLAT_STR___IWMMXT2__ +#endif +#if defined(__IWMMXT__) +#define TF_PLAT_STR___IWMMXT__ TF_PLAT_STR_(__IWMMXT__) +#else +#define TF_PLAT_STR___IWMMXT__ +#endif +#if defined(__VFP_FP__) +#define TF_PLAT_STR___VFP_FP__ TF_PLAT_STR_(__VFP_FP__) +#else +#define TF_PLAT_STR___VFP_FP__ +#endif +#if defined(TARGET_IPHONE_SIMULATOR) +#define TF_PLAT_STR_TARGET_IPHONE_SIMULATOR \ + TF_PLAT_STR_(TARGET_IPHONE_SIMULATOR) +#else +#define TF_PLAT_STR_TARGET_IPHONE_SIMULATOR +#endif +#if defined(TARGET_OS_IOS) +#define TF_PLAT_STR_TARGET_OS_IOS TF_PLAT_STR_(TARGET_OS_IOS) +#else +#define TF_PLAT_STR_TARGET_OS_IOS +#endif +#if defined(TARGET_OS_IPHONE) +#define TF_PLAT_STR_TARGET_OS_IPHONE TF_PLAT_STR_(TARGET_OS_IPHONE) +#else +#define TF_PLAT_STR_TARGET_OS_IPHONE +#endif +#if defined(_MSC_VER) +#define TF_PLAT_STR__MSC_VER TF_PLAT_STR_(_MSC_VER) +#else +#define TF_PLAT_STR__MSC_VER +#endif +#if defined(_M_ARM) +#define TF_PLAT_STR__M_ARM TF_PLAT_STR_(_M_ARM) +#else +#define TF_PLAT_STR__M_ARM +#endif +#if defined(_M_ARM64) +#define TF_PLAT_STR__M_ARM64 TF_PLAT_STR_(_M_ARM64) +#else +#define TF_PLAT_STR__M_ARM64 +#endif +#if defined(_M_ARM_ARMV7VE) +#define TF_PLAT_STR__M_ARM_ARMV7VE TF_PLAT_STR_(_M_ARM_ARMV7VE) +#else +#define TF_PLAT_STR__M_ARM_ARMV7VE +#endif +#if defined(_M_ARM_FP) +#define TF_PLAT_STR__M_ARM_FP TF_PLAT_STR_(_M_ARM_FP) +#else +#define TF_PLAT_STR__M_ARM_FP +#endif +#if defined(_M_IX86) +#define TF_PLAT_STR__M_IX86 TF_PLAT_STR_(_M_IX86) +#else +#define TF_PLAT_STR__M_IX86 +#endif +#if defined(_M_X64) +#define TF_PLAT_STR__M_X64 TF_PLAT_STR_(_M_X64) +#else +#define TF_PLAT_STR__M_X64 +#endif +#if defined(_WIN32) +#define TF_PLAT_STR__WIN32 TF_PLAT_STR_(_WIN32) +#else +#define TF_PLAT_STR__WIN32 +#endif +#if defined(_WIN64) +#define TF_PLAT_STR__WIN64 TF_PLAT_STR_(_WIN64) +#else +#define TF_PLAT_STR__WIN64 +#endif +#if defined(__ANDROID__) +#define TF_PLAT_STR___ANDROID__ TF_PLAT_STR_(__ANDROID__) +#else +#define TF_PLAT_STR___ANDROID__ +#endif +#if defined(__APPLE__) +#define TF_PLAT_STR___APPLE__ TF_PLAT_STR_(__APPLE__) +#else +#define TF_PLAT_STR___APPLE__ +#endif +#if defined(__BYTE_ORDER__) +#define TF_PLAT_STR___BYTE_ORDER__ TF_PLAT_STR_(__BYTE_ORDER__) +#else +#define TF_PLAT_STR___BYTE_ORDER__ +#endif +#if defined(__CYGWIN__) +#define TF_PLAT_STR___CYGWIN__ TF_PLAT_STR_(__CYGWIN__) +#else +#define TF_PLAT_STR___CYGWIN__ +#endif +#if defined(__FreeBSD__) +#define TF_PLAT_STR___FreeBSD__ TF_PLAT_STR_(__FreeBSD__) +#else +#define TF_PLAT_STR___FreeBSD__ +#endif +#if defined(__LITTLE_ENDIAN__) +#define TF_PLAT_STR___LITTLE_ENDIAN__ TF_PLAT_STR_(__LITTLE_ENDIAN__) +#else +#define TF_PLAT_STR___LITTLE_ENDIAN__ +#endif +#if defined(__NetBSD__) +#define TF_PLAT_STR___NetBSD__ TF_PLAT_STR_(__NetBSD__) +#else +#define TF_PLAT_STR___NetBSD__ +#endif +#if defined(__OpenBSD__) +#define TF_PLAT_STR___OpenBSD__ TF_PLAT_STR_(__OpenBSD__) +#else +#define TF_PLAT_STR___OpenBSD__ +#endif +#if defined(____MSYS__) +#define TF_PLAT_STR_____MSYS__ TF_PLAT_STR_(____MSYS__) +#else +#define TF_PLAT_STR_____MSYS__ +#endif +#if defined(__aarch64__) +#define TF_PLAT_STR___aarch64__ TF_PLAT_STR_(__aarch64__) +#else +#define TF_PLAT_STR___aarch64__ +#endif +#if defined(__alpha__) +#define TF_PLAT_STR___alpha__ TF_PLAT_STR_(__alpha__) +#else +#define TF_PLAT_STR___alpha__ +#endif +#if defined(__arm__) +#define TF_PLAT_STR___arm__ TF_PLAT_STR_(__arm__) +#else +#define TF_PLAT_STR___arm__ +#endif +#if defined(__i386__) +#define TF_PLAT_STR___i386__ TF_PLAT_STR_(__i386__) +#else +#define TF_PLAT_STR___i386__ +#endif +#if defined(__i686__) +#define TF_PLAT_STR___i686__ TF_PLAT_STR_(__i686__) +#else +#define TF_PLAT_STR___i686__ +#endif +#if defined(__ia64__) +#define TF_PLAT_STR___ia64__ TF_PLAT_STR_(__ia64__) +#else +#define TF_PLAT_STR___ia64__ +#endif +#if defined(__linux__) +#define TF_PLAT_STR___linux__ TF_PLAT_STR_(__linux__) +#else +#define TF_PLAT_STR___linux__ +#endif +#if defined(__mips32__) +#define TF_PLAT_STR___mips32__ TF_PLAT_STR_(__mips32__) +#else +#define TF_PLAT_STR___mips32__ +#endif +#if defined(__mips64__) +#define TF_PLAT_STR___mips64__ TF_PLAT_STR_(__mips64__) +#else +#define TF_PLAT_STR___mips64__ +#endif +#if defined(__powerpc64__) +#define TF_PLAT_STR___powerpc64__ TF_PLAT_STR_(__powerpc64__) +#else +#define TF_PLAT_STR___powerpc64__ +#endif +#if defined(__powerpc__) +#define TF_PLAT_STR___powerpc__ TF_PLAT_STR_(__powerpc__) +#else +#define TF_PLAT_STR___powerpc__ +#endif +#if defined(__riscv___) +#define TF_PLAT_STR___riscv___ TF_PLAT_STR_(__riscv___) +#else +#define TF_PLAT_STR___riscv___ +#endif +#if defined(__s390x__) +#define TF_PLAT_STR___s390x__ TF_PLAT_STR_(__s390x__) +#else +#define TF_PLAT_STR___s390x__ +#endif +#if defined(__sparc64__) +#define TF_PLAT_STR___sparc64__ TF_PLAT_STR_(__sparc64__) +#else +#define TF_PLAT_STR___sparc64__ +#endif +#if defined(__sparc__) +#define TF_PLAT_STR___sparc__ TF_PLAT_STR_(__sparc__) +#else +#define TF_PLAT_STR___sparc__ +#endif +#if defined(__x86_64__) +#define TF_PLAT_STR___x86_64__ TF_PLAT_STR_(__x86_64__) +#else +#define TF_PLAT_STR___x86_64__ +#endif + +#endif // TENSORFLOW_CORE_PLATFORM_PLATFORM_STRINGS_COMPUTED_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/png.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/png.h new file mode 100644 index 0000000000000000000000000000000000000000..dde8ad007c6719f85c1181cee25d15e5a4acf690 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/png.h @@ -0,0 +1,22 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_PLATFORM_PNG_H_ +#define TENSORFLOW_CORE_PLATFORM_PNG_H_ + +#include "tensorflow/core/platform/platform.h" +#include "tsl/platform/png.h" + +#endif // TENSORFLOW_CORE_PLATFORM_PNG_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/prefetch.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/prefetch.h new file mode 100644 index 0000000000000000000000000000000000000000..85ffcd89c210ebc6849ba3a692f74b7755a6a0c5 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/prefetch.h @@ -0,0 +1,34 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_PLATFORM_PREFETCH_H_ +#define TENSORFLOW_CORE_PLATFORM_PREFETCH_H_ + +#include "tsl/platform/prefetch.h" + +namespace tensorflow { +namespace port { +// NOLINTBEGIN(misc-unused-using-decls) +using ::tsl::port::prefetch; +using ::tsl::port::PREFETCH_HINT_NTA; +using ::tsl::port::PREFETCH_HINT_T0; +using ::tsl::port::PREFETCH_HINT_T1; +using ::tsl::port::PREFETCH_HINT_T2; +using ::tsl::port::PrefetchHint; +// NOLINTEND(misc-unused-using-decls) +} // namespace port +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_PLATFORM_PREFETCH_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/profile_utils/android_armv7a_cpu_utils_helper.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/profile_utils/android_armv7a_cpu_utils_helper.h new file mode 100644 index 0000000000000000000000000000000000000000..210d823154aaccf200f5f226353ae86068070ad7 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/profile_utils/android_armv7a_cpu_utils_helper.h @@ -0,0 +1,40 @@ +/* Copyright 2016 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_PLATFORM_PROFILE_UTILS_ANDROID_ARMV7A_CPU_UTILS_HELPER_H_ +#define TENSORFLOW_CORE_PLATFORM_PROFILE_UTILS_ANDROID_ARMV7A_CPU_UTILS_HELPER_H_ + +#include + +#include "tensorflow/core/platform/macros.h" +#include "tensorflow/core/platform/profile_utils/i_cpu_utils_helper.h" +#include "tensorflow/core/platform/types.h" +#include "tsl/platform/profile_utils/android_armv7a_cpu_utils_helper.h" + +#if defined(__ANDROID__) && (__ANDROID_API__ >= 21) && \ + (defined(__ARM_ARCH_7A__) || defined(__aarch64__)) + +struct perf_event_attr; + +namespace tensorflow { +namespace profile_utils { +using tsl::profile_utils::AndroidArmV7ACpuUtilsHelper; // NOLINT +} // namespace profile_utils +} // namespace tensorflow + +#endif // defined(__ANDROID__) && (__ANDROID_API__ >= 21) && + // (defined(__ARM_ARCH_7A__) || defined(__aarch64__)) + +#endif // TENSORFLOW_CORE_PLATFORM_PROFILE_UTILS_ANDROID_ARMV7A_CPU_UTILS_HELPER_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/profile_utils/clock_cycle_profiler.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/profile_utils/clock_cycle_profiler.h new file mode 100644 index 0000000000000000000000000000000000000000..44de43fb298a9c866812915e7a2e3e0218d9cb3e --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/profile_utils/clock_cycle_profiler.h @@ -0,0 +1,30 @@ +/* Copyright 2017 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_PLATFORM_PROFILE_UTILS_CLOCK_CYCLE_PROFILER_H_ +#define TENSORFLOW_CORE_PLATFORM_PROFILE_UTILS_CLOCK_CYCLE_PROFILER_H_ + +#include + +#include "tensorflow/core/platform/logging.h" +#include "tensorflow/core/platform/macros.h" +#include "tensorflow/core/platform/profile_utils/cpu_utils.h" +#include "tsl/platform/profile_utils/clock_cycle_profiler.h" + +namespace tensorflow { +using tsl::ClockCycleProfiler; // NOLINT +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_PLATFORM_PROFILE_UTILS_CLOCK_CYCLE_PROFILER_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/profile_utils/cpu_utils.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/profile_utils/cpu_utils.h new file mode 100644 index 0000000000000000000000000000000000000000..b6033075e174388776469ca58f364334686f7ab6 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/profile_utils/cpu_utils.h @@ -0,0 +1,36 @@ +/* Copyright 2016 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ +// This class is designed to get accurate profile for programs. + +#ifndef TENSORFLOW_CORE_PLATFORM_PROFILE_UTILS_CPU_UTILS_H_ +#define TENSORFLOW_CORE_PLATFORM_PROFILE_UTILS_CPU_UTILS_H_ + +#include +#include + +#include "tensorflow/core/platform/macros.h" +#include "tensorflow/core/platform/profile_utils/i_cpu_utils_helper.h" +#include "tensorflow/core/platform/types.h" +#include "tsl/platform/profile_utils/cpu_utils.h" + +namespace tensorflow { + +namespace profile_utils { +using tsl::profile_utils::CpuUtils; // NOLINT +} // namespace profile_utils + +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_PLATFORM_PROFILE_UTILS_CPU_UTILS_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/profile_utils/i_cpu_utils_helper.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/profile_utils/i_cpu_utils_helper.h new file mode 100644 index 0000000000000000000000000000000000000000..1eb2684c12cf501ea12b68bd7a3e6026b91d87ef --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/profile_utils/i_cpu_utils_helper.h @@ -0,0 +1,29 @@ +/* Copyright 2016 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_PLATFORM_PROFILE_UTILS_I_CPU_UTILS_HELPER_H_ +#define TENSORFLOW_CORE_PLATFORM_PROFILE_UTILS_I_CPU_UTILS_HELPER_H_ + +#include "tensorflow/core/platform/macros.h" +#include "tensorflow/core/platform/types.h" +#include "tsl/platform/profile_utils/i_cpu_utils_helper.h" + +namespace tensorflow { +namespace profile_utils { +using tsl::profile_utils::ICpuUtilsHelper; // NOLINT +} // namespace profile_utils +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_PLATFORM_PROFILE_UTILS_I_CPU_UTILS_HELPER_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/protobuf.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/protobuf.h new file mode 100644 index 0000000000000000000000000000000000000000..d7dda8b3d7c798156a41419ee2df80aa2770be47 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/protobuf.h @@ -0,0 +1,39 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_PLATFORM_PROTOBUF_H_ +#define TENSORFLOW_CORE_PLATFORM_PROTOBUF_H_ + +#include "tensorflow/core/platform/platform.h" +#include "tensorflow/core/platform/types.h" +#include "tsl/platform/protobuf.h" + +namespace tensorflow { +namespace protobuf = tsl::protobuf; // NOLINT(misc-unused-alias-decls) +// NOLINTBEGIN(misc-unused-using-decls) +using tsl::kProtobufInt64Typename; +using tsl::kProtobufUint64Typename; +using tsl::ParseFromTString; +using tsl::ParseProtoUnlimited; +using tsl::protobuf_int64; +using tsl::protobuf_uint64; +using tsl::ProtobufStringToString; +using tsl::SerializeToTString; +using tsl::SetProtobufStringSwapAllowed; +using tsl::TStringOutputStream; +// NOLINTEND(misc-unused-using-decls) +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_PLATFORM_PROTOBUF_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/protobuf_internal.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/protobuf_internal.h new file mode 100644 index 0000000000000000000000000000000000000000..5b6108db4e1df1c7bd39f1371e9d65018947944d --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/protobuf_internal.h @@ -0,0 +1,45 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_PLATFORM_PROTOBUF_INTERNAL_H_ +#define TENSORFLOW_CORE_PLATFORM_PROTOBUF_INTERNAL_H_ + +#include "google/protobuf/any.pb.h" +#include "tensorflow/core/platform/errors.h" +#include "tensorflow/core/platform/platform.h" +#include "tensorflow/core/platform/protobuf.h" +#include "tensorflow/core/platform/types.h" + +namespace tensorflow { + +// Utility for parsing an Any value with full or lite protos. +template +Status ParseAny(const google::protobuf::Any& any, T* message, + const string& type_name) { + CHECK_EQ(type_name, message->GetTypeName()); + if (!any.Is()) { + return errors::FailedPrecondition( + "Expected Any type_url for: ", message->GetTypeName(), + ". Got: ", string(any.type_url().data(), any.type_url().size()), "."); + } + if (!any.UnpackTo(message)) { + return errors::FailedPrecondition("Failed to unpack: ", any.DebugString()); + } + return OkStatus(); +} + +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_PLATFORM_PROTOBUF_INTERNAL_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/ram_file_system.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/ram_file_system.h new file mode 100644 index 0000000000000000000000000000000000000000..2043737b5140a8c3a14328c896517fb0795db5b9 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/ram_file_system.h @@ -0,0 +1,33 @@ +/* Copyright 2020 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_PLATFORM_RAM_FILE_SYSTEM_H_ +#define TENSORFLOW_CORE_PLATFORM_RAM_FILE_SYSTEM_H_ + +#include "tensorflow/core/platform/env.h" +#include "tensorflow/core/platform/file_system.h" +#include "tensorflow/core/platform/mutex.h" +#include "tensorflow/core/platform/stringpiece.h" +#include "tensorflow/core/platform/types.h" +#include "tsl/platform/ram_file_system.h" + +namespace tensorflow { +// NOLINTBEGIN(misc-unused-using-decls) +using tsl::RamFileSystem; +using tsl::RamRandomAccessFile; +// NOLINTEND(misc-unused-using-decls) +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_PLATFORM_RAM_FILE_SYSTEM_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/random.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/random.h new file mode 100644 index 0000000000000000000000000000000000000000..ceb54e4a4e939541ffaa2652369527cecf256373 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/random.h @@ -0,0 +1,29 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_PLATFORM_RANDOM_H_ +#define TENSORFLOW_CORE_PLATFORM_RANDOM_H_ + +#include "tensorflow/core/platform/types.h" +#include "tsl/platform/random.h" + +namespace tensorflow { +namespace random { +using tsl::random::New64; // NOLINT +using tsl::random::New64DefaultSeed; // NOLINT +} // namespace random +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_PLATFORM_RANDOM_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/raw_coding.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/raw_coding.h new file mode 100644 index 0000000000000000000000000000000000000000..9b3c31d6773be1f9fadc0927070a300e3bf452ad --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/raw_coding.h @@ -0,0 +1,33 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_PLATFORM_RAW_CODING_H_ +#define TENSORFLOW_CORE_PLATFORM_RAW_CODING_H_ + +#include + +#include "tsl/platform/raw_coding.h" + +namespace tensorflow { +namespace core { +// NOLINTBEGIN(misc-unused-using-decls) +using ::tsl::core::DecodeFixed16; +using ::tsl::core::DecodeFixed32; +using ::tsl::core::DecodeFixed64; +// NOLINTEND(misc-unused-using-decls) +} // namespace core +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_PLATFORM_RAW_CODING_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/refcount.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/refcount.h new file mode 100644 index 0000000000000000000000000000000000000000..9d8b21b71e73510fbbeb62d1d061a3df7c2e138c --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/refcount.h @@ -0,0 +1,36 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_PLATFORM_REFCOUNT_H_ +#define TENSORFLOW_CORE_PLATFORM_REFCOUNT_H_ + +#include "tensorflow/core/platform/mutex.h" +#include "tsl/platform/refcount.h" + +namespace tensorflow { +namespace core { +// NOLINTBEGIN(misc-unused-using-decls) +using ::tsl::core::RefCountDeleter; +using ::tsl::core::RefCounted; +using ::tsl::core::RefCountPtr; +using ::tsl::core::ScopedUnref; +using ::tsl::core::WeakNotifyFn; +using ::tsl::core::WeakPtr; +using ::tsl::core::WeakRefCounted; +// NOLINTEND(misc-unused-using-decls) +} // namespace core +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_PLATFORM_REFCOUNT_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/regexp.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/regexp.h new file mode 100644 index 0000000000000000000000000000000000000000..0c2025ad6bb5e794661cffec718c2fa1b4fc921d --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/regexp.h @@ -0,0 +1,20 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_PLATFORM_REGEXP_H_ +#define TENSORFLOW_CORE_PLATFORM_REGEXP_H_ +#include "tsl/platform/regexp.h" + +#endif // TENSORFLOW_CORE_PLATFORM_REGEXP_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/resource.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/resource.h new file mode 100644 index 0000000000000000000000000000000000000000..1088b388c77f99812501d3d2fc56c19abb3a9061 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/resource.h @@ -0,0 +1,29 @@ +/* Copyright 2020 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_PLATFORM_RESOURCE_H_ +#define TENSORFLOW_CORE_PLATFORM_RESOURCE_H_ + +#include + +#include "tsl/platform/resource.h" + +namespace tensorflow { + +using ::tsl::ResourceTagger; // NOLINT(misc-unused-using-decls) + +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_PLATFORM_RESOURCE_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/resource_loader.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/resource_loader.h new file mode 100644 index 0000000000000000000000000000000000000000..e4d6d56e92d64f25b61f1ffcd1f16a2b3361dce4 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/resource_loader.h @@ -0,0 +1,32 @@ +/* Copyright 2020 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +// Small helper library to access "data" dependencies defined in BUILD files. +// Requires the relative paths starting from tensorflow/... +// For example, to get this file, a user would call: +// GetDataDependencyFilepath("tensorflow/core/platform/resource_loadder.h") + +#ifndef TENSORFLOW_CORE_PLATFORM_RESOURCE_LOADER_H_ +#define TENSORFLOW_CORE_PLATFORM_RESOURCE_LOADER_H_ + +#include "tsl/platform/resource_loader.h" + +namespace tensorflow { + +using tsl::GetDataDependencyFilepath; + +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_PLATFORM_RESOURCE_LOADER_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/retrying_file_system.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/retrying_file_system.h new file mode 100644 index 0000000000000000000000000000000000000000..c8eb328c806468926028f9f9fd77e102fc2fa0f6 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/retrying_file_system.h @@ -0,0 +1,37 @@ +/* Copyright 2016 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_PLATFORM_RETRYING_FILE_SYSTEM_H_ +#define TENSORFLOW_CORE_PLATFORM_RETRYING_FILE_SYSTEM_H_ + +#include +#include +#include + +#include "tensorflow/core/lib/random/random.h" +#include "tensorflow/core/platform/env.h" +#include "tensorflow/core/platform/errors.h" +#include "tensorflow/core/platform/file_system.h" +#include "tensorflow/core/platform/retrying_utils.h" +#include "tensorflow/core/platform/status.h" +#include "tsl/platform/retrying_file_system.h" + +namespace tensorflow { + +using tsl::RetryingFileSystem; // NOLINT(misc-unused-using-decls) + +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_PLATFORM_RETRYING_FILE_SYSTEM_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/retrying_utils.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/retrying_utils.h new file mode 100644 index 0000000000000000000000000000000000000000..a42d02adb870b78c4537bf5cf7dbec221766cf43 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/retrying_utils.h @@ -0,0 +1,31 @@ +/* Copyright 2017 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_PLATFORM_RETRYING_UTILS_H_ +#define TENSORFLOW_CORE_PLATFORM_RETRYING_UTILS_H_ + +#include + +#include "tensorflow/core/platform/status.h" +#include "tsl/platform/retrying_utils.h" + +namespace tensorflow { +// NOLINTBEGIN(misc-unused-using-decls) +using tsl::RetryConfig; +using tsl::RetryingUtils; +// NOLINTEND(misc-unused-using-decls) +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_PLATFORM_RETRYING_UTILS_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/rocm.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/rocm.h new file mode 100644 index 0000000000000000000000000000000000000000..d653db827e8ff01dbddfa59a1f45ceeb77e64d47 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/rocm.h @@ -0,0 +1,22 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_PLATFORM_ROCM_H_ +#define TENSORFLOW_CORE_PLATFORM_ROCM_H_ + +#include "xla/stream_executor/rocm/rocm_activation.h" // IWYU pragma: keep +#include "tensorflow/core/platform/platform.h" // IWYU pragma: keep + +#endif // TENSORFLOW_CORE_PLATFORM_ROCM_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/rocm_rocdl_path.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/rocm_rocdl_path.h new file mode 100644 index 0000000000000000000000000000000000000000..dc6561310568000eb0079d64d4c2867bfc67f8d6 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/rocm_rocdl_path.h @@ -0,0 +1,27 @@ +/* Copyright 2018 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_PLATFORM_ROCM_ROCDL_PATH_H_ +#define TENSORFLOW_CORE_PLATFORM_ROCM_ROCDL_PATH_H_ + +#include "tensorflow/core/platform/types.h" +#include "tsl/platform/rocm_rocdl_path.h" + +namespace tensorflow { +using tsl::RocdlRoot; // NOLINT +using tsl::RocmRoot; // NOLINT +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_PLATFORM_ROCM_ROCDL_PATH_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/scanner.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/scanner.h new file mode 100644 index 0000000000000000000000000000000000000000..edea0a65cad492f6f665e29486c1288239c5857f --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/scanner.h @@ -0,0 +1,29 @@ +/* Copyright 2016 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_PLATFORM_SCANNER_H_ +#define TENSORFLOW_CORE_PLATFORM_SCANNER_H_ + +#include "tsl/platform/scanner.h" + +namespace tensorflow { +namespace strings { + +using ::tsl::strings::Scanner; // NOLINT(misc-unused-using-decls) + +} // namespace strings +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_PLATFORM_SCANNER_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/setround.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/setround.h new file mode 100644 index 0000000000000000000000000000000000000000..efd1f03eb8d27b02c42e75cd951a4f32939de7c0 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/setround.h @@ -0,0 +1,29 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_PLATFORM_SETROUND_H_ +#define TENSORFLOW_CORE_PLATFORM_SETROUND_H_ + +#include "tensorflow/core/platform/macros.h" +#include "tsl/platform/setround.h" + +namespace tensorflow { +namespace port { +using tsl::port::ScopedSetRound; // NOLINT + +} // namespace port +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_PLATFORM_SETROUND_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/snappy.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/snappy.h new file mode 100644 index 0000000000000000000000000000000000000000..53fa5de61ce849c204dd8c2ede785d330cf3c25d --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/snappy.h @@ -0,0 +1,40 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_PLATFORM_SNAPPY_H_ +#define TENSORFLOW_CORE_PLATFORM_SNAPPY_H_ + +#include "tensorflow/core/platform/types.h" +#include "tsl/platform/snappy.h" + +#if !defined(PLATFORM_WINDOWS) +#include +#else +namespace tensorflow { +using tsl::iovec; +} // namespace tensorflow +#endif + +namespace tensorflow { +namespace port { +using tsl::port::Snappy_Compress; +using tsl::port::Snappy_CompressFromIOVec; +using tsl::port::Snappy_GetUncompressedLength; +using tsl::port::Snappy_Uncompress; +using tsl::port::Snappy_UncompressToIOVec; +} // namespace port +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_PLATFORM_SNAPPY_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/stack_frame.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/stack_frame.h new file mode 100644 index 0000000000000000000000000000000000000000..cd5c3ff172382be85948fd99bf582f70a7e10a7c --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/stack_frame.h @@ -0,0 +1,25 @@ +/* Copyright 2020 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_PLATFORM_STACK_FRAME_H_ +#define TENSORFLOW_CORE_PLATFORM_STACK_FRAME_H_ + +#include "tsl/platform/stack_frame.h" + +namespace tensorflow { +typedef tsl::StackFrame StackFrame; +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_PLATFORM_STACK_FRAME_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/stacktrace.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/stacktrace.h new file mode 100644 index 0000000000000000000000000000000000000000..b8aaf464d851a8880c2123a7fc85452e8c8f1fe6 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/stacktrace.h @@ -0,0 +1,30 @@ +/* Copyright 2016 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_PLATFORM_STACKTRACE_H_ +#define TENSORFLOW_CORE_PLATFORM_STACKTRACE_H_ + +#include "tensorflow/core/platform/platform.h" // IWYU pragma: export +#include "tsl/platform/stacktrace.h" + +namespace tensorflow { +// NOLINTBEGIN(misc-unused-using-decls) +using tsl::CurrentStackTrace; +using tsl::DebugWriteToString; +using tsl::SavedStackTrace; +// NOLINTEND(misc-unused-using-decls) +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_PLATFORM_STACKTRACE_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/stacktrace_handler.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/stacktrace_handler.h new file mode 100644 index 0000000000000000000000000000000000000000..8a81a6a7b4c893b15b0117913d112b8b7e225d36 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/stacktrace_handler.h @@ -0,0 +1,33 @@ +/* Copyright 2017 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_PLATFORM_STACKTRACE_HANDLER_H_ +#define TENSORFLOW_CORE_PLATFORM_STACKTRACE_HANDLER_H_ + +#include "tsl/platform/stacktrace_handler.h" + +namespace tensorflow { +namespace testing { + +// Installs signal handlers to print out stack trace. +// Although GoogleTest has support for generating stacktraces with abseil via +// https://github.com/google/googletest/pull/1653, this doesn't cover our use +// case of getting C++ stacktraces in our python tests. +using tsl::testing::InstallStacktraceHandler; + +} // namespace testing +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_PLATFORM_STACKTRACE_HANDLER_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/status.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/status.h new file mode 100644 index 0000000000000000000000000000000000000000..38504fa520d2b6dae3e72354a19b18a2717aca73 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/status.h @@ -0,0 +1,45 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_PLATFORM_STATUS_H_ +#define TENSORFLOW_CORE_PLATFORM_STATUS_H_ + +#include "tensorflow/core/platform/logging.h" +#include "tensorflow/core/platform/macros.h" +#include "tensorflow/core/platform/stack_frame.h" +#include "tensorflow/core/platform/types.h" +#include "tsl/platform/status.h" + +namespace tensorflow { +// NOLINTBEGIN(misc-unused-using-decls) +using tsl::FromAbslStatus; +using tsl::OkStatus; +using tsl::Status; +using tsl::StatusCallback; +using tsl::StatusGroup; +using tsl::TfCheckOpHelper; +using tsl::TfCheckOpHelperOutOfLine; +using tsl::ToAbslStatus; + +namespace errors { +typedef tsl::errors::Code Code; +using tsl::errors::GetStackTrace; +using tsl::errors::SetStackTrace; +} // namespace errors +// NOLINTEND(misc-unused-using-decls) + +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_PLATFORM_STATUS_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/status_matchers.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/status_matchers.h new file mode 100644 index 0000000000000000000000000000000000000000..6fd5791fb7c500c260a931103d7b7d19fabcb867 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/status_matchers.h @@ -0,0 +1,46 @@ +/* Copyright 2021 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ +#ifndef TENSORFLOW_CORE_PLATFORM_STATUS_MATCHERS_H_ +#define TENSORFLOW_CORE_PLATFORM_STATUS_MATCHERS_H_ + + +#include "tensorflow/core/platform/status.h" +#include "tensorflow/core/platform/statusor.h" +#include "tensorflow/core/platform/test.h" +#include "tensorflow/core/protobuf/error_codes.pb.h" +#include "tsl/platform/status_matchers.h" + +namespace tensorflow { +// NOLINTBEGIN(misc-unused-using-decls) + +namespace testing { +namespace internal_status { +using tsl::testing::internal_status::GetStatus; +using tsl::testing::internal_status::IsOkAndHoldsMatcher; +using tsl::testing::internal_status::IsOkAndHoldsMatcherImpl; +using tsl::testing::internal_status::IsOkMatcher; +using tsl::testing::internal_status::MonoIsOkMatcherImpl; +using tsl::testing::internal_status::MonoStatusIsMatcherImpl; +using tsl::testing::internal_status::StatusIsMatcher; +using tsl::testing::internal_status::StatusIsMatcherCommonImpl; +} // namespace internal_status +using tsl::testing::IsOk; +using tsl::testing::IsOkAndHolds; +using tsl::testing::StatusIs; +// NOLINTEND(misc-unused-using-decls) +} // namespace testing +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_PLATFORM_STATUS_MATCHERS_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/statusor.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/statusor.h new file mode 100644 index 0000000000000000000000000000000000000000..1a5f77e8089ce7a6540f65dc36806b5b2311839f --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/statusor.h @@ -0,0 +1,26 @@ +/* Copyright 2017 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_PLATFORM_STATUSOR_H_ +#define TENSORFLOW_CORE_PLATFORM_STATUSOR_H_ + +#include "tensorflow/core/platform/macros.h" +#include "tensorflow/core/platform/status.h" +#include "tsl/platform/statusor.h" +namespace tensorflow { +using tsl::StatusOr; // NOLINT +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_PLATFORM_STATUSOR_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/str_util.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/str_util.h new file mode 100644 index 0000000000000000000000000000000000000000..fbea09afc9a4703597ea1418bd16d336bb38ae40 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/str_util.h @@ -0,0 +1,61 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_PLATFORM_STR_UTIL_H_ +#define TENSORFLOW_CORE_PLATFORM_STR_UTIL_H_ + +#include +#include + +#include "tensorflow/core/platform/macros.h" +#include "tensorflow/core/platform/stringpiece.h" +#include "tensorflow/core/platform/types.h" +#include "tsl/platform/str_util.h" + +// Basic string utility routines +namespace tensorflow { +namespace str_util { +// NOLINTBEGIN(misc-unused-using-decls) +using tsl::str_util::AllowEmpty; +using tsl::str_util::ArgDefCase; +using tsl::str_util::CEscape; +using tsl::str_util::ConsumeLeadingDigits; +using tsl::str_util::ConsumeNonWhitespace; +using tsl::str_util::ConsumePrefix; +using tsl::str_util::ConsumeSuffix; +using tsl::str_util::CUnescape; +using tsl::str_util::EndsWith; +using tsl::str_util::Join; +using tsl::str_util::Lowercase; +using tsl::str_util::RemoveLeadingWhitespace; +using tsl::str_util::RemoveTrailingWhitespace; +using tsl::str_util::RemoveWhitespaceContext; +using tsl::str_util::SkipEmpty; +using tsl::str_util::SkipWhitespace; +using tsl::str_util::Split; +using tsl::str_util::StartsWith; +using tsl::str_util::StrContains; +using tsl::str_util::StringReplace; +using tsl::str_util::StripPrefix; +using tsl::str_util::StripSuffix; +using tsl::str_util::StripTrailingWhitespace; +using tsl::str_util::Strnlen; +using tsl::str_util::TitlecaseString; +using tsl::str_util::Uppercase; +// NOLINTEND(misc-unused-using-decls) +} // namespace str_util +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_PLATFORM_STR_UTIL_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/strcat.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/strcat.h new file mode 100644 index 0000000000000000000000000000000000000000..9a11dd2dbb529fab749f07a542f4971b83643c4b --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/strcat.h @@ -0,0 +1,54 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_PLATFORM_STRCAT_H_ +#define TENSORFLOW_CORE_PLATFORM_STRCAT_H_ + +#include "tensorflow/core/platform/macros.h" +#include "tensorflow/core/platform/numbers.h" +#include "tensorflow/core/platform/stringpiece.h" +#include "tensorflow/core/platform/types.h" +#include "tsl/platform/strcat.h" + +namespace tensorflow { +namespace strings { + +// NOLINTBEGIN(misc-unused-using-decls) +using tsl::strings::AlphaNum; +using tsl::strings::Hex; +using tsl::strings::kZeroPad10; +using tsl::strings::kZeroPad11; +using tsl::strings::kZeroPad12; +using tsl::strings::kZeroPad13; +using tsl::strings::kZeroPad14; +using tsl::strings::kZeroPad15; +using tsl::strings::kZeroPad16; +using tsl::strings::kZeroPad2; +using tsl::strings::kZeroPad3; +using tsl::strings::kZeroPad4; +using tsl::strings::kZeroPad5; +using tsl::strings::kZeroPad6; +using tsl::strings::kZeroPad7; +using tsl::strings::kZeroPad8; +using tsl::strings::kZeroPad9; +using tsl::strings::PadSpec; +using tsl::strings::StrAppend; +using tsl::strings::StrCat; +// NOLINTEND(misc-unused-using-decls) + +} // namespace strings +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_PLATFORM_STRCAT_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/stream_executor.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/stream_executor.h new file mode 100644 index 0000000000000000000000000000000000000000..5b836e2f194d4b20864acfafccb0e57e7083fac9 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/stream_executor.h @@ -0,0 +1,34 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_PLATFORM_STREAM_EXECUTOR_H_ +#define TENSORFLOW_CORE_PLATFORM_STREAM_EXECUTOR_H_ + +#include "xla/stream_executor/cuda/cuda_platform_id.h" +#include "xla/stream_executor/device_memory.h" +#include "xla/stream_executor/dnn.h" +#include "xla/stream_executor/event.h" +#include "xla/stream_executor/host/host_platform_id.h" +#include "xla/stream_executor/multi_platform_manager.h" +#include "xla/stream_executor/platform.h" +#include "xla/stream_executor/platform/dso_loader.h" +#include "xla/stream_executor/rocm/rocm_platform_id.h" +#include "xla/stream_executor/scratch_allocator.h" +#include "xla/stream_executor/stream.h" +#include "xla/stream_executor/stream_executor.h" +#include "tensorflow/core/platform/platform.h" +#include "tensorflow/core/platform/types.h" + +#endif // TENSORFLOW_CORE_PLATFORM_STREAM_EXECUTOR_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/stream_executor_no_cuda.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/stream_executor_no_cuda.h new file mode 100644 index 0000000000000000000000000000000000000000..d4305ec2af1e62a32705016ac4722dfb757756cd --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/stream_executor_no_cuda.h @@ -0,0 +1,33 @@ +/* Copyright 2016 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_PLATFORM_STREAM_EXECUTOR_NO_CUDA_H_ +#define TENSORFLOW_CORE_PLATFORM_STREAM_EXECUTOR_NO_CUDA_H_ + +#include "xla/stream_executor/cuda/cuda_platform_id.h" +#include "xla/stream_executor/device_memory.h" +#include "xla/stream_executor/dnn.h" +#include "xla/stream_executor/event.h" +#include "xla/stream_executor/host/host_platform_id.h" +#include "xla/stream_executor/multi_platform_manager.h" +#include "xla/stream_executor/platform.h" +#include "xla/stream_executor/platform/dso_loader.h" +#include "xla/stream_executor/rocm/rocm_platform_id.h" +#include "xla/stream_executor/scratch_allocator.h" +#include "xla/stream_executor/stream.h" +#include "xla/stream_executor/stream_executor.h" +#include "tensorflow/core/platform/platform.h" + +#endif // TENSORFLOW_CORE_PLATFORM_STREAM_EXECUTOR_NO_CUDA_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/stringpiece.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/stringpiece.h new file mode 100644 index 0000000000000000000000000000000000000000..17760cd7fee32775de5c404445db146863e3cfaa --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/stringpiece.h @@ -0,0 +1,37 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +// StringPiece is a simple structure containing a pointer into some external +// storage and a size. The user of a StringPiece must ensure that the slice +// is not used after the corresponding external storage has been +// deallocated. +// +// Multiple threads can invoke const methods on a StringPiece without +// external synchronization, but if any of the threads may call a +// non-const method, all threads accessing the same StringPiece must use +// external synchronization. + +#ifndef TENSORFLOW_CORE_PLATFORM_STRINGPIECE_H_ +#define TENSORFLOW_CORE_PLATFORM_STRINGPIECE_H_ + +#include "tsl/platform/stringpiece.h" // IWYU pragma: export + +namespace tensorflow { + +using StringPiece = tsl::StringPiece; + +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_PLATFORM_STRINGPIECE_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/stringprintf.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/stringprintf.h new file mode 100644 index 0000000000000000000000000000000000000000..27d30089f9e22cf005a784b54121d4a055862e3f --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/stringprintf.h @@ -0,0 +1,43 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +// Printf variants that place their output in a C++ string. +// +// Usage: +// string result = strings::Printf("%d %s\n", 10, "hello"); +// strings::Appendf(&result, "%d %s\n", 20, "there"); + +#ifndef TENSORFLOW_CORE_PLATFORM_STRINGPRINTF_H_ +#define TENSORFLOW_CORE_PLATFORM_STRINGPRINTF_H_ + +#include + +#include + +#include "tensorflow/core/platform/macros.h" +#include "tensorflow/core/platform/types.h" +#include "tsl/platform/stringprintf.h" + +namespace tensorflow { +namespace strings { +// NOLINTBEGIN(misc-unused-using-decls) +using tsl::strings::Appendf; +using tsl::strings::Appendv; +using tsl::strings::Printf; +// NOLINTEND(misc-unused-using-decls) +} // namespace strings +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_PLATFORM_STRINGPRINTF_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/strong_hash.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/strong_hash.h new file mode 100644 index 0000000000000000000000000000000000000000..c442103c8d1e4d6c07c40f22e7256ffca675a925 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/strong_hash.h @@ -0,0 +1,45 @@ +/* Copyright 2016 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_PLATFORM_STRONG_HASH_H_ +#define TENSORFLOW_CORE_PLATFORM_STRONG_HASH_H_ + +#include "highwayhash/sip_hash.h" // from @highwayhash +#include "highwayhash/state_helpers.h" // from @highwayhash +#include "tensorflow/core/platform/platform.h" +#include "tensorflow/core/platform/types.h" + +namespace tensorflow { + +// This is a strong keyed hash function interface for strings. +// The hash function is deterministic on the content of the string within the +// process. The key of the hash is an array of 2 uint64 elements. +// A strong hash makes it difficult, if not infeasible, to compute inputs that +// hash to the same bucket. +// +// Usage: +// uint64 key[2] = {123, 456}; +// string input = "input string"; +// uint64 hash_value = StrongKeyedHash(key, input); +// +inline uint64 StrongKeyedHash(const tensorflow::uint64 (&key)[2], + const string& s) { + return highwayhash::StringHasher()( + {key[0], key[1]}, s); +} + +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_PLATFORM_STRONG_HASH_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/subprocess.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/subprocess.h new file mode 100644 index 0000000000000000000000000000000000000000..d547e8de83f3fdb8e2e63dc7aa4952892b5ba01e --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/subprocess.h @@ -0,0 +1,38 @@ +/* Copyright 2016 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_PLATFORM_SUBPROCESS_H_ +#define TENSORFLOW_CORE_PLATFORM_SUBPROCESS_H_ + +#include "tensorflow/core/platform/types.h" +#include "tsl/platform/subprocess.h" + +namespace tensorflow { +using tsl::ACTION_CLOSE; +using tsl::ACTION_DUPPARENT; +using tsl::ACTION_PIPE; +using tsl::CHAN_STDERR; +using tsl::CHAN_STDIN; +using tsl::CHAN_STDOUT; +using tsl::Channel; +using tsl::ChannelAction; +using tsl::CreateSubProcess; +using tsl::SubProcess; +} // namespace tensorflow + +#include "tensorflow/core/platform/platform.h" + + +#endif // TENSORFLOW_CORE_PLATFORM_SUBPROCESS_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/tensor_coding.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/tensor_coding.h new file mode 100644 index 0000000000000000000000000000000000000000..fb10b14b757f94eaddf88e8dfe68fc3e4a3be2be --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/tensor_coding.h @@ -0,0 +1,135 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +// Helper routines for encoding/decoding tensor contents. +#ifndef TENSORFLOW_CORE_PLATFORM_TENSOR_CODING_H_ +#define TENSORFLOW_CORE_PLATFORM_TENSOR_CODING_H_ + +#include + +#include "tensorflow/core/platform/platform.h" +#include "tensorflow/core/platform/protobuf.h" +#include "tensorflow/core/platform/refcount.h" +#include "tensorflow/core/platform/stringpiece.h" +#include "tensorflow/core/platform/types.h" + +namespace tensorflow { +namespace port { + +// Store src contents in *out. If backing memory for src is shared with *out, +// will ref obj during the call and will arrange to unref obj when no +// longer needed. +void AssignRefCounted(StringPiece src, core::RefCounted* obj, std::string* out); + +// Copy contents of src to dst[0,src.size()-1]. +inline void CopyToArray(const std::string& src, char* dst) { + memcpy(dst, src.data(), src.size()); +} + +// Copy subrange [pos:(pos + n)) from src to dst. If pos >= src.size() the +// result is empty. If pos + n > src.size() the subrange [pos, size()) is +// copied. +inline void CopySubrangeToArray(const std::string& src, size_t pos, size_t n, + char* dst) { + if (pos >= src.size()) return; + memcpy(dst, src.data() + pos, std::min(n, src.size() - pos)); +} + +// Store encoding of strings[0..n-1] in *out. +void EncodeStringList(const tstring* strings, int64_t n, std::string* out); + +// Decode n strings from src and store in strings[0..n-1]. +// Returns true if successful, false on parse error. +bool DecodeStringList(const std::string& src, tstring* strings, int64_t n); + +// Assigns base[0..bytes-1] to *s +void CopyFromArray(std::string* s, const char* base, size_t bytes); + +// Encodes sequences of strings and serialized protocol buffers into a string. +// Normal usage consists of zero or more calls to Append() and a single call to +// Finalize(). +class StringListEncoder { + public: + virtual ~StringListEncoder() = default; + + // Encodes the given protocol buffer. This may not be called after Finalize(). + virtual void Append(const protobuf::MessageLite& m) = 0; + + // Encodes the given string. This may not be called after Finalize(). + virtual void Append(const std::string& s) = 0; + + // Signals end of the encoding process. No other calls are allowed after this. + virtual void Finalize() = 0; +}; + +// Decodes a string into sequences of strings (which may represent serialized +// protocol buffers). Normal usage involves a single call to ReadSizes() in +// order to retrieve the length of all the strings in the sequence. For each +// size returned a call to Data() is expected and will return the actual +// string. +class StringListDecoder { + public: + virtual ~StringListDecoder() = default; + + // Populates the given vector with the lengths of each string in the sequence + // being decoded. Upon returning the vector is guaranteed to contain as many + // elements as there are strings in the sequence. + virtual bool ReadSizes(std::vector* sizes) = 0; + + // Returns a pointer to the next string in the sequence, then prepares for the + // next call by advancing 'size' characters in the sequence. + virtual const char* Data(uint32 size) = 0; +}; + +std::unique_ptr NewStringListEncoder(string* out); +std::unique_ptr NewStringListDecoder(const string& in); + +#if defined(TENSORFLOW_PROTOBUF_USES_CORD) +// Store src contents in *out. If backing memory for src is shared with *out, +// will ref obj during the call and will arrange to unref obj when no +// longer needed. +void AssignRefCounted(StringPiece src, core::RefCounted* obj, absl::Cord* out); + +// TODO(kmensah): Macro guard this with a check for Cord support. +inline void CopyToArray(const absl::Cord& src, char* dst) { + src.CopyToArray(dst); +} + +// Copy n bytes of src to dst. If pos >= src.size() the result is empty. +// If pos + n > src.size() the subrange [pos, size()) is copied. +inline void CopySubrangeToArray(const absl::Cord& src, int64_t pos, int64_t n, + char* dst) { + src.Subcord(pos, n).CopyToArray(dst); +} + +// Store encoding of strings[0..n-1] in *out. +void EncodeStringList(const tstring* strings, int64_t n, absl::Cord* out); + +// Decode n strings from src and store in strings[0..n-1]. +// Returns true if successful, false on parse error. +bool DecodeStringList(const absl::Cord& src, std::string* strings, int64_t n); +bool DecodeStringList(const absl::Cord& src, tstring* strings, int64_t n); + +// Assigns base[0..bytes-1] to *c +void CopyFromArray(absl::Cord* c, const char* base, size_t bytes); + +std::unique_ptr NewStringListEncoder(absl::Cord* out); +std::unique_ptr NewStringListDecoder(const absl::Cord& in); +#endif // defined(TENSORFLOW_PROTOBUF_USES_CORD) + +} // namespace port +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_PLATFORM_TENSOR_CODING_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/tensor_float_32_utils.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/tensor_float_32_utils.h new file mode 100644 index 0000000000000000000000000000000000000000..efcb99416c59db5965a2a4c239b396950afc7d44 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/tensor_float_32_utils.h @@ -0,0 +1,28 @@ +/* Copyright 2020 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_PLATFORM_TENSOR_FLOAT_32_UTILS_H_ +#define TENSORFLOW_CORE_PLATFORM_TENSOR_FLOAT_32_UTILS_H_ + +#include "tsl/platform/tensor_float_32_utils.h" + +namespace tensorflow { +// NOLINTBEGIN(misc-unused-using-decls) +using tsl::enable_tensor_float_32_execution; +using tsl::tensor_float_32_execution_enabled; +// NOLINTEND(misc-unused-using-decls) +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_PLATFORM_TENSOR_FLOAT_32_UTILS_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/test.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/test.h new file mode 100644 index 0000000000000000000000000000000000000000..d57a08f3a2d715dac72c6b4a90faaaf179c1d9ae --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/test.h @@ -0,0 +1,36 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_PLATFORM_TEST_H_ +#define TENSORFLOW_CORE_PLATFORM_TEST_H_ + +#include // IWYU pragma: export +#include "tensorflow/core/platform/macros.h" +#include "tensorflow/core/platform/platform.h" +#include "tensorflow/core/platform/types.h" +#include "tsl/platform/test.h" + +namespace tensorflow { + +namespace testing { +using tsl::testing::PickUnusedPortOrDie; +using tsl::testing::RandomSeed; +using tsl::testing::TensorFlowSrcRoot; +using tsl::testing::TmpDir; + +} // namespace testing +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_PLATFORM_TEST_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/test_benchmark.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/test_benchmark.h new file mode 100644 index 0000000000000000000000000000000000000000..ed964a898fa00d0c4cce137d5326617ac60eb59f --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/test_benchmark.h @@ -0,0 +1,30 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +// Simple benchmarking facility. +#ifndef TENSORFLOW_CORE_PLATFORM_TEST_BENCHMARK_H_ +#define TENSORFLOW_CORE_PLATFORM_TEST_BENCHMARK_H_ + +#include "tsl/platform/test_benchmark.h" + +namespace tensorflow { +namespace testing { +using tsl::testing::DoNotOptimize; // NOLINT +using tsl::testing::InitializeBenchmarks; // NOLINT +using tsl::testing::RunBenchmarks; // NOLINT +} // namespace testing +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_PLATFORM_TEST_BENCHMARK_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/thread_annotations.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/thread_annotations.h new file mode 100644 index 0000000000000000000000000000000000000000..4178265af23a91b1b42fe59cb4e392a454a6b4a0 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/thread_annotations.h @@ -0,0 +1,43 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +// This header file contains the macro definitions for thread safety +// annotations that allow the developers to document the locking policies +// of their multi-threaded code. The annotations can also help program +// analysis tools to identify potential thread safety issues. +// +// The primary documentation on these annotations is external: +// http://clang.llvm.org/docs/ThreadSafetyAnalysis.html +// +// The annotations are implemented using compiler attributes. +// Using the macros defined here instead of the raw attributes allows +// for portability and future compatibility. +// +// When referring to mutexes in the arguments of the attributes, you should +// use variable names or more complex expressions (e.g. my_object->mutex_) +// that evaluate to a concrete mutex object whenever possible. If the mutex +// you want to refer to is not in scope, you may use a member pointer +// (e.g. &MyClass::mutex_) to refer to a mutex in some (unknown) object. +// + +#ifndef TENSORFLOW_CORE_PLATFORM_THREAD_ANNOTATIONS_H_ +#define TENSORFLOW_CORE_PLATFORM_THREAD_ANNOTATIONS_H_ + +// IWYU pragma: private, include "third_party/tensorflow/core/platform/thread_annotations.h" +// IWYU pragma: friend third_party/tensorflow/core/platform/thread_annotations.h + +#include "tsl/platform/thread_annotations.h" // IWYU pragma: export + +#endif // TENSORFLOW_CORE_PLATFORM_THREAD_ANNOTATIONS_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/threadpool.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/threadpool.h new file mode 100644 index 0000000000000000000000000000000000000000..02129fd4ba5f9d55e4c8749c7dab6c294eb74e4e --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/threadpool.h @@ -0,0 +1,37 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_PLATFORM_THREADPOOL_H_ +#define TENSORFLOW_CORE_PLATFORM_THREADPOOL_H_ + +#include +#include + +#include "absl/types/optional.h" +#include "tensorflow/core/platform/env.h" +#include "tensorflow/core/platform/macros.h" +#include "tensorflow/core/platform/threadpool_interface.h" +#include "tensorflow/core/platform/types.h" +#include "tsl/platform/threadpool.h" + +namespace tensorflow { +namespace thread { +using tsl::thread::EigenEnvironment; // NOLINT +using tsl::thread::ThreadPool; // NOLINT + +} // namespace thread +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_PLATFORM_THREADPOOL_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/threadpool_interface.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/threadpool_interface.h new file mode 100644 index 0000000000000000000000000000000000000000..7e07e560dbaed6016d5b57e888385d69e6d0cd7b --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/threadpool_interface.h @@ -0,0 +1,29 @@ +/* Copyright 2019 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_PLATFORM_THREADPOOL_INTERFACE_H_ +#define TENSORFLOW_CORE_PLATFORM_THREADPOOL_INTERFACE_H_ + +#include "tsl/platform/threadpool_interface.h" + +namespace tensorflow { +namespace thread { + +using ThreadPoolInterface = tsl::thread::ThreadPoolInterface; + +} // namespace thread +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_PLATFORM_THREADPOOL_INTERFACE_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/threadpool_options.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/threadpool_options.h new file mode 100644 index 0000000000000000000000000000000000000000..c6237fa858b26d218416801a23b55c849a04a3f3 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/threadpool_options.h @@ -0,0 +1,30 @@ +/* Copyright 2019 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_PLATFORM_THREADPOOL_OPTIONS_H_ +#define TENSORFLOW_CORE_PLATFORM_THREADPOOL_OPTIONS_H_ + +#include "tensorflow/core/platform/threadpool_interface.h" +#include "tsl/platform/threadpool_options.h" + +namespace tensorflow { +namespace thread { + +using tsl::thread::ThreadPoolOptions; // NOLINT + +} // namespace thread +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_PLATFORM_THREADPOOL_OPTIONS_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/tracing.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/tracing.h new file mode 100644 index 0000000000000000000000000000000000000000..e7413e34cfdb521202da2be3bb19f5b49a389e51 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/tracing.h @@ -0,0 +1,53 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_PLATFORM_TRACING_H_ +#define TENSORFLOW_CORE_PLATFORM_TRACING_H_ + +// Tracing interface + +#include + +#include "tensorflow/core/platform/macros.h" +#include "tensorflow/core/platform/platform.h" +#include "tensorflow/core/platform/stringpiece.h" +#include "tensorflow/core/platform/types.h" +#include "tsl/platform/tracing.h" + +namespace tensorflow { +namespace tracing { +// NOLINTBEGIN(misc-unused-using-decls) +using tsl::tracing::EventCategory; +using tsl::tracing::EventCollector; +using tsl::tracing::GetArgForName; +using tsl::tracing::GetEventCategoryName; +using tsl::tracing::GetEventCollector; +using tsl::tracing::GetLogDir; +using tsl::tracing::GetNumEventCategories; +using tsl::tracing::GetUniqueArg; +using tsl::tracing::RecordEvent; +using tsl::tracing::ScopedRegion; +using tsl::tracing::SetEventCollector; +// NOLINTEND(misc-unused-using-decls) +} // namespace tracing +} // namespace tensorflow + +#if defined(PLATFORM_GOOGLE) +#include "tsl/platform/google/tracing_impl.h" +#else +#include "tsl/platform/default/tracing_impl.h" +#endif + +#endif // TENSORFLOW_CORE_PLATFORM_TRACING_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/tstring.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/tstring.h new file mode 100644 index 0000000000000000000000000000000000000000..7795811d03305b06124590eb666524444be085d1 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/tstring.h @@ -0,0 +1,29 @@ +/* Copyright 2019 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_PLATFORM_TSTRING_H_ +#define TENSORFLOW_CORE_PLATFORM_TSTRING_H_ + +#include "tensorflow/core/platform/cord.h" +#include "tensorflow/core/platform/ctstring.h" +#include "tensorflow/core/platform/stringpiece.h" +#include "tsl/platform/tstring.h" + +namespace tensorflow { + +using tstring = tsl::tstring; +} + +#endif // TENSORFLOW_CORE_PLATFORM_TSTRING_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/types.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/types.h new file mode 100644 index 0000000000000000000000000000000000000000..a3159bfe8abea92dd5d17134e1193f9083630259 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/types.h @@ -0,0 +1,63 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_PLATFORM_TYPES_H_ +#define TENSORFLOW_CORE_PLATFORM_TYPES_H_ + +#include "tensorflow/core/platform/bfloat16.h" +#include "tensorflow/core/platform/platform.h" +#include "tensorflow/core/platform/tstring.h" +#include "tsl/platform/types.h" + +namespace tensorflow { + +// Alias tensorflow::string to std::string. +using tsl::string; + +using tsl::uint16; +using tsl::uint32; +using tsl::uint4; +using tsl::uint64; +using tsl::uint8; + +using tsl::int16; +using tsl::int32; +using tsl::int4; +using tsl::int64; +using tsl::int8; + +using tsl::float8_e4m3fn; +using tsl::float8_e5m2; + +static const uint8 kuint8max = tsl::kuint8max; +static const uint16 kuint16max = tsl::kuint16max; +static const uint32 kuint32max = tsl::kuint32max; +static const uint64 kuint64max = tsl::kuint64max; +static const int8_t kint8min = tsl::kint8min; +static const int8_t kint8max = tsl::kint8max; +static const int16_t kint16min = tsl::kint16min; +static const int16_t kint16max = tsl::kint16max; +static const int32_t kint32min = tsl::kint32min; +static const int32_t kint32max = tsl::kint32max; +static const int64_t kint64min = tsl::kint64min; +static const int64_t kint64max = tsl::kint64max; + +// A typedef for a uint64 used as a short fingerprint. +using tsl::bfloat16; +using tsl::Fprint; +using tsl::tstring; // NOLINT: suppress 'using decl 'tstring' is unused' +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_PLATFORM_TYPES_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/unbounded_work_queue.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/unbounded_work_queue.h new file mode 100644 index 0000000000000000000000000000000000000000..cd6cdf9734783613f2b73c0490033a9c07e3e5c8 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/platform/unbounded_work_queue.h @@ -0,0 +1,29 @@ +/* Copyright 2019 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_PLATFORM_UNBOUNDED_WORK_QUEUE_H_ +#define TENSORFLOW_CORE_PLATFORM_UNBOUNDED_WORK_QUEUE_H_ + +#include "tensorflow/core/platform/platform.h" +#include "tsl/platform/unbounded_work_queue.h" + +// An `UnboundedWorkQueue` feeds potentially-blocking work into a thread-pool +// whose size automatically increases with demand. + +namespace tensorflow { +using tsl::UnboundedWorkQueue; // NOLINT(misc-unused-using-decls) +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_PLATFORM_UNBOUNDED_WORK_QUEUE_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/profiler/backends/cpu/annotation_stack.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/profiler/backends/cpu/annotation_stack.h new file mode 100644 index 0000000000000000000000000000000000000000..53c7a497201d0a36ea7df691e3f9e573924514ee --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/profiler/backends/cpu/annotation_stack.h @@ -0,0 +1,37 @@ +/* Copyright 2019 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ +#ifndef TENSORFLOW_CORE_PROFILER_BACKENDS_CPU_ANNOTATION_STACK_H_ +#define TENSORFLOW_CORE_PROFILER_BACKENDS_CPU_ANNOTATION_STACK_H_ + +#include + +#include +#include + +#include "absl/strings/str_cat.h" +#include "absl/strings/string_view.h" +#include "tensorflow/core/platform/macros.h" +#include "tensorflow/core/platform/types.h" +#include "tsl/profiler/backends/cpu/annotation_stack.h" + +namespace tensorflow { +namespace profiler { + +using tsl::profiler::AnnotationStack; // NOLINT + +} // namespace profiler +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_PROFILER_BACKENDS_CPU_ANNOTATION_STACK_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/profiler/backends/cpu/traceme_recorder.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/profiler/backends/cpu/traceme_recorder.h new file mode 100644 index 0000000000000000000000000000000000000000..b3b855fbedb7117bd75422ca8c7b5d03b5512ba2 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/profiler/backends/cpu/traceme_recorder.h @@ -0,0 +1,39 @@ +/* Copyright 2018 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ +#ifndef TENSORFLOW_CORE_PROFILER_BACKENDS_CPU_TRACEME_RECORDER_H_ +#define TENSORFLOW_CORE_PROFILER_BACKENDS_CPU_TRACEME_RECORDER_H_ + +#include +#include +#include +#include +#include + +#include "absl/container/flat_hash_map.h" +#include "tensorflow/core/platform/macros.h" +#include "tensorflow/core/platform/mutex.h" +#include "tensorflow/core/platform/thread_annotations.h" +#include "tensorflow/core/platform/types.h" +#include "tsl/profiler/backends/cpu/traceme_recorder.h" + +namespace tensorflow { +namespace profiler { + +using tsl::profiler::TraceMeRecorder; // NOLINT + +} // namespace profiler +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_PROFILER_BACKENDS_CPU_TRACEME_RECORDER_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/profiler/convert/xplane_to_step_stats.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/profiler/convert/xplane_to_step_stats.h new file mode 100644 index 0000000000000000000000000000000000000000..5d5ff20cf01d27a698138f292fbb3e65e42f4a51 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/profiler/convert/xplane_to_step_stats.h @@ -0,0 +1,31 @@ +/* Copyright 2021 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_PROFILER_CONVERT_XPLANE_TO_STEP_STATS_H_ +#define TENSORFLOW_CORE_PROFILER_CONVERT_XPLANE_TO_STEP_STATS_H_ + +#include "tensorflow/core/framework/step_stats.pb.h" +#include "tsl/profiler/protobuf/xplane.pb.h" + +namespace tensorflow { +namespace profiler { + +// Converts XSpace collected by profiling a GPU device to StepStats. +void ConvertGpuXSpaceToStepStats(const XSpace& xspace, StepStats* step_stats); + +} // namespace profiler +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_PROFILER_CONVERT_XPLANE_TO_STEP_STATS_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/profiler/lib/annotated_traceme.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/profiler/lib/annotated_traceme.h new file mode 100644 index 0000000000000000000000000000000000000000..24ab188674f1019a3401a0ab623a1d7e2c107c50 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/profiler/lib/annotated_traceme.h @@ -0,0 +1,59 @@ +/* Copyright 2020 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ +#ifndef TENSORFLOW_CORE_PROFILER_LIB_ANNOTATED_TRACEME_H_ +#define TENSORFLOW_CORE_PROFILER_LIB_ANNOTATED_TRACEME_H_ + +#include + +#include "absl/strings/string_view.h" +#include "absl/types/optional.h" +#include "tensorflow/core/platform/logging.h" +#include "tensorflow/core/platform/macros.h" +#include "tensorflow/core/platform/types.h" +#include "tensorflow/core/profiler/lib/scoped_annotation.h" +#include "tensorflow/core/profiler/lib/traceme.h" + +namespace tensorflow { +namespace profiler { + +// Combination of TraceMe and ScopedAnnotation which share the same label. +// Optimization are done to ensure the label generation are done once. +class AnnotatedTraceMe { + public: + template + explicit AnnotatedTraceMe(NameGeneratorT&& name_generator, int level = 1) { + DCHECK_GE(level, 1); + bool annotation_enabled = ScopedAnnotation::IsEnabled(); + bool traceme_enabled = TraceMe::Active(level); + if (TF_PREDICT_FALSE(annotation_enabled || traceme_enabled)) { + string name = std::forward(name_generator)(); + if (annotation_enabled) { + scoped_annotation_.emplace(absl::string_view(name)); + } + if (TF_PREDICT_TRUE(traceme_enabled)) { + trace_me_.emplace([&name] { return std::move(name); }, level); + } + } + } + + private: + absl::optional trace_me_; + absl::optional scoped_annotation_; +}; + +} // namespace profiler +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_PROFILER_LIB_ANNOTATED_TRACEME_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/profiler/lib/connected_traceme.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/profiler/lib/connected_traceme.h new file mode 100644 index 0000000000000000000000000000000000000000..aa6d354420038be48362c0c853af55aa472d07f4 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/profiler/lib/connected_traceme.h @@ -0,0 +1,37 @@ +/* Copyright 2020 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ +#ifndef TENSORFLOW_CORE_PROFILER_LIB_CONNECTED_TRACEME_H_ +#define TENSORFLOW_CORE_PROFILER_LIB_CONNECTED_TRACEME_H_ + +#include +#include + +#include "absl/strings/string_view.h" +#include "absl/types/optional.h" +#include "tensorflow/core/profiler/lib/context_types.h" +#include "tensorflow/core/profiler/lib/traceme.h" +#include "tensorflow/core/profiler/lib/traceme_encode.h" +#include "tsl/profiler/lib/connected_traceme.h" + +namespace tensorflow { +namespace profiler { + +using tsl::profiler::TraceMeConsumer; // NOLINT +using tsl::profiler::TraceMeProducer; // NOLINT + +} // namespace profiler +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_PROFILER_LIB_CONNECTED_TRACEME_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/profiler/lib/context_types.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/profiler/lib/context_types.h new file mode 100644 index 0000000000000000000000000000000000000000..99b2029fd09f820c914fb95df93be55fabc718a0 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/profiler/lib/context_types.h @@ -0,0 +1,30 @@ +/* Copyright 2022 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ +#ifndef TENSORFLOW_CORE_PROFILER_LIB_CONTEXT_TYPES_H_ +#define TENSORFLOW_CORE_PROFILER_LIB_CONTEXT_TYPES_H_ + +#include "tsl/profiler/lib/context_types.h" + +namespace tensorflow { +namespace profiler { + +using tsl::profiler::ContextType; // NOLINT +using tsl::profiler::GetContextTypeString; // NOLINT +using tsl::profiler::GetSafeContextType; // NOLINT + +} // namespace profiler +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_PROFILER_LIB_CONTEXT_TYPES_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/profiler/lib/device_profiler_session.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/profiler/lib/device_profiler_session.h new file mode 100644 index 0000000000000000000000000000000000000000..a025d76cd1e98de16083f411c7ecb0b9ae2105f0 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/profiler/lib/device_profiler_session.h @@ -0,0 +1,83 @@ +/* Copyright 2021 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ +#ifndef TENSORFLOW_CORE_PROFILER_LIB_DEVICE_PROFILER_SESSION_H_ +#define TENSORFLOW_CORE_PROFILER_LIB_DEVICE_PROFILER_SESSION_H_ + +#include "tensorflow/core/framework/step_stats.pb.h" +#include "tensorflow/core/platform/errors.h" +#include "tensorflow/core/platform/platform.h" +#include "tensorflow/core/platform/status.h" + +#if !defined(IS_MOBILE_PLATFORM) +#include "tensorflow/core/profiler/convert/xplane_to_step_stats.h" +#include "tensorflow/core/profiler/lib/profiler_session.h" +#include "tensorflow/core/profiler/protobuf/xplane.pb.h" +#endif +#include "tsl/profiler/protobuf/profiler_options.pb.h" + +namespace tensorflow { + +// Wraps a ProfilerSession configured to collect only device traces. +// Returns data in StepStats format. +class DeviceProfilerSession { + public: + // Creates a DeviceProfilerSession and starts tracing. + // Traces GPU devices if present. + // Does not trace TPU devices (not supported). + static std::unique_ptr Create() { +#if !defined(IS_MOBILE_PLATFORM) + ProfileOptions options = ProfilerSession::DefaultOptions(); + options.set_host_tracer_level(0); + options.set_device_type(ProfileOptions::GPU); + return absl::WrapUnique(new DeviceProfilerSession(options)); +#else + return nullptr; +#endif + } + + // Stops tracing and converts the data to StepStats format. + // Should be called at most once. + Status CollectData(StepStats* step_stats) { +#if defined(IS_MOBILE_PLATFORM) + return errors::Unimplemented("Profiling not supported on mobile platform."); +#else + profiler::XSpace space; + TF_RETURN_IF_ERROR(profiler_session_->CollectData(&space)); + profiler::ConvertGpuXSpaceToStepStats(space, step_stats); + return OkStatus(); +#endif + } + + private: + // Constructs an instance of the class and starts profiling + explicit DeviceProfilerSession(const ProfileOptions& options) +#if !defined(IS_MOBILE_PLATFORM) + : profiler_session_(ProfilerSession::Create(options)) +#endif + { + } + + // DeviceProfilerSession is neither copyable nor movable. + DeviceProfilerSession(const DeviceProfilerSession&) = delete; + DeviceProfilerSession& operator=(const DeviceProfilerSession&) = delete; + +#if !defined(IS_MOBILE_PLATFORM) + // TODO(b/256013238) + std::unique_ptr profiler_session_; +#endif +}; + +} // namespace tensorflow +#endif // TENSORFLOW_CORE_PROFILER_LIB_DEVICE_PROFILER_SESSION_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/profiler/lib/profiler_interface.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/profiler/lib/profiler_interface.h new file mode 100644 index 0000000000000000000000000000000000000000..ee3f9de6e5a02b6fd63ac4cb4e13f2daa9e80eae --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/profiler/lib/profiler_interface.h @@ -0,0 +1,30 @@ +/* Copyright 2016 The TensorFlow Authors All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ +#ifndef TENSORFLOW_CORE_PROFILER_LIB_PROFILER_INTERFACE_H_ +#define TENSORFLOW_CORE_PROFILER_LIB_PROFILER_INTERFACE_H_ + +#include "tensorflow/core/platform/status.h" +#include "tensorflow/core/profiler/protobuf/xplane.pb.h" +#include "tsl/profiler/lib/profiler_interface.h" + +namespace tensorflow { +namespace profiler { + +using tsl::profiler::ProfilerInterface; // NOLINT + +} // namespace profiler +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_PROFILER_LIB_PROFILER_INTERFACE_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/profiler/lib/profiler_lock.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/profiler/lib/profiler_lock.h new file mode 100644 index 0000000000000000000000000000000000000000..1bf378d622644688eb9d126f393f2edab7c6adb8 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/profiler/lib/profiler_lock.h @@ -0,0 +1,29 @@ +/* Copyright 2019 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ +#ifndef TENSORFLOW_CORE_PROFILER_LIB_PROFILER_LOCK_H_ +#define TENSORFLOW_CORE_PROFILER_LIB_PROFILER_LOCK_H_ + +#include "tensorflow/core/platform/statusor.h" +#include "tsl/profiler/lib/profiler_lock.h" + +namespace tensorflow { +namespace profiler { + +using tsl::profiler::ProfilerLock; // NOLINT + +} // namespace profiler +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_PROFILER_LIB_PROFILER_LOCK_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/profiler/lib/profiler_session.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/profiler/lib/profiler_session.h new file mode 100644 index 0000000000000000000000000000000000000000..1260c19b4c4c124c5c2493e2df9c14cccbd77fa7 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/profiler/lib/profiler_session.h @@ -0,0 +1,25 @@ +/* Copyright 2018 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ +#ifndef TENSORFLOW_CORE_PROFILER_LIB_PROFILER_SESSION_H_ +#define TENSORFLOW_CORE_PROFILER_LIB_PROFILER_SESSION_H_ + +#include "tsl/profiler/lib/profiler_session.h" + +namespace tensorflow { + +using tsl::ProfilerSession; // NOLINT + +} // namespace tensorflow +#endif // TENSORFLOW_CORE_PROFILER_LIB_PROFILER_SESSION_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/profiler/lib/scoped_annotation.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/profiler/lib/scoped_annotation.h new file mode 100644 index 0000000000000000000000000000000000000000..16890b07c207400773d7288776bcbfe3f2b748fb --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/profiler/lib/scoped_annotation.h @@ -0,0 +1,41 @@ +/* Copyright 2019 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ +#ifndef TENSORFLOW_CORE_PROFILER_LIB_SCOPED_ANNOTATION_H_ +#define TENSORFLOW_CORE_PROFILER_LIB_SCOPED_ANNOTATION_H_ + +#include + +#include +#include +#include +#include + +#include "absl/strings/string_view.h" +#include "tensorflow/core/platform/types.h" +#include "tsl/profiler/lib/scoped_annotation.h" + +#if !defined(IS_MOBILE_PLATFORM) +#include "tensorflow/core/profiler/backends/cpu/annotation_stack.h" +#endif + +namespace tensorflow { +namespace profiler { + +using tsl::profiler::ScopedAnnotation; // NOLINT + +} // namespace profiler +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_PROFILER_LIB_SCOPED_ANNOTATION_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/profiler/lib/scoped_memory_debug_annotation.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/profiler/lib/scoped_memory_debug_annotation.h new file mode 100644 index 0000000000000000000000000000000000000000..1156aecc359511958547168f44c353040168aa5d --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/profiler/lib/scoped_memory_debug_annotation.h @@ -0,0 +1,34 @@ +/* Copyright 2021 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ +#ifndef TENSORFLOW_CORE_PROFILER_LIB_SCOPED_MEMORY_DEBUG_ANNOTATION_H_ +#define TENSORFLOW_CORE_PROFILER_LIB_SCOPED_MEMORY_DEBUG_ANNOTATION_H_ + +#include +#include +#include +#include + +#include "tsl/profiler/lib/scoped_memory_debug_annotation.h" + +namespace tensorflow { +namespace profiler { + +using tsl::profiler::MemoryDebugAnnotation; // NOLINT +using tsl::profiler::ScopedMemoryDebugAnnotation; // NOLINT + +} // namespace profiler +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_PROFILER_LIB_SCOPED_MEMORY_DEBUG_ANNOTATION_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/profiler/lib/traceme.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/profiler/lib/traceme.h new file mode 100644 index 0000000000000000000000000000000000000000..556dc2765ca63cd549c602a529f6c12d78e2c8ec --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/profiler/lib/traceme.h @@ -0,0 +1,49 @@ +/* Copyright 2018 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ +#ifndef TENSORFLOW_CORE_PROFILER_LIB_TRACEME_H_ +#define TENSORFLOW_CORE_PROFILER_LIB_TRACEME_H_ + +#include +#include +#include + +#include "absl/strings/string_view.h" +#include "tensorflow/core/platform/logging.h" +#include "tensorflow/core/platform/macros.h" +#include "tensorflow/core/platform/platform.h" +#include "tensorflow/core/platform/types.h" +#include "tensorflow/core/profiler/lib/traceme_encode.h" // IWYU pragma: export +#include "tsl/profiler/lib/traceme.h" + +#if !defined(IS_MOBILE_PLATFORM) +#include "tensorflow/core/profiler/backends/cpu/traceme_recorder.h" +#include "tsl/profiler/utils/time_utils.h" +#endif + +namespace tensorflow { +namespace profiler { + +using tsl::profiler::GetTFTraceMeLevel; // NOLINT +using tsl::profiler::kCritical; // NOLINT +using tsl::profiler::kInfo; // NOLINT +using tsl::profiler::kVerbose; // NOLINT +using tsl::profiler::TfOpDetailsEnabled; // NOLINT +using tsl::profiler::TraceMe; // NOLINT +using tsl::profiler::TraceMeLevel; // NOLINT + +} // namespace profiler +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_PROFILER_LIB_TRACEME_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/profiler/lib/traceme_encode.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/profiler/lib/traceme_encode.h new file mode 100644 index 0000000000000000000000000000000000000000..dd0e87f7f09f439ef0f6963358ad3b38bf375cd4 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/profiler/lib/traceme_encode.h @@ -0,0 +1,41 @@ +/* Copyright 2020 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ +#ifndef TENSORFLOW_CORE_PROFILER_LIB_TRACEME_ENCODE_H_ +#define TENSORFLOW_CORE_PROFILER_LIB_TRACEME_ENCODE_H_ + +#include + +#include +#include + +#include "absl/strings/match.h" +#include "absl/strings/str_cat.h" +#include "absl/strings/string_view.h" +#include "tensorflow/core/platform/logging.h" +#include "tensorflow/core/platform/macros.h" +#include "tsl/profiler/lib/traceme_encode.h" + +namespace tensorflow { +namespace profiler { + +using tsl::profiler::TraceMeArg; // NOLINT +using tsl::profiler::TraceMeEncode; // NOLINT +using tsl::profiler::TraceMeOp; // NOLINT +using tsl::profiler::TraceMeOpOverride; // NOLINT + +} // namespace profiler +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_PROFILER_LIB_TRACEME_ENCODE_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/profiler/profile.pb.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/profiler/profile.pb.h new file mode 100644 index 0000000000000000000000000000000000000000..fda37171a20e1df67551338c8856be6e46cf6272 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/profiler/profile.pb.h @@ -0,0 +1,79 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/profiler/profile.proto + +#ifndef GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprofiler_2fprofile_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprofiler_2fprofile_2eproto + +#include +#include + +#include +#if PROTOBUF_VERSION < 3021000 +#error This file was generated by a newer version of protoc which is +#error incompatible with your Protocol Buffer headers. Please update +#error your headers. +#endif +#if 3021009 < PROTOBUF_MIN_PROTOC_VERSION +#error This file was generated by an older version of protoc which is +#error incompatible with your Protocol Buffer headers. Please +#error regenerate this file with a newer version of protoc. +#endif + +#include +#include +#include +#include +#include +#include +#include +#include // IWYU pragma: export +#include // IWYU pragma: export +#include "tsl/profiler/protobuf/profile.pb.h" +// @@protoc_insertion_point(includes) +#include +#define PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2fprofiler_2fprofile_2eproto +PROTOBUF_NAMESPACE_OPEN +namespace internal { +class AnyMetadata; +} // namespace internal +PROTOBUF_NAMESPACE_CLOSE + +// Internal implementation detail -- do not use these members. +struct TableStruct_tensorflow_2fcore_2fprofiler_2fprofile_2eproto { + static const uint32_t offsets[]; +}; +extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_tensorflow_2fcore_2fprofiler_2fprofile_2eproto; +PROTOBUF_NAMESPACE_OPEN +PROTOBUF_NAMESPACE_CLOSE +namespace tensorflow { +namespace tfprof { +namespace pprof { +namespace dummy { + +// =================================================================== + + +// =================================================================== + + +// =================================================================== + +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ + +// @@protoc_insertion_point(namespace_scope) + +} // namespace dummy +} // namespace pprof +} // namespace tfprof +} // namespace tensorflow + +// @@protoc_insertion_point(global_scope) + +#include +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprofiler_2fprofile_2eproto diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/profiler/profiler_options.pb.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/profiler/profiler_options.pb.h new file mode 100644 index 0000000000000000000000000000000000000000..05215fe26a7373a09a2634c4eb9c9f83de1f8fdf --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/profiler/profiler_options.pb.h @@ -0,0 +1,75 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/profiler/profiler_options.proto + +#ifndef GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprofiler_2fprofiler_5foptions_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprofiler_2fprofiler_5foptions_2eproto + +#include +#include + +#include +#if PROTOBUF_VERSION < 3021000 +#error This file was generated by a newer version of protoc which is +#error incompatible with your Protocol Buffer headers. Please update +#error your headers. +#endif +#if 3021009 < PROTOBUF_MIN_PROTOC_VERSION +#error This file was generated by an older version of protoc which is +#error incompatible with your Protocol Buffer headers. Please +#error regenerate this file with a newer version of protoc. +#endif + +#include +#include +#include +#include +#include +#include +#include +#include // IWYU pragma: export +#include // IWYU pragma: export +#include "tsl/profiler/protobuf/profiler_options.pb.h" +// @@protoc_insertion_point(includes) +#include +#define PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2fprofiler_2fprofiler_5foptions_2eproto +PROTOBUF_NAMESPACE_OPEN +namespace internal { +class AnyMetadata; +} // namespace internal +PROTOBUF_NAMESPACE_CLOSE + +// Internal implementation detail -- do not use these members. +struct TableStruct_tensorflow_2fcore_2fprofiler_2fprofiler_5foptions_2eproto { + static const uint32_t offsets[]; +}; +extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_tensorflow_2fcore_2fprofiler_2fprofiler_5foptions_2eproto; +PROTOBUF_NAMESPACE_OPEN +PROTOBUF_NAMESPACE_CLOSE +namespace tensorflow { +namespace dummy { + +// =================================================================== + + +// =================================================================== + + +// =================================================================== + +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ + +// @@protoc_insertion_point(namespace_scope) + +} // namespace dummy +} // namespace tensorflow + +// @@protoc_insertion_point(global_scope) + +#include +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprofiler_2fprofiler_5foptions_2eproto diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/profiler/profiler_options.proto b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/profiler/profiler_options.proto new file mode 100644 index 0000000000000000000000000000000000000000..9afed8d189b29fa86839dc011fd5d95541997527 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/profiler/profiler_options.proto @@ -0,0 +1,5 @@ +syntax = "proto3"; + +package tensorflow.dummy; + +import public "tsl/profiler/protobuf/profiler_options.proto"; diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/profiler/protobuf/xplane.pb.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/profiler/protobuf/xplane.pb.h new file mode 100644 index 0000000000000000000000000000000000000000..6f22dc58a99a6349e31aeb81752207be918761c1 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/profiler/protobuf/xplane.pb.h @@ -0,0 +1,77 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/profiler/protobuf/xplane.proto + +#ifndef GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprofiler_2fprotobuf_2fxplane_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprofiler_2fprotobuf_2fxplane_2eproto + +#include +#include + +#include +#if PROTOBUF_VERSION < 3021000 +#error This file was generated by a newer version of protoc which is +#error incompatible with your Protocol Buffer headers. Please update +#error your headers. +#endif +#if 3021009 < PROTOBUF_MIN_PROTOC_VERSION +#error This file was generated by an older version of protoc which is +#error incompatible with your Protocol Buffer headers. Please +#error regenerate this file with a newer version of protoc. +#endif + +#include +#include +#include +#include +#include +#include +#include +#include // IWYU pragma: export +#include // IWYU pragma: export +#include "tsl/profiler/protobuf/xplane.pb.h" +// @@protoc_insertion_point(includes) +#include +#define PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2fprofiler_2fprotobuf_2fxplane_2eproto +PROTOBUF_NAMESPACE_OPEN +namespace internal { +class AnyMetadata; +} // namespace internal +PROTOBUF_NAMESPACE_CLOSE + +// Internal implementation detail -- do not use these members. +struct TableStruct_tensorflow_2fcore_2fprofiler_2fprotobuf_2fxplane_2eproto { + static const uint32_t offsets[]; +}; +extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_tensorflow_2fcore_2fprofiler_2fprotobuf_2fxplane_2eproto; +PROTOBUF_NAMESPACE_OPEN +PROTOBUF_NAMESPACE_CLOSE +namespace tensorflow { +namespace profiler { +namespace empty { + +// =================================================================== + + +// =================================================================== + + +// =================================================================== + +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ + +// @@protoc_insertion_point(namespace_scope) + +} // namespace empty +} // namespace profiler +} // namespace tensorflow + +// @@protoc_insertion_point(global_scope) + +#include +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprofiler_2fprotobuf_2fxplane_2eproto diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/profiler/protobuf/xplane.proto b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/profiler/protobuf/xplane.proto new file mode 100644 index 0000000000000000000000000000000000000000..69655b76d3e18983ecb1d424d3d0c8a920795e10 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/profiler/protobuf/xplane.proto @@ -0,0 +1,5 @@ +syntax = "proto3"; + +package tensorflow.profiler.empty; + +import public "tsl/profiler/protobuf/xplane.proto"; diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/profiler/rpc/client/save_profile.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/profiler/rpc/client/save_profile.h new file mode 100644 index 0000000000000000000000000000000000000000..e4b7a7a82468147eee4a711ebc93ce1bf2586b8f --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/profiler/rpc/client/save_profile.h @@ -0,0 +1,40 @@ +/* Copyright 2017 The TensorFlow Authors All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_PROFILER_RPC_CLIENT_SAVE_PROFILE_H_ +#define TENSORFLOW_CORE_PROFILER_RPC_CLIENT_SAVE_PROFILE_H_ + +#include +#include + +#include "tensorflow/core/platform/status.h" +#include "tensorflow/core/platform/types.h" +#include "tensorflow/core/profiler/protobuf/xplane.pb.h" +#include "tsl/profiler/protobuf/profiler_service.pb.h" +#include "tsl/profiler/rpc/client/save_profile.h" + +namespace tensorflow { +namespace profiler { + +using tsl::profiler::GetCurrentTimeStampAsString; // NOLINT +using tsl::profiler::GetTensorBoardProfilePluginDir; // NOLINT +using tsl::profiler::SaveGzippedToolData; // NOLINT +using tsl::profiler::SaveProfile; // NOLINT +using tsl::profiler::SaveXSpace; // NOLINT + +} // namespace profiler +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_PROFILER_RPC_CLIENT_SAVE_PROFILE_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/profiler/rpc/profiler_service_impl.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/profiler/rpc/profiler_service_impl.h new file mode 100644 index 0000000000000000000000000000000000000000..a20727c660ccf64b29ded272b491968ca39b108a --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/profiler/rpc/profiler_service_impl.h @@ -0,0 +1,31 @@ +/* Copyright 2018 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ +#ifndef TENSORFLOW_CORE_PROFILER_RPC_PROFILER_SERVICE_IMPL_H_ +#define TENSORFLOW_CORE_PROFILER_RPC_PROFILER_SERVICE_IMPL_H_ + +#include + +#include "tsl/profiler/protobuf/profiler_service.grpc.pb.h" +#include "tsl/profiler/rpc/profiler_service_impl.h" + +namespace tensorflow { +namespace profiler { + +using tsl::profiler::CreateProfilerService; // NOLINT + +} // namespace profiler +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_PROFILER_RPC_PROFILER_SERVICE_IMPL_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/profiler/tfprof_log.pb.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/profiler/tfprof_log.pb.h new file mode 100644 index 0000000000000000000000000000000000000000..2cf98bb378666967da9cd20ad0e5ed918d7c540a --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/profiler/tfprof_log.pb.h @@ -0,0 +1,5150 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/profiler/tfprof_log.proto + +#ifndef GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto + +#include +#include + +#include +#if PROTOBUF_VERSION < 3021000 +#error This file was generated by a newer version of protoc which is +#error incompatible with your Protocol Buffer headers. Please update +#error your headers. +#endif +#if 3021009 < PROTOBUF_MIN_PROTOC_VERSION +#error This file was generated by an older version of protoc which is +#error incompatible with your Protocol Buffer headers. Please +#error regenerate this file with a newer version of protoc. +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include // IWYU pragma: export +#include // IWYU pragma: export +#include // IWYU pragma: export +#include +#include +#include +#include "tensorflow/core/framework/attr_value.pb.h" +#include "tensorflow/core/framework/step_stats.pb.h" +// @@protoc_insertion_point(includes) +#include +#define PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto +PROTOBUF_NAMESPACE_OPEN +namespace internal { +class AnyMetadata; +} // namespace internal +PROTOBUF_NAMESPACE_CLOSE + +// Internal implementation detail -- do not use these members. +struct TableStruct_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto { + static const uint32_t offsets[]; +}; +extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto; +namespace tensorflow { +namespace tfprof { +class CodeDef; +struct CodeDefDefaultTypeInternal; +extern CodeDefDefaultTypeInternal _CodeDef_default_instance_; +class CodeDef_Trace; +struct CodeDef_TraceDefaultTypeInternal; +extern CodeDef_TraceDefaultTypeInternal _CodeDef_Trace_default_instance_; +class ExecMemory; +struct ExecMemoryDefaultTypeInternal; +extern ExecMemoryDefaultTypeInternal _ExecMemory_default_instance_; +class ExecMemory_OutputMemoryEntry_DoNotUse; +struct ExecMemory_OutputMemoryEntry_DoNotUseDefaultTypeInternal; +extern ExecMemory_OutputMemoryEntry_DoNotUseDefaultTypeInternal _ExecMemory_OutputMemoryEntry_DoNotUse_default_instance_; +class ExecProfile; +struct ExecProfileDefaultTypeInternal; +extern ExecProfileDefaultTypeInternal _ExecProfile_default_instance_; +class ExecProfile_AcceleratorExecsEntry_DoNotUse; +struct ExecProfile_AcceleratorExecsEntry_DoNotUseDefaultTypeInternal; +extern ExecProfile_AcceleratorExecsEntry_DoNotUseDefaultTypeInternal _ExecProfile_AcceleratorExecsEntry_DoNotUse_default_instance_; +class ExecProfile_CpuExecsEntry_DoNotUse; +struct ExecProfile_CpuExecsEntry_DoNotUseDefaultTypeInternal; +extern ExecProfile_CpuExecsEntry_DoNotUseDefaultTypeInternal _ExecProfile_CpuExecsEntry_DoNotUse_default_instance_; +class ExecTime; +struct ExecTimeDefaultTypeInternal; +extern ExecTimeDefaultTypeInternal _ExecTime_default_instance_; +class Memory; +struct MemoryDefaultTypeInternal; +extern MemoryDefaultTypeInternal _Memory_default_instance_; +class OpLogEntry; +struct OpLogEntryDefaultTypeInternal; +extern OpLogEntryDefaultTypeInternal _OpLogEntry_default_instance_; +class OpLogProto; +struct OpLogProtoDefaultTypeInternal; +extern OpLogProtoDefaultTypeInternal _OpLogProto_default_instance_; +class OpLogProto_IdToStringEntry_DoNotUse; +struct OpLogProto_IdToStringEntry_DoNotUseDefaultTypeInternal; +extern OpLogProto_IdToStringEntry_DoNotUseDefaultTypeInternal _OpLogProto_IdToStringEntry_DoNotUse_default_instance_; +class ProfileNode; +struct ProfileNodeDefaultTypeInternal; +extern ProfileNodeDefaultTypeInternal _ProfileNode_default_instance_; +class ProfileNode_AttrsEntry_DoNotUse; +struct ProfileNode_AttrsEntry_DoNotUseDefaultTypeInternal; +extern ProfileNode_AttrsEntry_DoNotUseDefaultTypeInternal _ProfileNode_AttrsEntry_DoNotUse_default_instance_; +class ProfileNode_ExecsEntry_DoNotUse; +struct ProfileNode_ExecsEntry_DoNotUseDefaultTypeInternal; +extern ProfileNode_ExecsEntry_DoNotUseDefaultTypeInternal _ProfileNode_ExecsEntry_DoNotUse_default_instance_; +class ProfileNode_InputShapesEntry_DoNotUse; +struct ProfileNode_InputShapesEntry_DoNotUseDefaultTypeInternal; +extern ProfileNode_InputShapesEntry_DoNotUseDefaultTypeInternal _ProfileNode_InputShapesEntry_DoNotUse_default_instance_; +class ProfileNode_InputsEntry_DoNotUse; +struct ProfileNode_InputsEntry_DoNotUseDefaultTypeInternal; +extern ProfileNode_InputsEntry_DoNotUseDefaultTypeInternal _ProfileNode_InputsEntry_DoNotUse_default_instance_; +class ProfileNode_OutputShapesEntry_DoNotUse; +struct ProfileNode_OutputShapesEntry_DoNotUseDefaultTypeInternal; +extern ProfileNode_OutputShapesEntry_DoNotUseDefaultTypeInternal _ProfileNode_OutputShapesEntry_DoNotUse_default_instance_; +class ProfileNode_OutputsEntry_DoNotUse; +struct ProfileNode_OutputsEntry_DoNotUseDefaultTypeInternal; +extern ProfileNode_OutputsEntry_DoNotUseDefaultTypeInternal _ProfileNode_OutputsEntry_DoNotUse_default_instance_; +class ProfileNode_SrcOutputIndexEntry_DoNotUse; +struct ProfileNode_SrcOutputIndexEntry_DoNotUseDefaultTypeInternal; +extern ProfileNode_SrcOutputIndexEntry_DoNotUseDefaultTypeInternal _ProfileNode_SrcOutputIndexEntry_DoNotUse_default_instance_; +class ProfileProto; +struct ProfileProtoDefaultTypeInternal; +extern ProfileProtoDefaultTypeInternal _ProfileProto_default_instance_; +class ProfileProto_IdToStringEntry_DoNotUse; +struct ProfileProto_IdToStringEntry_DoNotUseDefaultTypeInternal; +extern ProfileProto_IdToStringEntry_DoNotUseDefaultTypeInternal _ProfileProto_IdToStringEntry_DoNotUse_default_instance_; +class ProfileProto_NodesEntry_DoNotUse; +struct ProfileProto_NodesEntry_DoNotUseDefaultTypeInternal; +extern ProfileProto_NodesEntry_DoNotUseDefaultTypeInternal _ProfileProto_NodesEntry_DoNotUse_default_instance_; +class Tuple; +struct TupleDefaultTypeInternal; +extern TupleDefaultTypeInternal _Tuple_default_instance_; +} // namespace tfprof +} // namespace tensorflow +PROTOBUF_NAMESPACE_OPEN +template<> ::tensorflow::tfprof::CodeDef* Arena::CreateMaybeMessage<::tensorflow::tfprof::CodeDef>(Arena*); +template<> ::tensorflow::tfprof::CodeDef_Trace* Arena::CreateMaybeMessage<::tensorflow::tfprof::CodeDef_Trace>(Arena*); +template<> ::tensorflow::tfprof::ExecMemory* Arena::CreateMaybeMessage<::tensorflow::tfprof::ExecMemory>(Arena*); +template<> ::tensorflow::tfprof::ExecMemory_OutputMemoryEntry_DoNotUse* Arena::CreateMaybeMessage<::tensorflow::tfprof::ExecMemory_OutputMemoryEntry_DoNotUse>(Arena*); +template<> ::tensorflow::tfprof::ExecProfile* Arena::CreateMaybeMessage<::tensorflow::tfprof::ExecProfile>(Arena*); +template<> ::tensorflow::tfprof::ExecProfile_AcceleratorExecsEntry_DoNotUse* Arena::CreateMaybeMessage<::tensorflow::tfprof::ExecProfile_AcceleratorExecsEntry_DoNotUse>(Arena*); +template<> ::tensorflow::tfprof::ExecProfile_CpuExecsEntry_DoNotUse* Arena::CreateMaybeMessage<::tensorflow::tfprof::ExecProfile_CpuExecsEntry_DoNotUse>(Arena*); +template<> ::tensorflow::tfprof::ExecTime* Arena::CreateMaybeMessage<::tensorflow::tfprof::ExecTime>(Arena*); +template<> ::tensorflow::tfprof::Memory* Arena::CreateMaybeMessage<::tensorflow::tfprof::Memory>(Arena*); +template<> ::tensorflow::tfprof::OpLogEntry* Arena::CreateMaybeMessage<::tensorflow::tfprof::OpLogEntry>(Arena*); +template<> ::tensorflow::tfprof::OpLogProto* Arena::CreateMaybeMessage<::tensorflow::tfprof::OpLogProto>(Arena*); +template<> ::tensorflow::tfprof::OpLogProto_IdToStringEntry_DoNotUse* Arena::CreateMaybeMessage<::tensorflow::tfprof::OpLogProto_IdToStringEntry_DoNotUse>(Arena*); +template<> ::tensorflow::tfprof::ProfileNode* Arena::CreateMaybeMessage<::tensorflow::tfprof::ProfileNode>(Arena*); +template<> ::tensorflow::tfprof::ProfileNode_AttrsEntry_DoNotUse* Arena::CreateMaybeMessage<::tensorflow::tfprof::ProfileNode_AttrsEntry_DoNotUse>(Arena*); +template<> ::tensorflow::tfprof::ProfileNode_ExecsEntry_DoNotUse* Arena::CreateMaybeMessage<::tensorflow::tfprof::ProfileNode_ExecsEntry_DoNotUse>(Arena*); +template<> ::tensorflow::tfprof::ProfileNode_InputShapesEntry_DoNotUse* Arena::CreateMaybeMessage<::tensorflow::tfprof::ProfileNode_InputShapesEntry_DoNotUse>(Arena*); +template<> ::tensorflow::tfprof::ProfileNode_InputsEntry_DoNotUse* Arena::CreateMaybeMessage<::tensorflow::tfprof::ProfileNode_InputsEntry_DoNotUse>(Arena*); +template<> ::tensorflow::tfprof::ProfileNode_OutputShapesEntry_DoNotUse* Arena::CreateMaybeMessage<::tensorflow::tfprof::ProfileNode_OutputShapesEntry_DoNotUse>(Arena*); +template<> ::tensorflow::tfprof::ProfileNode_OutputsEntry_DoNotUse* Arena::CreateMaybeMessage<::tensorflow::tfprof::ProfileNode_OutputsEntry_DoNotUse>(Arena*); +template<> ::tensorflow::tfprof::ProfileNode_SrcOutputIndexEntry_DoNotUse* Arena::CreateMaybeMessage<::tensorflow::tfprof::ProfileNode_SrcOutputIndexEntry_DoNotUse>(Arena*); +template<> ::tensorflow::tfprof::ProfileProto* Arena::CreateMaybeMessage<::tensorflow::tfprof::ProfileProto>(Arena*); +template<> ::tensorflow::tfprof::ProfileProto_IdToStringEntry_DoNotUse* Arena::CreateMaybeMessage<::tensorflow::tfprof::ProfileProto_IdToStringEntry_DoNotUse>(Arena*); +template<> ::tensorflow::tfprof::ProfileProto_NodesEntry_DoNotUse* Arena::CreateMaybeMessage<::tensorflow::tfprof::ProfileProto_NodesEntry_DoNotUse>(Arena*); +template<> ::tensorflow::tfprof::Tuple* Arena::CreateMaybeMessage<::tensorflow::tfprof::Tuple>(Arena*); +PROTOBUF_NAMESPACE_CLOSE +namespace tensorflow { +namespace tfprof { + +// =================================================================== + +class CodeDef_Trace final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.tfprof.CodeDef.Trace) */ { + public: + inline CodeDef_Trace() : CodeDef_Trace(nullptr) {} + ~CodeDef_Trace() override; + explicit PROTOBUF_CONSTEXPR CodeDef_Trace(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + CodeDef_Trace(const CodeDef_Trace& from); + CodeDef_Trace(CodeDef_Trace&& from) noexcept + : CodeDef_Trace() { + *this = ::std::move(from); + } + + inline CodeDef_Trace& operator=(const CodeDef_Trace& from) { + CopyFrom(from); + return *this; + } + inline CodeDef_Trace& operator=(CodeDef_Trace&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const CodeDef_Trace& default_instance() { + return *internal_default_instance(); + } + static inline const CodeDef_Trace* internal_default_instance() { + return reinterpret_cast( + &_CodeDef_Trace_default_instance_); + } + static constexpr int kIndexInFileMessages = + 0; + + friend void swap(CodeDef_Trace& a, CodeDef_Trace& b) { + a.Swap(&b); + } + inline void Swap(CodeDef_Trace* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(CodeDef_Trace* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + CodeDef_Trace* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const CodeDef_Trace& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const CodeDef_Trace& from) { + CodeDef_Trace::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(CodeDef_Trace* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.tfprof.CodeDef.Trace"; + } + protected: + explicit CodeDef_Trace(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kFileFieldNumber = 1, + kFunctionFieldNumber = 3, + kLineFieldNumber = 4, + kLinenoFieldNumber = 2, + kFuncStartLineFieldNumber = 5, + kFileIdFieldNumber = 6, + kFunctionIdFieldNumber = 7, + kLineIdFieldNumber = 8, + }; + // string file = 1 [deprecated = true]; + PROTOBUF_DEPRECATED void clear_file(); + PROTOBUF_DEPRECATED const std::string& file() const; + template + PROTOBUF_DEPRECATED void set_file(ArgT0&& arg0, ArgT... args); + PROTOBUF_DEPRECATED std::string* mutable_file(); + PROTOBUF_NODISCARD PROTOBUF_DEPRECATED std::string* release_file(); + PROTOBUF_DEPRECATED void set_allocated_file(std::string* file); + private: + const std::string& _internal_file() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_file(const std::string& value); + std::string* _internal_mutable_file(); + public: + + // string function = 3 [deprecated = true]; + PROTOBUF_DEPRECATED void clear_function(); + PROTOBUF_DEPRECATED const std::string& function() const; + template + PROTOBUF_DEPRECATED void set_function(ArgT0&& arg0, ArgT... args); + PROTOBUF_DEPRECATED std::string* mutable_function(); + PROTOBUF_NODISCARD PROTOBUF_DEPRECATED std::string* release_function(); + PROTOBUF_DEPRECATED void set_allocated_function(std::string* function); + private: + const std::string& _internal_function() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_function(const std::string& value); + std::string* _internal_mutable_function(); + public: + + // string line = 4 [deprecated = true]; + PROTOBUF_DEPRECATED void clear_line(); + PROTOBUF_DEPRECATED const std::string& line() const; + template + PROTOBUF_DEPRECATED void set_line(ArgT0&& arg0, ArgT... args); + PROTOBUF_DEPRECATED std::string* mutable_line(); + PROTOBUF_NODISCARD PROTOBUF_DEPRECATED std::string* release_line(); + PROTOBUF_DEPRECATED void set_allocated_line(std::string* line); + private: + const std::string& _internal_line() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_line(const std::string& value); + std::string* _internal_mutable_line(); + public: + + // int32 lineno = 2; + void clear_lineno(); + int32_t lineno() const; + void set_lineno(int32_t value); + private: + int32_t _internal_lineno() const; + void _internal_set_lineno(int32_t value); + public: + + // int32 func_start_line = 5; + void clear_func_start_line(); + int32_t func_start_line() const; + void set_func_start_line(int32_t value); + private: + int32_t _internal_func_start_line() const; + void _internal_set_func_start_line(int32_t value); + public: + + // int64 file_id = 6; + void clear_file_id(); + int64_t file_id() const; + void set_file_id(int64_t value); + private: + int64_t _internal_file_id() const; + void _internal_set_file_id(int64_t value); + public: + + // int64 function_id = 7; + void clear_function_id(); + int64_t function_id() const; + void set_function_id(int64_t value); + private: + int64_t _internal_function_id() const; + void _internal_set_function_id(int64_t value); + public: + + // int64 line_id = 8; + void clear_line_id(); + int64_t line_id() const; + void set_line_id(int64_t value); + private: + int64_t _internal_line_id() const; + void _internal_set_line_id(int64_t value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.tfprof.CodeDef.Trace) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr file_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr function_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr line_; + int32_t lineno_; + int32_t func_start_line_; + int64_t file_id_; + int64_t function_id_; + int64_t line_id_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto; +}; +// ------------------------------------------------------------------- + +class CodeDef final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.tfprof.CodeDef) */ { + public: + inline CodeDef() : CodeDef(nullptr) {} + ~CodeDef() override; + explicit PROTOBUF_CONSTEXPR CodeDef(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + CodeDef(const CodeDef& from); + CodeDef(CodeDef&& from) noexcept + : CodeDef() { + *this = ::std::move(from); + } + + inline CodeDef& operator=(const CodeDef& from) { + CopyFrom(from); + return *this; + } + inline CodeDef& operator=(CodeDef&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const CodeDef& default_instance() { + return *internal_default_instance(); + } + static inline const CodeDef* internal_default_instance() { + return reinterpret_cast( + &_CodeDef_default_instance_); + } + static constexpr int kIndexInFileMessages = + 1; + + friend void swap(CodeDef& a, CodeDef& b) { + a.Swap(&b); + } + inline void Swap(CodeDef* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(CodeDef* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + CodeDef* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const CodeDef& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const CodeDef& from) { + CodeDef::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(CodeDef* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.tfprof.CodeDef"; + } + protected: + explicit CodeDef(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + typedef CodeDef_Trace Trace; + + // accessors ------------------------------------------------------- + + enum : int { + kTracesFieldNumber = 1, + }; + // repeated .tensorflow.tfprof.CodeDef.Trace traces = 1; + int traces_size() const; + private: + int _internal_traces_size() const; + public: + void clear_traces(); + ::tensorflow::tfprof::CodeDef_Trace* mutable_traces(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::tfprof::CodeDef_Trace >* + mutable_traces(); + private: + const ::tensorflow::tfprof::CodeDef_Trace& _internal_traces(int index) const; + ::tensorflow::tfprof::CodeDef_Trace* _internal_add_traces(); + public: + const ::tensorflow::tfprof::CodeDef_Trace& traces(int index) const; + ::tensorflow::tfprof::CodeDef_Trace* add_traces(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::tfprof::CodeDef_Trace >& + traces() const; + + // @@protoc_insertion_point(class_scope:tensorflow.tfprof.CodeDef) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::tfprof::CodeDef_Trace > traces_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto; +}; +// ------------------------------------------------------------------- + +class OpLogEntry final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.tfprof.OpLogEntry) */ { + public: + inline OpLogEntry() : OpLogEntry(nullptr) {} + ~OpLogEntry() override; + explicit PROTOBUF_CONSTEXPR OpLogEntry(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + OpLogEntry(const OpLogEntry& from); + OpLogEntry(OpLogEntry&& from) noexcept + : OpLogEntry() { + *this = ::std::move(from); + } + + inline OpLogEntry& operator=(const OpLogEntry& from) { + CopyFrom(from); + return *this; + } + inline OpLogEntry& operator=(OpLogEntry&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const OpLogEntry& default_instance() { + return *internal_default_instance(); + } + static inline const OpLogEntry* internal_default_instance() { + return reinterpret_cast( + &_OpLogEntry_default_instance_); + } + static constexpr int kIndexInFileMessages = + 2; + + friend void swap(OpLogEntry& a, OpLogEntry& b) { + a.Swap(&b); + } + inline void Swap(OpLogEntry* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(OpLogEntry* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + OpLogEntry* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const OpLogEntry& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const OpLogEntry& from) { + OpLogEntry::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(OpLogEntry* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.tfprof.OpLogEntry"; + } + protected: + explicit OpLogEntry(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kTypesFieldNumber = 3, + kNameFieldNumber = 1, + kCodeDefFieldNumber = 4, + kFloatOpsFieldNumber = 2, + }; + // repeated string types = 3; + int types_size() const; + private: + int _internal_types_size() const; + public: + void clear_types(); + const std::string& types(int index) const; + std::string* mutable_types(int index); + void set_types(int index, const std::string& value); + void set_types(int index, std::string&& value); + void set_types(int index, const char* value); + void set_types(int index, const char* value, size_t size); + std::string* add_types(); + void add_types(const std::string& value); + void add_types(std::string&& value); + void add_types(const char* value); + void add_types(const char* value, size_t size); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& types() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* mutable_types(); + private: + const std::string& _internal_types(int index) const; + std::string* _internal_add_types(); + public: + + // string name = 1; + void clear_name(); + const std::string& name() const; + template + void set_name(ArgT0&& arg0, ArgT... args); + std::string* mutable_name(); + PROTOBUF_NODISCARD std::string* release_name(); + void set_allocated_name(std::string* name); + private: + const std::string& _internal_name() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_name(const std::string& value); + std::string* _internal_mutable_name(); + public: + + // .tensorflow.tfprof.CodeDef code_def = 4; + bool has_code_def() const; + private: + bool _internal_has_code_def() const; + public: + void clear_code_def(); + const ::tensorflow::tfprof::CodeDef& code_def() const; + PROTOBUF_NODISCARD ::tensorflow::tfprof::CodeDef* release_code_def(); + ::tensorflow::tfprof::CodeDef* mutable_code_def(); + void set_allocated_code_def(::tensorflow::tfprof::CodeDef* code_def); + private: + const ::tensorflow::tfprof::CodeDef& _internal_code_def() const; + ::tensorflow::tfprof::CodeDef* _internal_mutable_code_def(); + public: + void unsafe_arena_set_allocated_code_def( + ::tensorflow::tfprof::CodeDef* code_def); + ::tensorflow::tfprof::CodeDef* unsafe_arena_release_code_def(); + + // int64 float_ops = 2; + void clear_float_ops(); + int64_t float_ops() const; + void set_float_ops(int64_t value); + private: + int64_t _internal_float_ops() const; + void _internal_set_float_ops(int64_t value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.tfprof.OpLogEntry) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField types_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_; + ::tensorflow::tfprof::CodeDef* code_def_; + int64_t float_ops_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto; +}; +// ------------------------------------------------------------------- + +class OpLogProto_IdToStringEntry_DoNotUse : public ::PROTOBUF_NAMESPACE_ID::internal::MapEntry { +public: + typedef ::PROTOBUF_NAMESPACE_ID::internal::MapEntry SuperType; + OpLogProto_IdToStringEntry_DoNotUse(); + explicit PROTOBUF_CONSTEXPR OpLogProto_IdToStringEntry_DoNotUse( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + explicit OpLogProto_IdToStringEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena); + void MergeFrom(const OpLogProto_IdToStringEntry_DoNotUse& other); + static const OpLogProto_IdToStringEntry_DoNotUse* internal_default_instance() { return reinterpret_cast(&_OpLogProto_IdToStringEntry_DoNotUse_default_instance_); } + static bool ValidateKey(void*) { return true; } + static bool ValidateValue(std::string* s) { + return ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(s->data(), static_cast(s->size()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, "tensorflow.tfprof.OpLogProto.IdToStringEntry.value"); + } + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + friend struct ::TableStruct_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto; +}; + +// ------------------------------------------------------------------- + +class OpLogProto final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.tfprof.OpLogProto) */ { + public: + inline OpLogProto() : OpLogProto(nullptr) {} + ~OpLogProto() override; + explicit PROTOBUF_CONSTEXPR OpLogProto(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + OpLogProto(const OpLogProto& from); + OpLogProto(OpLogProto&& from) noexcept + : OpLogProto() { + *this = ::std::move(from); + } + + inline OpLogProto& operator=(const OpLogProto& from) { + CopyFrom(from); + return *this; + } + inline OpLogProto& operator=(OpLogProto&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const OpLogProto& default_instance() { + return *internal_default_instance(); + } + static inline const OpLogProto* internal_default_instance() { + return reinterpret_cast( + &_OpLogProto_default_instance_); + } + static constexpr int kIndexInFileMessages = + 4; + + friend void swap(OpLogProto& a, OpLogProto& b) { + a.Swap(&b); + } + inline void Swap(OpLogProto* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(OpLogProto* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + OpLogProto* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const OpLogProto& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const OpLogProto& from) { + OpLogProto::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(OpLogProto* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.tfprof.OpLogProto"; + } + protected: + explicit OpLogProto(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + + // accessors ------------------------------------------------------- + + enum : int { + kLogEntriesFieldNumber = 1, + kIdToStringFieldNumber = 2, + }; + // repeated .tensorflow.tfprof.OpLogEntry log_entries = 1; + int log_entries_size() const; + private: + int _internal_log_entries_size() const; + public: + void clear_log_entries(); + ::tensorflow::tfprof::OpLogEntry* mutable_log_entries(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::tfprof::OpLogEntry >* + mutable_log_entries(); + private: + const ::tensorflow::tfprof::OpLogEntry& _internal_log_entries(int index) const; + ::tensorflow::tfprof::OpLogEntry* _internal_add_log_entries(); + public: + const ::tensorflow::tfprof::OpLogEntry& log_entries(int index) const; + ::tensorflow::tfprof::OpLogEntry* add_log_entries(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::tfprof::OpLogEntry >& + log_entries() const; + + // map id_to_string = 2; + int id_to_string_size() const; + private: + int _internal_id_to_string_size() const; + public: + void clear_id_to_string(); + private: + const ::PROTOBUF_NAMESPACE_ID::Map< int64_t, std::string >& + _internal_id_to_string() const; + ::PROTOBUF_NAMESPACE_ID::Map< int64_t, std::string >* + _internal_mutable_id_to_string(); + public: + const ::PROTOBUF_NAMESPACE_ID::Map< int64_t, std::string >& + id_to_string() const; + ::PROTOBUF_NAMESPACE_ID::Map< int64_t, std::string >* + mutable_id_to_string(); + + // @@protoc_insertion_point(class_scope:tensorflow.tfprof.OpLogProto) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::tfprof::OpLogEntry > log_entries_; + ::PROTOBUF_NAMESPACE_ID::internal::MapField< + OpLogProto_IdToStringEntry_DoNotUse, + int64_t, std::string, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING> id_to_string_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto; +}; +// ------------------------------------------------------------------- + +class ProfileProto_NodesEntry_DoNotUse : public ::PROTOBUF_NAMESPACE_ID::internal::MapEntry { +public: + typedef ::PROTOBUF_NAMESPACE_ID::internal::MapEntry SuperType; + ProfileProto_NodesEntry_DoNotUse(); + explicit PROTOBUF_CONSTEXPR ProfileProto_NodesEntry_DoNotUse( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + explicit ProfileProto_NodesEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena); + void MergeFrom(const ProfileProto_NodesEntry_DoNotUse& other); + static const ProfileProto_NodesEntry_DoNotUse* internal_default_instance() { return reinterpret_cast(&_ProfileProto_NodesEntry_DoNotUse_default_instance_); } + static bool ValidateKey(void*) { return true; } + static bool ValidateValue(void*) { return true; } + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + friend struct ::TableStruct_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto; +}; + +// ------------------------------------------------------------------- + +class ProfileProto_IdToStringEntry_DoNotUse : public ::PROTOBUF_NAMESPACE_ID::internal::MapEntry { +public: + typedef ::PROTOBUF_NAMESPACE_ID::internal::MapEntry SuperType; + ProfileProto_IdToStringEntry_DoNotUse(); + explicit PROTOBUF_CONSTEXPR ProfileProto_IdToStringEntry_DoNotUse( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + explicit ProfileProto_IdToStringEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena); + void MergeFrom(const ProfileProto_IdToStringEntry_DoNotUse& other); + static const ProfileProto_IdToStringEntry_DoNotUse* internal_default_instance() { return reinterpret_cast(&_ProfileProto_IdToStringEntry_DoNotUse_default_instance_); } + static bool ValidateKey(void*) { return true; } + static bool ValidateValue(std::string* s) { + return ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(s->data(), static_cast(s->size()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, "tensorflow.tfprof.ProfileProto.IdToStringEntry.value"); + } + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + friend struct ::TableStruct_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto; +}; + +// ------------------------------------------------------------------- + +class ProfileProto final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.tfprof.ProfileProto) */ { + public: + inline ProfileProto() : ProfileProto(nullptr) {} + ~ProfileProto() override; + explicit PROTOBUF_CONSTEXPR ProfileProto(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + ProfileProto(const ProfileProto& from); + ProfileProto(ProfileProto&& from) noexcept + : ProfileProto() { + *this = ::std::move(from); + } + + inline ProfileProto& operator=(const ProfileProto& from) { + CopyFrom(from); + return *this; + } + inline ProfileProto& operator=(ProfileProto&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const ProfileProto& default_instance() { + return *internal_default_instance(); + } + static inline const ProfileProto* internal_default_instance() { + return reinterpret_cast( + &_ProfileProto_default_instance_); + } + static constexpr int kIndexInFileMessages = + 7; + + friend void swap(ProfileProto& a, ProfileProto& b) { + a.Swap(&b); + } + inline void Swap(ProfileProto* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(ProfileProto* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + ProfileProto* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const ProfileProto& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const ProfileProto& from) { + ProfileProto::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(ProfileProto* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.tfprof.ProfileProto"; + } + protected: + explicit ProfileProto(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + + // accessors ------------------------------------------------------- + + enum : int { + kNodesFieldNumber = 1, + kStepsFieldNumber = 3, + kIdToStringFieldNumber = 4, + kHasTraceFieldNumber = 2, + kMissAcceleratorStreamFieldNumber = 5, + }; + // map nodes = 1; + int nodes_size() const; + private: + int _internal_nodes_size() const; + public: + void clear_nodes(); + private: + const ::PROTOBUF_NAMESPACE_ID::Map< int64_t, ::tensorflow::tfprof::ProfileNode >& + _internal_nodes() const; + ::PROTOBUF_NAMESPACE_ID::Map< int64_t, ::tensorflow::tfprof::ProfileNode >* + _internal_mutable_nodes(); + public: + const ::PROTOBUF_NAMESPACE_ID::Map< int64_t, ::tensorflow::tfprof::ProfileNode >& + nodes() const; + ::PROTOBUF_NAMESPACE_ID::Map< int64_t, ::tensorflow::tfprof::ProfileNode >* + mutable_nodes(); + + // repeated int64 steps = 3; + int steps_size() const; + private: + int _internal_steps_size() const; + public: + void clear_steps(); + private: + int64_t _internal_steps(int index) const; + const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >& + _internal_steps() const; + void _internal_add_steps(int64_t value); + ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >* + _internal_mutable_steps(); + public: + int64_t steps(int index) const; + void set_steps(int index, int64_t value); + void add_steps(int64_t value); + const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >& + steps() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >* + mutable_steps(); + + // map id_to_string = 4; + int id_to_string_size() const; + private: + int _internal_id_to_string_size() const; + public: + void clear_id_to_string(); + private: + const ::PROTOBUF_NAMESPACE_ID::Map< int64_t, std::string >& + _internal_id_to_string() const; + ::PROTOBUF_NAMESPACE_ID::Map< int64_t, std::string >* + _internal_mutable_id_to_string(); + public: + const ::PROTOBUF_NAMESPACE_ID::Map< int64_t, std::string >& + id_to_string() const; + ::PROTOBUF_NAMESPACE_ID::Map< int64_t, std::string >* + mutable_id_to_string(); + + // bool has_trace = 2; + void clear_has_trace(); + bool has_trace() const; + void set_has_trace(bool value); + private: + bool _internal_has_trace() const; + void _internal_set_has_trace(bool value); + public: + + // bool miss_accelerator_stream = 5; + void clear_miss_accelerator_stream(); + bool miss_accelerator_stream() const; + void set_miss_accelerator_stream(bool value); + private: + bool _internal_miss_accelerator_stream() const; + void _internal_set_miss_accelerator_stream(bool value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.tfprof.ProfileProto) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::MapField< + ProfileProto_NodesEntry_DoNotUse, + int64_t, ::tensorflow::tfprof::ProfileNode, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_MESSAGE> nodes_; + ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t > steps_; + mutable std::atomic _steps_cached_byte_size_; + ::PROTOBUF_NAMESPACE_ID::internal::MapField< + ProfileProto_IdToStringEntry_DoNotUse, + int64_t, std::string, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING> id_to_string_; + bool has_trace_; + bool miss_accelerator_stream_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto; +}; +// ------------------------------------------------------------------- + +class ProfileNode_InputsEntry_DoNotUse : public ::PROTOBUF_NAMESPACE_ID::internal::MapEntry { +public: + typedef ::PROTOBUF_NAMESPACE_ID::internal::MapEntry SuperType; + ProfileNode_InputsEntry_DoNotUse(); + explicit PROTOBUF_CONSTEXPR ProfileNode_InputsEntry_DoNotUse( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + explicit ProfileNode_InputsEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena); + void MergeFrom(const ProfileNode_InputsEntry_DoNotUse& other); + static const ProfileNode_InputsEntry_DoNotUse* internal_default_instance() { return reinterpret_cast(&_ProfileNode_InputsEntry_DoNotUse_default_instance_); } + static bool ValidateKey(void*) { return true; } + static bool ValidateValue(void*) { return true; } + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + friend struct ::TableStruct_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto; +}; + +// ------------------------------------------------------------------- + +class ProfileNode_InputShapesEntry_DoNotUse : public ::PROTOBUF_NAMESPACE_ID::internal::MapEntry { +public: + typedef ::PROTOBUF_NAMESPACE_ID::internal::MapEntry SuperType; + ProfileNode_InputShapesEntry_DoNotUse(); + explicit PROTOBUF_CONSTEXPR ProfileNode_InputShapesEntry_DoNotUse( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + explicit ProfileNode_InputShapesEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena); + void MergeFrom(const ProfileNode_InputShapesEntry_DoNotUse& other); + static const ProfileNode_InputShapesEntry_DoNotUse* internal_default_instance() { return reinterpret_cast(&_ProfileNode_InputShapesEntry_DoNotUse_default_instance_); } + static bool ValidateKey(void*) { return true; } + static bool ValidateValue(void*) { return true; } + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + friend struct ::TableStruct_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto; +}; + +// ------------------------------------------------------------------- + +class ProfileNode_OutputsEntry_DoNotUse : public ::PROTOBUF_NAMESPACE_ID::internal::MapEntry { +public: + typedef ::PROTOBUF_NAMESPACE_ID::internal::MapEntry SuperType; + ProfileNode_OutputsEntry_DoNotUse(); + explicit PROTOBUF_CONSTEXPR ProfileNode_OutputsEntry_DoNotUse( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + explicit ProfileNode_OutputsEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena); + void MergeFrom(const ProfileNode_OutputsEntry_DoNotUse& other); + static const ProfileNode_OutputsEntry_DoNotUse* internal_default_instance() { return reinterpret_cast(&_ProfileNode_OutputsEntry_DoNotUse_default_instance_); } + static bool ValidateKey(void*) { return true; } + static bool ValidateValue(void*) { return true; } + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + friend struct ::TableStruct_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto; +}; + +// ------------------------------------------------------------------- + +class ProfileNode_OutputShapesEntry_DoNotUse : public ::PROTOBUF_NAMESPACE_ID::internal::MapEntry { +public: + typedef ::PROTOBUF_NAMESPACE_ID::internal::MapEntry SuperType; + ProfileNode_OutputShapesEntry_DoNotUse(); + explicit PROTOBUF_CONSTEXPR ProfileNode_OutputShapesEntry_DoNotUse( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + explicit ProfileNode_OutputShapesEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena); + void MergeFrom(const ProfileNode_OutputShapesEntry_DoNotUse& other); + static const ProfileNode_OutputShapesEntry_DoNotUse* internal_default_instance() { return reinterpret_cast(&_ProfileNode_OutputShapesEntry_DoNotUse_default_instance_); } + static bool ValidateKey(void*) { return true; } + static bool ValidateValue(void*) { return true; } + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + friend struct ::TableStruct_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto; +}; + +// ------------------------------------------------------------------- + +class ProfileNode_SrcOutputIndexEntry_DoNotUse : public ::PROTOBUF_NAMESPACE_ID::internal::MapEntry { +public: + typedef ::PROTOBUF_NAMESPACE_ID::internal::MapEntry SuperType; + ProfileNode_SrcOutputIndexEntry_DoNotUse(); + explicit PROTOBUF_CONSTEXPR ProfileNode_SrcOutputIndexEntry_DoNotUse( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + explicit ProfileNode_SrcOutputIndexEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena); + void MergeFrom(const ProfileNode_SrcOutputIndexEntry_DoNotUse& other); + static const ProfileNode_SrcOutputIndexEntry_DoNotUse* internal_default_instance() { return reinterpret_cast(&_ProfileNode_SrcOutputIndexEntry_DoNotUse_default_instance_); } + static bool ValidateKey(void*) { return true; } + static bool ValidateValue(void*) { return true; } + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + friend struct ::TableStruct_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto; +}; + +// ------------------------------------------------------------------- + +class ProfileNode_AttrsEntry_DoNotUse : public ::PROTOBUF_NAMESPACE_ID::internal::MapEntry { +public: + typedef ::PROTOBUF_NAMESPACE_ID::internal::MapEntry SuperType; + ProfileNode_AttrsEntry_DoNotUse(); + explicit PROTOBUF_CONSTEXPR ProfileNode_AttrsEntry_DoNotUse( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + explicit ProfileNode_AttrsEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena); + void MergeFrom(const ProfileNode_AttrsEntry_DoNotUse& other); + static const ProfileNode_AttrsEntry_DoNotUse* internal_default_instance() { return reinterpret_cast(&_ProfileNode_AttrsEntry_DoNotUse_default_instance_); } + static bool ValidateKey(std::string* s) { + return ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(s->data(), static_cast(s->size()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, "tensorflow.tfprof.ProfileNode.AttrsEntry.key"); + } + static bool ValidateValue(void*) { return true; } + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + friend struct ::TableStruct_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto; +}; + +// ------------------------------------------------------------------- + +class ProfileNode_ExecsEntry_DoNotUse : public ::PROTOBUF_NAMESPACE_ID::internal::MapEntry { +public: + typedef ::PROTOBUF_NAMESPACE_ID::internal::MapEntry SuperType; + ProfileNode_ExecsEntry_DoNotUse(); + explicit PROTOBUF_CONSTEXPR ProfileNode_ExecsEntry_DoNotUse( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + explicit ProfileNode_ExecsEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena); + void MergeFrom(const ProfileNode_ExecsEntry_DoNotUse& other); + static const ProfileNode_ExecsEntry_DoNotUse* internal_default_instance() { return reinterpret_cast(&_ProfileNode_ExecsEntry_DoNotUse_default_instance_); } + static bool ValidateKey(void*) { return true; } + static bool ValidateValue(void*) { return true; } + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + friend struct ::TableStruct_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto; +}; + +// ------------------------------------------------------------------- + +class ProfileNode final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.tfprof.ProfileNode) */ { + public: + inline ProfileNode() : ProfileNode(nullptr) {} + ~ProfileNode() override; + explicit PROTOBUF_CONSTEXPR ProfileNode(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + ProfileNode(const ProfileNode& from); + ProfileNode(ProfileNode&& from) noexcept + : ProfileNode() { + *this = ::std::move(from); + } + + inline ProfileNode& operator=(const ProfileNode& from) { + CopyFrom(from); + return *this; + } + inline ProfileNode& operator=(ProfileNode&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const ProfileNode& default_instance() { + return *internal_default_instance(); + } + static inline const ProfileNode* internal_default_instance() { + return reinterpret_cast( + &_ProfileNode_default_instance_); + } + static constexpr int kIndexInFileMessages = + 15; + + friend void swap(ProfileNode& a, ProfileNode& b) { + a.Swap(&b); + } + inline void Swap(ProfileNode* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(ProfileNode* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + ProfileNode* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const ProfileNode& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const ProfileNode& from) { + ProfileNode::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(ProfileNode* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.tfprof.ProfileNode"; + } + protected: + explicit ProfileNode(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + + // accessors ------------------------------------------------------- + + enum : int { + kInputsFieldNumber = 2, + kOutputsFieldNumber = 3, + kShapeFieldNumber = 4, + kOpTypesFieldNumber = 5, + kAttrsFieldNumber = 11, + kExecsFieldNumber = 12, + kSrcOutputIndexFieldNumber = 14, + kOutputShapesFieldNumber = 15, + kInputShapesFieldNumber = 16, + kNameFieldNumber = 1, + kCanonicalDeviceFieldNumber = 6, + kHostDeviceFieldNumber = 7, + kOpFieldNumber = 9, + kTraceFieldNumber = 10, + kFloatOpsFieldNumber = 8, + kIdFieldNumber = 13, + }; + // map inputs = 2; + int inputs_size() const; + private: + int _internal_inputs_size() const; + public: + void clear_inputs(); + private: + const ::PROTOBUF_NAMESPACE_ID::Map< int32_t, int64_t >& + _internal_inputs() const; + ::PROTOBUF_NAMESPACE_ID::Map< int32_t, int64_t >* + _internal_mutable_inputs(); + public: + const ::PROTOBUF_NAMESPACE_ID::Map< int32_t, int64_t >& + inputs() const; + ::PROTOBUF_NAMESPACE_ID::Map< int32_t, int64_t >* + mutable_inputs(); + + // map outputs = 3; + int outputs_size() const; + private: + int _internal_outputs_size() const; + public: + void clear_outputs(); + private: + const ::PROTOBUF_NAMESPACE_ID::Map< int32_t, int64_t >& + _internal_outputs() const; + ::PROTOBUF_NAMESPACE_ID::Map< int32_t, int64_t >* + _internal_mutable_outputs(); + public: + const ::PROTOBUF_NAMESPACE_ID::Map< int32_t, int64_t >& + outputs() const; + ::PROTOBUF_NAMESPACE_ID::Map< int32_t, int64_t >* + mutable_outputs(); + + // repeated int64 shape = 4; + int shape_size() const; + private: + int _internal_shape_size() const; + public: + void clear_shape(); + private: + int64_t _internal_shape(int index) const; + const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >& + _internal_shape() const; + void _internal_add_shape(int64_t value); + ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >* + _internal_mutable_shape(); + public: + int64_t shape(int index) const; + void set_shape(int index, int64_t value); + void add_shape(int64_t value); + const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >& + shape() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >* + mutable_shape(); + + // repeated string op_types = 5; + int op_types_size() const; + private: + int _internal_op_types_size() const; + public: + void clear_op_types(); + const std::string& op_types(int index) const; + std::string* mutable_op_types(int index); + void set_op_types(int index, const std::string& value); + void set_op_types(int index, std::string&& value); + void set_op_types(int index, const char* value); + void set_op_types(int index, const char* value, size_t size); + std::string* add_op_types(); + void add_op_types(const std::string& value); + void add_op_types(std::string&& value); + void add_op_types(const char* value); + void add_op_types(const char* value, size_t size); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& op_types() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* mutable_op_types(); + private: + const std::string& _internal_op_types(int index) const; + std::string* _internal_add_op_types(); + public: + + // map attrs = 11; + int attrs_size() const; + private: + int _internal_attrs_size() const; + public: + void clear_attrs(); + private: + const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::AttrValue >& + _internal_attrs() const; + ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::AttrValue >* + _internal_mutable_attrs(); + public: + const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::AttrValue >& + attrs() const; + ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::AttrValue >* + mutable_attrs(); + + // map execs = 12; + int execs_size() const; + private: + int _internal_execs_size() const; + public: + void clear_execs(); + private: + const ::PROTOBUF_NAMESPACE_ID::Map< int64_t, ::tensorflow::tfprof::ExecProfile >& + _internal_execs() const; + ::PROTOBUF_NAMESPACE_ID::Map< int64_t, ::tensorflow::tfprof::ExecProfile >* + _internal_mutable_execs(); + public: + const ::PROTOBUF_NAMESPACE_ID::Map< int64_t, ::tensorflow::tfprof::ExecProfile >& + execs() const; + ::PROTOBUF_NAMESPACE_ID::Map< int64_t, ::tensorflow::tfprof::ExecProfile >* + mutable_execs(); + + // map src_output_index = 14; + int src_output_index_size() const; + private: + int _internal_src_output_index_size() const; + public: + void clear_src_output_index(); + private: + const ::PROTOBUF_NAMESPACE_ID::Map< int64_t, int32_t >& + _internal_src_output_index() const; + ::PROTOBUF_NAMESPACE_ID::Map< int64_t, int32_t >* + _internal_mutable_src_output_index(); + public: + const ::PROTOBUF_NAMESPACE_ID::Map< int64_t, int32_t >& + src_output_index() const; + ::PROTOBUF_NAMESPACE_ID::Map< int64_t, int32_t >* + mutable_src_output_index(); + + // map output_shapes = 15; + int output_shapes_size() const; + private: + int _internal_output_shapes_size() const; + public: + void clear_output_shapes(); + private: + const ::PROTOBUF_NAMESPACE_ID::Map< int32_t, ::tensorflow::tfprof::Tuple >& + _internal_output_shapes() const; + ::PROTOBUF_NAMESPACE_ID::Map< int32_t, ::tensorflow::tfprof::Tuple >* + _internal_mutable_output_shapes(); + public: + const ::PROTOBUF_NAMESPACE_ID::Map< int32_t, ::tensorflow::tfprof::Tuple >& + output_shapes() const; + ::PROTOBUF_NAMESPACE_ID::Map< int32_t, ::tensorflow::tfprof::Tuple >* + mutable_output_shapes(); + + // map input_shapes = 16; + int input_shapes_size() const; + private: + int _internal_input_shapes_size() const; + public: + void clear_input_shapes(); + private: + const ::PROTOBUF_NAMESPACE_ID::Map< int32_t, ::tensorflow::tfprof::Tuple >& + _internal_input_shapes() const; + ::PROTOBUF_NAMESPACE_ID::Map< int32_t, ::tensorflow::tfprof::Tuple >* + _internal_mutable_input_shapes(); + public: + const ::PROTOBUF_NAMESPACE_ID::Map< int32_t, ::tensorflow::tfprof::Tuple >& + input_shapes() const; + ::PROTOBUF_NAMESPACE_ID::Map< int32_t, ::tensorflow::tfprof::Tuple >* + mutable_input_shapes(); + + // string name = 1; + void clear_name(); + const std::string& name() const; + template + void set_name(ArgT0&& arg0, ArgT... args); + std::string* mutable_name(); + PROTOBUF_NODISCARD std::string* release_name(); + void set_allocated_name(std::string* name); + private: + const std::string& _internal_name() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_name(const std::string& value); + std::string* _internal_mutable_name(); + public: + + // string canonical_device = 6; + void clear_canonical_device(); + const std::string& canonical_device() const; + template + void set_canonical_device(ArgT0&& arg0, ArgT... args); + std::string* mutable_canonical_device(); + PROTOBUF_NODISCARD std::string* release_canonical_device(); + void set_allocated_canonical_device(std::string* canonical_device); + private: + const std::string& _internal_canonical_device() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_canonical_device(const std::string& value); + std::string* _internal_mutable_canonical_device(); + public: + + // string host_device = 7; + void clear_host_device(); + const std::string& host_device() const; + template + void set_host_device(ArgT0&& arg0, ArgT... args); + std::string* mutable_host_device(); + PROTOBUF_NODISCARD std::string* release_host_device(); + void set_allocated_host_device(std::string* host_device); + private: + const std::string& _internal_host_device() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_host_device(const std::string& value); + std::string* _internal_mutable_host_device(); + public: + + // string op = 9; + void clear_op(); + const std::string& op() const; + template + void set_op(ArgT0&& arg0, ArgT... args); + std::string* mutable_op(); + PROTOBUF_NODISCARD std::string* release_op(); + void set_allocated_op(std::string* op); + private: + const std::string& _internal_op() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_op(const std::string& value); + std::string* _internal_mutable_op(); + public: + + // .tensorflow.tfprof.CodeDef trace = 10; + bool has_trace() const; + private: + bool _internal_has_trace() const; + public: + void clear_trace(); + const ::tensorflow::tfprof::CodeDef& trace() const; + PROTOBUF_NODISCARD ::tensorflow::tfprof::CodeDef* release_trace(); + ::tensorflow::tfprof::CodeDef* mutable_trace(); + void set_allocated_trace(::tensorflow::tfprof::CodeDef* trace); + private: + const ::tensorflow::tfprof::CodeDef& _internal_trace() const; + ::tensorflow::tfprof::CodeDef* _internal_mutable_trace(); + public: + void unsafe_arena_set_allocated_trace( + ::tensorflow::tfprof::CodeDef* trace); + ::tensorflow::tfprof::CodeDef* unsafe_arena_release_trace(); + + // int64 float_ops = 8; + void clear_float_ops(); + int64_t float_ops() const; + void set_float_ops(int64_t value); + private: + int64_t _internal_float_ops() const; + void _internal_set_float_ops(int64_t value); + public: + + // int64 id = 13; + void clear_id(); + int64_t id() const; + void set_id(int64_t value); + private: + int64_t _internal_id() const; + void _internal_set_id(int64_t value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.tfprof.ProfileNode) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::MapField< + ProfileNode_InputsEntry_DoNotUse, + int32_t, int64_t, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT32, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64> inputs_; + ::PROTOBUF_NAMESPACE_ID::internal::MapField< + ProfileNode_OutputsEntry_DoNotUse, + int32_t, int64_t, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT32, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64> outputs_; + ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t > shape_; + mutable std::atomic _shape_cached_byte_size_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField op_types_; + ::PROTOBUF_NAMESPACE_ID::internal::MapField< + ProfileNode_AttrsEntry_DoNotUse, + std::string, ::tensorflow::AttrValue, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_MESSAGE> attrs_; + ::PROTOBUF_NAMESPACE_ID::internal::MapField< + ProfileNode_ExecsEntry_DoNotUse, + int64_t, ::tensorflow::tfprof::ExecProfile, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_MESSAGE> execs_; + ::PROTOBUF_NAMESPACE_ID::internal::MapField< + ProfileNode_SrcOutputIndexEntry_DoNotUse, + int64_t, int32_t, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT32> src_output_index_; + ::PROTOBUF_NAMESPACE_ID::internal::MapField< + ProfileNode_OutputShapesEntry_DoNotUse, + int32_t, ::tensorflow::tfprof::Tuple, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT32, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_MESSAGE> output_shapes_; + ::PROTOBUF_NAMESPACE_ID::internal::MapField< + ProfileNode_InputShapesEntry_DoNotUse, + int32_t, ::tensorflow::tfprof::Tuple, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT32, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_MESSAGE> input_shapes_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr canonical_device_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr host_device_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr op_; + ::tensorflow::tfprof::CodeDef* trace_; + int64_t float_ops_; + int64_t id_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto; +}; +// ------------------------------------------------------------------- + +class ExecProfile_AcceleratorExecsEntry_DoNotUse : public ::PROTOBUF_NAMESPACE_ID::internal::MapEntry { +public: + typedef ::PROTOBUF_NAMESPACE_ID::internal::MapEntry SuperType; + ExecProfile_AcceleratorExecsEntry_DoNotUse(); + explicit PROTOBUF_CONSTEXPR ExecProfile_AcceleratorExecsEntry_DoNotUse( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + explicit ExecProfile_AcceleratorExecsEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena); + void MergeFrom(const ExecProfile_AcceleratorExecsEntry_DoNotUse& other); + static const ExecProfile_AcceleratorExecsEntry_DoNotUse* internal_default_instance() { return reinterpret_cast(&_ExecProfile_AcceleratorExecsEntry_DoNotUse_default_instance_); } + static bool ValidateKey(std::string* s) { + return ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(s->data(), static_cast(s->size()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, "tensorflow.tfprof.ExecProfile.AcceleratorExecsEntry.key"); + } + static bool ValidateValue(void*) { return true; } + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + friend struct ::TableStruct_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto; +}; + +// ------------------------------------------------------------------- + +class ExecProfile_CpuExecsEntry_DoNotUse : public ::PROTOBUF_NAMESPACE_ID::internal::MapEntry { +public: + typedef ::PROTOBUF_NAMESPACE_ID::internal::MapEntry SuperType; + ExecProfile_CpuExecsEntry_DoNotUse(); + explicit PROTOBUF_CONSTEXPR ExecProfile_CpuExecsEntry_DoNotUse( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + explicit ExecProfile_CpuExecsEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena); + void MergeFrom(const ExecProfile_CpuExecsEntry_DoNotUse& other); + static const ExecProfile_CpuExecsEntry_DoNotUse* internal_default_instance() { return reinterpret_cast(&_ExecProfile_CpuExecsEntry_DoNotUse_default_instance_); } + static bool ValidateKey(std::string* s) { + return ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(s->data(), static_cast(s->size()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, "tensorflow.tfprof.ExecProfile.CpuExecsEntry.key"); + } + static bool ValidateValue(void*) { return true; } + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + friend struct ::TableStruct_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto; +}; + +// ------------------------------------------------------------------- + +class ExecProfile final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.tfprof.ExecProfile) */ { + public: + inline ExecProfile() : ExecProfile(nullptr) {} + ~ExecProfile() override; + explicit PROTOBUF_CONSTEXPR ExecProfile(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + ExecProfile(const ExecProfile& from); + ExecProfile(ExecProfile&& from) noexcept + : ExecProfile() { + *this = ::std::move(from); + } + + inline ExecProfile& operator=(const ExecProfile& from) { + CopyFrom(from); + return *this; + } + inline ExecProfile& operator=(ExecProfile&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const ExecProfile& default_instance() { + return *internal_default_instance(); + } + static inline const ExecProfile* internal_default_instance() { + return reinterpret_cast( + &_ExecProfile_default_instance_); + } + static constexpr int kIndexInFileMessages = + 18; + + friend void swap(ExecProfile& a, ExecProfile& b) { + a.Swap(&b); + } + inline void Swap(ExecProfile* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(ExecProfile* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + ExecProfile* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const ExecProfile& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const ExecProfile& from) { + ExecProfile::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(ExecProfile* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.tfprof.ExecProfile"; + } + protected: + explicit ExecProfile(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + + // accessors ------------------------------------------------------- + + enum : int { + kAcceleratorExecsFieldNumber = 4, + kCpuExecsFieldNumber = 5, + kDevicesFieldNumber = 6, + kMemoryExecsFieldNumber = 7, + kAllocationsFieldNumber = 11, + kRunCountFieldNumber = 1, + kAllStartMicrosFieldNumber = 2, + kLatestEndMicrosFieldNumber = 3, + }; + // map accelerator_execs = 4; + int accelerator_execs_size() const; + private: + int _internal_accelerator_execs_size() const; + public: + void clear_accelerator_execs(); + private: + const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::tfprof::ExecTime >& + _internal_accelerator_execs() const; + ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::tfprof::ExecTime >* + _internal_mutable_accelerator_execs(); + public: + const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::tfprof::ExecTime >& + accelerator_execs() const; + ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::tfprof::ExecTime >* + mutable_accelerator_execs(); + + // map cpu_execs = 5; + int cpu_execs_size() const; + private: + int _internal_cpu_execs_size() const; + public: + void clear_cpu_execs(); + private: + const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::tfprof::ExecTime >& + _internal_cpu_execs() const; + ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::tfprof::ExecTime >* + _internal_mutable_cpu_execs(); + public: + const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::tfprof::ExecTime >& + cpu_execs() const; + ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::tfprof::ExecTime >* + mutable_cpu_execs(); + + // repeated string devices = 6; + int devices_size() const; + private: + int _internal_devices_size() const; + public: + void clear_devices(); + const std::string& devices(int index) const; + std::string* mutable_devices(int index); + void set_devices(int index, const std::string& value); + void set_devices(int index, std::string&& value); + void set_devices(int index, const char* value); + void set_devices(int index, const char* value, size_t size); + std::string* add_devices(); + void add_devices(const std::string& value); + void add_devices(std::string&& value); + void add_devices(const char* value); + void add_devices(const char* value, size_t size); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& devices() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* mutable_devices(); + private: + const std::string& _internal_devices(int index) const; + std::string* _internal_add_devices(); + public: + + // repeated .tensorflow.tfprof.ExecMemory memory_execs = 7; + int memory_execs_size() const; + private: + int _internal_memory_execs_size() const; + public: + void clear_memory_execs(); + ::tensorflow::tfprof::ExecMemory* mutable_memory_execs(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::tfprof::ExecMemory >* + mutable_memory_execs(); + private: + const ::tensorflow::tfprof::ExecMemory& _internal_memory_execs(int index) const; + ::tensorflow::tfprof::ExecMemory* _internal_add_memory_execs(); + public: + const ::tensorflow::tfprof::ExecMemory& memory_execs(int index) const; + ::tensorflow::tfprof::ExecMemory* add_memory_execs(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::tfprof::ExecMemory >& + memory_execs() const; + + // repeated .tensorflow.AllocationRecord allocations = 11; + int allocations_size() const; + private: + int _internal_allocations_size() const; + public: + void clear_allocations(); + ::tensorflow::AllocationRecord* mutable_allocations(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::AllocationRecord >* + mutable_allocations(); + private: + const ::tensorflow::AllocationRecord& _internal_allocations(int index) const; + ::tensorflow::AllocationRecord* _internal_add_allocations(); + public: + const ::tensorflow::AllocationRecord& allocations(int index) const; + ::tensorflow::AllocationRecord* add_allocations(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::AllocationRecord >& + allocations() const; + + // int64 run_count = 1; + void clear_run_count(); + int64_t run_count() const; + void set_run_count(int64_t value); + private: + int64_t _internal_run_count() const; + void _internal_set_run_count(int64_t value); + public: + + // int64 all_start_micros = 2; + void clear_all_start_micros(); + int64_t all_start_micros() const; + void set_all_start_micros(int64_t value); + private: + int64_t _internal_all_start_micros() const; + void _internal_set_all_start_micros(int64_t value); + public: + + // int64 latest_end_micros = 3; + void clear_latest_end_micros(); + int64_t latest_end_micros() const; + void set_latest_end_micros(int64_t value); + private: + int64_t _internal_latest_end_micros() const; + void _internal_set_latest_end_micros(int64_t value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.tfprof.ExecProfile) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::MapField< + ExecProfile_AcceleratorExecsEntry_DoNotUse, + std::string, ::tensorflow::tfprof::ExecTime, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_MESSAGE> accelerator_execs_; + ::PROTOBUF_NAMESPACE_ID::internal::MapField< + ExecProfile_CpuExecsEntry_DoNotUse, + std::string, ::tensorflow::tfprof::ExecTime, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_MESSAGE> cpu_execs_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField devices_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::tfprof::ExecMemory > memory_execs_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::AllocationRecord > allocations_; + int64_t run_count_; + int64_t all_start_micros_; + int64_t latest_end_micros_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto; +}; +// ------------------------------------------------------------------- + +class ExecTime final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.tfprof.ExecTime) */ { + public: + inline ExecTime() : ExecTime(nullptr) {} + ~ExecTime() override; + explicit PROTOBUF_CONSTEXPR ExecTime(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + ExecTime(const ExecTime& from); + ExecTime(ExecTime&& from) noexcept + : ExecTime() { + *this = ::std::move(from); + } + + inline ExecTime& operator=(const ExecTime& from) { + CopyFrom(from); + return *this; + } + inline ExecTime& operator=(ExecTime&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const ExecTime& default_instance() { + return *internal_default_instance(); + } + static inline const ExecTime* internal_default_instance() { + return reinterpret_cast( + &_ExecTime_default_instance_); + } + static constexpr int kIndexInFileMessages = + 19; + + friend void swap(ExecTime& a, ExecTime& b) { + a.Swap(&b); + } + inline void Swap(ExecTime* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(ExecTime* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + ExecTime* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const ExecTime& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const ExecTime& from) { + ExecTime::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(ExecTime* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.tfprof.ExecTime"; + } + protected: + explicit ExecTime(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kTimesFieldNumber = 1, + }; + // repeated .tensorflow.tfprof.Tuple times = 1; + int times_size() const; + private: + int _internal_times_size() const; + public: + void clear_times(); + ::tensorflow::tfprof::Tuple* mutable_times(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::tfprof::Tuple >* + mutable_times(); + private: + const ::tensorflow::tfprof::Tuple& _internal_times(int index) const; + ::tensorflow::tfprof::Tuple* _internal_add_times(); + public: + const ::tensorflow::tfprof::Tuple& times(int index) const; + ::tensorflow::tfprof::Tuple* add_times(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::tfprof::Tuple >& + times() const; + + // @@protoc_insertion_point(class_scope:tensorflow.tfprof.ExecTime) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::tfprof::Tuple > times_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto; +}; +// ------------------------------------------------------------------- + +class ExecMemory_OutputMemoryEntry_DoNotUse : public ::PROTOBUF_NAMESPACE_ID::internal::MapEntry { +public: + typedef ::PROTOBUF_NAMESPACE_ID::internal::MapEntry SuperType; + ExecMemory_OutputMemoryEntry_DoNotUse(); + explicit PROTOBUF_CONSTEXPR ExecMemory_OutputMemoryEntry_DoNotUse( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + explicit ExecMemory_OutputMemoryEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena); + void MergeFrom(const ExecMemory_OutputMemoryEntry_DoNotUse& other); + static const ExecMemory_OutputMemoryEntry_DoNotUse* internal_default_instance() { return reinterpret_cast(&_ExecMemory_OutputMemoryEntry_DoNotUse_default_instance_); } + static bool ValidateKey(void*) { return true; } + static bool ValidateValue(void*) { return true; } + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + friend struct ::TableStruct_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto; +}; + +// ------------------------------------------------------------------- + +class ExecMemory final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.tfprof.ExecMemory) */ { + public: + inline ExecMemory() : ExecMemory(nullptr) {} + ~ExecMemory() override; + explicit PROTOBUF_CONSTEXPR ExecMemory(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + ExecMemory(const ExecMemory& from); + ExecMemory(ExecMemory&& from) noexcept + : ExecMemory() { + *this = ::std::move(from); + } + + inline ExecMemory& operator=(const ExecMemory& from) { + CopyFrom(from); + return *this; + } + inline ExecMemory& operator=(ExecMemory&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const ExecMemory& default_instance() { + return *internal_default_instance(); + } + static inline const ExecMemory* internal_default_instance() { + return reinterpret_cast( + &_ExecMemory_default_instance_); + } + static constexpr int kIndexInFileMessages = + 21; + + friend void swap(ExecMemory& a, ExecMemory& b) { + a.Swap(&b); + } + inline void Swap(ExecMemory* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(ExecMemory* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + ExecMemory* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const ExecMemory& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const ExecMemory& from) { + ExecMemory::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(ExecMemory* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.tfprof.ExecMemory"; + } + protected: + explicit ExecMemory(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + + // accessors ------------------------------------------------------- + + enum : int { + kOutputMemoryFieldNumber = 11, + kMemoryMicrosFieldNumber = 1, + kHostTempBytesFieldNumber = 2, + kHostPersistentBytesFieldNumber = 3, + kAcceleratorTempBytesFieldNumber = 4, + kAcceleratorPersistentBytesFieldNumber = 5, + kRequestedBytesFieldNumber = 6, + kPeakBytesFieldNumber = 7, + kResidualBytesFieldNumber = 8, + kOutputBytesFieldNumber = 9, + kAllocatorBytesInUseFieldNumber = 10, + }; + // map output_memory = 11; + int output_memory_size() const; + private: + int _internal_output_memory_size() const; + public: + void clear_output_memory(); + private: + const ::PROTOBUF_NAMESPACE_ID::Map< int32_t, ::tensorflow::tfprof::Memory >& + _internal_output_memory() const; + ::PROTOBUF_NAMESPACE_ID::Map< int32_t, ::tensorflow::tfprof::Memory >* + _internal_mutable_output_memory(); + public: + const ::PROTOBUF_NAMESPACE_ID::Map< int32_t, ::tensorflow::tfprof::Memory >& + output_memory() const; + ::PROTOBUF_NAMESPACE_ID::Map< int32_t, ::tensorflow::tfprof::Memory >* + mutable_output_memory(); + + // int64 memory_micros = 1; + void clear_memory_micros(); + int64_t memory_micros() const; + void set_memory_micros(int64_t value); + private: + int64_t _internal_memory_micros() const; + void _internal_set_memory_micros(int64_t value); + public: + + // int64 host_temp_bytes = 2; + void clear_host_temp_bytes(); + int64_t host_temp_bytes() const; + void set_host_temp_bytes(int64_t value); + private: + int64_t _internal_host_temp_bytes() const; + void _internal_set_host_temp_bytes(int64_t value); + public: + + // int64 host_persistent_bytes = 3; + void clear_host_persistent_bytes(); + int64_t host_persistent_bytes() const; + void set_host_persistent_bytes(int64_t value); + private: + int64_t _internal_host_persistent_bytes() const; + void _internal_set_host_persistent_bytes(int64_t value); + public: + + // int64 accelerator_temp_bytes = 4; + void clear_accelerator_temp_bytes(); + int64_t accelerator_temp_bytes() const; + void set_accelerator_temp_bytes(int64_t value); + private: + int64_t _internal_accelerator_temp_bytes() const; + void _internal_set_accelerator_temp_bytes(int64_t value); + public: + + // int64 accelerator_persistent_bytes = 5; + void clear_accelerator_persistent_bytes(); + int64_t accelerator_persistent_bytes() const; + void set_accelerator_persistent_bytes(int64_t value); + private: + int64_t _internal_accelerator_persistent_bytes() const; + void _internal_set_accelerator_persistent_bytes(int64_t value); + public: + + // int64 requested_bytes = 6; + void clear_requested_bytes(); + int64_t requested_bytes() const; + void set_requested_bytes(int64_t value); + private: + int64_t _internal_requested_bytes() const; + void _internal_set_requested_bytes(int64_t value); + public: + + // int64 peak_bytes = 7; + void clear_peak_bytes(); + int64_t peak_bytes() const; + void set_peak_bytes(int64_t value); + private: + int64_t _internal_peak_bytes() const; + void _internal_set_peak_bytes(int64_t value); + public: + + // int64 residual_bytes = 8; + void clear_residual_bytes(); + int64_t residual_bytes() const; + void set_residual_bytes(int64_t value); + private: + int64_t _internal_residual_bytes() const; + void _internal_set_residual_bytes(int64_t value); + public: + + // int64 output_bytes = 9; + void clear_output_bytes(); + int64_t output_bytes() const; + void set_output_bytes(int64_t value); + private: + int64_t _internal_output_bytes() const; + void _internal_set_output_bytes(int64_t value); + public: + + // int64 allocator_bytes_in_use = 10; + void clear_allocator_bytes_in_use(); + int64_t allocator_bytes_in_use() const; + void set_allocator_bytes_in_use(int64_t value); + private: + int64_t _internal_allocator_bytes_in_use() const; + void _internal_set_allocator_bytes_in_use(int64_t value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.tfprof.ExecMemory) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::MapField< + ExecMemory_OutputMemoryEntry_DoNotUse, + int32_t, ::tensorflow::tfprof::Memory, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT32, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_MESSAGE> output_memory_; + int64_t memory_micros_; + int64_t host_temp_bytes_; + int64_t host_persistent_bytes_; + int64_t accelerator_temp_bytes_; + int64_t accelerator_persistent_bytes_; + int64_t requested_bytes_; + int64_t peak_bytes_; + int64_t residual_bytes_; + int64_t output_bytes_; + int64_t allocator_bytes_in_use_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto; +}; +// ------------------------------------------------------------------- + +class Tuple final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.tfprof.Tuple) */ { + public: + inline Tuple() : Tuple(nullptr) {} + ~Tuple() override; + explicit PROTOBUF_CONSTEXPR Tuple(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + Tuple(const Tuple& from); + Tuple(Tuple&& from) noexcept + : Tuple() { + *this = ::std::move(from); + } + + inline Tuple& operator=(const Tuple& from) { + CopyFrom(from); + return *this; + } + inline Tuple& operator=(Tuple&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const Tuple& default_instance() { + return *internal_default_instance(); + } + static inline const Tuple* internal_default_instance() { + return reinterpret_cast( + &_Tuple_default_instance_); + } + static constexpr int kIndexInFileMessages = + 22; + + friend void swap(Tuple& a, Tuple& b) { + a.Swap(&b); + } + inline void Swap(Tuple* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(Tuple* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + Tuple* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const Tuple& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const Tuple& from) { + Tuple::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(Tuple* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.tfprof.Tuple"; + } + protected: + explicit Tuple(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kInt64ValuesFieldNumber = 1, + }; + // repeated int64 int64_values = 1; + int int64_values_size() const; + private: + int _internal_int64_values_size() const; + public: + void clear_int64_values(); + private: + int64_t _internal_int64_values(int index) const; + const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >& + _internal_int64_values() const; + void _internal_add_int64_values(int64_t value); + ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >* + _internal_mutable_int64_values(); + public: + int64_t int64_values(int index) const; + void set_int64_values(int index, int64_t value); + void add_int64_values(int64_t value); + const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >& + int64_values() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >* + mutable_int64_values(); + + // @@protoc_insertion_point(class_scope:tensorflow.tfprof.Tuple) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t > int64_values_; + mutable std::atomic _int64_values_cached_byte_size_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto; +}; +// ------------------------------------------------------------------- + +class Memory final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.tfprof.Memory) */ { + public: + inline Memory() : Memory(nullptr) {} + ~Memory() override; + explicit PROTOBUF_CONSTEXPR Memory(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + Memory(const Memory& from); + Memory(Memory&& from) noexcept + : Memory() { + *this = ::std::move(from); + } + + inline Memory& operator=(const Memory& from) { + CopyFrom(from); + return *this; + } + inline Memory& operator=(Memory&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const Memory& default_instance() { + return *internal_default_instance(); + } + static inline const Memory* internal_default_instance() { + return reinterpret_cast( + &_Memory_default_instance_); + } + static constexpr int kIndexInFileMessages = + 23; + + friend void swap(Memory& a, Memory& b) { + a.Swap(&b); + } + inline void Swap(Memory* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(Memory* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + Memory* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const Memory& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const Memory& from) { + Memory::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(Memory* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.tfprof.Memory"; + } + protected: + explicit Memory(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kBytesFieldNumber = 1, + kPtrFieldNumber = 2, + }; + // int64 bytes = 1; + void clear_bytes(); + int64_t bytes() const; + void set_bytes(int64_t value); + private: + int64_t _internal_bytes() const; + void _internal_set_bytes(int64_t value); + public: + + // uint64 ptr = 2; + void clear_ptr(); + uint64_t ptr() const; + void set_ptr(uint64_t value); + private: + uint64_t _internal_ptr() const; + void _internal_set_ptr(uint64_t value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.tfprof.Memory) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + int64_t bytes_; + uint64_t ptr_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto; +}; +// =================================================================== + + +// =================================================================== + +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// CodeDef_Trace + +// string file = 1 [deprecated = true]; +inline void CodeDef_Trace::clear_file() { + _impl_.file_.ClearToEmpty(); +} +inline const std::string& CodeDef_Trace::file() const { + // @@protoc_insertion_point(field_get:tensorflow.tfprof.CodeDef.Trace.file) + return _internal_file(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void CodeDef_Trace::set_file(ArgT0&& arg0, ArgT... args) { + + _impl_.file_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.tfprof.CodeDef.Trace.file) +} +inline std::string* CodeDef_Trace::mutable_file() { + std::string* _s = _internal_mutable_file(); + // @@protoc_insertion_point(field_mutable:tensorflow.tfprof.CodeDef.Trace.file) + return _s; +} +inline const std::string& CodeDef_Trace::_internal_file() const { + return _impl_.file_.Get(); +} +inline void CodeDef_Trace::_internal_set_file(const std::string& value) { + + _impl_.file_.Set(value, GetArenaForAllocation()); +} +inline std::string* CodeDef_Trace::_internal_mutable_file() { + + return _impl_.file_.Mutable(GetArenaForAllocation()); +} +inline std::string* CodeDef_Trace::release_file() { + // @@protoc_insertion_point(field_release:tensorflow.tfprof.CodeDef.Trace.file) + return _impl_.file_.Release(); +} +inline void CodeDef_Trace::set_allocated_file(std::string* file) { + if (file != nullptr) { + + } else { + + } + _impl_.file_.SetAllocated(file, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.file_.IsDefault()) { + _impl_.file_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.tfprof.CodeDef.Trace.file) +} + +// int64 file_id = 6; +inline void CodeDef_Trace::clear_file_id() { + _impl_.file_id_ = int64_t{0}; +} +inline int64_t CodeDef_Trace::_internal_file_id() const { + return _impl_.file_id_; +} +inline int64_t CodeDef_Trace::file_id() const { + // @@protoc_insertion_point(field_get:tensorflow.tfprof.CodeDef.Trace.file_id) + return _internal_file_id(); +} +inline void CodeDef_Trace::_internal_set_file_id(int64_t value) { + + _impl_.file_id_ = value; +} +inline void CodeDef_Trace::set_file_id(int64_t value) { + _internal_set_file_id(value); + // @@protoc_insertion_point(field_set:tensorflow.tfprof.CodeDef.Trace.file_id) +} + +// int32 lineno = 2; +inline void CodeDef_Trace::clear_lineno() { + _impl_.lineno_ = 0; +} +inline int32_t CodeDef_Trace::_internal_lineno() const { + return _impl_.lineno_; +} +inline int32_t CodeDef_Trace::lineno() const { + // @@protoc_insertion_point(field_get:tensorflow.tfprof.CodeDef.Trace.lineno) + return _internal_lineno(); +} +inline void CodeDef_Trace::_internal_set_lineno(int32_t value) { + + _impl_.lineno_ = value; +} +inline void CodeDef_Trace::set_lineno(int32_t value) { + _internal_set_lineno(value); + // @@protoc_insertion_point(field_set:tensorflow.tfprof.CodeDef.Trace.lineno) +} + +// string function = 3 [deprecated = true]; +inline void CodeDef_Trace::clear_function() { + _impl_.function_.ClearToEmpty(); +} +inline const std::string& CodeDef_Trace::function() const { + // @@protoc_insertion_point(field_get:tensorflow.tfprof.CodeDef.Trace.function) + return _internal_function(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void CodeDef_Trace::set_function(ArgT0&& arg0, ArgT... args) { + + _impl_.function_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.tfprof.CodeDef.Trace.function) +} +inline std::string* CodeDef_Trace::mutable_function() { + std::string* _s = _internal_mutable_function(); + // @@protoc_insertion_point(field_mutable:tensorflow.tfprof.CodeDef.Trace.function) + return _s; +} +inline const std::string& CodeDef_Trace::_internal_function() const { + return _impl_.function_.Get(); +} +inline void CodeDef_Trace::_internal_set_function(const std::string& value) { + + _impl_.function_.Set(value, GetArenaForAllocation()); +} +inline std::string* CodeDef_Trace::_internal_mutable_function() { + + return _impl_.function_.Mutable(GetArenaForAllocation()); +} +inline std::string* CodeDef_Trace::release_function() { + // @@protoc_insertion_point(field_release:tensorflow.tfprof.CodeDef.Trace.function) + return _impl_.function_.Release(); +} +inline void CodeDef_Trace::set_allocated_function(std::string* function) { + if (function != nullptr) { + + } else { + + } + _impl_.function_.SetAllocated(function, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.function_.IsDefault()) { + _impl_.function_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.tfprof.CodeDef.Trace.function) +} + +// int64 function_id = 7; +inline void CodeDef_Trace::clear_function_id() { + _impl_.function_id_ = int64_t{0}; +} +inline int64_t CodeDef_Trace::_internal_function_id() const { + return _impl_.function_id_; +} +inline int64_t CodeDef_Trace::function_id() const { + // @@protoc_insertion_point(field_get:tensorflow.tfprof.CodeDef.Trace.function_id) + return _internal_function_id(); +} +inline void CodeDef_Trace::_internal_set_function_id(int64_t value) { + + _impl_.function_id_ = value; +} +inline void CodeDef_Trace::set_function_id(int64_t value) { + _internal_set_function_id(value); + // @@protoc_insertion_point(field_set:tensorflow.tfprof.CodeDef.Trace.function_id) +} + +// string line = 4 [deprecated = true]; +inline void CodeDef_Trace::clear_line() { + _impl_.line_.ClearToEmpty(); +} +inline const std::string& CodeDef_Trace::line() const { + // @@protoc_insertion_point(field_get:tensorflow.tfprof.CodeDef.Trace.line) + return _internal_line(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void CodeDef_Trace::set_line(ArgT0&& arg0, ArgT... args) { + + _impl_.line_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.tfprof.CodeDef.Trace.line) +} +inline std::string* CodeDef_Trace::mutable_line() { + std::string* _s = _internal_mutable_line(); + // @@protoc_insertion_point(field_mutable:tensorflow.tfprof.CodeDef.Trace.line) + return _s; +} +inline const std::string& CodeDef_Trace::_internal_line() const { + return _impl_.line_.Get(); +} +inline void CodeDef_Trace::_internal_set_line(const std::string& value) { + + _impl_.line_.Set(value, GetArenaForAllocation()); +} +inline std::string* CodeDef_Trace::_internal_mutable_line() { + + return _impl_.line_.Mutable(GetArenaForAllocation()); +} +inline std::string* CodeDef_Trace::release_line() { + // @@protoc_insertion_point(field_release:tensorflow.tfprof.CodeDef.Trace.line) + return _impl_.line_.Release(); +} +inline void CodeDef_Trace::set_allocated_line(std::string* line) { + if (line != nullptr) { + + } else { + + } + _impl_.line_.SetAllocated(line, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.line_.IsDefault()) { + _impl_.line_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.tfprof.CodeDef.Trace.line) +} + +// int64 line_id = 8; +inline void CodeDef_Trace::clear_line_id() { + _impl_.line_id_ = int64_t{0}; +} +inline int64_t CodeDef_Trace::_internal_line_id() const { + return _impl_.line_id_; +} +inline int64_t CodeDef_Trace::line_id() const { + // @@protoc_insertion_point(field_get:tensorflow.tfprof.CodeDef.Trace.line_id) + return _internal_line_id(); +} +inline void CodeDef_Trace::_internal_set_line_id(int64_t value) { + + _impl_.line_id_ = value; +} +inline void CodeDef_Trace::set_line_id(int64_t value) { + _internal_set_line_id(value); + // @@protoc_insertion_point(field_set:tensorflow.tfprof.CodeDef.Trace.line_id) +} + +// int32 func_start_line = 5; +inline void CodeDef_Trace::clear_func_start_line() { + _impl_.func_start_line_ = 0; +} +inline int32_t CodeDef_Trace::_internal_func_start_line() const { + return _impl_.func_start_line_; +} +inline int32_t CodeDef_Trace::func_start_line() const { + // @@protoc_insertion_point(field_get:tensorflow.tfprof.CodeDef.Trace.func_start_line) + return _internal_func_start_line(); +} +inline void CodeDef_Trace::_internal_set_func_start_line(int32_t value) { + + _impl_.func_start_line_ = value; +} +inline void CodeDef_Trace::set_func_start_line(int32_t value) { + _internal_set_func_start_line(value); + // @@protoc_insertion_point(field_set:tensorflow.tfprof.CodeDef.Trace.func_start_line) +} + +// ------------------------------------------------------------------- + +// CodeDef + +// repeated .tensorflow.tfprof.CodeDef.Trace traces = 1; +inline int CodeDef::_internal_traces_size() const { + return _impl_.traces_.size(); +} +inline int CodeDef::traces_size() const { + return _internal_traces_size(); +} +inline void CodeDef::clear_traces() { + _impl_.traces_.Clear(); +} +inline ::tensorflow::tfprof::CodeDef_Trace* CodeDef::mutable_traces(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.tfprof.CodeDef.traces) + return _impl_.traces_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::tfprof::CodeDef_Trace >* +CodeDef::mutable_traces() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.tfprof.CodeDef.traces) + return &_impl_.traces_; +} +inline const ::tensorflow::tfprof::CodeDef_Trace& CodeDef::_internal_traces(int index) const { + return _impl_.traces_.Get(index); +} +inline const ::tensorflow::tfprof::CodeDef_Trace& CodeDef::traces(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.tfprof.CodeDef.traces) + return _internal_traces(index); +} +inline ::tensorflow::tfprof::CodeDef_Trace* CodeDef::_internal_add_traces() { + return _impl_.traces_.Add(); +} +inline ::tensorflow::tfprof::CodeDef_Trace* CodeDef::add_traces() { + ::tensorflow::tfprof::CodeDef_Trace* _add = _internal_add_traces(); + // @@protoc_insertion_point(field_add:tensorflow.tfprof.CodeDef.traces) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::tfprof::CodeDef_Trace >& +CodeDef::traces() const { + // @@protoc_insertion_point(field_list:tensorflow.tfprof.CodeDef.traces) + return _impl_.traces_; +} + +// ------------------------------------------------------------------- + +// OpLogEntry + +// string name = 1; +inline void OpLogEntry::clear_name() { + _impl_.name_.ClearToEmpty(); +} +inline const std::string& OpLogEntry::name() const { + // @@protoc_insertion_point(field_get:tensorflow.tfprof.OpLogEntry.name) + return _internal_name(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void OpLogEntry::set_name(ArgT0&& arg0, ArgT... args) { + + _impl_.name_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.tfprof.OpLogEntry.name) +} +inline std::string* OpLogEntry::mutable_name() { + std::string* _s = _internal_mutable_name(); + // @@protoc_insertion_point(field_mutable:tensorflow.tfprof.OpLogEntry.name) + return _s; +} +inline const std::string& OpLogEntry::_internal_name() const { + return _impl_.name_.Get(); +} +inline void OpLogEntry::_internal_set_name(const std::string& value) { + + _impl_.name_.Set(value, GetArenaForAllocation()); +} +inline std::string* OpLogEntry::_internal_mutable_name() { + + return _impl_.name_.Mutable(GetArenaForAllocation()); +} +inline std::string* OpLogEntry::release_name() { + // @@protoc_insertion_point(field_release:tensorflow.tfprof.OpLogEntry.name) + return _impl_.name_.Release(); +} +inline void OpLogEntry::set_allocated_name(std::string* name) { + if (name != nullptr) { + + } else { + + } + _impl_.name_.SetAllocated(name, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.name_.IsDefault()) { + _impl_.name_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.tfprof.OpLogEntry.name) +} + +// int64 float_ops = 2; +inline void OpLogEntry::clear_float_ops() { + _impl_.float_ops_ = int64_t{0}; +} +inline int64_t OpLogEntry::_internal_float_ops() const { + return _impl_.float_ops_; +} +inline int64_t OpLogEntry::float_ops() const { + // @@protoc_insertion_point(field_get:tensorflow.tfprof.OpLogEntry.float_ops) + return _internal_float_ops(); +} +inline void OpLogEntry::_internal_set_float_ops(int64_t value) { + + _impl_.float_ops_ = value; +} +inline void OpLogEntry::set_float_ops(int64_t value) { + _internal_set_float_ops(value); + // @@protoc_insertion_point(field_set:tensorflow.tfprof.OpLogEntry.float_ops) +} + +// repeated string types = 3; +inline int OpLogEntry::_internal_types_size() const { + return _impl_.types_.size(); +} +inline int OpLogEntry::types_size() const { + return _internal_types_size(); +} +inline void OpLogEntry::clear_types() { + _impl_.types_.Clear(); +} +inline std::string* OpLogEntry::add_types() { + std::string* _s = _internal_add_types(); + // @@protoc_insertion_point(field_add_mutable:tensorflow.tfprof.OpLogEntry.types) + return _s; +} +inline const std::string& OpLogEntry::_internal_types(int index) const { + return _impl_.types_.Get(index); +} +inline const std::string& OpLogEntry::types(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.tfprof.OpLogEntry.types) + return _internal_types(index); +} +inline std::string* OpLogEntry::mutable_types(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.tfprof.OpLogEntry.types) + return _impl_.types_.Mutable(index); +} +inline void OpLogEntry::set_types(int index, const std::string& value) { + _impl_.types_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set:tensorflow.tfprof.OpLogEntry.types) +} +inline void OpLogEntry::set_types(int index, std::string&& value) { + _impl_.types_.Mutable(index)->assign(std::move(value)); + // @@protoc_insertion_point(field_set:tensorflow.tfprof.OpLogEntry.types) +} +inline void OpLogEntry::set_types(int index, const char* value) { + GOOGLE_DCHECK(value != nullptr); + _impl_.types_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set_char:tensorflow.tfprof.OpLogEntry.types) +} +inline void OpLogEntry::set_types(int index, const char* value, size_t size) { + _impl_.types_.Mutable(index)->assign( + reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:tensorflow.tfprof.OpLogEntry.types) +} +inline std::string* OpLogEntry::_internal_add_types() { + return _impl_.types_.Add(); +} +inline void OpLogEntry::add_types(const std::string& value) { + _impl_.types_.Add()->assign(value); + // @@protoc_insertion_point(field_add:tensorflow.tfprof.OpLogEntry.types) +} +inline void OpLogEntry::add_types(std::string&& value) { + _impl_.types_.Add(std::move(value)); + // @@protoc_insertion_point(field_add:tensorflow.tfprof.OpLogEntry.types) +} +inline void OpLogEntry::add_types(const char* value) { + GOOGLE_DCHECK(value != nullptr); + _impl_.types_.Add()->assign(value); + // @@protoc_insertion_point(field_add_char:tensorflow.tfprof.OpLogEntry.types) +} +inline void OpLogEntry::add_types(const char* value, size_t size) { + _impl_.types_.Add()->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_add_pointer:tensorflow.tfprof.OpLogEntry.types) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& +OpLogEntry::types() const { + // @@protoc_insertion_point(field_list:tensorflow.tfprof.OpLogEntry.types) + return _impl_.types_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* +OpLogEntry::mutable_types() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.tfprof.OpLogEntry.types) + return &_impl_.types_; +} + +// .tensorflow.tfprof.CodeDef code_def = 4; +inline bool OpLogEntry::_internal_has_code_def() const { + return this != internal_default_instance() && _impl_.code_def_ != nullptr; +} +inline bool OpLogEntry::has_code_def() const { + return _internal_has_code_def(); +} +inline void OpLogEntry::clear_code_def() { + if (GetArenaForAllocation() == nullptr && _impl_.code_def_ != nullptr) { + delete _impl_.code_def_; + } + _impl_.code_def_ = nullptr; +} +inline const ::tensorflow::tfprof::CodeDef& OpLogEntry::_internal_code_def() const { + const ::tensorflow::tfprof::CodeDef* p = _impl_.code_def_; + return p != nullptr ? *p : reinterpret_cast( + ::tensorflow::tfprof::_CodeDef_default_instance_); +} +inline const ::tensorflow::tfprof::CodeDef& OpLogEntry::code_def() const { + // @@protoc_insertion_point(field_get:tensorflow.tfprof.OpLogEntry.code_def) + return _internal_code_def(); +} +inline void OpLogEntry::unsafe_arena_set_allocated_code_def( + ::tensorflow::tfprof::CodeDef* code_def) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.code_def_); + } + _impl_.code_def_ = code_def; + if (code_def) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.tfprof.OpLogEntry.code_def) +} +inline ::tensorflow::tfprof::CodeDef* OpLogEntry::release_code_def() { + + ::tensorflow::tfprof::CodeDef* temp = _impl_.code_def_; + _impl_.code_def_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tensorflow::tfprof::CodeDef* OpLogEntry::unsafe_arena_release_code_def() { + // @@protoc_insertion_point(field_release:tensorflow.tfprof.OpLogEntry.code_def) + + ::tensorflow::tfprof::CodeDef* temp = _impl_.code_def_; + _impl_.code_def_ = nullptr; + return temp; +} +inline ::tensorflow::tfprof::CodeDef* OpLogEntry::_internal_mutable_code_def() { + + if (_impl_.code_def_ == nullptr) { + auto* p = CreateMaybeMessage<::tensorflow::tfprof::CodeDef>(GetArenaForAllocation()); + _impl_.code_def_ = p; + } + return _impl_.code_def_; +} +inline ::tensorflow::tfprof::CodeDef* OpLogEntry::mutable_code_def() { + ::tensorflow::tfprof::CodeDef* _msg = _internal_mutable_code_def(); + // @@protoc_insertion_point(field_mutable:tensorflow.tfprof.OpLogEntry.code_def) + return _msg; +} +inline void OpLogEntry::set_allocated_code_def(::tensorflow::tfprof::CodeDef* code_def) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete _impl_.code_def_; + } + if (code_def) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(code_def); + if (message_arena != submessage_arena) { + code_def = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, code_def, submessage_arena); + } + + } else { + + } + _impl_.code_def_ = code_def; + // @@protoc_insertion_point(field_set_allocated:tensorflow.tfprof.OpLogEntry.code_def) +} + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// OpLogProto + +// repeated .tensorflow.tfprof.OpLogEntry log_entries = 1; +inline int OpLogProto::_internal_log_entries_size() const { + return _impl_.log_entries_.size(); +} +inline int OpLogProto::log_entries_size() const { + return _internal_log_entries_size(); +} +inline void OpLogProto::clear_log_entries() { + _impl_.log_entries_.Clear(); +} +inline ::tensorflow::tfprof::OpLogEntry* OpLogProto::mutable_log_entries(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.tfprof.OpLogProto.log_entries) + return _impl_.log_entries_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::tfprof::OpLogEntry >* +OpLogProto::mutable_log_entries() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.tfprof.OpLogProto.log_entries) + return &_impl_.log_entries_; +} +inline const ::tensorflow::tfprof::OpLogEntry& OpLogProto::_internal_log_entries(int index) const { + return _impl_.log_entries_.Get(index); +} +inline const ::tensorflow::tfprof::OpLogEntry& OpLogProto::log_entries(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.tfprof.OpLogProto.log_entries) + return _internal_log_entries(index); +} +inline ::tensorflow::tfprof::OpLogEntry* OpLogProto::_internal_add_log_entries() { + return _impl_.log_entries_.Add(); +} +inline ::tensorflow::tfprof::OpLogEntry* OpLogProto::add_log_entries() { + ::tensorflow::tfprof::OpLogEntry* _add = _internal_add_log_entries(); + // @@protoc_insertion_point(field_add:tensorflow.tfprof.OpLogProto.log_entries) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::tfprof::OpLogEntry >& +OpLogProto::log_entries() const { + // @@protoc_insertion_point(field_list:tensorflow.tfprof.OpLogProto.log_entries) + return _impl_.log_entries_; +} + +// map id_to_string = 2; +inline int OpLogProto::_internal_id_to_string_size() const { + return _impl_.id_to_string_.size(); +} +inline int OpLogProto::id_to_string_size() const { + return _internal_id_to_string_size(); +} +inline void OpLogProto::clear_id_to_string() { + _impl_.id_to_string_.Clear(); +} +inline const ::PROTOBUF_NAMESPACE_ID::Map< int64_t, std::string >& +OpLogProto::_internal_id_to_string() const { + return _impl_.id_to_string_.GetMap(); +} +inline const ::PROTOBUF_NAMESPACE_ID::Map< int64_t, std::string >& +OpLogProto::id_to_string() const { + // @@protoc_insertion_point(field_map:tensorflow.tfprof.OpLogProto.id_to_string) + return _internal_id_to_string(); +} +inline ::PROTOBUF_NAMESPACE_ID::Map< int64_t, std::string >* +OpLogProto::_internal_mutable_id_to_string() { + return _impl_.id_to_string_.MutableMap(); +} +inline ::PROTOBUF_NAMESPACE_ID::Map< int64_t, std::string >* +OpLogProto::mutable_id_to_string() { + // @@protoc_insertion_point(field_mutable_map:tensorflow.tfprof.OpLogProto.id_to_string) + return _internal_mutable_id_to_string(); +} + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ProfileProto + +// map nodes = 1; +inline int ProfileProto::_internal_nodes_size() const { + return _impl_.nodes_.size(); +} +inline int ProfileProto::nodes_size() const { + return _internal_nodes_size(); +} +inline void ProfileProto::clear_nodes() { + _impl_.nodes_.Clear(); +} +inline const ::PROTOBUF_NAMESPACE_ID::Map< int64_t, ::tensorflow::tfprof::ProfileNode >& +ProfileProto::_internal_nodes() const { + return _impl_.nodes_.GetMap(); +} +inline const ::PROTOBUF_NAMESPACE_ID::Map< int64_t, ::tensorflow::tfprof::ProfileNode >& +ProfileProto::nodes() const { + // @@protoc_insertion_point(field_map:tensorflow.tfprof.ProfileProto.nodes) + return _internal_nodes(); +} +inline ::PROTOBUF_NAMESPACE_ID::Map< int64_t, ::tensorflow::tfprof::ProfileNode >* +ProfileProto::_internal_mutable_nodes() { + return _impl_.nodes_.MutableMap(); +} +inline ::PROTOBUF_NAMESPACE_ID::Map< int64_t, ::tensorflow::tfprof::ProfileNode >* +ProfileProto::mutable_nodes() { + // @@protoc_insertion_point(field_mutable_map:tensorflow.tfprof.ProfileProto.nodes) + return _internal_mutable_nodes(); +} + +// bool has_trace = 2; +inline void ProfileProto::clear_has_trace() { + _impl_.has_trace_ = false; +} +inline bool ProfileProto::_internal_has_trace() const { + return _impl_.has_trace_; +} +inline bool ProfileProto::has_trace() const { + // @@protoc_insertion_point(field_get:tensorflow.tfprof.ProfileProto.has_trace) + return _internal_has_trace(); +} +inline void ProfileProto::_internal_set_has_trace(bool value) { + + _impl_.has_trace_ = value; +} +inline void ProfileProto::set_has_trace(bool value) { + _internal_set_has_trace(value); + // @@protoc_insertion_point(field_set:tensorflow.tfprof.ProfileProto.has_trace) +} + +// bool miss_accelerator_stream = 5; +inline void ProfileProto::clear_miss_accelerator_stream() { + _impl_.miss_accelerator_stream_ = false; +} +inline bool ProfileProto::_internal_miss_accelerator_stream() const { + return _impl_.miss_accelerator_stream_; +} +inline bool ProfileProto::miss_accelerator_stream() const { + // @@protoc_insertion_point(field_get:tensorflow.tfprof.ProfileProto.miss_accelerator_stream) + return _internal_miss_accelerator_stream(); +} +inline void ProfileProto::_internal_set_miss_accelerator_stream(bool value) { + + _impl_.miss_accelerator_stream_ = value; +} +inline void ProfileProto::set_miss_accelerator_stream(bool value) { + _internal_set_miss_accelerator_stream(value); + // @@protoc_insertion_point(field_set:tensorflow.tfprof.ProfileProto.miss_accelerator_stream) +} + +// repeated int64 steps = 3; +inline int ProfileProto::_internal_steps_size() const { + return _impl_.steps_.size(); +} +inline int ProfileProto::steps_size() const { + return _internal_steps_size(); +} +inline void ProfileProto::clear_steps() { + _impl_.steps_.Clear(); +} +inline int64_t ProfileProto::_internal_steps(int index) const { + return _impl_.steps_.Get(index); +} +inline int64_t ProfileProto::steps(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.tfprof.ProfileProto.steps) + return _internal_steps(index); +} +inline void ProfileProto::set_steps(int index, int64_t value) { + _impl_.steps_.Set(index, value); + // @@protoc_insertion_point(field_set:tensorflow.tfprof.ProfileProto.steps) +} +inline void ProfileProto::_internal_add_steps(int64_t value) { + _impl_.steps_.Add(value); +} +inline void ProfileProto::add_steps(int64_t value) { + _internal_add_steps(value); + // @@protoc_insertion_point(field_add:tensorflow.tfprof.ProfileProto.steps) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >& +ProfileProto::_internal_steps() const { + return _impl_.steps_; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >& +ProfileProto::steps() const { + // @@protoc_insertion_point(field_list:tensorflow.tfprof.ProfileProto.steps) + return _internal_steps(); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >* +ProfileProto::_internal_mutable_steps() { + return &_impl_.steps_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >* +ProfileProto::mutable_steps() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.tfprof.ProfileProto.steps) + return _internal_mutable_steps(); +} + +// map id_to_string = 4; +inline int ProfileProto::_internal_id_to_string_size() const { + return _impl_.id_to_string_.size(); +} +inline int ProfileProto::id_to_string_size() const { + return _internal_id_to_string_size(); +} +inline void ProfileProto::clear_id_to_string() { + _impl_.id_to_string_.Clear(); +} +inline const ::PROTOBUF_NAMESPACE_ID::Map< int64_t, std::string >& +ProfileProto::_internal_id_to_string() const { + return _impl_.id_to_string_.GetMap(); +} +inline const ::PROTOBUF_NAMESPACE_ID::Map< int64_t, std::string >& +ProfileProto::id_to_string() const { + // @@protoc_insertion_point(field_map:tensorflow.tfprof.ProfileProto.id_to_string) + return _internal_id_to_string(); +} +inline ::PROTOBUF_NAMESPACE_ID::Map< int64_t, std::string >* +ProfileProto::_internal_mutable_id_to_string() { + return _impl_.id_to_string_.MutableMap(); +} +inline ::PROTOBUF_NAMESPACE_ID::Map< int64_t, std::string >* +ProfileProto::mutable_id_to_string() { + // @@protoc_insertion_point(field_mutable_map:tensorflow.tfprof.ProfileProto.id_to_string) + return _internal_mutable_id_to_string(); +} + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ProfileNode + +// string name = 1; +inline void ProfileNode::clear_name() { + _impl_.name_.ClearToEmpty(); +} +inline const std::string& ProfileNode::name() const { + // @@protoc_insertion_point(field_get:tensorflow.tfprof.ProfileNode.name) + return _internal_name(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void ProfileNode::set_name(ArgT0&& arg0, ArgT... args) { + + _impl_.name_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.tfprof.ProfileNode.name) +} +inline std::string* ProfileNode::mutable_name() { + std::string* _s = _internal_mutable_name(); + // @@protoc_insertion_point(field_mutable:tensorflow.tfprof.ProfileNode.name) + return _s; +} +inline const std::string& ProfileNode::_internal_name() const { + return _impl_.name_.Get(); +} +inline void ProfileNode::_internal_set_name(const std::string& value) { + + _impl_.name_.Set(value, GetArenaForAllocation()); +} +inline std::string* ProfileNode::_internal_mutable_name() { + + return _impl_.name_.Mutable(GetArenaForAllocation()); +} +inline std::string* ProfileNode::release_name() { + // @@protoc_insertion_point(field_release:tensorflow.tfprof.ProfileNode.name) + return _impl_.name_.Release(); +} +inline void ProfileNode::set_allocated_name(std::string* name) { + if (name != nullptr) { + + } else { + + } + _impl_.name_.SetAllocated(name, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.name_.IsDefault()) { + _impl_.name_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.tfprof.ProfileNode.name) +} + +// string op = 9; +inline void ProfileNode::clear_op() { + _impl_.op_.ClearToEmpty(); +} +inline const std::string& ProfileNode::op() const { + // @@protoc_insertion_point(field_get:tensorflow.tfprof.ProfileNode.op) + return _internal_op(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void ProfileNode::set_op(ArgT0&& arg0, ArgT... args) { + + _impl_.op_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.tfprof.ProfileNode.op) +} +inline std::string* ProfileNode::mutable_op() { + std::string* _s = _internal_mutable_op(); + // @@protoc_insertion_point(field_mutable:tensorflow.tfprof.ProfileNode.op) + return _s; +} +inline const std::string& ProfileNode::_internal_op() const { + return _impl_.op_.Get(); +} +inline void ProfileNode::_internal_set_op(const std::string& value) { + + _impl_.op_.Set(value, GetArenaForAllocation()); +} +inline std::string* ProfileNode::_internal_mutable_op() { + + return _impl_.op_.Mutable(GetArenaForAllocation()); +} +inline std::string* ProfileNode::release_op() { + // @@protoc_insertion_point(field_release:tensorflow.tfprof.ProfileNode.op) + return _impl_.op_.Release(); +} +inline void ProfileNode::set_allocated_op(std::string* op) { + if (op != nullptr) { + + } else { + + } + _impl_.op_.SetAllocated(op, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.op_.IsDefault()) { + _impl_.op_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.tfprof.ProfileNode.op) +} + +// int64 id = 13; +inline void ProfileNode::clear_id() { + _impl_.id_ = int64_t{0}; +} +inline int64_t ProfileNode::_internal_id() const { + return _impl_.id_; +} +inline int64_t ProfileNode::id() const { + // @@protoc_insertion_point(field_get:tensorflow.tfprof.ProfileNode.id) + return _internal_id(); +} +inline void ProfileNode::_internal_set_id(int64_t value) { + + _impl_.id_ = value; +} +inline void ProfileNode::set_id(int64_t value) { + _internal_set_id(value); + // @@protoc_insertion_point(field_set:tensorflow.tfprof.ProfileNode.id) +} + +// map inputs = 2; +inline int ProfileNode::_internal_inputs_size() const { + return _impl_.inputs_.size(); +} +inline int ProfileNode::inputs_size() const { + return _internal_inputs_size(); +} +inline void ProfileNode::clear_inputs() { + _impl_.inputs_.Clear(); +} +inline const ::PROTOBUF_NAMESPACE_ID::Map< int32_t, int64_t >& +ProfileNode::_internal_inputs() const { + return _impl_.inputs_.GetMap(); +} +inline const ::PROTOBUF_NAMESPACE_ID::Map< int32_t, int64_t >& +ProfileNode::inputs() const { + // @@protoc_insertion_point(field_map:tensorflow.tfprof.ProfileNode.inputs) + return _internal_inputs(); +} +inline ::PROTOBUF_NAMESPACE_ID::Map< int32_t, int64_t >* +ProfileNode::_internal_mutable_inputs() { + return _impl_.inputs_.MutableMap(); +} +inline ::PROTOBUF_NAMESPACE_ID::Map< int32_t, int64_t >* +ProfileNode::mutable_inputs() { + // @@protoc_insertion_point(field_mutable_map:tensorflow.tfprof.ProfileNode.inputs) + return _internal_mutable_inputs(); +} + +// map input_shapes = 16; +inline int ProfileNode::_internal_input_shapes_size() const { + return _impl_.input_shapes_.size(); +} +inline int ProfileNode::input_shapes_size() const { + return _internal_input_shapes_size(); +} +inline void ProfileNode::clear_input_shapes() { + _impl_.input_shapes_.Clear(); +} +inline const ::PROTOBUF_NAMESPACE_ID::Map< int32_t, ::tensorflow::tfprof::Tuple >& +ProfileNode::_internal_input_shapes() const { + return _impl_.input_shapes_.GetMap(); +} +inline const ::PROTOBUF_NAMESPACE_ID::Map< int32_t, ::tensorflow::tfprof::Tuple >& +ProfileNode::input_shapes() const { + // @@protoc_insertion_point(field_map:tensorflow.tfprof.ProfileNode.input_shapes) + return _internal_input_shapes(); +} +inline ::PROTOBUF_NAMESPACE_ID::Map< int32_t, ::tensorflow::tfprof::Tuple >* +ProfileNode::_internal_mutable_input_shapes() { + return _impl_.input_shapes_.MutableMap(); +} +inline ::PROTOBUF_NAMESPACE_ID::Map< int32_t, ::tensorflow::tfprof::Tuple >* +ProfileNode::mutable_input_shapes() { + // @@protoc_insertion_point(field_mutable_map:tensorflow.tfprof.ProfileNode.input_shapes) + return _internal_mutable_input_shapes(); +} + +// map outputs = 3; +inline int ProfileNode::_internal_outputs_size() const { + return _impl_.outputs_.size(); +} +inline int ProfileNode::outputs_size() const { + return _internal_outputs_size(); +} +inline void ProfileNode::clear_outputs() { + _impl_.outputs_.Clear(); +} +inline const ::PROTOBUF_NAMESPACE_ID::Map< int32_t, int64_t >& +ProfileNode::_internal_outputs() const { + return _impl_.outputs_.GetMap(); +} +inline const ::PROTOBUF_NAMESPACE_ID::Map< int32_t, int64_t >& +ProfileNode::outputs() const { + // @@protoc_insertion_point(field_map:tensorflow.tfprof.ProfileNode.outputs) + return _internal_outputs(); +} +inline ::PROTOBUF_NAMESPACE_ID::Map< int32_t, int64_t >* +ProfileNode::_internal_mutable_outputs() { + return _impl_.outputs_.MutableMap(); +} +inline ::PROTOBUF_NAMESPACE_ID::Map< int32_t, int64_t >* +ProfileNode::mutable_outputs() { + // @@protoc_insertion_point(field_mutable_map:tensorflow.tfprof.ProfileNode.outputs) + return _internal_mutable_outputs(); +} + +// map output_shapes = 15; +inline int ProfileNode::_internal_output_shapes_size() const { + return _impl_.output_shapes_.size(); +} +inline int ProfileNode::output_shapes_size() const { + return _internal_output_shapes_size(); +} +inline void ProfileNode::clear_output_shapes() { + _impl_.output_shapes_.Clear(); +} +inline const ::PROTOBUF_NAMESPACE_ID::Map< int32_t, ::tensorflow::tfprof::Tuple >& +ProfileNode::_internal_output_shapes() const { + return _impl_.output_shapes_.GetMap(); +} +inline const ::PROTOBUF_NAMESPACE_ID::Map< int32_t, ::tensorflow::tfprof::Tuple >& +ProfileNode::output_shapes() const { + // @@protoc_insertion_point(field_map:tensorflow.tfprof.ProfileNode.output_shapes) + return _internal_output_shapes(); +} +inline ::PROTOBUF_NAMESPACE_ID::Map< int32_t, ::tensorflow::tfprof::Tuple >* +ProfileNode::_internal_mutable_output_shapes() { + return _impl_.output_shapes_.MutableMap(); +} +inline ::PROTOBUF_NAMESPACE_ID::Map< int32_t, ::tensorflow::tfprof::Tuple >* +ProfileNode::mutable_output_shapes() { + // @@protoc_insertion_point(field_mutable_map:tensorflow.tfprof.ProfileNode.output_shapes) + return _internal_mutable_output_shapes(); +} + +// map src_output_index = 14; +inline int ProfileNode::_internal_src_output_index_size() const { + return _impl_.src_output_index_.size(); +} +inline int ProfileNode::src_output_index_size() const { + return _internal_src_output_index_size(); +} +inline void ProfileNode::clear_src_output_index() { + _impl_.src_output_index_.Clear(); +} +inline const ::PROTOBUF_NAMESPACE_ID::Map< int64_t, int32_t >& +ProfileNode::_internal_src_output_index() const { + return _impl_.src_output_index_.GetMap(); +} +inline const ::PROTOBUF_NAMESPACE_ID::Map< int64_t, int32_t >& +ProfileNode::src_output_index() const { + // @@protoc_insertion_point(field_map:tensorflow.tfprof.ProfileNode.src_output_index) + return _internal_src_output_index(); +} +inline ::PROTOBUF_NAMESPACE_ID::Map< int64_t, int32_t >* +ProfileNode::_internal_mutable_src_output_index() { + return _impl_.src_output_index_.MutableMap(); +} +inline ::PROTOBUF_NAMESPACE_ID::Map< int64_t, int32_t >* +ProfileNode::mutable_src_output_index() { + // @@protoc_insertion_point(field_mutable_map:tensorflow.tfprof.ProfileNode.src_output_index) + return _internal_mutable_src_output_index(); +} + +// repeated int64 shape = 4; +inline int ProfileNode::_internal_shape_size() const { + return _impl_.shape_.size(); +} +inline int ProfileNode::shape_size() const { + return _internal_shape_size(); +} +inline void ProfileNode::clear_shape() { + _impl_.shape_.Clear(); +} +inline int64_t ProfileNode::_internal_shape(int index) const { + return _impl_.shape_.Get(index); +} +inline int64_t ProfileNode::shape(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.tfprof.ProfileNode.shape) + return _internal_shape(index); +} +inline void ProfileNode::set_shape(int index, int64_t value) { + _impl_.shape_.Set(index, value); + // @@protoc_insertion_point(field_set:tensorflow.tfprof.ProfileNode.shape) +} +inline void ProfileNode::_internal_add_shape(int64_t value) { + _impl_.shape_.Add(value); +} +inline void ProfileNode::add_shape(int64_t value) { + _internal_add_shape(value); + // @@protoc_insertion_point(field_add:tensorflow.tfprof.ProfileNode.shape) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >& +ProfileNode::_internal_shape() const { + return _impl_.shape_; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >& +ProfileNode::shape() const { + // @@protoc_insertion_point(field_list:tensorflow.tfprof.ProfileNode.shape) + return _internal_shape(); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >* +ProfileNode::_internal_mutable_shape() { + return &_impl_.shape_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >* +ProfileNode::mutable_shape() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.tfprof.ProfileNode.shape) + return _internal_mutable_shape(); +} + +// repeated string op_types = 5; +inline int ProfileNode::_internal_op_types_size() const { + return _impl_.op_types_.size(); +} +inline int ProfileNode::op_types_size() const { + return _internal_op_types_size(); +} +inline void ProfileNode::clear_op_types() { + _impl_.op_types_.Clear(); +} +inline std::string* ProfileNode::add_op_types() { + std::string* _s = _internal_add_op_types(); + // @@protoc_insertion_point(field_add_mutable:tensorflow.tfprof.ProfileNode.op_types) + return _s; +} +inline const std::string& ProfileNode::_internal_op_types(int index) const { + return _impl_.op_types_.Get(index); +} +inline const std::string& ProfileNode::op_types(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.tfprof.ProfileNode.op_types) + return _internal_op_types(index); +} +inline std::string* ProfileNode::mutable_op_types(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.tfprof.ProfileNode.op_types) + return _impl_.op_types_.Mutable(index); +} +inline void ProfileNode::set_op_types(int index, const std::string& value) { + _impl_.op_types_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set:tensorflow.tfprof.ProfileNode.op_types) +} +inline void ProfileNode::set_op_types(int index, std::string&& value) { + _impl_.op_types_.Mutable(index)->assign(std::move(value)); + // @@protoc_insertion_point(field_set:tensorflow.tfprof.ProfileNode.op_types) +} +inline void ProfileNode::set_op_types(int index, const char* value) { + GOOGLE_DCHECK(value != nullptr); + _impl_.op_types_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set_char:tensorflow.tfprof.ProfileNode.op_types) +} +inline void ProfileNode::set_op_types(int index, const char* value, size_t size) { + _impl_.op_types_.Mutable(index)->assign( + reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:tensorflow.tfprof.ProfileNode.op_types) +} +inline std::string* ProfileNode::_internal_add_op_types() { + return _impl_.op_types_.Add(); +} +inline void ProfileNode::add_op_types(const std::string& value) { + _impl_.op_types_.Add()->assign(value); + // @@protoc_insertion_point(field_add:tensorflow.tfprof.ProfileNode.op_types) +} +inline void ProfileNode::add_op_types(std::string&& value) { + _impl_.op_types_.Add(std::move(value)); + // @@protoc_insertion_point(field_add:tensorflow.tfprof.ProfileNode.op_types) +} +inline void ProfileNode::add_op_types(const char* value) { + GOOGLE_DCHECK(value != nullptr); + _impl_.op_types_.Add()->assign(value); + // @@protoc_insertion_point(field_add_char:tensorflow.tfprof.ProfileNode.op_types) +} +inline void ProfileNode::add_op_types(const char* value, size_t size) { + _impl_.op_types_.Add()->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_add_pointer:tensorflow.tfprof.ProfileNode.op_types) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& +ProfileNode::op_types() const { + // @@protoc_insertion_point(field_list:tensorflow.tfprof.ProfileNode.op_types) + return _impl_.op_types_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* +ProfileNode::mutable_op_types() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.tfprof.ProfileNode.op_types) + return &_impl_.op_types_; +} + +// string canonical_device = 6; +inline void ProfileNode::clear_canonical_device() { + _impl_.canonical_device_.ClearToEmpty(); +} +inline const std::string& ProfileNode::canonical_device() const { + // @@protoc_insertion_point(field_get:tensorflow.tfprof.ProfileNode.canonical_device) + return _internal_canonical_device(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void ProfileNode::set_canonical_device(ArgT0&& arg0, ArgT... args) { + + _impl_.canonical_device_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.tfprof.ProfileNode.canonical_device) +} +inline std::string* ProfileNode::mutable_canonical_device() { + std::string* _s = _internal_mutable_canonical_device(); + // @@protoc_insertion_point(field_mutable:tensorflow.tfprof.ProfileNode.canonical_device) + return _s; +} +inline const std::string& ProfileNode::_internal_canonical_device() const { + return _impl_.canonical_device_.Get(); +} +inline void ProfileNode::_internal_set_canonical_device(const std::string& value) { + + _impl_.canonical_device_.Set(value, GetArenaForAllocation()); +} +inline std::string* ProfileNode::_internal_mutable_canonical_device() { + + return _impl_.canonical_device_.Mutable(GetArenaForAllocation()); +} +inline std::string* ProfileNode::release_canonical_device() { + // @@protoc_insertion_point(field_release:tensorflow.tfprof.ProfileNode.canonical_device) + return _impl_.canonical_device_.Release(); +} +inline void ProfileNode::set_allocated_canonical_device(std::string* canonical_device) { + if (canonical_device != nullptr) { + + } else { + + } + _impl_.canonical_device_.SetAllocated(canonical_device, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.canonical_device_.IsDefault()) { + _impl_.canonical_device_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.tfprof.ProfileNode.canonical_device) +} + +// string host_device = 7; +inline void ProfileNode::clear_host_device() { + _impl_.host_device_.ClearToEmpty(); +} +inline const std::string& ProfileNode::host_device() const { + // @@protoc_insertion_point(field_get:tensorflow.tfprof.ProfileNode.host_device) + return _internal_host_device(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void ProfileNode::set_host_device(ArgT0&& arg0, ArgT... args) { + + _impl_.host_device_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.tfprof.ProfileNode.host_device) +} +inline std::string* ProfileNode::mutable_host_device() { + std::string* _s = _internal_mutable_host_device(); + // @@protoc_insertion_point(field_mutable:tensorflow.tfprof.ProfileNode.host_device) + return _s; +} +inline const std::string& ProfileNode::_internal_host_device() const { + return _impl_.host_device_.Get(); +} +inline void ProfileNode::_internal_set_host_device(const std::string& value) { + + _impl_.host_device_.Set(value, GetArenaForAllocation()); +} +inline std::string* ProfileNode::_internal_mutable_host_device() { + + return _impl_.host_device_.Mutable(GetArenaForAllocation()); +} +inline std::string* ProfileNode::release_host_device() { + // @@protoc_insertion_point(field_release:tensorflow.tfprof.ProfileNode.host_device) + return _impl_.host_device_.Release(); +} +inline void ProfileNode::set_allocated_host_device(std::string* host_device) { + if (host_device != nullptr) { + + } else { + + } + _impl_.host_device_.SetAllocated(host_device, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.host_device_.IsDefault()) { + _impl_.host_device_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.tfprof.ProfileNode.host_device) +} + +// int64 float_ops = 8; +inline void ProfileNode::clear_float_ops() { + _impl_.float_ops_ = int64_t{0}; +} +inline int64_t ProfileNode::_internal_float_ops() const { + return _impl_.float_ops_; +} +inline int64_t ProfileNode::float_ops() const { + // @@protoc_insertion_point(field_get:tensorflow.tfprof.ProfileNode.float_ops) + return _internal_float_ops(); +} +inline void ProfileNode::_internal_set_float_ops(int64_t value) { + + _impl_.float_ops_ = value; +} +inline void ProfileNode::set_float_ops(int64_t value) { + _internal_set_float_ops(value); + // @@protoc_insertion_point(field_set:tensorflow.tfprof.ProfileNode.float_ops) +} + +// .tensorflow.tfprof.CodeDef trace = 10; +inline bool ProfileNode::_internal_has_trace() const { + return this != internal_default_instance() && _impl_.trace_ != nullptr; +} +inline bool ProfileNode::has_trace() const { + return _internal_has_trace(); +} +inline void ProfileNode::clear_trace() { + if (GetArenaForAllocation() == nullptr && _impl_.trace_ != nullptr) { + delete _impl_.trace_; + } + _impl_.trace_ = nullptr; +} +inline const ::tensorflow::tfprof::CodeDef& ProfileNode::_internal_trace() const { + const ::tensorflow::tfprof::CodeDef* p = _impl_.trace_; + return p != nullptr ? *p : reinterpret_cast( + ::tensorflow::tfprof::_CodeDef_default_instance_); +} +inline const ::tensorflow::tfprof::CodeDef& ProfileNode::trace() const { + // @@protoc_insertion_point(field_get:tensorflow.tfprof.ProfileNode.trace) + return _internal_trace(); +} +inline void ProfileNode::unsafe_arena_set_allocated_trace( + ::tensorflow::tfprof::CodeDef* trace) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.trace_); + } + _impl_.trace_ = trace; + if (trace) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.tfprof.ProfileNode.trace) +} +inline ::tensorflow::tfprof::CodeDef* ProfileNode::release_trace() { + + ::tensorflow::tfprof::CodeDef* temp = _impl_.trace_; + _impl_.trace_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tensorflow::tfprof::CodeDef* ProfileNode::unsafe_arena_release_trace() { + // @@protoc_insertion_point(field_release:tensorflow.tfprof.ProfileNode.trace) + + ::tensorflow::tfprof::CodeDef* temp = _impl_.trace_; + _impl_.trace_ = nullptr; + return temp; +} +inline ::tensorflow::tfprof::CodeDef* ProfileNode::_internal_mutable_trace() { + + if (_impl_.trace_ == nullptr) { + auto* p = CreateMaybeMessage<::tensorflow::tfprof::CodeDef>(GetArenaForAllocation()); + _impl_.trace_ = p; + } + return _impl_.trace_; +} +inline ::tensorflow::tfprof::CodeDef* ProfileNode::mutable_trace() { + ::tensorflow::tfprof::CodeDef* _msg = _internal_mutable_trace(); + // @@protoc_insertion_point(field_mutable:tensorflow.tfprof.ProfileNode.trace) + return _msg; +} +inline void ProfileNode::set_allocated_trace(::tensorflow::tfprof::CodeDef* trace) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete _impl_.trace_; + } + if (trace) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(trace); + if (message_arena != submessage_arena) { + trace = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, trace, submessage_arena); + } + + } else { + + } + _impl_.trace_ = trace; + // @@protoc_insertion_point(field_set_allocated:tensorflow.tfprof.ProfileNode.trace) +} + +// map attrs = 11; +inline int ProfileNode::_internal_attrs_size() const { + return _impl_.attrs_.size(); +} +inline int ProfileNode::attrs_size() const { + return _internal_attrs_size(); +} +inline const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::AttrValue >& +ProfileNode::_internal_attrs() const { + return _impl_.attrs_.GetMap(); +} +inline const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::AttrValue >& +ProfileNode::attrs() const { + // @@protoc_insertion_point(field_map:tensorflow.tfprof.ProfileNode.attrs) + return _internal_attrs(); +} +inline ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::AttrValue >* +ProfileNode::_internal_mutable_attrs() { + return _impl_.attrs_.MutableMap(); +} +inline ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::AttrValue >* +ProfileNode::mutable_attrs() { + // @@protoc_insertion_point(field_mutable_map:tensorflow.tfprof.ProfileNode.attrs) + return _internal_mutable_attrs(); +} + +// map execs = 12; +inline int ProfileNode::_internal_execs_size() const { + return _impl_.execs_.size(); +} +inline int ProfileNode::execs_size() const { + return _internal_execs_size(); +} +inline void ProfileNode::clear_execs() { + _impl_.execs_.Clear(); +} +inline const ::PROTOBUF_NAMESPACE_ID::Map< int64_t, ::tensorflow::tfprof::ExecProfile >& +ProfileNode::_internal_execs() const { + return _impl_.execs_.GetMap(); +} +inline const ::PROTOBUF_NAMESPACE_ID::Map< int64_t, ::tensorflow::tfprof::ExecProfile >& +ProfileNode::execs() const { + // @@protoc_insertion_point(field_map:tensorflow.tfprof.ProfileNode.execs) + return _internal_execs(); +} +inline ::PROTOBUF_NAMESPACE_ID::Map< int64_t, ::tensorflow::tfprof::ExecProfile >* +ProfileNode::_internal_mutable_execs() { + return _impl_.execs_.MutableMap(); +} +inline ::PROTOBUF_NAMESPACE_ID::Map< int64_t, ::tensorflow::tfprof::ExecProfile >* +ProfileNode::mutable_execs() { + // @@protoc_insertion_point(field_mutable_map:tensorflow.tfprof.ProfileNode.execs) + return _internal_mutable_execs(); +} + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ExecProfile + +// int64 run_count = 1; +inline void ExecProfile::clear_run_count() { + _impl_.run_count_ = int64_t{0}; +} +inline int64_t ExecProfile::_internal_run_count() const { + return _impl_.run_count_; +} +inline int64_t ExecProfile::run_count() const { + // @@protoc_insertion_point(field_get:tensorflow.tfprof.ExecProfile.run_count) + return _internal_run_count(); +} +inline void ExecProfile::_internal_set_run_count(int64_t value) { + + _impl_.run_count_ = value; +} +inline void ExecProfile::set_run_count(int64_t value) { + _internal_set_run_count(value); + // @@protoc_insertion_point(field_set:tensorflow.tfprof.ExecProfile.run_count) +} + +// int64 all_start_micros = 2; +inline void ExecProfile::clear_all_start_micros() { + _impl_.all_start_micros_ = int64_t{0}; +} +inline int64_t ExecProfile::_internal_all_start_micros() const { + return _impl_.all_start_micros_; +} +inline int64_t ExecProfile::all_start_micros() const { + // @@protoc_insertion_point(field_get:tensorflow.tfprof.ExecProfile.all_start_micros) + return _internal_all_start_micros(); +} +inline void ExecProfile::_internal_set_all_start_micros(int64_t value) { + + _impl_.all_start_micros_ = value; +} +inline void ExecProfile::set_all_start_micros(int64_t value) { + _internal_set_all_start_micros(value); + // @@protoc_insertion_point(field_set:tensorflow.tfprof.ExecProfile.all_start_micros) +} + +// int64 latest_end_micros = 3; +inline void ExecProfile::clear_latest_end_micros() { + _impl_.latest_end_micros_ = int64_t{0}; +} +inline int64_t ExecProfile::_internal_latest_end_micros() const { + return _impl_.latest_end_micros_; +} +inline int64_t ExecProfile::latest_end_micros() const { + // @@protoc_insertion_point(field_get:tensorflow.tfprof.ExecProfile.latest_end_micros) + return _internal_latest_end_micros(); +} +inline void ExecProfile::_internal_set_latest_end_micros(int64_t value) { + + _impl_.latest_end_micros_ = value; +} +inline void ExecProfile::set_latest_end_micros(int64_t value) { + _internal_set_latest_end_micros(value); + // @@protoc_insertion_point(field_set:tensorflow.tfprof.ExecProfile.latest_end_micros) +} + +// map accelerator_execs = 4; +inline int ExecProfile::_internal_accelerator_execs_size() const { + return _impl_.accelerator_execs_.size(); +} +inline int ExecProfile::accelerator_execs_size() const { + return _internal_accelerator_execs_size(); +} +inline void ExecProfile::clear_accelerator_execs() { + _impl_.accelerator_execs_.Clear(); +} +inline const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::tfprof::ExecTime >& +ExecProfile::_internal_accelerator_execs() const { + return _impl_.accelerator_execs_.GetMap(); +} +inline const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::tfprof::ExecTime >& +ExecProfile::accelerator_execs() const { + // @@protoc_insertion_point(field_map:tensorflow.tfprof.ExecProfile.accelerator_execs) + return _internal_accelerator_execs(); +} +inline ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::tfprof::ExecTime >* +ExecProfile::_internal_mutable_accelerator_execs() { + return _impl_.accelerator_execs_.MutableMap(); +} +inline ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::tfprof::ExecTime >* +ExecProfile::mutable_accelerator_execs() { + // @@protoc_insertion_point(field_mutable_map:tensorflow.tfprof.ExecProfile.accelerator_execs) + return _internal_mutable_accelerator_execs(); +} + +// map cpu_execs = 5; +inline int ExecProfile::_internal_cpu_execs_size() const { + return _impl_.cpu_execs_.size(); +} +inline int ExecProfile::cpu_execs_size() const { + return _internal_cpu_execs_size(); +} +inline void ExecProfile::clear_cpu_execs() { + _impl_.cpu_execs_.Clear(); +} +inline const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::tfprof::ExecTime >& +ExecProfile::_internal_cpu_execs() const { + return _impl_.cpu_execs_.GetMap(); +} +inline const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::tfprof::ExecTime >& +ExecProfile::cpu_execs() const { + // @@protoc_insertion_point(field_map:tensorflow.tfprof.ExecProfile.cpu_execs) + return _internal_cpu_execs(); +} +inline ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::tfprof::ExecTime >* +ExecProfile::_internal_mutable_cpu_execs() { + return _impl_.cpu_execs_.MutableMap(); +} +inline ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::tfprof::ExecTime >* +ExecProfile::mutable_cpu_execs() { + // @@protoc_insertion_point(field_mutable_map:tensorflow.tfprof.ExecProfile.cpu_execs) + return _internal_mutable_cpu_execs(); +} + +// repeated .tensorflow.tfprof.ExecMemory memory_execs = 7; +inline int ExecProfile::_internal_memory_execs_size() const { + return _impl_.memory_execs_.size(); +} +inline int ExecProfile::memory_execs_size() const { + return _internal_memory_execs_size(); +} +inline void ExecProfile::clear_memory_execs() { + _impl_.memory_execs_.Clear(); +} +inline ::tensorflow::tfprof::ExecMemory* ExecProfile::mutable_memory_execs(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.tfprof.ExecProfile.memory_execs) + return _impl_.memory_execs_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::tfprof::ExecMemory >* +ExecProfile::mutable_memory_execs() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.tfprof.ExecProfile.memory_execs) + return &_impl_.memory_execs_; +} +inline const ::tensorflow::tfprof::ExecMemory& ExecProfile::_internal_memory_execs(int index) const { + return _impl_.memory_execs_.Get(index); +} +inline const ::tensorflow::tfprof::ExecMemory& ExecProfile::memory_execs(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.tfprof.ExecProfile.memory_execs) + return _internal_memory_execs(index); +} +inline ::tensorflow::tfprof::ExecMemory* ExecProfile::_internal_add_memory_execs() { + return _impl_.memory_execs_.Add(); +} +inline ::tensorflow::tfprof::ExecMemory* ExecProfile::add_memory_execs() { + ::tensorflow::tfprof::ExecMemory* _add = _internal_add_memory_execs(); + // @@protoc_insertion_point(field_add:tensorflow.tfprof.ExecProfile.memory_execs) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::tfprof::ExecMemory >& +ExecProfile::memory_execs() const { + // @@protoc_insertion_point(field_list:tensorflow.tfprof.ExecProfile.memory_execs) + return _impl_.memory_execs_; +} + +// repeated .tensorflow.AllocationRecord allocations = 11; +inline int ExecProfile::_internal_allocations_size() const { + return _impl_.allocations_.size(); +} +inline int ExecProfile::allocations_size() const { + return _internal_allocations_size(); +} +inline ::tensorflow::AllocationRecord* ExecProfile::mutable_allocations(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.tfprof.ExecProfile.allocations) + return _impl_.allocations_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::AllocationRecord >* +ExecProfile::mutable_allocations() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.tfprof.ExecProfile.allocations) + return &_impl_.allocations_; +} +inline const ::tensorflow::AllocationRecord& ExecProfile::_internal_allocations(int index) const { + return _impl_.allocations_.Get(index); +} +inline const ::tensorflow::AllocationRecord& ExecProfile::allocations(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.tfprof.ExecProfile.allocations) + return _internal_allocations(index); +} +inline ::tensorflow::AllocationRecord* ExecProfile::_internal_add_allocations() { + return _impl_.allocations_.Add(); +} +inline ::tensorflow::AllocationRecord* ExecProfile::add_allocations() { + ::tensorflow::AllocationRecord* _add = _internal_add_allocations(); + // @@protoc_insertion_point(field_add:tensorflow.tfprof.ExecProfile.allocations) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::AllocationRecord >& +ExecProfile::allocations() const { + // @@protoc_insertion_point(field_list:tensorflow.tfprof.ExecProfile.allocations) + return _impl_.allocations_; +} + +// repeated string devices = 6; +inline int ExecProfile::_internal_devices_size() const { + return _impl_.devices_.size(); +} +inline int ExecProfile::devices_size() const { + return _internal_devices_size(); +} +inline void ExecProfile::clear_devices() { + _impl_.devices_.Clear(); +} +inline std::string* ExecProfile::add_devices() { + std::string* _s = _internal_add_devices(); + // @@protoc_insertion_point(field_add_mutable:tensorflow.tfprof.ExecProfile.devices) + return _s; +} +inline const std::string& ExecProfile::_internal_devices(int index) const { + return _impl_.devices_.Get(index); +} +inline const std::string& ExecProfile::devices(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.tfprof.ExecProfile.devices) + return _internal_devices(index); +} +inline std::string* ExecProfile::mutable_devices(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.tfprof.ExecProfile.devices) + return _impl_.devices_.Mutable(index); +} +inline void ExecProfile::set_devices(int index, const std::string& value) { + _impl_.devices_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set:tensorflow.tfprof.ExecProfile.devices) +} +inline void ExecProfile::set_devices(int index, std::string&& value) { + _impl_.devices_.Mutable(index)->assign(std::move(value)); + // @@protoc_insertion_point(field_set:tensorflow.tfprof.ExecProfile.devices) +} +inline void ExecProfile::set_devices(int index, const char* value) { + GOOGLE_DCHECK(value != nullptr); + _impl_.devices_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set_char:tensorflow.tfprof.ExecProfile.devices) +} +inline void ExecProfile::set_devices(int index, const char* value, size_t size) { + _impl_.devices_.Mutable(index)->assign( + reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:tensorflow.tfprof.ExecProfile.devices) +} +inline std::string* ExecProfile::_internal_add_devices() { + return _impl_.devices_.Add(); +} +inline void ExecProfile::add_devices(const std::string& value) { + _impl_.devices_.Add()->assign(value); + // @@protoc_insertion_point(field_add:tensorflow.tfprof.ExecProfile.devices) +} +inline void ExecProfile::add_devices(std::string&& value) { + _impl_.devices_.Add(std::move(value)); + // @@protoc_insertion_point(field_add:tensorflow.tfprof.ExecProfile.devices) +} +inline void ExecProfile::add_devices(const char* value) { + GOOGLE_DCHECK(value != nullptr); + _impl_.devices_.Add()->assign(value); + // @@protoc_insertion_point(field_add_char:tensorflow.tfprof.ExecProfile.devices) +} +inline void ExecProfile::add_devices(const char* value, size_t size) { + _impl_.devices_.Add()->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_add_pointer:tensorflow.tfprof.ExecProfile.devices) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& +ExecProfile::devices() const { + // @@protoc_insertion_point(field_list:tensorflow.tfprof.ExecProfile.devices) + return _impl_.devices_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* +ExecProfile::mutable_devices() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.tfprof.ExecProfile.devices) + return &_impl_.devices_; +} + +// ------------------------------------------------------------------- + +// ExecTime + +// repeated .tensorflow.tfprof.Tuple times = 1; +inline int ExecTime::_internal_times_size() const { + return _impl_.times_.size(); +} +inline int ExecTime::times_size() const { + return _internal_times_size(); +} +inline void ExecTime::clear_times() { + _impl_.times_.Clear(); +} +inline ::tensorflow::tfprof::Tuple* ExecTime::mutable_times(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.tfprof.ExecTime.times) + return _impl_.times_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::tfprof::Tuple >* +ExecTime::mutable_times() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.tfprof.ExecTime.times) + return &_impl_.times_; +} +inline const ::tensorflow::tfprof::Tuple& ExecTime::_internal_times(int index) const { + return _impl_.times_.Get(index); +} +inline const ::tensorflow::tfprof::Tuple& ExecTime::times(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.tfprof.ExecTime.times) + return _internal_times(index); +} +inline ::tensorflow::tfprof::Tuple* ExecTime::_internal_add_times() { + return _impl_.times_.Add(); +} +inline ::tensorflow::tfprof::Tuple* ExecTime::add_times() { + ::tensorflow::tfprof::Tuple* _add = _internal_add_times(); + // @@protoc_insertion_point(field_add:tensorflow.tfprof.ExecTime.times) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::tfprof::Tuple >& +ExecTime::times() const { + // @@protoc_insertion_point(field_list:tensorflow.tfprof.ExecTime.times) + return _impl_.times_; +} + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ExecMemory + +// int64 memory_micros = 1; +inline void ExecMemory::clear_memory_micros() { + _impl_.memory_micros_ = int64_t{0}; +} +inline int64_t ExecMemory::_internal_memory_micros() const { + return _impl_.memory_micros_; +} +inline int64_t ExecMemory::memory_micros() const { + // @@protoc_insertion_point(field_get:tensorflow.tfprof.ExecMemory.memory_micros) + return _internal_memory_micros(); +} +inline void ExecMemory::_internal_set_memory_micros(int64_t value) { + + _impl_.memory_micros_ = value; +} +inline void ExecMemory::set_memory_micros(int64_t value) { + _internal_set_memory_micros(value); + // @@protoc_insertion_point(field_set:tensorflow.tfprof.ExecMemory.memory_micros) +} + +// int64 host_temp_bytes = 2; +inline void ExecMemory::clear_host_temp_bytes() { + _impl_.host_temp_bytes_ = int64_t{0}; +} +inline int64_t ExecMemory::_internal_host_temp_bytes() const { + return _impl_.host_temp_bytes_; +} +inline int64_t ExecMemory::host_temp_bytes() const { + // @@protoc_insertion_point(field_get:tensorflow.tfprof.ExecMemory.host_temp_bytes) + return _internal_host_temp_bytes(); +} +inline void ExecMemory::_internal_set_host_temp_bytes(int64_t value) { + + _impl_.host_temp_bytes_ = value; +} +inline void ExecMemory::set_host_temp_bytes(int64_t value) { + _internal_set_host_temp_bytes(value); + // @@protoc_insertion_point(field_set:tensorflow.tfprof.ExecMemory.host_temp_bytes) +} + +// int64 host_persistent_bytes = 3; +inline void ExecMemory::clear_host_persistent_bytes() { + _impl_.host_persistent_bytes_ = int64_t{0}; +} +inline int64_t ExecMemory::_internal_host_persistent_bytes() const { + return _impl_.host_persistent_bytes_; +} +inline int64_t ExecMemory::host_persistent_bytes() const { + // @@protoc_insertion_point(field_get:tensorflow.tfprof.ExecMemory.host_persistent_bytes) + return _internal_host_persistent_bytes(); +} +inline void ExecMemory::_internal_set_host_persistent_bytes(int64_t value) { + + _impl_.host_persistent_bytes_ = value; +} +inline void ExecMemory::set_host_persistent_bytes(int64_t value) { + _internal_set_host_persistent_bytes(value); + // @@protoc_insertion_point(field_set:tensorflow.tfprof.ExecMemory.host_persistent_bytes) +} + +// int64 accelerator_temp_bytes = 4; +inline void ExecMemory::clear_accelerator_temp_bytes() { + _impl_.accelerator_temp_bytes_ = int64_t{0}; +} +inline int64_t ExecMemory::_internal_accelerator_temp_bytes() const { + return _impl_.accelerator_temp_bytes_; +} +inline int64_t ExecMemory::accelerator_temp_bytes() const { + // @@protoc_insertion_point(field_get:tensorflow.tfprof.ExecMemory.accelerator_temp_bytes) + return _internal_accelerator_temp_bytes(); +} +inline void ExecMemory::_internal_set_accelerator_temp_bytes(int64_t value) { + + _impl_.accelerator_temp_bytes_ = value; +} +inline void ExecMemory::set_accelerator_temp_bytes(int64_t value) { + _internal_set_accelerator_temp_bytes(value); + // @@protoc_insertion_point(field_set:tensorflow.tfprof.ExecMemory.accelerator_temp_bytes) +} + +// int64 accelerator_persistent_bytes = 5; +inline void ExecMemory::clear_accelerator_persistent_bytes() { + _impl_.accelerator_persistent_bytes_ = int64_t{0}; +} +inline int64_t ExecMemory::_internal_accelerator_persistent_bytes() const { + return _impl_.accelerator_persistent_bytes_; +} +inline int64_t ExecMemory::accelerator_persistent_bytes() const { + // @@protoc_insertion_point(field_get:tensorflow.tfprof.ExecMemory.accelerator_persistent_bytes) + return _internal_accelerator_persistent_bytes(); +} +inline void ExecMemory::_internal_set_accelerator_persistent_bytes(int64_t value) { + + _impl_.accelerator_persistent_bytes_ = value; +} +inline void ExecMemory::set_accelerator_persistent_bytes(int64_t value) { + _internal_set_accelerator_persistent_bytes(value); + // @@protoc_insertion_point(field_set:tensorflow.tfprof.ExecMemory.accelerator_persistent_bytes) +} + +// int64 requested_bytes = 6; +inline void ExecMemory::clear_requested_bytes() { + _impl_.requested_bytes_ = int64_t{0}; +} +inline int64_t ExecMemory::_internal_requested_bytes() const { + return _impl_.requested_bytes_; +} +inline int64_t ExecMemory::requested_bytes() const { + // @@protoc_insertion_point(field_get:tensorflow.tfprof.ExecMemory.requested_bytes) + return _internal_requested_bytes(); +} +inline void ExecMemory::_internal_set_requested_bytes(int64_t value) { + + _impl_.requested_bytes_ = value; +} +inline void ExecMemory::set_requested_bytes(int64_t value) { + _internal_set_requested_bytes(value); + // @@protoc_insertion_point(field_set:tensorflow.tfprof.ExecMemory.requested_bytes) +} + +// int64 peak_bytes = 7; +inline void ExecMemory::clear_peak_bytes() { + _impl_.peak_bytes_ = int64_t{0}; +} +inline int64_t ExecMemory::_internal_peak_bytes() const { + return _impl_.peak_bytes_; +} +inline int64_t ExecMemory::peak_bytes() const { + // @@protoc_insertion_point(field_get:tensorflow.tfprof.ExecMemory.peak_bytes) + return _internal_peak_bytes(); +} +inline void ExecMemory::_internal_set_peak_bytes(int64_t value) { + + _impl_.peak_bytes_ = value; +} +inline void ExecMemory::set_peak_bytes(int64_t value) { + _internal_set_peak_bytes(value); + // @@protoc_insertion_point(field_set:tensorflow.tfprof.ExecMemory.peak_bytes) +} + +// int64 residual_bytes = 8; +inline void ExecMemory::clear_residual_bytes() { + _impl_.residual_bytes_ = int64_t{0}; +} +inline int64_t ExecMemory::_internal_residual_bytes() const { + return _impl_.residual_bytes_; +} +inline int64_t ExecMemory::residual_bytes() const { + // @@protoc_insertion_point(field_get:tensorflow.tfprof.ExecMemory.residual_bytes) + return _internal_residual_bytes(); +} +inline void ExecMemory::_internal_set_residual_bytes(int64_t value) { + + _impl_.residual_bytes_ = value; +} +inline void ExecMemory::set_residual_bytes(int64_t value) { + _internal_set_residual_bytes(value); + // @@protoc_insertion_point(field_set:tensorflow.tfprof.ExecMemory.residual_bytes) +} + +// int64 output_bytes = 9; +inline void ExecMemory::clear_output_bytes() { + _impl_.output_bytes_ = int64_t{0}; +} +inline int64_t ExecMemory::_internal_output_bytes() const { + return _impl_.output_bytes_; +} +inline int64_t ExecMemory::output_bytes() const { + // @@protoc_insertion_point(field_get:tensorflow.tfprof.ExecMemory.output_bytes) + return _internal_output_bytes(); +} +inline void ExecMemory::_internal_set_output_bytes(int64_t value) { + + _impl_.output_bytes_ = value; +} +inline void ExecMemory::set_output_bytes(int64_t value) { + _internal_set_output_bytes(value); + // @@protoc_insertion_point(field_set:tensorflow.tfprof.ExecMemory.output_bytes) +} + +// int64 allocator_bytes_in_use = 10; +inline void ExecMemory::clear_allocator_bytes_in_use() { + _impl_.allocator_bytes_in_use_ = int64_t{0}; +} +inline int64_t ExecMemory::_internal_allocator_bytes_in_use() const { + return _impl_.allocator_bytes_in_use_; +} +inline int64_t ExecMemory::allocator_bytes_in_use() const { + // @@protoc_insertion_point(field_get:tensorflow.tfprof.ExecMemory.allocator_bytes_in_use) + return _internal_allocator_bytes_in_use(); +} +inline void ExecMemory::_internal_set_allocator_bytes_in_use(int64_t value) { + + _impl_.allocator_bytes_in_use_ = value; +} +inline void ExecMemory::set_allocator_bytes_in_use(int64_t value) { + _internal_set_allocator_bytes_in_use(value); + // @@protoc_insertion_point(field_set:tensorflow.tfprof.ExecMemory.allocator_bytes_in_use) +} + +// map output_memory = 11; +inline int ExecMemory::_internal_output_memory_size() const { + return _impl_.output_memory_.size(); +} +inline int ExecMemory::output_memory_size() const { + return _internal_output_memory_size(); +} +inline void ExecMemory::clear_output_memory() { + _impl_.output_memory_.Clear(); +} +inline const ::PROTOBUF_NAMESPACE_ID::Map< int32_t, ::tensorflow::tfprof::Memory >& +ExecMemory::_internal_output_memory() const { + return _impl_.output_memory_.GetMap(); +} +inline const ::PROTOBUF_NAMESPACE_ID::Map< int32_t, ::tensorflow::tfprof::Memory >& +ExecMemory::output_memory() const { + // @@protoc_insertion_point(field_map:tensorflow.tfprof.ExecMemory.output_memory) + return _internal_output_memory(); +} +inline ::PROTOBUF_NAMESPACE_ID::Map< int32_t, ::tensorflow::tfprof::Memory >* +ExecMemory::_internal_mutable_output_memory() { + return _impl_.output_memory_.MutableMap(); +} +inline ::PROTOBUF_NAMESPACE_ID::Map< int32_t, ::tensorflow::tfprof::Memory >* +ExecMemory::mutable_output_memory() { + // @@protoc_insertion_point(field_mutable_map:tensorflow.tfprof.ExecMemory.output_memory) + return _internal_mutable_output_memory(); +} + +// ------------------------------------------------------------------- + +// Tuple + +// repeated int64 int64_values = 1; +inline int Tuple::_internal_int64_values_size() const { + return _impl_.int64_values_.size(); +} +inline int Tuple::int64_values_size() const { + return _internal_int64_values_size(); +} +inline void Tuple::clear_int64_values() { + _impl_.int64_values_.Clear(); +} +inline int64_t Tuple::_internal_int64_values(int index) const { + return _impl_.int64_values_.Get(index); +} +inline int64_t Tuple::int64_values(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.tfprof.Tuple.int64_values) + return _internal_int64_values(index); +} +inline void Tuple::set_int64_values(int index, int64_t value) { + _impl_.int64_values_.Set(index, value); + // @@protoc_insertion_point(field_set:tensorflow.tfprof.Tuple.int64_values) +} +inline void Tuple::_internal_add_int64_values(int64_t value) { + _impl_.int64_values_.Add(value); +} +inline void Tuple::add_int64_values(int64_t value) { + _internal_add_int64_values(value); + // @@protoc_insertion_point(field_add:tensorflow.tfprof.Tuple.int64_values) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >& +Tuple::_internal_int64_values() const { + return _impl_.int64_values_; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >& +Tuple::int64_values() const { + // @@protoc_insertion_point(field_list:tensorflow.tfprof.Tuple.int64_values) + return _internal_int64_values(); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >* +Tuple::_internal_mutable_int64_values() { + return &_impl_.int64_values_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >* +Tuple::mutable_int64_values() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.tfprof.Tuple.int64_values) + return _internal_mutable_int64_values(); +} + +// ------------------------------------------------------------------- + +// Memory + +// int64 bytes = 1; +inline void Memory::clear_bytes() { + _impl_.bytes_ = int64_t{0}; +} +inline int64_t Memory::_internal_bytes() const { + return _impl_.bytes_; +} +inline int64_t Memory::bytes() const { + // @@protoc_insertion_point(field_get:tensorflow.tfprof.Memory.bytes) + return _internal_bytes(); +} +inline void Memory::_internal_set_bytes(int64_t value) { + + _impl_.bytes_ = value; +} +inline void Memory::set_bytes(int64_t value) { + _internal_set_bytes(value); + // @@protoc_insertion_point(field_set:tensorflow.tfprof.Memory.bytes) +} + +// uint64 ptr = 2; +inline void Memory::clear_ptr() { + _impl_.ptr_ = uint64_t{0u}; +} +inline uint64_t Memory::_internal_ptr() const { + return _impl_.ptr_; +} +inline uint64_t Memory::ptr() const { + // @@protoc_insertion_point(field_get:tensorflow.tfprof.Memory.ptr) + return _internal_ptr(); +} +inline void Memory::_internal_set_ptr(uint64_t value) { + + _impl_.ptr_ = value; +} +inline void Memory::set_ptr(uint64_t value) { + _internal_set_ptr(value); + // @@protoc_insertion_point(field_set:tensorflow.tfprof.Memory.ptr) +} + +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + + +// @@protoc_insertion_point(namespace_scope) + +} // namespace tfprof +} // namespace tensorflow + +// @@protoc_insertion_point(global_scope) + +#include +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/profiler/tfprof_options.pb.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/profiler/tfprof_options.pb.h new file mode 100644 index 0000000000000000000000000000000000000000..17a6f2a56d0050498681d752488b4feac41b97e1 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/profiler/tfprof_options.pb.h @@ -0,0 +1,1905 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/profiler/tfprof_options.proto + +#ifndef GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprofiler_2ftfprof_5foptions_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprofiler_2ftfprof_5foptions_2eproto + +#include +#include + +#include +#if PROTOBUF_VERSION < 3021000 +#error This file was generated by a newer version of protoc which is +#error incompatible with your Protocol Buffer headers. Please update +#error your headers. +#endif +#if 3021009 < PROTOBUF_MIN_PROTOC_VERSION +#error This file was generated by an older version of protoc which is +#error incompatible with your Protocol Buffer headers. Please +#error regenerate this file with a newer version of protoc. +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include // IWYU pragma: export +#include // IWYU pragma: export +#include // IWYU pragma: export +#include +#include +#include +// @@protoc_insertion_point(includes) +#include +#define PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2fprofiler_2ftfprof_5foptions_2eproto +PROTOBUF_NAMESPACE_OPEN +namespace internal { +class AnyMetadata; +} // namespace internal +PROTOBUF_NAMESPACE_CLOSE + +// Internal implementation detail -- do not use these members. +struct TableStruct_tensorflow_2fcore_2fprofiler_2ftfprof_5foptions_2eproto { + static const uint32_t offsets[]; +}; +extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_tensorflow_2fcore_2fprofiler_2ftfprof_5foptions_2eproto; +namespace tensorflow { +namespace tfprof { +class AdvisorOptionsProto; +struct AdvisorOptionsProtoDefaultTypeInternal; +extern AdvisorOptionsProtoDefaultTypeInternal _AdvisorOptionsProto_default_instance_; +class AdvisorOptionsProto_CheckerOption; +struct AdvisorOptionsProto_CheckerOptionDefaultTypeInternal; +extern AdvisorOptionsProto_CheckerOptionDefaultTypeInternal _AdvisorOptionsProto_CheckerOption_default_instance_; +class AdvisorOptionsProto_CheckerOption_OptionsEntry_DoNotUse; +struct AdvisorOptionsProto_CheckerOption_OptionsEntry_DoNotUseDefaultTypeInternal; +extern AdvisorOptionsProto_CheckerOption_OptionsEntry_DoNotUseDefaultTypeInternal _AdvisorOptionsProto_CheckerOption_OptionsEntry_DoNotUse_default_instance_; +class AdvisorOptionsProto_CheckersEntry_DoNotUse; +struct AdvisorOptionsProto_CheckersEntry_DoNotUseDefaultTypeInternal; +extern AdvisorOptionsProto_CheckersEntry_DoNotUseDefaultTypeInternal _AdvisorOptionsProto_CheckersEntry_DoNotUse_default_instance_; +class OptionsProto; +struct OptionsProtoDefaultTypeInternal; +extern OptionsProtoDefaultTypeInternal _OptionsProto_default_instance_; +} // namespace tfprof +} // namespace tensorflow +PROTOBUF_NAMESPACE_OPEN +template<> ::tensorflow::tfprof::AdvisorOptionsProto* Arena::CreateMaybeMessage<::tensorflow::tfprof::AdvisorOptionsProto>(Arena*); +template<> ::tensorflow::tfprof::AdvisorOptionsProto_CheckerOption* Arena::CreateMaybeMessage<::tensorflow::tfprof::AdvisorOptionsProto_CheckerOption>(Arena*); +template<> ::tensorflow::tfprof::AdvisorOptionsProto_CheckerOption_OptionsEntry_DoNotUse* Arena::CreateMaybeMessage<::tensorflow::tfprof::AdvisorOptionsProto_CheckerOption_OptionsEntry_DoNotUse>(Arena*); +template<> ::tensorflow::tfprof::AdvisorOptionsProto_CheckersEntry_DoNotUse* Arena::CreateMaybeMessage<::tensorflow::tfprof::AdvisorOptionsProto_CheckersEntry_DoNotUse>(Arena*); +template<> ::tensorflow::tfprof::OptionsProto* Arena::CreateMaybeMessage<::tensorflow::tfprof::OptionsProto>(Arena*); +PROTOBUF_NAMESPACE_CLOSE +namespace tensorflow { +namespace tfprof { + +// =================================================================== + +class OptionsProto final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.tfprof.OptionsProto) */ { + public: + inline OptionsProto() : OptionsProto(nullptr) {} + ~OptionsProto() override; + explicit PROTOBUF_CONSTEXPR OptionsProto(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + OptionsProto(const OptionsProto& from); + OptionsProto(OptionsProto&& from) noexcept + : OptionsProto() { + *this = ::std::move(from); + } + + inline OptionsProto& operator=(const OptionsProto& from) { + CopyFrom(from); + return *this; + } + inline OptionsProto& operator=(OptionsProto&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const OptionsProto& default_instance() { + return *internal_default_instance(); + } + static inline const OptionsProto* internal_default_instance() { + return reinterpret_cast( + &_OptionsProto_default_instance_); + } + static constexpr int kIndexInFileMessages = + 0; + + friend void swap(OptionsProto& a, OptionsProto& b) { + a.Swap(&b); + } + inline void Swap(OptionsProto* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(OptionsProto* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + OptionsProto* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const OptionsProto& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const OptionsProto& from) { + OptionsProto::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(OptionsProto* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.tfprof.OptionsProto"; + } + protected: + explicit OptionsProto(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kAccountTypeRegexesFieldNumber = 8, + kStartNameRegexesFieldNumber = 9, + kTrimNameRegexesFieldNumber = 10, + kShowNameRegexesFieldNumber = 11, + kHideNameRegexesFieldNumber = 12, + kSelectFieldNumber = 14, + kOrderByFieldNumber = 7, + kOutputFieldNumber = 15, + kDumpToFileFieldNumber = 16, + kMaxDepthFieldNumber = 1, + kMinBytesFieldNumber = 2, + kMinMicrosFieldNumber = 3, + kMinParamsFieldNumber = 4, + kMinFloatOpsFieldNumber = 5, + kMinOccurrenceFieldNumber = 17, + kStepFieldNumber = 18, + kMinPeakBytesFieldNumber = 19, + kMinResidualBytesFieldNumber = 20, + kMinOutputBytesFieldNumber = 21, + kMinAcceleratorMicrosFieldNumber = 22, + kMinCpuMicrosFieldNumber = 23, + kAccountDisplayedOpOnlyFieldNumber = 13, + }; + // repeated string account_type_regexes = 8; + int account_type_regexes_size() const; + private: + int _internal_account_type_regexes_size() const; + public: + void clear_account_type_regexes(); + const std::string& account_type_regexes(int index) const; + std::string* mutable_account_type_regexes(int index); + void set_account_type_regexes(int index, const std::string& value); + void set_account_type_regexes(int index, std::string&& value); + void set_account_type_regexes(int index, const char* value); + void set_account_type_regexes(int index, const char* value, size_t size); + std::string* add_account_type_regexes(); + void add_account_type_regexes(const std::string& value); + void add_account_type_regexes(std::string&& value); + void add_account_type_regexes(const char* value); + void add_account_type_regexes(const char* value, size_t size); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& account_type_regexes() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* mutable_account_type_regexes(); + private: + const std::string& _internal_account_type_regexes(int index) const; + std::string* _internal_add_account_type_regexes(); + public: + + // repeated string start_name_regexes = 9; + int start_name_regexes_size() const; + private: + int _internal_start_name_regexes_size() const; + public: + void clear_start_name_regexes(); + const std::string& start_name_regexes(int index) const; + std::string* mutable_start_name_regexes(int index); + void set_start_name_regexes(int index, const std::string& value); + void set_start_name_regexes(int index, std::string&& value); + void set_start_name_regexes(int index, const char* value); + void set_start_name_regexes(int index, const char* value, size_t size); + std::string* add_start_name_regexes(); + void add_start_name_regexes(const std::string& value); + void add_start_name_regexes(std::string&& value); + void add_start_name_regexes(const char* value); + void add_start_name_regexes(const char* value, size_t size); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& start_name_regexes() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* mutable_start_name_regexes(); + private: + const std::string& _internal_start_name_regexes(int index) const; + std::string* _internal_add_start_name_regexes(); + public: + + // repeated string trim_name_regexes = 10; + int trim_name_regexes_size() const; + private: + int _internal_trim_name_regexes_size() const; + public: + void clear_trim_name_regexes(); + const std::string& trim_name_regexes(int index) const; + std::string* mutable_trim_name_regexes(int index); + void set_trim_name_regexes(int index, const std::string& value); + void set_trim_name_regexes(int index, std::string&& value); + void set_trim_name_regexes(int index, const char* value); + void set_trim_name_regexes(int index, const char* value, size_t size); + std::string* add_trim_name_regexes(); + void add_trim_name_regexes(const std::string& value); + void add_trim_name_regexes(std::string&& value); + void add_trim_name_regexes(const char* value); + void add_trim_name_regexes(const char* value, size_t size); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& trim_name_regexes() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* mutable_trim_name_regexes(); + private: + const std::string& _internal_trim_name_regexes(int index) const; + std::string* _internal_add_trim_name_regexes(); + public: + + // repeated string show_name_regexes = 11; + int show_name_regexes_size() const; + private: + int _internal_show_name_regexes_size() const; + public: + void clear_show_name_regexes(); + const std::string& show_name_regexes(int index) const; + std::string* mutable_show_name_regexes(int index); + void set_show_name_regexes(int index, const std::string& value); + void set_show_name_regexes(int index, std::string&& value); + void set_show_name_regexes(int index, const char* value); + void set_show_name_regexes(int index, const char* value, size_t size); + std::string* add_show_name_regexes(); + void add_show_name_regexes(const std::string& value); + void add_show_name_regexes(std::string&& value); + void add_show_name_regexes(const char* value); + void add_show_name_regexes(const char* value, size_t size); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& show_name_regexes() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* mutable_show_name_regexes(); + private: + const std::string& _internal_show_name_regexes(int index) const; + std::string* _internal_add_show_name_regexes(); + public: + + // repeated string hide_name_regexes = 12; + int hide_name_regexes_size() const; + private: + int _internal_hide_name_regexes_size() const; + public: + void clear_hide_name_regexes(); + const std::string& hide_name_regexes(int index) const; + std::string* mutable_hide_name_regexes(int index); + void set_hide_name_regexes(int index, const std::string& value); + void set_hide_name_regexes(int index, std::string&& value); + void set_hide_name_regexes(int index, const char* value); + void set_hide_name_regexes(int index, const char* value, size_t size); + std::string* add_hide_name_regexes(); + void add_hide_name_regexes(const std::string& value); + void add_hide_name_regexes(std::string&& value); + void add_hide_name_regexes(const char* value); + void add_hide_name_regexes(const char* value, size_t size); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& hide_name_regexes() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* mutable_hide_name_regexes(); + private: + const std::string& _internal_hide_name_regexes(int index) const; + std::string* _internal_add_hide_name_regexes(); + public: + + // repeated string select = 14; + int select_size() const; + private: + int _internal_select_size() const; + public: + void clear_select(); + const std::string& select(int index) const; + std::string* mutable_select(int index); + void set_select(int index, const std::string& value); + void set_select(int index, std::string&& value); + void set_select(int index, const char* value); + void set_select(int index, const char* value, size_t size); + std::string* add_select(); + void add_select(const std::string& value); + void add_select(std::string&& value); + void add_select(const char* value); + void add_select(const char* value, size_t size); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& select() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* mutable_select(); + private: + const std::string& _internal_select(int index) const; + std::string* _internal_add_select(); + public: + + // string order_by = 7; + void clear_order_by(); + const std::string& order_by() const; + template + void set_order_by(ArgT0&& arg0, ArgT... args); + std::string* mutable_order_by(); + PROTOBUF_NODISCARD std::string* release_order_by(); + void set_allocated_order_by(std::string* order_by); + private: + const std::string& _internal_order_by() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_order_by(const std::string& value); + std::string* _internal_mutable_order_by(); + public: + + // string output = 15; + void clear_output(); + const std::string& output() const; + template + void set_output(ArgT0&& arg0, ArgT... args); + std::string* mutable_output(); + PROTOBUF_NODISCARD std::string* release_output(); + void set_allocated_output(std::string* output); + private: + const std::string& _internal_output() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_output(const std::string& value); + std::string* _internal_mutable_output(); + public: + + // string dump_to_file = 16; + void clear_dump_to_file(); + const std::string& dump_to_file() const; + template + void set_dump_to_file(ArgT0&& arg0, ArgT... args); + std::string* mutable_dump_to_file(); + PROTOBUF_NODISCARD std::string* release_dump_to_file(); + void set_allocated_dump_to_file(std::string* dump_to_file); + private: + const std::string& _internal_dump_to_file() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_dump_to_file(const std::string& value); + std::string* _internal_mutable_dump_to_file(); + public: + + // int64 max_depth = 1; + void clear_max_depth(); + int64_t max_depth() const; + void set_max_depth(int64_t value); + private: + int64_t _internal_max_depth() const; + void _internal_set_max_depth(int64_t value); + public: + + // int64 min_bytes = 2; + void clear_min_bytes(); + int64_t min_bytes() const; + void set_min_bytes(int64_t value); + private: + int64_t _internal_min_bytes() const; + void _internal_set_min_bytes(int64_t value); + public: + + // int64 min_micros = 3; + void clear_min_micros(); + int64_t min_micros() const; + void set_min_micros(int64_t value); + private: + int64_t _internal_min_micros() const; + void _internal_set_min_micros(int64_t value); + public: + + // int64 min_params = 4; + void clear_min_params(); + int64_t min_params() const; + void set_min_params(int64_t value); + private: + int64_t _internal_min_params() const; + void _internal_set_min_params(int64_t value); + public: + + // int64 min_float_ops = 5; + void clear_min_float_ops(); + int64_t min_float_ops() const; + void set_min_float_ops(int64_t value); + private: + int64_t _internal_min_float_ops() const; + void _internal_set_min_float_ops(int64_t value); + public: + + // int64 min_occurrence = 17; + void clear_min_occurrence(); + int64_t min_occurrence() const; + void set_min_occurrence(int64_t value); + private: + int64_t _internal_min_occurrence() const; + void _internal_set_min_occurrence(int64_t value); + public: + + // int64 step = 18; + void clear_step(); + int64_t step() const; + void set_step(int64_t value); + private: + int64_t _internal_step() const; + void _internal_set_step(int64_t value); + public: + + // int64 min_peak_bytes = 19; + void clear_min_peak_bytes(); + int64_t min_peak_bytes() const; + void set_min_peak_bytes(int64_t value); + private: + int64_t _internal_min_peak_bytes() const; + void _internal_set_min_peak_bytes(int64_t value); + public: + + // int64 min_residual_bytes = 20; + void clear_min_residual_bytes(); + int64_t min_residual_bytes() const; + void set_min_residual_bytes(int64_t value); + private: + int64_t _internal_min_residual_bytes() const; + void _internal_set_min_residual_bytes(int64_t value); + public: + + // int64 min_output_bytes = 21; + void clear_min_output_bytes(); + int64_t min_output_bytes() const; + void set_min_output_bytes(int64_t value); + private: + int64_t _internal_min_output_bytes() const; + void _internal_set_min_output_bytes(int64_t value); + public: + + // int64 min_accelerator_micros = 22; + void clear_min_accelerator_micros(); + int64_t min_accelerator_micros() const; + void set_min_accelerator_micros(int64_t value); + private: + int64_t _internal_min_accelerator_micros() const; + void _internal_set_min_accelerator_micros(int64_t value); + public: + + // int64 min_cpu_micros = 23; + void clear_min_cpu_micros(); + int64_t min_cpu_micros() const; + void set_min_cpu_micros(int64_t value); + private: + int64_t _internal_min_cpu_micros() const; + void _internal_set_min_cpu_micros(int64_t value); + public: + + // bool account_displayed_op_only = 13; + void clear_account_displayed_op_only(); + bool account_displayed_op_only() const; + void set_account_displayed_op_only(bool value); + private: + bool _internal_account_displayed_op_only() const; + void _internal_set_account_displayed_op_only(bool value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.tfprof.OptionsProto) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField account_type_regexes_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField start_name_regexes_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField trim_name_regexes_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField show_name_regexes_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField hide_name_regexes_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField select_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr order_by_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr output_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr dump_to_file_; + int64_t max_depth_; + int64_t min_bytes_; + int64_t min_micros_; + int64_t min_params_; + int64_t min_float_ops_; + int64_t min_occurrence_; + int64_t step_; + int64_t min_peak_bytes_; + int64_t min_residual_bytes_; + int64_t min_output_bytes_; + int64_t min_accelerator_micros_; + int64_t min_cpu_micros_; + bool account_displayed_op_only_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprofiler_2ftfprof_5foptions_2eproto; +}; +// ------------------------------------------------------------------- + +class AdvisorOptionsProto_CheckersEntry_DoNotUse : public ::PROTOBUF_NAMESPACE_ID::internal::MapEntry { +public: + typedef ::PROTOBUF_NAMESPACE_ID::internal::MapEntry SuperType; + AdvisorOptionsProto_CheckersEntry_DoNotUse(); + explicit PROTOBUF_CONSTEXPR AdvisorOptionsProto_CheckersEntry_DoNotUse( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + explicit AdvisorOptionsProto_CheckersEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena); + void MergeFrom(const AdvisorOptionsProto_CheckersEntry_DoNotUse& other); + static const AdvisorOptionsProto_CheckersEntry_DoNotUse* internal_default_instance() { return reinterpret_cast(&_AdvisorOptionsProto_CheckersEntry_DoNotUse_default_instance_); } + static bool ValidateKey(std::string* s) { + return ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(s->data(), static_cast(s->size()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, "tensorflow.tfprof.AdvisorOptionsProto.CheckersEntry.key"); + } + static bool ValidateValue(void*) { return true; } + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + friend struct ::TableStruct_tensorflow_2fcore_2fprofiler_2ftfprof_5foptions_2eproto; +}; + +// ------------------------------------------------------------------- + +class AdvisorOptionsProto_CheckerOption_OptionsEntry_DoNotUse : public ::PROTOBUF_NAMESPACE_ID::internal::MapEntry { +public: + typedef ::PROTOBUF_NAMESPACE_ID::internal::MapEntry SuperType; + AdvisorOptionsProto_CheckerOption_OptionsEntry_DoNotUse(); + explicit PROTOBUF_CONSTEXPR AdvisorOptionsProto_CheckerOption_OptionsEntry_DoNotUse( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + explicit AdvisorOptionsProto_CheckerOption_OptionsEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena); + void MergeFrom(const AdvisorOptionsProto_CheckerOption_OptionsEntry_DoNotUse& other); + static const AdvisorOptionsProto_CheckerOption_OptionsEntry_DoNotUse* internal_default_instance() { return reinterpret_cast(&_AdvisorOptionsProto_CheckerOption_OptionsEntry_DoNotUse_default_instance_); } + static bool ValidateKey(std::string* s) { + return ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(s->data(), static_cast(s->size()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, "tensorflow.tfprof.AdvisorOptionsProto.CheckerOption.OptionsEntry.key"); + } + static bool ValidateValue(std::string* s) { + return ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(s->data(), static_cast(s->size()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, "tensorflow.tfprof.AdvisorOptionsProto.CheckerOption.OptionsEntry.value"); + } + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + friend struct ::TableStruct_tensorflow_2fcore_2fprofiler_2ftfprof_5foptions_2eproto; +}; + +// ------------------------------------------------------------------- + +class AdvisorOptionsProto_CheckerOption final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.tfprof.AdvisorOptionsProto.CheckerOption) */ { + public: + inline AdvisorOptionsProto_CheckerOption() : AdvisorOptionsProto_CheckerOption(nullptr) {} + ~AdvisorOptionsProto_CheckerOption() override; + explicit PROTOBUF_CONSTEXPR AdvisorOptionsProto_CheckerOption(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + AdvisorOptionsProto_CheckerOption(const AdvisorOptionsProto_CheckerOption& from); + AdvisorOptionsProto_CheckerOption(AdvisorOptionsProto_CheckerOption&& from) noexcept + : AdvisorOptionsProto_CheckerOption() { + *this = ::std::move(from); + } + + inline AdvisorOptionsProto_CheckerOption& operator=(const AdvisorOptionsProto_CheckerOption& from) { + CopyFrom(from); + return *this; + } + inline AdvisorOptionsProto_CheckerOption& operator=(AdvisorOptionsProto_CheckerOption&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const AdvisorOptionsProto_CheckerOption& default_instance() { + return *internal_default_instance(); + } + static inline const AdvisorOptionsProto_CheckerOption* internal_default_instance() { + return reinterpret_cast( + &_AdvisorOptionsProto_CheckerOption_default_instance_); + } + static constexpr int kIndexInFileMessages = + 3; + + friend void swap(AdvisorOptionsProto_CheckerOption& a, AdvisorOptionsProto_CheckerOption& b) { + a.Swap(&b); + } + inline void Swap(AdvisorOptionsProto_CheckerOption* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(AdvisorOptionsProto_CheckerOption* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + AdvisorOptionsProto_CheckerOption* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const AdvisorOptionsProto_CheckerOption& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const AdvisorOptionsProto_CheckerOption& from) { + AdvisorOptionsProto_CheckerOption::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(AdvisorOptionsProto_CheckerOption* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.tfprof.AdvisorOptionsProto.CheckerOption"; + } + protected: + explicit AdvisorOptionsProto_CheckerOption(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + + // accessors ------------------------------------------------------- + + enum : int { + kOptionsFieldNumber = 1, + }; + // map options = 1; + int options_size() const; + private: + int _internal_options_size() const; + public: + void clear_options(); + private: + const ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >& + _internal_options() const; + ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >* + _internal_mutable_options(); + public: + const ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >& + options() const; + ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >* + mutable_options(); + + // @@protoc_insertion_point(class_scope:tensorflow.tfprof.AdvisorOptionsProto.CheckerOption) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::MapField< + AdvisorOptionsProto_CheckerOption_OptionsEntry_DoNotUse, + std::string, std::string, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING> options_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprofiler_2ftfprof_5foptions_2eproto; +}; +// ------------------------------------------------------------------- + +class AdvisorOptionsProto final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.tfprof.AdvisorOptionsProto) */ { + public: + inline AdvisorOptionsProto() : AdvisorOptionsProto(nullptr) {} + ~AdvisorOptionsProto() override; + explicit PROTOBUF_CONSTEXPR AdvisorOptionsProto(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + AdvisorOptionsProto(const AdvisorOptionsProto& from); + AdvisorOptionsProto(AdvisorOptionsProto&& from) noexcept + : AdvisorOptionsProto() { + *this = ::std::move(from); + } + + inline AdvisorOptionsProto& operator=(const AdvisorOptionsProto& from) { + CopyFrom(from); + return *this; + } + inline AdvisorOptionsProto& operator=(AdvisorOptionsProto&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const AdvisorOptionsProto& default_instance() { + return *internal_default_instance(); + } + static inline const AdvisorOptionsProto* internal_default_instance() { + return reinterpret_cast( + &_AdvisorOptionsProto_default_instance_); + } + static constexpr int kIndexInFileMessages = + 4; + + friend void swap(AdvisorOptionsProto& a, AdvisorOptionsProto& b) { + a.Swap(&b); + } + inline void Swap(AdvisorOptionsProto* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(AdvisorOptionsProto* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + AdvisorOptionsProto* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const AdvisorOptionsProto& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const AdvisorOptionsProto& from) { + AdvisorOptionsProto::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(AdvisorOptionsProto* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.tfprof.AdvisorOptionsProto"; + } + protected: + explicit AdvisorOptionsProto(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + typedef AdvisorOptionsProto_CheckerOption CheckerOption; + + // accessors ------------------------------------------------------- + + enum : int { + kCheckersFieldNumber = 1, + }; + // map checkers = 1; + int checkers_size() const; + private: + int _internal_checkers_size() const; + public: + void clear_checkers(); + private: + const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::tfprof::AdvisorOptionsProto_CheckerOption >& + _internal_checkers() const; + ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::tfprof::AdvisorOptionsProto_CheckerOption >* + _internal_mutable_checkers(); + public: + const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::tfprof::AdvisorOptionsProto_CheckerOption >& + checkers() const; + ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::tfprof::AdvisorOptionsProto_CheckerOption >* + mutable_checkers(); + + // @@protoc_insertion_point(class_scope:tensorflow.tfprof.AdvisorOptionsProto) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::MapField< + AdvisorOptionsProto_CheckersEntry_DoNotUse, + std::string, ::tensorflow::tfprof::AdvisorOptionsProto_CheckerOption, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_MESSAGE> checkers_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprofiler_2ftfprof_5foptions_2eproto; +}; +// =================================================================== + + +// =================================================================== + +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// OptionsProto + +// int64 max_depth = 1; +inline void OptionsProto::clear_max_depth() { + _impl_.max_depth_ = int64_t{0}; +} +inline int64_t OptionsProto::_internal_max_depth() const { + return _impl_.max_depth_; +} +inline int64_t OptionsProto::max_depth() const { + // @@protoc_insertion_point(field_get:tensorflow.tfprof.OptionsProto.max_depth) + return _internal_max_depth(); +} +inline void OptionsProto::_internal_set_max_depth(int64_t value) { + + _impl_.max_depth_ = value; +} +inline void OptionsProto::set_max_depth(int64_t value) { + _internal_set_max_depth(value); + // @@protoc_insertion_point(field_set:tensorflow.tfprof.OptionsProto.max_depth) +} + +// int64 min_bytes = 2; +inline void OptionsProto::clear_min_bytes() { + _impl_.min_bytes_ = int64_t{0}; +} +inline int64_t OptionsProto::_internal_min_bytes() const { + return _impl_.min_bytes_; +} +inline int64_t OptionsProto::min_bytes() const { + // @@protoc_insertion_point(field_get:tensorflow.tfprof.OptionsProto.min_bytes) + return _internal_min_bytes(); +} +inline void OptionsProto::_internal_set_min_bytes(int64_t value) { + + _impl_.min_bytes_ = value; +} +inline void OptionsProto::set_min_bytes(int64_t value) { + _internal_set_min_bytes(value); + // @@protoc_insertion_point(field_set:tensorflow.tfprof.OptionsProto.min_bytes) +} + +// int64 min_peak_bytes = 19; +inline void OptionsProto::clear_min_peak_bytes() { + _impl_.min_peak_bytes_ = int64_t{0}; +} +inline int64_t OptionsProto::_internal_min_peak_bytes() const { + return _impl_.min_peak_bytes_; +} +inline int64_t OptionsProto::min_peak_bytes() const { + // @@protoc_insertion_point(field_get:tensorflow.tfprof.OptionsProto.min_peak_bytes) + return _internal_min_peak_bytes(); +} +inline void OptionsProto::_internal_set_min_peak_bytes(int64_t value) { + + _impl_.min_peak_bytes_ = value; +} +inline void OptionsProto::set_min_peak_bytes(int64_t value) { + _internal_set_min_peak_bytes(value); + // @@protoc_insertion_point(field_set:tensorflow.tfprof.OptionsProto.min_peak_bytes) +} + +// int64 min_residual_bytes = 20; +inline void OptionsProto::clear_min_residual_bytes() { + _impl_.min_residual_bytes_ = int64_t{0}; +} +inline int64_t OptionsProto::_internal_min_residual_bytes() const { + return _impl_.min_residual_bytes_; +} +inline int64_t OptionsProto::min_residual_bytes() const { + // @@protoc_insertion_point(field_get:tensorflow.tfprof.OptionsProto.min_residual_bytes) + return _internal_min_residual_bytes(); +} +inline void OptionsProto::_internal_set_min_residual_bytes(int64_t value) { + + _impl_.min_residual_bytes_ = value; +} +inline void OptionsProto::set_min_residual_bytes(int64_t value) { + _internal_set_min_residual_bytes(value); + // @@protoc_insertion_point(field_set:tensorflow.tfprof.OptionsProto.min_residual_bytes) +} + +// int64 min_output_bytes = 21; +inline void OptionsProto::clear_min_output_bytes() { + _impl_.min_output_bytes_ = int64_t{0}; +} +inline int64_t OptionsProto::_internal_min_output_bytes() const { + return _impl_.min_output_bytes_; +} +inline int64_t OptionsProto::min_output_bytes() const { + // @@protoc_insertion_point(field_get:tensorflow.tfprof.OptionsProto.min_output_bytes) + return _internal_min_output_bytes(); +} +inline void OptionsProto::_internal_set_min_output_bytes(int64_t value) { + + _impl_.min_output_bytes_ = value; +} +inline void OptionsProto::set_min_output_bytes(int64_t value) { + _internal_set_min_output_bytes(value); + // @@protoc_insertion_point(field_set:tensorflow.tfprof.OptionsProto.min_output_bytes) +} + +// int64 min_micros = 3; +inline void OptionsProto::clear_min_micros() { + _impl_.min_micros_ = int64_t{0}; +} +inline int64_t OptionsProto::_internal_min_micros() const { + return _impl_.min_micros_; +} +inline int64_t OptionsProto::min_micros() const { + // @@protoc_insertion_point(field_get:tensorflow.tfprof.OptionsProto.min_micros) + return _internal_min_micros(); +} +inline void OptionsProto::_internal_set_min_micros(int64_t value) { + + _impl_.min_micros_ = value; +} +inline void OptionsProto::set_min_micros(int64_t value) { + _internal_set_min_micros(value); + // @@protoc_insertion_point(field_set:tensorflow.tfprof.OptionsProto.min_micros) +} + +// int64 min_accelerator_micros = 22; +inline void OptionsProto::clear_min_accelerator_micros() { + _impl_.min_accelerator_micros_ = int64_t{0}; +} +inline int64_t OptionsProto::_internal_min_accelerator_micros() const { + return _impl_.min_accelerator_micros_; +} +inline int64_t OptionsProto::min_accelerator_micros() const { + // @@protoc_insertion_point(field_get:tensorflow.tfprof.OptionsProto.min_accelerator_micros) + return _internal_min_accelerator_micros(); +} +inline void OptionsProto::_internal_set_min_accelerator_micros(int64_t value) { + + _impl_.min_accelerator_micros_ = value; +} +inline void OptionsProto::set_min_accelerator_micros(int64_t value) { + _internal_set_min_accelerator_micros(value); + // @@protoc_insertion_point(field_set:tensorflow.tfprof.OptionsProto.min_accelerator_micros) +} + +// int64 min_cpu_micros = 23; +inline void OptionsProto::clear_min_cpu_micros() { + _impl_.min_cpu_micros_ = int64_t{0}; +} +inline int64_t OptionsProto::_internal_min_cpu_micros() const { + return _impl_.min_cpu_micros_; +} +inline int64_t OptionsProto::min_cpu_micros() const { + // @@protoc_insertion_point(field_get:tensorflow.tfprof.OptionsProto.min_cpu_micros) + return _internal_min_cpu_micros(); +} +inline void OptionsProto::_internal_set_min_cpu_micros(int64_t value) { + + _impl_.min_cpu_micros_ = value; +} +inline void OptionsProto::set_min_cpu_micros(int64_t value) { + _internal_set_min_cpu_micros(value); + // @@protoc_insertion_point(field_set:tensorflow.tfprof.OptionsProto.min_cpu_micros) +} + +// int64 min_params = 4; +inline void OptionsProto::clear_min_params() { + _impl_.min_params_ = int64_t{0}; +} +inline int64_t OptionsProto::_internal_min_params() const { + return _impl_.min_params_; +} +inline int64_t OptionsProto::min_params() const { + // @@protoc_insertion_point(field_get:tensorflow.tfprof.OptionsProto.min_params) + return _internal_min_params(); +} +inline void OptionsProto::_internal_set_min_params(int64_t value) { + + _impl_.min_params_ = value; +} +inline void OptionsProto::set_min_params(int64_t value) { + _internal_set_min_params(value); + // @@protoc_insertion_point(field_set:tensorflow.tfprof.OptionsProto.min_params) +} + +// int64 min_float_ops = 5; +inline void OptionsProto::clear_min_float_ops() { + _impl_.min_float_ops_ = int64_t{0}; +} +inline int64_t OptionsProto::_internal_min_float_ops() const { + return _impl_.min_float_ops_; +} +inline int64_t OptionsProto::min_float_ops() const { + // @@protoc_insertion_point(field_get:tensorflow.tfprof.OptionsProto.min_float_ops) + return _internal_min_float_ops(); +} +inline void OptionsProto::_internal_set_min_float_ops(int64_t value) { + + _impl_.min_float_ops_ = value; +} +inline void OptionsProto::set_min_float_ops(int64_t value) { + _internal_set_min_float_ops(value); + // @@protoc_insertion_point(field_set:tensorflow.tfprof.OptionsProto.min_float_ops) +} + +// int64 min_occurrence = 17; +inline void OptionsProto::clear_min_occurrence() { + _impl_.min_occurrence_ = int64_t{0}; +} +inline int64_t OptionsProto::_internal_min_occurrence() const { + return _impl_.min_occurrence_; +} +inline int64_t OptionsProto::min_occurrence() const { + // @@protoc_insertion_point(field_get:tensorflow.tfprof.OptionsProto.min_occurrence) + return _internal_min_occurrence(); +} +inline void OptionsProto::_internal_set_min_occurrence(int64_t value) { + + _impl_.min_occurrence_ = value; +} +inline void OptionsProto::set_min_occurrence(int64_t value) { + _internal_set_min_occurrence(value); + // @@protoc_insertion_point(field_set:tensorflow.tfprof.OptionsProto.min_occurrence) +} + +// int64 step = 18; +inline void OptionsProto::clear_step() { + _impl_.step_ = int64_t{0}; +} +inline int64_t OptionsProto::_internal_step() const { + return _impl_.step_; +} +inline int64_t OptionsProto::step() const { + // @@protoc_insertion_point(field_get:tensorflow.tfprof.OptionsProto.step) + return _internal_step(); +} +inline void OptionsProto::_internal_set_step(int64_t value) { + + _impl_.step_ = value; +} +inline void OptionsProto::set_step(int64_t value) { + _internal_set_step(value); + // @@protoc_insertion_point(field_set:tensorflow.tfprof.OptionsProto.step) +} + +// string order_by = 7; +inline void OptionsProto::clear_order_by() { + _impl_.order_by_.ClearToEmpty(); +} +inline const std::string& OptionsProto::order_by() const { + // @@protoc_insertion_point(field_get:tensorflow.tfprof.OptionsProto.order_by) + return _internal_order_by(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void OptionsProto::set_order_by(ArgT0&& arg0, ArgT... args) { + + _impl_.order_by_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.tfprof.OptionsProto.order_by) +} +inline std::string* OptionsProto::mutable_order_by() { + std::string* _s = _internal_mutable_order_by(); + // @@protoc_insertion_point(field_mutable:tensorflow.tfprof.OptionsProto.order_by) + return _s; +} +inline const std::string& OptionsProto::_internal_order_by() const { + return _impl_.order_by_.Get(); +} +inline void OptionsProto::_internal_set_order_by(const std::string& value) { + + _impl_.order_by_.Set(value, GetArenaForAllocation()); +} +inline std::string* OptionsProto::_internal_mutable_order_by() { + + return _impl_.order_by_.Mutable(GetArenaForAllocation()); +} +inline std::string* OptionsProto::release_order_by() { + // @@protoc_insertion_point(field_release:tensorflow.tfprof.OptionsProto.order_by) + return _impl_.order_by_.Release(); +} +inline void OptionsProto::set_allocated_order_by(std::string* order_by) { + if (order_by != nullptr) { + + } else { + + } + _impl_.order_by_.SetAllocated(order_by, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.order_by_.IsDefault()) { + _impl_.order_by_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.tfprof.OptionsProto.order_by) +} + +// repeated string account_type_regexes = 8; +inline int OptionsProto::_internal_account_type_regexes_size() const { + return _impl_.account_type_regexes_.size(); +} +inline int OptionsProto::account_type_regexes_size() const { + return _internal_account_type_regexes_size(); +} +inline void OptionsProto::clear_account_type_regexes() { + _impl_.account_type_regexes_.Clear(); +} +inline std::string* OptionsProto::add_account_type_regexes() { + std::string* _s = _internal_add_account_type_regexes(); + // @@protoc_insertion_point(field_add_mutable:tensorflow.tfprof.OptionsProto.account_type_regexes) + return _s; +} +inline const std::string& OptionsProto::_internal_account_type_regexes(int index) const { + return _impl_.account_type_regexes_.Get(index); +} +inline const std::string& OptionsProto::account_type_regexes(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.tfprof.OptionsProto.account_type_regexes) + return _internal_account_type_regexes(index); +} +inline std::string* OptionsProto::mutable_account_type_regexes(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.tfprof.OptionsProto.account_type_regexes) + return _impl_.account_type_regexes_.Mutable(index); +} +inline void OptionsProto::set_account_type_regexes(int index, const std::string& value) { + _impl_.account_type_regexes_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set:tensorflow.tfprof.OptionsProto.account_type_regexes) +} +inline void OptionsProto::set_account_type_regexes(int index, std::string&& value) { + _impl_.account_type_regexes_.Mutable(index)->assign(std::move(value)); + // @@protoc_insertion_point(field_set:tensorflow.tfprof.OptionsProto.account_type_regexes) +} +inline void OptionsProto::set_account_type_regexes(int index, const char* value) { + GOOGLE_DCHECK(value != nullptr); + _impl_.account_type_regexes_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set_char:tensorflow.tfprof.OptionsProto.account_type_regexes) +} +inline void OptionsProto::set_account_type_regexes(int index, const char* value, size_t size) { + _impl_.account_type_regexes_.Mutable(index)->assign( + reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:tensorflow.tfprof.OptionsProto.account_type_regexes) +} +inline std::string* OptionsProto::_internal_add_account_type_regexes() { + return _impl_.account_type_regexes_.Add(); +} +inline void OptionsProto::add_account_type_regexes(const std::string& value) { + _impl_.account_type_regexes_.Add()->assign(value); + // @@protoc_insertion_point(field_add:tensorflow.tfprof.OptionsProto.account_type_regexes) +} +inline void OptionsProto::add_account_type_regexes(std::string&& value) { + _impl_.account_type_regexes_.Add(std::move(value)); + // @@protoc_insertion_point(field_add:tensorflow.tfprof.OptionsProto.account_type_regexes) +} +inline void OptionsProto::add_account_type_regexes(const char* value) { + GOOGLE_DCHECK(value != nullptr); + _impl_.account_type_regexes_.Add()->assign(value); + // @@protoc_insertion_point(field_add_char:tensorflow.tfprof.OptionsProto.account_type_regexes) +} +inline void OptionsProto::add_account_type_regexes(const char* value, size_t size) { + _impl_.account_type_regexes_.Add()->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_add_pointer:tensorflow.tfprof.OptionsProto.account_type_regexes) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& +OptionsProto::account_type_regexes() const { + // @@protoc_insertion_point(field_list:tensorflow.tfprof.OptionsProto.account_type_regexes) + return _impl_.account_type_regexes_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* +OptionsProto::mutable_account_type_regexes() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.tfprof.OptionsProto.account_type_regexes) + return &_impl_.account_type_regexes_; +} + +// repeated string start_name_regexes = 9; +inline int OptionsProto::_internal_start_name_regexes_size() const { + return _impl_.start_name_regexes_.size(); +} +inline int OptionsProto::start_name_regexes_size() const { + return _internal_start_name_regexes_size(); +} +inline void OptionsProto::clear_start_name_regexes() { + _impl_.start_name_regexes_.Clear(); +} +inline std::string* OptionsProto::add_start_name_regexes() { + std::string* _s = _internal_add_start_name_regexes(); + // @@protoc_insertion_point(field_add_mutable:tensorflow.tfprof.OptionsProto.start_name_regexes) + return _s; +} +inline const std::string& OptionsProto::_internal_start_name_regexes(int index) const { + return _impl_.start_name_regexes_.Get(index); +} +inline const std::string& OptionsProto::start_name_regexes(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.tfprof.OptionsProto.start_name_regexes) + return _internal_start_name_regexes(index); +} +inline std::string* OptionsProto::mutable_start_name_regexes(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.tfprof.OptionsProto.start_name_regexes) + return _impl_.start_name_regexes_.Mutable(index); +} +inline void OptionsProto::set_start_name_regexes(int index, const std::string& value) { + _impl_.start_name_regexes_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set:tensorflow.tfprof.OptionsProto.start_name_regexes) +} +inline void OptionsProto::set_start_name_regexes(int index, std::string&& value) { + _impl_.start_name_regexes_.Mutable(index)->assign(std::move(value)); + // @@protoc_insertion_point(field_set:tensorflow.tfprof.OptionsProto.start_name_regexes) +} +inline void OptionsProto::set_start_name_regexes(int index, const char* value) { + GOOGLE_DCHECK(value != nullptr); + _impl_.start_name_regexes_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set_char:tensorflow.tfprof.OptionsProto.start_name_regexes) +} +inline void OptionsProto::set_start_name_regexes(int index, const char* value, size_t size) { + _impl_.start_name_regexes_.Mutable(index)->assign( + reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:tensorflow.tfprof.OptionsProto.start_name_regexes) +} +inline std::string* OptionsProto::_internal_add_start_name_regexes() { + return _impl_.start_name_regexes_.Add(); +} +inline void OptionsProto::add_start_name_regexes(const std::string& value) { + _impl_.start_name_regexes_.Add()->assign(value); + // @@protoc_insertion_point(field_add:tensorflow.tfprof.OptionsProto.start_name_regexes) +} +inline void OptionsProto::add_start_name_regexes(std::string&& value) { + _impl_.start_name_regexes_.Add(std::move(value)); + // @@protoc_insertion_point(field_add:tensorflow.tfprof.OptionsProto.start_name_regexes) +} +inline void OptionsProto::add_start_name_regexes(const char* value) { + GOOGLE_DCHECK(value != nullptr); + _impl_.start_name_regexes_.Add()->assign(value); + // @@protoc_insertion_point(field_add_char:tensorflow.tfprof.OptionsProto.start_name_regexes) +} +inline void OptionsProto::add_start_name_regexes(const char* value, size_t size) { + _impl_.start_name_regexes_.Add()->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_add_pointer:tensorflow.tfprof.OptionsProto.start_name_regexes) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& +OptionsProto::start_name_regexes() const { + // @@protoc_insertion_point(field_list:tensorflow.tfprof.OptionsProto.start_name_regexes) + return _impl_.start_name_regexes_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* +OptionsProto::mutable_start_name_regexes() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.tfprof.OptionsProto.start_name_regexes) + return &_impl_.start_name_regexes_; +} + +// repeated string trim_name_regexes = 10; +inline int OptionsProto::_internal_trim_name_regexes_size() const { + return _impl_.trim_name_regexes_.size(); +} +inline int OptionsProto::trim_name_regexes_size() const { + return _internal_trim_name_regexes_size(); +} +inline void OptionsProto::clear_trim_name_regexes() { + _impl_.trim_name_regexes_.Clear(); +} +inline std::string* OptionsProto::add_trim_name_regexes() { + std::string* _s = _internal_add_trim_name_regexes(); + // @@protoc_insertion_point(field_add_mutable:tensorflow.tfprof.OptionsProto.trim_name_regexes) + return _s; +} +inline const std::string& OptionsProto::_internal_trim_name_regexes(int index) const { + return _impl_.trim_name_regexes_.Get(index); +} +inline const std::string& OptionsProto::trim_name_regexes(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.tfprof.OptionsProto.trim_name_regexes) + return _internal_trim_name_regexes(index); +} +inline std::string* OptionsProto::mutable_trim_name_regexes(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.tfprof.OptionsProto.trim_name_regexes) + return _impl_.trim_name_regexes_.Mutable(index); +} +inline void OptionsProto::set_trim_name_regexes(int index, const std::string& value) { + _impl_.trim_name_regexes_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set:tensorflow.tfprof.OptionsProto.trim_name_regexes) +} +inline void OptionsProto::set_trim_name_regexes(int index, std::string&& value) { + _impl_.trim_name_regexes_.Mutable(index)->assign(std::move(value)); + // @@protoc_insertion_point(field_set:tensorflow.tfprof.OptionsProto.trim_name_regexes) +} +inline void OptionsProto::set_trim_name_regexes(int index, const char* value) { + GOOGLE_DCHECK(value != nullptr); + _impl_.trim_name_regexes_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set_char:tensorflow.tfprof.OptionsProto.trim_name_regexes) +} +inline void OptionsProto::set_trim_name_regexes(int index, const char* value, size_t size) { + _impl_.trim_name_regexes_.Mutable(index)->assign( + reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:tensorflow.tfprof.OptionsProto.trim_name_regexes) +} +inline std::string* OptionsProto::_internal_add_trim_name_regexes() { + return _impl_.trim_name_regexes_.Add(); +} +inline void OptionsProto::add_trim_name_regexes(const std::string& value) { + _impl_.trim_name_regexes_.Add()->assign(value); + // @@protoc_insertion_point(field_add:tensorflow.tfprof.OptionsProto.trim_name_regexes) +} +inline void OptionsProto::add_trim_name_regexes(std::string&& value) { + _impl_.trim_name_regexes_.Add(std::move(value)); + // @@protoc_insertion_point(field_add:tensorflow.tfprof.OptionsProto.trim_name_regexes) +} +inline void OptionsProto::add_trim_name_regexes(const char* value) { + GOOGLE_DCHECK(value != nullptr); + _impl_.trim_name_regexes_.Add()->assign(value); + // @@protoc_insertion_point(field_add_char:tensorflow.tfprof.OptionsProto.trim_name_regexes) +} +inline void OptionsProto::add_trim_name_regexes(const char* value, size_t size) { + _impl_.trim_name_regexes_.Add()->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_add_pointer:tensorflow.tfprof.OptionsProto.trim_name_regexes) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& +OptionsProto::trim_name_regexes() const { + // @@protoc_insertion_point(field_list:tensorflow.tfprof.OptionsProto.trim_name_regexes) + return _impl_.trim_name_regexes_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* +OptionsProto::mutable_trim_name_regexes() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.tfprof.OptionsProto.trim_name_regexes) + return &_impl_.trim_name_regexes_; +} + +// repeated string show_name_regexes = 11; +inline int OptionsProto::_internal_show_name_regexes_size() const { + return _impl_.show_name_regexes_.size(); +} +inline int OptionsProto::show_name_regexes_size() const { + return _internal_show_name_regexes_size(); +} +inline void OptionsProto::clear_show_name_regexes() { + _impl_.show_name_regexes_.Clear(); +} +inline std::string* OptionsProto::add_show_name_regexes() { + std::string* _s = _internal_add_show_name_regexes(); + // @@protoc_insertion_point(field_add_mutable:tensorflow.tfprof.OptionsProto.show_name_regexes) + return _s; +} +inline const std::string& OptionsProto::_internal_show_name_regexes(int index) const { + return _impl_.show_name_regexes_.Get(index); +} +inline const std::string& OptionsProto::show_name_regexes(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.tfprof.OptionsProto.show_name_regexes) + return _internal_show_name_regexes(index); +} +inline std::string* OptionsProto::mutable_show_name_regexes(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.tfprof.OptionsProto.show_name_regexes) + return _impl_.show_name_regexes_.Mutable(index); +} +inline void OptionsProto::set_show_name_regexes(int index, const std::string& value) { + _impl_.show_name_regexes_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set:tensorflow.tfprof.OptionsProto.show_name_regexes) +} +inline void OptionsProto::set_show_name_regexes(int index, std::string&& value) { + _impl_.show_name_regexes_.Mutable(index)->assign(std::move(value)); + // @@protoc_insertion_point(field_set:tensorflow.tfprof.OptionsProto.show_name_regexes) +} +inline void OptionsProto::set_show_name_regexes(int index, const char* value) { + GOOGLE_DCHECK(value != nullptr); + _impl_.show_name_regexes_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set_char:tensorflow.tfprof.OptionsProto.show_name_regexes) +} +inline void OptionsProto::set_show_name_regexes(int index, const char* value, size_t size) { + _impl_.show_name_regexes_.Mutable(index)->assign( + reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:tensorflow.tfprof.OptionsProto.show_name_regexes) +} +inline std::string* OptionsProto::_internal_add_show_name_regexes() { + return _impl_.show_name_regexes_.Add(); +} +inline void OptionsProto::add_show_name_regexes(const std::string& value) { + _impl_.show_name_regexes_.Add()->assign(value); + // @@protoc_insertion_point(field_add:tensorflow.tfprof.OptionsProto.show_name_regexes) +} +inline void OptionsProto::add_show_name_regexes(std::string&& value) { + _impl_.show_name_regexes_.Add(std::move(value)); + // @@protoc_insertion_point(field_add:tensorflow.tfprof.OptionsProto.show_name_regexes) +} +inline void OptionsProto::add_show_name_regexes(const char* value) { + GOOGLE_DCHECK(value != nullptr); + _impl_.show_name_regexes_.Add()->assign(value); + // @@protoc_insertion_point(field_add_char:tensorflow.tfprof.OptionsProto.show_name_regexes) +} +inline void OptionsProto::add_show_name_regexes(const char* value, size_t size) { + _impl_.show_name_regexes_.Add()->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_add_pointer:tensorflow.tfprof.OptionsProto.show_name_regexes) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& +OptionsProto::show_name_regexes() const { + // @@protoc_insertion_point(field_list:tensorflow.tfprof.OptionsProto.show_name_regexes) + return _impl_.show_name_regexes_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* +OptionsProto::mutable_show_name_regexes() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.tfprof.OptionsProto.show_name_regexes) + return &_impl_.show_name_regexes_; +} + +// repeated string hide_name_regexes = 12; +inline int OptionsProto::_internal_hide_name_regexes_size() const { + return _impl_.hide_name_regexes_.size(); +} +inline int OptionsProto::hide_name_regexes_size() const { + return _internal_hide_name_regexes_size(); +} +inline void OptionsProto::clear_hide_name_regexes() { + _impl_.hide_name_regexes_.Clear(); +} +inline std::string* OptionsProto::add_hide_name_regexes() { + std::string* _s = _internal_add_hide_name_regexes(); + // @@protoc_insertion_point(field_add_mutable:tensorflow.tfprof.OptionsProto.hide_name_regexes) + return _s; +} +inline const std::string& OptionsProto::_internal_hide_name_regexes(int index) const { + return _impl_.hide_name_regexes_.Get(index); +} +inline const std::string& OptionsProto::hide_name_regexes(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.tfprof.OptionsProto.hide_name_regexes) + return _internal_hide_name_regexes(index); +} +inline std::string* OptionsProto::mutable_hide_name_regexes(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.tfprof.OptionsProto.hide_name_regexes) + return _impl_.hide_name_regexes_.Mutable(index); +} +inline void OptionsProto::set_hide_name_regexes(int index, const std::string& value) { + _impl_.hide_name_regexes_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set:tensorflow.tfprof.OptionsProto.hide_name_regexes) +} +inline void OptionsProto::set_hide_name_regexes(int index, std::string&& value) { + _impl_.hide_name_regexes_.Mutable(index)->assign(std::move(value)); + // @@protoc_insertion_point(field_set:tensorflow.tfprof.OptionsProto.hide_name_regexes) +} +inline void OptionsProto::set_hide_name_regexes(int index, const char* value) { + GOOGLE_DCHECK(value != nullptr); + _impl_.hide_name_regexes_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set_char:tensorflow.tfprof.OptionsProto.hide_name_regexes) +} +inline void OptionsProto::set_hide_name_regexes(int index, const char* value, size_t size) { + _impl_.hide_name_regexes_.Mutable(index)->assign( + reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:tensorflow.tfprof.OptionsProto.hide_name_regexes) +} +inline std::string* OptionsProto::_internal_add_hide_name_regexes() { + return _impl_.hide_name_regexes_.Add(); +} +inline void OptionsProto::add_hide_name_regexes(const std::string& value) { + _impl_.hide_name_regexes_.Add()->assign(value); + // @@protoc_insertion_point(field_add:tensorflow.tfprof.OptionsProto.hide_name_regexes) +} +inline void OptionsProto::add_hide_name_regexes(std::string&& value) { + _impl_.hide_name_regexes_.Add(std::move(value)); + // @@protoc_insertion_point(field_add:tensorflow.tfprof.OptionsProto.hide_name_regexes) +} +inline void OptionsProto::add_hide_name_regexes(const char* value) { + GOOGLE_DCHECK(value != nullptr); + _impl_.hide_name_regexes_.Add()->assign(value); + // @@protoc_insertion_point(field_add_char:tensorflow.tfprof.OptionsProto.hide_name_regexes) +} +inline void OptionsProto::add_hide_name_regexes(const char* value, size_t size) { + _impl_.hide_name_regexes_.Add()->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_add_pointer:tensorflow.tfprof.OptionsProto.hide_name_regexes) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& +OptionsProto::hide_name_regexes() const { + // @@protoc_insertion_point(field_list:tensorflow.tfprof.OptionsProto.hide_name_regexes) + return _impl_.hide_name_regexes_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* +OptionsProto::mutable_hide_name_regexes() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.tfprof.OptionsProto.hide_name_regexes) + return &_impl_.hide_name_regexes_; +} + +// bool account_displayed_op_only = 13; +inline void OptionsProto::clear_account_displayed_op_only() { + _impl_.account_displayed_op_only_ = false; +} +inline bool OptionsProto::_internal_account_displayed_op_only() const { + return _impl_.account_displayed_op_only_; +} +inline bool OptionsProto::account_displayed_op_only() const { + // @@protoc_insertion_point(field_get:tensorflow.tfprof.OptionsProto.account_displayed_op_only) + return _internal_account_displayed_op_only(); +} +inline void OptionsProto::_internal_set_account_displayed_op_only(bool value) { + + _impl_.account_displayed_op_only_ = value; +} +inline void OptionsProto::set_account_displayed_op_only(bool value) { + _internal_set_account_displayed_op_only(value); + // @@protoc_insertion_point(field_set:tensorflow.tfprof.OptionsProto.account_displayed_op_only) +} + +// repeated string select = 14; +inline int OptionsProto::_internal_select_size() const { + return _impl_.select_.size(); +} +inline int OptionsProto::select_size() const { + return _internal_select_size(); +} +inline void OptionsProto::clear_select() { + _impl_.select_.Clear(); +} +inline std::string* OptionsProto::add_select() { + std::string* _s = _internal_add_select(); + // @@protoc_insertion_point(field_add_mutable:tensorflow.tfprof.OptionsProto.select) + return _s; +} +inline const std::string& OptionsProto::_internal_select(int index) const { + return _impl_.select_.Get(index); +} +inline const std::string& OptionsProto::select(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.tfprof.OptionsProto.select) + return _internal_select(index); +} +inline std::string* OptionsProto::mutable_select(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.tfprof.OptionsProto.select) + return _impl_.select_.Mutable(index); +} +inline void OptionsProto::set_select(int index, const std::string& value) { + _impl_.select_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set:tensorflow.tfprof.OptionsProto.select) +} +inline void OptionsProto::set_select(int index, std::string&& value) { + _impl_.select_.Mutable(index)->assign(std::move(value)); + // @@protoc_insertion_point(field_set:tensorflow.tfprof.OptionsProto.select) +} +inline void OptionsProto::set_select(int index, const char* value) { + GOOGLE_DCHECK(value != nullptr); + _impl_.select_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set_char:tensorflow.tfprof.OptionsProto.select) +} +inline void OptionsProto::set_select(int index, const char* value, size_t size) { + _impl_.select_.Mutable(index)->assign( + reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:tensorflow.tfprof.OptionsProto.select) +} +inline std::string* OptionsProto::_internal_add_select() { + return _impl_.select_.Add(); +} +inline void OptionsProto::add_select(const std::string& value) { + _impl_.select_.Add()->assign(value); + // @@protoc_insertion_point(field_add:tensorflow.tfprof.OptionsProto.select) +} +inline void OptionsProto::add_select(std::string&& value) { + _impl_.select_.Add(std::move(value)); + // @@protoc_insertion_point(field_add:tensorflow.tfprof.OptionsProto.select) +} +inline void OptionsProto::add_select(const char* value) { + GOOGLE_DCHECK(value != nullptr); + _impl_.select_.Add()->assign(value); + // @@protoc_insertion_point(field_add_char:tensorflow.tfprof.OptionsProto.select) +} +inline void OptionsProto::add_select(const char* value, size_t size) { + _impl_.select_.Add()->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_add_pointer:tensorflow.tfprof.OptionsProto.select) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& +OptionsProto::select() const { + // @@protoc_insertion_point(field_list:tensorflow.tfprof.OptionsProto.select) + return _impl_.select_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* +OptionsProto::mutable_select() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.tfprof.OptionsProto.select) + return &_impl_.select_; +} + +// string output = 15; +inline void OptionsProto::clear_output() { + _impl_.output_.ClearToEmpty(); +} +inline const std::string& OptionsProto::output() const { + // @@protoc_insertion_point(field_get:tensorflow.tfprof.OptionsProto.output) + return _internal_output(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void OptionsProto::set_output(ArgT0&& arg0, ArgT... args) { + + _impl_.output_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.tfprof.OptionsProto.output) +} +inline std::string* OptionsProto::mutable_output() { + std::string* _s = _internal_mutable_output(); + // @@protoc_insertion_point(field_mutable:tensorflow.tfprof.OptionsProto.output) + return _s; +} +inline const std::string& OptionsProto::_internal_output() const { + return _impl_.output_.Get(); +} +inline void OptionsProto::_internal_set_output(const std::string& value) { + + _impl_.output_.Set(value, GetArenaForAllocation()); +} +inline std::string* OptionsProto::_internal_mutable_output() { + + return _impl_.output_.Mutable(GetArenaForAllocation()); +} +inline std::string* OptionsProto::release_output() { + // @@protoc_insertion_point(field_release:tensorflow.tfprof.OptionsProto.output) + return _impl_.output_.Release(); +} +inline void OptionsProto::set_allocated_output(std::string* output) { + if (output != nullptr) { + + } else { + + } + _impl_.output_.SetAllocated(output, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.output_.IsDefault()) { + _impl_.output_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.tfprof.OptionsProto.output) +} + +// string dump_to_file = 16; +inline void OptionsProto::clear_dump_to_file() { + _impl_.dump_to_file_.ClearToEmpty(); +} +inline const std::string& OptionsProto::dump_to_file() const { + // @@protoc_insertion_point(field_get:tensorflow.tfprof.OptionsProto.dump_to_file) + return _internal_dump_to_file(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void OptionsProto::set_dump_to_file(ArgT0&& arg0, ArgT... args) { + + _impl_.dump_to_file_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.tfprof.OptionsProto.dump_to_file) +} +inline std::string* OptionsProto::mutable_dump_to_file() { + std::string* _s = _internal_mutable_dump_to_file(); + // @@protoc_insertion_point(field_mutable:tensorflow.tfprof.OptionsProto.dump_to_file) + return _s; +} +inline const std::string& OptionsProto::_internal_dump_to_file() const { + return _impl_.dump_to_file_.Get(); +} +inline void OptionsProto::_internal_set_dump_to_file(const std::string& value) { + + _impl_.dump_to_file_.Set(value, GetArenaForAllocation()); +} +inline std::string* OptionsProto::_internal_mutable_dump_to_file() { + + return _impl_.dump_to_file_.Mutable(GetArenaForAllocation()); +} +inline std::string* OptionsProto::release_dump_to_file() { + // @@protoc_insertion_point(field_release:tensorflow.tfprof.OptionsProto.dump_to_file) + return _impl_.dump_to_file_.Release(); +} +inline void OptionsProto::set_allocated_dump_to_file(std::string* dump_to_file) { + if (dump_to_file != nullptr) { + + } else { + + } + _impl_.dump_to_file_.SetAllocated(dump_to_file, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.dump_to_file_.IsDefault()) { + _impl_.dump_to_file_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.tfprof.OptionsProto.dump_to_file) +} + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// AdvisorOptionsProto_CheckerOption + +// map options = 1; +inline int AdvisorOptionsProto_CheckerOption::_internal_options_size() const { + return _impl_.options_.size(); +} +inline int AdvisorOptionsProto_CheckerOption::options_size() const { + return _internal_options_size(); +} +inline void AdvisorOptionsProto_CheckerOption::clear_options() { + _impl_.options_.Clear(); +} +inline const ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >& +AdvisorOptionsProto_CheckerOption::_internal_options() const { + return _impl_.options_.GetMap(); +} +inline const ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >& +AdvisorOptionsProto_CheckerOption::options() const { + // @@protoc_insertion_point(field_map:tensorflow.tfprof.AdvisorOptionsProto.CheckerOption.options) + return _internal_options(); +} +inline ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >* +AdvisorOptionsProto_CheckerOption::_internal_mutable_options() { + return _impl_.options_.MutableMap(); +} +inline ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >* +AdvisorOptionsProto_CheckerOption::mutable_options() { + // @@protoc_insertion_point(field_mutable_map:tensorflow.tfprof.AdvisorOptionsProto.CheckerOption.options) + return _internal_mutable_options(); +} + +// ------------------------------------------------------------------- + +// AdvisorOptionsProto + +// map checkers = 1; +inline int AdvisorOptionsProto::_internal_checkers_size() const { + return _impl_.checkers_.size(); +} +inline int AdvisorOptionsProto::checkers_size() const { + return _internal_checkers_size(); +} +inline void AdvisorOptionsProto::clear_checkers() { + _impl_.checkers_.Clear(); +} +inline const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::tfprof::AdvisorOptionsProto_CheckerOption >& +AdvisorOptionsProto::_internal_checkers() const { + return _impl_.checkers_.GetMap(); +} +inline const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::tfprof::AdvisorOptionsProto_CheckerOption >& +AdvisorOptionsProto::checkers() const { + // @@protoc_insertion_point(field_map:tensorflow.tfprof.AdvisorOptionsProto.checkers) + return _internal_checkers(); +} +inline ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::tfprof::AdvisorOptionsProto_CheckerOption >* +AdvisorOptionsProto::_internal_mutable_checkers() { + return _impl_.checkers_.MutableMap(); +} +inline ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::tfprof::AdvisorOptionsProto_CheckerOption >* +AdvisorOptionsProto::mutable_checkers() { + // @@protoc_insertion_point(field_mutable_map:tensorflow.tfprof.AdvisorOptionsProto.checkers) + return _internal_mutable_checkers(); +} + +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + + +// @@protoc_insertion_point(namespace_scope) + +} // namespace tfprof +} // namespace tensorflow + +// @@protoc_insertion_point(global_scope) + +#include +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprofiler_2ftfprof_5foptions_2eproto diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/profiler/tfprof_output.pb.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/profiler/tfprof_output.pb.h new file mode 100644 index 0000000000000000000000000000000000000000..c764a8a73a317876c1a70be91189474b77a51fce --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/profiler/tfprof_output.pb.h @@ -0,0 +1,3152 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/profiler/tfprof_output.proto + +#ifndef GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprofiler_2ftfprof_5foutput_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprofiler_2ftfprof_5foutput_2eproto + +#include +#include + +#include +#if PROTOBUF_VERSION < 3021000 +#error This file was generated by a newer version of protoc which is +#error incompatible with your Protocol Buffer headers. Please update +#error your headers. +#endif +#if 3021009 < PROTOBUF_MIN_PROTOC_VERSION +#error This file was generated by an older version of protoc which is +#error incompatible with your Protocol Buffer headers. Please +#error regenerate this file with a newer version of protoc. +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include // IWYU pragma: export +#include // IWYU pragma: export +#include // IWYU pragma: export +#include +#include +#include +#include "tensorflow/core/framework/tensor_shape.pb.h" +#include "tensorflow/core/framework/types.pb.h" +// @@protoc_insertion_point(includes) +#include +#define PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2fprofiler_2ftfprof_5foutput_2eproto +PROTOBUF_NAMESPACE_OPEN +namespace internal { +class AnyMetadata; +} // namespace internal +PROTOBUF_NAMESPACE_CLOSE + +// Internal implementation detail -- do not use these members. +struct TableStruct_tensorflow_2fcore_2fprofiler_2ftfprof_5foutput_2eproto { + static const uint32_t offsets[]; +}; +extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_tensorflow_2fcore_2fprofiler_2ftfprof_5foutput_2eproto; +namespace tensorflow { +namespace tfprof { +class AdviceProto; +struct AdviceProtoDefaultTypeInternal; +extern AdviceProtoDefaultTypeInternal _AdviceProto_default_instance_; +class AdviceProto_Checker; +struct AdviceProto_CheckerDefaultTypeInternal; +extern AdviceProto_CheckerDefaultTypeInternal _AdviceProto_Checker_default_instance_; +class AdviceProto_CheckersEntry_DoNotUse; +struct AdviceProto_CheckersEntry_DoNotUseDefaultTypeInternal; +extern AdviceProto_CheckersEntry_DoNotUseDefaultTypeInternal _AdviceProto_CheckersEntry_DoNotUse_default_instance_; +class GraphNodeProto; +struct GraphNodeProtoDefaultTypeInternal; +extern GraphNodeProtoDefaultTypeInternal _GraphNodeProto_default_instance_; +class GraphNodeProto_InputShapesEntry_DoNotUse; +struct GraphNodeProto_InputShapesEntry_DoNotUseDefaultTypeInternal; +extern GraphNodeProto_InputShapesEntry_DoNotUseDefaultTypeInternal _GraphNodeProto_InputShapesEntry_DoNotUse_default_instance_; +class MultiGraphNodeProto; +struct MultiGraphNodeProtoDefaultTypeInternal; +extern MultiGraphNodeProtoDefaultTypeInternal _MultiGraphNodeProto_default_instance_; +class TFProfTensorProto; +struct TFProfTensorProtoDefaultTypeInternal; +extern TFProfTensorProtoDefaultTypeInternal _TFProfTensorProto_default_instance_; +} // namespace tfprof +} // namespace tensorflow +PROTOBUF_NAMESPACE_OPEN +template<> ::tensorflow::tfprof::AdviceProto* Arena::CreateMaybeMessage<::tensorflow::tfprof::AdviceProto>(Arena*); +template<> ::tensorflow::tfprof::AdviceProto_Checker* Arena::CreateMaybeMessage<::tensorflow::tfprof::AdviceProto_Checker>(Arena*); +template<> ::tensorflow::tfprof::AdviceProto_CheckersEntry_DoNotUse* Arena::CreateMaybeMessage<::tensorflow::tfprof::AdviceProto_CheckersEntry_DoNotUse>(Arena*); +template<> ::tensorflow::tfprof::GraphNodeProto* Arena::CreateMaybeMessage<::tensorflow::tfprof::GraphNodeProto>(Arena*); +template<> ::tensorflow::tfprof::GraphNodeProto_InputShapesEntry_DoNotUse* Arena::CreateMaybeMessage<::tensorflow::tfprof::GraphNodeProto_InputShapesEntry_DoNotUse>(Arena*); +template<> ::tensorflow::tfprof::MultiGraphNodeProto* Arena::CreateMaybeMessage<::tensorflow::tfprof::MultiGraphNodeProto>(Arena*); +template<> ::tensorflow::tfprof::TFProfTensorProto* Arena::CreateMaybeMessage<::tensorflow::tfprof::TFProfTensorProto>(Arena*); +PROTOBUF_NAMESPACE_CLOSE +namespace tensorflow { +namespace tfprof { + +// =================================================================== + +class TFProfTensorProto final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.tfprof.TFProfTensorProto) */ { + public: + inline TFProfTensorProto() : TFProfTensorProto(nullptr) {} + ~TFProfTensorProto() override; + explicit PROTOBUF_CONSTEXPR TFProfTensorProto(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + TFProfTensorProto(const TFProfTensorProto& from); + TFProfTensorProto(TFProfTensorProto&& from) noexcept + : TFProfTensorProto() { + *this = ::std::move(from); + } + + inline TFProfTensorProto& operator=(const TFProfTensorProto& from) { + CopyFrom(from); + return *this; + } + inline TFProfTensorProto& operator=(TFProfTensorProto&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const TFProfTensorProto& default_instance() { + return *internal_default_instance(); + } + static inline const TFProfTensorProto* internal_default_instance() { + return reinterpret_cast( + &_TFProfTensorProto_default_instance_); + } + static constexpr int kIndexInFileMessages = + 0; + + friend void swap(TFProfTensorProto& a, TFProfTensorProto& b) { + a.Swap(&b); + } + inline void Swap(TFProfTensorProto* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(TFProfTensorProto* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + TFProfTensorProto* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const TFProfTensorProto& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const TFProfTensorProto& from) { + TFProfTensorProto::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(TFProfTensorProto* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.tfprof.TFProfTensorProto"; + } + protected: + explicit TFProfTensorProto(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kValueDoubleFieldNumber = 2, + kValueInt64FieldNumber = 3, + kValueStrFieldNumber = 4, + kDtypeFieldNumber = 1, + }; + // repeated double value_double = 2; + int value_double_size() const; + private: + int _internal_value_double_size() const; + public: + void clear_value_double(); + private: + double _internal_value_double(int index) const; + const ::PROTOBUF_NAMESPACE_ID::RepeatedField< double >& + _internal_value_double() const; + void _internal_add_value_double(double value); + ::PROTOBUF_NAMESPACE_ID::RepeatedField< double >* + _internal_mutable_value_double(); + public: + double value_double(int index) const; + void set_value_double(int index, double value); + void add_value_double(double value); + const ::PROTOBUF_NAMESPACE_ID::RepeatedField< double >& + value_double() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedField< double >* + mutable_value_double(); + + // repeated int64 value_int64 = 3; + int value_int64_size() const; + private: + int _internal_value_int64_size() const; + public: + void clear_value_int64(); + private: + int64_t _internal_value_int64(int index) const; + const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >& + _internal_value_int64() const; + void _internal_add_value_int64(int64_t value); + ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >* + _internal_mutable_value_int64(); + public: + int64_t value_int64(int index) const; + void set_value_int64(int index, int64_t value); + void add_value_int64(int64_t value); + const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >& + value_int64() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >* + mutable_value_int64(); + + // repeated string value_str = 4; + int value_str_size() const; + private: + int _internal_value_str_size() const; + public: + void clear_value_str(); + const std::string& value_str(int index) const; + std::string* mutable_value_str(int index); + void set_value_str(int index, const std::string& value); + void set_value_str(int index, std::string&& value); + void set_value_str(int index, const char* value); + void set_value_str(int index, const char* value, size_t size); + std::string* add_value_str(); + void add_value_str(const std::string& value); + void add_value_str(std::string&& value); + void add_value_str(const char* value); + void add_value_str(const char* value, size_t size); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& value_str() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* mutable_value_str(); + private: + const std::string& _internal_value_str(int index) const; + std::string* _internal_add_value_str(); + public: + + // .tensorflow.DataType dtype = 1; + void clear_dtype(); + ::tensorflow::DataType dtype() const; + void set_dtype(::tensorflow::DataType value); + private: + ::tensorflow::DataType _internal_dtype() const; + void _internal_set_dtype(::tensorflow::DataType value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.tfprof.TFProfTensorProto) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedField< double > value_double_; + ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t > value_int64_; + mutable std::atomic _value_int64_cached_byte_size_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField value_str_; + int dtype_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprofiler_2ftfprof_5foutput_2eproto; +}; +// ------------------------------------------------------------------- + +class GraphNodeProto_InputShapesEntry_DoNotUse : public ::PROTOBUF_NAMESPACE_ID::internal::MapEntry { +public: + typedef ::PROTOBUF_NAMESPACE_ID::internal::MapEntry SuperType; + GraphNodeProto_InputShapesEntry_DoNotUse(); + explicit PROTOBUF_CONSTEXPR GraphNodeProto_InputShapesEntry_DoNotUse( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + explicit GraphNodeProto_InputShapesEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena); + void MergeFrom(const GraphNodeProto_InputShapesEntry_DoNotUse& other); + static const GraphNodeProto_InputShapesEntry_DoNotUse* internal_default_instance() { return reinterpret_cast(&_GraphNodeProto_InputShapesEntry_DoNotUse_default_instance_); } + static bool ValidateKey(void*) { return true; } + static bool ValidateValue(void*) { return true; } + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + friend struct ::TableStruct_tensorflow_2fcore_2fprofiler_2ftfprof_5foutput_2eproto; +}; + +// ------------------------------------------------------------------- + +class GraphNodeProto final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.tfprof.GraphNodeProto) */ { + public: + inline GraphNodeProto() : GraphNodeProto(nullptr) {} + ~GraphNodeProto() override; + explicit PROTOBUF_CONSTEXPR GraphNodeProto(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + GraphNodeProto(const GraphNodeProto& from); + GraphNodeProto(GraphNodeProto&& from) noexcept + : GraphNodeProto() { + *this = ::std::move(from); + } + + inline GraphNodeProto& operator=(const GraphNodeProto& from) { + CopyFrom(from); + return *this; + } + inline GraphNodeProto& operator=(GraphNodeProto&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const GraphNodeProto& default_instance() { + return *internal_default_instance(); + } + static inline const GraphNodeProto* internal_default_instance() { + return reinterpret_cast( + &_GraphNodeProto_default_instance_); + } + static constexpr int kIndexInFileMessages = + 2; + + friend void swap(GraphNodeProto& a, GraphNodeProto& b) { + a.Swap(&b); + } + inline void Swap(GraphNodeProto* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(GraphNodeProto* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + GraphNodeProto* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const GraphNodeProto& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const GraphNodeProto& from) { + GraphNodeProto::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(GraphNodeProto* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.tfprof.GraphNodeProto"; + } + protected: + explicit GraphNodeProto(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + + // accessors ------------------------------------------------------- + + enum : int { + kDevicesFieldNumber = 10, + kShapesFieldNumber = 11, + kChildrenFieldNumber = 12, + kInputShapesFieldNumber = 16, + kNameFieldNumber = 1, + kTensorValueFieldNumber = 15, + kExecMicrosFieldNumber = 2, + kRequestedBytesFieldNumber = 3, + kParametersFieldNumber = 4, + kTotalExecMicrosFieldNumber = 6, + kTotalRequestedBytesFieldNumber = 7, + kTotalParametersFieldNumber = 8, + kFloatOpsFieldNumber = 13, + kTotalFloatOpsFieldNumber = 14, + kAcceleratorExecMicrosFieldNumber = 17, + kCpuExecMicrosFieldNumber = 18, + kTotalAcceleratorExecMicrosFieldNumber = 19, + kTotalCpuExecMicrosFieldNumber = 20, + kRunCountFieldNumber = 21, + kTotalRunCountFieldNumber = 22, + kTotalDefinitionCountFieldNumber = 23, + kPeakBytesFieldNumber = 24, + kResidualBytesFieldNumber = 25, + kOutputBytesFieldNumber = 26, + kTotalPeakBytesFieldNumber = 27, + kTotalResidualBytesFieldNumber = 28, + kTotalOutputBytesFieldNumber = 29, + }; + // repeated string devices = 10; + int devices_size() const; + private: + int _internal_devices_size() const; + public: + void clear_devices(); + const std::string& devices(int index) const; + std::string* mutable_devices(int index); + void set_devices(int index, const std::string& value); + void set_devices(int index, std::string&& value); + void set_devices(int index, const char* value); + void set_devices(int index, const char* value, size_t size); + std::string* add_devices(); + void add_devices(const std::string& value); + void add_devices(std::string&& value); + void add_devices(const char* value); + void add_devices(const char* value, size_t size); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& devices() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* mutable_devices(); + private: + const std::string& _internal_devices(int index) const; + std::string* _internal_add_devices(); + public: + + // repeated .tensorflow.TensorShapeProto shapes = 11; + int shapes_size() const; + private: + int _internal_shapes_size() const; + public: + void clear_shapes(); + ::tensorflow::TensorShapeProto* mutable_shapes(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::TensorShapeProto >* + mutable_shapes(); + private: + const ::tensorflow::TensorShapeProto& _internal_shapes(int index) const; + ::tensorflow::TensorShapeProto* _internal_add_shapes(); + public: + const ::tensorflow::TensorShapeProto& shapes(int index) const; + ::tensorflow::TensorShapeProto* add_shapes(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::TensorShapeProto >& + shapes() const; + + // repeated .tensorflow.tfprof.GraphNodeProto children = 12; + int children_size() const; + private: + int _internal_children_size() const; + public: + void clear_children(); + ::tensorflow::tfprof::GraphNodeProto* mutable_children(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::tfprof::GraphNodeProto >* + mutable_children(); + private: + const ::tensorflow::tfprof::GraphNodeProto& _internal_children(int index) const; + ::tensorflow::tfprof::GraphNodeProto* _internal_add_children(); + public: + const ::tensorflow::tfprof::GraphNodeProto& children(int index) const; + ::tensorflow::tfprof::GraphNodeProto* add_children(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::tfprof::GraphNodeProto >& + children() const; + + // map input_shapes = 16; + int input_shapes_size() const; + private: + int _internal_input_shapes_size() const; + public: + void clear_input_shapes(); + private: + const ::PROTOBUF_NAMESPACE_ID::Map< int32_t, ::tensorflow::TensorShapeProto >& + _internal_input_shapes() const; + ::PROTOBUF_NAMESPACE_ID::Map< int32_t, ::tensorflow::TensorShapeProto >* + _internal_mutable_input_shapes(); + public: + const ::PROTOBUF_NAMESPACE_ID::Map< int32_t, ::tensorflow::TensorShapeProto >& + input_shapes() const; + ::PROTOBUF_NAMESPACE_ID::Map< int32_t, ::tensorflow::TensorShapeProto >* + mutable_input_shapes(); + + // string name = 1; + void clear_name(); + const std::string& name() const; + template + void set_name(ArgT0&& arg0, ArgT... args); + std::string* mutable_name(); + PROTOBUF_NODISCARD std::string* release_name(); + void set_allocated_name(std::string* name); + private: + const std::string& _internal_name() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_name(const std::string& value); + std::string* _internal_mutable_name(); + public: + + // .tensorflow.tfprof.TFProfTensorProto tensor_value = 15; + bool has_tensor_value() const; + private: + bool _internal_has_tensor_value() const; + public: + void clear_tensor_value(); + const ::tensorflow::tfprof::TFProfTensorProto& tensor_value() const; + PROTOBUF_NODISCARD ::tensorflow::tfprof::TFProfTensorProto* release_tensor_value(); + ::tensorflow::tfprof::TFProfTensorProto* mutable_tensor_value(); + void set_allocated_tensor_value(::tensorflow::tfprof::TFProfTensorProto* tensor_value); + private: + const ::tensorflow::tfprof::TFProfTensorProto& _internal_tensor_value() const; + ::tensorflow::tfprof::TFProfTensorProto* _internal_mutable_tensor_value(); + public: + void unsafe_arena_set_allocated_tensor_value( + ::tensorflow::tfprof::TFProfTensorProto* tensor_value); + ::tensorflow::tfprof::TFProfTensorProto* unsafe_arena_release_tensor_value(); + + // int64 exec_micros = 2; + void clear_exec_micros(); + int64_t exec_micros() const; + void set_exec_micros(int64_t value); + private: + int64_t _internal_exec_micros() const; + void _internal_set_exec_micros(int64_t value); + public: + + // int64 requested_bytes = 3; + void clear_requested_bytes(); + int64_t requested_bytes() const; + void set_requested_bytes(int64_t value); + private: + int64_t _internal_requested_bytes() const; + void _internal_set_requested_bytes(int64_t value); + public: + + // int64 parameters = 4; + void clear_parameters(); + int64_t parameters() const; + void set_parameters(int64_t value); + private: + int64_t _internal_parameters() const; + void _internal_set_parameters(int64_t value); + public: + + // int64 total_exec_micros = 6; + void clear_total_exec_micros(); + int64_t total_exec_micros() const; + void set_total_exec_micros(int64_t value); + private: + int64_t _internal_total_exec_micros() const; + void _internal_set_total_exec_micros(int64_t value); + public: + + // int64 total_requested_bytes = 7; + void clear_total_requested_bytes(); + int64_t total_requested_bytes() const; + void set_total_requested_bytes(int64_t value); + private: + int64_t _internal_total_requested_bytes() const; + void _internal_set_total_requested_bytes(int64_t value); + public: + + // int64 total_parameters = 8; + void clear_total_parameters(); + int64_t total_parameters() const; + void set_total_parameters(int64_t value); + private: + int64_t _internal_total_parameters() const; + void _internal_set_total_parameters(int64_t value); + public: + + // int64 float_ops = 13; + void clear_float_ops(); + int64_t float_ops() const; + void set_float_ops(int64_t value); + private: + int64_t _internal_float_ops() const; + void _internal_set_float_ops(int64_t value); + public: + + // int64 total_float_ops = 14; + void clear_total_float_ops(); + int64_t total_float_ops() const; + void set_total_float_ops(int64_t value); + private: + int64_t _internal_total_float_ops() const; + void _internal_set_total_float_ops(int64_t value); + public: + + // int64 accelerator_exec_micros = 17; + void clear_accelerator_exec_micros(); + int64_t accelerator_exec_micros() const; + void set_accelerator_exec_micros(int64_t value); + private: + int64_t _internal_accelerator_exec_micros() const; + void _internal_set_accelerator_exec_micros(int64_t value); + public: + + // int64 cpu_exec_micros = 18; + void clear_cpu_exec_micros(); + int64_t cpu_exec_micros() const; + void set_cpu_exec_micros(int64_t value); + private: + int64_t _internal_cpu_exec_micros() const; + void _internal_set_cpu_exec_micros(int64_t value); + public: + + // int64 total_accelerator_exec_micros = 19; + void clear_total_accelerator_exec_micros(); + int64_t total_accelerator_exec_micros() const; + void set_total_accelerator_exec_micros(int64_t value); + private: + int64_t _internal_total_accelerator_exec_micros() const; + void _internal_set_total_accelerator_exec_micros(int64_t value); + public: + + // int64 total_cpu_exec_micros = 20; + void clear_total_cpu_exec_micros(); + int64_t total_cpu_exec_micros() const; + void set_total_cpu_exec_micros(int64_t value); + private: + int64_t _internal_total_cpu_exec_micros() const; + void _internal_set_total_cpu_exec_micros(int64_t value); + public: + + // int64 run_count = 21; + void clear_run_count(); + int64_t run_count() const; + void set_run_count(int64_t value); + private: + int64_t _internal_run_count() const; + void _internal_set_run_count(int64_t value); + public: + + // int64 total_run_count = 22; + void clear_total_run_count(); + int64_t total_run_count() const; + void set_total_run_count(int64_t value); + private: + int64_t _internal_total_run_count() const; + void _internal_set_total_run_count(int64_t value); + public: + + // int64 total_definition_count = 23; + void clear_total_definition_count(); + int64_t total_definition_count() const; + void set_total_definition_count(int64_t value); + private: + int64_t _internal_total_definition_count() const; + void _internal_set_total_definition_count(int64_t value); + public: + + // int64 peak_bytes = 24; + void clear_peak_bytes(); + int64_t peak_bytes() const; + void set_peak_bytes(int64_t value); + private: + int64_t _internal_peak_bytes() const; + void _internal_set_peak_bytes(int64_t value); + public: + + // int64 residual_bytes = 25; + void clear_residual_bytes(); + int64_t residual_bytes() const; + void set_residual_bytes(int64_t value); + private: + int64_t _internal_residual_bytes() const; + void _internal_set_residual_bytes(int64_t value); + public: + + // int64 output_bytes = 26; + void clear_output_bytes(); + int64_t output_bytes() const; + void set_output_bytes(int64_t value); + private: + int64_t _internal_output_bytes() const; + void _internal_set_output_bytes(int64_t value); + public: + + // int64 total_peak_bytes = 27; + void clear_total_peak_bytes(); + int64_t total_peak_bytes() const; + void set_total_peak_bytes(int64_t value); + private: + int64_t _internal_total_peak_bytes() const; + void _internal_set_total_peak_bytes(int64_t value); + public: + + // int64 total_residual_bytes = 28; + void clear_total_residual_bytes(); + int64_t total_residual_bytes() const; + void set_total_residual_bytes(int64_t value); + private: + int64_t _internal_total_residual_bytes() const; + void _internal_set_total_residual_bytes(int64_t value); + public: + + // int64 total_output_bytes = 29; + void clear_total_output_bytes(); + int64_t total_output_bytes() const; + void set_total_output_bytes(int64_t value); + private: + int64_t _internal_total_output_bytes() const; + void _internal_set_total_output_bytes(int64_t value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.tfprof.GraphNodeProto) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField devices_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::TensorShapeProto > shapes_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::tfprof::GraphNodeProto > children_; + ::PROTOBUF_NAMESPACE_ID::internal::MapField< + GraphNodeProto_InputShapesEntry_DoNotUse, + int32_t, ::tensorflow::TensorShapeProto, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT32, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_MESSAGE> input_shapes_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_; + ::tensorflow::tfprof::TFProfTensorProto* tensor_value_; + int64_t exec_micros_; + int64_t requested_bytes_; + int64_t parameters_; + int64_t total_exec_micros_; + int64_t total_requested_bytes_; + int64_t total_parameters_; + int64_t float_ops_; + int64_t total_float_ops_; + int64_t accelerator_exec_micros_; + int64_t cpu_exec_micros_; + int64_t total_accelerator_exec_micros_; + int64_t total_cpu_exec_micros_; + int64_t run_count_; + int64_t total_run_count_; + int64_t total_definition_count_; + int64_t peak_bytes_; + int64_t residual_bytes_; + int64_t output_bytes_; + int64_t total_peak_bytes_; + int64_t total_residual_bytes_; + int64_t total_output_bytes_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprofiler_2ftfprof_5foutput_2eproto; +}; +// ------------------------------------------------------------------- + +class MultiGraphNodeProto final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.tfprof.MultiGraphNodeProto) */ { + public: + inline MultiGraphNodeProto() : MultiGraphNodeProto(nullptr) {} + ~MultiGraphNodeProto() override; + explicit PROTOBUF_CONSTEXPR MultiGraphNodeProto(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + MultiGraphNodeProto(const MultiGraphNodeProto& from); + MultiGraphNodeProto(MultiGraphNodeProto&& from) noexcept + : MultiGraphNodeProto() { + *this = ::std::move(from); + } + + inline MultiGraphNodeProto& operator=(const MultiGraphNodeProto& from) { + CopyFrom(from); + return *this; + } + inline MultiGraphNodeProto& operator=(MultiGraphNodeProto&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const MultiGraphNodeProto& default_instance() { + return *internal_default_instance(); + } + static inline const MultiGraphNodeProto* internal_default_instance() { + return reinterpret_cast( + &_MultiGraphNodeProto_default_instance_); + } + static constexpr int kIndexInFileMessages = + 3; + + friend void swap(MultiGraphNodeProto& a, MultiGraphNodeProto& b) { + a.Swap(&b); + } + inline void Swap(MultiGraphNodeProto* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(MultiGraphNodeProto* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + MultiGraphNodeProto* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const MultiGraphNodeProto& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const MultiGraphNodeProto& from) { + MultiGraphNodeProto::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(MultiGraphNodeProto* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.tfprof.MultiGraphNodeProto"; + } + protected: + explicit MultiGraphNodeProto(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kGraphNodesFieldNumber = 10, + kChildrenFieldNumber = 11, + kNameFieldNumber = 1, + kExecMicrosFieldNumber = 2, + kRequestedBytesFieldNumber = 3, + kParametersFieldNumber = 4, + kFloatOpsFieldNumber = 5, + kTotalExecMicrosFieldNumber = 6, + kTotalRequestedBytesFieldNumber = 7, + kTotalParametersFieldNumber = 8, + kTotalFloatOpsFieldNumber = 9, + kAcceleratorExecMicrosFieldNumber = 12, + kCpuExecMicrosFieldNumber = 13, + kTotalAcceleratorExecMicrosFieldNumber = 14, + kTotalCpuExecMicrosFieldNumber = 15, + kPeakBytesFieldNumber = 16, + kResidualBytesFieldNumber = 17, + kOutputBytesFieldNumber = 18, + kTotalPeakBytesFieldNumber = 19, + kTotalResidualBytesFieldNumber = 20, + kTotalOutputBytesFieldNumber = 21, + }; + // repeated .tensorflow.tfprof.GraphNodeProto graph_nodes = 10; + int graph_nodes_size() const; + private: + int _internal_graph_nodes_size() const; + public: + void clear_graph_nodes(); + ::tensorflow::tfprof::GraphNodeProto* mutable_graph_nodes(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::tfprof::GraphNodeProto >* + mutable_graph_nodes(); + private: + const ::tensorflow::tfprof::GraphNodeProto& _internal_graph_nodes(int index) const; + ::tensorflow::tfprof::GraphNodeProto* _internal_add_graph_nodes(); + public: + const ::tensorflow::tfprof::GraphNodeProto& graph_nodes(int index) const; + ::tensorflow::tfprof::GraphNodeProto* add_graph_nodes(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::tfprof::GraphNodeProto >& + graph_nodes() const; + + // repeated .tensorflow.tfprof.MultiGraphNodeProto children = 11; + int children_size() const; + private: + int _internal_children_size() const; + public: + void clear_children(); + ::tensorflow::tfprof::MultiGraphNodeProto* mutable_children(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::tfprof::MultiGraphNodeProto >* + mutable_children(); + private: + const ::tensorflow::tfprof::MultiGraphNodeProto& _internal_children(int index) const; + ::tensorflow::tfprof::MultiGraphNodeProto* _internal_add_children(); + public: + const ::tensorflow::tfprof::MultiGraphNodeProto& children(int index) const; + ::tensorflow::tfprof::MultiGraphNodeProto* add_children(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::tfprof::MultiGraphNodeProto >& + children() const; + + // string name = 1; + void clear_name(); + const std::string& name() const; + template + void set_name(ArgT0&& arg0, ArgT... args); + std::string* mutable_name(); + PROTOBUF_NODISCARD std::string* release_name(); + void set_allocated_name(std::string* name); + private: + const std::string& _internal_name() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_name(const std::string& value); + std::string* _internal_mutable_name(); + public: + + // int64 exec_micros = 2; + void clear_exec_micros(); + int64_t exec_micros() const; + void set_exec_micros(int64_t value); + private: + int64_t _internal_exec_micros() const; + void _internal_set_exec_micros(int64_t value); + public: + + // int64 requested_bytes = 3; + void clear_requested_bytes(); + int64_t requested_bytes() const; + void set_requested_bytes(int64_t value); + private: + int64_t _internal_requested_bytes() const; + void _internal_set_requested_bytes(int64_t value); + public: + + // int64 parameters = 4; + void clear_parameters(); + int64_t parameters() const; + void set_parameters(int64_t value); + private: + int64_t _internal_parameters() const; + void _internal_set_parameters(int64_t value); + public: + + // int64 float_ops = 5; + void clear_float_ops(); + int64_t float_ops() const; + void set_float_ops(int64_t value); + private: + int64_t _internal_float_ops() const; + void _internal_set_float_ops(int64_t value); + public: + + // int64 total_exec_micros = 6; + void clear_total_exec_micros(); + int64_t total_exec_micros() const; + void set_total_exec_micros(int64_t value); + private: + int64_t _internal_total_exec_micros() const; + void _internal_set_total_exec_micros(int64_t value); + public: + + // int64 total_requested_bytes = 7; + void clear_total_requested_bytes(); + int64_t total_requested_bytes() const; + void set_total_requested_bytes(int64_t value); + private: + int64_t _internal_total_requested_bytes() const; + void _internal_set_total_requested_bytes(int64_t value); + public: + + // int64 total_parameters = 8; + void clear_total_parameters(); + int64_t total_parameters() const; + void set_total_parameters(int64_t value); + private: + int64_t _internal_total_parameters() const; + void _internal_set_total_parameters(int64_t value); + public: + + // int64 total_float_ops = 9; + void clear_total_float_ops(); + int64_t total_float_ops() const; + void set_total_float_ops(int64_t value); + private: + int64_t _internal_total_float_ops() const; + void _internal_set_total_float_ops(int64_t value); + public: + + // int64 accelerator_exec_micros = 12; + void clear_accelerator_exec_micros(); + int64_t accelerator_exec_micros() const; + void set_accelerator_exec_micros(int64_t value); + private: + int64_t _internal_accelerator_exec_micros() const; + void _internal_set_accelerator_exec_micros(int64_t value); + public: + + // int64 cpu_exec_micros = 13; + void clear_cpu_exec_micros(); + int64_t cpu_exec_micros() const; + void set_cpu_exec_micros(int64_t value); + private: + int64_t _internal_cpu_exec_micros() const; + void _internal_set_cpu_exec_micros(int64_t value); + public: + + // int64 total_accelerator_exec_micros = 14; + void clear_total_accelerator_exec_micros(); + int64_t total_accelerator_exec_micros() const; + void set_total_accelerator_exec_micros(int64_t value); + private: + int64_t _internal_total_accelerator_exec_micros() const; + void _internal_set_total_accelerator_exec_micros(int64_t value); + public: + + // int64 total_cpu_exec_micros = 15; + void clear_total_cpu_exec_micros(); + int64_t total_cpu_exec_micros() const; + void set_total_cpu_exec_micros(int64_t value); + private: + int64_t _internal_total_cpu_exec_micros() const; + void _internal_set_total_cpu_exec_micros(int64_t value); + public: + + // int64 peak_bytes = 16; + void clear_peak_bytes(); + int64_t peak_bytes() const; + void set_peak_bytes(int64_t value); + private: + int64_t _internal_peak_bytes() const; + void _internal_set_peak_bytes(int64_t value); + public: + + // int64 residual_bytes = 17; + void clear_residual_bytes(); + int64_t residual_bytes() const; + void set_residual_bytes(int64_t value); + private: + int64_t _internal_residual_bytes() const; + void _internal_set_residual_bytes(int64_t value); + public: + + // int64 output_bytes = 18; + void clear_output_bytes(); + int64_t output_bytes() const; + void set_output_bytes(int64_t value); + private: + int64_t _internal_output_bytes() const; + void _internal_set_output_bytes(int64_t value); + public: + + // int64 total_peak_bytes = 19; + void clear_total_peak_bytes(); + int64_t total_peak_bytes() const; + void set_total_peak_bytes(int64_t value); + private: + int64_t _internal_total_peak_bytes() const; + void _internal_set_total_peak_bytes(int64_t value); + public: + + // int64 total_residual_bytes = 20; + void clear_total_residual_bytes(); + int64_t total_residual_bytes() const; + void set_total_residual_bytes(int64_t value); + private: + int64_t _internal_total_residual_bytes() const; + void _internal_set_total_residual_bytes(int64_t value); + public: + + // int64 total_output_bytes = 21; + void clear_total_output_bytes(); + int64_t total_output_bytes() const; + void set_total_output_bytes(int64_t value); + private: + int64_t _internal_total_output_bytes() const; + void _internal_set_total_output_bytes(int64_t value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.tfprof.MultiGraphNodeProto) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::tfprof::GraphNodeProto > graph_nodes_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::tfprof::MultiGraphNodeProto > children_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_; + int64_t exec_micros_; + int64_t requested_bytes_; + int64_t parameters_; + int64_t float_ops_; + int64_t total_exec_micros_; + int64_t total_requested_bytes_; + int64_t total_parameters_; + int64_t total_float_ops_; + int64_t accelerator_exec_micros_; + int64_t cpu_exec_micros_; + int64_t total_accelerator_exec_micros_; + int64_t total_cpu_exec_micros_; + int64_t peak_bytes_; + int64_t residual_bytes_; + int64_t output_bytes_; + int64_t total_peak_bytes_; + int64_t total_residual_bytes_; + int64_t total_output_bytes_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprofiler_2ftfprof_5foutput_2eproto; +}; +// ------------------------------------------------------------------- + +class AdviceProto_CheckersEntry_DoNotUse : public ::PROTOBUF_NAMESPACE_ID::internal::MapEntry { +public: + typedef ::PROTOBUF_NAMESPACE_ID::internal::MapEntry SuperType; + AdviceProto_CheckersEntry_DoNotUse(); + explicit PROTOBUF_CONSTEXPR AdviceProto_CheckersEntry_DoNotUse( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + explicit AdviceProto_CheckersEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena); + void MergeFrom(const AdviceProto_CheckersEntry_DoNotUse& other); + static const AdviceProto_CheckersEntry_DoNotUse* internal_default_instance() { return reinterpret_cast(&_AdviceProto_CheckersEntry_DoNotUse_default_instance_); } + static bool ValidateKey(std::string* s) { + return ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(s->data(), static_cast(s->size()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, "tensorflow.tfprof.AdviceProto.CheckersEntry.key"); + } + static bool ValidateValue(void*) { return true; } + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + friend struct ::TableStruct_tensorflow_2fcore_2fprofiler_2ftfprof_5foutput_2eproto; +}; + +// ------------------------------------------------------------------- + +class AdviceProto_Checker final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.tfprof.AdviceProto.Checker) */ { + public: + inline AdviceProto_Checker() : AdviceProto_Checker(nullptr) {} + ~AdviceProto_Checker() override; + explicit PROTOBUF_CONSTEXPR AdviceProto_Checker(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + AdviceProto_Checker(const AdviceProto_Checker& from); + AdviceProto_Checker(AdviceProto_Checker&& from) noexcept + : AdviceProto_Checker() { + *this = ::std::move(from); + } + + inline AdviceProto_Checker& operator=(const AdviceProto_Checker& from) { + CopyFrom(from); + return *this; + } + inline AdviceProto_Checker& operator=(AdviceProto_Checker&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const AdviceProto_Checker& default_instance() { + return *internal_default_instance(); + } + static inline const AdviceProto_Checker* internal_default_instance() { + return reinterpret_cast( + &_AdviceProto_Checker_default_instance_); + } + static constexpr int kIndexInFileMessages = + 5; + + friend void swap(AdviceProto_Checker& a, AdviceProto_Checker& b) { + a.Swap(&b); + } + inline void Swap(AdviceProto_Checker* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(AdviceProto_Checker* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + AdviceProto_Checker* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const AdviceProto_Checker& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const AdviceProto_Checker& from) { + AdviceProto_Checker::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(AdviceProto_Checker* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.tfprof.AdviceProto.Checker"; + } + protected: + explicit AdviceProto_Checker(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kReportsFieldNumber = 2, + }; + // repeated string reports = 2; + int reports_size() const; + private: + int _internal_reports_size() const; + public: + void clear_reports(); + const std::string& reports(int index) const; + std::string* mutable_reports(int index); + void set_reports(int index, const std::string& value); + void set_reports(int index, std::string&& value); + void set_reports(int index, const char* value); + void set_reports(int index, const char* value, size_t size); + std::string* add_reports(); + void add_reports(const std::string& value); + void add_reports(std::string&& value); + void add_reports(const char* value); + void add_reports(const char* value, size_t size); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& reports() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* mutable_reports(); + private: + const std::string& _internal_reports(int index) const; + std::string* _internal_add_reports(); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.tfprof.AdviceProto.Checker) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField reports_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprofiler_2ftfprof_5foutput_2eproto; +}; +// ------------------------------------------------------------------- + +class AdviceProto final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.tfprof.AdviceProto) */ { + public: + inline AdviceProto() : AdviceProto(nullptr) {} + ~AdviceProto() override; + explicit PROTOBUF_CONSTEXPR AdviceProto(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + AdviceProto(const AdviceProto& from); + AdviceProto(AdviceProto&& from) noexcept + : AdviceProto() { + *this = ::std::move(from); + } + + inline AdviceProto& operator=(const AdviceProto& from) { + CopyFrom(from); + return *this; + } + inline AdviceProto& operator=(AdviceProto&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const AdviceProto& default_instance() { + return *internal_default_instance(); + } + static inline const AdviceProto* internal_default_instance() { + return reinterpret_cast( + &_AdviceProto_default_instance_); + } + static constexpr int kIndexInFileMessages = + 6; + + friend void swap(AdviceProto& a, AdviceProto& b) { + a.Swap(&b); + } + inline void Swap(AdviceProto* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(AdviceProto* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + AdviceProto* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const AdviceProto& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const AdviceProto& from) { + AdviceProto::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(AdviceProto* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.tfprof.AdviceProto"; + } + protected: + explicit AdviceProto(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + typedef AdviceProto_Checker Checker; + + // accessors ------------------------------------------------------- + + enum : int { + kCheckersFieldNumber = 1, + }; + // map checkers = 1; + int checkers_size() const; + private: + int _internal_checkers_size() const; + public: + void clear_checkers(); + private: + const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::tfprof::AdviceProto_Checker >& + _internal_checkers() const; + ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::tfprof::AdviceProto_Checker >* + _internal_mutable_checkers(); + public: + const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::tfprof::AdviceProto_Checker >& + checkers() const; + ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::tfprof::AdviceProto_Checker >* + mutable_checkers(); + + // @@protoc_insertion_point(class_scope:tensorflow.tfprof.AdviceProto) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::MapField< + AdviceProto_CheckersEntry_DoNotUse, + std::string, ::tensorflow::tfprof::AdviceProto_Checker, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_MESSAGE> checkers_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprofiler_2ftfprof_5foutput_2eproto; +}; +// =================================================================== + + +// =================================================================== + +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// TFProfTensorProto + +// .tensorflow.DataType dtype = 1; +inline void TFProfTensorProto::clear_dtype() { + _impl_.dtype_ = 0; +} +inline ::tensorflow::DataType TFProfTensorProto::_internal_dtype() const { + return static_cast< ::tensorflow::DataType >(_impl_.dtype_); +} +inline ::tensorflow::DataType TFProfTensorProto::dtype() const { + // @@protoc_insertion_point(field_get:tensorflow.tfprof.TFProfTensorProto.dtype) + return _internal_dtype(); +} +inline void TFProfTensorProto::_internal_set_dtype(::tensorflow::DataType value) { + + _impl_.dtype_ = value; +} +inline void TFProfTensorProto::set_dtype(::tensorflow::DataType value) { + _internal_set_dtype(value); + // @@protoc_insertion_point(field_set:tensorflow.tfprof.TFProfTensorProto.dtype) +} + +// repeated double value_double = 2; +inline int TFProfTensorProto::_internal_value_double_size() const { + return _impl_.value_double_.size(); +} +inline int TFProfTensorProto::value_double_size() const { + return _internal_value_double_size(); +} +inline void TFProfTensorProto::clear_value_double() { + _impl_.value_double_.Clear(); +} +inline double TFProfTensorProto::_internal_value_double(int index) const { + return _impl_.value_double_.Get(index); +} +inline double TFProfTensorProto::value_double(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.tfprof.TFProfTensorProto.value_double) + return _internal_value_double(index); +} +inline void TFProfTensorProto::set_value_double(int index, double value) { + _impl_.value_double_.Set(index, value); + // @@protoc_insertion_point(field_set:tensorflow.tfprof.TFProfTensorProto.value_double) +} +inline void TFProfTensorProto::_internal_add_value_double(double value) { + _impl_.value_double_.Add(value); +} +inline void TFProfTensorProto::add_value_double(double value) { + _internal_add_value_double(value); + // @@protoc_insertion_point(field_add:tensorflow.tfprof.TFProfTensorProto.value_double) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< double >& +TFProfTensorProto::_internal_value_double() const { + return _impl_.value_double_; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< double >& +TFProfTensorProto::value_double() const { + // @@protoc_insertion_point(field_list:tensorflow.tfprof.TFProfTensorProto.value_double) + return _internal_value_double(); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< double >* +TFProfTensorProto::_internal_mutable_value_double() { + return &_impl_.value_double_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< double >* +TFProfTensorProto::mutable_value_double() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.tfprof.TFProfTensorProto.value_double) + return _internal_mutable_value_double(); +} + +// repeated int64 value_int64 = 3; +inline int TFProfTensorProto::_internal_value_int64_size() const { + return _impl_.value_int64_.size(); +} +inline int TFProfTensorProto::value_int64_size() const { + return _internal_value_int64_size(); +} +inline void TFProfTensorProto::clear_value_int64() { + _impl_.value_int64_.Clear(); +} +inline int64_t TFProfTensorProto::_internal_value_int64(int index) const { + return _impl_.value_int64_.Get(index); +} +inline int64_t TFProfTensorProto::value_int64(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.tfprof.TFProfTensorProto.value_int64) + return _internal_value_int64(index); +} +inline void TFProfTensorProto::set_value_int64(int index, int64_t value) { + _impl_.value_int64_.Set(index, value); + // @@protoc_insertion_point(field_set:tensorflow.tfprof.TFProfTensorProto.value_int64) +} +inline void TFProfTensorProto::_internal_add_value_int64(int64_t value) { + _impl_.value_int64_.Add(value); +} +inline void TFProfTensorProto::add_value_int64(int64_t value) { + _internal_add_value_int64(value); + // @@protoc_insertion_point(field_add:tensorflow.tfprof.TFProfTensorProto.value_int64) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >& +TFProfTensorProto::_internal_value_int64() const { + return _impl_.value_int64_; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >& +TFProfTensorProto::value_int64() const { + // @@protoc_insertion_point(field_list:tensorflow.tfprof.TFProfTensorProto.value_int64) + return _internal_value_int64(); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >* +TFProfTensorProto::_internal_mutable_value_int64() { + return &_impl_.value_int64_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >* +TFProfTensorProto::mutable_value_int64() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.tfprof.TFProfTensorProto.value_int64) + return _internal_mutable_value_int64(); +} + +// repeated string value_str = 4; +inline int TFProfTensorProto::_internal_value_str_size() const { + return _impl_.value_str_.size(); +} +inline int TFProfTensorProto::value_str_size() const { + return _internal_value_str_size(); +} +inline void TFProfTensorProto::clear_value_str() { + _impl_.value_str_.Clear(); +} +inline std::string* TFProfTensorProto::add_value_str() { + std::string* _s = _internal_add_value_str(); + // @@protoc_insertion_point(field_add_mutable:tensorflow.tfprof.TFProfTensorProto.value_str) + return _s; +} +inline const std::string& TFProfTensorProto::_internal_value_str(int index) const { + return _impl_.value_str_.Get(index); +} +inline const std::string& TFProfTensorProto::value_str(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.tfprof.TFProfTensorProto.value_str) + return _internal_value_str(index); +} +inline std::string* TFProfTensorProto::mutable_value_str(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.tfprof.TFProfTensorProto.value_str) + return _impl_.value_str_.Mutable(index); +} +inline void TFProfTensorProto::set_value_str(int index, const std::string& value) { + _impl_.value_str_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set:tensorflow.tfprof.TFProfTensorProto.value_str) +} +inline void TFProfTensorProto::set_value_str(int index, std::string&& value) { + _impl_.value_str_.Mutable(index)->assign(std::move(value)); + // @@protoc_insertion_point(field_set:tensorflow.tfprof.TFProfTensorProto.value_str) +} +inline void TFProfTensorProto::set_value_str(int index, const char* value) { + GOOGLE_DCHECK(value != nullptr); + _impl_.value_str_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set_char:tensorflow.tfprof.TFProfTensorProto.value_str) +} +inline void TFProfTensorProto::set_value_str(int index, const char* value, size_t size) { + _impl_.value_str_.Mutable(index)->assign( + reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:tensorflow.tfprof.TFProfTensorProto.value_str) +} +inline std::string* TFProfTensorProto::_internal_add_value_str() { + return _impl_.value_str_.Add(); +} +inline void TFProfTensorProto::add_value_str(const std::string& value) { + _impl_.value_str_.Add()->assign(value); + // @@protoc_insertion_point(field_add:tensorflow.tfprof.TFProfTensorProto.value_str) +} +inline void TFProfTensorProto::add_value_str(std::string&& value) { + _impl_.value_str_.Add(std::move(value)); + // @@protoc_insertion_point(field_add:tensorflow.tfprof.TFProfTensorProto.value_str) +} +inline void TFProfTensorProto::add_value_str(const char* value) { + GOOGLE_DCHECK(value != nullptr); + _impl_.value_str_.Add()->assign(value); + // @@protoc_insertion_point(field_add_char:tensorflow.tfprof.TFProfTensorProto.value_str) +} +inline void TFProfTensorProto::add_value_str(const char* value, size_t size) { + _impl_.value_str_.Add()->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_add_pointer:tensorflow.tfprof.TFProfTensorProto.value_str) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& +TFProfTensorProto::value_str() const { + // @@protoc_insertion_point(field_list:tensorflow.tfprof.TFProfTensorProto.value_str) + return _impl_.value_str_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* +TFProfTensorProto::mutable_value_str() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.tfprof.TFProfTensorProto.value_str) + return &_impl_.value_str_; +} + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// GraphNodeProto + +// string name = 1; +inline void GraphNodeProto::clear_name() { + _impl_.name_.ClearToEmpty(); +} +inline const std::string& GraphNodeProto::name() const { + // @@protoc_insertion_point(field_get:tensorflow.tfprof.GraphNodeProto.name) + return _internal_name(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void GraphNodeProto::set_name(ArgT0&& arg0, ArgT... args) { + + _impl_.name_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.tfprof.GraphNodeProto.name) +} +inline std::string* GraphNodeProto::mutable_name() { + std::string* _s = _internal_mutable_name(); + // @@protoc_insertion_point(field_mutable:tensorflow.tfprof.GraphNodeProto.name) + return _s; +} +inline const std::string& GraphNodeProto::_internal_name() const { + return _impl_.name_.Get(); +} +inline void GraphNodeProto::_internal_set_name(const std::string& value) { + + _impl_.name_.Set(value, GetArenaForAllocation()); +} +inline std::string* GraphNodeProto::_internal_mutable_name() { + + return _impl_.name_.Mutable(GetArenaForAllocation()); +} +inline std::string* GraphNodeProto::release_name() { + // @@protoc_insertion_point(field_release:tensorflow.tfprof.GraphNodeProto.name) + return _impl_.name_.Release(); +} +inline void GraphNodeProto::set_allocated_name(std::string* name) { + if (name != nullptr) { + + } else { + + } + _impl_.name_.SetAllocated(name, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.name_.IsDefault()) { + _impl_.name_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.tfprof.GraphNodeProto.name) +} + +// .tensorflow.tfprof.TFProfTensorProto tensor_value = 15; +inline bool GraphNodeProto::_internal_has_tensor_value() const { + return this != internal_default_instance() && _impl_.tensor_value_ != nullptr; +} +inline bool GraphNodeProto::has_tensor_value() const { + return _internal_has_tensor_value(); +} +inline void GraphNodeProto::clear_tensor_value() { + if (GetArenaForAllocation() == nullptr && _impl_.tensor_value_ != nullptr) { + delete _impl_.tensor_value_; + } + _impl_.tensor_value_ = nullptr; +} +inline const ::tensorflow::tfprof::TFProfTensorProto& GraphNodeProto::_internal_tensor_value() const { + const ::tensorflow::tfprof::TFProfTensorProto* p = _impl_.tensor_value_; + return p != nullptr ? *p : reinterpret_cast( + ::tensorflow::tfprof::_TFProfTensorProto_default_instance_); +} +inline const ::tensorflow::tfprof::TFProfTensorProto& GraphNodeProto::tensor_value() const { + // @@protoc_insertion_point(field_get:tensorflow.tfprof.GraphNodeProto.tensor_value) + return _internal_tensor_value(); +} +inline void GraphNodeProto::unsafe_arena_set_allocated_tensor_value( + ::tensorflow::tfprof::TFProfTensorProto* tensor_value) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.tensor_value_); + } + _impl_.tensor_value_ = tensor_value; + if (tensor_value) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.tfprof.GraphNodeProto.tensor_value) +} +inline ::tensorflow::tfprof::TFProfTensorProto* GraphNodeProto::release_tensor_value() { + + ::tensorflow::tfprof::TFProfTensorProto* temp = _impl_.tensor_value_; + _impl_.tensor_value_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tensorflow::tfprof::TFProfTensorProto* GraphNodeProto::unsafe_arena_release_tensor_value() { + // @@protoc_insertion_point(field_release:tensorflow.tfprof.GraphNodeProto.tensor_value) + + ::tensorflow::tfprof::TFProfTensorProto* temp = _impl_.tensor_value_; + _impl_.tensor_value_ = nullptr; + return temp; +} +inline ::tensorflow::tfprof::TFProfTensorProto* GraphNodeProto::_internal_mutable_tensor_value() { + + if (_impl_.tensor_value_ == nullptr) { + auto* p = CreateMaybeMessage<::tensorflow::tfprof::TFProfTensorProto>(GetArenaForAllocation()); + _impl_.tensor_value_ = p; + } + return _impl_.tensor_value_; +} +inline ::tensorflow::tfprof::TFProfTensorProto* GraphNodeProto::mutable_tensor_value() { + ::tensorflow::tfprof::TFProfTensorProto* _msg = _internal_mutable_tensor_value(); + // @@protoc_insertion_point(field_mutable:tensorflow.tfprof.GraphNodeProto.tensor_value) + return _msg; +} +inline void GraphNodeProto::set_allocated_tensor_value(::tensorflow::tfprof::TFProfTensorProto* tensor_value) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete _impl_.tensor_value_; + } + if (tensor_value) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(tensor_value); + if (message_arena != submessage_arena) { + tensor_value = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, tensor_value, submessage_arena); + } + + } else { + + } + _impl_.tensor_value_ = tensor_value; + // @@protoc_insertion_point(field_set_allocated:tensorflow.tfprof.GraphNodeProto.tensor_value) +} + +// int64 run_count = 21; +inline void GraphNodeProto::clear_run_count() { + _impl_.run_count_ = int64_t{0}; +} +inline int64_t GraphNodeProto::_internal_run_count() const { + return _impl_.run_count_; +} +inline int64_t GraphNodeProto::run_count() const { + // @@protoc_insertion_point(field_get:tensorflow.tfprof.GraphNodeProto.run_count) + return _internal_run_count(); +} +inline void GraphNodeProto::_internal_set_run_count(int64_t value) { + + _impl_.run_count_ = value; +} +inline void GraphNodeProto::set_run_count(int64_t value) { + _internal_set_run_count(value); + // @@protoc_insertion_point(field_set:tensorflow.tfprof.GraphNodeProto.run_count) +} + +// int64 exec_micros = 2; +inline void GraphNodeProto::clear_exec_micros() { + _impl_.exec_micros_ = int64_t{0}; +} +inline int64_t GraphNodeProto::_internal_exec_micros() const { + return _impl_.exec_micros_; +} +inline int64_t GraphNodeProto::exec_micros() const { + // @@protoc_insertion_point(field_get:tensorflow.tfprof.GraphNodeProto.exec_micros) + return _internal_exec_micros(); +} +inline void GraphNodeProto::_internal_set_exec_micros(int64_t value) { + + _impl_.exec_micros_ = value; +} +inline void GraphNodeProto::set_exec_micros(int64_t value) { + _internal_set_exec_micros(value); + // @@protoc_insertion_point(field_set:tensorflow.tfprof.GraphNodeProto.exec_micros) +} + +// int64 accelerator_exec_micros = 17; +inline void GraphNodeProto::clear_accelerator_exec_micros() { + _impl_.accelerator_exec_micros_ = int64_t{0}; +} +inline int64_t GraphNodeProto::_internal_accelerator_exec_micros() const { + return _impl_.accelerator_exec_micros_; +} +inline int64_t GraphNodeProto::accelerator_exec_micros() const { + // @@protoc_insertion_point(field_get:tensorflow.tfprof.GraphNodeProto.accelerator_exec_micros) + return _internal_accelerator_exec_micros(); +} +inline void GraphNodeProto::_internal_set_accelerator_exec_micros(int64_t value) { + + _impl_.accelerator_exec_micros_ = value; +} +inline void GraphNodeProto::set_accelerator_exec_micros(int64_t value) { + _internal_set_accelerator_exec_micros(value); + // @@protoc_insertion_point(field_set:tensorflow.tfprof.GraphNodeProto.accelerator_exec_micros) +} + +// int64 cpu_exec_micros = 18; +inline void GraphNodeProto::clear_cpu_exec_micros() { + _impl_.cpu_exec_micros_ = int64_t{0}; +} +inline int64_t GraphNodeProto::_internal_cpu_exec_micros() const { + return _impl_.cpu_exec_micros_; +} +inline int64_t GraphNodeProto::cpu_exec_micros() const { + // @@protoc_insertion_point(field_get:tensorflow.tfprof.GraphNodeProto.cpu_exec_micros) + return _internal_cpu_exec_micros(); +} +inline void GraphNodeProto::_internal_set_cpu_exec_micros(int64_t value) { + + _impl_.cpu_exec_micros_ = value; +} +inline void GraphNodeProto::set_cpu_exec_micros(int64_t value) { + _internal_set_cpu_exec_micros(value); + // @@protoc_insertion_point(field_set:tensorflow.tfprof.GraphNodeProto.cpu_exec_micros) +} + +// int64 requested_bytes = 3; +inline void GraphNodeProto::clear_requested_bytes() { + _impl_.requested_bytes_ = int64_t{0}; +} +inline int64_t GraphNodeProto::_internal_requested_bytes() const { + return _impl_.requested_bytes_; +} +inline int64_t GraphNodeProto::requested_bytes() const { + // @@protoc_insertion_point(field_get:tensorflow.tfprof.GraphNodeProto.requested_bytes) + return _internal_requested_bytes(); +} +inline void GraphNodeProto::_internal_set_requested_bytes(int64_t value) { + + _impl_.requested_bytes_ = value; +} +inline void GraphNodeProto::set_requested_bytes(int64_t value) { + _internal_set_requested_bytes(value); + // @@protoc_insertion_point(field_set:tensorflow.tfprof.GraphNodeProto.requested_bytes) +} + +// int64 peak_bytes = 24; +inline void GraphNodeProto::clear_peak_bytes() { + _impl_.peak_bytes_ = int64_t{0}; +} +inline int64_t GraphNodeProto::_internal_peak_bytes() const { + return _impl_.peak_bytes_; +} +inline int64_t GraphNodeProto::peak_bytes() const { + // @@protoc_insertion_point(field_get:tensorflow.tfprof.GraphNodeProto.peak_bytes) + return _internal_peak_bytes(); +} +inline void GraphNodeProto::_internal_set_peak_bytes(int64_t value) { + + _impl_.peak_bytes_ = value; +} +inline void GraphNodeProto::set_peak_bytes(int64_t value) { + _internal_set_peak_bytes(value); + // @@protoc_insertion_point(field_set:tensorflow.tfprof.GraphNodeProto.peak_bytes) +} + +// int64 residual_bytes = 25; +inline void GraphNodeProto::clear_residual_bytes() { + _impl_.residual_bytes_ = int64_t{0}; +} +inline int64_t GraphNodeProto::_internal_residual_bytes() const { + return _impl_.residual_bytes_; +} +inline int64_t GraphNodeProto::residual_bytes() const { + // @@protoc_insertion_point(field_get:tensorflow.tfprof.GraphNodeProto.residual_bytes) + return _internal_residual_bytes(); +} +inline void GraphNodeProto::_internal_set_residual_bytes(int64_t value) { + + _impl_.residual_bytes_ = value; +} +inline void GraphNodeProto::set_residual_bytes(int64_t value) { + _internal_set_residual_bytes(value); + // @@protoc_insertion_point(field_set:tensorflow.tfprof.GraphNodeProto.residual_bytes) +} + +// int64 output_bytes = 26; +inline void GraphNodeProto::clear_output_bytes() { + _impl_.output_bytes_ = int64_t{0}; +} +inline int64_t GraphNodeProto::_internal_output_bytes() const { + return _impl_.output_bytes_; +} +inline int64_t GraphNodeProto::output_bytes() const { + // @@protoc_insertion_point(field_get:tensorflow.tfprof.GraphNodeProto.output_bytes) + return _internal_output_bytes(); +} +inline void GraphNodeProto::_internal_set_output_bytes(int64_t value) { + + _impl_.output_bytes_ = value; +} +inline void GraphNodeProto::set_output_bytes(int64_t value) { + _internal_set_output_bytes(value); + // @@protoc_insertion_point(field_set:tensorflow.tfprof.GraphNodeProto.output_bytes) +} + +// int64 parameters = 4; +inline void GraphNodeProto::clear_parameters() { + _impl_.parameters_ = int64_t{0}; +} +inline int64_t GraphNodeProto::_internal_parameters() const { + return _impl_.parameters_; +} +inline int64_t GraphNodeProto::parameters() const { + // @@protoc_insertion_point(field_get:tensorflow.tfprof.GraphNodeProto.parameters) + return _internal_parameters(); +} +inline void GraphNodeProto::_internal_set_parameters(int64_t value) { + + _impl_.parameters_ = value; +} +inline void GraphNodeProto::set_parameters(int64_t value) { + _internal_set_parameters(value); + // @@protoc_insertion_point(field_set:tensorflow.tfprof.GraphNodeProto.parameters) +} + +// int64 float_ops = 13; +inline void GraphNodeProto::clear_float_ops() { + _impl_.float_ops_ = int64_t{0}; +} +inline int64_t GraphNodeProto::_internal_float_ops() const { + return _impl_.float_ops_; +} +inline int64_t GraphNodeProto::float_ops() const { + // @@protoc_insertion_point(field_get:tensorflow.tfprof.GraphNodeProto.float_ops) + return _internal_float_ops(); +} +inline void GraphNodeProto::_internal_set_float_ops(int64_t value) { + + _impl_.float_ops_ = value; +} +inline void GraphNodeProto::set_float_ops(int64_t value) { + _internal_set_float_ops(value); + // @@protoc_insertion_point(field_set:tensorflow.tfprof.GraphNodeProto.float_ops) +} + +// repeated string devices = 10; +inline int GraphNodeProto::_internal_devices_size() const { + return _impl_.devices_.size(); +} +inline int GraphNodeProto::devices_size() const { + return _internal_devices_size(); +} +inline void GraphNodeProto::clear_devices() { + _impl_.devices_.Clear(); +} +inline std::string* GraphNodeProto::add_devices() { + std::string* _s = _internal_add_devices(); + // @@protoc_insertion_point(field_add_mutable:tensorflow.tfprof.GraphNodeProto.devices) + return _s; +} +inline const std::string& GraphNodeProto::_internal_devices(int index) const { + return _impl_.devices_.Get(index); +} +inline const std::string& GraphNodeProto::devices(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.tfprof.GraphNodeProto.devices) + return _internal_devices(index); +} +inline std::string* GraphNodeProto::mutable_devices(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.tfprof.GraphNodeProto.devices) + return _impl_.devices_.Mutable(index); +} +inline void GraphNodeProto::set_devices(int index, const std::string& value) { + _impl_.devices_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set:tensorflow.tfprof.GraphNodeProto.devices) +} +inline void GraphNodeProto::set_devices(int index, std::string&& value) { + _impl_.devices_.Mutable(index)->assign(std::move(value)); + // @@protoc_insertion_point(field_set:tensorflow.tfprof.GraphNodeProto.devices) +} +inline void GraphNodeProto::set_devices(int index, const char* value) { + GOOGLE_DCHECK(value != nullptr); + _impl_.devices_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set_char:tensorflow.tfprof.GraphNodeProto.devices) +} +inline void GraphNodeProto::set_devices(int index, const char* value, size_t size) { + _impl_.devices_.Mutable(index)->assign( + reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:tensorflow.tfprof.GraphNodeProto.devices) +} +inline std::string* GraphNodeProto::_internal_add_devices() { + return _impl_.devices_.Add(); +} +inline void GraphNodeProto::add_devices(const std::string& value) { + _impl_.devices_.Add()->assign(value); + // @@protoc_insertion_point(field_add:tensorflow.tfprof.GraphNodeProto.devices) +} +inline void GraphNodeProto::add_devices(std::string&& value) { + _impl_.devices_.Add(std::move(value)); + // @@protoc_insertion_point(field_add:tensorflow.tfprof.GraphNodeProto.devices) +} +inline void GraphNodeProto::add_devices(const char* value) { + GOOGLE_DCHECK(value != nullptr); + _impl_.devices_.Add()->assign(value); + // @@protoc_insertion_point(field_add_char:tensorflow.tfprof.GraphNodeProto.devices) +} +inline void GraphNodeProto::add_devices(const char* value, size_t size) { + _impl_.devices_.Add()->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_add_pointer:tensorflow.tfprof.GraphNodeProto.devices) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& +GraphNodeProto::devices() const { + // @@protoc_insertion_point(field_list:tensorflow.tfprof.GraphNodeProto.devices) + return _impl_.devices_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* +GraphNodeProto::mutable_devices() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.tfprof.GraphNodeProto.devices) + return &_impl_.devices_; +} + +// int64 total_definition_count = 23; +inline void GraphNodeProto::clear_total_definition_count() { + _impl_.total_definition_count_ = int64_t{0}; +} +inline int64_t GraphNodeProto::_internal_total_definition_count() const { + return _impl_.total_definition_count_; +} +inline int64_t GraphNodeProto::total_definition_count() const { + // @@protoc_insertion_point(field_get:tensorflow.tfprof.GraphNodeProto.total_definition_count) + return _internal_total_definition_count(); +} +inline void GraphNodeProto::_internal_set_total_definition_count(int64_t value) { + + _impl_.total_definition_count_ = value; +} +inline void GraphNodeProto::set_total_definition_count(int64_t value) { + _internal_set_total_definition_count(value); + // @@protoc_insertion_point(field_set:tensorflow.tfprof.GraphNodeProto.total_definition_count) +} + +// int64 total_run_count = 22; +inline void GraphNodeProto::clear_total_run_count() { + _impl_.total_run_count_ = int64_t{0}; +} +inline int64_t GraphNodeProto::_internal_total_run_count() const { + return _impl_.total_run_count_; +} +inline int64_t GraphNodeProto::total_run_count() const { + // @@protoc_insertion_point(field_get:tensorflow.tfprof.GraphNodeProto.total_run_count) + return _internal_total_run_count(); +} +inline void GraphNodeProto::_internal_set_total_run_count(int64_t value) { + + _impl_.total_run_count_ = value; +} +inline void GraphNodeProto::set_total_run_count(int64_t value) { + _internal_set_total_run_count(value); + // @@protoc_insertion_point(field_set:tensorflow.tfprof.GraphNodeProto.total_run_count) +} + +// int64 total_exec_micros = 6; +inline void GraphNodeProto::clear_total_exec_micros() { + _impl_.total_exec_micros_ = int64_t{0}; +} +inline int64_t GraphNodeProto::_internal_total_exec_micros() const { + return _impl_.total_exec_micros_; +} +inline int64_t GraphNodeProto::total_exec_micros() const { + // @@protoc_insertion_point(field_get:tensorflow.tfprof.GraphNodeProto.total_exec_micros) + return _internal_total_exec_micros(); +} +inline void GraphNodeProto::_internal_set_total_exec_micros(int64_t value) { + + _impl_.total_exec_micros_ = value; +} +inline void GraphNodeProto::set_total_exec_micros(int64_t value) { + _internal_set_total_exec_micros(value); + // @@protoc_insertion_point(field_set:tensorflow.tfprof.GraphNodeProto.total_exec_micros) +} + +// int64 total_accelerator_exec_micros = 19; +inline void GraphNodeProto::clear_total_accelerator_exec_micros() { + _impl_.total_accelerator_exec_micros_ = int64_t{0}; +} +inline int64_t GraphNodeProto::_internal_total_accelerator_exec_micros() const { + return _impl_.total_accelerator_exec_micros_; +} +inline int64_t GraphNodeProto::total_accelerator_exec_micros() const { + // @@protoc_insertion_point(field_get:tensorflow.tfprof.GraphNodeProto.total_accelerator_exec_micros) + return _internal_total_accelerator_exec_micros(); +} +inline void GraphNodeProto::_internal_set_total_accelerator_exec_micros(int64_t value) { + + _impl_.total_accelerator_exec_micros_ = value; +} +inline void GraphNodeProto::set_total_accelerator_exec_micros(int64_t value) { + _internal_set_total_accelerator_exec_micros(value); + // @@protoc_insertion_point(field_set:tensorflow.tfprof.GraphNodeProto.total_accelerator_exec_micros) +} + +// int64 total_cpu_exec_micros = 20; +inline void GraphNodeProto::clear_total_cpu_exec_micros() { + _impl_.total_cpu_exec_micros_ = int64_t{0}; +} +inline int64_t GraphNodeProto::_internal_total_cpu_exec_micros() const { + return _impl_.total_cpu_exec_micros_; +} +inline int64_t GraphNodeProto::total_cpu_exec_micros() const { + // @@protoc_insertion_point(field_get:tensorflow.tfprof.GraphNodeProto.total_cpu_exec_micros) + return _internal_total_cpu_exec_micros(); +} +inline void GraphNodeProto::_internal_set_total_cpu_exec_micros(int64_t value) { + + _impl_.total_cpu_exec_micros_ = value; +} +inline void GraphNodeProto::set_total_cpu_exec_micros(int64_t value) { + _internal_set_total_cpu_exec_micros(value); + // @@protoc_insertion_point(field_set:tensorflow.tfprof.GraphNodeProto.total_cpu_exec_micros) +} + +// int64 total_requested_bytes = 7; +inline void GraphNodeProto::clear_total_requested_bytes() { + _impl_.total_requested_bytes_ = int64_t{0}; +} +inline int64_t GraphNodeProto::_internal_total_requested_bytes() const { + return _impl_.total_requested_bytes_; +} +inline int64_t GraphNodeProto::total_requested_bytes() const { + // @@protoc_insertion_point(field_get:tensorflow.tfprof.GraphNodeProto.total_requested_bytes) + return _internal_total_requested_bytes(); +} +inline void GraphNodeProto::_internal_set_total_requested_bytes(int64_t value) { + + _impl_.total_requested_bytes_ = value; +} +inline void GraphNodeProto::set_total_requested_bytes(int64_t value) { + _internal_set_total_requested_bytes(value); + // @@protoc_insertion_point(field_set:tensorflow.tfprof.GraphNodeProto.total_requested_bytes) +} + +// int64 total_peak_bytes = 27; +inline void GraphNodeProto::clear_total_peak_bytes() { + _impl_.total_peak_bytes_ = int64_t{0}; +} +inline int64_t GraphNodeProto::_internal_total_peak_bytes() const { + return _impl_.total_peak_bytes_; +} +inline int64_t GraphNodeProto::total_peak_bytes() const { + // @@protoc_insertion_point(field_get:tensorflow.tfprof.GraphNodeProto.total_peak_bytes) + return _internal_total_peak_bytes(); +} +inline void GraphNodeProto::_internal_set_total_peak_bytes(int64_t value) { + + _impl_.total_peak_bytes_ = value; +} +inline void GraphNodeProto::set_total_peak_bytes(int64_t value) { + _internal_set_total_peak_bytes(value); + // @@protoc_insertion_point(field_set:tensorflow.tfprof.GraphNodeProto.total_peak_bytes) +} + +// int64 total_residual_bytes = 28; +inline void GraphNodeProto::clear_total_residual_bytes() { + _impl_.total_residual_bytes_ = int64_t{0}; +} +inline int64_t GraphNodeProto::_internal_total_residual_bytes() const { + return _impl_.total_residual_bytes_; +} +inline int64_t GraphNodeProto::total_residual_bytes() const { + // @@protoc_insertion_point(field_get:tensorflow.tfprof.GraphNodeProto.total_residual_bytes) + return _internal_total_residual_bytes(); +} +inline void GraphNodeProto::_internal_set_total_residual_bytes(int64_t value) { + + _impl_.total_residual_bytes_ = value; +} +inline void GraphNodeProto::set_total_residual_bytes(int64_t value) { + _internal_set_total_residual_bytes(value); + // @@protoc_insertion_point(field_set:tensorflow.tfprof.GraphNodeProto.total_residual_bytes) +} + +// int64 total_output_bytes = 29; +inline void GraphNodeProto::clear_total_output_bytes() { + _impl_.total_output_bytes_ = int64_t{0}; +} +inline int64_t GraphNodeProto::_internal_total_output_bytes() const { + return _impl_.total_output_bytes_; +} +inline int64_t GraphNodeProto::total_output_bytes() const { + // @@protoc_insertion_point(field_get:tensorflow.tfprof.GraphNodeProto.total_output_bytes) + return _internal_total_output_bytes(); +} +inline void GraphNodeProto::_internal_set_total_output_bytes(int64_t value) { + + _impl_.total_output_bytes_ = value; +} +inline void GraphNodeProto::set_total_output_bytes(int64_t value) { + _internal_set_total_output_bytes(value); + // @@protoc_insertion_point(field_set:tensorflow.tfprof.GraphNodeProto.total_output_bytes) +} + +// int64 total_parameters = 8; +inline void GraphNodeProto::clear_total_parameters() { + _impl_.total_parameters_ = int64_t{0}; +} +inline int64_t GraphNodeProto::_internal_total_parameters() const { + return _impl_.total_parameters_; +} +inline int64_t GraphNodeProto::total_parameters() const { + // @@protoc_insertion_point(field_get:tensorflow.tfprof.GraphNodeProto.total_parameters) + return _internal_total_parameters(); +} +inline void GraphNodeProto::_internal_set_total_parameters(int64_t value) { + + _impl_.total_parameters_ = value; +} +inline void GraphNodeProto::set_total_parameters(int64_t value) { + _internal_set_total_parameters(value); + // @@protoc_insertion_point(field_set:tensorflow.tfprof.GraphNodeProto.total_parameters) +} + +// int64 total_float_ops = 14; +inline void GraphNodeProto::clear_total_float_ops() { + _impl_.total_float_ops_ = int64_t{0}; +} +inline int64_t GraphNodeProto::_internal_total_float_ops() const { + return _impl_.total_float_ops_; +} +inline int64_t GraphNodeProto::total_float_ops() const { + // @@protoc_insertion_point(field_get:tensorflow.tfprof.GraphNodeProto.total_float_ops) + return _internal_total_float_ops(); +} +inline void GraphNodeProto::_internal_set_total_float_ops(int64_t value) { + + _impl_.total_float_ops_ = value; +} +inline void GraphNodeProto::set_total_float_ops(int64_t value) { + _internal_set_total_float_ops(value); + // @@protoc_insertion_point(field_set:tensorflow.tfprof.GraphNodeProto.total_float_ops) +} + +// repeated .tensorflow.TensorShapeProto shapes = 11; +inline int GraphNodeProto::_internal_shapes_size() const { + return _impl_.shapes_.size(); +} +inline int GraphNodeProto::shapes_size() const { + return _internal_shapes_size(); +} +inline ::tensorflow::TensorShapeProto* GraphNodeProto::mutable_shapes(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.tfprof.GraphNodeProto.shapes) + return _impl_.shapes_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::TensorShapeProto >* +GraphNodeProto::mutable_shapes() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.tfprof.GraphNodeProto.shapes) + return &_impl_.shapes_; +} +inline const ::tensorflow::TensorShapeProto& GraphNodeProto::_internal_shapes(int index) const { + return _impl_.shapes_.Get(index); +} +inline const ::tensorflow::TensorShapeProto& GraphNodeProto::shapes(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.tfprof.GraphNodeProto.shapes) + return _internal_shapes(index); +} +inline ::tensorflow::TensorShapeProto* GraphNodeProto::_internal_add_shapes() { + return _impl_.shapes_.Add(); +} +inline ::tensorflow::TensorShapeProto* GraphNodeProto::add_shapes() { + ::tensorflow::TensorShapeProto* _add = _internal_add_shapes(); + // @@protoc_insertion_point(field_add:tensorflow.tfprof.GraphNodeProto.shapes) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::TensorShapeProto >& +GraphNodeProto::shapes() const { + // @@protoc_insertion_point(field_list:tensorflow.tfprof.GraphNodeProto.shapes) + return _impl_.shapes_; +} + +// map input_shapes = 16; +inline int GraphNodeProto::_internal_input_shapes_size() const { + return _impl_.input_shapes_.size(); +} +inline int GraphNodeProto::input_shapes_size() const { + return _internal_input_shapes_size(); +} +inline const ::PROTOBUF_NAMESPACE_ID::Map< int32_t, ::tensorflow::TensorShapeProto >& +GraphNodeProto::_internal_input_shapes() const { + return _impl_.input_shapes_.GetMap(); +} +inline const ::PROTOBUF_NAMESPACE_ID::Map< int32_t, ::tensorflow::TensorShapeProto >& +GraphNodeProto::input_shapes() const { + // @@protoc_insertion_point(field_map:tensorflow.tfprof.GraphNodeProto.input_shapes) + return _internal_input_shapes(); +} +inline ::PROTOBUF_NAMESPACE_ID::Map< int32_t, ::tensorflow::TensorShapeProto >* +GraphNodeProto::_internal_mutable_input_shapes() { + return _impl_.input_shapes_.MutableMap(); +} +inline ::PROTOBUF_NAMESPACE_ID::Map< int32_t, ::tensorflow::TensorShapeProto >* +GraphNodeProto::mutable_input_shapes() { + // @@protoc_insertion_point(field_mutable_map:tensorflow.tfprof.GraphNodeProto.input_shapes) + return _internal_mutable_input_shapes(); +} + +// repeated .tensorflow.tfprof.GraphNodeProto children = 12; +inline int GraphNodeProto::_internal_children_size() const { + return _impl_.children_.size(); +} +inline int GraphNodeProto::children_size() const { + return _internal_children_size(); +} +inline void GraphNodeProto::clear_children() { + _impl_.children_.Clear(); +} +inline ::tensorflow::tfprof::GraphNodeProto* GraphNodeProto::mutable_children(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.tfprof.GraphNodeProto.children) + return _impl_.children_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::tfprof::GraphNodeProto >* +GraphNodeProto::mutable_children() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.tfprof.GraphNodeProto.children) + return &_impl_.children_; +} +inline const ::tensorflow::tfprof::GraphNodeProto& GraphNodeProto::_internal_children(int index) const { + return _impl_.children_.Get(index); +} +inline const ::tensorflow::tfprof::GraphNodeProto& GraphNodeProto::children(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.tfprof.GraphNodeProto.children) + return _internal_children(index); +} +inline ::tensorflow::tfprof::GraphNodeProto* GraphNodeProto::_internal_add_children() { + return _impl_.children_.Add(); +} +inline ::tensorflow::tfprof::GraphNodeProto* GraphNodeProto::add_children() { + ::tensorflow::tfprof::GraphNodeProto* _add = _internal_add_children(); + // @@protoc_insertion_point(field_add:tensorflow.tfprof.GraphNodeProto.children) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::tfprof::GraphNodeProto >& +GraphNodeProto::children() const { + // @@protoc_insertion_point(field_list:tensorflow.tfprof.GraphNodeProto.children) + return _impl_.children_; +} + +// ------------------------------------------------------------------- + +// MultiGraphNodeProto + +// string name = 1; +inline void MultiGraphNodeProto::clear_name() { + _impl_.name_.ClearToEmpty(); +} +inline const std::string& MultiGraphNodeProto::name() const { + // @@protoc_insertion_point(field_get:tensorflow.tfprof.MultiGraphNodeProto.name) + return _internal_name(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void MultiGraphNodeProto::set_name(ArgT0&& arg0, ArgT... args) { + + _impl_.name_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.tfprof.MultiGraphNodeProto.name) +} +inline std::string* MultiGraphNodeProto::mutable_name() { + std::string* _s = _internal_mutable_name(); + // @@protoc_insertion_point(field_mutable:tensorflow.tfprof.MultiGraphNodeProto.name) + return _s; +} +inline const std::string& MultiGraphNodeProto::_internal_name() const { + return _impl_.name_.Get(); +} +inline void MultiGraphNodeProto::_internal_set_name(const std::string& value) { + + _impl_.name_.Set(value, GetArenaForAllocation()); +} +inline std::string* MultiGraphNodeProto::_internal_mutable_name() { + + return _impl_.name_.Mutable(GetArenaForAllocation()); +} +inline std::string* MultiGraphNodeProto::release_name() { + // @@protoc_insertion_point(field_release:tensorflow.tfprof.MultiGraphNodeProto.name) + return _impl_.name_.Release(); +} +inline void MultiGraphNodeProto::set_allocated_name(std::string* name) { + if (name != nullptr) { + + } else { + + } + _impl_.name_.SetAllocated(name, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.name_.IsDefault()) { + _impl_.name_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.tfprof.MultiGraphNodeProto.name) +} + +// int64 exec_micros = 2; +inline void MultiGraphNodeProto::clear_exec_micros() { + _impl_.exec_micros_ = int64_t{0}; +} +inline int64_t MultiGraphNodeProto::_internal_exec_micros() const { + return _impl_.exec_micros_; +} +inline int64_t MultiGraphNodeProto::exec_micros() const { + // @@protoc_insertion_point(field_get:tensorflow.tfprof.MultiGraphNodeProto.exec_micros) + return _internal_exec_micros(); +} +inline void MultiGraphNodeProto::_internal_set_exec_micros(int64_t value) { + + _impl_.exec_micros_ = value; +} +inline void MultiGraphNodeProto::set_exec_micros(int64_t value) { + _internal_set_exec_micros(value); + // @@protoc_insertion_point(field_set:tensorflow.tfprof.MultiGraphNodeProto.exec_micros) +} + +// int64 accelerator_exec_micros = 12; +inline void MultiGraphNodeProto::clear_accelerator_exec_micros() { + _impl_.accelerator_exec_micros_ = int64_t{0}; +} +inline int64_t MultiGraphNodeProto::_internal_accelerator_exec_micros() const { + return _impl_.accelerator_exec_micros_; +} +inline int64_t MultiGraphNodeProto::accelerator_exec_micros() const { + // @@protoc_insertion_point(field_get:tensorflow.tfprof.MultiGraphNodeProto.accelerator_exec_micros) + return _internal_accelerator_exec_micros(); +} +inline void MultiGraphNodeProto::_internal_set_accelerator_exec_micros(int64_t value) { + + _impl_.accelerator_exec_micros_ = value; +} +inline void MultiGraphNodeProto::set_accelerator_exec_micros(int64_t value) { + _internal_set_accelerator_exec_micros(value); + // @@protoc_insertion_point(field_set:tensorflow.tfprof.MultiGraphNodeProto.accelerator_exec_micros) +} + +// int64 cpu_exec_micros = 13; +inline void MultiGraphNodeProto::clear_cpu_exec_micros() { + _impl_.cpu_exec_micros_ = int64_t{0}; +} +inline int64_t MultiGraphNodeProto::_internal_cpu_exec_micros() const { + return _impl_.cpu_exec_micros_; +} +inline int64_t MultiGraphNodeProto::cpu_exec_micros() const { + // @@protoc_insertion_point(field_get:tensorflow.tfprof.MultiGraphNodeProto.cpu_exec_micros) + return _internal_cpu_exec_micros(); +} +inline void MultiGraphNodeProto::_internal_set_cpu_exec_micros(int64_t value) { + + _impl_.cpu_exec_micros_ = value; +} +inline void MultiGraphNodeProto::set_cpu_exec_micros(int64_t value) { + _internal_set_cpu_exec_micros(value); + // @@protoc_insertion_point(field_set:tensorflow.tfprof.MultiGraphNodeProto.cpu_exec_micros) +} + +// int64 requested_bytes = 3; +inline void MultiGraphNodeProto::clear_requested_bytes() { + _impl_.requested_bytes_ = int64_t{0}; +} +inline int64_t MultiGraphNodeProto::_internal_requested_bytes() const { + return _impl_.requested_bytes_; +} +inline int64_t MultiGraphNodeProto::requested_bytes() const { + // @@protoc_insertion_point(field_get:tensorflow.tfprof.MultiGraphNodeProto.requested_bytes) + return _internal_requested_bytes(); +} +inline void MultiGraphNodeProto::_internal_set_requested_bytes(int64_t value) { + + _impl_.requested_bytes_ = value; +} +inline void MultiGraphNodeProto::set_requested_bytes(int64_t value) { + _internal_set_requested_bytes(value); + // @@protoc_insertion_point(field_set:tensorflow.tfprof.MultiGraphNodeProto.requested_bytes) +} + +// int64 peak_bytes = 16; +inline void MultiGraphNodeProto::clear_peak_bytes() { + _impl_.peak_bytes_ = int64_t{0}; +} +inline int64_t MultiGraphNodeProto::_internal_peak_bytes() const { + return _impl_.peak_bytes_; +} +inline int64_t MultiGraphNodeProto::peak_bytes() const { + // @@protoc_insertion_point(field_get:tensorflow.tfprof.MultiGraphNodeProto.peak_bytes) + return _internal_peak_bytes(); +} +inline void MultiGraphNodeProto::_internal_set_peak_bytes(int64_t value) { + + _impl_.peak_bytes_ = value; +} +inline void MultiGraphNodeProto::set_peak_bytes(int64_t value) { + _internal_set_peak_bytes(value); + // @@protoc_insertion_point(field_set:tensorflow.tfprof.MultiGraphNodeProto.peak_bytes) +} + +// int64 residual_bytes = 17; +inline void MultiGraphNodeProto::clear_residual_bytes() { + _impl_.residual_bytes_ = int64_t{0}; +} +inline int64_t MultiGraphNodeProto::_internal_residual_bytes() const { + return _impl_.residual_bytes_; +} +inline int64_t MultiGraphNodeProto::residual_bytes() const { + // @@protoc_insertion_point(field_get:tensorflow.tfprof.MultiGraphNodeProto.residual_bytes) + return _internal_residual_bytes(); +} +inline void MultiGraphNodeProto::_internal_set_residual_bytes(int64_t value) { + + _impl_.residual_bytes_ = value; +} +inline void MultiGraphNodeProto::set_residual_bytes(int64_t value) { + _internal_set_residual_bytes(value); + // @@protoc_insertion_point(field_set:tensorflow.tfprof.MultiGraphNodeProto.residual_bytes) +} + +// int64 output_bytes = 18; +inline void MultiGraphNodeProto::clear_output_bytes() { + _impl_.output_bytes_ = int64_t{0}; +} +inline int64_t MultiGraphNodeProto::_internal_output_bytes() const { + return _impl_.output_bytes_; +} +inline int64_t MultiGraphNodeProto::output_bytes() const { + // @@protoc_insertion_point(field_get:tensorflow.tfprof.MultiGraphNodeProto.output_bytes) + return _internal_output_bytes(); +} +inline void MultiGraphNodeProto::_internal_set_output_bytes(int64_t value) { + + _impl_.output_bytes_ = value; +} +inline void MultiGraphNodeProto::set_output_bytes(int64_t value) { + _internal_set_output_bytes(value); + // @@protoc_insertion_point(field_set:tensorflow.tfprof.MultiGraphNodeProto.output_bytes) +} + +// int64 parameters = 4; +inline void MultiGraphNodeProto::clear_parameters() { + _impl_.parameters_ = int64_t{0}; +} +inline int64_t MultiGraphNodeProto::_internal_parameters() const { + return _impl_.parameters_; +} +inline int64_t MultiGraphNodeProto::parameters() const { + // @@protoc_insertion_point(field_get:tensorflow.tfprof.MultiGraphNodeProto.parameters) + return _internal_parameters(); +} +inline void MultiGraphNodeProto::_internal_set_parameters(int64_t value) { + + _impl_.parameters_ = value; +} +inline void MultiGraphNodeProto::set_parameters(int64_t value) { + _internal_set_parameters(value); + // @@protoc_insertion_point(field_set:tensorflow.tfprof.MultiGraphNodeProto.parameters) +} + +// int64 float_ops = 5; +inline void MultiGraphNodeProto::clear_float_ops() { + _impl_.float_ops_ = int64_t{0}; +} +inline int64_t MultiGraphNodeProto::_internal_float_ops() const { + return _impl_.float_ops_; +} +inline int64_t MultiGraphNodeProto::float_ops() const { + // @@protoc_insertion_point(field_get:tensorflow.tfprof.MultiGraphNodeProto.float_ops) + return _internal_float_ops(); +} +inline void MultiGraphNodeProto::_internal_set_float_ops(int64_t value) { + + _impl_.float_ops_ = value; +} +inline void MultiGraphNodeProto::set_float_ops(int64_t value) { + _internal_set_float_ops(value); + // @@protoc_insertion_point(field_set:tensorflow.tfprof.MultiGraphNodeProto.float_ops) +} + +// int64 total_exec_micros = 6; +inline void MultiGraphNodeProto::clear_total_exec_micros() { + _impl_.total_exec_micros_ = int64_t{0}; +} +inline int64_t MultiGraphNodeProto::_internal_total_exec_micros() const { + return _impl_.total_exec_micros_; +} +inline int64_t MultiGraphNodeProto::total_exec_micros() const { + // @@protoc_insertion_point(field_get:tensorflow.tfprof.MultiGraphNodeProto.total_exec_micros) + return _internal_total_exec_micros(); +} +inline void MultiGraphNodeProto::_internal_set_total_exec_micros(int64_t value) { + + _impl_.total_exec_micros_ = value; +} +inline void MultiGraphNodeProto::set_total_exec_micros(int64_t value) { + _internal_set_total_exec_micros(value); + // @@protoc_insertion_point(field_set:tensorflow.tfprof.MultiGraphNodeProto.total_exec_micros) +} + +// int64 total_accelerator_exec_micros = 14; +inline void MultiGraphNodeProto::clear_total_accelerator_exec_micros() { + _impl_.total_accelerator_exec_micros_ = int64_t{0}; +} +inline int64_t MultiGraphNodeProto::_internal_total_accelerator_exec_micros() const { + return _impl_.total_accelerator_exec_micros_; +} +inline int64_t MultiGraphNodeProto::total_accelerator_exec_micros() const { + // @@protoc_insertion_point(field_get:tensorflow.tfprof.MultiGraphNodeProto.total_accelerator_exec_micros) + return _internal_total_accelerator_exec_micros(); +} +inline void MultiGraphNodeProto::_internal_set_total_accelerator_exec_micros(int64_t value) { + + _impl_.total_accelerator_exec_micros_ = value; +} +inline void MultiGraphNodeProto::set_total_accelerator_exec_micros(int64_t value) { + _internal_set_total_accelerator_exec_micros(value); + // @@protoc_insertion_point(field_set:tensorflow.tfprof.MultiGraphNodeProto.total_accelerator_exec_micros) +} + +// int64 total_cpu_exec_micros = 15; +inline void MultiGraphNodeProto::clear_total_cpu_exec_micros() { + _impl_.total_cpu_exec_micros_ = int64_t{0}; +} +inline int64_t MultiGraphNodeProto::_internal_total_cpu_exec_micros() const { + return _impl_.total_cpu_exec_micros_; +} +inline int64_t MultiGraphNodeProto::total_cpu_exec_micros() const { + // @@protoc_insertion_point(field_get:tensorflow.tfprof.MultiGraphNodeProto.total_cpu_exec_micros) + return _internal_total_cpu_exec_micros(); +} +inline void MultiGraphNodeProto::_internal_set_total_cpu_exec_micros(int64_t value) { + + _impl_.total_cpu_exec_micros_ = value; +} +inline void MultiGraphNodeProto::set_total_cpu_exec_micros(int64_t value) { + _internal_set_total_cpu_exec_micros(value); + // @@protoc_insertion_point(field_set:tensorflow.tfprof.MultiGraphNodeProto.total_cpu_exec_micros) +} + +// int64 total_requested_bytes = 7; +inline void MultiGraphNodeProto::clear_total_requested_bytes() { + _impl_.total_requested_bytes_ = int64_t{0}; +} +inline int64_t MultiGraphNodeProto::_internal_total_requested_bytes() const { + return _impl_.total_requested_bytes_; +} +inline int64_t MultiGraphNodeProto::total_requested_bytes() const { + // @@protoc_insertion_point(field_get:tensorflow.tfprof.MultiGraphNodeProto.total_requested_bytes) + return _internal_total_requested_bytes(); +} +inline void MultiGraphNodeProto::_internal_set_total_requested_bytes(int64_t value) { + + _impl_.total_requested_bytes_ = value; +} +inline void MultiGraphNodeProto::set_total_requested_bytes(int64_t value) { + _internal_set_total_requested_bytes(value); + // @@protoc_insertion_point(field_set:tensorflow.tfprof.MultiGraphNodeProto.total_requested_bytes) +} + +// int64 total_peak_bytes = 19; +inline void MultiGraphNodeProto::clear_total_peak_bytes() { + _impl_.total_peak_bytes_ = int64_t{0}; +} +inline int64_t MultiGraphNodeProto::_internal_total_peak_bytes() const { + return _impl_.total_peak_bytes_; +} +inline int64_t MultiGraphNodeProto::total_peak_bytes() const { + // @@protoc_insertion_point(field_get:tensorflow.tfprof.MultiGraphNodeProto.total_peak_bytes) + return _internal_total_peak_bytes(); +} +inline void MultiGraphNodeProto::_internal_set_total_peak_bytes(int64_t value) { + + _impl_.total_peak_bytes_ = value; +} +inline void MultiGraphNodeProto::set_total_peak_bytes(int64_t value) { + _internal_set_total_peak_bytes(value); + // @@protoc_insertion_point(field_set:tensorflow.tfprof.MultiGraphNodeProto.total_peak_bytes) +} + +// int64 total_residual_bytes = 20; +inline void MultiGraphNodeProto::clear_total_residual_bytes() { + _impl_.total_residual_bytes_ = int64_t{0}; +} +inline int64_t MultiGraphNodeProto::_internal_total_residual_bytes() const { + return _impl_.total_residual_bytes_; +} +inline int64_t MultiGraphNodeProto::total_residual_bytes() const { + // @@protoc_insertion_point(field_get:tensorflow.tfprof.MultiGraphNodeProto.total_residual_bytes) + return _internal_total_residual_bytes(); +} +inline void MultiGraphNodeProto::_internal_set_total_residual_bytes(int64_t value) { + + _impl_.total_residual_bytes_ = value; +} +inline void MultiGraphNodeProto::set_total_residual_bytes(int64_t value) { + _internal_set_total_residual_bytes(value); + // @@protoc_insertion_point(field_set:tensorflow.tfprof.MultiGraphNodeProto.total_residual_bytes) +} + +// int64 total_output_bytes = 21; +inline void MultiGraphNodeProto::clear_total_output_bytes() { + _impl_.total_output_bytes_ = int64_t{0}; +} +inline int64_t MultiGraphNodeProto::_internal_total_output_bytes() const { + return _impl_.total_output_bytes_; +} +inline int64_t MultiGraphNodeProto::total_output_bytes() const { + // @@protoc_insertion_point(field_get:tensorflow.tfprof.MultiGraphNodeProto.total_output_bytes) + return _internal_total_output_bytes(); +} +inline void MultiGraphNodeProto::_internal_set_total_output_bytes(int64_t value) { + + _impl_.total_output_bytes_ = value; +} +inline void MultiGraphNodeProto::set_total_output_bytes(int64_t value) { + _internal_set_total_output_bytes(value); + // @@protoc_insertion_point(field_set:tensorflow.tfprof.MultiGraphNodeProto.total_output_bytes) +} + +// int64 total_parameters = 8; +inline void MultiGraphNodeProto::clear_total_parameters() { + _impl_.total_parameters_ = int64_t{0}; +} +inline int64_t MultiGraphNodeProto::_internal_total_parameters() const { + return _impl_.total_parameters_; +} +inline int64_t MultiGraphNodeProto::total_parameters() const { + // @@protoc_insertion_point(field_get:tensorflow.tfprof.MultiGraphNodeProto.total_parameters) + return _internal_total_parameters(); +} +inline void MultiGraphNodeProto::_internal_set_total_parameters(int64_t value) { + + _impl_.total_parameters_ = value; +} +inline void MultiGraphNodeProto::set_total_parameters(int64_t value) { + _internal_set_total_parameters(value); + // @@protoc_insertion_point(field_set:tensorflow.tfprof.MultiGraphNodeProto.total_parameters) +} + +// int64 total_float_ops = 9; +inline void MultiGraphNodeProto::clear_total_float_ops() { + _impl_.total_float_ops_ = int64_t{0}; +} +inline int64_t MultiGraphNodeProto::_internal_total_float_ops() const { + return _impl_.total_float_ops_; +} +inline int64_t MultiGraphNodeProto::total_float_ops() const { + // @@protoc_insertion_point(field_get:tensorflow.tfprof.MultiGraphNodeProto.total_float_ops) + return _internal_total_float_ops(); +} +inline void MultiGraphNodeProto::_internal_set_total_float_ops(int64_t value) { + + _impl_.total_float_ops_ = value; +} +inline void MultiGraphNodeProto::set_total_float_ops(int64_t value) { + _internal_set_total_float_ops(value); + // @@protoc_insertion_point(field_set:tensorflow.tfprof.MultiGraphNodeProto.total_float_ops) +} + +// repeated .tensorflow.tfprof.GraphNodeProto graph_nodes = 10; +inline int MultiGraphNodeProto::_internal_graph_nodes_size() const { + return _impl_.graph_nodes_.size(); +} +inline int MultiGraphNodeProto::graph_nodes_size() const { + return _internal_graph_nodes_size(); +} +inline void MultiGraphNodeProto::clear_graph_nodes() { + _impl_.graph_nodes_.Clear(); +} +inline ::tensorflow::tfprof::GraphNodeProto* MultiGraphNodeProto::mutable_graph_nodes(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.tfprof.MultiGraphNodeProto.graph_nodes) + return _impl_.graph_nodes_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::tfprof::GraphNodeProto >* +MultiGraphNodeProto::mutable_graph_nodes() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.tfprof.MultiGraphNodeProto.graph_nodes) + return &_impl_.graph_nodes_; +} +inline const ::tensorflow::tfprof::GraphNodeProto& MultiGraphNodeProto::_internal_graph_nodes(int index) const { + return _impl_.graph_nodes_.Get(index); +} +inline const ::tensorflow::tfprof::GraphNodeProto& MultiGraphNodeProto::graph_nodes(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.tfprof.MultiGraphNodeProto.graph_nodes) + return _internal_graph_nodes(index); +} +inline ::tensorflow::tfprof::GraphNodeProto* MultiGraphNodeProto::_internal_add_graph_nodes() { + return _impl_.graph_nodes_.Add(); +} +inline ::tensorflow::tfprof::GraphNodeProto* MultiGraphNodeProto::add_graph_nodes() { + ::tensorflow::tfprof::GraphNodeProto* _add = _internal_add_graph_nodes(); + // @@protoc_insertion_point(field_add:tensorflow.tfprof.MultiGraphNodeProto.graph_nodes) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::tfprof::GraphNodeProto >& +MultiGraphNodeProto::graph_nodes() const { + // @@protoc_insertion_point(field_list:tensorflow.tfprof.MultiGraphNodeProto.graph_nodes) + return _impl_.graph_nodes_; +} + +// repeated .tensorflow.tfprof.MultiGraphNodeProto children = 11; +inline int MultiGraphNodeProto::_internal_children_size() const { + return _impl_.children_.size(); +} +inline int MultiGraphNodeProto::children_size() const { + return _internal_children_size(); +} +inline void MultiGraphNodeProto::clear_children() { + _impl_.children_.Clear(); +} +inline ::tensorflow::tfprof::MultiGraphNodeProto* MultiGraphNodeProto::mutable_children(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.tfprof.MultiGraphNodeProto.children) + return _impl_.children_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::tfprof::MultiGraphNodeProto >* +MultiGraphNodeProto::mutable_children() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.tfprof.MultiGraphNodeProto.children) + return &_impl_.children_; +} +inline const ::tensorflow::tfprof::MultiGraphNodeProto& MultiGraphNodeProto::_internal_children(int index) const { + return _impl_.children_.Get(index); +} +inline const ::tensorflow::tfprof::MultiGraphNodeProto& MultiGraphNodeProto::children(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.tfprof.MultiGraphNodeProto.children) + return _internal_children(index); +} +inline ::tensorflow::tfprof::MultiGraphNodeProto* MultiGraphNodeProto::_internal_add_children() { + return _impl_.children_.Add(); +} +inline ::tensorflow::tfprof::MultiGraphNodeProto* MultiGraphNodeProto::add_children() { + ::tensorflow::tfprof::MultiGraphNodeProto* _add = _internal_add_children(); + // @@protoc_insertion_point(field_add:tensorflow.tfprof.MultiGraphNodeProto.children) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::tfprof::MultiGraphNodeProto >& +MultiGraphNodeProto::children() const { + // @@protoc_insertion_point(field_list:tensorflow.tfprof.MultiGraphNodeProto.children) + return _impl_.children_; +} + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// AdviceProto_Checker + +// repeated string reports = 2; +inline int AdviceProto_Checker::_internal_reports_size() const { + return _impl_.reports_.size(); +} +inline int AdviceProto_Checker::reports_size() const { + return _internal_reports_size(); +} +inline void AdviceProto_Checker::clear_reports() { + _impl_.reports_.Clear(); +} +inline std::string* AdviceProto_Checker::add_reports() { + std::string* _s = _internal_add_reports(); + // @@protoc_insertion_point(field_add_mutable:tensorflow.tfprof.AdviceProto.Checker.reports) + return _s; +} +inline const std::string& AdviceProto_Checker::_internal_reports(int index) const { + return _impl_.reports_.Get(index); +} +inline const std::string& AdviceProto_Checker::reports(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.tfprof.AdviceProto.Checker.reports) + return _internal_reports(index); +} +inline std::string* AdviceProto_Checker::mutable_reports(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.tfprof.AdviceProto.Checker.reports) + return _impl_.reports_.Mutable(index); +} +inline void AdviceProto_Checker::set_reports(int index, const std::string& value) { + _impl_.reports_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set:tensorflow.tfprof.AdviceProto.Checker.reports) +} +inline void AdviceProto_Checker::set_reports(int index, std::string&& value) { + _impl_.reports_.Mutable(index)->assign(std::move(value)); + // @@protoc_insertion_point(field_set:tensorflow.tfprof.AdviceProto.Checker.reports) +} +inline void AdviceProto_Checker::set_reports(int index, const char* value) { + GOOGLE_DCHECK(value != nullptr); + _impl_.reports_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set_char:tensorflow.tfprof.AdviceProto.Checker.reports) +} +inline void AdviceProto_Checker::set_reports(int index, const char* value, size_t size) { + _impl_.reports_.Mutable(index)->assign( + reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:tensorflow.tfprof.AdviceProto.Checker.reports) +} +inline std::string* AdviceProto_Checker::_internal_add_reports() { + return _impl_.reports_.Add(); +} +inline void AdviceProto_Checker::add_reports(const std::string& value) { + _impl_.reports_.Add()->assign(value); + // @@protoc_insertion_point(field_add:tensorflow.tfprof.AdviceProto.Checker.reports) +} +inline void AdviceProto_Checker::add_reports(std::string&& value) { + _impl_.reports_.Add(std::move(value)); + // @@protoc_insertion_point(field_add:tensorflow.tfprof.AdviceProto.Checker.reports) +} +inline void AdviceProto_Checker::add_reports(const char* value) { + GOOGLE_DCHECK(value != nullptr); + _impl_.reports_.Add()->assign(value); + // @@protoc_insertion_point(field_add_char:tensorflow.tfprof.AdviceProto.Checker.reports) +} +inline void AdviceProto_Checker::add_reports(const char* value, size_t size) { + _impl_.reports_.Add()->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_add_pointer:tensorflow.tfprof.AdviceProto.Checker.reports) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& +AdviceProto_Checker::reports() const { + // @@protoc_insertion_point(field_list:tensorflow.tfprof.AdviceProto.Checker.reports) + return _impl_.reports_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* +AdviceProto_Checker::mutable_reports() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.tfprof.AdviceProto.Checker.reports) + return &_impl_.reports_; +} + +// ------------------------------------------------------------------- + +// AdviceProto + +// map checkers = 1; +inline int AdviceProto::_internal_checkers_size() const { + return _impl_.checkers_.size(); +} +inline int AdviceProto::checkers_size() const { + return _internal_checkers_size(); +} +inline void AdviceProto::clear_checkers() { + _impl_.checkers_.Clear(); +} +inline const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::tfprof::AdviceProto_Checker >& +AdviceProto::_internal_checkers() const { + return _impl_.checkers_.GetMap(); +} +inline const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::tfprof::AdviceProto_Checker >& +AdviceProto::checkers() const { + // @@protoc_insertion_point(field_map:tensorflow.tfprof.AdviceProto.checkers) + return _internal_checkers(); +} +inline ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::tfprof::AdviceProto_Checker >* +AdviceProto::_internal_mutable_checkers() { + return _impl_.checkers_.MutableMap(); +} +inline ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::tfprof::AdviceProto_Checker >* +AdviceProto::mutable_checkers() { + // @@protoc_insertion_point(field_mutable_map:tensorflow.tfprof.AdviceProto.checkers) + return _internal_mutable_checkers(); +} + +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + + +// @@protoc_insertion_point(namespace_scope) + +} // namespace tfprof +} // namespace tensorflow + +// @@protoc_insertion_point(global_scope) + +#include +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprofiler_2ftfprof_5foutput_2eproto diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/profiler/utils/gpu_event_stats.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/profiler/utils/gpu_event_stats.h new file mode 100644 index 0000000000000000000000000000000000000000..2c691dff6de1573925eb68b0360a4656831a877a --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/profiler/utils/gpu_event_stats.h @@ -0,0 +1,78 @@ +/* Copyright 2022 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_PROFILER_UTILS_GPU_EVENT_STATS_H_ +#define TENSORFLOW_CORE_PROFILER_UTILS_GPU_EVENT_STATS_H_ + +#include +#include + +#include "absl/strings/string_view.h" +#include "absl/types/optional.h" +#include "tensorflow/core/profiler/utils/xplane_visitor.h" + +namespace tensorflow { +namespace profiler { + +// Stats from a GPU stream XEvent. +struct GpuEventStats { + explicit GpuEventStats(const XEventVisitor* event); + + bool IsKernel() const { return !kernel_details.empty(); } + bool IsMemCpy() const { return !memcpy_details.empty(); } + + bool IsXlaOp() const { return !hlo_op_names.empty(); } + bool IsTfOp() const { return !tf_op_fullname.empty(); } + + // Stats from TensorFlow. + absl::string_view tf_op_fullname; + absl::string_view equation; + absl::string_view tensor_shapes; + + // Stats from XLA. + std::vector hlo_op_names; + absl::string_view hlo_module_name; + absl::optional program_id; + + // Stats from CUPTI. + absl::string_view kernel_details; + absl::string_view memcpy_details; + absl::optional correlation_id; + + // Stats derived by grouping. + absl::optional group_id; + bool is_eager = false; +}; + +// Stats for a host-side GPU launch XEvent. +struct LaunchEventStats { + explicit LaunchEventStats(const XEventVisitor* event); + + bool IsLaunch() const { + return device_id.has_value() && correlation_id.has_value(); + } + + // Stats from CUPTI. + absl::optional device_id; + absl::optional correlation_id; + + // Stat derived by grouping. + absl::optional group_id; +}; + +} // namespace profiler +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_PROFILER_UTILS_GPU_EVENT_STATS_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/profiler/utils/math_utils.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/profiler/utils/math_utils.h new file mode 100644 index 0000000000000000000000000000000000000000..8a9799fd40ce5a8f479c04d7e161ed6b38e1c827 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/profiler/utils/math_utils.h @@ -0,0 +1,52 @@ +/* Copyright 2019 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_PROFILER_UTILS_MATH_UTILS_H_ +#define TENSORFLOW_CORE_PROFILER_UTILS_MATH_UTILS_H_ + +#include "tsl/profiler/utils/math_utils.h" + +namespace tensorflow { +namespace profiler { + +using tsl::profiler::CyclesToSeconds; // NOLINT +using tsl::profiler::GibibytesPerSecond; // NOLINT +using tsl::profiler::GibiToGiga; // NOLINT +using tsl::profiler::GigaToGibi; // NOLINT +using tsl::profiler::GigaToTera; // NOLINT +using tsl::profiler::GigaToUni; // NOLINT +using tsl::profiler::MicroToMilli; // NOLINT +using tsl::profiler::MicroToNano; // NOLINT +using tsl::profiler::MilliToNano; // NOLINT +using tsl::profiler::MilliToPico; // NOLINT +using tsl::profiler::MilliToUni; // NOLINT +using tsl::profiler::NanoToMicro; // NOLINT +using tsl::profiler::NanoToMilli; // NOLINT +using tsl::profiler::NanoToPico; // NOLINT +using tsl::profiler::PicoToMicro; // NOLINT +using tsl::profiler::PicoToMilli; // NOLINT +using tsl::profiler::PicoToNano; // NOLINT +using tsl::profiler::PicoToUni; // NOLINT +using tsl::profiler::SafeDivide; // NOLINT +using tsl::profiler::TeraToGiga; // NOLINT +using tsl::profiler::UniToGiga; // NOLINT +using tsl::profiler::UniToMicro; // NOLINT +using tsl::profiler::UniToNano; // NOLINT +using tsl::profiler::UniToPico; // NOLINT + +} // namespace profiler +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_PROFILER_UTILS_MATH_UTILS_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/profiler/utils/xplane_schema.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/profiler/utils/xplane_schema.h new file mode 100644 index 0000000000000000000000000000000000000000..4e7c486ccc6161688736e13970d5264318af994e --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/profiler/utils/xplane_schema.h @@ -0,0 +1,77 @@ +/* Copyright 2019 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_PROFILER_UTILS_XPLANE_SCHEMA_H_ +#define TENSORFLOW_CORE_PROFILER_UTILS_XPLANE_SCHEMA_H_ + +#include "tsl/profiler/utils/xplane_schema.h" + +namespace tensorflow { +namespace profiler { + +using tsl::profiler::FindHostEventType; // NOLINT +using tsl::profiler::FindStatType; // NOLINT +using tsl::profiler::FindTfOpEventType; // NOLINT +using tsl::profiler::GetHostEventTypeStr; // NOLINT +using tsl::profiler::GetStatTypeStr; // NOLINT +using tsl::profiler::GpuPlaneName; // NOLINT +using tsl::profiler::HostEventType; // NOLINT +using tsl::profiler::IsHostEventType; // NOLINT +using tsl::profiler::IsInternalEvent; // NOLINT +using tsl::profiler::IsInternalStat; // NOLINT +using tsl::profiler::IsStatType; // NOLINT +using tsl::profiler::kCuptiDriverApiPlaneName; // NOLINT +using tsl::profiler::kCustomPlanePrefix; // NOLINT +using tsl::profiler::kDeviceVendorAMD; // NOLINT +using tsl::profiler::kDeviceVendorNvidia; // NOLINT +using tsl::profiler::kGpuPlanePrefix; // NOLINT +using tsl::profiler::kHostThreadsPlaneName; // NOLINT +using tsl::profiler::kKernelLaunchLineName; // NOLINT +using tsl::profiler::kMegaScaleBarrier; // NOLINT +using tsl::profiler::kMegaScaleD2HTransferFinished; // NOLINT +using tsl::profiler::kMegaScaleD2HTransferStart; // NOLINT +using tsl::profiler::kMegaScaleDcnReceive; // NOLINT +using tsl::profiler::kMegaScaleDcnSend; // NOLINT +using tsl::profiler::kMegaScaleDcnSendFinished; // NOLINT +using tsl::profiler::kMegaScaleH2DTransferFinished; // NOLINT +using tsl::profiler::kMegaScaleH2DTransferStart; // NOLINT +using tsl::profiler::kMegaScaleHostCommand; // NOLINT +using tsl::profiler::kMegaScaleTopologyDiscovery; // NOLINT +using tsl::profiler::kMetadataPlaneName; // NOLINT +using tsl::profiler::kPythonTracerPlaneName; // NOLINT +using tsl::profiler::kRoctracerApiPlaneName; // NOLINT +using tsl::profiler::kSourceLineName; // NOLINT +using tsl::profiler::kStepLineName; // NOLINT +using tsl::profiler::kTensorFlowNameScopeLineName; // NOLINT +using tsl::profiler::kTensorFlowOpLineName; // NOLINT +using tsl::profiler::kTFStreamzPlaneName; // NOLINT +using tsl::profiler::kTpuPlanePrefix; // NOLINT +using tsl::profiler::kTpuPlaneRegex; // NOLINT +using tsl::profiler::kTpuRuntimePlaneName; // NOLINT +using tsl::profiler::kXlaAsyncOpLineName; // NOLINT +using tsl::profiler::kXlaModuleLineName; // NOLINT +using tsl::profiler::kXlaOpLineName; // NOLINT +using tsl::profiler::kXProfMetadataBufferSize; // NOLINT +using tsl::profiler::kXProfMetadataFlow; // NOLINT +using tsl::profiler::kXProfMetadataKey; // NOLINT +using tsl::profiler::kXProfMetadataTransfers; // NOLINT +using tsl::profiler::StatType; // NOLINT +using tsl::profiler::TpuPlaneName; // NOLINT +using tsl::profiler::XFlow; // NOLINT + +} // namespace profiler +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_PROFILER_UTILS_XPLANE_SCHEMA_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/profiler/utils/xplane_utils.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/profiler/utils/xplane_utils.h new file mode 100644 index 0000000000000000000000000000000000000000..f78350760106b285121cf193bb6a26de869d66da --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/profiler/utils/xplane_utils.h @@ -0,0 +1,65 @@ +/* Copyright 2019 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ +#ifndef TENSORFLOW_CORE_PROFILER_UTILS_XPLANE_UTILS_H_ +#define TENSORFLOW_CORE_PROFILER_UTILS_XPLANE_UTILS_H_ + +#include +#include +#include +#include + +#include "tsl/profiler/utils/xplane_utils.h" + +namespace tensorflow { +namespace profiler { + +using tsl::profiler::AddFlowsToXplane; // NOLINT +using tsl::profiler::AggregateXPlane; // NOLINT +using tsl::profiler::FindLineWithId; // NOLINT +using tsl::profiler::FindLineWithName; // NOLINT +using tsl::profiler::FindMutablePlanes; // NOLINT +using tsl::profiler::FindMutablePlanesWithPrefix; // NOLINT +using tsl::profiler::FindMutablePlaneWithName; // NOLINT +using tsl::profiler::FindOrAddMutablePlaneWithName; // NOLINT +using tsl::profiler::FindOrAddMutableStat; // NOLINT +using tsl::profiler::FindPlanes; // NOLINT +using tsl::profiler::FindPlanesWithNames; // NOLINT +using tsl::profiler::FindPlanesWithPrefix; // NOLINT +using tsl::profiler::FindPlaneWithName; // NOLINT +using tsl::profiler::GetDevicePlaneFingerprint; // NOLINT +using tsl::profiler::GetSortedEvents; // NOLINT +using tsl::profiler::GetStartTimestampNs; // NOLINT +using tsl::profiler::IsEmpty; // NOLINT +using tsl::profiler::MergePlanes; // NOLINT +using tsl::profiler::NormalizeTimestamps; // NOLINT +using tsl::profiler::RemoveEmptyLines; // NOLINT +using tsl::profiler::RemoveEmptyPlanes; // NOLINT +using tsl::profiler::RemoveEvents; // NOLINT +using tsl::profiler::RemoveLine; // NOLINT +using tsl::profiler::RemovePlane; // NOLINT +using tsl::profiler::RemovePlanes; // NOLINT +using tsl::profiler::SortPlanesById; // NOLINT +using tsl::profiler::SortXLinesBy; // NOLINT +using tsl::profiler::SortXPlane; // NOLINT +using tsl::profiler::SortXSpace; // NOLINT +using tsl::profiler::XEventContextTracker; // NOLINT +using tsl::profiler::XEventsComparator; // NOLINT +using tsl::profiler::XEventTimespan; // NOLINT +using tsl::profiler::XLinesComparatorByName; // NOLINT + +} // namespace profiler +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_PROFILER_UTILS_XPLANE_UTILS_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/profiler/utils/xplane_visitor.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/profiler/utils/xplane_visitor.h new file mode 100644 index 0000000000000000000000000000000000000000..deebadbdee5c3b5fffaed88cf206c64e966d0c9e --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/profiler/utils/xplane_visitor.h @@ -0,0 +1,35 @@ +/* Copyright 2019 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ +#ifndef TENSORFLOW_CORE_PROFILER_UTILS_XPLANE_VISITOR_H_ +#define TENSORFLOW_CORE_PROFILER_UTILS_XPLANE_VISITOR_H_ + +#include "tsl/profiler/utils/xplane_visitor.h" + +namespace tensorflow { +namespace profiler { + +using tsl::profiler::TypeGetter; // NOLINT +using tsl::profiler::TypeGetterList; // NOLINT +using tsl::profiler::XEventMetadataVisitor; // NOLINT +using tsl::profiler::XEventVisitor; // NOLINT +using tsl::profiler::XLineVisitor; // NOLINT +using tsl::profiler::XPlaneVisitor; // NOLINT +using tsl::profiler::XStatsOwner; // NOLINT +using tsl::profiler::XStatVisitor; // NOLINT + +} // namespace profiler +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_PROFILER_UTILS_XPLANE_VISITOR_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/autotuning.pb.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/autotuning.pb.h new file mode 100644 index 0000000000000000000000000000000000000000..87d7693aea395a6877ee9804726630f7e39465c4 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/autotuning.pb.h @@ -0,0 +1,75 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/autotuning.proto + +#ifndef GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprotobuf_2fautotuning_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprotobuf_2fautotuning_2eproto + +#include +#include + +#include +#if PROTOBUF_VERSION < 3021000 +#error This file was generated by a newer version of protoc which is +#error incompatible with your Protocol Buffer headers. Please update +#error your headers. +#endif +#if 3021009 < PROTOBUF_MIN_PROTOC_VERSION +#error This file was generated by an older version of protoc which is +#error incompatible with your Protocol Buffer headers. Please +#error regenerate this file with a newer version of protoc. +#endif + +#include +#include +#include +#include +#include +#include +#include +#include // IWYU pragma: export +#include // IWYU pragma: export +#include "xla/autotuning.pb.h" +// @@protoc_insertion_point(includes) +#include +#define PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2fprotobuf_2fautotuning_2eproto +PROTOBUF_NAMESPACE_OPEN +namespace internal { +class AnyMetadata; +} // namespace internal +PROTOBUF_NAMESPACE_CLOSE + +// Internal implementation detail -- do not use these members. +struct TableStruct_tensorflow_2fcore_2fprotobuf_2fautotuning_2eproto { + static const uint32_t offsets[]; +}; +extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_tensorflow_2fcore_2fprotobuf_2fautotuning_2eproto; +PROTOBUF_NAMESPACE_OPEN +PROTOBUF_NAMESPACE_CLOSE +namespace tensorflow { +namespace dummy { + +// =================================================================== + + +// =================================================================== + + +// =================================================================== + +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ + +// @@protoc_insertion_point(namespace_scope) + +} // namespace dummy +} // namespace tensorflow + +// @@protoc_insertion_point(global_scope) + +#include +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprotobuf_2fautotuning_2eproto diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/bfc_memory_map.pb.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/bfc_memory_map.pb.h new file mode 100644 index 0000000000000000000000000000000000000000..d6e8b0994795f4ed62990873b5fe9342263310b4 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/bfc_memory_map.pb.h @@ -0,0 +1,75 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/bfc_memory_map.proto + +#ifndef GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprotobuf_2fbfc_5fmemory_5fmap_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprotobuf_2fbfc_5fmemory_5fmap_2eproto + +#include +#include + +#include +#if PROTOBUF_VERSION < 3021000 +#error This file was generated by a newer version of protoc which is +#error incompatible with your Protocol Buffer headers. Please update +#error your headers. +#endif +#if 3021009 < PROTOBUF_MIN_PROTOC_VERSION +#error This file was generated by an older version of protoc which is +#error incompatible with your Protocol Buffer headers. Please +#error regenerate this file with a newer version of protoc. +#endif + +#include +#include +#include +#include +#include +#include +#include +#include // IWYU pragma: export +#include // IWYU pragma: export +#include "tsl/protobuf/bfc_memory_map.pb.h" +// @@protoc_insertion_point(includes) +#include +#define PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2fprotobuf_2fbfc_5fmemory_5fmap_2eproto +PROTOBUF_NAMESPACE_OPEN +namespace internal { +class AnyMetadata; +} // namespace internal +PROTOBUF_NAMESPACE_CLOSE + +// Internal implementation detail -- do not use these members. +struct TableStruct_tensorflow_2fcore_2fprotobuf_2fbfc_5fmemory_5fmap_2eproto { + static const uint32_t offsets[]; +}; +extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_tensorflow_2fcore_2fprotobuf_2fbfc_5fmemory_5fmap_2eproto; +PROTOBUF_NAMESPACE_OPEN +PROTOBUF_NAMESPACE_CLOSE +namespace tensorflow { +namespace dummy { + +// =================================================================== + + +// =================================================================== + + +// =================================================================== + +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ + +// @@protoc_insertion_point(namespace_scope) + +} // namespace dummy +} // namespace tensorflow + +// @@protoc_insertion_point(global_scope) + +#include +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprotobuf_2fbfc_5fmemory_5fmap_2eproto diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/bfc_memory_map.proto b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/bfc_memory_map.proto new file mode 100644 index 0000000000000000000000000000000000000000..2dbcbf00bc61028231a18316b1021bae33c48a8d --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/bfc_memory_map.proto @@ -0,0 +1,7 @@ +syntax = "proto3"; + +package tensorflow.dummy; + +import public "tsl/protobuf/bfc_memory_map.proto"; + +option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/protobuf/for_core_protos_go_proto"; diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/cluster.pb.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/cluster.pb.h new file mode 100644 index 0000000000000000000000000000000000000000..e944a465069d3021349d134846c1e4795a8e66cf --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/cluster.pb.h @@ -0,0 +1,581 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/cluster.proto + +#ifndef GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprotobuf_2fcluster_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprotobuf_2fcluster_2eproto + +#include +#include + +#include +#if PROTOBUF_VERSION < 3021000 +#error This file was generated by a newer version of protoc which is +#error incompatible with your Protocol Buffer headers. Please update +#error your headers. +#endif +#if 3021009 < PROTOBUF_MIN_PROTOC_VERSION +#error This file was generated by an older version of protoc which is +#error incompatible with your Protocol Buffer headers. Please +#error regenerate this file with a newer version of protoc. +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include // IWYU pragma: export +#include // IWYU pragma: export +#include // IWYU pragma: export +#include +#include +#include +// @@protoc_insertion_point(includes) +#include +#define PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2fprotobuf_2fcluster_2eproto +PROTOBUF_NAMESPACE_OPEN +namespace internal { +class AnyMetadata; +} // namespace internal +PROTOBUF_NAMESPACE_CLOSE + +// Internal implementation detail -- do not use these members. +struct TableStruct_tensorflow_2fcore_2fprotobuf_2fcluster_2eproto { + static const uint32_t offsets[]; +}; +extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_tensorflow_2fcore_2fprotobuf_2fcluster_2eproto; +namespace tensorflow { +class ClusterDef; +struct ClusterDefDefaultTypeInternal; +extern ClusterDefDefaultTypeInternal _ClusterDef_default_instance_; +class JobDef; +struct JobDefDefaultTypeInternal; +extern JobDefDefaultTypeInternal _JobDef_default_instance_; +class JobDef_TasksEntry_DoNotUse; +struct JobDef_TasksEntry_DoNotUseDefaultTypeInternal; +extern JobDef_TasksEntry_DoNotUseDefaultTypeInternal _JobDef_TasksEntry_DoNotUse_default_instance_; +} // namespace tensorflow +PROTOBUF_NAMESPACE_OPEN +template<> ::tensorflow::ClusterDef* Arena::CreateMaybeMessage<::tensorflow::ClusterDef>(Arena*); +template<> ::tensorflow::JobDef* Arena::CreateMaybeMessage<::tensorflow::JobDef>(Arena*); +template<> ::tensorflow::JobDef_TasksEntry_DoNotUse* Arena::CreateMaybeMessage<::tensorflow::JobDef_TasksEntry_DoNotUse>(Arena*); +PROTOBUF_NAMESPACE_CLOSE +namespace tensorflow { + +// =================================================================== + +class JobDef_TasksEntry_DoNotUse : public ::PROTOBUF_NAMESPACE_ID::internal::MapEntry { +public: + typedef ::PROTOBUF_NAMESPACE_ID::internal::MapEntry SuperType; + JobDef_TasksEntry_DoNotUse(); + explicit PROTOBUF_CONSTEXPR JobDef_TasksEntry_DoNotUse( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + explicit JobDef_TasksEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena); + void MergeFrom(const JobDef_TasksEntry_DoNotUse& other); + static const JobDef_TasksEntry_DoNotUse* internal_default_instance() { return reinterpret_cast(&_JobDef_TasksEntry_DoNotUse_default_instance_); } + static bool ValidateKey(void*) { return true; } + static bool ValidateValue(std::string* s) { + return ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(s->data(), static_cast(s->size()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, "tensorflow.JobDef.TasksEntry.value"); + } + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fcluster_2eproto; +}; + +// ------------------------------------------------------------------- + +class JobDef final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.JobDef) */ { + public: + inline JobDef() : JobDef(nullptr) {} + ~JobDef() override; + explicit PROTOBUF_CONSTEXPR JobDef(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + JobDef(const JobDef& from); + JobDef(JobDef&& from) noexcept + : JobDef() { + *this = ::std::move(from); + } + + inline JobDef& operator=(const JobDef& from) { + CopyFrom(from); + return *this; + } + inline JobDef& operator=(JobDef&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const JobDef& default_instance() { + return *internal_default_instance(); + } + static inline const JobDef* internal_default_instance() { + return reinterpret_cast( + &_JobDef_default_instance_); + } + static constexpr int kIndexInFileMessages = + 1; + + friend void swap(JobDef& a, JobDef& b) { + a.Swap(&b); + } + inline void Swap(JobDef* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(JobDef* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + JobDef* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const JobDef& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const JobDef& from) { + JobDef::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(JobDef* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.JobDef"; + } + protected: + explicit JobDef(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + + // accessors ------------------------------------------------------- + + enum : int { + kTasksFieldNumber = 2, + kNameFieldNumber = 1, + }; + // map tasks = 2; + int tasks_size() const; + private: + int _internal_tasks_size() const; + public: + void clear_tasks(); + private: + const ::PROTOBUF_NAMESPACE_ID::Map< int32_t, std::string >& + _internal_tasks() const; + ::PROTOBUF_NAMESPACE_ID::Map< int32_t, std::string >* + _internal_mutable_tasks(); + public: + const ::PROTOBUF_NAMESPACE_ID::Map< int32_t, std::string >& + tasks() const; + ::PROTOBUF_NAMESPACE_ID::Map< int32_t, std::string >* + mutable_tasks(); + + // string name = 1; + void clear_name(); + const std::string& name() const; + template + void set_name(ArgT0&& arg0, ArgT... args); + std::string* mutable_name(); + PROTOBUF_NODISCARD std::string* release_name(); + void set_allocated_name(std::string* name); + private: + const std::string& _internal_name() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_name(const std::string& value); + std::string* _internal_mutable_name(); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.JobDef) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::MapField< + JobDef_TasksEntry_DoNotUse, + int32_t, std::string, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT32, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING> tasks_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fcluster_2eproto; +}; +// ------------------------------------------------------------------- + +class ClusterDef final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.ClusterDef) */ { + public: + inline ClusterDef() : ClusterDef(nullptr) {} + ~ClusterDef() override; + explicit PROTOBUF_CONSTEXPR ClusterDef(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + ClusterDef(const ClusterDef& from); + ClusterDef(ClusterDef&& from) noexcept + : ClusterDef() { + *this = ::std::move(from); + } + + inline ClusterDef& operator=(const ClusterDef& from) { + CopyFrom(from); + return *this; + } + inline ClusterDef& operator=(ClusterDef&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const ClusterDef& default_instance() { + return *internal_default_instance(); + } + static inline const ClusterDef* internal_default_instance() { + return reinterpret_cast( + &_ClusterDef_default_instance_); + } + static constexpr int kIndexInFileMessages = + 2; + + friend void swap(ClusterDef& a, ClusterDef& b) { + a.Swap(&b); + } + inline void Swap(ClusterDef* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(ClusterDef* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + ClusterDef* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const ClusterDef& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const ClusterDef& from) { + ClusterDef::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(ClusterDef* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.ClusterDef"; + } + protected: + explicit ClusterDef(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kJobFieldNumber = 1, + }; + // repeated .tensorflow.JobDef job = 1; + int job_size() const; + private: + int _internal_job_size() const; + public: + void clear_job(); + ::tensorflow::JobDef* mutable_job(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::JobDef >* + mutable_job(); + private: + const ::tensorflow::JobDef& _internal_job(int index) const; + ::tensorflow::JobDef* _internal_add_job(); + public: + const ::tensorflow::JobDef& job(int index) const; + ::tensorflow::JobDef* add_job(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::JobDef >& + job() const; + + // @@protoc_insertion_point(class_scope:tensorflow.ClusterDef) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::JobDef > job_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fcluster_2eproto; +}; +// =================================================================== + + +// =================================================================== + +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// ------------------------------------------------------------------- + +// JobDef + +// string name = 1; +inline void JobDef::clear_name() { + _impl_.name_.ClearToEmpty(); +} +inline const std::string& JobDef::name() const { + // @@protoc_insertion_point(field_get:tensorflow.JobDef.name) + return _internal_name(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void JobDef::set_name(ArgT0&& arg0, ArgT... args) { + + _impl_.name_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.JobDef.name) +} +inline std::string* JobDef::mutable_name() { + std::string* _s = _internal_mutable_name(); + // @@protoc_insertion_point(field_mutable:tensorflow.JobDef.name) + return _s; +} +inline const std::string& JobDef::_internal_name() const { + return _impl_.name_.Get(); +} +inline void JobDef::_internal_set_name(const std::string& value) { + + _impl_.name_.Set(value, GetArenaForAllocation()); +} +inline std::string* JobDef::_internal_mutable_name() { + + return _impl_.name_.Mutable(GetArenaForAllocation()); +} +inline std::string* JobDef::release_name() { + // @@protoc_insertion_point(field_release:tensorflow.JobDef.name) + return _impl_.name_.Release(); +} +inline void JobDef::set_allocated_name(std::string* name) { + if (name != nullptr) { + + } else { + + } + _impl_.name_.SetAllocated(name, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.name_.IsDefault()) { + _impl_.name_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.JobDef.name) +} + +// map tasks = 2; +inline int JobDef::_internal_tasks_size() const { + return _impl_.tasks_.size(); +} +inline int JobDef::tasks_size() const { + return _internal_tasks_size(); +} +inline void JobDef::clear_tasks() { + _impl_.tasks_.Clear(); +} +inline const ::PROTOBUF_NAMESPACE_ID::Map< int32_t, std::string >& +JobDef::_internal_tasks() const { + return _impl_.tasks_.GetMap(); +} +inline const ::PROTOBUF_NAMESPACE_ID::Map< int32_t, std::string >& +JobDef::tasks() const { + // @@protoc_insertion_point(field_map:tensorflow.JobDef.tasks) + return _internal_tasks(); +} +inline ::PROTOBUF_NAMESPACE_ID::Map< int32_t, std::string >* +JobDef::_internal_mutable_tasks() { + return _impl_.tasks_.MutableMap(); +} +inline ::PROTOBUF_NAMESPACE_ID::Map< int32_t, std::string >* +JobDef::mutable_tasks() { + // @@protoc_insertion_point(field_mutable_map:tensorflow.JobDef.tasks) + return _internal_mutable_tasks(); +} + +// ------------------------------------------------------------------- + +// ClusterDef + +// repeated .tensorflow.JobDef job = 1; +inline int ClusterDef::_internal_job_size() const { + return _impl_.job_.size(); +} +inline int ClusterDef::job_size() const { + return _internal_job_size(); +} +inline void ClusterDef::clear_job() { + _impl_.job_.Clear(); +} +inline ::tensorflow::JobDef* ClusterDef::mutable_job(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.ClusterDef.job) + return _impl_.job_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::JobDef >* +ClusterDef::mutable_job() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.ClusterDef.job) + return &_impl_.job_; +} +inline const ::tensorflow::JobDef& ClusterDef::_internal_job(int index) const { + return _impl_.job_.Get(index); +} +inline const ::tensorflow::JobDef& ClusterDef::job(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.ClusterDef.job) + return _internal_job(index); +} +inline ::tensorflow::JobDef* ClusterDef::_internal_add_job() { + return _impl_.job_.Add(); +} +inline ::tensorflow::JobDef* ClusterDef::add_job() { + ::tensorflow::JobDef* _add = _internal_add_job(); + // @@protoc_insertion_point(field_add:tensorflow.ClusterDef.job) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::JobDef >& +ClusterDef::job() const { + // @@protoc_insertion_point(field_list:tensorflow.ClusterDef.job) + return _impl_.job_; +} + +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + + +// @@protoc_insertion_point(namespace_scope) + +} // namespace tensorflow + +// @@protoc_insertion_point(global_scope) + +#include +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprotobuf_2fcluster_2eproto diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/cluster.proto b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/cluster.proto new file mode 100644 index 0000000000000000000000000000000000000000..4065eb4a9edcf1059b20be4fe72d87e045fc1769 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/cluster.proto @@ -0,0 +1,87 @@ +/* Copyright 2016 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +syntax = "proto3"; + +package tensorflow; + +option cc_enable_arenas = true; +option java_outer_classname = "ClusterProtos"; +option java_multiple_files = true; +option java_package = "org.tensorflow.distruntime"; +option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/protobuf/for_core_protos_go_proto"; + +// This file contains protos to be used when defining a TensorFlow +// cluster. +// +// EXAMPLES +// -------- +// +// 1. A single-process cluster, containing "/job:local/task:0". +// +// Cluster: +// job { name: 'local' tasks { key: 0 value: 'localhost:2222' } } +// +// Server: +// cluster { $CLUSTER } job_name: 'local' task_index: 0 +// +// 2. A two-process cluster, containing "/job:local/task:{0,1}". +// +// Cluster: +// job { name: 'local' tasks { key: 0 value: 'localhost:2222' } +// tasks { key: 1 value: 'localhost:2223' } } +// +// Servers: +// cluster { $CLUSTER } job_name: 'local' task_index: 0 +// cluster { $CLUSTER } job_name: 'local' task_index: 1 +// +// 3. A two-job cluster, containing "/job:worker/task:{0,1,2}" and +// "/job:ps/task:{0,1}". +// +// Cluster: +// job { name: 'worker' tasks { key: 0 value: 'worker1:2222' } +// tasks { key: 1 value: 'worker2:2222' } +// tasks { key: 2 value: 'worker3:2222' } } +// job { name: 'ps' tasks { key: 0 value: 'ps0:2222' } +// tasks { key: 1 value: 'ps1:2222' } } +// +// Servers: +// cluster { $CLUSTER } job_name: 'worker' task_index: 0 +// cluster { $CLUSTER } job_name: 'worker' task_index: 1 +// cluster { $CLUSTER } job_name: 'worker' task_index: 2 +// cluster { $CLUSTER } job_name: 'ps' task_index: 0 +// cluster { $CLUSTER } job_name: 'ps' task_index: 1 + +// Defines a single job in a TensorFlow cluster. +message JobDef { + // The name of this job. + string name = 1; + + // Mapping from task ID to "hostname:port" string. + // + // If the `name` field contains "worker", and the `tasks` map contains a + // mapping from 7 to "example.org:2222", then the device prefix + // "/job:worker/task:7" will be assigned to "example.org:2222". + // + // If a job has multiple replicas, host-ports will be comma-delimited, with + // one entry for each replica. + map tasks = 2; +} + +// Defines a TensorFlow cluster as a set of jobs. +message ClusterDef { + // The jobs that comprise the cluster. + repeated JobDef job = 1; +} diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/composite_tensor_variant.pb.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/composite_tensor_variant.pb.h new file mode 100644 index 0000000000000000000000000000000000000000..dffc93f197b71c1e32d6c774a6572964d380ed36 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/composite_tensor_variant.pb.h @@ -0,0 +1,322 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/composite_tensor_variant.proto + +#ifndef GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprotobuf_2fcomposite_5ftensor_5fvariant_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprotobuf_2fcomposite_5ftensor_5fvariant_2eproto + +#include +#include + +#include +#if PROTOBUF_VERSION < 3021000 +#error This file was generated by a newer version of protoc which is +#error incompatible with your Protocol Buffer headers. Please update +#error your headers. +#endif +#if 3021009 < PROTOBUF_MIN_PROTOC_VERSION +#error This file was generated by an older version of protoc which is +#error incompatible with your Protocol Buffer headers. Please +#error regenerate this file with a newer version of protoc. +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include // IWYU pragma: export +#include // IWYU pragma: export +#include +#include "tensorflow/core/protobuf/struct.pb.h" +// @@protoc_insertion_point(includes) +#include +#define PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2fprotobuf_2fcomposite_5ftensor_5fvariant_2eproto +PROTOBUF_NAMESPACE_OPEN +namespace internal { +class AnyMetadata; +} // namespace internal +PROTOBUF_NAMESPACE_CLOSE + +// Internal implementation detail -- do not use these members. +struct TableStruct_tensorflow_2fcore_2fprotobuf_2fcomposite_5ftensor_5fvariant_2eproto { + static const uint32_t offsets[]; +}; +extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_tensorflow_2fcore_2fprotobuf_2fcomposite_5ftensor_5fvariant_2eproto; +namespace tensorflow { +class CompositeTensorVariantMetadata; +struct CompositeTensorVariantMetadataDefaultTypeInternal; +extern CompositeTensorVariantMetadataDefaultTypeInternal _CompositeTensorVariantMetadata_default_instance_; +} // namespace tensorflow +PROTOBUF_NAMESPACE_OPEN +template<> ::tensorflow::CompositeTensorVariantMetadata* Arena::CreateMaybeMessage<::tensorflow::CompositeTensorVariantMetadata>(Arena*); +PROTOBUF_NAMESPACE_CLOSE +namespace tensorflow { + +// =================================================================== + +class CompositeTensorVariantMetadata final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.CompositeTensorVariantMetadata) */ { + public: + inline CompositeTensorVariantMetadata() : CompositeTensorVariantMetadata(nullptr) {} + ~CompositeTensorVariantMetadata() override; + explicit PROTOBUF_CONSTEXPR CompositeTensorVariantMetadata(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + CompositeTensorVariantMetadata(const CompositeTensorVariantMetadata& from); + CompositeTensorVariantMetadata(CompositeTensorVariantMetadata&& from) noexcept + : CompositeTensorVariantMetadata() { + *this = ::std::move(from); + } + + inline CompositeTensorVariantMetadata& operator=(const CompositeTensorVariantMetadata& from) { + CopyFrom(from); + return *this; + } + inline CompositeTensorVariantMetadata& operator=(CompositeTensorVariantMetadata&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const CompositeTensorVariantMetadata& default_instance() { + return *internal_default_instance(); + } + static inline const CompositeTensorVariantMetadata* internal_default_instance() { + return reinterpret_cast( + &_CompositeTensorVariantMetadata_default_instance_); + } + static constexpr int kIndexInFileMessages = + 0; + + friend void swap(CompositeTensorVariantMetadata& a, CompositeTensorVariantMetadata& b) { + a.Swap(&b); + } + inline void Swap(CompositeTensorVariantMetadata* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(CompositeTensorVariantMetadata* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + CompositeTensorVariantMetadata* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const CompositeTensorVariantMetadata& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const CompositeTensorVariantMetadata& from) { + CompositeTensorVariantMetadata::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(CompositeTensorVariantMetadata* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.CompositeTensorVariantMetadata"; + } + protected: + explicit CompositeTensorVariantMetadata(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kTypeSpecProtoFieldNumber = 1, + }; + // .tensorflow.TypeSpecProto type_spec_proto = 1; + bool has_type_spec_proto() const; + private: + bool _internal_has_type_spec_proto() const; + public: + void clear_type_spec_proto(); + const ::tensorflow::TypeSpecProto& type_spec_proto() const; + PROTOBUF_NODISCARD ::tensorflow::TypeSpecProto* release_type_spec_proto(); + ::tensorflow::TypeSpecProto* mutable_type_spec_proto(); + void set_allocated_type_spec_proto(::tensorflow::TypeSpecProto* type_spec_proto); + private: + const ::tensorflow::TypeSpecProto& _internal_type_spec_proto() const; + ::tensorflow::TypeSpecProto* _internal_mutable_type_spec_proto(); + public: + void unsafe_arena_set_allocated_type_spec_proto( + ::tensorflow::TypeSpecProto* type_spec_proto); + ::tensorflow::TypeSpecProto* unsafe_arena_release_type_spec_proto(); + + // @@protoc_insertion_point(class_scope:tensorflow.CompositeTensorVariantMetadata) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::tensorflow::TypeSpecProto* type_spec_proto_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fcomposite_5ftensor_5fvariant_2eproto; +}; +// =================================================================== + + +// =================================================================== + +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// CompositeTensorVariantMetadata + +// .tensorflow.TypeSpecProto type_spec_proto = 1; +inline bool CompositeTensorVariantMetadata::_internal_has_type_spec_proto() const { + return this != internal_default_instance() && _impl_.type_spec_proto_ != nullptr; +} +inline bool CompositeTensorVariantMetadata::has_type_spec_proto() const { + return _internal_has_type_spec_proto(); +} +inline const ::tensorflow::TypeSpecProto& CompositeTensorVariantMetadata::_internal_type_spec_proto() const { + const ::tensorflow::TypeSpecProto* p = _impl_.type_spec_proto_; + return p != nullptr ? *p : reinterpret_cast( + ::tensorflow::_TypeSpecProto_default_instance_); +} +inline const ::tensorflow::TypeSpecProto& CompositeTensorVariantMetadata::type_spec_proto() const { + // @@protoc_insertion_point(field_get:tensorflow.CompositeTensorVariantMetadata.type_spec_proto) + return _internal_type_spec_proto(); +} +inline void CompositeTensorVariantMetadata::unsafe_arena_set_allocated_type_spec_proto( + ::tensorflow::TypeSpecProto* type_spec_proto) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.type_spec_proto_); + } + _impl_.type_spec_proto_ = type_spec_proto; + if (type_spec_proto) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.CompositeTensorVariantMetadata.type_spec_proto) +} +inline ::tensorflow::TypeSpecProto* CompositeTensorVariantMetadata::release_type_spec_proto() { + + ::tensorflow::TypeSpecProto* temp = _impl_.type_spec_proto_; + _impl_.type_spec_proto_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tensorflow::TypeSpecProto* CompositeTensorVariantMetadata::unsafe_arena_release_type_spec_proto() { + // @@protoc_insertion_point(field_release:tensorflow.CompositeTensorVariantMetadata.type_spec_proto) + + ::tensorflow::TypeSpecProto* temp = _impl_.type_spec_proto_; + _impl_.type_spec_proto_ = nullptr; + return temp; +} +inline ::tensorflow::TypeSpecProto* CompositeTensorVariantMetadata::_internal_mutable_type_spec_proto() { + + if (_impl_.type_spec_proto_ == nullptr) { + auto* p = CreateMaybeMessage<::tensorflow::TypeSpecProto>(GetArenaForAllocation()); + _impl_.type_spec_proto_ = p; + } + return _impl_.type_spec_proto_; +} +inline ::tensorflow::TypeSpecProto* CompositeTensorVariantMetadata::mutable_type_spec_proto() { + ::tensorflow::TypeSpecProto* _msg = _internal_mutable_type_spec_proto(); + // @@protoc_insertion_point(field_mutable:tensorflow.CompositeTensorVariantMetadata.type_spec_proto) + return _msg; +} +inline void CompositeTensorVariantMetadata::set_allocated_type_spec_proto(::tensorflow::TypeSpecProto* type_spec_proto) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.type_spec_proto_); + } + if (type_spec_proto) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( + reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(type_spec_proto)); + if (message_arena != submessage_arena) { + type_spec_proto = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, type_spec_proto, submessage_arena); + } + + } else { + + } + _impl_.type_spec_proto_ = type_spec_proto; + // @@protoc_insertion_point(field_set_allocated:tensorflow.CompositeTensorVariantMetadata.type_spec_proto) +} + +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ + +// @@protoc_insertion_point(namespace_scope) + +} // namespace tensorflow + +// @@protoc_insertion_point(global_scope) + +#include +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprotobuf_2fcomposite_5ftensor_5fvariant_2eproto diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/composite_tensor_variant.proto b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/composite_tensor_variant.proto new file mode 100644 index 0000000000000000000000000000000000000000..b3da189a4218aa171564e4bd192aab1270329b7f --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/composite_tensor_variant.proto @@ -0,0 +1,16 @@ +syntax = "proto3"; + +package tensorflow; + +import "tensorflow/core/protobuf/struct.proto"; + +option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/protobuf/for_core_protos_go_proto"; + +// Metadata for CompositeTensorVariant, used when serializing as Variant. +// +// We define a new message here (rather than directly using TypeSpecProto for +// the metadata string) to retain flexibility to change the metadata encoding +// to support additional features. +message CompositeTensorVariantMetadata { + TypeSpecProto type_spec_proto = 1; +} diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/config.pb.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/config.pb.h new file mode 100644 index 0000000000000000000000000000000000000000..848af8da886a5eba28e2033efe726c10d937aa1c --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/config.pb.h @@ -0,0 +1,8785 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/config.proto + +#ifndef GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprotobuf_2fconfig_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprotobuf_2fconfig_2eproto + +#include +#include + +#include +#if PROTOBUF_VERSION < 3021000 +#error This file was generated by a newer version of protoc which is +#error incompatible with your Protocol Buffer headers. Please update +#error your headers. +#endif +#if 3021009 < PROTOBUF_MIN_PROTOC_VERSION +#error This file was generated by an older version of protoc which is +#error incompatible with your Protocol Buffer headers. Please +#error regenerate this file with a newer version of protoc. +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include // IWYU pragma: export +#include // IWYU pragma: export +#include // IWYU pragma: export +#include +#include +#include +#include +#include "tensorflow/core/framework/cost_graph.pb.h" +#include "tensorflow/core/framework/graph.pb.h" +#include "tensorflow/core/framework/step_stats.pb.h" +#include "tensorflow/core/protobuf/cluster.pb.h" +#include "tensorflow/core/protobuf/debug.pb.h" +#include "tensorflow/core/protobuf/rewriter_config.pb.h" +#include "tensorflow/core/protobuf/rpc_options.pb.h" +#include "tsl/protobuf/coordination_config.pb.h" +// @@protoc_insertion_point(includes) +#include +#define PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2fprotobuf_2fconfig_2eproto +PROTOBUF_NAMESPACE_OPEN +namespace internal { +class AnyMetadata; +} // namespace internal +PROTOBUF_NAMESPACE_CLOSE + +// Internal implementation detail -- do not use these members. +struct TableStruct_tensorflow_2fcore_2fprotobuf_2fconfig_2eproto { + static const uint32_t offsets[]; +}; +extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_tensorflow_2fcore_2fprotobuf_2fconfig_2eproto; +namespace tensorflow { +class CallableOptions; +struct CallableOptionsDefaultTypeInternal; +extern CallableOptionsDefaultTypeInternal _CallableOptions_default_instance_; +class CallableOptions_FeedDevicesEntry_DoNotUse; +struct CallableOptions_FeedDevicesEntry_DoNotUseDefaultTypeInternal; +extern CallableOptions_FeedDevicesEntry_DoNotUseDefaultTypeInternal _CallableOptions_FeedDevicesEntry_DoNotUse_default_instance_; +class CallableOptions_FetchDevicesEntry_DoNotUse; +struct CallableOptions_FetchDevicesEntry_DoNotUseDefaultTypeInternal; +extern CallableOptions_FetchDevicesEntry_DoNotUseDefaultTypeInternal _CallableOptions_FetchDevicesEntry_DoNotUse_default_instance_; +class ConfigProto; +struct ConfigProtoDefaultTypeInternal; +extern ConfigProtoDefaultTypeInternal _ConfigProto_default_instance_; +class ConfigProto_DeviceCountEntry_DoNotUse; +struct ConfigProto_DeviceCountEntry_DoNotUseDefaultTypeInternal; +extern ConfigProto_DeviceCountEntry_DoNotUseDefaultTypeInternal _ConfigProto_DeviceCountEntry_DoNotUse_default_instance_; +class ConfigProto_Experimental; +struct ConfigProto_ExperimentalDefaultTypeInternal; +extern ConfigProto_ExperimentalDefaultTypeInternal _ConfigProto_Experimental_default_instance_; +class GPUOptions; +struct GPUOptionsDefaultTypeInternal; +extern GPUOptionsDefaultTypeInternal _GPUOptions_default_instance_; +class GPUOptions_Experimental; +struct GPUOptions_ExperimentalDefaultTypeInternal; +extern GPUOptions_ExperimentalDefaultTypeInternal _GPUOptions_Experimental_default_instance_; +class GPUOptions_Experimental_VirtualDevices; +struct GPUOptions_Experimental_VirtualDevicesDefaultTypeInternal; +extern GPUOptions_Experimental_VirtualDevicesDefaultTypeInternal _GPUOptions_Experimental_VirtualDevices_default_instance_; +class GraphOptions; +struct GraphOptionsDefaultTypeInternal; +extern GraphOptionsDefaultTypeInternal _GraphOptions_default_instance_; +class OptimizerOptions; +struct OptimizerOptionsDefaultTypeInternal; +extern OptimizerOptionsDefaultTypeInternal _OptimizerOptions_default_instance_; +class RunMetadata; +struct RunMetadataDefaultTypeInternal; +extern RunMetadataDefaultTypeInternal _RunMetadata_default_instance_; +class RunMetadata_FunctionGraphs; +struct RunMetadata_FunctionGraphsDefaultTypeInternal; +extern RunMetadata_FunctionGraphsDefaultTypeInternal _RunMetadata_FunctionGraphs_default_instance_; +class RunOptions; +struct RunOptionsDefaultTypeInternal; +extern RunOptionsDefaultTypeInternal _RunOptions_default_instance_; +class RunOptions_Experimental; +struct RunOptions_ExperimentalDefaultTypeInternal; +extern RunOptions_ExperimentalDefaultTypeInternal _RunOptions_Experimental_default_instance_; +class RunOptions_Experimental_RunHandlerPoolOptions; +struct RunOptions_Experimental_RunHandlerPoolOptionsDefaultTypeInternal; +extern RunOptions_Experimental_RunHandlerPoolOptionsDefaultTypeInternal _RunOptions_Experimental_RunHandlerPoolOptions_default_instance_; +class SessionMetadata; +struct SessionMetadataDefaultTypeInternal; +extern SessionMetadataDefaultTypeInternal _SessionMetadata_default_instance_; +class TensorConnection; +struct TensorConnectionDefaultTypeInternal; +extern TensorConnectionDefaultTypeInternal _TensorConnection_default_instance_; +class ThreadPoolOptionProto; +struct ThreadPoolOptionProtoDefaultTypeInternal; +extern ThreadPoolOptionProtoDefaultTypeInternal _ThreadPoolOptionProto_default_instance_; +} // namespace tensorflow +PROTOBUF_NAMESPACE_OPEN +template<> ::tensorflow::CallableOptions* Arena::CreateMaybeMessage<::tensorflow::CallableOptions>(Arena*); +template<> ::tensorflow::CallableOptions_FeedDevicesEntry_DoNotUse* Arena::CreateMaybeMessage<::tensorflow::CallableOptions_FeedDevicesEntry_DoNotUse>(Arena*); +template<> ::tensorflow::CallableOptions_FetchDevicesEntry_DoNotUse* Arena::CreateMaybeMessage<::tensorflow::CallableOptions_FetchDevicesEntry_DoNotUse>(Arena*); +template<> ::tensorflow::ConfigProto* Arena::CreateMaybeMessage<::tensorflow::ConfigProto>(Arena*); +template<> ::tensorflow::ConfigProto_DeviceCountEntry_DoNotUse* Arena::CreateMaybeMessage<::tensorflow::ConfigProto_DeviceCountEntry_DoNotUse>(Arena*); +template<> ::tensorflow::ConfigProto_Experimental* Arena::CreateMaybeMessage<::tensorflow::ConfigProto_Experimental>(Arena*); +template<> ::tensorflow::GPUOptions* Arena::CreateMaybeMessage<::tensorflow::GPUOptions>(Arena*); +template<> ::tensorflow::GPUOptions_Experimental* Arena::CreateMaybeMessage<::tensorflow::GPUOptions_Experimental>(Arena*); +template<> ::tensorflow::GPUOptions_Experimental_VirtualDevices* Arena::CreateMaybeMessage<::tensorflow::GPUOptions_Experimental_VirtualDevices>(Arena*); +template<> ::tensorflow::GraphOptions* Arena::CreateMaybeMessage<::tensorflow::GraphOptions>(Arena*); +template<> ::tensorflow::OptimizerOptions* Arena::CreateMaybeMessage<::tensorflow::OptimizerOptions>(Arena*); +template<> ::tensorflow::RunMetadata* Arena::CreateMaybeMessage<::tensorflow::RunMetadata>(Arena*); +template<> ::tensorflow::RunMetadata_FunctionGraphs* Arena::CreateMaybeMessage<::tensorflow::RunMetadata_FunctionGraphs>(Arena*); +template<> ::tensorflow::RunOptions* Arena::CreateMaybeMessage<::tensorflow::RunOptions>(Arena*); +template<> ::tensorflow::RunOptions_Experimental* Arena::CreateMaybeMessage<::tensorflow::RunOptions_Experimental>(Arena*); +template<> ::tensorflow::RunOptions_Experimental_RunHandlerPoolOptions* Arena::CreateMaybeMessage<::tensorflow::RunOptions_Experimental_RunHandlerPoolOptions>(Arena*); +template<> ::tensorflow::SessionMetadata* Arena::CreateMaybeMessage<::tensorflow::SessionMetadata>(Arena*); +template<> ::tensorflow::TensorConnection* Arena::CreateMaybeMessage<::tensorflow::TensorConnection>(Arena*); +template<> ::tensorflow::ThreadPoolOptionProto* Arena::CreateMaybeMessage<::tensorflow::ThreadPoolOptionProto>(Arena*); +PROTOBUF_NAMESPACE_CLOSE +namespace tensorflow { + +enum OptimizerOptions_Level : int { + OptimizerOptions_Level_L1 = 0, + OptimizerOptions_Level_L0 = -1, + OptimizerOptions_Level_OptimizerOptions_Level_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits::min(), + OptimizerOptions_Level_OptimizerOptions_Level_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits::max() +}; +bool OptimizerOptions_Level_IsValid(int value); +constexpr OptimizerOptions_Level OptimizerOptions_Level_Level_MIN = OptimizerOptions_Level_L0; +constexpr OptimizerOptions_Level OptimizerOptions_Level_Level_MAX = OptimizerOptions_Level_L1; +constexpr int OptimizerOptions_Level_Level_ARRAYSIZE = OptimizerOptions_Level_Level_MAX + 1; + +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* OptimizerOptions_Level_descriptor(); +template +inline const std::string& OptimizerOptions_Level_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function OptimizerOptions_Level_Name."); + return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( + OptimizerOptions_Level_descriptor(), enum_t_value); +} +inline bool OptimizerOptions_Level_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, OptimizerOptions_Level* value) { + return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( + OptimizerOptions_Level_descriptor(), name, value); +} +enum OptimizerOptions_GlobalJitLevel : int { + OptimizerOptions_GlobalJitLevel_DEFAULT = 0, + OptimizerOptions_GlobalJitLevel_OFF = -1, + OptimizerOptions_GlobalJitLevel_ON_1 = 1, + OptimizerOptions_GlobalJitLevel_ON_2 = 2, + OptimizerOptions_GlobalJitLevel_OptimizerOptions_GlobalJitLevel_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits::min(), + OptimizerOptions_GlobalJitLevel_OptimizerOptions_GlobalJitLevel_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits::max() +}; +bool OptimizerOptions_GlobalJitLevel_IsValid(int value); +constexpr OptimizerOptions_GlobalJitLevel OptimizerOptions_GlobalJitLevel_GlobalJitLevel_MIN = OptimizerOptions_GlobalJitLevel_OFF; +constexpr OptimizerOptions_GlobalJitLevel OptimizerOptions_GlobalJitLevel_GlobalJitLevel_MAX = OptimizerOptions_GlobalJitLevel_ON_2; +constexpr int OptimizerOptions_GlobalJitLevel_GlobalJitLevel_ARRAYSIZE = OptimizerOptions_GlobalJitLevel_GlobalJitLevel_MAX + 1; + +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* OptimizerOptions_GlobalJitLevel_descriptor(); +template +inline const std::string& OptimizerOptions_GlobalJitLevel_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function OptimizerOptions_GlobalJitLevel_Name."); + return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( + OptimizerOptions_GlobalJitLevel_descriptor(), enum_t_value); +} +inline bool OptimizerOptions_GlobalJitLevel_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, OptimizerOptions_GlobalJitLevel* value) { + return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( + OptimizerOptions_GlobalJitLevel_descriptor(), name, value); +} +enum ConfigProto_Experimental_MlirBridgeRollout : int { + ConfigProto_Experimental_MlirBridgeRollout_MLIR_BRIDGE_ROLLOUT_UNSPECIFIED = 0, + ConfigProto_Experimental_MlirBridgeRollout_MLIR_BRIDGE_ROLLOUT_ENABLED = 1, + ConfigProto_Experimental_MlirBridgeRollout_MLIR_BRIDGE_ROLLOUT_DISABLED = 2, + ConfigProto_Experimental_MlirBridgeRollout_ConfigProto_Experimental_MlirBridgeRollout_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits::min(), + ConfigProto_Experimental_MlirBridgeRollout_ConfigProto_Experimental_MlirBridgeRollout_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits::max() +}; +bool ConfigProto_Experimental_MlirBridgeRollout_IsValid(int value); +constexpr ConfigProto_Experimental_MlirBridgeRollout ConfigProto_Experimental_MlirBridgeRollout_MlirBridgeRollout_MIN = ConfigProto_Experimental_MlirBridgeRollout_MLIR_BRIDGE_ROLLOUT_UNSPECIFIED; +constexpr ConfigProto_Experimental_MlirBridgeRollout ConfigProto_Experimental_MlirBridgeRollout_MlirBridgeRollout_MAX = ConfigProto_Experimental_MlirBridgeRollout_MLIR_BRIDGE_ROLLOUT_DISABLED; +constexpr int ConfigProto_Experimental_MlirBridgeRollout_MlirBridgeRollout_ARRAYSIZE = ConfigProto_Experimental_MlirBridgeRollout_MlirBridgeRollout_MAX + 1; + +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* ConfigProto_Experimental_MlirBridgeRollout_descriptor(); +template +inline const std::string& ConfigProto_Experimental_MlirBridgeRollout_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function ConfigProto_Experimental_MlirBridgeRollout_Name."); + return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( + ConfigProto_Experimental_MlirBridgeRollout_descriptor(), enum_t_value); +} +inline bool ConfigProto_Experimental_MlirBridgeRollout_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, ConfigProto_Experimental_MlirBridgeRollout* value) { + return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( + ConfigProto_Experimental_MlirBridgeRollout_descriptor(), name, value); +} +enum RunOptions_TraceLevel : int { + RunOptions_TraceLevel_NO_TRACE = 0, + RunOptions_TraceLevel_SOFTWARE_TRACE = 1, + RunOptions_TraceLevel_HARDWARE_TRACE = 2, + RunOptions_TraceLevel_FULL_TRACE = 3, + RunOptions_TraceLevel_RunOptions_TraceLevel_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits::min(), + RunOptions_TraceLevel_RunOptions_TraceLevel_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits::max() +}; +bool RunOptions_TraceLevel_IsValid(int value); +constexpr RunOptions_TraceLevel RunOptions_TraceLevel_TraceLevel_MIN = RunOptions_TraceLevel_NO_TRACE; +constexpr RunOptions_TraceLevel RunOptions_TraceLevel_TraceLevel_MAX = RunOptions_TraceLevel_FULL_TRACE; +constexpr int RunOptions_TraceLevel_TraceLevel_ARRAYSIZE = RunOptions_TraceLevel_TraceLevel_MAX + 1; + +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* RunOptions_TraceLevel_descriptor(); +template +inline const std::string& RunOptions_TraceLevel_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function RunOptions_TraceLevel_Name."); + return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( + RunOptions_TraceLevel_descriptor(), enum_t_value); +} +inline bool RunOptions_TraceLevel_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, RunOptions_TraceLevel* value) { + return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( + RunOptions_TraceLevel_descriptor(), name, value); +} +// =================================================================== + +class GPUOptions_Experimental_VirtualDevices final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.GPUOptions.Experimental.VirtualDevices) */ { + public: + inline GPUOptions_Experimental_VirtualDevices() : GPUOptions_Experimental_VirtualDevices(nullptr) {} + ~GPUOptions_Experimental_VirtualDevices() override; + explicit PROTOBUF_CONSTEXPR GPUOptions_Experimental_VirtualDevices(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + GPUOptions_Experimental_VirtualDevices(const GPUOptions_Experimental_VirtualDevices& from); + GPUOptions_Experimental_VirtualDevices(GPUOptions_Experimental_VirtualDevices&& from) noexcept + : GPUOptions_Experimental_VirtualDevices() { + *this = ::std::move(from); + } + + inline GPUOptions_Experimental_VirtualDevices& operator=(const GPUOptions_Experimental_VirtualDevices& from) { + CopyFrom(from); + return *this; + } + inline GPUOptions_Experimental_VirtualDevices& operator=(GPUOptions_Experimental_VirtualDevices&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const GPUOptions_Experimental_VirtualDevices& default_instance() { + return *internal_default_instance(); + } + static inline const GPUOptions_Experimental_VirtualDevices* internal_default_instance() { + return reinterpret_cast( + &_GPUOptions_Experimental_VirtualDevices_default_instance_); + } + static constexpr int kIndexInFileMessages = + 0; + + friend void swap(GPUOptions_Experimental_VirtualDevices& a, GPUOptions_Experimental_VirtualDevices& b) { + a.Swap(&b); + } + inline void Swap(GPUOptions_Experimental_VirtualDevices* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(GPUOptions_Experimental_VirtualDevices* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + GPUOptions_Experimental_VirtualDevices* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const GPUOptions_Experimental_VirtualDevices& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const GPUOptions_Experimental_VirtualDevices& from) { + GPUOptions_Experimental_VirtualDevices::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(GPUOptions_Experimental_VirtualDevices* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.GPUOptions.Experimental.VirtualDevices"; + } + protected: + explicit GPUOptions_Experimental_VirtualDevices(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kMemoryLimitMbFieldNumber = 1, + kPriorityFieldNumber = 2, + kDeviceOrdinalFieldNumber = 3, + }; + // repeated float memory_limit_mb = 1; + int memory_limit_mb_size() const; + private: + int _internal_memory_limit_mb_size() const; + public: + void clear_memory_limit_mb(); + private: + float _internal_memory_limit_mb(int index) const; + const ::PROTOBUF_NAMESPACE_ID::RepeatedField< float >& + _internal_memory_limit_mb() const; + void _internal_add_memory_limit_mb(float value); + ::PROTOBUF_NAMESPACE_ID::RepeatedField< float >* + _internal_mutable_memory_limit_mb(); + public: + float memory_limit_mb(int index) const; + void set_memory_limit_mb(int index, float value); + void add_memory_limit_mb(float value); + const ::PROTOBUF_NAMESPACE_ID::RepeatedField< float >& + memory_limit_mb() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedField< float >* + mutable_memory_limit_mb(); + + // repeated int32 priority = 2; + int priority_size() const; + private: + int _internal_priority_size() const; + public: + void clear_priority(); + private: + int32_t _internal_priority(int index) const; + const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >& + _internal_priority() const; + void _internal_add_priority(int32_t value); + ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >* + _internal_mutable_priority(); + public: + int32_t priority(int index) const; + void set_priority(int index, int32_t value); + void add_priority(int32_t value); + const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >& + priority() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >* + mutable_priority(); + + // repeated int32 device_ordinal = 3; + int device_ordinal_size() const; + private: + int _internal_device_ordinal_size() const; + public: + void clear_device_ordinal(); + private: + int32_t _internal_device_ordinal(int index) const; + const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >& + _internal_device_ordinal() const; + void _internal_add_device_ordinal(int32_t value); + ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >* + _internal_mutable_device_ordinal(); + public: + int32_t device_ordinal(int index) const; + void set_device_ordinal(int index, int32_t value); + void add_device_ordinal(int32_t value); + const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >& + device_ordinal() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >* + mutable_device_ordinal(); + + // @@protoc_insertion_point(class_scope:tensorflow.GPUOptions.Experimental.VirtualDevices) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedField< float > memory_limit_mb_; + ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t > priority_; + mutable std::atomic _priority_cached_byte_size_; + ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t > device_ordinal_; + mutable std::atomic _device_ordinal_cached_byte_size_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fconfig_2eproto; +}; +// ------------------------------------------------------------------- + +class GPUOptions_Experimental final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.GPUOptions.Experimental) */ { + public: + inline GPUOptions_Experimental() : GPUOptions_Experimental(nullptr) {} + ~GPUOptions_Experimental() override; + explicit PROTOBUF_CONSTEXPR GPUOptions_Experimental(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + GPUOptions_Experimental(const GPUOptions_Experimental& from); + GPUOptions_Experimental(GPUOptions_Experimental&& from) noexcept + : GPUOptions_Experimental() { + *this = ::std::move(from); + } + + inline GPUOptions_Experimental& operator=(const GPUOptions_Experimental& from) { + CopyFrom(from); + return *this; + } + inline GPUOptions_Experimental& operator=(GPUOptions_Experimental&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const GPUOptions_Experimental& default_instance() { + return *internal_default_instance(); + } + static inline const GPUOptions_Experimental* internal_default_instance() { + return reinterpret_cast( + &_GPUOptions_Experimental_default_instance_); + } + static constexpr int kIndexInFileMessages = + 1; + + friend void swap(GPUOptions_Experimental& a, GPUOptions_Experimental& b) { + a.Swap(&b); + } + inline void Swap(GPUOptions_Experimental* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(GPUOptions_Experimental* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + GPUOptions_Experimental* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const GPUOptions_Experimental& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const GPUOptions_Experimental& from) { + GPUOptions_Experimental::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(GPUOptions_Experimental* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.GPUOptions.Experimental"; + } + protected: + explicit GPUOptions_Experimental(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + typedef GPUOptions_Experimental_VirtualDevices VirtualDevices; + + // accessors ------------------------------------------------------- + + enum : int { + kVirtualDevicesFieldNumber = 1, + kCollectiveRingOrderFieldNumber = 4, + kNumDevToDevCopyStreamsFieldNumber = 3, + kKernelTrackerMaxIntervalFieldNumber = 7, + kUseUnifiedMemoryFieldNumber = 2, + kTimestampedAllocatorFieldNumber = 5, + kUseCudaMallocAsyncFieldNumber = 11, + kDisallowRetryOnAllocationFailureFieldNumber = 12, + kKernelTrackerMaxBytesFieldNumber = 8, + kInternalFragmentationFractionFieldNumber = 10, + kKernelTrackerMaxPendingFieldNumber = 9, + kGpuHostMemLimitInMbFieldNumber = 13, + kGpuHostMemDisallowGrowthFieldNumber = 14, + kNumVirtualDevicesPerGpuFieldNumber = 15, + kGpuSystemMemorySizeInMbFieldNumber = 16, + }; + // repeated .tensorflow.GPUOptions.Experimental.VirtualDevices virtual_devices = 1; + int virtual_devices_size() const; + private: + int _internal_virtual_devices_size() const; + public: + void clear_virtual_devices(); + ::tensorflow::GPUOptions_Experimental_VirtualDevices* mutable_virtual_devices(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::GPUOptions_Experimental_VirtualDevices >* + mutable_virtual_devices(); + private: + const ::tensorflow::GPUOptions_Experimental_VirtualDevices& _internal_virtual_devices(int index) const; + ::tensorflow::GPUOptions_Experimental_VirtualDevices* _internal_add_virtual_devices(); + public: + const ::tensorflow::GPUOptions_Experimental_VirtualDevices& virtual_devices(int index) const; + ::tensorflow::GPUOptions_Experimental_VirtualDevices* add_virtual_devices(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::GPUOptions_Experimental_VirtualDevices >& + virtual_devices() const; + + // string collective_ring_order = 4; + void clear_collective_ring_order(); + const std::string& collective_ring_order() const; + template + void set_collective_ring_order(ArgT0&& arg0, ArgT... args); + std::string* mutable_collective_ring_order(); + PROTOBUF_NODISCARD std::string* release_collective_ring_order(); + void set_allocated_collective_ring_order(std::string* collective_ring_order); + private: + const std::string& _internal_collective_ring_order() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_collective_ring_order(const std::string& value); + std::string* _internal_mutable_collective_ring_order(); + public: + + // int32 num_dev_to_dev_copy_streams = 3; + void clear_num_dev_to_dev_copy_streams(); + int32_t num_dev_to_dev_copy_streams() const; + void set_num_dev_to_dev_copy_streams(int32_t value); + private: + int32_t _internal_num_dev_to_dev_copy_streams() const; + void _internal_set_num_dev_to_dev_copy_streams(int32_t value); + public: + + // int32 kernel_tracker_max_interval = 7; + void clear_kernel_tracker_max_interval(); + int32_t kernel_tracker_max_interval() const; + void set_kernel_tracker_max_interval(int32_t value); + private: + int32_t _internal_kernel_tracker_max_interval() const; + void _internal_set_kernel_tracker_max_interval(int32_t value); + public: + + // bool use_unified_memory = 2; + void clear_use_unified_memory(); + bool use_unified_memory() const; + void set_use_unified_memory(bool value); + private: + bool _internal_use_unified_memory() const; + void _internal_set_use_unified_memory(bool value); + public: + + // bool timestamped_allocator = 5; + void clear_timestamped_allocator(); + bool timestamped_allocator() const; + void set_timestamped_allocator(bool value); + private: + bool _internal_timestamped_allocator() const; + void _internal_set_timestamped_allocator(bool value); + public: + + // bool use_cuda_malloc_async = 11; + void clear_use_cuda_malloc_async(); + bool use_cuda_malloc_async() const; + void set_use_cuda_malloc_async(bool value); + private: + bool _internal_use_cuda_malloc_async() const; + void _internal_set_use_cuda_malloc_async(bool value); + public: + + // bool disallow_retry_on_allocation_failure = 12; + void clear_disallow_retry_on_allocation_failure(); + bool disallow_retry_on_allocation_failure() const; + void set_disallow_retry_on_allocation_failure(bool value); + private: + bool _internal_disallow_retry_on_allocation_failure() const; + void _internal_set_disallow_retry_on_allocation_failure(bool value); + public: + + // int32 kernel_tracker_max_bytes = 8; + void clear_kernel_tracker_max_bytes(); + int32_t kernel_tracker_max_bytes() const; + void set_kernel_tracker_max_bytes(int32_t value); + private: + int32_t _internal_kernel_tracker_max_bytes() const; + void _internal_set_kernel_tracker_max_bytes(int32_t value); + public: + + // double internal_fragmentation_fraction = 10; + void clear_internal_fragmentation_fraction(); + double internal_fragmentation_fraction() const; + void set_internal_fragmentation_fraction(double value); + private: + double _internal_internal_fragmentation_fraction() const; + void _internal_set_internal_fragmentation_fraction(double value); + public: + + // int32 kernel_tracker_max_pending = 9; + void clear_kernel_tracker_max_pending(); + int32_t kernel_tracker_max_pending() const; + void set_kernel_tracker_max_pending(int32_t value); + private: + int32_t _internal_kernel_tracker_max_pending() const; + void _internal_set_kernel_tracker_max_pending(int32_t value); + public: + + // float gpu_host_mem_limit_in_mb = 13; + void clear_gpu_host_mem_limit_in_mb(); + float gpu_host_mem_limit_in_mb() const; + void set_gpu_host_mem_limit_in_mb(float value); + private: + float _internal_gpu_host_mem_limit_in_mb() const; + void _internal_set_gpu_host_mem_limit_in_mb(float value); + public: + + // bool gpu_host_mem_disallow_growth = 14; + void clear_gpu_host_mem_disallow_growth(); + bool gpu_host_mem_disallow_growth() const; + void set_gpu_host_mem_disallow_growth(bool value); + private: + bool _internal_gpu_host_mem_disallow_growth() const; + void _internal_set_gpu_host_mem_disallow_growth(bool value); + public: + + // int32 num_virtual_devices_per_gpu = 15; + void clear_num_virtual_devices_per_gpu(); + int32_t num_virtual_devices_per_gpu() const; + void set_num_virtual_devices_per_gpu(int32_t value); + private: + int32_t _internal_num_virtual_devices_per_gpu() const; + void _internal_set_num_virtual_devices_per_gpu(int32_t value); + public: + + // int32 gpu_system_memory_size_in_mb = 16; + void clear_gpu_system_memory_size_in_mb(); + int32_t gpu_system_memory_size_in_mb() const; + void set_gpu_system_memory_size_in_mb(int32_t value); + private: + int32_t _internal_gpu_system_memory_size_in_mb() const; + void _internal_set_gpu_system_memory_size_in_mb(int32_t value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.GPUOptions.Experimental) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::GPUOptions_Experimental_VirtualDevices > virtual_devices_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr collective_ring_order_; + int32_t num_dev_to_dev_copy_streams_; + int32_t kernel_tracker_max_interval_; + bool use_unified_memory_; + bool timestamped_allocator_; + bool use_cuda_malloc_async_; + bool disallow_retry_on_allocation_failure_; + int32_t kernel_tracker_max_bytes_; + double internal_fragmentation_fraction_; + int32_t kernel_tracker_max_pending_; + float gpu_host_mem_limit_in_mb_; + bool gpu_host_mem_disallow_growth_; + int32_t num_virtual_devices_per_gpu_; + int32_t gpu_system_memory_size_in_mb_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fconfig_2eproto; +}; +// ------------------------------------------------------------------- + +class GPUOptions final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.GPUOptions) */ { + public: + inline GPUOptions() : GPUOptions(nullptr) {} + ~GPUOptions() override; + explicit PROTOBUF_CONSTEXPR GPUOptions(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + GPUOptions(const GPUOptions& from); + GPUOptions(GPUOptions&& from) noexcept + : GPUOptions() { + *this = ::std::move(from); + } + + inline GPUOptions& operator=(const GPUOptions& from) { + CopyFrom(from); + return *this; + } + inline GPUOptions& operator=(GPUOptions&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const GPUOptions& default_instance() { + return *internal_default_instance(); + } + static inline const GPUOptions* internal_default_instance() { + return reinterpret_cast( + &_GPUOptions_default_instance_); + } + static constexpr int kIndexInFileMessages = + 2; + + friend void swap(GPUOptions& a, GPUOptions& b) { + a.Swap(&b); + } + inline void Swap(GPUOptions* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(GPUOptions* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + GPUOptions* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const GPUOptions& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const GPUOptions& from) { + GPUOptions::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(GPUOptions* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.GPUOptions"; + } + protected: + explicit GPUOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + typedef GPUOptions_Experimental Experimental; + + // accessors ------------------------------------------------------- + + enum : int { + kAllocatorTypeFieldNumber = 2, + kVisibleDeviceListFieldNumber = 5, + kExperimentalFieldNumber = 9, + kPerProcessGpuMemoryFractionFieldNumber = 1, + kDeferredDeletionBytesFieldNumber = 3, + kPollingActiveDelayUsecsFieldNumber = 6, + kAllowGrowthFieldNumber = 4, + kForceGpuCompatibleFieldNumber = 8, + kPollingInactiveDelayMsecsFieldNumber = 7, + }; + // string allocator_type = 2; + void clear_allocator_type(); + const std::string& allocator_type() const; + template + void set_allocator_type(ArgT0&& arg0, ArgT... args); + std::string* mutable_allocator_type(); + PROTOBUF_NODISCARD std::string* release_allocator_type(); + void set_allocated_allocator_type(std::string* allocator_type); + private: + const std::string& _internal_allocator_type() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_allocator_type(const std::string& value); + std::string* _internal_mutable_allocator_type(); + public: + + // string visible_device_list = 5; + void clear_visible_device_list(); + const std::string& visible_device_list() const; + template + void set_visible_device_list(ArgT0&& arg0, ArgT... args); + std::string* mutable_visible_device_list(); + PROTOBUF_NODISCARD std::string* release_visible_device_list(); + void set_allocated_visible_device_list(std::string* visible_device_list); + private: + const std::string& _internal_visible_device_list() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_visible_device_list(const std::string& value); + std::string* _internal_mutable_visible_device_list(); + public: + + // .tensorflow.GPUOptions.Experimental experimental = 9; + bool has_experimental() const; + private: + bool _internal_has_experimental() const; + public: + void clear_experimental(); + const ::tensorflow::GPUOptions_Experimental& experimental() const; + PROTOBUF_NODISCARD ::tensorflow::GPUOptions_Experimental* release_experimental(); + ::tensorflow::GPUOptions_Experimental* mutable_experimental(); + void set_allocated_experimental(::tensorflow::GPUOptions_Experimental* experimental); + private: + const ::tensorflow::GPUOptions_Experimental& _internal_experimental() const; + ::tensorflow::GPUOptions_Experimental* _internal_mutable_experimental(); + public: + void unsafe_arena_set_allocated_experimental( + ::tensorflow::GPUOptions_Experimental* experimental); + ::tensorflow::GPUOptions_Experimental* unsafe_arena_release_experimental(); + + // double per_process_gpu_memory_fraction = 1; + void clear_per_process_gpu_memory_fraction(); + double per_process_gpu_memory_fraction() const; + void set_per_process_gpu_memory_fraction(double value); + private: + double _internal_per_process_gpu_memory_fraction() const; + void _internal_set_per_process_gpu_memory_fraction(double value); + public: + + // int64 deferred_deletion_bytes = 3; + void clear_deferred_deletion_bytes(); + int64_t deferred_deletion_bytes() const; + void set_deferred_deletion_bytes(int64_t value); + private: + int64_t _internal_deferred_deletion_bytes() const; + void _internal_set_deferred_deletion_bytes(int64_t value); + public: + + // int32 polling_active_delay_usecs = 6; + void clear_polling_active_delay_usecs(); + int32_t polling_active_delay_usecs() const; + void set_polling_active_delay_usecs(int32_t value); + private: + int32_t _internal_polling_active_delay_usecs() const; + void _internal_set_polling_active_delay_usecs(int32_t value); + public: + + // bool allow_growth = 4; + void clear_allow_growth(); + bool allow_growth() const; + void set_allow_growth(bool value); + private: + bool _internal_allow_growth() const; + void _internal_set_allow_growth(bool value); + public: + + // bool force_gpu_compatible = 8; + void clear_force_gpu_compatible(); + bool force_gpu_compatible() const; + void set_force_gpu_compatible(bool value); + private: + bool _internal_force_gpu_compatible() const; + void _internal_set_force_gpu_compatible(bool value); + public: + + // int32 polling_inactive_delay_msecs = 7; + void clear_polling_inactive_delay_msecs(); + int32_t polling_inactive_delay_msecs() const; + void set_polling_inactive_delay_msecs(int32_t value); + private: + int32_t _internal_polling_inactive_delay_msecs() const; + void _internal_set_polling_inactive_delay_msecs(int32_t value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.GPUOptions) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr allocator_type_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr visible_device_list_; + ::tensorflow::GPUOptions_Experimental* experimental_; + double per_process_gpu_memory_fraction_; + int64_t deferred_deletion_bytes_; + int32_t polling_active_delay_usecs_; + bool allow_growth_; + bool force_gpu_compatible_; + int32_t polling_inactive_delay_msecs_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fconfig_2eproto; +}; +// ------------------------------------------------------------------- + +class OptimizerOptions final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.OptimizerOptions) */ { + public: + inline OptimizerOptions() : OptimizerOptions(nullptr) {} + ~OptimizerOptions() override; + explicit PROTOBUF_CONSTEXPR OptimizerOptions(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + OptimizerOptions(const OptimizerOptions& from); + OptimizerOptions(OptimizerOptions&& from) noexcept + : OptimizerOptions() { + *this = ::std::move(from); + } + + inline OptimizerOptions& operator=(const OptimizerOptions& from) { + CopyFrom(from); + return *this; + } + inline OptimizerOptions& operator=(OptimizerOptions&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const OptimizerOptions& default_instance() { + return *internal_default_instance(); + } + static inline const OptimizerOptions* internal_default_instance() { + return reinterpret_cast( + &_OptimizerOptions_default_instance_); + } + static constexpr int kIndexInFileMessages = + 3; + + friend void swap(OptimizerOptions& a, OptimizerOptions& b) { + a.Swap(&b); + } + inline void Swap(OptimizerOptions* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(OptimizerOptions* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + OptimizerOptions* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const OptimizerOptions& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const OptimizerOptions& from) { + OptimizerOptions::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(OptimizerOptions* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.OptimizerOptions"; + } + protected: + explicit OptimizerOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + typedef OptimizerOptions_Level Level; + static constexpr Level L1 = + OptimizerOptions_Level_L1; + static constexpr Level L0 = + OptimizerOptions_Level_L0; + static inline bool Level_IsValid(int value) { + return OptimizerOptions_Level_IsValid(value); + } + static constexpr Level Level_MIN = + OptimizerOptions_Level_Level_MIN; + static constexpr Level Level_MAX = + OptimizerOptions_Level_Level_MAX; + static constexpr int Level_ARRAYSIZE = + OptimizerOptions_Level_Level_ARRAYSIZE; + static inline const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* + Level_descriptor() { + return OptimizerOptions_Level_descriptor(); + } + template + static inline const std::string& Level_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function Level_Name."); + return OptimizerOptions_Level_Name(enum_t_value); + } + static inline bool Level_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name, + Level* value) { + return OptimizerOptions_Level_Parse(name, value); + } + + typedef OptimizerOptions_GlobalJitLevel GlobalJitLevel; + static constexpr GlobalJitLevel DEFAULT = + OptimizerOptions_GlobalJitLevel_DEFAULT; + static constexpr GlobalJitLevel OFF = + OptimizerOptions_GlobalJitLevel_OFF; + static constexpr GlobalJitLevel ON_1 = + OptimizerOptions_GlobalJitLevel_ON_1; + static constexpr GlobalJitLevel ON_2 = + OptimizerOptions_GlobalJitLevel_ON_2; + static inline bool GlobalJitLevel_IsValid(int value) { + return OptimizerOptions_GlobalJitLevel_IsValid(value); + } + static constexpr GlobalJitLevel GlobalJitLevel_MIN = + OptimizerOptions_GlobalJitLevel_GlobalJitLevel_MIN; + static constexpr GlobalJitLevel GlobalJitLevel_MAX = + OptimizerOptions_GlobalJitLevel_GlobalJitLevel_MAX; + static constexpr int GlobalJitLevel_ARRAYSIZE = + OptimizerOptions_GlobalJitLevel_GlobalJitLevel_ARRAYSIZE; + static inline const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* + GlobalJitLevel_descriptor() { + return OptimizerOptions_GlobalJitLevel_descriptor(); + } + template + static inline const std::string& GlobalJitLevel_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function GlobalJitLevel_Name."); + return OptimizerOptions_GlobalJitLevel_Name(enum_t_value); + } + static inline bool GlobalJitLevel_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name, + GlobalJitLevel* value) { + return OptimizerOptions_GlobalJitLevel_Parse(name, value); + } + + // accessors ------------------------------------------------------- + + enum : int { + kOptLevelFieldNumber = 3, + kDoCommonSubexpressionEliminationFieldNumber = 1, + kDoConstantFoldingFieldNumber = 2, + kDoFunctionInliningFieldNumber = 4, + kCpuGlobalJitFieldNumber = 7, + kMaxFoldedConstantInBytesFieldNumber = 6, + kGlobalJitLevelFieldNumber = 5, + }; + // .tensorflow.OptimizerOptions.Level opt_level = 3; + void clear_opt_level(); + ::tensorflow::OptimizerOptions_Level opt_level() const; + void set_opt_level(::tensorflow::OptimizerOptions_Level value); + private: + ::tensorflow::OptimizerOptions_Level _internal_opt_level() const; + void _internal_set_opt_level(::tensorflow::OptimizerOptions_Level value); + public: + + // bool do_common_subexpression_elimination = 1; + void clear_do_common_subexpression_elimination(); + bool do_common_subexpression_elimination() const; + void set_do_common_subexpression_elimination(bool value); + private: + bool _internal_do_common_subexpression_elimination() const; + void _internal_set_do_common_subexpression_elimination(bool value); + public: + + // bool do_constant_folding = 2; + void clear_do_constant_folding(); + bool do_constant_folding() const; + void set_do_constant_folding(bool value); + private: + bool _internal_do_constant_folding() const; + void _internal_set_do_constant_folding(bool value); + public: + + // bool do_function_inlining = 4; + void clear_do_function_inlining(); + bool do_function_inlining() const; + void set_do_function_inlining(bool value); + private: + bool _internal_do_function_inlining() const; + void _internal_set_do_function_inlining(bool value); + public: + + // bool cpu_global_jit = 7; + void clear_cpu_global_jit(); + bool cpu_global_jit() const; + void set_cpu_global_jit(bool value); + private: + bool _internal_cpu_global_jit() const; + void _internal_set_cpu_global_jit(bool value); + public: + + // int64 max_folded_constant_in_bytes = 6; + void clear_max_folded_constant_in_bytes(); + int64_t max_folded_constant_in_bytes() const; + void set_max_folded_constant_in_bytes(int64_t value); + private: + int64_t _internal_max_folded_constant_in_bytes() const; + void _internal_set_max_folded_constant_in_bytes(int64_t value); + public: + + // .tensorflow.OptimizerOptions.GlobalJitLevel global_jit_level = 5; + void clear_global_jit_level(); + ::tensorflow::OptimizerOptions_GlobalJitLevel global_jit_level() const; + void set_global_jit_level(::tensorflow::OptimizerOptions_GlobalJitLevel value); + private: + ::tensorflow::OptimizerOptions_GlobalJitLevel _internal_global_jit_level() const; + void _internal_set_global_jit_level(::tensorflow::OptimizerOptions_GlobalJitLevel value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.OptimizerOptions) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + int opt_level_; + bool do_common_subexpression_elimination_; + bool do_constant_folding_; + bool do_function_inlining_; + bool cpu_global_jit_; + int64_t max_folded_constant_in_bytes_; + int global_jit_level_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fconfig_2eproto; +}; +// ------------------------------------------------------------------- + +class GraphOptions final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.GraphOptions) */ { + public: + inline GraphOptions() : GraphOptions(nullptr) {} + ~GraphOptions() override; + explicit PROTOBUF_CONSTEXPR GraphOptions(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + GraphOptions(const GraphOptions& from); + GraphOptions(GraphOptions&& from) noexcept + : GraphOptions() { + *this = ::std::move(from); + } + + inline GraphOptions& operator=(const GraphOptions& from) { + CopyFrom(from); + return *this; + } + inline GraphOptions& operator=(GraphOptions&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const GraphOptions& default_instance() { + return *internal_default_instance(); + } + static inline const GraphOptions* internal_default_instance() { + return reinterpret_cast( + &_GraphOptions_default_instance_); + } + static constexpr int kIndexInFileMessages = + 4; + + friend void swap(GraphOptions& a, GraphOptions& b) { + a.Swap(&b); + } + inline void Swap(GraphOptions* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(GraphOptions* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + GraphOptions* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const GraphOptions& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const GraphOptions& from) { + GraphOptions::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(GraphOptions* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.GraphOptions"; + } + protected: + explicit GraphOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kOptimizerOptionsFieldNumber = 3, + kRewriteOptionsFieldNumber = 10, + kBuildCostModelFieldNumber = 4, + kEnableRecvSchedulingFieldNumber = 2, + kInferShapesFieldNumber = 5, + kPlacePrunedGraphFieldNumber = 6, + kEnableBfloat16SendrecvFieldNumber = 7, + kTimelineStepFieldNumber = 8, + kBuildCostModelAfterFieldNumber = 9, + }; + // .tensorflow.OptimizerOptions optimizer_options = 3; + bool has_optimizer_options() const; + private: + bool _internal_has_optimizer_options() const; + public: + void clear_optimizer_options(); + const ::tensorflow::OptimizerOptions& optimizer_options() const; + PROTOBUF_NODISCARD ::tensorflow::OptimizerOptions* release_optimizer_options(); + ::tensorflow::OptimizerOptions* mutable_optimizer_options(); + void set_allocated_optimizer_options(::tensorflow::OptimizerOptions* optimizer_options); + private: + const ::tensorflow::OptimizerOptions& _internal_optimizer_options() const; + ::tensorflow::OptimizerOptions* _internal_mutable_optimizer_options(); + public: + void unsafe_arena_set_allocated_optimizer_options( + ::tensorflow::OptimizerOptions* optimizer_options); + ::tensorflow::OptimizerOptions* unsafe_arena_release_optimizer_options(); + + // .tensorflow.RewriterConfig rewrite_options = 10; + bool has_rewrite_options() const; + private: + bool _internal_has_rewrite_options() const; + public: + void clear_rewrite_options(); + const ::tensorflow::RewriterConfig& rewrite_options() const; + PROTOBUF_NODISCARD ::tensorflow::RewriterConfig* release_rewrite_options(); + ::tensorflow::RewriterConfig* mutable_rewrite_options(); + void set_allocated_rewrite_options(::tensorflow::RewriterConfig* rewrite_options); + private: + const ::tensorflow::RewriterConfig& _internal_rewrite_options() const; + ::tensorflow::RewriterConfig* _internal_mutable_rewrite_options(); + public: + void unsafe_arena_set_allocated_rewrite_options( + ::tensorflow::RewriterConfig* rewrite_options); + ::tensorflow::RewriterConfig* unsafe_arena_release_rewrite_options(); + + // int64 build_cost_model = 4; + void clear_build_cost_model(); + int64_t build_cost_model() const; + void set_build_cost_model(int64_t value); + private: + int64_t _internal_build_cost_model() const; + void _internal_set_build_cost_model(int64_t value); + public: + + // bool enable_recv_scheduling = 2; + void clear_enable_recv_scheduling(); + bool enable_recv_scheduling() const; + void set_enable_recv_scheduling(bool value); + private: + bool _internal_enable_recv_scheduling() const; + void _internal_set_enable_recv_scheduling(bool value); + public: + + // bool infer_shapes = 5; + void clear_infer_shapes(); + bool infer_shapes() const; + void set_infer_shapes(bool value); + private: + bool _internal_infer_shapes() const; + void _internal_set_infer_shapes(bool value); + public: + + // bool place_pruned_graph = 6; + void clear_place_pruned_graph(); + bool place_pruned_graph() const; + void set_place_pruned_graph(bool value); + private: + bool _internal_place_pruned_graph() const; + void _internal_set_place_pruned_graph(bool value); + public: + + // bool enable_bfloat16_sendrecv = 7; + void clear_enable_bfloat16_sendrecv(); + bool enable_bfloat16_sendrecv() const; + void set_enable_bfloat16_sendrecv(bool value); + private: + bool _internal_enable_bfloat16_sendrecv() const; + void _internal_set_enable_bfloat16_sendrecv(bool value); + public: + + // int32 timeline_step = 8; + void clear_timeline_step(); + int32_t timeline_step() const; + void set_timeline_step(int32_t value); + private: + int32_t _internal_timeline_step() const; + void _internal_set_timeline_step(int32_t value); + public: + + // int64 build_cost_model_after = 9; + void clear_build_cost_model_after(); + int64_t build_cost_model_after() const; + void set_build_cost_model_after(int64_t value); + private: + int64_t _internal_build_cost_model_after() const; + void _internal_set_build_cost_model_after(int64_t value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.GraphOptions) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::tensorflow::OptimizerOptions* optimizer_options_; + ::tensorflow::RewriterConfig* rewrite_options_; + int64_t build_cost_model_; + bool enable_recv_scheduling_; + bool infer_shapes_; + bool place_pruned_graph_; + bool enable_bfloat16_sendrecv_; + int32_t timeline_step_; + int64_t build_cost_model_after_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fconfig_2eproto; +}; +// ------------------------------------------------------------------- + +class ThreadPoolOptionProto final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.ThreadPoolOptionProto) */ { + public: + inline ThreadPoolOptionProto() : ThreadPoolOptionProto(nullptr) {} + ~ThreadPoolOptionProto() override; + explicit PROTOBUF_CONSTEXPR ThreadPoolOptionProto(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + ThreadPoolOptionProto(const ThreadPoolOptionProto& from); + ThreadPoolOptionProto(ThreadPoolOptionProto&& from) noexcept + : ThreadPoolOptionProto() { + *this = ::std::move(from); + } + + inline ThreadPoolOptionProto& operator=(const ThreadPoolOptionProto& from) { + CopyFrom(from); + return *this; + } + inline ThreadPoolOptionProto& operator=(ThreadPoolOptionProto&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const ThreadPoolOptionProto& default_instance() { + return *internal_default_instance(); + } + static inline const ThreadPoolOptionProto* internal_default_instance() { + return reinterpret_cast( + &_ThreadPoolOptionProto_default_instance_); + } + static constexpr int kIndexInFileMessages = + 5; + + friend void swap(ThreadPoolOptionProto& a, ThreadPoolOptionProto& b) { + a.Swap(&b); + } + inline void Swap(ThreadPoolOptionProto* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(ThreadPoolOptionProto* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + ThreadPoolOptionProto* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const ThreadPoolOptionProto& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const ThreadPoolOptionProto& from) { + ThreadPoolOptionProto::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(ThreadPoolOptionProto* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.ThreadPoolOptionProto"; + } + protected: + explicit ThreadPoolOptionProto(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kGlobalNameFieldNumber = 2, + kNumThreadsFieldNumber = 1, + }; + // string global_name = 2; + void clear_global_name(); + const std::string& global_name() const; + template + void set_global_name(ArgT0&& arg0, ArgT... args); + std::string* mutable_global_name(); + PROTOBUF_NODISCARD std::string* release_global_name(); + void set_allocated_global_name(std::string* global_name); + private: + const std::string& _internal_global_name() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_global_name(const std::string& value); + std::string* _internal_mutable_global_name(); + public: + + // int32 num_threads = 1; + void clear_num_threads(); + int32_t num_threads() const; + void set_num_threads(int32_t value); + private: + int32_t _internal_num_threads() const; + void _internal_set_num_threads(int32_t value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.ThreadPoolOptionProto) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr global_name_; + int32_t num_threads_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fconfig_2eproto; +}; +// ------------------------------------------------------------------- + +class SessionMetadata final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.SessionMetadata) */ { + public: + inline SessionMetadata() : SessionMetadata(nullptr) {} + ~SessionMetadata() override; + explicit PROTOBUF_CONSTEXPR SessionMetadata(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + SessionMetadata(const SessionMetadata& from); + SessionMetadata(SessionMetadata&& from) noexcept + : SessionMetadata() { + *this = ::std::move(from); + } + + inline SessionMetadata& operator=(const SessionMetadata& from) { + CopyFrom(from); + return *this; + } + inline SessionMetadata& operator=(SessionMetadata&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const SessionMetadata& default_instance() { + return *internal_default_instance(); + } + static inline const SessionMetadata* internal_default_instance() { + return reinterpret_cast( + &_SessionMetadata_default_instance_); + } + static constexpr int kIndexInFileMessages = + 6; + + friend void swap(SessionMetadata& a, SessionMetadata& b) { + a.Swap(&b); + } + inline void Swap(SessionMetadata* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(SessionMetadata* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + SessionMetadata* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const SessionMetadata& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const SessionMetadata& from) { + SessionMetadata::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(SessionMetadata* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.SessionMetadata"; + } + protected: + explicit SessionMetadata(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kNameFieldNumber = 1, + kVersionFieldNumber = 2, + }; + // string name = 1; + void clear_name(); + const std::string& name() const; + template + void set_name(ArgT0&& arg0, ArgT... args); + std::string* mutable_name(); + PROTOBUF_NODISCARD std::string* release_name(); + void set_allocated_name(std::string* name); + private: + const std::string& _internal_name() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_name(const std::string& value); + std::string* _internal_mutable_name(); + public: + + // int64 version = 2; + void clear_version(); + int64_t version() const; + void set_version(int64_t value); + private: + int64_t _internal_version() const; + void _internal_set_version(int64_t value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.SessionMetadata) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_; + int64_t version_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fconfig_2eproto; +}; +// ------------------------------------------------------------------- + +class ConfigProto_DeviceCountEntry_DoNotUse : public ::PROTOBUF_NAMESPACE_ID::internal::MapEntry { +public: + typedef ::PROTOBUF_NAMESPACE_ID::internal::MapEntry SuperType; + ConfigProto_DeviceCountEntry_DoNotUse(); + explicit PROTOBUF_CONSTEXPR ConfigProto_DeviceCountEntry_DoNotUse( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + explicit ConfigProto_DeviceCountEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena); + void MergeFrom(const ConfigProto_DeviceCountEntry_DoNotUse& other); + static const ConfigProto_DeviceCountEntry_DoNotUse* internal_default_instance() { return reinterpret_cast(&_ConfigProto_DeviceCountEntry_DoNotUse_default_instance_); } + static bool ValidateKey(std::string* s) { + return ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(s->data(), static_cast(s->size()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, "tensorflow.ConfigProto.DeviceCountEntry.key"); + } + static bool ValidateValue(void*) { return true; } + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fconfig_2eproto; +}; + +// ------------------------------------------------------------------- + +class ConfigProto_Experimental final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.ConfigProto.Experimental) */ { + public: + inline ConfigProto_Experimental() : ConfigProto_Experimental(nullptr) {} + ~ConfigProto_Experimental() override; + explicit PROTOBUF_CONSTEXPR ConfigProto_Experimental(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + ConfigProto_Experimental(const ConfigProto_Experimental& from); + ConfigProto_Experimental(ConfigProto_Experimental&& from) noexcept + : ConfigProto_Experimental() { + *this = ::std::move(from); + } + + inline ConfigProto_Experimental& operator=(const ConfigProto_Experimental& from) { + CopyFrom(from); + return *this; + } + inline ConfigProto_Experimental& operator=(ConfigProto_Experimental&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const ConfigProto_Experimental& default_instance() { + return *internal_default_instance(); + } + static inline const ConfigProto_Experimental* internal_default_instance() { + return reinterpret_cast( + &_ConfigProto_Experimental_default_instance_); + } + static constexpr int kIndexInFileMessages = + 8; + + friend void swap(ConfigProto_Experimental& a, ConfigProto_Experimental& b) { + a.Swap(&b); + } + inline void Swap(ConfigProto_Experimental* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(ConfigProto_Experimental* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + ConfigProto_Experimental* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const ConfigProto_Experimental& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const ConfigProto_Experimental& from) { + ConfigProto_Experimental::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(ConfigProto_Experimental* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.ConfigProto.Experimental"; + } + protected: + explicit ConfigProto_Experimental(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + typedef ConfigProto_Experimental_MlirBridgeRollout MlirBridgeRollout; + static constexpr MlirBridgeRollout MLIR_BRIDGE_ROLLOUT_UNSPECIFIED = + ConfigProto_Experimental_MlirBridgeRollout_MLIR_BRIDGE_ROLLOUT_UNSPECIFIED; + static constexpr MlirBridgeRollout MLIR_BRIDGE_ROLLOUT_ENABLED = + ConfigProto_Experimental_MlirBridgeRollout_MLIR_BRIDGE_ROLLOUT_ENABLED; + static constexpr MlirBridgeRollout MLIR_BRIDGE_ROLLOUT_DISABLED = + ConfigProto_Experimental_MlirBridgeRollout_MLIR_BRIDGE_ROLLOUT_DISABLED; + static inline bool MlirBridgeRollout_IsValid(int value) { + return ConfigProto_Experimental_MlirBridgeRollout_IsValid(value); + } + static constexpr MlirBridgeRollout MlirBridgeRollout_MIN = + ConfigProto_Experimental_MlirBridgeRollout_MlirBridgeRollout_MIN; + static constexpr MlirBridgeRollout MlirBridgeRollout_MAX = + ConfigProto_Experimental_MlirBridgeRollout_MlirBridgeRollout_MAX; + static constexpr int MlirBridgeRollout_ARRAYSIZE = + ConfigProto_Experimental_MlirBridgeRollout_MlirBridgeRollout_ARRAYSIZE; + static inline const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* + MlirBridgeRollout_descriptor() { + return ConfigProto_Experimental_MlirBridgeRollout_descriptor(); + } + template + static inline const std::string& MlirBridgeRollout_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function MlirBridgeRollout_Name."); + return ConfigProto_Experimental_MlirBridgeRollout_Name(enum_t_value); + } + static inline bool MlirBridgeRollout_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name, + MlirBridgeRollout* value) { + return ConfigProto_Experimental_MlirBridgeRollout_Parse(name, value); + } + + // accessors ------------------------------------------------------- + + enum : int { + kCollectiveGroupLeaderFieldNumber = 1, + kExecutorTypeFieldNumber = 3, + kSessionMetadataFieldNumber = 11, + kCoordinationConfigFieldNumber = 23, + kRecvBufMaxChunkFieldNumber = 4, + kUseNumaAffinityFieldNumber = 5, + kCollectiveDeterministicSequentialExecutionFieldNumber = 6, + kCollectiveNcclFieldNumber = 7, + kShareSessionStateInClusterspecPropagationFieldNumber = 8, + kDisableThreadSpinningFieldNumber = 9, + kShareClusterDevicesInSessionFieldNumber = 10, + kOptimizeForStaticGraphFieldNumber = 12, + kEnableMlirBridgeFieldNumber = 13, + kMlirBridgeRolloutFieldNumber = 17, + kXlaFusionAutotunerThreshFieldNumber = 15, + kEnableMlirGraphOptimizationFieldNumber = 16, + kDisableOutputPartitionGraphsFieldNumber = 14, + kUseTfrtFieldNumber = 18, + kDisableFunctionalOpsLoweringFieldNumber = 21, + kXlaPreferSingleGraphClusterFieldNumber = 22, + kDisableOptimizeForStaticGraphFieldNumber = 24, + kDisableEagerExecutorStreamingEnqueueFieldNumber = 26, + }; + // string collective_group_leader = 1; + void clear_collective_group_leader(); + const std::string& collective_group_leader() const; + template + void set_collective_group_leader(ArgT0&& arg0, ArgT... args); + std::string* mutable_collective_group_leader(); + PROTOBUF_NODISCARD std::string* release_collective_group_leader(); + void set_allocated_collective_group_leader(std::string* collective_group_leader); + private: + const std::string& _internal_collective_group_leader() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_collective_group_leader(const std::string& value); + std::string* _internal_mutable_collective_group_leader(); + public: + + // string executor_type = 3; + void clear_executor_type(); + const std::string& executor_type() const; + template + void set_executor_type(ArgT0&& arg0, ArgT... args); + std::string* mutable_executor_type(); + PROTOBUF_NODISCARD std::string* release_executor_type(); + void set_allocated_executor_type(std::string* executor_type); + private: + const std::string& _internal_executor_type() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_executor_type(const std::string& value); + std::string* _internal_mutable_executor_type(); + public: + + // .tensorflow.SessionMetadata session_metadata = 11; + bool has_session_metadata() const; + private: + bool _internal_has_session_metadata() const; + public: + void clear_session_metadata(); + const ::tensorflow::SessionMetadata& session_metadata() const; + PROTOBUF_NODISCARD ::tensorflow::SessionMetadata* release_session_metadata(); + ::tensorflow::SessionMetadata* mutable_session_metadata(); + void set_allocated_session_metadata(::tensorflow::SessionMetadata* session_metadata); + private: + const ::tensorflow::SessionMetadata& _internal_session_metadata() const; + ::tensorflow::SessionMetadata* _internal_mutable_session_metadata(); + public: + void unsafe_arena_set_allocated_session_metadata( + ::tensorflow::SessionMetadata* session_metadata); + ::tensorflow::SessionMetadata* unsafe_arena_release_session_metadata(); + + // .tensorflow.CoordinationServiceConfig coordination_config = 23; + bool has_coordination_config() const; + private: + bool _internal_has_coordination_config() const; + public: + void clear_coordination_config(); + const ::tensorflow::CoordinationServiceConfig& coordination_config() const; + PROTOBUF_NODISCARD ::tensorflow::CoordinationServiceConfig* release_coordination_config(); + ::tensorflow::CoordinationServiceConfig* mutable_coordination_config(); + void set_allocated_coordination_config(::tensorflow::CoordinationServiceConfig* coordination_config); + private: + const ::tensorflow::CoordinationServiceConfig& _internal_coordination_config() const; + ::tensorflow::CoordinationServiceConfig* _internal_mutable_coordination_config(); + public: + void unsafe_arena_set_allocated_coordination_config( + ::tensorflow::CoordinationServiceConfig* coordination_config); + ::tensorflow::CoordinationServiceConfig* unsafe_arena_release_coordination_config(); + + // int32 recv_buf_max_chunk = 4; + void clear_recv_buf_max_chunk(); + int32_t recv_buf_max_chunk() const; + void set_recv_buf_max_chunk(int32_t value); + private: + int32_t _internal_recv_buf_max_chunk() const; + void _internal_set_recv_buf_max_chunk(int32_t value); + public: + + // bool use_numa_affinity = 5; + void clear_use_numa_affinity(); + bool use_numa_affinity() const; + void set_use_numa_affinity(bool value); + private: + bool _internal_use_numa_affinity() const; + void _internal_set_use_numa_affinity(bool value); + public: + + // bool collective_deterministic_sequential_execution = 6; + void clear_collective_deterministic_sequential_execution(); + bool collective_deterministic_sequential_execution() const; + void set_collective_deterministic_sequential_execution(bool value); + private: + bool _internal_collective_deterministic_sequential_execution() const; + void _internal_set_collective_deterministic_sequential_execution(bool value); + public: + + // bool collective_nccl = 7; + void clear_collective_nccl(); + bool collective_nccl() const; + void set_collective_nccl(bool value); + private: + bool _internal_collective_nccl() const; + void _internal_set_collective_nccl(bool value); + public: + + // bool share_session_state_in_clusterspec_propagation = 8; + void clear_share_session_state_in_clusterspec_propagation(); + bool share_session_state_in_clusterspec_propagation() const; + void set_share_session_state_in_clusterspec_propagation(bool value); + private: + bool _internal_share_session_state_in_clusterspec_propagation() const; + void _internal_set_share_session_state_in_clusterspec_propagation(bool value); + public: + + // bool disable_thread_spinning = 9; + void clear_disable_thread_spinning(); + bool disable_thread_spinning() const; + void set_disable_thread_spinning(bool value); + private: + bool _internal_disable_thread_spinning() const; + void _internal_set_disable_thread_spinning(bool value); + public: + + // bool share_cluster_devices_in_session = 10; + void clear_share_cluster_devices_in_session(); + bool share_cluster_devices_in_session() const; + void set_share_cluster_devices_in_session(bool value); + private: + bool _internal_share_cluster_devices_in_session() const; + void _internal_set_share_cluster_devices_in_session(bool value); + public: + + // bool optimize_for_static_graph = 12; + void clear_optimize_for_static_graph(); + bool optimize_for_static_graph() const; + void set_optimize_for_static_graph(bool value); + private: + bool _internal_optimize_for_static_graph() const; + void _internal_set_optimize_for_static_graph(bool value); + public: + + // bool enable_mlir_bridge = 13; + void clear_enable_mlir_bridge(); + bool enable_mlir_bridge() const; + void set_enable_mlir_bridge(bool value); + private: + bool _internal_enable_mlir_bridge() const; + void _internal_set_enable_mlir_bridge(bool value); + public: + + // .tensorflow.ConfigProto.Experimental.MlirBridgeRollout mlir_bridge_rollout = 17; + void clear_mlir_bridge_rollout(); + ::tensorflow::ConfigProto_Experimental_MlirBridgeRollout mlir_bridge_rollout() const; + void set_mlir_bridge_rollout(::tensorflow::ConfigProto_Experimental_MlirBridgeRollout value); + private: + ::tensorflow::ConfigProto_Experimental_MlirBridgeRollout _internal_mlir_bridge_rollout() const; + void _internal_set_mlir_bridge_rollout(::tensorflow::ConfigProto_Experimental_MlirBridgeRollout value); + public: + + // int64 xla_fusion_autotuner_thresh = 15; + void clear_xla_fusion_autotuner_thresh(); + int64_t xla_fusion_autotuner_thresh() const; + void set_xla_fusion_autotuner_thresh(int64_t value); + private: + int64_t _internal_xla_fusion_autotuner_thresh() const; + void _internal_set_xla_fusion_autotuner_thresh(int64_t value); + public: + + // bool enable_mlir_graph_optimization = 16; + void clear_enable_mlir_graph_optimization(); + bool enable_mlir_graph_optimization() const; + void set_enable_mlir_graph_optimization(bool value); + private: + bool _internal_enable_mlir_graph_optimization() const; + void _internal_set_enable_mlir_graph_optimization(bool value); + public: + + // bool disable_output_partition_graphs = 14; + void clear_disable_output_partition_graphs(); + bool disable_output_partition_graphs() const; + void set_disable_output_partition_graphs(bool value); + private: + bool _internal_disable_output_partition_graphs() const; + void _internal_set_disable_output_partition_graphs(bool value); + public: + + // bool use_tfrt = 18; + void clear_use_tfrt(); + bool use_tfrt() const; + void set_use_tfrt(bool value); + private: + bool _internal_use_tfrt() const; + void _internal_set_use_tfrt(bool value); + public: + + // bool disable_functional_ops_lowering = 21; + void clear_disable_functional_ops_lowering(); + bool disable_functional_ops_lowering() const; + void set_disable_functional_ops_lowering(bool value); + private: + bool _internal_disable_functional_ops_lowering() const; + void _internal_set_disable_functional_ops_lowering(bool value); + public: + + // bool xla_prefer_single_graph_cluster = 22; + void clear_xla_prefer_single_graph_cluster(); + bool xla_prefer_single_graph_cluster() const; + void set_xla_prefer_single_graph_cluster(bool value); + private: + bool _internal_xla_prefer_single_graph_cluster() const; + void _internal_set_xla_prefer_single_graph_cluster(bool value); + public: + + // bool disable_optimize_for_static_graph = 24; + void clear_disable_optimize_for_static_graph(); + bool disable_optimize_for_static_graph() const; + void set_disable_optimize_for_static_graph(bool value); + private: + bool _internal_disable_optimize_for_static_graph() const; + void _internal_set_disable_optimize_for_static_graph(bool value); + public: + + // bool disable_eager_executor_streaming_enqueue = 26; + void clear_disable_eager_executor_streaming_enqueue(); + bool disable_eager_executor_streaming_enqueue() const; + void set_disable_eager_executor_streaming_enqueue(bool value); + private: + bool _internal_disable_eager_executor_streaming_enqueue() const; + void _internal_set_disable_eager_executor_streaming_enqueue(bool value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.ConfigProto.Experimental) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr collective_group_leader_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr executor_type_; + ::tensorflow::SessionMetadata* session_metadata_; + ::tensorflow::CoordinationServiceConfig* coordination_config_; + int32_t recv_buf_max_chunk_; + bool use_numa_affinity_; + bool collective_deterministic_sequential_execution_; + bool collective_nccl_; + bool share_session_state_in_clusterspec_propagation_; + bool disable_thread_spinning_; + bool share_cluster_devices_in_session_; + bool optimize_for_static_graph_; + bool enable_mlir_bridge_; + int mlir_bridge_rollout_; + int64_t xla_fusion_autotuner_thresh_; + bool enable_mlir_graph_optimization_; + bool disable_output_partition_graphs_; + bool use_tfrt_; + bool disable_functional_ops_lowering_; + bool xla_prefer_single_graph_cluster_; + bool disable_optimize_for_static_graph_; + bool disable_eager_executor_streaming_enqueue_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fconfig_2eproto; +}; +// ------------------------------------------------------------------- + +class ConfigProto final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.ConfigProto) */ { + public: + inline ConfigProto() : ConfigProto(nullptr) {} + ~ConfigProto() override; + explicit PROTOBUF_CONSTEXPR ConfigProto(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + ConfigProto(const ConfigProto& from); + ConfigProto(ConfigProto&& from) noexcept + : ConfigProto() { + *this = ::std::move(from); + } + + inline ConfigProto& operator=(const ConfigProto& from) { + CopyFrom(from); + return *this; + } + inline ConfigProto& operator=(ConfigProto&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const ConfigProto& default_instance() { + return *internal_default_instance(); + } + static inline const ConfigProto* internal_default_instance() { + return reinterpret_cast( + &_ConfigProto_default_instance_); + } + static constexpr int kIndexInFileMessages = + 9; + + friend void swap(ConfigProto& a, ConfigProto& b) { + a.Swap(&b); + } + inline void Swap(ConfigProto* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(ConfigProto* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + ConfigProto* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const ConfigProto& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const ConfigProto& from) { + ConfigProto::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(ConfigProto* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.ConfigProto"; + } + protected: + explicit ConfigProto(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + typedef ConfigProto_Experimental Experimental; + + // accessors ------------------------------------------------------- + + enum : int { + kDeviceCountFieldNumber = 1, + kDeviceFiltersFieldNumber = 4, + kSessionInterOpThreadPoolFieldNumber = 12, + kGpuOptionsFieldNumber = 6, + kGraphOptionsFieldNumber = 10, + kRpcOptionsFieldNumber = 13, + kClusterDefFieldNumber = 14, + kExperimentalFieldNumber = 16, + kIntraOpParallelismThreadsFieldNumber = 2, + kPlacementPeriodFieldNumber = 3, + kInterOpParallelismThreadsFieldNumber = 5, + kUsePerSessionThreadsFieldNumber = 9, + kAllowSoftPlacementFieldNumber = 7, + kLogDevicePlacementFieldNumber = 8, + kIsolateSessionStateFieldNumber = 15, + kOperationTimeoutInMsFieldNumber = 11, + kShareClusterDevicesInSessionFieldNumber = 17, + }; + // map device_count = 1; + int device_count_size() const; + private: + int _internal_device_count_size() const; + public: + void clear_device_count(); + private: + const ::PROTOBUF_NAMESPACE_ID::Map< std::string, int32_t >& + _internal_device_count() const; + ::PROTOBUF_NAMESPACE_ID::Map< std::string, int32_t >* + _internal_mutable_device_count(); + public: + const ::PROTOBUF_NAMESPACE_ID::Map< std::string, int32_t >& + device_count() const; + ::PROTOBUF_NAMESPACE_ID::Map< std::string, int32_t >* + mutable_device_count(); + + // repeated string device_filters = 4; + int device_filters_size() const; + private: + int _internal_device_filters_size() const; + public: + void clear_device_filters(); + const std::string& device_filters(int index) const; + std::string* mutable_device_filters(int index); + void set_device_filters(int index, const std::string& value); + void set_device_filters(int index, std::string&& value); + void set_device_filters(int index, const char* value); + void set_device_filters(int index, const char* value, size_t size); + std::string* add_device_filters(); + void add_device_filters(const std::string& value); + void add_device_filters(std::string&& value); + void add_device_filters(const char* value); + void add_device_filters(const char* value, size_t size); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& device_filters() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* mutable_device_filters(); + private: + const std::string& _internal_device_filters(int index) const; + std::string* _internal_add_device_filters(); + public: + + // repeated .tensorflow.ThreadPoolOptionProto session_inter_op_thread_pool = 12; + int session_inter_op_thread_pool_size() const; + private: + int _internal_session_inter_op_thread_pool_size() const; + public: + void clear_session_inter_op_thread_pool(); + ::tensorflow::ThreadPoolOptionProto* mutable_session_inter_op_thread_pool(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::ThreadPoolOptionProto >* + mutable_session_inter_op_thread_pool(); + private: + const ::tensorflow::ThreadPoolOptionProto& _internal_session_inter_op_thread_pool(int index) const; + ::tensorflow::ThreadPoolOptionProto* _internal_add_session_inter_op_thread_pool(); + public: + const ::tensorflow::ThreadPoolOptionProto& session_inter_op_thread_pool(int index) const; + ::tensorflow::ThreadPoolOptionProto* add_session_inter_op_thread_pool(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::ThreadPoolOptionProto >& + session_inter_op_thread_pool() const; + + // .tensorflow.GPUOptions gpu_options = 6; + bool has_gpu_options() const; + private: + bool _internal_has_gpu_options() const; + public: + void clear_gpu_options(); + const ::tensorflow::GPUOptions& gpu_options() const; + PROTOBUF_NODISCARD ::tensorflow::GPUOptions* release_gpu_options(); + ::tensorflow::GPUOptions* mutable_gpu_options(); + void set_allocated_gpu_options(::tensorflow::GPUOptions* gpu_options); + private: + const ::tensorflow::GPUOptions& _internal_gpu_options() const; + ::tensorflow::GPUOptions* _internal_mutable_gpu_options(); + public: + void unsafe_arena_set_allocated_gpu_options( + ::tensorflow::GPUOptions* gpu_options); + ::tensorflow::GPUOptions* unsafe_arena_release_gpu_options(); + + // .tensorflow.GraphOptions graph_options = 10; + bool has_graph_options() const; + private: + bool _internal_has_graph_options() const; + public: + void clear_graph_options(); + const ::tensorflow::GraphOptions& graph_options() const; + PROTOBUF_NODISCARD ::tensorflow::GraphOptions* release_graph_options(); + ::tensorflow::GraphOptions* mutable_graph_options(); + void set_allocated_graph_options(::tensorflow::GraphOptions* graph_options); + private: + const ::tensorflow::GraphOptions& _internal_graph_options() const; + ::tensorflow::GraphOptions* _internal_mutable_graph_options(); + public: + void unsafe_arena_set_allocated_graph_options( + ::tensorflow::GraphOptions* graph_options); + ::tensorflow::GraphOptions* unsafe_arena_release_graph_options(); + + // .tensorflow.RPCOptions rpc_options = 13; + bool has_rpc_options() const; + private: + bool _internal_has_rpc_options() const; + public: + void clear_rpc_options(); + const ::tensorflow::RPCOptions& rpc_options() const; + PROTOBUF_NODISCARD ::tensorflow::RPCOptions* release_rpc_options(); + ::tensorflow::RPCOptions* mutable_rpc_options(); + void set_allocated_rpc_options(::tensorflow::RPCOptions* rpc_options); + private: + const ::tensorflow::RPCOptions& _internal_rpc_options() const; + ::tensorflow::RPCOptions* _internal_mutable_rpc_options(); + public: + void unsafe_arena_set_allocated_rpc_options( + ::tensorflow::RPCOptions* rpc_options); + ::tensorflow::RPCOptions* unsafe_arena_release_rpc_options(); + + // .tensorflow.ClusterDef cluster_def = 14; + bool has_cluster_def() const; + private: + bool _internal_has_cluster_def() const; + public: + void clear_cluster_def(); + const ::tensorflow::ClusterDef& cluster_def() const; + PROTOBUF_NODISCARD ::tensorflow::ClusterDef* release_cluster_def(); + ::tensorflow::ClusterDef* mutable_cluster_def(); + void set_allocated_cluster_def(::tensorflow::ClusterDef* cluster_def); + private: + const ::tensorflow::ClusterDef& _internal_cluster_def() const; + ::tensorflow::ClusterDef* _internal_mutable_cluster_def(); + public: + void unsafe_arena_set_allocated_cluster_def( + ::tensorflow::ClusterDef* cluster_def); + ::tensorflow::ClusterDef* unsafe_arena_release_cluster_def(); + + // .tensorflow.ConfigProto.Experimental experimental = 16; + bool has_experimental() const; + private: + bool _internal_has_experimental() const; + public: + void clear_experimental(); + const ::tensorflow::ConfigProto_Experimental& experimental() const; + PROTOBUF_NODISCARD ::tensorflow::ConfigProto_Experimental* release_experimental(); + ::tensorflow::ConfigProto_Experimental* mutable_experimental(); + void set_allocated_experimental(::tensorflow::ConfigProto_Experimental* experimental); + private: + const ::tensorflow::ConfigProto_Experimental& _internal_experimental() const; + ::tensorflow::ConfigProto_Experimental* _internal_mutable_experimental(); + public: + void unsafe_arena_set_allocated_experimental( + ::tensorflow::ConfigProto_Experimental* experimental); + ::tensorflow::ConfigProto_Experimental* unsafe_arena_release_experimental(); + + // int32 intra_op_parallelism_threads = 2; + void clear_intra_op_parallelism_threads(); + int32_t intra_op_parallelism_threads() const; + void set_intra_op_parallelism_threads(int32_t value); + private: + int32_t _internal_intra_op_parallelism_threads() const; + void _internal_set_intra_op_parallelism_threads(int32_t value); + public: + + // int32 placement_period = 3; + void clear_placement_period(); + int32_t placement_period() const; + void set_placement_period(int32_t value); + private: + int32_t _internal_placement_period() const; + void _internal_set_placement_period(int32_t value); + public: + + // int32 inter_op_parallelism_threads = 5; + void clear_inter_op_parallelism_threads(); + int32_t inter_op_parallelism_threads() const; + void set_inter_op_parallelism_threads(int32_t value); + private: + int32_t _internal_inter_op_parallelism_threads() const; + void _internal_set_inter_op_parallelism_threads(int32_t value); + public: + + // bool use_per_session_threads = 9; + void clear_use_per_session_threads(); + bool use_per_session_threads() const; + void set_use_per_session_threads(bool value); + private: + bool _internal_use_per_session_threads() const; + void _internal_set_use_per_session_threads(bool value); + public: + + // bool allow_soft_placement = 7; + void clear_allow_soft_placement(); + bool allow_soft_placement() const; + void set_allow_soft_placement(bool value); + private: + bool _internal_allow_soft_placement() const; + void _internal_set_allow_soft_placement(bool value); + public: + + // bool log_device_placement = 8; + void clear_log_device_placement(); + bool log_device_placement() const; + void set_log_device_placement(bool value); + private: + bool _internal_log_device_placement() const; + void _internal_set_log_device_placement(bool value); + public: + + // bool isolate_session_state = 15; + void clear_isolate_session_state(); + bool isolate_session_state() const; + void set_isolate_session_state(bool value); + private: + bool _internal_isolate_session_state() const; + void _internal_set_isolate_session_state(bool value); + public: + + // int64 operation_timeout_in_ms = 11; + void clear_operation_timeout_in_ms(); + int64_t operation_timeout_in_ms() const; + void set_operation_timeout_in_ms(int64_t value); + private: + int64_t _internal_operation_timeout_in_ms() const; + void _internal_set_operation_timeout_in_ms(int64_t value); + public: + + // bool share_cluster_devices_in_session = 17; + void clear_share_cluster_devices_in_session(); + bool share_cluster_devices_in_session() const; + void set_share_cluster_devices_in_session(bool value); + private: + bool _internal_share_cluster_devices_in_session() const; + void _internal_set_share_cluster_devices_in_session(bool value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.ConfigProto) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::MapField< + ConfigProto_DeviceCountEntry_DoNotUse, + std::string, int32_t, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT32> device_count_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField device_filters_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::ThreadPoolOptionProto > session_inter_op_thread_pool_; + ::tensorflow::GPUOptions* gpu_options_; + ::tensorflow::GraphOptions* graph_options_; + ::tensorflow::RPCOptions* rpc_options_; + ::tensorflow::ClusterDef* cluster_def_; + ::tensorflow::ConfigProto_Experimental* experimental_; + int32_t intra_op_parallelism_threads_; + int32_t placement_period_; + int32_t inter_op_parallelism_threads_; + bool use_per_session_threads_; + bool allow_soft_placement_; + bool log_device_placement_; + bool isolate_session_state_; + int64_t operation_timeout_in_ms_; + bool share_cluster_devices_in_session_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fconfig_2eproto; +}; +// ------------------------------------------------------------------- + +class RunOptions_Experimental_RunHandlerPoolOptions final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.RunOptions.Experimental.RunHandlerPoolOptions) */ { + public: + inline RunOptions_Experimental_RunHandlerPoolOptions() : RunOptions_Experimental_RunHandlerPoolOptions(nullptr) {} + ~RunOptions_Experimental_RunHandlerPoolOptions() override; + explicit PROTOBUF_CONSTEXPR RunOptions_Experimental_RunHandlerPoolOptions(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + RunOptions_Experimental_RunHandlerPoolOptions(const RunOptions_Experimental_RunHandlerPoolOptions& from); + RunOptions_Experimental_RunHandlerPoolOptions(RunOptions_Experimental_RunHandlerPoolOptions&& from) noexcept + : RunOptions_Experimental_RunHandlerPoolOptions() { + *this = ::std::move(from); + } + + inline RunOptions_Experimental_RunHandlerPoolOptions& operator=(const RunOptions_Experimental_RunHandlerPoolOptions& from) { + CopyFrom(from); + return *this; + } + inline RunOptions_Experimental_RunHandlerPoolOptions& operator=(RunOptions_Experimental_RunHandlerPoolOptions&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const RunOptions_Experimental_RunHandlerPoolOptions& default_instance() { + return *internal_default_instance(); + } + static inline const RunOptions_Experimental_RunHandlerPoolOptions* internal_default_instance() { + return reinterpret_cast( + &_RunOptions_Experimental_RunHandlerPoolOptions_default_instance_); + } + static constexpr int kIndexInFileMessages = + 10; + + friend void swap(RunOptions_Experimental_RunHandlerPoolOptions& a, RunOptions_Experimental_RunHandlerPoolOptions& b) { + a.Swap(&b); + } + inline void Swap(RunOptions_Experimental_RunHandlerPoolOptions* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(RunOptions_Experimental_RunHandlerPoolOptions* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + RunOptions_Experimental_RunHandlerPoolOptions* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const RunOptions_Experimental_RunHandlerPoolOptions& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const RunOptions_Experimental_RunHandlerPoolOptions& from) { + RunOptions_Experimental_RunHandlerPoolOptions::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(RunOptions_Experimental_RunHandlerPoolOptions* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.RunOptions.Experimental.RunHandlerPoolOptions"; + } + protected: + explicit RunOptions_Experimental_RunHandlerPoolOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kPriorityFieldNumber = 1, + }; + // int64 priority = 1; + void clear_priority(); + int64_t priority() const; + void set_priority(int64_t value); + private: + int64_t _internal_priority() const; + void _internal_set_priority(int64_t value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.RunOptions.Experimental.RunHandlerPoolOptions) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + int64_t priority_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fconfig_2eproto; +}; +// ------------------------------------------------------------------- + +class RunOptions_Experimental final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.RunOptions.Experimental) */ { + public: + inline RunOptions_Experimental() : RunOptions_Experimental(nullptr) {} + ~RunOptions_Experimental() override; + explicit PROTOBUF_CONSTEXPR RunOptions_Experimental(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + RunOptions_Experimental(const RunOptions_Experimental& from); + RunOptions_Experimental(RunOptions_Experimental&& from) noexcept + : RunOptions_Experimental() { + *this = ::std::move(from); + } + + inline RunOptions_Experimental& operator=(const RunOptions_Experimental& from) { + CopyFrom(from); + return *this; + } + inline RunOptions_Experimental& operator=(RunOptions_Experimental&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const RunOptions_Experimental& default_instance() { + return *internal_default_instance(); + } + static inline const RunOptions_Experimental* internal_default_instance() { + return reinterpret_cast( + &_RunOptions_Experimental_default_instance_); + } + static constexpr int kIndexInFileMessages = + 11; + + friend void swap(RunOptions_Experimental& a, RunOptions_Experimental& b) { + a.Swap(&b); + } + inline void Swap(RunOptions_Experimental* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(RunOptions_Experimental* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + RunOptions_Experimental* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const RunOptions_Experimental& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const RunOptions_Experimental& from) { + RunOptions_Experimental::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(RunOptions_Experimental* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.RunOptions.Experimental"; + } + protected: + explicit RunOptions_Experimental(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + typedef RunOptions_Experimental_RunHandlerPoolOptions RunHandlerPoolOptions; + + // accessors ------------------------------------------------------- + + enum : int { + kRunHandlerPoolOptionsFieldNumber = 3, + kCollectiveGraphKeyFieldNumber = 1, + kUseRunHandlerPoolFieldNumber = 2, + }; + // .tensorflow.RunOptions.Experimental.RunHandlerPoolOptions run_handler_pool_options = 3; + bool has_run_handler_pool_options() const; + private: + bool _internal_has_run_handler_pool_options() const; + public: + void clear_run_handler_pool_options(); + const ::tensorflow::RunOptions_Experimental_RunHandlerPoolOptions& run_handler_pool_options() const; + PROTOBUF_NODISCARD ::tensorflow::RunOptions_Experimental_RunHandlerPoolOptions* release_run_handler_pool_options(); + ::tensorflow::RunOptions_Experimental_RunHandlerPoolOptions* mutable_run_handler_pool_options(); + void set_allocated_run_handler_pool_options(::tensorflow::RunOptions_Experimental_RunHandlerPoolOptions* run_handler_pool_options); + private: + const ::tensorflow::RunOptions_Experimental_RunHandlerPoolOptions& _internal_run_handler_pool_options() const; + ::tensorflow::RunOptions_Experimental_RunHandlerPoolOptions* _internal_mutable_run_handler_pool_options(); + public: + void unsafe_arena_set_allocated_run_handler_pool_options( + ::tensorflow::RunOptions_Experimental_RunHandlerPoolOptions* run_handler_pool_options); + ::tensorflow::RunOptions_Experimental_RunHandlerPoolOptions* unsafe_arena_release_run_handler_pool_options(); + + // int64 collective_graph_key = 1; + void clear_collective_graph_key(); + int64_t collective_graph_key() const; + void set_collective_graph_key(int64_t value); + private: + int64_t _internal_collective_graph_key() const; + void _internal_set_collective_graph_key(int64_t value); + public: + + // bool use_run_handler_pool = 2; + void clear_use_run_handler_pool(); + bool use_run_handler_pool() const; + void set_use_run_handler_pool(bool value); + private: + bool _internal_use_run_handler_pool() const; + void _internal_set_use_run_handler_pool(bool value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.RunOptions.Experimental) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::tensorflow::RunOptions_Experimental_RunHandlerPoolOptions* run_handler_pool_options_; + int64_t collective_graph_key_; + bool use_run_handler_pool_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fconfig_2eproto; +}; +// ------------------------------------------------------------------- + +class RunOptions final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.RunOptions) */ { + public: + inline RunOptions() : RunOptions(nullptr) {} + ~RunOptions() override; + explicit PROTOBUF_CONSTEXPR RunOptions(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + RunOptions(const RunOptions& from); + RunOptions(RunOptions&& from) noexcept + : RunOptions() { + *this = ::std::move(from); + } + + inline RunOptions& operator=(const RunOptions& from) { + CopyFrom(from); + return *this; + } + inline RunOptions& operator=(RunOptions&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const RunOptions& default_instance() { + return *internal_default_instance(); + } + static inline const RunOptions* internal_default_instance() { + return reinterpret_cast( + &_RunOptions_default_instance_); + } + static constexpr int kIndexInFileMessages = + 12; + + friend void swap(RunOptions& a, RunOptions& b) { + a.Swap(&b); + } + inline void Swap(RunOptions* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(RunOptions* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + RunOptions* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const RunOptions& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const RunOptions& from) { + RunOptions::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(RunOptions* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.RunOptions"; + } + protected: + explicit RunOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + typedef RunOptions_Experimental Experimental; + + typedef RunOptions_TraceLevel TraceLevel; + static constexpr TraceLevel NO_TRACE = + RunOptions_TraceLevel_NO_TRACE; + static constexpr TraceLevel SOFTWARE_TRACE = + RunOptions_TraceLevel_SOFTWARE_TRACE; + static constexpr TraceLevel HARDWARE_TRACE = + RunOptions_TraceLevel_HARDWARE_TRACE; + static constexpr TraceLevel FULL_TRACE = + RunOptions_TraceLevel_FULL_TRACE; + static inline bool TraceLevel_IsValid(int value) { + return RunOptions_TraceLevel_IsValid(value); + } + static constexpr TraceLevel TraceLevel_MIN = + RunOptions_TraceLevel_TraceLevel_MIN; + static constexpr TraceLevel TraceLevel_MAX = + RunOptions_TraceLevel_TraceLevel_MAX; + static constexpr int TraceLevel_ARRAYSIZE = + RunOptions_TraceLevel_TraceLevel_ARRAYSIZE; + static inline const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* + TraceLevel_descriptor() { + return RunOptions_TraceLevel_descriptor(); + } + template + static inline const std::string& TraceLevel_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function TraceLevel_Name."); + return RunOptions_TraceLevel_Name(enum_t_value); + } + static inline bool TraceLevel_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name, + TraceLevel* value) { + return RunOptions_TraceLevel_Parse(name, value); + } + + // accessors ------------------------------------------------------- + + enum : int { + kDebugOptionsFieldNumber = 6, + kExperimentalFieldNumber = 8, + kTimeoutInMsFieldNumber = 2, + kTraceLevelFieldNumber = 1, + kInterOpThreadPoolFieldNumber = 3, + kOutputPartitionGraphsFieldNumber = 5, + kReportTensorAllocationsUponOomFieldNumber = 7, + }; + // .tensorflow.DebugOptions debug_options = 6; + bool has_debug_options() const; + private: + bool _internal_has_debug_options() const; + public: + void clear_debug_options(); + const ::tensorflow::DebugOptions& debug_options() const; + PROTOBUF_NODISCARD ::tensorflow::DebugOptions* release_debug_options(); + ::tensorflow::DebugOptions* mutable_debug_options(); + void set_allocated_debug_options(::tensorflow::DebugOptions* debug_options); + private: + const ::tensorflow::DebugOptions& _internal_debug_options() const; + ::tensorflow::DebugOptions* _internal_mutable_debug_options(); + public: + void unsafe_arena_set_allocated_debug_options( + ::tensorflow::DebugOptions* debug_options); + ::tensorflow::DebugOptions* unsafe_arena_release_debug_options(); + + // .tensorflow.RunOptions.Experimental experimental = 8; + bool has_experimental() const; + private: + bool _internal_has_experimental() const; + public: + void clear_experimental(); + const ::tensorflow::RunOptions_Experimental& experimental() const; + PROTOBUF_NODISCARD ::tensorflow::RunOptions_Experimental* release_experimental(); + ::tensorflow::RunOptions_Experimental* mutable_experimental(); + void set_allocated_experimental(::tensorflow::RunOptions_Experimental* experimental); + private: + const ::tensorflow::RunOptions_Experimental& _internal_experimental() const; + ::tensorflow::RunOptions_Experimental* _internal_mutable_experimental(); + public: + void unsafe_arena_set_allocated_experimental( + ::tensorflow::RunOptions_Experimental* experimental); + ::tensorflow::RunOptions_Experimental* unsafe_arena_release_experimental(); + + // int64 timeout_in_ms = 2; + void clear_timeout_in_ms(); + int64_t timeout_in_ms() const; + void set_timeout_in_ms(int64_t value); + private: + int64_t _internal_timeout_in_ms() const; + void _internal_set_timeout_in_ms(int64_t value); + public: + + // .tensorflow.RunOptions.TraceLevel trace_level = 1; + void clear_trace_level(); + ::tensorflow::RunOptions_TraceLevel trace_level() const; + void set_trace_level(::tensorflow::RunOptions_TraceLevel value); + private: + ::tensorflow::RunOptions_TraceLevel _internal_trace_level() const; + void _internal_set_trace_level(::tensorflow::RunOptions_TraceLevel value); + public: + + // int32 inter_op_thread_pool = 3; + void clear_inter_op_thread_pool(); + int32_t inter_op_thread_pool() const; + void set_inter_op_thread_pool(int32_t value); + private: + int32_t _internal_inter_op_thread_pool() const; + void _internal_set_inter_op_thread_pool(int32_t value); + public: + + // bool output_partition_graphs = 5; + void clear_output_partition_graphs(); + bool output_partition_graphs() const; + void set_output_partition_graphs(bool value); + private: + bool _internal_output_partition_graphs() const; + void _internal_set_output_partition_graphs(bool value); + public: + + // bool report_tensor_allocations_upon_oom = 7; + void clear_report_tensor_allocations_upon_oom(); + bool report_tensor_allocations_upon_oom() const; + void set_report_tensor_allocations_upon_oom(bool value); + private: + bool _internal_report_tensor_allocations_upon_oom() const; + void _internal_set_report_tensor_allocations_upon_oom(bool value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.RunOptions) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::tensorflow::DebugOptions* debug_options_; + ::tensorflow::RunOptions_Experimental* experimental_; + int64_t timeout_in_ms_; + int trace_level_; + int32_t inter_op_thread_pool_; + bool output_partition_graphs_; + bool report_tensor_allocations_upon_oom_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fconfig_2eproto; +}; +// ------------------------------------------------------------------- + +class RunMetadata_FunctionGraphs final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.RunMetadata.FunctionGraphs) */ { + public: + inline RunMetadata_FunctionGraphs() : RunMetadata_FunctionGraphs(nullptr) {} + ~RunMetadata_FunctionGraphs() override; + explicit PROTOBUF_CONSTEXPR RunMetadata_FunctionGraphs(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + RunMetadata_FunctionGraphs(const RunMetadata_FunctionGraphs& from); + RunMetadata_FunctionGraphs(RunMetadata_FunctionGraphs&& from) noexcept + : RunMetadata_FunctionGraphs() { + *this = ::std::move(from); + } + + inline RunMetadata_FunctionGraphs& operator=(const RunMetadata_FunctionGraphs& from) { + CopyFrom(from); + return *this; + } + inline RunMetadata_FunctionGraphs& operator=(RunMetadata_FunctionGraphs&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const RunMetadata_FunctionGraphs& default_instance() { + return *internal_default_instance(); + } + static inline const RunMetadata_FunctionGraphs* internal_default_instance() { + return reinterpret_cast( + &_RunMetadata_FunctionGraphs_default_instance_); + } + static constexpr int kIndexInFileMessages = + 13; + + friend void swap(RunMetadata_FunctionGraphs& a, RunMetadata_FunctionGraphs& b) { + a.Swap(&b); + } + inline void Swap(RunMetadata_FunctionGraphs* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(RunMetadata_FunctionGraphs* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + RunMetadata_FunctionGraphs* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const RunMetadata_FunctionGraphs& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const RunMetadata_FunctionGraphs& from) { + RunMetadata_FunctionGraphs::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(RunMetadata_FunctionGraphs* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.RunMetadata.FunctionGraphs"; + } + protected: + explicit RunMetadata_FunctionGraphs(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kPartitionGraphsFieldNumber = 1, + kPreOptimizationGraphFieldNumber = 2, + kPostOptimizationGraphFieldNumber = 3, + }; + // repeated .tensorflow.GraphDef partition_graphs = 1; + int partition_graphs_size() const; + private: + int _internal_partition_graphs_size() const; + public: + void clear_partition_graphs(); + ::tensorflow::GraphDef* mutable_partition_graphs(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::GraphDef >* + mutable_partition_graphs(); + private: + const ::tensorflow::GraphDef& _internal_partition_graphs(int index) const; + ::tensorflow::GraphDef* _internal_add_partition_graphs(); + public: + const ::tensorflow::GraphDef& partition_graphs(int index) const; + ::tensorflow::GraphDef* add_partition_graphs(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::GraphDef >& + partition_graphs() const; + + // .tensorflow.GraphDef pre_optimization_graph = 2; + bool has_pre_optimization_graph() const; + private: + bool _internal_has_pre_optimization_graph() const; + public: + void clear_pre_optimization_graph(); + const ::tensorflow::GraphDef& pre_optimization_graph() const; + PROTOBUF_NODISCARD ::tensorflow::GraphDef* release_pre_optimization_graph(); + ::tensorflow::GraphDef* mutable_pre_optimization_graph(); + void set_allocated_pre_optimization_graph(::tensorflow::GraphDef* pre_optimization_graph); + private: + const ::tensorflow::GraphDef& _internal_pre_optimization_graph() const; + ::tensorflow::GraphDef* _internal_mutable_pre_optimization_graph(); + public: + void unsafe_arena_set_allocated_pre_optimization_graph( + ::tensorflow::GraphDef* pre_optimization_graph); + ::tensorflow::GraphDef* unsafe_arena_release_pre_optimization_graph(); + + // .tensorflow.GraphDef post_optimization_graph = 3; + bool has_post_optimization_graph() const; + private: + bool _internal_has_post_optimization_graph() const; + public: + void clear_post_optimization_graph(); + const ::tensorflow::GraphDef& post_optimization_graph() const; + PROTOBUF_NODISCARD ::tensorflow::GraphDef* release_post_optimization_graph(); + ::tensorflow::GraphDef* mutable_post_optimization_graph(); + void set_allocated_post_optimization_graph(::tensorflow::GraphDef* post_optimization_graph); + private: + const ::tensorflow::GraphDef& _internal_post_optimization_graph() const; + ::tensorflow::GraphDef* _internal_mutable_post_optimization_graph(); + public: + void unsafe_arena_set_allocated_post_optimization_graph( + ::tensorflow::GraphDef* post_optimization_graph); + ::tensorflow::GraphDef* unsafe_arena_release_post_optimization_graph(); + + // @@protoc_insertion_point(class_scope:tensorflow.RunMetadata.FunctionGraphs) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::GraphDef > partition_graphs_; + ::tensorflow::GraphDef* pre_optimization_graph_; + ::tensorflow::GraphDef* post_optimization_graph_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fconfig_2eproto; +}; +// ------------------------------------------------------------------- + +class RunMetadata final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.RunMetadata) */ { + public: + inline RunMetadata() : RunMetadata(nullptr) {} + ~RunMetadata() override; + explicit PROTOBUF_CONSTEXPR RunMetadata(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + RunMetadata(const RunMetadata& from); + RunMetadata(RunMetadata&& from) noexcept + : RunMetadata() { + *this = ::std::move(from); + } + + inline RunMetadata& operator=(const RunMetadata& from) { + CopyFrom(from); + return *this; + } + inline RunMetadata& operator=(RunMetadata&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const RunMetadata& default_instance() { + return *internal_default_instance(); + } + static inline const RunMetadata* internal_default_instance() { + return reinterpret_cast( + &_RunMetadata_default_instance_); + } + static constexpr int kIndexInFileMessages = + 14; + + friend void swap(RunMetadata& a, RunMetadata& b) { + a.Swap(&b); + } + inline void Swap(RunMetadata* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(RunMetadata* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + RunMetadata* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const RunMetadata& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const RunMetadata& from) { + RunMetadata::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(RunMetadata* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.RunMetadata"; + } + protected: + explicit RunMetadata(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + typedef RunMetadata_FunctionGraphs FunctionGraphs; + + // accessors ------------------------------------------------------- + + enum : int { + kPartitionGraphsFieldNumber = 3, + kFunctionGraphsFieldNumber = 4, + kStepStatsFieldNumber = 1, + kCostGraphFieldNumber = 2, + kSessionMetadataFieldNumber = 5, + }; + // repeated .tensorflow.GraphDef partition_graphs = 3; + int partition_graphs_size() const; + private: + int _internal_partition_graphs_size() const; + public: + void clear_partition_graphs(); + ::tensorflow::GraphDef* mutable_partition_graphs(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::GraphDef >* + mutable_partition_graphs(); + private: + const ::tensorflow::GraphDef& _internal_partition_graphs(int index) const; + ::tensorflow::GraphDef* _internal_add_partition_graphs(); + public: + const ::tensorflow::GraphDef& partition_graphs(int index) const; + ::tensorflow::GraphDef* add_partition_graphs(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::GraphDef >& + partition_graphs() const; + + // repeated .tensorflow.RunMetadata.FunctionGraphs function_graphs = 4; + int function_graphs_size() const; + private: + int _internal_function_graphs_size() const; + public: + void clear_function_graphs(); + ::tensorflow::RunMetadata_FunctionGraphs* mutable_function_graphs(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::RunMetadata_FunctionGraphs >* + mutable_function_graphs(); + private: + const ::tensorflow::RunMetadata_FunctionGraphs& _internal_function_graphs(int index) const; + ::tensorflow::RunMetadata_FunctionGraphs* _internal_add_function_graphs(); + public: + const ::tensorflow::RunMetadata_FunctionGraphs& function_graphs(int index) const; + ::tensorflow::RunMetadata_FunctionGraphs* add_function_graphs(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::RunMetadata_FunctionGraphs >& + function_graphs() const; + + // .tensorflow.StepStats step_stats = 1; + bool has_step_stats() const; + private: + bool _internal_has_step_stats() const; + public: + void clear_step_stats(); + const ::tensorflow::StepStats& step_stats() const; + PROTOBUF_NODISCARD ::tensorflow::StepStats* release_step_stats(); + ::tensorflow::StepStats* mutable_step_stats(); + void set_allocated_step_stats(::tensorflow::StepStats* step_stats); + private: + const ::tensorflow::StepStats& _internal_step_stats() const; + ::tensorflow::StepStats* _internal_mutable_step_stats(); + public: + void unsafe_arena_set_allocated_step_stats( + ::tensorflow::StepStats* step_stats); + ::tensorflow::StepStats* unsafe_arena_release_step_stats(); + + // .tensorflow.CostGraphDef cost_graph = 2; + bool has_cost_graph() const; + private: + bool _internal_has_cost_graph() const; + public: + void clear_cost_graph(); + const ::tensorflow::CostGraphDef& cost_graph() const; + PROTOBUF_NODISCARD ::tensorflow::CostGraphDef* release_cost_graph(); + ::tensorflow::CostGraphDef* mutable_cost_graph(); + void set_allocated_cost_graph(::tensorflow::CostGraphDef* cost_graph); + private: + const ::tensorflow::CostGraphDef& _internal_cost_graph() const; + ::tensorflow::CostGraphDef* _internal_mutable_cost_graph(); + public: + void unsafe_arena_set_allocated_cost_graph( + ::tensorflow::CostGraphDef* cost_graph); + ::tensorflow::CostGraphDef* unsafe_arena_release_cost_graph(); + + // .tensorflow.SessionMetadata session_metadata = 5; + bool has_session_metadata() const; + private: + bool _internal_has_session_metadata() const; + public: + void clear_session_metadata(); + const ::tensorflow::SessionMetadata& session_metadata() const; + PROTOBUF_NODISCARD ::tensorflow::SessionMetadata* release_session_metadata(); + ::tensorflow::SessionMetadata* mutable_session_metadata(); + void set_allocated_session_metadata(::tensorflow::SessionMetadata* session_metadata); + private: + const ::tensorflow::SessionMetadata& _internal_session_metadata() const; + ::tensorflow::SessionMetadata* _internal_mutable_session_metadata(); + public: + void unsafe_arena_set_allocated_session_metadata( + ::tensorflow::SessionMetadata* session_metadata); + ::tensorflow::SessionMetadata* unsafe_arena_release_session_metadata(); + + // @@protoc_insertion_point(class_scope:tensorflow.RunMetadata) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::GraphDef > partition_graphs_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::RunMetadata_FunctionGraphs > function_graphs_; + ::tensorflow::StepStats* step_stats_; + ::tensorflow::CostGraphDef* cost_graph_; + ::tensorflow::SessionMetadata* session_metadata_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fconfig_2eproto; +}; +// ------------------------------------------------------------------- + +class TensorConnection final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.TensorConnection) */ { + public: + inline TensorConnection() : TensorConnection(nullptr) {} + ~TensorConnection() override; + explicit PROTOBUF_CONSTEXPR TensorConnection(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + TensorConnection(const TensorConnection& from); + TensorConnection(TensorConnection&& from) noexcept + : TensorConnection() { + *this = ::std::move(from); + } + + inline TensorConnection& operator=(const TensorConnection& from) { + CopyFrom(from); + return *this; + } + inline TensorConnection& operator=(TensorConnection&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const TensorConnection& default_instance() { + return *internal_default_instance(); + } + static inline const TensorConnection* internal_default_instance() { + return reinterpret_cast( + &_TensorConnection_default_instance_); + } + static constexpr int kIndexInFileMessages = + 15; + + friend void swap(TensorConnection& a, TensorConnection& b) { + a.Swap(&b); + } + inline void Swap(TensorConnection* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(TensorConnection* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + TensorConnection* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const TensorConnection& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const TensorConnection& from) { + TensorConnection::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(TensorConnection* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.TensorConnection"; + } + protected: + explicit TensorConnection(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kFromTensorFieldNumber = 1, + kToTensorFieldNumber = 2, + }; + // string from_tensor = 1; + void clear_from_tensor(); + const std::string& from_tensor() const; + template + void set_from_tensor(ArgT0&& arg0, ArgT... args); + std::string* mutable_from_tensor(); + PROTOBUF_NODISCARD std::string* release_from_tensor(); + void set_allocated_from_tensor(std::string* from_tensor); + private: + const std::string& _internal_from_tensor() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_from_tensor(const std::string& value); + std::string* _internal_mutable_from_tensor(); + public: + + // string to_tensor = 2; + void clear_to_tensor(); + const std::string& to_tensor() const; + template + void set_to_tensor(ArgT0&& arg0, ArgT... args); + std::string* mutable_to_tensor(); + PROTOBUF_NODISCARD std::string* release_to_tensor(); + void set_allocated_to_tensor(std::string* to_tensor); + private: + const std::string& _internal_to_tensor() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_to_tensor(const std::string& value); + std::string* _internal_mutable_to_tensor(); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.TensorConnection) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr from_tensor_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr to_tensor_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fconfig_2eproto; +}; +// ------------------------------------------------------------------- + +class CallableOptions_FeedDevicesEntry_DoNotUse : public ::PROTOBUF_NAMESPACE_ID::internal::MapEntry { +public: + typedef ::PROTOBUF_NAMESPACE_ID::internal::MapEntry SuperType; + CallableOptions_FeedDevicesEntry_DoNotUse(); + explicit PROTOBUF_CONSTEXPR CallableOptions_FeedDevicesEntry_DoNotUse( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + explicit CallableOptions_FeedDevicesEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena); + void MergeFrom(const CallableOptions_FeedDevicesEntry_DoNotUse& other); + static const CallableOptions_FeedDevicesEntry_DoNotUse* internal_default_instance() { return reinterpret_cast(&_CallableOptions_FeedDevicesEntry_DoNotUse_default_instance_); } + static bool ValidateKey(std::string* s) { + return ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(s->data(), static_cast(s->size()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, "tensorflow.CallableOptions.FeedDevicesEntry.key"); + } + static bool ValidateValue(std::string* s) { + return ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(s->data(), static_cast(s->size()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, "tensorflow.CallableOptions.FeedDevicesEntry.value"); + } + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fconfig_2eproto; +}; + +// ------------------------------------------------------------------- + +class CallableOptions_FetchDevicesEntry_DoNotUse : public ::PROTOBUF_NAMESPACE_ID::internal::MapEntry { +public: + typedef ::PROTOBUF_NAMESPACE_ID::internal::MapEntry SuperType; + CallableOptions_FetchDevicesEntry_DoNotUse(); + explicit PROTOBUF_CONSTEXPR CallableOptions_FetchDevicesEntry_DoNotUse( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + explicit CallableOptions_FetchDevicesEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena); + void MergeFrom(const CallableOptions_FetchDevicesEntry_DoNotUse& other); + static const CallableOptions_FetchDevicesEntry_DoNotUse* internal_default_instance() { return reinterpret_cast(&_CallableOptions_FetchDevicesEntry_DoNotUse_default_instance_); } + static bool ValidateKey(std::string* s) { + return ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(s->data(), static_cast(s->size()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, "tensorflow.CallableOptions.FetchDevicesEntry.key"); + } + static bool ValidateValue(std::string* s) { + return ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(s->data(), static_cast(s->size()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, "tensorflow.CallableOptions.FetchDevicesEntry.value"); + } + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fconfig_2eproto; +}; + +// ------------------------------------------------------------------- + +class CallableOptions final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.CallableOptions) */ { + public: + inline CallableOptions() : CallableOptions(nullptr) {} + ~CallableOptions() override; + explicit PROTOBUF_CONSTEXPR CallableOptions(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + CallableOptions(const CallableOptions& from); + CallableOptions(CallableOptions&& from) noexcept + : CallableOptions() { + *this = ::std::move(from); + } + + inline CallableOptions& operator=(const CallableOptions& from) { + CopyFrom(from); + return *this; + } + inline CallableOptions& operator=(CallableOptions&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const CallableOptions& default_instance() { + return *internal_default_instance(); + } + static inline const CallableOptions* internal_default_instance() { + return reinterpret_cast( + &_CallableOptions_default_instance_); + } + static constexpr int kIndexInFileMessages = + 18; + + friend void swap(CallableOptions& a, CallableOptions& b) { + a.Swap(&b); + } + inline void Swap(CallableOptions* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(CallableOptions* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + CallableOptions* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const CallableOptions& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const CallableOptions& from) { + CallableOptions::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(CallableOptions* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.CallableOptions"; + } + protected: + explicit CallableOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + + // accessors ------------------------------------------------------- + + enum : int { + kFeedFieldNumber = 1, + kFetchFieldNumber = 2, + kTargetFieldNumber = 3, + kTensorConnectionFieldNumber = 5, + kFeedDevicesFieldNumber = 6, + kFetchDevicesFieldNumber = 7, + kRunOptionsFieldNumber = 4, + kFetchSkipSyncFieldNumber = 8, + }; + // repeated string feed = 1; + int feed_size() const; + private: + int _internal_feed_size() const; + public: + void clear_feed(); + const std::string& feed(int index) const; + std::string* mutable_feed(int index); + void set_feed(int index, const std::string& value); + void set_feed(int index, std::string&& value); + void set_feed(int index, const char* value); + void set_feed(int index, const char* value, size_t size); + std::string* add_feed(); + void add_feed(const std::string& value); + void add_feed(std::string&& value); + void add_feed(const char* value); + void add_feed(const char* value, size_t size); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& feed() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* mutable_feed(); + private: + const std::string& _internal_feed(int index) const; + std::string* _internal_add_feed(); + public: + + // repeated string fetch = 2; + int fetch_size() const; + private: + int _internal_fetch_size() const; + public: + void clear_fetch(); + const std::string& fetch(int index) const; + std::string* mutable_fetch(int index); + void set_fetch(int index, const std::string& value); + void set_fetch(int index, std::string&& value); + void set_fetch(int index, const char* value); + void set_fetch(int index, const char* value, size_t size); + std::string* add_fetch(); + void add_fetch(const std::string& value); + void add_fetch(std::string&& value); + void add_fetch(const char* value); + void add_fetch(const char* value, size_t size); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& fetch() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* mutable_fetch(); + private: + const std::string& _internal_fetch(int index) const; + std::string* _internal_add_fetch(); + public: + + // repeated string target = 3; + int target_size() const; + private: + int _internal_target_size() const; + public: + void clear_target(); + const std::string& target(int index) const; + std::string* mutable_target(int index); + void set_target(int index, const std::string& value); + void set_target(int index, std::string&& value); + void set_target(int index, const char* value); + void set_target(int index, const char* value, size_t size); + std::string* add_target(); + void add_target(const std::string& value); + void add_target(std::string&& value); + void add_target(const char* value); + void add_target(const char* value, size_t size); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& target() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* mutable_target(); + private: + const std::string& _internal_target(int index) const; + std::string* _internal_add_target(); + public: + + // repeated .tensorflow.TensorConnection tensor_connection = 5; + int tensor_connection_size() const; + private: + int _internal_tensor_connection_size() const; + public: + void clear_tensor_connection(); + ::tensorflow::TensorConnection* mutable_tensor_connection(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::TensorConnection >* + mutable_tensor_connection(); + private: + const ::tensorflow::TensorConnection& _internal_tensor_connection(int index) const; + ::tensorflow::TensorConnection* _internal_add_tensor_connection(); + public: + const ::tensorflow::TensorConnection& tensor_connection(int index) const; + ::tensorflow::TensorConnection* add_tensor_connection(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::TensorConnection >& + tensor_connection() const; + + // map feed_devices = 6; + int feed_devices_size() const; + private: + int _internal_feed_devices_size() const; + public: + void clear_feed_devices(); + private: + const ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >& + _internal_feed_devices() const; + ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >* + _internal_mutable_feed_devices(); + public: + const ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >& + feed_devices() const; + ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >* + mutable_feed_devices(); + + // map fetch_devices = 7; + int fetch_devices_size() const; + private: + int _internal_fetch_devices_size() const; + public: + void clear_fetch_devices(); + private: + const ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >& + _internal_fetch_devices() const; + ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >* + _internal_mutable_fetch_devices(); + public: + const ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >& + fetch_devices() const; + ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >* + mutable_fetch_devices(); + + // .tensorflow.RunOptions run_options = 4; + bool has_run_options() const; + private: + bool _internal_has_run_options() const; + public: + void clear_run_options(); + const ::tensorflow::RunOptions& run_options() const; + PROTOBUF_NODISCARD ::tensorflow::RunOptions* release_run_options(); + ::tensorflow::RunOptions* mutable_run_options(); + void set_allocated_run_options(::tensorflow::RunOptions* run_options); + private: + const ::tensorflow::RunOptions& _internal_run_options() const; + ::tensorflow::RunOptions* _internal_mutable_run_options(); + public: + void unsafe_arena_set_allocated_run_options( + ::tensorflow::RunOptions* run_options); + ::tensorflow::RunOptions* unsafe_arena_release_run_options(); + + // bool fetch_skip_sync = 8; + void clear_fetch_skip_sync(); + bool fetch_skip_sync() const; + void set_fetch_skip_sync(bool value); + private: + bool _internal_fetch_skip_sync() const; + void _internal_set_fetch_skip_sync(bool value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.CallableOptions) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField feed_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField fetch_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField target_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::TensorConnection > tensor_connection_; + ::PROTOBUF_NAMESPACE_ID::internal::MapField< + CallableOptions_FeedDevicesEntry_DoNotUse, + std::string, std::string, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING> feed_devices_; + ::PROTOBUF_NAMESPACE_ID::internal::MapField< + CallableOptions_FetchDevicesEntry_DoNotUse, + std::string, std::string, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING> fetch_devices_; + ::tensorflow::RunOptions* run_options_; + bool fetch_skip_sync_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fconfig_2eproto; +}; +// =================================================================== + + +// =================================================================== + +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// GPUOptions_Experimental_VirtualDevices + +// repeated float memory_limit_mb = 1; +inline int GPUOptions_Experimental_VirtualDevices::_internal_memory_limit_mb_size() const { + return _impl_.memory_limit_mb_.size(); +} +inline int GPUOptions_Experimental_VirtualDevices::memory_limit_mb_size() const { + return _internal_memory_limit_mb_size(); +} +inline void GPUOptions_Experimental_VirtualDevices::clear_memory_limit_mb() { + _impl_.memory_limit_mb_.Clear(); +} +inline float GPUOptions_Experimental_VirtualDevices::_internal_memory_limit_mb(int index) const { + return _impl_.memory_limit_mb_.Get(index); +} +inline float GPUOptions_Experimental_VirtualDevices::memory_limit_mb(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.GPUOptions.Experimental.VirtualDevices.memory_limit_mb) + return _internal_memory_limit_mb(index); +} +inline void GPUOptions_Experimental_VirtualDevices::set_memory_limit_mb(int index, float value) { + _impl_.memory_limit_mb_.Set(index, value); + // @@protoc_insertion_point(field_set:tensorflow.GPUOptions.Experimental.VirtualDevices.memory_limit_mb) +} +inline void GPUOptions_Experimental_VirtualDevices::_internal_add_memory_limit_mb(float value) { + _impl_.memory_limit_mb_.Add(value); +} +inline void GPUOptions_Experimental_VirtualDevices::add_memory_limit_mb(float value) { + _internal_add_memory_limit_mb(value); + // @@protoc_insertion_point(field_add:tensorflow.GPUOptions.Experimental.VirtualDevices.memory_limit_mb) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< float >& +GPUOptions_Experimental_VirtualDevices::_internal_memory_limit_mb() const { + return _impl_.memory_limit_mb_; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< float >& +GPUOptions_Experimental_VirtualDevices::memory_limit_mb() const { + // @@protoc_insertion_point(field_list:tensorflow.GPUOptions.Experimental.VirtualDevices.memory_limit_mb) + return _internal_memory_limit_mb(); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< float >* +GPUOptions_Experimental_VirtualDevices::_internal_mutable_memory_limit_mb() { + return &_impl_.memory_limit_mb_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< float >* +GPUOptions_Experimental_VirtualDevices::mutable_memory_limit_mb() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.GPUOptions.Experimental.VirtualDevices.memory_limit_mb) + return _internal_mutable_memory_limit_mb(); +} + +// repeated int32 priority = 2; +inline int GPUOptions_Experimental_VirtualDevices::_internal_priority_size() const { + return _impl_.priority_.size(); +} +inline int GPUOptions_Experimental_VirtualDevices::priority_size() const { + return _internal_priority_size(); +} +inline void GPUOptions_Experimental_VirtualDevices::clear_priority() { + _impl_.priority_.Clear(); +} +inline int32_t GPUOptions_Experimental_VirtualDevices::_internal_priority(int index) const { + return _impl_.priority_.Get(index); +} +inline int32_t GPUOptions_Experimental_VirtualDevices::priority(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.GPUOptions.Experimental.VirtualDevices.priority) + return _internal_priority(index); +} +inline void GPUOptions_Experimental_VirtualDevices::set_priority(int index, int32_t value) { + _impl_.priority_.Set(index, value); + // @@protoc_insertion_point(field_set:tensorflow.GPUOptions.Experimental.VirtualDevices.priority) +} +inline void GPUOptions_Experimental_VirtualDevices::_internal_add_priority(int32_t value) { + _impl_.priority_.Add(value); +} +inline void GPUOptions_Experimental_VirtualDevices::add_priority(int32_t value) { + _internal_add_priority(value); + // @@protoc_insertion_point(field_add:tensorflow.GPUOptions.Experimental.VirtualDevices.priority) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >& +GPUOptions_Experimental_VirtualDevices::_internal_priority() const { + return _impl_.priority_; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >& +GPUOptions_Experimental_VirtualDevices::priority() const { + // @@protoc_insertion_point(field_list:tensorflow.GPUOptions.Experimental.VirtualDevices.priority) + return _internal_priority(); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >* +GPUOptions_Experimental_VirtualDevices::_internal_mutable_priority() { + return &_impl_.priority_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >* +GPUOptions_Experimental_VirtualDevices::mutable_priority() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.GPUOptions.Experimental.VirtualDevices.priority) + return _internal_mutable_priority(); +} + +// repeated int32 device_ordinal = 3; +inline int GPUOptions_Experimental_VirtualDevices::_internal_device_ordinal_size() const { + return _impl_.device_ordinal_.size(); +} +inline int GPUOptions_Experimental_VirtualDevices::device_ordinal_size() const { + return _internal_device_ordinal_size(); +} +inline void GPUOptions_Experimental_VirtualDevices::clear_device_ordinal() { + _impl_.device_ordinal_.Clear(); +} +inline int32_t GPUOptions_Experimental_VirtualDevices::_internal_device_ordinal(int index) const { + return _impl_.device_ordinal_.Get(index); +} +inline int32_t GPUOptions_Experimental_VirtualDevices::device_ordinal(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.GPUOptions.Experimental.VirtualDevices.device_ordinal) + return _internal_device_ordinal(index); +} +inline void GPUOptions_Experimental_VirtualDevices::set_device_ordinal(int index, int32_t value) { + _impl_.device_ordinal_.Set(index, value); + // @@protoc_insertion_point(field_set:tensorflow.GPUOptions.Experimental.VirtualDevices.device_ordinal) +} +inline void GPUOptions_Experimental_VirtualDevices::_internal_add_device_ordinal(int32_t value) { + _impl_.device_ordinal_.Add(value); +} +inline void GPUOptions_Experimental_VirtualDevices::add_device_ordinal(int32_t value) { + _internal_add_device_ordinal(value); + // @@protoc_insertion_point(field_add:tensorflow.GPUOptions.Experimental.VirtualDevices.device_ordinal) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >& +GPUOptions_Experimental_VirtualDevices::_internal_device_ordinal() const { + return _impl_.device_ordinal_; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >& +GPUOptions_Experimental_VirtualDevices::device_ordinal() const { + // @@protoc_insertion_point(field_list:tensorflow.GPUOptions.Experimental.VirtualDevices.device_ordinal) + return _internal_device_ordinal(); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >* +GPUOptions_Experimental_VirtualDevices::_internal_mutable_device_ordinal() { + return &_impl_.device_ordinal_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >* +GPUOptions_Experimental_VirtualDevices::mutable_device_ordinal() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.GPUOptions.Experimental.VirtualDevices.device_ordinal) + return _internal_mutable_device_ordinal(); +} + +// ------------------------------------------------------------------- + +// GPUOptions_Experimental + +// repeated .tensorflow.GPUOptions.Experimental.VirtualDevices virtual_devices = 1; +inline int GPUOptions_Experimental::_internal_virtual_devices_size() const { + return _impl_.virtual_devices_.size(); +} +inline int GPUOptions_Experimental::virtual_devices_size() const { + return _internal_virtual_devices_size(); +} +inline void GPUOptions_Experimental::clear_virtual_devices() { + _impl_.virtual_devices_.Clear(); +} +inline ::tensorflow::GPUOptions_Experimental_VirtualDevices* GPUOptions_Experimental::mutable_virtual_devices(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.GPUOptions.Experimental.virtual_devices) + return _impl_.virtual_devices_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::GPUOptions_Experimental_VirtualDevices >* +GPUOptions_Experimental::mutable_virtual_devices() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.GPUOptions.Experimental.virtual_devices) + return &_impl_.virtual_devices_; +} +inline const ::tensorflow::GPUOptions_Experimental_VirtualDevices& GPUOptions_Experimental::_internal_virtual_devices(int index) const { + return _impl_.virtual_devices_.Get(index); +} +inline const ::tensorflow::GPUOptions_Experimental_VirtualDevices& GPUOptions_Experimental::virtual_devices(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.GPUOptions.Experimental.virtual_devices) + return _internal_virtual_devices(index); +} +inline ::tensorflow::GPUOptions_Experimental_VirtualDevices* GPUOptions_Experimental::_internal_add_virtual_devices() { + return _impl_.virtual_devices_.Add(); +} +inline ::tensorflow::GPUOptions_Experimental_VirtualDevices* GPUOptions_Experimental::add_virtual_devices() { + ::tensorflow::GPUOptions_Experimental_VirtualDevices* _add = _internal_add_virtual_devices(); + // @@protoc_insertion_point(field_add:tensorflow.GPUOptions.Experimental.virtual_devices) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::GPUOptions_Experimental_VirtualDevices >& +GPUOptions_Experimental::virtual_devices() const { + // @@protoc_insertion_point(field_list:tensorflow.GPUOptions.Experimental.virtual_devices) + return _impl_.virtual_devices_; +} + +// int32 num_virtual_devices_per_gpu = 15; +inline void GPUOptions_Experimental::clear_num_virtual_devices_per_gpu() { + _impl_.num_virtual_devices_per_gpu_ = 0; +} +inline int32_t GPUOptions_Experimental::_internal_num_virtual_devices_per_gpu() const { + return _impl_.num_virtual_devices_per_gpu_; +} +inline int32_t GPUOptions_Experimental::num_virtual_devices_per_gpu() const { + // @@protoc_insertion_point(field_get:tensorflow.GPUOptions.Experimental.num_virtual_devices_per_gpu) + return _internal_num_virtual_devices_per_gpu(); +} +inline void GPUOptions_Experimental::_internal_set_num_virtual_devices_per_gpu(int32_t value) { + + _impl_.num_virtual_devices_per_gpu_ = value; +} +inline void GPUOptions_Experimental::set_num_virtual_devices_per_gpu(int32_t value) { + _internal_set_num_virtual_devices_per_gpu(value); + // @@protoc_insertion_point(field_set:tensorflow.GPUOptions.Experimental.num_virtual_devices_per_gpu) +} + +// bool use_unified_memory = 2; +inline void GPUOptions_Experimental::clear_use_unified_memory() { + _impl_.use_unified_memory_ = false; +} +inline bool GPUOptions_Experimental::_internal_use_unified_memory() const { + return _impl_.use_unified_memory_; +} +inline bool GPUOptions_Experimental::use_unified_memory() const { + // @@protoc_insertion_point(field_get:tensorflow.GPUOptions.Experimental.use_unified_memory) + return _internal_use_unified_memory(); +} +inline void GPUOptions_Experimental::_internal_set_use_unified_memory(bool value) { + + _impl_.use_unified_memory_ = value; +} +inline void GPUOptions_Experimental::set_use_unified_memory(bool value) { + _internal_set_use_unified_memory(value); + // @@protoc_insertion_point(field_set:tensorflow.GPUOptions.Experimental.use_unified_memory) +} + +// int32 num_dev_to_dev_copy_streams = 3; +inline void GPUOptions_Experimental::clear_num_dev_to_dev_copy_streams() { + _impl_.num_dev_to_dev_copy_streams_ = 0; +} +inline int32_t GPUOptions_Experimental::_internal_num_dev_to_dev_copy_streams() const { + return _impl_.num_dev_to_dev_copy_streams_; +} +inline int32_t GPUOptions_Experimental::num_dev_to_dev_copy_streams() const { + // @@protoc_insertion_point(field_get:tensorflow.GPUOptions.Experimental.num_dev_to_dev_copy_streams) + return _internal_num_dev_to_dev_copy_streams(); +} +inline void GPUOptions_Experimental::_internal_set_num_dev_to_dev_copy_streams(int32_t value) { + + _impl_.num_dev_to_dev_copy_streams_ = value; +} +inline void GPUOptions_Experimental::set_num_dev_to_dev_copy_streams(int32_t value) { + _internal_set_num_dev_to_dev_copy_streams(value); + // @@protoc_insertion_point(field_set:tensorflow.GPUOptions.Experimental.num_dev_to_dev_copy_streams) +} + +// string collective_ring_order = 4; +inline void GPUOptions_Experimental::clear_collective_ring_order() { + _impl_.collective_ring_order_.ClearToEmpty(); +} +inline const std::string& GPUOptions_Experimental::collective_ring_order() const { + // @@protoc_insertion_point(field_get:tensorflow.GPUOptions.Experimental.collective_ring_order) + return _internal_collective_ring_order(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void GPUOptions_Experimental::set_collective_ring_order(ArgT0&& arg0, ArgT... args) { + + _impl_.collective_ring_order_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.GPUOptions.Experimental.collective_ring_order) +} +inline std::string* GPUOptions_Experimental::mutable_collective_ring_order() { + std::string* _s = _internal_mutable_collective_ring_order(); + // @@protoc_insertion_point(field_mutable:tensorflow.GPUOptions.Experimental.collective_ring_order) + return _s; +} +inline const std::string& GPUOptions_Experimental::_internal_collective_ring_order() const { + return _impl_.collective_ring_order_.Get(); +} +inline void GPUOptions_Experimental::_internal_set_collective_ring_order(const std::string& value) { + + _impl_.collective_ring_order_.Set(value, GetArenaForAllocation()); +} +inline std::string* GPUOptions_Experimental::_internal_mutable_collective_ring_order() { + + return _impl_.collective_ring_order_.Mutable(GetArenaForAllocation()); +} +inline std::string* GPUOptions_Experimental::release_collective_ring_order() { + // @@protoc_insertion_point(field_release:tensorflow.GPUOptions.Experimental.collective_ring_order) + return _impl_.collective_ring_order_.Release(); +} +inline void GPUOptions_Experimental::set_allocated_collective_ring_order(std::string* collective_ring_order) { + if (collective_ring_order != nullptr) { + + } else { + + } + _impl_.collective_ring_order_.SetAllocated(collective_ring_order, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.collective_ring_order_.IsDefault()) { + _impl_.collective_ring_order_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.GPUOptions.Experimental.collective_ring_order) +} + +// bool timestamped_allocator = 5; +inline void GPUOptions_Experimental::clear_timestamped_allocator() { + _impl_.timestamped_allocator_ = false; +} +inline bool GPUOptions_Experimental::_internal_timestamped_allocator() const { + return _impl_.timestamped_allocator_; +} +inline bool GPUOptions_Experimental::timestamped_allocator() const { + // @@protoc_insertion_point(field_get:tensorflow.GPUOptions.Experimental.timestamped_allocator) + return _internal_timestamped_allocator(); +} +inline void GPUOptions_Experimental::_internal_set_timestamped_allocator(bool value) { + + _impl_.timestamped_allocator_ = value; +} +inline void GPUOptions_Experimental::set_timestamped_allocator(bool value) { + _internal_set_timestamped_allocator(value); + // @@protoc_insertion_point(field_set:tensorflow.GPUOptions.Experimental.timestamped_allocator) +} + +// int32 kernel_tracker_max_interval = 7; +inline void GPUOptions_Experimental::clear_kernel_tracker_max_interval() { + _impl_.kernel_tracker_max_interval_ = 0; +} +inline int32_t GPUOptions_Experimental::_internal_kernel_tracker_max_interval() const { + return _impl_.kernel_tracker_max_interval_; +} +inline int32_t GPUOptions_Experimental::kernel_tracker_max_interval() const { + // @@protoc_insertion_point(field_get:tensorflow.GPUOptions.Experimental.kernel_tracker_max_interval) + return _internal_kernel_tracker_max_interval(); +} +inline void GPUOptions_Experimental::_internal_set_kernel_tracker_max_interval(int32_t value) { + + _impl_.kernel_tracker_max_interval_ = value; +} +inline void GPUOptions_Experimental::set_kernel_tracker_max_interval(int32_t value) { + _internal_set_kernel_tracker_max_interval(value); + // @@protoc_insertion_point(field_set:tensorflow.GPUOptions.Experimental.kernel_tracker_max_interval) +} + +// int32 kernel_tracker_max_bytes = 8; +inline void GPUOptions_Experimental::clear_kernel_tracker_max_bytes() { + _impl_.kernel_tracker_max_bytes_ = 0; +} +inline int32_t GPUOptions_Experimental::_internal_kernel_tracker_max_bytes() const { + return _impl_.kernel_tracker_max_bytes_; +} +inline int32_t GPUOptions_Experimental::kernel_tracker_max_bytes() const { + // @@protoc_insertion_point(field_get:tensorflow.GPUOptions.Experimental.kernel_tracker_max_bytes) + return _internal_kernel_tracker_max_bytes(); +} +inline void GPUOptions_Experimental::_internal_set_kernel_tracker_max_bytes(int32_t value) { + + _impl_.kernel_tracker_max_bytes_ = value; +} +inline void GPUOptions_Experimental::set_kernel_tracker_max_bytes(int32_t value) { + _internal_set_kernel_tracker_max_bytes(value); + // @@protoc_insertion_point(field_set:tensorflow.GPUOptions.Experimental.kernel_tracker_max_bytes) +} + +// int32 kernel_tracker_max_pending = 9; +inline void GPUOptions_Experimental::clear_kernel_tracker_max_pending() { + _impl_.kernel_tracker_max_pending_ = 0; +} +inline int32_t GPUOptions_Experimental::_internal_kernel_tracker_max_pending() const { + return _impl_.kernel_tracker_max_pending_; +} +inline int32_t GPUOptions_Experimental::kernel_tracker_max_pending() const { + // @@protoc_insertion_point(field_get:tensorflow.GPUOptions.Experimental.kernel_tracker_max_pending) + return _internal_kernel_tracker_max_pending(); +} +inline void GPUOptions_Experimental::_internal_set_kernel_tracker_max_pending(int32_t value) { + + _impl_.kernel_tracker_max_pending_ = value; +} +inline void GPUOptions_Experimental::set_kernel_tracker_max_pending(int32_t value) { + _internal_set_kernel_tracker_max_pending(value); + // @@protoc_insertion_point(field_set:tensorflow.GPUOptions.Experimental.kernel_tracker_max_pending) +} + +// double internal_fragmentation_fraction = 10; +inline void GPUOptions_Experimental::clear_internal_fragmentation_fraction() { + _impl_.internal_fragmentation_fraction_ = 0; +} +inline double GPUOptions_Experimental::_internal_internal_fragmentation_fraction() const { + return _impl_.internal_fragmentation_fraction_; +} +inline double GPUOptions_Experimental::internal_fragmentation_fraction() const { + // @@protoc_insertion_point(field_get:tensorflow.GPUOptions.Experimental.internal_fragmentation_fraction) + return _internal_internal_fragmentation_fraction(); +} +inline void GPUOptions_Experimental::_internal_set_internal_fragmentation_fraction(double value) { + + _impl_.internal_fragmentation_fraction_ = value; +} +inline void GPUOptions_Experimental::set_internal_fragmentation_fraction(double value) { + _internal_set_internal_fragmentation_fraction(value); + // @@protoc_insertion_point(field_set:tensorflow.GPUOptions.Experimental.internal_fragmentation_fraction) +} + +// bool use_cuda_malloc_async = 11; +inline void GPUOptions_Experimental::clear_use_cuda_malloc_async() { + _impl_.use_cuda_malloc_async_ = false; +} +inline bool GPUOptions_Experimental::_internal_use_cuda_malloc_async() const { + return _impl_.use_cuda_malloc_async_; +} +inline bool GPUOptions_Experimental::use_cuda_malloc_async() const { + // @@protoc_insertion_point(field_get:tensorflow.GPUOptions.Experimental.use_cuda_malloc_async) + return _internal_use_cuda_malloc_async(); +} +inline void GPUOptions_Experimental::_internal_set_use_cuda_malloc_async(bool value) { + + _impl_.use_cuda_malloc_async_ = value; +} +inline void GPUOptions_Experimental::set_use_cuda_malloc_async(bool value) { + _internal_set_use_cuda_malloc_async(value); + // @@protoc_insertion_point(field_set:tensorflow.GPUOptions.Experimental.use_cuda_malloc_async) +} + +// bool disallow_retry_on_allocation_failure = 12; +inline void GPUOptions_Experimental::clear_disallow_retry_on_allocation_failure() { + _impl_.disallow_retry_on_allocation_failure_ = false; +} +inline bool GPUOptions_Experimental::_internal_disallow_retry_on_allocation_failure() const { + return _impl_.disallow_retry_on_allocation_failure_; +} +inline bool GPUOptions_Experimental::disallow_retry_on_allocation_failure() const { + // @@protoc_insertion_point(field_get:tensorflow.GPUOptions.Experimental.disallow_retry_on_allocation_failure) + return _internal_disallow_retry_on_allocation_failure(); +} +inline void GPUOptions_Experimental::_internal_set_disallow_retry_on_allocation_failure(bool value) { + + _impl_.disallow_retry_on_allocation_failure_ = value; +} +inline void GPUOptions_Experimental::set_disallow_retry_on_allocation_failure(bool value) { + _internal_set_disallow_retry_on_allocation_failure(value); + // @@protoc_insertion_point(field_set:tensorflow.GPUOptions.Experimental.disallow_retry_on_allocation_failure) +} + +// float gpu_host_mem_limit_in_mb = 13; +inline void GPUOptions_Experimental::clear_gpu_host_mem_limit_in_mb() { + _impl_.gpu_host_mem_limit_in_mb_ = 0; +} +inline float GPUOptions_Experimental::_internal_gpu_host_mem_limit_in_mb() const { + return _impl_.gpu_host_mem_limit_in_mb_; +} +inline float GPUOptions_Experimental::gpu_host_mem_limit_in_mb() const { + // @@protoc_insertion_point(field_get:tensorflow.GPUOptions.Experimental.gpu_host_mem_limit_in_mb) + return _internal_gpu_host_mem_limit_in_mb(); +} +inline void GPUOptions_Experimental::_internal_set_gpu_host_mem_limit_in_mb(float value) { + + _impl_.gpu_host_mem_limit_in_mb_ = value; +} +inline void GPUOptions_Experimental::set_gpu_host_mem_limit_in_mb(float value) { + _internal_set_gpu_host_mem_limit_in_mb(value); + // @@protoc_insertion_point(field_set:tensorflow.GPUOptions.Experimental.gpu_host_mem_limit_in_mb) +} + +// bool gpu_host_mem_disallow_growth = 14; +inline void GPUOptions_Experimental::clear_gpu_host_mem_disallow_growth() { + _impl_.gpu_host_mem_disallow_growth_ = false; +} +inline bool GPUOptions_Experimental::_internal_gpu_host_mem_disallow_growth() const { + return _impl_.gpu_host_mem_disallow_growth_; +} +inline bool GPUOptions_Experimental::gpu_host_mem_disallow_growth() const { + // @@protoc_insertion_point(field_get:tensorflow.GPUOptions.Experimental.gpu_host_mem_disallow_growth) + return _internal_gpu_host_mem_disallow_growth(); +} +inline void GPUOptions_Experimental::_internal_set_gpu_host_mem_disallow_growth(bool value) { + + _impl_.gpu_host_mem_disallow_growth_ = value; +} +inline void GPUOptions_Experimental::set_gpu_host_mem_disallow_growth(bool value) { + _internal_set_gpu_host_mem_disallow_growth(value); + // @@protoc_insertion_point(field_set:tensorflow.GPUOptions.Experimental.gpu_host_mem_disallow_growth) +} + +// int32 gpu_system_memory_size_in_mb = 16; +inline void GPUOptions_Experimental::clear_gpu_system_memory_size_in_mb() { + _impl_.gpu_system_memory_size_in_mb_ = 0; +} +inline int32_t GPUOptions_Experimental::_internal_gpu_system_memory_size_in_mb() const { + return _impl_.gpu_system_memory_size_in_mb_; +} +inline int32_t GPUOptions_Experimental::gpu_system_memory_size_in_mb() const { + // @@protoc_insertion_point(field_get:tensorflow.GPUOptions.Experimental.gpu_system_memory_size_in_mb) + return _internal_gpu_system_memory_size_in_mb(); +} +inline void GPUOptions_Experimental::_internal_set_gpu_system_memory_size_in_mb(int32_t value) { + + _impl_.gpu_system_memory_size_in_mb_ = value; +} +inline void GPUOptions_Experimental::set_gpu_system_memory_size_in_mb(int32_t value) { + _internal_set_gpu_system_memory_size_in_mb(value); + // @@protoc_insertion_point(field_set:tensorflow.GPUOptions.Experimental.gpu_system_memory_size_in_mb) +} + +// ------------------------------------------------------------------- + +// GPUOptions + +// double per_process_gpu_memory_fraction = 1; +inline void GPUOptions::clear_per_process_gpu_memory_fraction() { + _impl_.per_process_gpu_memory_fraction_ = 0; +} +inline double GPUOptions::_internal_per_process_gpu_memory_fraction() const { + return _impl_.per_process_gpu_memory_fraction_; +} +inline double GPUOptions::per_process_gpu_memory_fraction() const { + // @@protoc_insertion_point(field_get:tensorflow.GPUOptions.per_process_gpu_memory_fraction) + return _internal_per_process_gpu_memory_fraction(); +} +inline void GPUOptions::_internal_set_per_process_gpu_memory_fraction(double value) { + + _impl_.per_process_gpu_memory_fraction_ = value; +} +inline void GPUOptions::set_per_process_gpu_memory_fraction(double value) { + _internal_set_per_process_gpu_memory_fraction(value); + // @@protoc_insertion_point(field_set:tensorflow.GPUOptions.per_process_gpu_memory_fraction) +} + +// bool allow_growth = 4; +inline void GPUOptions::clear_allow_growth() { + _impl_.allow_growth_ = false; +} +inline bool GPUOptions::_internal_allow_growth() const { + return _impl_.allow_growth_; +} +inline bool GPUOptions::allow_growth() const { + // @@protoc_insertion_point(field_get:tensorflow.GPUOptions.allow_growth) + return _internal_allow_growth(); +} +inline void GPUOptions::_internal_set_allow_growth(bool value) { + + _impl_.allow_growth_ = value; +} +inline void GPUOptions::set_allow_growth(bool value) { + _internal_set_allow_growth(value); + // @@protoc_insertion_point(field_set:tensorflow.GPUOptions.allow_growth) +} + +// string allocator_type = 2; +inline void GPUOptions::clear_allocator_type() { + _impl_.allocator_type_.ClearToEmpty(); +} +inline const std::string& GPUOptions::allocator_type() const { + // @@protoc_insertion_point(field_get:tensorflow.GPUOptions.allocator_type) + return _internal_allocator_type(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void GPUOptions::set_allocator_type(ArgT0&& arg0, ArgT... args) { + + _impl_.allocator_type_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.GPUOptions.allocator_type) +} +inline std::string* GPUOptions::mutable_allocator_type() { + std::string* _s = _internal_mutable_allocator_type(); + // @@protoc_insertion_point(field_mutable:tensorflow.GPUOptions.allocator_type) + return _s; +} +inline const std::string& GPUOptions::_internal_allocator_type() const { + return _impl_.allocator_type_.Get(); +} +inline void GPUOptions::_internal_set_allocator_type(const std::string& value) { + + _impl_.allocator_type_.Set(value, GetArenaForAllocation()); +} +inline std::string* GPUOptions::_internal_mutable_allocator_type() { + + return _impl_.allocator_type_.Mutable(GetArenaForAllocation()); +} +inline std::string* GPUOptions::release_allocator_type() { + // @@protoc_insertion_point(field_release:tensorflow.GPUOptions.allocator_type) + return _impl_.allocator_type_.Release(); +} +inline void GPUOptions::set_allocated_allocator_type(std::string* allocator_type) { + if (allocator_type != nullptr) { + + } else { + + } + _impl_.allocator_type_.SetAllocated(allocator_type, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.allocator_type_.IsDefault()) { + _impl_.allocator_type_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.GPUOptions.allocator_type) +} + +// int64 deferred_deletion_bytes = 3; +inline void GPUOptions::clear_deferred_deletion_bytes() { + _impl_.deferred_deletion_bytes_ = int64_t{0}; +} +inline int64_t GPUOptions::_internal_deferred_deletion_bytes() const { + return _impl_.deferred_deletion_bytes_; +} +inline int64_t GPUOptions::deferred_deletion_bytes() const { + // @@protoc_insertion_point(field_get:tensorflow.GPUOptions.deferred_deletion_bytes) + return _internal_deferred_deletion_bytes(); +} +inline void GPUOptions::_internal_set_deferred_deletion_bytes(int64_t value) { + + _impl_.deferred_deletion_bytes_ = value; +} +inline void GPUOptions::set_deferred_deletion_bytes(int64_t value) { + _internal_set_deferred_deletion_bytes(value); + // @@protoc_insertion_point(field_set:tensorflow.GPUOptions.deferred_deletion_bytes) +} + +// string visible_device_list = 5; +inline void GPUOptions::clear_visible_device_list() { + _impl_.visible_device_list_.ClearToEmpty(); +} +inline const std::string& GPUOptions::visible_device_list() const { + // @@protoc_insertion_point(field_get:tensorflow.GPUOptions.visible_device_list) + return _internal_visible_device_list(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void GPUOptions::set_visible_device_list(ArgT0&& arg0, ArgT... args) { + + _impl_.visible_device_list_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.GPUOptions.visible_device_list) +} +inline std::string* GPUOptions::mutable_visible_device_list() { + std::string* _s = _internal_mutable_visible_device_list(); + // @@protoc_insertion_point(field_mutable:tensorflow.GPUOptions.visible_device_list) + return _s; +} +inline const std::string& GPUOptions::_internal_visible_device_list() const { + return _impl_.visible_device_list_.Get(); +} +inline void GPUOptions::_internal_set_visible_device_list(const std::string& value) { + + _impl_.visible_device_list_.Set(value, GetArenaForAllocation()); +} +inline std::string* GPUOptions::_internal_mutable_visible_device_list() { + + return _impl_.visible_device_list_.Mutable(GetArenaForAllocation()); +} +inline std::string* GPUOptions::release_visible_device_list() { + // @@protoc_insertion_point(field_release:tensorflow.GPUOptions.visible_device_list) + return _impl_.visible_device_list_.Release(); +} +inline void GPUOptions::set_allocated_visible_device_list(std::string* visible_device_list) { + if (visible_device_list != nullptr) { + + } else { + + } + _impl_.visible_device_list_.SetAllocated(visible_device_list, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.visible_device_list_.IsDefault()) { + _impl_.visible_device_list_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.GPUOptions.visible_device_list) +} + +// int32 polling_active_delay_usecs = 6; +inline void GPUOptions::clear_polling_active_delay_usecs() { + _impl_.polling_active_delay_usecs_ = 0; +} +inline int32_t GPUOptions::_internal_polling_active_delay_usecs() const { + return _impl_.polling_active_delay_usecs_; +} +inline int32_t GPUOptions::polling_active_delay_usecs() const { + // @@protoc_insertion_point(field_get:tensorflow.GPUOptions.polling_active_delay_usecs) + return _internal_polling_active_delay_usecs(); +} +inline void GPUOptions::_internal_set_polling_active_delay_usecs(int32_t value) { + + _impl_.polling_active_delay_usecs_ = value; +} +inline void GPUOptions::set_polling_active_delay_usecs(int32_t value) { + _internal_set_polling_active_delay_usecs(value); + // @@protoc_insertion_point(field_set:tensorflow.GPUOptions.polling_active_delay_usecs) +} + +// int32 polling_inactive_delay_msecs = 7; +inline void GPUOptions::clear_polling_inactive_delay_msecs() { + _impl_.polling_inactive_delay_msecs_ = 0; +} +inline int32_t GPUOptions::_internal_polling_inactive_delay_msecs() const { + return _impl_.polling_inactive_delay_msecs_; +} +inline int32_t GPUOptions::polling_inactive_delay_msecs() const { + // @@protoc_insertion_point(field_get:tensorflow.GPUOptions.polling_inactive_delay_msecs) + return _internal_polling_inactive_delay_msecs(); +} +inline void GPUOptions::_internal_set_polling_inactive_delay_msecs(int32_t value) { + + _impl_.polling_inactive_delay_msecs_ = value; +} +inline void GPUOptions::set_polling_inactive_delay_msecs(int32_t value) { + _internal_set_polling_inactive_delay_msecs(value); + // @@protoc_insertion_point(field_set:tensorflow.GPUOptions.polling_inactive_delay_msecs) +} + +// bool force_gpu_compatible = 8; +inline void GPUOptions::clear_force_gpu_compatible() { + _impl_.force_gpu_compatible_ = false; +} +inline bool GPUOptions::_internal_force_gpu_compatible() const { + return _impl_.force_gpu_compatible_; +} +inline bool GPUOptions::force_gpu_compatible() const { + // @@protoc_insertion_point(field_get:tensorflow.GPUOptions.force_gpu_compatible) + return _internal_force_gpu_compatible(); +} +inline void GPUOptions::_internal_set_force_gpu_compatible(bool value) { + + _impl_.force_gpu_compatible_ = value; +} +inline void GPUOptions::set_force_gpu_compatible(bool value) { + _internal_set_force_gpu_compatible(value); + // @@protoc_insertion_point(field_set:tensorflow.GPUOptions.force_gpu_compatible) +} + +// .tensorflow.GPUOptions.Experimental experimental = 9; +inline bool GPUOptions::_internal_has_experimental() const { + return this != internal_default_instance() && _impl_.experimental_ != nullptr; +} +inline bool GPUOptions::has_experimental() const { + return _internal_has_experimental(); +} +inline void GPUOptions::clear_experimental() { + if (GetArenaForAllocation() == nullptr && _impl_.experimental_ != nullptr) { + delete _impl_.experimental_; + } + _impl_.experimental_ = nullptr; +} +inline const ::tensorflow::GPUOptions_Experimental& GPUOptions::_internal_experimental() const { + const ::tensorflow::GPUOptions_Experimental* p = _impl_.experimental_; + return p != nullptr ? *p : reinterpret_cast( + ::tensorflow::_GPUOptions_Experimental_default_instance_); +} +inline const ::tensorflow::GPUOptions_Experimental& GPUOptions::experimental() const { + // @@protoc_insertion_point(field_get:tensorflow.GPUOptions.experimental) + return _internal_experimental(); +} +inline void GPUOptions::unsafe_arena_set_allocated_experimental( + ::tensorflow::GPUOptions_Experimental* experimental) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.experimental_); + } + _impl_.experimental_ = experimental; + if (experimental) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.GPUOptions.experimental) +} +inline ::tensorflow::GPUOptions_Experimental* GPUOptions::release_experimental() { + + ::tensorflow::GPUOptions_Experimental* temp = _impl_.experimental_; + _impl_.experimental_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tensorflow::GPUOptions_Experimental* GPUOptions::unsafe_arena_release_experimental() { + // @@protoc_insertion_point(field_release:tensorflow.GPUOptions.experimental) + + ::tensorflow::GPUOptions_Experimental* temp = _impl_.experimental_; + _impl_.experimental_ = nullptr; + return temp; +} +inline ::tensorflow::GPUOptions_Experimental* GPUOptions::_internal_mutable_experimental() { + + if (_impl_.experimental_ == nullptr) { + auto* p = CreateMaybeMessage<::tensorflow::GPUOptions_Experimental>(GetArenaForAllocation()); + _impl_.experimental_ = p; + } + return _impl_.experimental_; +} +inline ::tensorflow::GPUOptions_Experimental* GPUOptions::mutable_experimental() { + ::tensorflow::GPUOptions_Experimental* _msg = _internal_mutable_experimental(); + // @@protoc_insertion_point(field_mutable:tensorflow.GPUOptions.experimental) + return _msg; +} +inline void GPUOptions::set_allocated_experimental(::tensorflow::GPUOptions_Experimental* experimental) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete _impl_.experimental_; + } + if (experimental) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(experimental); + if (message_arena != submessage_arena) { + experimental = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, experimental, submessage_arena); + } + + } else { + + } + _impl_.experimental_ = experimental; + // @@protoc_insertion_point(field_set_allocated:tensorflow.GPUOptions.experimental) +} + +// ------------------------------------------------------------------- + +// OptimizerOptions + +// bool do_common_subexpression_elimination = 1; +inline void OptimizerOptions::clear_do_common_subexpression_elimination() { + _impl_.do_common_subexpression_elimination_ = false; +} +inline bool OptimizerOptions::_internal_do_common_subexpression_elimination() const { + return _impl_.do_common_subexpression_elimination_; +} +inline bool OptimizerOptions::do_common_subexpression_elimination() const { + // @@protoc_insertion_point(field_get:tensorflow.OptimizerOptions.do_common_subexpression_elimination) + return _internal_do_common_subexpression_elimination(); +} +inline void OptimizerOptions::_internal_set_do_common_subexpression_elimination(bool value) { + + _impl_.do_common_subexpression_elimination_ = value; +} +inline void OptimizerOptions::set_do_common_subexpression_elimination(bool value) { + _internal_set_do_common_subexpression_elimination(value); + // @@protoc_insertion_point(field_set:tensorflow.OptimizerOptions.do_common_subexpression_elimination) +} + +// bool do_constant_folding = 2; +inline void OptimizerOptions::clear_do_constant_folding() { + _impl_.do_constant_folding_ = false; +} +inline bool OptimizerOptions::_internal_do_constant_folding() const { + return _impl_.do_constant_folding_; +} +inline bool OptimizerOptions::do_constant_folding() const { + // @@protoc_insertion_point(field_get:tensorflow.OptimizerOptions.do_constant_folding) + return _internal_do_constant_folding(); +} +inline void OptimizerOptions::_internal_set_do_constant_folding(bool value) { + + _impl_.do_constant_folding_ = value; +} +inline void OptimizerOptions::set_do_constant_folding(bool value) { + _internal_set_do_constant_folding(value); + // @@protoc_insertion_point(field_set:tensorflow.OptimizerOptions.do_constant_folding) +} + +// int64 max_folded_constant_in_bytes = 6; +inline void OptimizerOptions::clear_max_folded_constant_in_bytes() { + _impl_.max_folded_constant_in_bytes_ = int64_t{0}; +} +inline int64_t OptimizerOptions::_internal_max_folded_constant_in_bytes() const { + return _impl_.max_folded_constant_in_bytes_; +} +inline int64_t OptimizerOptions::max_folded_constant_in_bytes() const { + // @@protoc_insertion_point(field_get:tensorflow.OptimizerOptions.max_folded_constant_in_bytes) + return _internal_max_folded_constant_in_bytes(); +} +inline void OptimizerOptions::_internal_set_max_folded_constant_in_bytes(int64_t value) { + + _impl_.max_folded_constant_in_bytes_ = value; +} +inline void OptimizerOptions::set_max_folded_constant_in_bytes(int64_t value) { + _internal_set_max_folded_constant_in_bytes(value); + // @@protoc_insertion_point(field_set:tensorflow.OptimizerOptions.max_folded_constant_in_bytes) +} + +// bool do_function_inlining = 4; +inline void OptimizerOptions::clear_do_function_inlining() { + _impl_.do_function_inlining_ = false; +} +inline bool OptimizerOptions::_internal_do_function_inlining() const { + return _impl_.do_function_inlining_; +} +inline bool OptimizerOptions::do_function_inlining() const { + // @@protoc_insertion_point(field_get:tensorflow.OptimizerOptions.do_function_inlining) + return _internal_do_function_inlining(); +} +inline void OptimizerOptions::_internal_set_do_function_inlining(bool value) { + + _impl_.do_function_inlining_ = value; +} +inline void OptimizerOptions::set_do_function_inlining(bool value) { + _internal_set_do_function_inlining(value); + // @@protoc_insertion_point(field_set:tensorflow.OptimizerOptions.do_function_inlining) +} + +// .tensorflow.OptimizerOptions.Level opt_level = 3; +inline void OptimizerOptions::clear_opt_level() { + _impl_.opt_level_ = 0; +} +inline ::tensorflow::OptimizerOptions_Level OptimizerOptions::_internal_opt_level() const { + return static_cast< ::tensorflow::OptimizerOptions_Level >(_impl_.opt_level_); +} +inline ::tensorflow::OptimizerOptions_Level OptimizerOptions::opt_level() const { + // @@protoc_insertion_point(field_get:tensorflow.OptimizerOptions.opt_level) + return _internal_opt_level(); +} +inline void OptimizerOptions::_internal_set_opt_level(::tensorflow::OptimizerOptions_Level value) { + + _impl_.opt_level_ = value; +} +inline void OptimizerOptions::set_opt_level(::tensorflow::OptimizerOptions_Level value) { + _internal_set_opt_level(value); + // @@protoc_insertion_point(field_set:tensorflow.OptimizerOptions.opt_level) +} + +// .tensorflow.OptimizerOptions.GlobalJitLevel global_jit_level = 5; +inline void OptimizerOptions::clear_global_jit_level() { + _impl_.global_jit_level_ = 0; +} +inline ::tensorflow::OptimizerOptions_GlobalJitLevel OptimizerOptions::_internal_global_jit_level() const { + return static_cast< ::tensorflow::OptimizerOptions_GlobalJitLevel >(_impl_.global_jit_level_); +} +inline ::tensorflow::OptimizerOptions_GlobalJitLevel OptimizerOptions::global_jit_level() const { + // @@protoc_insertion_point(field_get:tensorflow.OptimizerOptions.global_jit_level) + return _internal_global_jit_level(); +} +inline void OptimizerOptions::_internal_set_global_jit_level(::tensorflow::OptimizerOptions_GlobalJitLevel value) { + + _impl_.global_jit_level_ = value; +} +inline void OptimizerOptions::set_global_jit_level(::tensorflow::OptimizerOptions_GlobalJitLevel value) { + _internal_set_global_jit_level(value); + // @@protoc_insertion_point(field_set:tensorflow.OptimizerOptions.global_jit_level) +} + +// bool cpu_global_jit = 7; +inline void OptimizerOptions::clear_cpu_global_jit() { + _impl_.cpu_global_jit_ = false; +} +inline bool OptimizerOptions::_internal_cpu_global_jit() const { + return _impl_.cpu_global_jit_; +} +inline bool OptimizerOptions::cpu_global_jit() const { + // @@protoc_insertion_point(field_get:tensorflow.OptimizerOptions.cpu_global_jit) + return _internal_cpu_global_jit(); +} +inline void OptimizerOptions::_internal_set_cpu_global_jit(bool value) { + + _impl_.cpu_global_jit_ = value; +} +inline void OptimizerOptions::set_cpu_global_jit(bool value) { + _internal_set_cpu_global_jit(value); + // @@protoc_insertion_point(field_set:tensorflow.OptimizerOptions.cpu_global_jit) +} + +// ------------------------------------------------------------------- + +// GraphOptions + +// bool enable_recv_scheduling = 2; +inline void GraphOptions::clear_enable_recv_scheduling() { + _impl_.enable_recv_scheduling_ = false; +} +inline bool GraphOptions::_internal_enable_recv_scheduling() const { + return _impl_.enable_recv_scheduling_; +} +inline bool GraphOptions::enable_recv_scheduling() const { + // @@protoc_insertion_point(field_get:tensorflow.GraphOptions.enable_recv_scheduling) + return _internal_enable_recv_scheduling(); +} +inline void GraphOptions::_internal_set_enable_recv_scheduling(bool value) { + + _impl_.enable_recv_scheduling_ = value; +} +inline void GraphOptions::set_enable_recv_scheduling(bool value) { + _internal_set_enable_recv_scheduling(value); + // @@protoc_insertion_point(field_set:tensorflow.GraphOptions.enable_recv_scheduling) +} + +// .tensorflow.OptimizerOptions optimizer_options = 3; +inline bool GraphOptions::_internal_has_optimizer_options() const { + return this != internal_default_instance() && _impl_.optimizer_options_ != nullptr; +} +inline bool GraphOptions::has_optimizer_options() const { + return _internal_has_optimizer_options(); +} +inline void GraphOptions::clear_optimizer_options() { + if (GetArenaForAllocation() == nullptr && _impl_.optimizer_options_ != nullptr) { + delete _impl_.optimizer_options_; + } + _impl_.optimizer_options_ = nullptr; +} +inline const ::tensorflow::OptimizerOptions& GraphOptions::_internal_optimizer_options() const { + const ::tensorflow::OptimizerOptions* p = _impl_.optimizer_options_; + return p != nullptr ? *p : reinterpret_cast( + ::tensorflow::_OptimizerOptions_default_instance_); +} +inline const ::tensorflow::OptimizerOptions& GraphOptions::optimizer_options() const { + // @@protoc_insertion_point(field_get:tensorflow.GraphOptions.optimizer_options) + return _internal_optimizer_options(); +} +inline void GraphOptions::unsafe_arena_set_allocated_optimizer_options( + ::tensorflow::OptimizerOptions* optimizer_options) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.optimizer_options_); + } + _impl_.optimizer_options_ = optimizer_options; + if (optimizer_options) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.GraphOptions.optimizer_options) +} +inline ::tensorflow::OptimizerOptions* GraphOptions::release_optimizer_options() { + + ::tensorflow::OptimizerOptions* temp = _impl_.optimizer_options_; + _impl_.optimizer_options_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tensorflow::OptimizerOptions* GraphOptions::unsafe_arena_release_optimizer_options() { + // @@protoc_insertion_point(field_release:tensorflow.GraphOptions.optimizer_options) + + ::tensorflow::OptimizerOptions* temp = _impl_.optimizer_options_; + _impl_.optimizer_options_ = nullptr; + return temp; +} +inline ::tensorflow::OptimizerOptions* GraphOptions::_internal_mutable_optimizer_options() { + + if (_impl_.optimizer_options_ == nullptr) { + auto* p = CreateMaybeMessage<::tensorflow::OptimizerOptions>(GetArenaForAllocation()); + _impl_.optimizer_options_ = p; + } + return _impl_.optimizer_options_; +} +inline ::tensorflow::OptimizerOptions* GraphOptions::mutable_optimizer_options() { + ::tensorflow::OptimizerOptions* _msg = _internal_mutable_optimizer_options(); + // @@protoc_insertion_point(field_mutable:tensorflow.GraphOptions.optimizer_options) + return _msg; +} +inline void GraphOptions::set_allocated_optimizer_options(::tensorflow::OptimizerOptions* optimizer_options) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete _impl_.optimizer_options_; + } + if (optimizer_options) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(optimizer_options); + if (message_arena != submessage_arena) { + optimizer_options = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, optimizer_options, submessage_arena); + } + + } else { + + } + _impl_.optimizer_options_ = optimizer_options; + // @@protoc_insertion_point(field_set_allocated:tensorflow.GraphOptions.optimizer_options) +} + +// int64 build_cost_model = 4; +inline void GraphOptions::clear_build_cost_model() { + _impl_.build_cost_model_ = int64_t{0}; +} +inline int64_t GraphOptions::_internal_build_cost_model() const { + return _impl_.build_cost_model_; +} +inline int64_t GraphOptions::build_cost_model() const { + // @@protoc_insertion_point(field_get:tensorflow.GraphOptions.build_cost_model) + return _internal_build_cost_model(); +} +inline void GraphOptions::_internal_set_build_cost_model(int64_t value) { + + _impl_.build_cost_model_ = value; +} +inline void GraphOptions::set_build_cost_model(int64_t value) { + _internal_set_build_cost_model(value); + // @@protoc_insertion_point(field_set:tensorflow.GraphOptions.build_cost_model) +} + +// int64 build_cost_model_after = 9; +inline void GraphOptions::clear_build_cost_model_after() { + _impl_.build_cost_model_after_ = int64_t{0}; +} +inline int64_t GraphOptions::_internal_build_cost_model_after() const { + return _impl_.build_cost_model_after_; +} +inline int64_t GraphOptions::build_cost_model_after() const { + // @@protoc_insertion_point(field_get:tensorflow.GraphOptions.build_cost_model_after) + return _internal_build_cost_model_after(); +} +inline void GraphOptions::_internal_set_build_cost_model_after(int64_t value) { + + _impl_.build_cost_model_after_ = value; +} +inline void GraphOptions::set_build_cost_model_after(int64_t value) { + _internal_set_build_cost_model_after(value); + // @@protoc_insertion_point(field_set:tensorflow.GraphOptions.build_cost_model_after) +} + +// bool infer_shapes = 5; +inline void GraphOptions::clear_infer_shapes() { + _impl_.infer_shapes_ = false; +} +inline bool GraphOptions::_internal_infer_shapes() const { + return _impl_.infer_shapes_; +} +inline bool GraphOptions::infer_shapes() const { + // @@protoc_insertion_point(field_get:tensorflow.GraphOptions.infer_shapes) + return _internal_infer_shapes(); +} +inline void GraphOptions::_internal_set_infer_shapes(bool value) { + + _impl_.infer_shapes_ = value; +} +inline void GraphOptions::set_infer_shapes(bool value) { + _internal_set_infer_shapes(value); + // @@protoc_insertion_point(field_set:tensorflow.GraphOptions.infer_shapes) +} + +// bool place_pruned_graph = 6; +inline void GraphOptions::clear_place_pruned_graph() { + _impl_.place_pruned_graph_ = false; +} +inline bool GraphOptions::_internal_place_pruned_graph() const { + return _impl_.place_pruned_graph_; +} +inline bool GraphOptions::place_pruned_graph() const { + // @@protoc_insertion_point(field_get:tensorflow.GraphOptions.place_pruned_graph) + return _internal_place_pruned_graph(); +} +inline void GraphOptions::_internal_set_place_pruned_graph(bool value) { + + _impl_.place_pruned_graph_ = value; +} +inline void GraphOptions::set_place_pruned_graph(bool value) { + _internal_set_place_pruned_graph(value); + // @@protoc_insertion_point(field_set:tensorflow.GraphOptions.place_pruned_graph) +} + +// bool enable_bfloat16_sendrecv = 7; +inline void GraphOptions::clear_enable_bfloat16_sendrecv() { + _impl_.enable_bfloat16_sendrecv_ = false; +} +inline bool GraphOptions::_internal_enable_bfloat16_sendrecv() const { + return _impl_.enable_bfloat16_sendrecv_; +} +inline bool GraphOptions::enable_bfloat16_sendrecv() const { + // @@protoc_insertion_point(field_get:tensorflow.GraphOptions.enable_bfloat16_sendrecv) + return _internal_enable_bfloat16_sendrecv(); +} +inline void GraphOptions::_internal_set_enable_bfloat16_sendrecv(bool value) { + + _impl_.enable_bfloat16_sendrecv_ = value; +} +inline void GraphOptions::set_enable_bfloat16_sendrecv(bool value) { + _internal_set_enable_bfloat16_sendrecv(value); + // @@protoc_insertion_point(field_set:tensorflow.GraphOptions.enable_bfloat16_sendrecv) +} + +// int32 timeline_step = 8; +inline void GraphOptions::clear_timeline_step() { + _impl_.timeline_step_ = 0; +} +inline int32_t GraphOptions::_internal_timeline_step() const { + return _impl_.timeline_step_; +} +inline int32_t GraphOptions::timeline_step() const { + // @@protoc_insertion_point(field_get:tensorflow.GraphOptions.timeline_step) + return _internal_timeline_step(); +} +inline void GraphOptions::_internal_set_timeline_step(int32_t value) { + + _impl_.timeline_step_ = value; +} +inline void GraphOptions::set_timeline_step(int32_t value) { + _internal_set_timeline_step(value); + // @@protoc_insertion_point(field_set:tensorflow.GraphOptions.timeline_step) +} + +// .tensorflow.RewriterConfig rewrite_options = 10; +inline bool GraphOptions::_internal_has_rewrite_options() const { + return this != internal_default_instance() && _impl_.rewrite_options_ != nullptr; +} +inline bool GraphOptions::has_rewrite_options() const { + return _internal_has_rewrite_options(); +} +inline const ::tensorflow::RewriterConfig& GraphOptions::_internal_rewrite_options() const { + const ::tensorflow::RewriterConfig* p = _impl_.rewrite_options_; + return p != nullptr ? *p : reinterpret_cast( + ::tensorflow::_RewriterConfig_default_instance_); +} +inline const ::tensorflow::RewriterConfig& GraphOptions::rewrite_options() const { + // @@protoc_insertion_point(field_get:tensorflow.GraphOptions.rewrite_options) + return _internal_rewrite_options(); +} +inline void GraphOptions::unsafe_arena_set_allocated_rewrite_options( + ::tensorflow::RewriterConfig* rewrite_options) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.rewrite_options_); + } + _impl_.rewrite_options_ = rewrite_options; + if (rewrite_options) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.GraphOptions.rewrite_options) +} +inline ::tensorflow::RewriterConfig* GraphOptions::release_rewrite_options() { + + ::tensorflow::RewriterConfig* temp = _impl_.rewrite_options_; + _impl_.rewrite_options_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tensorflow::RewriterConfig* GraphOptions::unsafe_arena_release_rewrite_options() { + // @@protoc_insertion_point(field_release:tensorflow.GraphOptions.rewrite_options) + + ::tensorflow::RewriterConfig* temp = _impl_.rewrite_options_; + _impl_.rewrite_options_ = nullptr; + return temp; +} +inline ::tensorflow::RewriterConfig* GraphOptions::_internal_mutable_rewrite_options() { + + if (_impl_.rewrite_options_ == nullptr) { + auto* p = CreateMaybeMessage<::tensorflow::RewriterConfig>(GetArenaForAllocation()); + _impl_.rewrite_options_ = p; + } + return _impl_.rewrite_options_; +} +inline ::tensorflow::RewriterConfig* GraphOptions::mutable_rewrite_options() { + ::tensorflow::RewriterConfig* _msg = _internal_mutable_rewrite_options(); + // @@protoc_insertion_point(field_mutable:tensorflow.GraphOptions.rewrite_options) + return _msg; +} +inline void GraphOptions::set_allocated_rewrite_options(::tensorflow::RewriterConfig* rewrite_options) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.rewrite_options_); + } + if (rewrite_options) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( + reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(rewrite_options)); + if (message_arena != submessage_arena) { + rewrite_options = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, rewrite_options, submessage_arena); + } + + } else { + + } + _impl_.rewrite_options_ = rewrite_options; + // @@protoc_insertion_point(field_set_allocated:tensorflow.GraphOptions.rewrite_options) +} + +// ------------------------------------------------------------------- + +// ThreadPoolOptionProto + +// int32 num_threads = 1; +inline void ThreadPoolOptionProto::clear_num_threads() { + _impl_.num_threads_ = 0; +} +inline int32_t ThreadPoolOptionProto::_internal_num_threads() const { + return _impl_.num_threads_; +} +inline int32_t ThreadPoolOptionProto::num_threads() const { + // @@protoc_insertion_point(field_get:tensorflow.ThreadPoolOptionProto.num_threads) + return _internal_num_threads(); +} +inline void ThreadPoolOptionProto::_internal_set_num_threads(int32_t value) { + + _impl_.num_threads_ = value; +} +inline void ThreadPoolOptionProto::set_num_threads(int32_t value) { + _internal_set_num_threads(value); + // @@protoc_insertion_point(field_set:tensorflow.ThreadPoolOptionProto.num_threads) +} + +// string global_name = 2; +inline void ThreadPoolOptionProto::clear_global_name() { + _impl_.global_name_.ClearToEmpty(); +} +inline const std::string& ThreadPoolOptionProto::global_name() const { + // @@protoc_insertion_point(field_get:tensorflow.ThreadPoolOptionProto.global_name) + return _internal_global_name(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void ThreadPoolOptionProto::set_global_name(ArgT0&& arg0, ArgT... args) { + + _impl_.global_name_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.ThreadPoolOptionProto.global_name) +} +inline std::string* ThreadPoolOptionProto::mutable_global_name() { + std::string* _s = _internal_mutable_global_name(); + // @@protoc_insertion_point(field_mutable:tensorflow.ThreadPoolOptionProto.global_name) + return _s; +} +inline const std::string& ThreadPoolOptionProto::_internal_global_name() const { + return _impl_.global_name_.Get(); +} +inline void ThreadPoolOptionProto::_internal_set_global_name(const std::string& value) { + + _impl_.global_name_.Set(value, GetArenaForAllocation()); +} +inline std::string* ThreadPoolOptionProto::_internal_mutable_global_name() { + + return _impl_.global_name_.Mutable(GetArenaForAllocation()); +} +inline std::string* ThreadPoolOptionProto::release_global_name() { + // @@protoc_insertion_point(field_release:tensorflow.ThreadPoolOptionProto.global_name) + return _impl_.global_name_.Release(); +} +inline void ThreadPoolOptionProto::set_allocated_global_name(std::string* global_name) { + if (global_name != nullptr) { + + } else { + + } + _impl_.global_name_.SetAllocated(global_name, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.global_name_.IsDefault()) { + _impl_.global_name_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.ThreadPoolOptionProto.global_name) +} + +// ------------------------------------------------------------------- + +// SessionMetadata + +// string name = 1; +inline void SessionMetadata::clear_name() { + _impl_.name_.ClearToEmpty(); +} +inline const std::string& SessionMetadata::name() const { + // @@protoc_insertion_point(field_get:tensorflow.SessionMetadata.name) + return _internal_name(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void SessionMetadata::set_name(ArgT0&& arg0, ArgT... args) { + + _impl_.name_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.SessionMetadata.name) +} +inline std::string* SessionMetadata::mutable_name() { + std::string* _s = _internal_mutable_name(); + // @@protoc_insertion_point(field_mutable:tensorflow.SessionMetadata.name) + return _s; +} +inline const std::string& SessionMetadata::_internal_name() const { + return _impl_.name_.Get(); +} +inline void SessionMetadata::_internal_set_name(const std::string& value) { + + _impl_.name_.Set(value, GetArenaForAllocation()); +} +inline std::string* SessionMetadata::_internal_mutable_name() { + + return _impl_.name_.Mutable(GetArenaForAllocation()); +} +inline std::string* SessionMetadata::release_name() { + // @@protoc_insertion_point(field_release:tensorflow.SessionMetadata.name) + return _impl_.name_.Release(); +} +inline void SessionMetadata::set_allocated_name(std::string* name) { + if (name != nullptr) { + + } else { + + } + _impl_.name_.SetAllocated(name, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.name_.IsDefault()) { + _impl_.name_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.SessionMetadata.name) +} + +// int64 version = 2; +inline void SessionMetadata::clear_version() { + _impl_.version_ = int64_t{0}; +} +inline int64_t SessionMetadata::_internal_version() const { + return _impl_.version_; +} +inline int64_t SessionMetadata::version() const { + // @@protoc_insertion_point(field_get:tensorflow.SessionMetadata.version) + return _internal_version(); +} +inline void SessionMetadata::_internal_set_version(int64_t value) { + + _impl_.version_ = value; +} +inline void SessionMetadata::set_version(int64_t value) { + _internal_set_version(value); + // @@protoc_insertion_point(field_set:tensorflow.SessionMetadata.version) +} + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ConfigProto_Experimental + +// string collective_group_leader = 1; +inline void ConfigProto_Experimental::clear_collective_group_leader() { + _impl_.collective_group_leader_.ClearToEmpty(); +} +inline const std::string& ConfigProto_Experimental::collective_group_leader() const { + // @@protoc_insertion_point(field_get:tensorflow.ConfigProto.Experimental.collective_group_leader) + return _internal_collective_group_leader(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void ConfigProto_Experimental::set_collective_group_leader(ArgT0&& arg0, ArgT... args) { + + _impl_.collective_group_leader_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.ConfigProto.Experimental.collective_group_leader) +} +inline std::string* ConfigProto_Experimental::mutable_collective_group_leader() { + std::string* _s = _internal_mutable_collective_group_leader(); + // @@protoc_insertion_point(field_mutable:tensorflow.ConfigProto.Experimental.collective_group_leader) + return _s; +} +inline const std::string& ConfigProto_Experimental::_internal_collective_group_leader() const { + return _impl_.collective_group_leader_.Get(); +} +inline void ConfigProto_Experimental::_internal_set_collective_group_leader(const std::string& value) { + + _impl_.collective_group_leader_.Set(value, GetArenaForAllocation()); +} +inline std::string* ConfigProto_Experimental::_internal_mutable_collective_group_leader() { + + return _impl_.collective_group_leader_.Mutable(GetArenaForAllocation()); +} +inline std::string* ConfigProto_Experimental::release_collective_group_leader() { + // @@protoc_insertion_point(field_release:tensorflow.ConfigProto.Experimental.collective_group_leader) + return _impl_.collective_group_leader_.Release(); +} +inline void ConfigProto_Experimental::set_allocated_collective_group_leader(std::string* collective_group_leader) { + if (collective_group_leader != nullptr) { + + } else { + + } + _impl_.collective_group_leader_.SetAllocated(collective_group_leader, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.collective_group_leader_.IsDefault()) { + _impl_.collective_group_leader_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.ConfigProto.Experimental.collective_group_leader) +} + +// string executor_type = 3; +inline void ConfigProto_Experimental::clear_executor_type() { + _impl_.executor_type_.ClearToEmpty(); +} +inline const std::string& ConfigProto_Experimental::executor_type() const { + // @@protoc_insertion_point(field_get:tensorflow.ConfigProto.Experimental.executor_type) + return _internal_executor_type(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void ConfigProto_Experimental::set_executor_type(ArgT0&& arg0, ArgT... args) { + + _impl_.executor_type_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.ConfigProto.Experimental.executor_type) +} +inline std::string* ConfigProto_Experimental::mutable_executor_type() { + std::string* _s = _internal_mutable_executor_type(); + // @@protoc_insertion_point(field_mutable:tensorflow.ConfigProto.Experimental.executor_type) + return _s; +} +inline const std::string& ConfigProto_Experimental::_internal_executor_type() const { + return _impl_.executor_type_.Get(); +} +inline void ConfigProto_Experimental::_internal_set_executor_type(const std::string& value) { + + _impl_.executor_type_.Set(value, GetArenaForAllocation()); +} +inline std::string* ConfigProto_Experimental::_internal_mutable_executor_type() { + + return _impl_.executor_type_.Mutable(GetArenaForAllocation()); +} +inline std::string* ConfigProto_Experimental::release_executor_type() { + // @@protoc_insertion_point(field_release:tensorflow.ConfigProto.Experimental.executor_type) + return _impl_.executor_type_.Release(); +} +inline void ConfigProto_Experimental::set_allocated_executor_type(std::string* executor_type) { + if (executor_type != nullptr) { + + } else { + + } + _impl_.executor_type_.SetAllocated(executor_type, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.executor_type_.IsDefault()) { + _impl_.executor_type_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.ConfigProto.Experimental.executor_type) +} + +// int32 recv_buf_max_chunk = 4; +inline void ConfigProto_Experimental::clear_recv_buf_max_chunk() { + _impl_.recv_buf_max_chunk_ = 0; +} +inline int32_t ConfigProto_Experimental::_internal_recv_buf_max_chunk() const { + return _impl_.recv_buf_max_chunk_; +} +inline int32_t ConfigProto_Experimental::recv_buf_max_chunk() const { + // @@protoc_insertion_point(field_get:tensorflow.ConfigProto.Experimental.recv_buf_max_chunk) + return _internal_recv_buf_max_chunk(); +} +inline void ConfigProto_Experimental::_internal_set_recv_buf_max_chunk(int32_t value) { + + _impl_.recv_buf_max_chunk_ = value; +} +inline void ConfigProto_Experimental::set_recv_buf_max_chunk(int32_t value) { + _internal_set_recv_buf_max_chunk(value); + // @@protoc_insertion_point(field_set:tensorflow.ConfigProto.Experimental.recv_buf_max_chunk) +} + +// bool use_numa_affinity = 5; +inline void ConfigProto_Experimental::clear_use_numa_affinity() { + _impl_.use_numa_affinity_ = false; +} +inline bool ConfigProto_Experimental::_internal_use_numa_affinity() const { + return _impl_.use_numa_affinity_; +} +inline bool ConfigProto_Experimental::use_numa_affinity() const { + // @@protoc_insertion_point(field_get:tensorflow.ConfigProto.Experimental.use_numa_affinity) + return _internal_use_numa_affinity(); +} +inline void ConfigProto_Experimental::_internal_set_use_numa_affinity(bool value) { + + _impl_.use_numa_affinity_ = value; +} +inline void ConfigProto_Experimental::set_use_numa_affinity(bool value) { + _internal_set_use_numa_affinity(value); + // @@protoc_insertion_point(field_set:tensorflow.ConfigProto.Experimental.use_numa_affinity) +} + +// bool collective_deterministic_sequential_execution = 6; +inline void ConfigProto_Experimental::clear_collective_deterministic_sequential_execution() { + _impl_.collective_deterministic_sequential_execution_ = false; +} +inline bool ConfigProto_Experimental::_internal_collective_deterministic_sequential_execution() const { + return _impl_.collective_deterministic_sequential_execution_; +} +inline bool ConfigProto_Experimental::collective_deterministic_sequential_execution() const { + // @@protoc_insertion_point(field_get:tensorflow.ConfigProto.Experimental.collective_deterministic_sequential_execution) + return _internal_collective_deterministic_sequential_execution(); +} +inline void ConfigProto_Experimental::_internal_set_collective_deterministic_sequential_execution(bool value) { + + _impl_.collective_deterministic_sequential_execution_ = value; +} +inline void ConfigProto_Experimental::set_collective_deterministic_sequential_execution(bool value) { + _internal_set_collective_deterministic_sequential_execution(value); + // @@protoc_insertion_point(field_set:tensorflow.ConfigProto.Experimental.collective_deterministic_sequential_execution) +} + +// bool collective_nccl = 7; +inline void ConfigProto_Experimental::clear_collective_nccl() { + _impl_.collective_nccl_ = false; +} +inline bool ConfigProto_Experimental::_internal_collective_nccl() const { + return _impl_.collective_nccl_; +} +inline bool ConfigProto_Experimental::collective_nccl() const { + // @@protoc_insertion_point(field_get:tensorflow.ConfigProto.Experimental.collective_nccl) + return _internal_collective_nccl(); +} +inline void ConfigProto_Experimental::_internal_set_collective_nccl(bool value) { + + _impl_.collective_nccl_ = value; +} +inline void ConfigProto_Experimental::set_collective_nccl(bool value) { + _internal_set_collective_nccl(value); + // @@protoc_insertion_point(field_set:tensorflow.ConfigProto.Experimental.collective_nccl) +} + +// bool share_session_state_in_clusterspec_propagation = 8; +inline void ConfigProto_Experimental::clear_share_session_state_in_clusterspec_propagation() { + _impl_.share_session_state_in_clusterspec_propagation_ = false; +} +inline bool ConfigProto_Experimental::_internal_share_session_state_in_clusterspec_propagation() const { + return _impl_.share_session_state_in_clusterspec_propagation_; +} +inline bool ConfigProto_Experimental::share_session_state_in_clusterspec_propagation() const { + // @@protoc_insertion_point(field_get:tensorflow.ConfigProto.Experimental.share_session_state_in_clusterspec_propagation) + return _internal_share_session_state_in_clusterspec_propagation(); +} +inline void ConfigProto_Experimental::_internal_set_share_session_state_in_clusterspec_propagation(bool value) { + + _impl_.share_session_state_in_clusterspec_propagation_ = value; +} +inline void ConfigProto_Experimental::set_share_session_state_in_clusterspec_propagation(bool value) { + _internal_set_share_session_state_in_clusterspec_propagation(value); + // @@protoc_insertion_point(field_set:tensorflow.ConfigProto.Experimental.share_session_state_in_clusterspec_propagation) +} + +// bool disable_thread_spinning = 9; +inline void ConfigProto_Experimental::clear_disable_thread_spinning() { + _impl_.disable_thread_spinning_ = false; +} +inline bool ConfigProto_Experimental::_internal_disable_thread_spinning() const { + return _impl_.disable_thread_spinning_; +} +inline bool ConfigProto_Experimental::disable_thread_spinning() const { + // @@protoc_insertion_point(field_get:tensorflow.ConfigProto.Experimental.disable_thread_spinning) + return _internal_disable_thread_spinning(); +} +inline void ConfigProto_Experimental::_internal_set_disable_thread_spinning(bool value) { + + _impl_.disable_thread_spinning_ = value; +} +inline void ConfigProto_Experimental::set_disable_thread_spinning(bool value) { + _internal_set_disable_thread_spinning(value); + // @@protoc_insertion_point(field_set:tensorflow.ConfigProto.Experimental.disable_thread_spinning) +} + +// bool share_cluster_devices_in_session = 10; +inline void ConfigProto_Experimental::clear_share_cluster_devices_in_session() { + _impl_.share_cluster_devices_in_session_ = false; +} +inline bool ConfigProto_Experimental::_internal_share_cluster_devices_in_session() const { + return _impl_.share_cluster_devices_in_session_; +} +inline bool ConfigProto_Experimental::share_cluster_devices_in_session() const { + // @@protoc_insertion_point(field_get:tensorflow.ConfigProto.Experimental.share_cluster_devices_in_session) + return _internal_share_cluster_devices_in_session(); +} +inline void ConfigProto_Experimental::_internal_set_share_cluster_devices_in_session(bool value) { + + _impl_.share_cluster_devices_in_session_ = value; +} +inline void ConfigProto_Experimental::set_share_cluster_devices_in_session(bool value) { + _internal_set_share_cluster_devices_in_session(value); + // @@protoc_insertion_point(field_set:tensorflow.ConfigProto.Experimental.share_cluster_devices_in_session) +} + +// .tensorflow.SessionMetadata session_metadata = 11; +inline bool ConfigProto_Experimental::_internal_has_session_metadata() const { + return this != internal_default_instance() && _impl_.session_metadata_ != nullptr; +} +inline bool ConfigProto_Experimental::has_session_metadata() const { + return _internal_has_session_metadata(); +} +inline void ConfigProto_Experimental::clear_session_metadata() { + if (GetArenaForAllocation() == nullptr && _impl_.session_metadata_ != nullptr) { + delete _impl_.session_metadata_; + } + _impl_.session_metadata_ = nullptr; +} +inline const ::tensorflow::SessionMetadata& ConfigProto_Experimental::_internal_session_metadata() const { + const ::tensorflow::SessionMetadata* p = _impl_.session_metadata_; + return p != nullptr ? *p : reinterpret_cast( + ::tensorflow::_SessionMetadata_default_instance_); +} +inline const ::tensorflow::SessionMetadata& ConfigProto_Experimental::session_metadata() const { + // @@protoc_insertion_point(field_get:tensorflow.ConfigProto.Experimental.session_metadata) + return _internal_session_metadata(); +} +inline void ConfigProto_Experimental::unsafe_arena_set_allocated_session_metadata( + ::tensorflow::SessionMetadata* session_metadata) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.session_metadata_); + } + _impl_.session_metadata_ = session_metadata; + if (session_metadata) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.ConfigProto.Experimental.session_metadata) +} +inline ::tensorflow::SessionMetadata* ConfigProto_Experimental::release_session_metadata() { + + ::tensorflow::SessionMetadata* temp = _impl_.session_metadata_; + _impl_.session_metadata_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tensorflow::SessionMetadata* ConfigProto_Experimental::unsafe_arena_release_session_metadata() { + // @@protoc_insertion_point(field_release:tensorflow.ConfigProto.Experimental.session_metadata) + + ::tensorflow::SessionMetadata* temp = _impl_.session_metadata_; + _impl_.session_metadata_ = nullptr; + return temp; +} +inline ::tensorflow::SessionMetadata* ConfigProto_Experimental::_internal_mutable_session_metadata() { + + if (_impl_.session_metadata_ == nullptr) { + auto* p = CreateMaybeMessage<::tensorflow::SessionMetadata>(GetArenaForAllocation()); + _impl_.session_metadata_ = p; + } + return _impl_.session_metadata_; +} +inline ::tensorflow::SessionMetadata* ConfigProto_Experimental::mutable_session_metadata() { + ::tensorflow::SessionMetadata* _msg = _internal_mutable_session_metadata(); + // @@protoc_insertion_point(field_mutable:tensorflow.ConfigProto.Experimental.session_metadata) + return _msg; +} +inline void ConfigProto_Experimental::set_allocated_session_metadata(::tensorflow::SessionMetadata* session_metadata) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete _impl_.session_metadata_; + } + if (session_metadata) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(session_metadata); + if (message_arena != submessage_arena) { + session_metadata = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, session_metadata, submessage_arena); + } + + } else { + + } + _impl_.session_metadata_ = session_metadata; + // @@protoc_insertion_point(field_set_allocated:tensorflow.ConfigProto.Experimental.session_metadata) +} + +// bool optimize_for_static_graph = 12; +inline void ConfigProto_Experimental::clear_optimize_for_static_graph() { + _impl_.optimize_for_static_graph_ = false; +} +inline bool ConfigProto_Experimental::_internal_optimize_for_static_graph() const { + return _impl_.optimize_for_static_graph_; +} +inline bool ConfigProto_Experimental::optimize_for_static_graph() const { + // @@protoc_insertion_point(field_get:tensorflow.ConfigProto.Experimental.optimize_for_static_graph) + return _internal_optimize_for_static_graph(); +} +inline void ConfigProto_Experimental::_internal_set_optimize_for_static_graph(bool value) { + + _impl_.optimize_for_static_graph_ = value; +} +inline void ConfigProto_Experimental::set_optimize_for_static_graph(bool value) { + _internal_set_optimize_for_static_graph(value); + // @@protoc_insertion_point(field_set:tensorflow.ConfigProto.Experimental.optimize_for_static_graph) +} + +// bool enable_mlir_bridge = 13; +inline void ConfigProto_Experimental::clear_enable_mlir_bridge() { + _impl_.enable_mlir_bridge_ = false; +} +inline bool ConfigProto_Experimental::_internal_enable_mlir_bridge() const { + return _impl_.enable_mlir_bridge_; +} +inline bool ConfigProto_Experimental::enable_mlir_bridge() const { + // @@protoc_insertion_point(field_get:tensorflow.ConfigProto.Experimental.enable_mlir_bridge) + return _internal_enable_mlir_bridge(); +} +inline void ConfigProto_Experimental::_internal_set_enable_mlir_bridge(bool value) { + + _impl_.enable_mlir_bridge_ = value; +} +inline void ConfigProto_Experimental::set_enable_mlir_bridge(bool value) { + _internal_set_enable_mlir_bridge(value); + // @@protoc_insertion_point(field_set:tensorflow.ConfigProto.Experimental.enable_mlir_bridge) +} + +// .tensorflow.ConfigProto.Experimental.MlirBridgeRollout mlir_bridge_rollout = 17; +inline void ConfigProto_Experimental::clear_mlir_bridge_rollout() { + _impl_.mlir_bridge_rollout_ = 0; +} +inline ::tensorflow::ConfigProto_Experimental_MlirBridgeRollout ConfigProto_Experimental::_internal_mlir_bridge_rollout() const { + return static_cast< ::tensorflow::ConfigProto_Experimental_MlirBridgeRollout >(_impl_.mlir_bridge_rollout_); +} +inline ::tensorflow::ConfigProto_Experimental_MlirBridgeRollout ConfigProto_Experimental::mlir_bridge_rollout() const { + // @@protoc_insertion_point(field_get:tensorflow.ConfigProto.Experimental.mlir_bridge_rollout) + return _internal_mlir_bridge_rollout(); +} +inline void ConfigProto_Experimental::_internal_set_mlir_bridge_rollout(::tensorflow::ConfigProto_Experimental_MlirBridgeRollout value) { + + _impl_.mlir_bridge_rollout_ = value; +} +inline void ConfigProto_Experimental::set_mlir_bridge_rollout(::tensorflow::ConfigProto_Experimental_MlirBridgeRollout value) { + _internal_set_mlir_bridge_rollout(value); + // @@protoc_insertion_point(field_set:tensorflow.ConfigProto.Experimental.mlir_bridge_rollout) +} + +// bool enable_mlir_graph_optimization = 16; +inline void ConfigProto_Experimental::clear_enable_mlir_graph_optimization() { + _impl_.enable_mlir_graph_optimization_ = false; +} +inline bool ConfigProto_Experimental::_internal_enable_mlir_graph_optimization() const { + return _impl_.enable_mlir_graph_optimization_; +} +inline bool ConfigProto_Experimental::enable_mlir_graph_optimization() const { + // @@protoc_insertion_point(field_get:tensorflow.ConfigProto.Experimental.enable_mlir_graph_optimization) + return _internal_enable_mlir_graph_optimization(); +} +inline void ConfigProto_Experimental::_internal_set_enable_mlir_graph_optimization(bool value) { + + _impl_.enable_mlir_graph_optimization_ = value; +} +inline void ConfigProto_Experimental::set_enable_mlir_graph_optimization(bool value) { + _internal_set_enable_mlir_graph_optimization(value); + // @@protoc_insertion_point(field_set:tensorflow.ConfigProto.Experimental.enable_mlir_graph_optimization) +} + +// bool disable_output_partition_graphs = 14; +inline void ConfigProto_Experimental::clear_disable_output_partition_graphs() { + _impl_.disable_output_partition_graphs_ = false; +} +inline bool ConfigProto_Experimental::_internal_disable_output_partition_graphs() const { + return _impl_.disable_output_partition_graphs_; +} +inline bool ConfigProto_Experimental::disable_output_partition_graphs() const { + // @@protoc_insertion_point(field_get:tensorflow.ConfigProto.Experimental.disable_output_partition_graphs) + return _internal_disable_output_partition_graphs(); +} +inline void ConfigProto_Experimental::_internal_set_disable_output_partition_graphs(bool value) { + + _impl_.disable_output_partition_graphs_ = value; +} +inline void ConfigProto_Experimental::set_disable_output_partition_graphs(bool value) { + _internal_set_disable_output_partition_graphs(value); + // @@protoc_insertion_point(field_set:tensorflow.ConfigProto.Experimental.disable_output_partition_graphs) +} + +// int64 xla_fusion_autotuner_thresh = 15; +inline void ConfigProto_Experimental::clear_xla_fusion_autotuner_thresh() { + _impl_.xla_fusion_autotuner_thresh_ = int64_t{0}; +} +inline int64_t ConfigProto_Experimental::_internal_xla_fusion_autotuner_thresh() const { + return _impl_.xla_fusion_autotuner_thresh_; +} +inline int64_t ConfigProto_Experimental::xla_fusion_autotuner_thresh() const { + // @@protoc_insertion_point(field_get:tensorflow.ConfigProto.Experimental.xla_fusion_autotuner_thresh) + return _internal_xla_fusion_autotuner_thresh(); +} +inline void ConfigProto_Experimental::_internal_set_xla_fusion_autotuner_thresh(int64_t value) { + + _impl_.xla_fusion_autotuner_thresh_ = value; +} +inline void ConfigProto_Experimental::set_xla_fusion_autotuner_thresh(int64_t value) { + _internal_set_xla_fusion_autotuner_thresh(value); + // @@protoc_insertion_point(field_set:tensorflow.ConfigProto.Experimental.xla_fusion_autotuner_thresh) +} + +// bool use_tfrt = 18; +inline void ConfigProto_Experimental::clear_use_tfrt() { + _impl_.use_tfrt_ = false; +} +inline bool ConfigProto_Experimental::_internal_use_tfrt() const { + return _impl_.use_tfrt_; +} +inline bool ConfigProto_Experimental::use_tfrt() const { + // @@protoc_insertion_point(field_get:tensorflow.ConfigProto.Experimental.use_tfrt) + return _internal_use_tfrt(); +} +inline void ConfigProto_Experimental::_internal_set_use_tfrt(bool value) { + + _impl_.use_tfrt_ = value; +} +inline void ConfigProto_Experimental::set_use_tfrt(bool value) { + _internal_set_use_tfrt(value); + // @@protoc_insertion_point(field_set:tensorflow.ConfigProto.Experimental.use_tfrt) +} + +// bool disable_functional_ops_lowering = 21; +inline void ConfigProto_Experimental::clear_disable_functional_ops_lowering() { + _impl_.disable_functional_ops_lowering_ = false; +} +inline bool ConfigProto_Experimental::_internal_disable_functional_ops_lowering() const { + return _impl_.disable_functional_ops_lowering_; +} +inline bool ConfigProto_Experimental::disable_functional_ops_lowering() const { + // @@protoc_insertion_point(field_get:tensorflow.ConfigProto.Experimental.disable_functional_ops_lowering) + return _internal_disable_functional_ops_lowering(); +} +inline void ConfigProto_Experimental::_internal_set_disable_functional_ops_lowering(bool value) { + + _impl_.disable_functional_ops_lowering_ = value; +} +inline void ConfigProto_Experimental::set_disable_functional_ops_lowering(bool value) { + _internal_set_disable_functional_ops_lowering(value); + // @@protoc_insertion_point(field_set:tensorflow.ConfigProto.Experimental.disable_functional_ops_lowering) +} + +// bool xla_prefer_single_graph_cluster = 22; +inline void ConfigProto_Experimental::clear_xla_prefer_single_graph_cluster() { + _impl_.xla_prefer_single_graph_cluster_ = false; +} +inline bool ConfigProto_Experimental::_internal_xla_prefer_single_graph_cluster() const { + return _impl_.xla_prefer_single_graph_cluster_; +} +inline bool ConfigProto_Experimental::xla_prefer_single_graph_cluster() const { + // @@protoc_insertion_point(field_get:tensorflow.ConfigProto.Experimental.xla_prefer_single_graph_cluster) + return _internal_xla_prefer_single_graph_cluster(); +} +inline void ConfigProto_Experimental::_internal_set_xla_prefer_single_graph_cluster(bool value) { + + _impl_.xla_prefer_single_graph_cluster_ = value; +} +inline void ConfigProto_Experimental::set_xla_prefer_single_graph_cluster(bool value) { + _internal_set_xla_prefer_single_graph_cluster(value); + // @@protoc_insertion_point(field_set:tensorflow.ConfigProto.Experimental.xla_prefer_single_graph_cluster) +} + +// .tensorflow.CoordinationServiceConfig coordination_config = 23; +inline bool ConfigProto_Experimental::_internal_has_coordination_config() const { + return this != internal_default_instance() && _impl_.coordination_config_ != nullptr; +} +inline bool ConfigProto_Experimental::has_coordination_config() const { + return _internal_has_coordination_config(); +} +inline const ::tensorflow::CoordinationServiceConfig& ConfigProto_Experimental::_internal_coordination_config() const { + const ::tensorflow::CoordinationServiceConfig* p = _impl_.coordination_config_; + return p != nullptr ? *p : reinterpret_cast( + ::tensorflow::_CoordinationServiceConfig_default_instance_); +} +inline const ::tensorflow::CoordinationServiceConfig& ConfigProto_Experimental::coordination_config() const { + // @@protoc_insertion_point(field_get:tensorflow.ConfigProto.Experimental.coordination_config) + return _internal_coordination_config(); +} +inline void ConfigProto_Experimental::unsafe_arena_set_allocated_coordination_config( + ::tensorflow::CoordinationServiceConfig* coordination_config) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.coordination_config_); + } + _impl_.coordination_config_ = coordination_config; + if (coordination_config) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.ConfigProto.Experimental.coordination_config) +} +inline ::tensorflow::CoordinationServiceConfig* ConfigProto_Experimental::release_coordination_config() { + + ::tensorflow::CoordinationServiceConfig* temp = _impl_.coordination_config_; + _impl_.coordination_config_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tensorflow::CoordinationServiceConfig* ConfigProto_Experimental::unsafe_arena_release_coordination_config() { + // @@protoc_insertion_point(field_release:tensorflow.ConfigProto.Experimental.coordination_config) + + ::tensorflow::CoordinationServiceConfig* temp = _impl_.coordination_config_; + _impl_.coordination_config_ = nullptr; + return temp; +} +inline ::tensorflow::CoordinationServiceConfig* ConfigProto_Experimental::_internal_mutable_coordination_config() { + + if (_impl_.coordination_config_ == nullptr) { + auto* p = CreateMaybeMessage<::tensorflow::CoordinationServiceConfig>(GetArenaForAllocation()); + _impl_.coordination_config_ = p; + } + return _impl_.coordination_config_; +} +inline ::tensorflow::CoordinationServiceConfig* ConfigProto_Experimental::mutable_coordination_config() { + ::tensorflow::CoordinationServiceConfig* _msg = _internal_mutable_coordination_config(); + // @@protoc_insertion_point(field_mutable:tensorflow.ConfigProto.Experimental.coordination_config) + return _msg; +} +inline void ConfigProto_Experimental::set_allocated_coordination_config(::tensorflow::CoordinationServiceConfig* coordination_config) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.coordination_config_); + } + if (coordination_config) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( + reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(coordination_config)); + if (message_arena != submessage_arena) { + coordination_config = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, coordination_config, submessage_arena); + } + + } else { + + } + _impl_.coordination_config_ = coordination_config; + // @@protoc_insertion_point(field_set_allocated:tensorflow.ConfigProto.Experimental.coordination_config) +} + +// bool disable_optimize_for_static_graph = 24; +inline void ConfigProto_Experimental::clear_disable_optimize_for_static_graph() { + _impl_.disable_optimize_for_static_graph_ = false; +} +inline bool ConfigProto_Experimental::_internal_disable_optimize_for_static_graph() const { + return _impl_.disable_optimize_for_static_graph_; +} +inline bool ConfigProto_Experimental::disable_optimize_for_static_graph() const { + // @@protoc_insertion_point(field_get:tensorflow.ConfigProto.Experimental.disable_optimize_for_static_graph) + return _internal_disable_optimize_for_static_graph(); +} +inline void ConfigProto_Experimental::_internal_set_disable_optimize_for_static_graph(bool value) { + + _impl_.disable_optimize_for_static_graph_ = value; +} +inline void ConfigProto_Experimental::set_disable_optimize_for_static_graph(bool value) { + _internal_set_disable_optimize_for_static_graph(value); + // @@protoc_insertion_point(field_set:tensorflow.ConfigProto.Experimental.disable_optimize_for_static_graph) +} + +// bool disable_eager_executor_streaming_enqueue = 26; +inline void ConfigProto_Experimental::clear_disable_eager_executor_streaming_enqueue() { + _impl_.disable_eager_executor_streaming_enqueue_ = false; +} +inline bool ConfigProto_Experimental::_internal_disable_eager_executor_streaming_enqueue() const { + return _impl_.disable_eager_executor_streaming_enqueue_; +} +inline bool ConfigProto_Experimental::disable_eager_executor_streaming_enqueue() const { + // @@protoc_insertion_point(field_get:tensorflow.ConfigProto.Experimental.disable_eager_executor_streaming_enqueue) + return _internal_disable_eager_executor_streaming_enqueue(); +} +inline void ConfigProto_Experimental::_internal_set_disable_eager_executor_streaming_enqueue(bool value) { + + _impl_.disable_eager_executor_streaming_enqueue_ = value; +} +inline void ConfigProto_Experimental::set_disable_eager_executor_streaming_enqueue(bool value) { + _internal_set_disable_eager_executor_streaming_enqueue(value); + // @@protoc_insertion_point(field_set:tensorflow.ConfigProto.Experimental.disable_eager_executor_streaming_enqueue) +} + +// ------------------------------------------------------------------- + +// ConfigProto + +// map device_count = 1; +inline int ConfigProto::_internal_device_count_size() const { + return _impl_.device_count_.size(); +} +inline int ConfigProto::device_count_size() const { + return _internal_device_count_size(); +} +inline void ConfigProto::clear_device_count() { + _impl_.device_count_.Clear(); +} +inline const ::PROTOBUF_NAMESPACE_ID::Map< std::string, int32_t >& +ConfigProto::_internal_device_count() const { + return _impl_.device_count_.GetMap(); +} +inline const ::PROTOBUF_NAMESPACE_ID::Map< std::string, int32_t >& +ConfigProto::device_count() const { + // @@protoc_insertion_point(field_map:tensorflow.ConfigProto.device_count) + return _internal_device_count(); +} +inline ::PROTOBUF_NAMESPACE_ID::Map< std::string, int32_t >* +ConfigProto::_internal_mutable_device_count() { + return _impl_.device_count_.MutableMap(); +} +inline ::PROTOBUF_NAMESPACE_ID::Map< std::string, int32_t >* +ConfigProto::mutable_device_count() { + // @@protoc_insertion_point(field_mutable_map:tensorflow.ConfigProto.device_count) + return _internal_mutable_device_count(); +} + +// int32 intra_op_parallelism_threads = 2; +inline void ConfigProto::clear_intra_op_parallelism_threads() { + _impl_.intra_op_parallelism_threads_ = 0; +} +inline int32_t ConfigProto::_internal_intra_op_parallelism_threads() const { + return _impl_.intra_op_parallelism_threads_; +} +inline int32_t ConfigProto::intra_op_parallelism_threads() const { + // @@protoc_insertion_point(field_get:tensorflow.ConfigProto.intra_op_parallelism_threads) + return _internal_intra_op_parallelism_threads(); +} +inline void ConfigProto::_internal_set_intra_op_parallelism_threads(int32_t value) { + + _impl_.intra_op_parallelism_threads_ = value; +} +inline void ConfigProto::set_intra_op_parallelism_threads(int32_t value) { + _internal_set_intra_op_parallelism_threads(value); + // @@protoc_insertion_point(field_set:tensorflow.ConfigProto.intra_op_parallelism_threads) +} + +// int32 inter_op_parallelism_threads = 5; +inline void ConfigProto::clear_inter_op_parallelism_threads() { + _impl_.inter_op_parallelism_threads_ = 0; +} +inline int32_t ConfigProto::_internal_inter_op_parallelism_threads() const { + return _impl_.inter_op_parallelism_threads_; +} +inline int32_t ConfigProto::inter_op_parallelism_threads() const { + // @@protoc_insertion_point(field_get:tensorflow.ConfigProto.inter_op_parallelism_threads) + return _internal_inter_op_parallelism_threads(); +} +inline void ConfigProto::_internal_set_inter_op_parallelism_threads(int32_t value) { + + _impl_.inter_op_parallelism_threads_ = value; +} +inline void ConfigProto::set_inter_op_parallelism_threads(int32_t value) { + _internal_set_inter_op_parallelism_threads(value); + // @@protoc_insertion_point(field_set:tensorflow.ConfigProto.inter_op_parallelism_threads) +} + +// bool use_per_session_threads = 9; +inline void ConfigProto::clear_use_per_session_threads() { + _impl_.use_per_session_threads_ = false; +} +inline bool ConfigProto::_internal_use_per_session_threads() const { + return _impl_.use_per_session_threads_; +} +inline bool ConfigProto::use_per_session_threads() const { + // @@protoc_insertion_point(field_get:tensorflow.ConfigProto.use_per_session_threads) + return _internal_use_per_session_threads(); +} +inline void ConfigProto::_internal_set_use_per_session_threads(bool value) { + + _impl_.use_per_session_threads_ = value; +} +inline void ConfigProto::set_use_per_session_threads(bool value) { + _internal_set_use_per_session_threads(value); + // @@protoc_insertion_point(field_set:tensorflow.ConfigProto.use_per_session_threads) +} + +// repeated .tensorflow.ThreadPoolOptionProto session_inter_op_thread_pool = 12; +inline int ConfigProto::_internal_session_inter_op_thread_pool_size() const { + return _impl_.session_inter_op_thread_pool_.size(); +} +inline int ConfigProto::session_inter_op_thread_pool_size() const { + return _internal_session_inter_op_thread_pool_size(); +} +inline void ConfigProto::clear_session_inter_op_thread_pool() { + _impl_.session_inter_op_thread_pool_.Clear(); +} +inline ::tensorflow::ThreadPoolOptionProto* ConfigProto::mutable_session_inter_op_thread_pool(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.ConfigProto.session_inter_op_thread_pool) + return _impl_.session_inter_op_thread_pool_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::ThreadPoolOptionProto >* +ConfigProto::mutable_session_inter_op_thread_pool() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.ConfigProto.session_inter_op_thread_pool) + return &_impl_.session_inter_op_thread_pool_; +} +inline const ::tensorflow::ThreadPoolOptionProto& ConfigProto::_internal_session_inter_op_thread_pool(int index) const { + return _impl_.session_inter_op_thread_pool_.Get(index); +} +inline const ::tensorflow::ThreadPoolOptionProto& ConfigProto::session_inter_op_thread_pool(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.ConfigProto.session_inter_op_thread_pool) + return _internal_session_inter_op_thread_pool(index); +} +inline ::tensorflow::ThreadPoolOptionProto* ConfigProto::_internal_add_session_inter_op_thread_pool() { + return _impl_.session_inter_op_thread_pool_.Add(); +} +inline ::tensorflow::ThreadPoolOptionProto* ConfigProto::add_session_inter_op_thread_pool() { + ::tensorflow::ThreadPoolOptionProto* _add = _internal_add_session_inter_op_thread_pool(); + // @@protoc_insertion_point(field_add:tensorflow.ConfigProto.session_inter_op_thread_pool) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::ThreadPoolOptionProto >& +ConfigProto::session_inter_op_thread_pool() const { + // @@protoc_insertion_point(field_list:tensorflow.ConfigProto.session_inter_op_thread_pool) + return _impl_.session_inter_op_thread_pool_; +} + +// int32 placement_period = 3; +inline void ConfigProto::clear_placement_period() { + _impl_.placement_period_ = 0; +} +inline int32_t ConfigProto::_internal_placement_period() const { + return _impl_.placement_period_; +} +inline int32_t ConfigProto::placement_period() const { + // @@protoc_insertion_point(field_get:tensorflow.ConfigProto.placement_period) + return _internal_placement_period(); +} +inline void ConfigProto::_internal_set_placement_period(int32_t value) { + + _impl_.placement_period_ = value; +} +inline void ConfigProto::set_placement_period(int32_t value) { + _internal_set_placement_period(value); + // @@protoc_insertion_point(field_set:tensorflow.ConfigProto.placement_period) +} + +// repeated string device_filters = 4; +inline int ConfigProto::_internal_device_filters_size() const { + return _impl_.device_filters_.size(); +} +inline int ConfigProto::device_filters_size() const { + return _internal_device_filters_size(); +} +inline void ConfigProto::clear_device_filters() { + _impl_.device_filters_.Clear(); +} +inline std::string* ConfigProto::add_device_filters() { + std::string* _s = _internal_add_device_filters(); + // @@protoc_insertion_point(field_add_mutable:tensorflow.ConfigProto.device_filters) + return _s; +} +inline const std::string& ConfigProto::_internal_device_filters(int index) const { + return _impl_.device_filters_.Get(index); +} +inline const std::string& ConfigProto::device_filters(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.ConfigProto.device_filters) + return _internal_device_filters(index); +} +inline std::string* ConfigProto::mutable_device_filters(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.ConfigProto.device_filters) + return _impl_.device_filters_.Mutable(index); +} +inline void ConfigProto::set_device_filters(int index, const std::string& value) { + _impl_.device_filters_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set:tensorflow.ConfigProto.device_filters) +} +inline void ConfigProto::set_device_filters(int index, std::string&& value) { + _impl_.device_filters_.Mutable(index)->assign(std::move(value)); + // @@protoc_insertion_point(field_set:tensorflow.ConfigProto.device_filters) +} +inline void ConfigProto::set_device_filters(int index, const char* value) { + GOOGLE_DCHECK(value != nullptr); + _impl_.device_filters_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set_char:tensorflow.ConfigProto.device_filters) +} +inline void ConfigProto::set_device_filters(int index, const char* value, size_t size) { + _impl_.device_filters_.Mutable(index)->assign( + reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:tensorflow.ConfigProto.device_filters) +} +inline std::string* ConfigProto::_internal_add_device_filters() { + return _impl_.device_filters_.Add(); +} +inline void ConfigProto::add_device_filters(const std::string& value) { + _impl_.device_filters_.Add()->assign(value); + // @@protoc_insertion_point(field_add:tensorflow.ConfigProto.device_filters) +} +inline void ConfigProto::add_device_filters(std::string&& value) { + _impl_.device_filters_.Add(std::move(value)); + // @@protoc_insertion_point(field_add:tensorflow.ConfigProto.device_filters) +} +inline void ConfigProto::add_device_filters(const char* value) { + GOOGLE_DCHECK(value != nullptr); + _impl_.device_filters_.Add()->assign(value); + // @@protoc_insertion_point(field_add_char:tensorflow.ConfigProto.device_filters) +} +inline void ConfigProto::add_device_filters(const char* value, size_t size) { + _impl_.device_filters_.Add()->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_add_pointer:tensorflow.ConfigProto.device_filters) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& +ConfigProto::device_filters() const { + // @@protoc_insertion_point(field_list:tensorflow.ConfigProto.device_filters) + return _impl_.device_filters_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* +ConfigProto::mutable_device_filters() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.ConfigProto.device_filters) + return &_impl_.device_filters_; +} + +// .tensorflow.GPUOptions gpu_options = 6; +inline bool ConfigProto::_internal_has_gpu_options() const { + return this != internal_default_instance() && _impl_.gpu_options_ != nullptr; +} +inline bool ConfigProto::has_gpu_options() const { + return _internal_has_gpu_options(); +} +inline void ConfigProto::clear_gpu_options() { + if (GetArenaForAllocation() == nullptr && _impl_.gpu_options_ != nullptr) { + delete _impl_.gpu_options_; + } + _impl_.gpu_options_ = nullptr; +} +inline const ::tensorflow::GPUOptions& ConfigProto::_internal_gpu_options() const { + const ::tensorflow::GPUOptions* p = _impl_.gpu_options_; + return p != nullptr ? *p : reinterpret_cast( + ::tensorflow::_GPUOptions_default_instance_); +} +inline const ::tensorflow::GPUOptions& ConfigProto::gpu_options() const { + // @@protoc_insertion_point(field_get:tensorflow.ConfigProto.gpu_options) + return _internal_gpu_options(); +} +inline void ConfigProto::unsafe_arena_set_allocated_gpu_options( + ::tensorflow::GPUOptions* gpu_options) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.gpu_options_); + } + _impl_.gpu_options_ = gpu_options; + if (gpu_options) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.ConfigProto.gpu_options) +} +inline ::tensorflow::GPUOptions* ConfigProto::release_gpu_options() { + + ::tensorflow::GPUOptions* temp = _impl_.gpu_options_; + _impl_.gpu_options_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tensorflow::GPUOptions* ConfigProto::unsafe_arena_release_gpu_options() { + // @@protoc_insertion_point(field_release:tensorflow.ConfigProto.gpu_options) + + ::tensorflow::GPUOptions* temp = _impl_.gpu_options_; + _impl_.gpu_options_ = nullptr; + return temp; +} +inline ::tensorflow::GPUOptions* ConfigProto::_internal_mutable_gpu_options() { + + if (_impl_.gpu_options_ == nullptr) { + auto* p = CreateMaybeMessage<::tensorflow::GPUOptions>(GetArenaForAllocation()); + _impl_.gpu_options_ = p; + } + return _impl_.gpu_options_; +} +inline ::tensorflow::GPUOptions* ConfigProto::mutable_gpu_options() { + ::tensorflow::GPUOptions* _msg = _internal_mutable_gpu_options(); + // @@protoc_insertion_point(field_mutable:tensorflow.ConfigProto.gpu_options) + return _msg; +} +inline void ConfigProto::set_allocated_gpu_options(::tensorflow::GPUOptions* gpu_options) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete _impl_.gpu_options_; + } + if (gpu_options) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(gpu_options); + if (message_arena != submessage_arena) { + gpu_options = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, gpu_options, submessage_arena); + } + + } else { + + } + _impl_.gpu_options_ = gpu_options; + // @@protoc_insertion_point(field_set_allocated:tensorflow.ConfigProto.gpu_options) +} + +// bool allow_soft_placement = 7; +inline void ConfigProto::clear_allow_soft_placement() { + _impl_.allow_soft_placement_ = false; +} +inline bool ConfigProto::_internal_allow_soft_placement() const { + return _impl_.allow_soft_placement_; +} +inline bool ConfigProto::allow_soft_placement() const { + // @@protoc_insertion_point(field_get:tensorflow.ConfigProto.allow_soft_placement) + return _internal_allow_soft_placement(); +} +inline void ConfigProto::_internal_set_allow_soft_placement(bool value) { + + _impl_.allow_soft_placement_ = value; +} +inline void ConfigProto::set_allow_soft_placement(bool value) { + _internal_set_allow_soft_placement(value); + // @@protoc_insertion_point(field_set:tensorflow.ConfigProto.allow_soft_placement) +} + +// bool log_device_placement = 8; +inline void ConfigProto::clear_log_device_placement() { + _impl_.log_device_placement_ = false; +} +inline bool ConfigProto::_internal_log_device_placement() const { + return _impl_.log_device_placement_; +} +inline bool ConfigProto::log_device_placement() const { + // @@protoc_insertion_point(field_get:tensorflow.ConfigProto.log_device_placement) + return _internal_log_device_placement(); +} +inline void ConfigProto::_internal_set_log_device_placement(bool value) { + + _impl_.log_device_placement_ = value; +} +inline void ConfigProto::set_log_device_placement(bool value) { + _internal_set_log_device_placement(value); + // @@protoc_insertion_point(field_set:tensorflow.ConfigProto.log_device_placement) +} + +// .tensorflow.GraphOptions graph_options = 10; +inline bool ConfigProto::_internal_has_graph_options() const { + return this != internal_default_instance() && _impl_.graph_options_ != nullptr; +} +inline bool ConfigProto::has_graph_options() const { + return _internal_has_graph_options(); +} +inline void ConfigProto::clear_graph_options() { + if (GetArenaForAllocation() == nullptr && _impl_.graph_options_ != nullptr) { + delete _impl_.graph_options_; + } + _impl_.graph_options_ = nullptr; +} +inline const ::tensorflow::GraphOptions& ConfigProto::_internal_graph_options() const { + const ::tensorflow::GraphOptions* p = _impl_.graph_options_; + return p != nullptr ? *p : reinterpret_cast( + ::tensorflow::_GraphOptions_default_instance_); +} +inline const ::tensorflow::GraphOptions& ConfigProto::graph_options() const { + // @@protoc_insertion_point(field_get:tensorflow.ConfigProto.graph_options) + return _internal_graph_options(); +} +inline void ConfigProto::unsafe_arena_set_allocated_graph_options( + ::tensorflow::GraphOptions* graph_options) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.graph_options_); + } + _impl_.graph_options_ = graph_options; + if (graph_options) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.ConfigProto.graph_options) +} +inline ::tensorflow::GraphOptions* ConfigProto::release_graph_options() { + + ::tensorflow::GraphOptions* temp = _impl_.graph_options_; + _impl_.graph_options_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tensorflow::GraphOptions* ConfigProto::unsafe_arena_release_graph_options() { + // @@protoc_insertion_point(field_release:tensorflow.ConfigProto.graph_options) + + ::tensorflow::GraphOptions* temp = _impl_.graph_options_; + _impl_.graph_options_ = nullptr; + return temp; +} +inline ::tensorflow::GraphOptions* ConfigProto::_internal_mutable_graph_options() { + + if (_impl_.graph_options_ == nullptr) { + auto* p = CreateMaybeMessage<::tensorflow::GraphOptions>(GetArenaForAllocation()); + _impl_.graph_options_ = p; + } + return _impl_.graph_options_; +} +inline ::tensorflow::GraphOptions* ConfigProto::mutable_graph_options() { + ::tensorflow::GraphOptions* _msg = _internal_mutable_graph_options(); + // @@protoc_insertion_point(field_mutable:tensorflow.ConfigProto.graph_options) + return _msg; +} +inline void ConfigProto::set_allocated_graph_options(::tensorflow::GraphOptions* graph_options) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete _impl_.graph_options_; + } + if (graph_options) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(graph_options); + if (message_arena != submessage_arena) { + graph_options = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, graph_options, submessage_arena); + } + + } else { + + } + _impl_.graph_options_ = graph_options; + // @@protoc_insertion_point(field_set_allocated:tensorflow.ConfigProto.graph_options) +} + +// int64 operation_timeout_in_ms = 11; +inline void ConfigProto::clear_operation_timeout_in_ms() { + _impl_.operation_timeout_in_ms_ = int64_t{0}; +} +inline int64_t ConfigProto::_internal_operation_timeout_in_ms() const { + return _impl_.operation_timeout_in_ms_; +} +inline int64_t ConfigProto::operation_timeout_in_ms() const { + // @@protoc_insertion_point(field_get:tensorflow.ConfigProto.operation_timeout_in_ms) + return _internal_operation_timeout_in_ms(); +} +inline void ConfigProto::_internal_set_operation_timeout_in_ms(int64_t value) { + + _impl_.operation_timeout_in_ms_ = value; +} +inline void ConfigProto::set_operation_timeout_in_ms(int64_t value) { + _internal_set_operation_timeout_in_ms(value); + // @@protoc_insertion_point(field_set:tensorflow.ConfigProto.operation_timeout_in_ms) +} + +// .tensorflow.RPCOptions rpc_options = 13; +inline bool ConfigProto::_internal_has_rpc_options() const { + return this != internal_default_instance() && _impl_.rpc_options_ != nullptr; +} +inline bool ConfigProto::has_rpc_options() const { + return _internal_has_rpc_options(); +} +inline const ::tensorflow::RPCOptions& ConfigProto::_internal_rpc_options() const { + const ::tensorflow::RPCOptions* p = _impl_.rpc_options_; + return p != nullptr ? *p : reinterpret_cast( + ::tensorflow::_RPCOptions_default_instance_); +} +inline const ::tensorflow::RPCOptions& ConfigProto::rpc_options() const { + // @@protoc_insertion_point(field_get:tensorflow.ConfigProto.rpc_options) + return _internal_rpc_options(); +} +inline void ConfigProto::unsafe_arena_set_allocated_rpc_options( + ::tensorflow::RPCOptions* rpc_options) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.rpc_options_); + } + _impl_.rpc_options_ = rpc_options; + if (rpc_options) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.ConfigProto.rpc_options) +} +inline ::tensorflow::RPCOptions* ConfigProto::release_rpc_options() { + + ::tensorflow::RPCOptions* temp = _impl_.rpc_options_; + _impl_.rpc_options_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tensorflow::RPCOptions* ConfigProto::unsafe_arena_release_rpc_options() { + // @@protoc_insertion_point(field_release:tensorflow.ConfigProto.rpc_options) + + ::tensorflow::RPCOptions* temp = _impl_.rpc_options_; + _impl_.rpc_options_ = nullptr; + return temp; +} +inline ::tensorflow::RPCOptions* ConfigProto::_internal_mutable_rpc_options() { + + if (_impl_.rpc_options_ == nullptr) { + auto* p = CreateMaybeMessage<::tensorflow::RPCOptions>(GetArenaForAllocation()); + _impl_.rpc_options_ = p; + } + return _impl_.rpc_options_; +} +inline ::tensorflow::RPCOptions* ConfigProto::mutable_rpc_options() { + ::tensorflow::RPCOptions* _msg = _internal_mutable_rpc_options(); + // @@protoc_insertion_point(field_mutable:tensorflow.ConfigProto.rpc_options) + return _msg; +} +inline void ConfigProto::set_allocated_rpc_options(::tensorflow::RPCOptions* rpc_options) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.rpc_options_); + } + if (rpc_options) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( + reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(rpc_options)); + if (message_arena != submessage_arena) { + rpc_options = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, rpc_options, submessage_arena); + } + + } else { + + } + _impl_.rpc_options_ = rpc_options; + // @@protoc_insertion_point(field_set_allocated:tensorflow.ConfigProto.rpc_options) +} + +// .tensorflow.ClusterDef cluster_def = 14; +inline bool ConfigProto::_internal_has_cluster_def() const { + return this != internal_default_instance() && _impl_.cluster_def_ != nullptr; +} +inline bool ConfigProto::has_cluster_def() const { + return _internal_has_cluster_def(); +} +inline const ::tensorflow::ClusterDef& ConfigProto::_internal_cluster_def() const { + const ::tensorflow::ClusterDef* p = _impl_.cluster_def_; + return p != nullptr ? *p : reinterpret_cast( + ::tensorflow::_ClusterDef_default_instance_); +} +inline const ::tensorflow::ClusterDef& ConfigProto::cluster_def() const { + // @@protoc_insertion_point(field_get:tensorflow.ConfigProto.cluster_def) + return _internal_cluster_def(); +} +inline void ConfigProto::unsafe_arena_set_allocated_cluster_def( + ::tensorflow::ClusterDef* cluster_def) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.cluster_def_); + } + _impl_.cluster_def_ = cluster_def; + if (cluster_def) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.ConfigProto.cluster_def) +} +inline ::tensorflow::ClusterDef* ConfigProto::release_cluster_def() { + + ::tensorflow::ClusterDef* temp = _impl_.cluster_def_; + _impl_.cluster_def_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tensorflow::ClusterDef* ConfigProto::unsafe_arena_release_cluster_def() { + // @@protoc_insertion_point(field_release:tensorflow.ConfigProto.cluster_def) + + ::tensorflow::ClusterDef* temp = _impl_.cluster_def_; + _impl_.cluster_def_ = nullptr; + return temp; +} +inline ::tensorflow::ClusterDef* ConfigProto::_internal_mutable_cluster_def() { + + if (_impl_.cluster_def_ == nullptr) { + auto* p = CreateMaybeMessage<::tensorflow::ClusterDef>(GetArenaForAllocation()); + _impl_.cluster_def_ = p; + } + return _impl_.cluster_def_; +} +inline ::tensorflow::ClusterDef* ConfigProto::mutable_cluster_def() { + ::tensorflow::ClusterDef* _msg = _internal_mutable_cluster_def(); + // @@protoc_insertion_point(field_mutable:tensorflow.ConfigProto.cluster_def) + return _msg; +} +inline void ConfigProto::set_allocated_cluster_def(::tensorflow::ClusterDef* cluster_def) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.cluster_def_); + } + if (cluster_def) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( + reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(cluster_def)); + if (message_arena != submessage_arena) { + cluster_def = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, cluster_def, submessage_arena); + } + + } else { + + } + _impl_.cluster_def_ = cluster_def; + // @@protoc_insertion_point(field_set_allocated:tensorflow.ConfigProto.cluster_def) +} + +// bool isolate_session_state = 15; +inline void ConfigProto::clear_isolate_session_state() { + _impl_.isolate_session_state_ = false; +} +inline bool ConfigProto::_internal_isolate_session_state() const { + return _impl_.isolate_session_state_; +} +inline bool ConfigProto::isolate_session_state() const { + // @@protoc_insertion_point(field_get:tensorflow.ConfigProto.isolate_session_state) + return _internal_isolate_session_state(); +} +inline void ConfigProto::_internal_set_isolate_session_state(bool value) { + + _impl_.isolate_session_state_ = value; +} +inline void ConfigProto::set_isolate_session_state(bool value) { + _internal_set_isolate_session_state(value); + // @@protoc_insertion_point(field_set:tensorflow.ConfigProto.isolate_session_state) +} + +// bool share_cluster_devices_in_session = 17; +inline void ConfigProto::clear_share_cluster_devices_in_session() { + _impl_.share_cluster_devices_in_session_ = false; +} +inline bool ConfigProto::_internal_share_cluster_devices_in_session() const { + return _impl_.share_cluster_devices_in_session_; +} +inline bool ConfigProto::share_cluster_devices_in_session() const { + // @@protoc_insertion_point(field_get:tensorflow.ConfigProto.share_cluster_devices_in_session) + return _internal_share_cluster_devices_in_session(); +} +inline void ConfigProto::_internal_set_share_cluster_devices_in_session(bool value) { + + _impl_.share_cluster_devices_in_session_ = value; +} +inline void ConfigProto::set_share_cluster_devices_in_session(bool value) { + _internal_set_share_cluster_devices_in_session(value); + // @@protoc_insertion_point(field_set:tensorflow.ConfigProto.share_cluster_devices_in_session) +} + +// .tensorflow.ConfigProto.Experimental experimental = 16; +inline bool ConfigProto::_internal_has_experimental() const { + return this != internal_default_instance() && _impl_.experimental_ != nullptr; +} +inline bool ConfigProto::has_experimental() const { + return _internal_has_experimental(); +} +inline void ConfigProto::clear_experimental() { + if (GetArenaForAllocation() == nullptr && _impl_.experimental_ != nullptr) { + delete _impl_.experimental_; + } + _impl_.experimental_ = nullptr; +} +inline const ::tensorflow::ConfigProto_Experimental& ConfigProto::_internal_experimental() const { + const ::tensorflow::ConfigProto_Experimental* p = _impl_.experimental_; + return p != nullptr ? *p : reinterpret_cast( + ::tensorflow::_ConfigProto_Experimental_default_instance_); +} +inline const ::tensorflow::ConfigProto_Experimental& ConfigProto::experimental() const { + // @@protoc_insertion_point(field_get:tensorflow.ConfigProto.experimental) + return _internal_experimental(); +} +inline void ConfigProto::unsafe_arena_set_allocated_experimental( + ::tensorflow::ConfigProto_Experimental* experimental) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.experimental_); + } + _impl_.experimental_ = experimental; + if (experimental) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.ConfigProto.experimental) +} +inline ::tensorflow::ConfigProto_Experimental* ConfigProto::release_experimental() { + + ::tensorflow::ConfigProto_Experimental* temp = _impl_.experimental_; + _impl_.experimental_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tensorflow::ConfigProto_Experimental* ConfigProto::unsafe_arena_release_experimental() { + // @@protoc_insertion_point(field_release:tensorflow.ConfigProto.experimental) + + ::tensorflow::ConfigProto_Experimental* temp = _impl_.experimental_; + _impl_.experimental_ = nullptr; + return temp; +} +inline ::tensorflow::ConfigProto_Experimental* ConfigProto::_internal_mutable_experimental() { + + if (_impl_.experimental_ == nullptr) { + auto* p = CreateMaybeMessage<::tensorflow::ConfigProto_Experimental>(GetArenaForAllocation()); + _impl_.experimental_ = p; + } + return _impl_.experimental_; +} +inline ::tensorflow::ConfigProto_Experimental* ConfigProto::mutable_experimental() { + ::tensorflow::ConfigProto_Experimental* _msg = _internal_mutable_experimental(); + // @@protoc_insertion_point(field_mutable:tensorflow.ConfigProto.experimental) + return _msg; +} +inline void ConfigProto::set_allocated_experimental(::tensorflow::ConfigProto_Experimental* experimental) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete _impl_.experimental_; + } + if (experimental) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(experimental); + if (message_arena != submessage_arena) { + experimental = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, experimental, submessage_arena); + } + + } else { + + } + _impl_.experimental_ = experimental; + // @@protoc_insertion_point(field_set_allocated:tensorflow.ConfigProto.experimental) +} + +// ------------------------------------------------------------------- + +// RunOptions_Experimental_RunHandlerPoolOptions + +// int64 priority = 1; +inline void RunOptions_Experimental_RunHandlerPoolOptions::clear_priority() { + _impl_.priority_ = int64_t{0}; +} +inline int64_t RunOptions_Experimental_RunHandlerPoolOptions::_internal_priority() const { + return _impl_.priority_; +} +inline int64_t RunOptions_Experimental_RunHandlerPoolOptions::priority() const { + // @@protoc_insertion_point(field_get:tensorflow.RunOptions.Experimental.RunHandlerPoolOptions.priority) + return _internal_priority(); +} +inline void RunOptions_Experimental_RunHandlerPoolOptions::_internal_set_priority(int64_t value) { + + _impl_.priority_ = value; +} +inline void RunOptions_Experimental_RunHandlerPoolOptions::set_priority(int64_t value) { + _internal_set_priority(value); + // @@protoc_insertion_point(field_set:tensorflow.RunOptions.Experimental.RunHandlerPoolOptions.priority) +} + +// ------------------------------------------------------------------- + +// RunOptions_Experimental + +// int64 collective_graph_key = 1; +inline void RunOptions_Experimental::clear_collective_graph_key() { + _impl_.collective_graph_key_ = int64_t{0}; +} +inline int64_t RunOptions_Experimental::_internal_collective_graph_key() const { + return _impl_.collective_graph_key_; +} +inline int64_t RunOptions_Experimental::collective_graph_key() const { + // @@protoc_insertion_point(field_get:tensorflow.RunOptions.Experimental.collective_graph_key) + return _internal_collective_graph_key(); +} +inline void RunOptions_Experimental::_internal_set_collective_graph_key(int64_t value) { + + _impl_.collective_graph_key_ = value; +} +inline void RunOptions_Experimental::set_collective_graph_key(int64_t value) { + _internal_set_collective_graph_key(value); + // @@protoc_insertion_point(field_set:tensorflow.RunOptions.Experimental.collective_graph_key) +} + +// bool use_run_handler_pool = 2; +inline void RunOptions_Experimental::clear_use_run_handler_pool() { + _impl_.use_run_handler_pool_ = false; +} +inline bool RunOptions_Experimental::_internal_use_run_handler_pool() const { + return _impl_.use_run_handler_pool_; +} +inline bool RunOptions_Experimental::use_run_handler_pool() const { + // @@protoc_insertion_point(field_get:tensorflow.RunOptions.Experimental.use_run_handler_pool) + return _internal_use_run_handler_pool(); +} +inline void RunOptions_Experimental::_internal_set_use_run_handler_pool(bool value) { + + _impl_.use_run_handler_pool_ = value; +} +inline void RunOptions_Experimental::set_use_run_handler_pool(bool value) { + _internal_set_use_run_handler_pool(value); + // @@protoc_insertion_point(field_set:tensorflow.RunOptions.Experimental.use_run_handler_pool) +} + +// .tensorflow.RunOptions.Experimental.RunHandlerPoolOptions run_handler_pool_options = 3; +inline bool RunOptions_Experimental::_internal_has_run_handler_pool_options() const { + return this != internal_default_instance() && _impl_.run_handler_pool_options_ != nullptr; +} +inline bool RunOptions_Experimental::has_run_handler_pool_options() const { + return _internal_has_run_handler_pool_options(); +} +inline void RunOptions_Experimental::clear_run_handler_pool_options() { + if (GetArenaForAllocation() == nullptr && _impl_.run_handler_pool_options_ != nullptr) { + delete _impl_.run_handler_pool_options_; + } + _impl_.run_handler_pool_options_ = nullptr; +} +inline const ::tensorflow::RunOptions_Experimental_RunHandlerPoolOptions& RunOptions_Experimental::_internal_run_handler_pool_options() const { + const ::tensorflow::RunOptions_Experimental_RunHandlerPoolOptions* p = _impl_.run_handler_pool_options_; + return p != nullptr ? *p : reinterpret_cast( + ::tensorflow::_RunOptions_Experimental_RunHandlerPoolOptions_default_instance_); +} +inline const ::tensorflow::RunOptions_Experimental_RunHandlerPoolOptions& RunOptions_Experimental::run_handler_pool_options() const { + // @@protoc_insertion_point(field_get:tensorflow.RunOptions.Experimental.run_handler_pool_options) + return _internal_run_handler_pool_options(); +} +inline void RunOptions_Experimental::unsafe_arena_set_allocated_run_handler_pool_options( + ::tensorflow::RunOptions_Experimental_RunHandlerPoolOptions* run_handler_pool_options) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.run_handler_pool_options_); + } + _impl_.run_handler_pool_options_ = run_handler_pool_options; + if (run_handler_pool_options) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.RunOptions.Experimental.run_handler_pool_options) +} +inline ::tensorflow::RunOptions_Experimental_RunHandlerPoolOptions* RunOptions_Experimental::release_run_handler_pool_options() { + + ::tensorflow::RunOptions_Experimental_RunHandlerPoolOptions* temp = _impl_.run_handler_pool_options_; + _impl_.run_handler_pool_options_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tensorflow::RunOptions_Experimental_RunHandlerPoolOptions* RunOptions_Experimental::unsafe_arena_release_run_handler_pool_options() { + // @@protoc_insertion_point(field_release:tensorflow.RunOptions.Experimental.run_handler_pool_options) + + ::tensorflow::RunOptions_Experimental_RunHandlerPoolOptions* temp = _impl_.run_handler_pool_options_; + _impl_.run_handler_pool_options_ = nullptr; + return temp; +} +inline ::tensorflow::RunOptions_Experimental_RunHandlerPoolOptions* RunOptions_Experimental::_internal_mutable_run_handler_pool_options() { + + if (_impl_.run_handler_pool_options_ == nullptr) { + auto* p = CreateMaybeMessage<::tensorflow::RunOptions_Experimental_RunHandlerPoolOptions>(GetArenaForAllocation()); + _impl_.run_handler_pool_options_ = p; + } + return _impl_.run_handler_pool_options_; +} +inline ::tensorflow::RunOptions_Experimental_RunHandlerPoolOptions* RunOptions_Experimental::mutable_run_handler_pool_options() { + ::tensorflow::RunOptions_Experimental_RunHandlerPoolOptions* _msg = _internal_mutable_run_handler_pool_options(); + // @@protoc_insertion_point(field_mutable:tensorflow.RunOptions.Experimental.run_handler_pool_options) + return _msg; +} +inline void RunOptions_Experimental::set_allocated_run_handler_pool_options(::tensorflow::RunOptions_Experimental_RunHandlerPoolOptions* run_handler_pool_options) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete _impl_.run_handler_pool_options_; + } + if (run_handler_pool_options) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(run_handler_pool_options); + if (message_arena != submessage_arena) { + run_handler_pool_options = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, run_handler_pool_options, submessage_arena); + } + + } else { + + } + _impl_.run_handler_pool_options_ = run_handler_pool_options; + // @@protoc_insertion_point(field_set_allocated:tensorflow.RunOptions.Experimental.run_handler_pool_options) +} + +// ------------------------------------------------------------------- + +// RunOptions + +// .tensorflow.RunOptions.TraceLevel trace_level = 1; +inline void RunOptions::clear_trace_level() { + _impl_.trace_level_ = 0; +} +inline ::tensorflow::RunOptions_TraceLevel RunOptions::_internal_trace_level() const { + return static_cast< ::tensorflow::RunOptions_TraceLevel >(_impl_.trace_level_); +} +inline ::tensorflow::RunOptions_TraceLevel RunOptions::trace_level() const { + // @@protoc_insertion_point(field_get:tensorflow.RunOptions.trace_level) + return _internal_trace_level(); +} +inline void RunOptions::_internal_set_trace_level(::tensorflow::RunOptions_TraceLevel value) { + + _impl_.trace_level_ = value; +} +inline void RunOptions::set_trace_level(::tensorflow::RunOptions_TraceLevel value) { + _internal_set_trace_level(value); + // @@protoc_insertion_point(field_set:tensorflow.RunOptions.trace_level) +} + +// int64 timeout_in_ms = 2; +inline void RunOptions::clear_timeout_in_ms() { + _impl_.timeout_in_ms_ = int64_t{0}; +} +inline int64_t RunOptions::_internal_timeout_in_ms() const { + return _impl_.timeout_in_ms_; +} +inline int64_t RunOptions::timeout_in_ms() const { + // @@protoc_insertion_point(field_get:tensorflow.RunOptions.timeout_in_ms) + return _internal_timeout_in_ms(); +} +inline void RunOptions::_internal_set_timeout_in_ms(int64_t value) { + + _impl_.timeout_in_ms_ = value; +} +inline void RunOptions::set_timeout_in_ms(int64_t value) { + _internal_set_timeout_in_ms(value); + // @@protoc_insertion_point(field_set:tensorflow.RunOptions.timeout_in_ms) +} + +// int32 inter_op_thread_pool = 3; +inline void RunOptions::clear_inter_op_thread_pool() { + _impl_.inter_op_thread_pool_ = 0; +} +inline int32_t RunOptions::_internal_inter_op_thread_pool() const { + return _impl_.inter_op_thread_pool_; +} +inline int32_t RunOptions::inter_op_thread_pool() const { + // @@protoc_insertion_point(field_get:tensorflow.RunOptions.inter_op_thread_pool) + return _internal_inter_op_thread_pool(); +} +inline void RunOptions::_internal_set_inter_op_thread_pool(int32_t value) { + + _impl_.inter_op_thread_pool_ = value; +} +inline void RunOptions::set_inter_op_thread_pool(int32_t value) { + _internal_set_inter_op_thread_pool(value); + // @@protoc_insertion_point(field_set:tensorflow.RunOptions.inter_op_thread_pool) +} + +// bool output_partition_graphs = 5; +inline void RunOptions::clear_output_partition_graphs() { + _impl_.output_partition_graphs_ = false; +} +inline bool RunOptions::_internal_output_partition_graphs() const { + return _impl_.output_partition_graphs_; +} +inline bool RunOptions::output_partition_graphs() const { + // @@protoc_insertion_point(field_get:tensorflow.RunOptions.output_partition_graphs) + return _internal_output_partition_graphs(); +} +inline void RunOptions::_internal_set_output_partition_graphs(bool value) { + + _impl_.output_partition_graphs_ = value; +} +inline void RunOptions::set_output_partition_graphs(bool value) { + _internal_set_output_partition_graphs(value); + // @@protoc_insertion_point(field_set:tensorflow.RunOptions.output_partition_graphs) +} + +// .tensorflow.DebugOptions debug_options = 6; +inline bool RunOptions::_internal_has_debug_options() const { + return this != internal_default_instance() && _impl_.debug_options_ != nullptr; +} +inline bool RunOptions::has_debug_options() const { + return _internal_has_debug_options(); +} +inline const ::tensorflow::DebugOptions& RunOptions::_internal_debug_options() const { + const ::tensorflow::DebugOptions* p = _impl_.debug_options_; + return p != nullptr ? *p : reinterpret_cast( + ::tensorflow::_DebugOptions_default_instance_); +} +inline const ::tensorflow::DebugOptions& RunOptions::debug_options() const { + // @@protoc_insertion_point(field_get:tensorflow.RunOptions.debug_options) + return _internal_debug_options(); +} +inline void RunOptions::unsafe_arena_set_allocated_debug_options( + ::tensorflow::DebugOptions* debug_options) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.debug_options_); + } + _impl_.debug_options_ = debug_options; + if (debug_options) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.RunOptions.debug_options) +} +inline ::tensorflow::DebugOptions* RunOptions::release_debug_options() { + + ::tensorflow::DebugOptions* temp = _impl_.debug_options_; + _impl_.debug_options_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tensorflow::DebugOptions* RunOptions::unsafe_arena_release_debug_options() { + // @@protoc_insertion_point(field_release:tensorflow.RunOptions.debug_options) + + ::tensorflow::DebugOptions* temp = _impl_.debug_options_; + _impl_.debug_options_ = nullptr; + return temp; +} +inline ::tensorflow::DebugOptions* RunOptions::_internal_mutable_debug_options() { + + if (_impl_.debug_options_ == nullptr) { + auto* p = CreateMaybeMessage<::tensorflow::DebugOptions>(GetArenaForAllocation()); + _impl_.debug_options_ = p; + } + return _impl_.debug_options_; +} +inline ::tensorflow::DebugOptions* RunOptions::mutable_debug_options() { + ::tensorflow::DebugOptions* _msg = _internal_mutable_debug_options(); + // @@protoc_insertion_point(field_mutable:tensorflow.RunOptions.debug_options) + return _msg; +} +inline void RunOptions::set_allocated_debug_options(::tensorflow::DebugOptions* debug_options) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.debug_options_); + } + if (debug_options) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( + reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(debug_options)); + if (message_arena != submessage_arena) { + debug_options = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, debug_options, submessage_arena); + } + + } else { + + } + _impl_.debug_options_ = debug_options; + // @@protoc_insertion_point(field_set_allocated:tensorflow.RunOptions.debug_options) +} + +// bool report_tensor_allocations_upon_oom = 7; +inline void RunOptions::clear_report_tensor_allocations_upon_oom() { + _impl_.report_tensor_allocations_upon_oom_ = false; +} +inline bool RunOptions::_internal_report_tensor_allocations_upon_oom() const { + return _impl_.report_tensor_allocations_upon_oom_; +} +inline bool RunOptions::report_tensor_allocations_upon_oom() const { + // @@protoc_insertion_point(field_get:tensorflow.RunOptions.report_tensor_allocations_upon_oom) + return _internal_report_tensor_allocations_upon_oom(); +} +inline void RunOptions::_internal_set_report_tensor_allocations_upon_oom(bool value) { + + _impl_.report_tensor_allocations_upon_oom_ = value; +} +inline void RunOptions::set_report_tensor_allocations_upon_oom(bool value) { + _internal_set_report_tensor_allocations_upon_oom(value); + // @@protoc_insertion_point(field_set:tensorflow.RunOptions.report_tensor_allocations_upon_oom) +} + +// .tensorflow.RunOptions.Experimental experimental = 8; +inline bool RunOptions::_internal_has_experimental() const { + return this != internal_default_instance() && _impl_.experimental_ != nullptr; +} +inline bool RunOptions::has_experimental() const { + return _internal_has_experimental(); +} +inline void RunOptions::clear_experimental() { + if (GetArenaForAllocation() == nullptr && _impl_.experimental_ != nullptr) { + delete _impl_.experimental_; + } + _impl_.experimental_ = nullptr; +} +inline const ::tensorflow::RunOptions_Experimental& RunOptions::_internal_experimental() const { + const ::tensorflow::RunOptions_Experimental* p = _impl_.experimental_; + return p != nullptr ? *p : reinterpret_cast( + ::tensorflow::_RunOptions_Experimental_default_instance_); +} +inline const ::tensorflow::RunOptions_Experimental& RunOptions::experimental() const { + // @@protoc_insertion_point(field_get:tensorflow.RunOptions.experimental) + return _internal_experimental(); +} +inline void RunOptions::unsafe_arena_set_allocated_experimental( + ::tensorflow::RunOptions_Experimental* experimental) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.experimental_); + } + _impl_.experimental_ = experimental; + if (experimental) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.RunOptions.experimental) +} +inline ::tensorflow::RunOptions_Experimental* RunOptions::release_experimental() { + + ::tensorflow::RunOptions_Experimental* temp = _impl_.experimental_; + _impl_.experimental_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tensorflow::RunOptions_Experimental* RunOptions::unsafe_arena_release_experimental() { + // @@protoc_insertion_point(field_release:tensorflow.RunOptions.experimental) + + ::tensorflow::RunOptions_Experimental* temp = _impl_.experimental_; + _impl_.experimental_ = nullptr; + return temp; +} +inline ::tensorflow::RunOptions_Experimental* RunOptions::_internal_mutable_experimental() { + + if (_impl_.experimental_ == nullptr) { + auto* p = CreateMaybeMessage<::tensorflow::RunOptions_Experimental>(GetArenaForAllocation()); + _impl_.experimental_ = p; + } + return _impl_.experimental_; +} +inline ::tensorflow::RunOptions_Experimental* RunOptions::mutable_experimental() { + ::tensorflow::RunOptions_Experimental* _msg = _internal_mutable_experimental(); + // @@protoc_insertion_point(field_mutable:tensorflow.RunOptions.experimental) + return _msg; +} +inline void RunOptions::set_allocated_experimental(::tensorflow::RunOptions_Experimental* experimental) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete _impl_.experimental_; + } + if (experimental) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(experimental); + if (message_arena != submessage_arena) { + experimental = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, experimental, submessage_arena); + } + + } else { + + } + _impl_.experimental_ = experimental; + // @@protoc_insertion_point(field_set_allocated:tensorflow.RunOptions.experimental) +} + +// ------------------------------------------------------------------- + +// RunMetadata_FunctionGraphs + +// repeated .tensorflow.GraphDef partition_graphs = 1; +inline int RunMetadata_FunctionGraphs::_internal_partition_graphs_size() const { + return _impl_.partition_graphs_.size(); +} +inline int RunMetadata_FunctionGraphs::partition_graphs_size() const { + return _internal_partition_graphs_size(); +} +inline ::tensorflow::GraphDef* RunMetadata_FunctionGraphs::mutable_partition_graphs(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.RunMetadata.FunctionGraphs.partition_graphs) + return _impl_.partition_graphs_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::GraphDef >* +RunMetadata_FunctionGraphs::mutable_partition_graphs() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.RunMetadata.FunctionGraphs.partition_graphs) + return &_impl_.partition_graphs_; +} +inline const ::tensorflow::GraphDef& RunMetadata_FunctionGraphs::_internal_partition_graphs(int index) const { + return _impl_.partition_graphs_.Get(index); +} +inline const ::tensorflow::GraphDef& RunMetadata_FunctionGraphs::partition_graphs(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.RunMetadata.FunctionGraphs.partition_graphs) + return _internal_partition_graphs(index); +} +inline ::tensorflow::GraphDef* RunMetadata_FunctionGraphs::_internal_add_partition_graphs() { + return _impl_.partition_graphs_.Add(); +} +inline ::tensorflow::GraphDef* RunMetadata_FunctionGraphs::add_partition_graphs() { + ::tensorflow::GraphDef* _add = _internal_add_partition_graphs(); + // @@protoc_insertion_point(field_add:tensorflow.RunMetadata.FunctionGraphs.partition_graphs) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::GraphDef >& +RunMetadata_FunctionGraphs::partition_graphs() const { + // @@protoc_insertion_point(field_list:tensorflow.RunMetadata.FunctionGraphs.partition_graphs) + return _impl_.partition_graphs_; +} + +// .tensorflow.GraphDef pre_optimization_graph = 2; +inline bool RunMetadata_FunctionGraphs::_internal_has_pre_optimization_graph() const { + return this != internal_default_instance() && _impl_.pre_optimization_graph_ != nullptr; +} +inline bool RunMetadata_FunctionGraphs::has_pre_optimization_graph() const { + return _internal_has_pre_optimization_graph(); +} +inline const ::tensorflow::GraphDef& RunMetadata_FunctionGraphs::_internal_pre_optimization_graph() const { + const ::tensorflow::GraphDef* p = _impl_.pre_optimization_graph_; + return p != nullptr ? *p : reinterpret_cast( + ::tensorflow::_GraphDef_default_instance_); +} +inline const ::tensorflow::GraphDef& RunMetadata_FunctionGraphs::pre_optimization_graph() const { + // @@protoc_insertion_point(field_get:tensorflow.RunMetadata.FunctionGraphs.pre_optimization_graph) + return _internal_pre_optimization_graph(); +} +inline void RunMetadata_FunctionGraphs::unsafe_arena_set_allocated_pre_optimization_graph( + ::tensorflow::GraphDef* pre_optimization_graph) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.pre_optimization_graph_); + } + _impl_.pre_optimization_graph_ = pre_optimization_graph; + if (pre_optimization_graph) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.RunMetadata.FunctionGraphs.pre_optimization_graph) +} +inline ::tensorflow::GraphDef* RunMetadata_FunctionGraphs::release_pre_optimization_graph() { + + ::tensorflow::GraphDef* temp = _impl_.pre_optimization_graph_; + _impl_.pre_optimization_graph_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tensorflow::GraphDef* RunMetadata_FunctionGraphs::unsafe_arena_release_pre_optimization_graph() { + // @@protoc_insertion_point(field_release:tensorflow.RunMetadata.FunctionGraphs.pre_optimization_graph) + + ::tensorflow::GraphDef* temp = _impl_.pre_optimization_graph_; + _impl_.pre_optimization_graph_ = nullptr; + return temp; +} +inline ::tensorflow::GraphDef* RunMetadata_FunctionGraphs::_internal_mutable_pre_optimization_graph() { + + if (_impl_.pre_optimization_graph_ == nullptr) { + auto* p = CreateMaybeMessage<::tensorflow::GraphDef>(GetArenaForAllocation()); + _impl_.pre_optimization_graph_ = p; + } + return _impl_.pre_optimization_graph_; +} +inline ::tensorflow::GraphDef* RunMetadata_FunctionGraphs::mutable_pre_optimization_graph() { + ::tensorflow::GraphDef* _msg = _internal_mutable_pre_optimization_graph(); + // @@protoc_insertion_point(field_mutable:tensorflow.RunMetadata.FunctionGraphs.pre_optimization_graph) + return _msg; +} +inline void RunMetadata_FunctionGraphs::set_allocated_pre_optimization_graph(::tensorflow::GraphDef* pre_optimization_graph) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.pre_optimization_graph_); + } + if (pre_optimization_graph) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( + reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(pre_optimization_graph)); + if (message_arena != submessage_arena) { + pre_optimization_graph = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, pre_optimization_graph, submessage_arena); + } + + } else { + + } + _impl_.pre_optimization_graph_ = pre_optimization_graph; + // @@protoc_insertion_point(field_set_allocated:tensorflow.RunMetadata.FunctionGraphs.pre_optimization_graph) +} + +// .tensorflow.GraphDef post_optimization_graph = 3; +inline bool RunMetadata_FunctionGraphs::_internal_has_post_optimization_graph() const { + return this != internal_default_instance() && _impl_.post_optimization_graph_ != nullptr; +} +inline bool RunMetadata_FunctionGraphs::has_post_optimization_graph() const { + return _internal_has_post_optimization_graph(); +} +inline const ::tensorflow::GraphDef& RunMetadata_FunctionGraphs::_internal_post_optimization_graph() const { + const ::tensorflow::GraphDef* p = _impl_.post_optimization_graph_; + return p != nullptr ? *p : reinterpret_cast( + ::tensorflow::_GraphDef_default_instance_); +} +inline const ::tensorflow::GraphDef& RunMetadata_FunctionGraphs::post_optimization_graph() const { + // @@protoc_insertion_point(field_get:tensorflow.RunMetadata.FunctionGraphs.post_optimization_graph) + return _internal_post_optimization_graph(); +} +inline void RunMetadata_FunctionGraphs::unsafe_arena_set_allocated_post_optimization_graph( + ::tensorflow::GraphDef* post_optimization_graph) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.post_optimization_graph_); + } + _impl_.post_optimization_graph_ = post_optimization_graph; + if (post_optimization_graph) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.RunMetadata.FunctionGraphs.post_optimization_graph) +} +inline ::tensorflow::GraphDef* RunMetadata_FunctionGraphs::release_post_optimization_graph() { + + ::tensorflow::GraphDef* temp = _impl_.post_optimization_graph_; + _impl_.post_optimization_graph_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tensorflow::GraphDef* RunMetadata_FunctionGraphs::unsafe_arena_release_post_optimization_graph() { + // @@protoc_insertion_point(field_release:tensorflow.RunMetadata.FunctionGraphs.post_optimization_graph) + + ::tensorflow::GraphDef* temp = _impl_.post_optimization_graph_; + _impl_.post_optimization_graph_ = nullptr; + return temp; +} +inline ::tensorflow::GraphDef* RunMetadata_FunctionGraphs::_internal_mutable_post_optimization_graph() { + + if (_impl_.post_optimization_graph_ == nullptr) { + auto* p = CreateMaybeMessage<::tensorflow::GraphDef>(GetArenaForAllocation()); + _impl_.post_optimization_graph_ = p; + } + return _impl_.post_optimization_graph_; +} +inline ::tensorflow::GraphDef* RunMetadata_FunctionGraphs::mutable_post_optimization_graph() { + ::tensorflow::GraphDef* _msg = _internal_mutable_post_optimization_graph(); + // @@protoc_insertion_point(field_mutable:tensorflow.RunMetadata.FunctionGraphs.post_optimization_graph) + return _msg; +} +inline void RunMetadata_FunctionGraphs::set_allocated_post_optimization_graph(::tensorflow::GraphDef* post_optimization_graph) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.post_optimization_graph_); + } + if (post_optimization_graph) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( + reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(post_optimization_graph)); + if (message_arena != submessage_arena) { + post_optimization_graph = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, post_optimization_graph, submessage_arena); + } + + } else { + + } + _impl_.post_optimization_graph_ = post_optimization_graph; + // @@protoc_insertion_point(field_set_allocated:tensorflow.RunMetadata.FunctionGraphs.post_optimization_graph) +} + +// ------------------------------------------------------------------- + +// RunMetadata + +// .tensorflow.StepStats step_stats = 1; +inline bool RunMetadata::_internal_has_step_stats() const { + return this != internal_default_instance() && _impl_.step_stats_ != nullptr; +} +inline bool RunMetadata::has_step_stats() const { + return _internal_has_step_stats(); +} +inline const ::tensorflow::StepStats& RunMetadata::_internal_step_stats() const { + const ::tensorflow::StepStats* p = _impl_.step_stats_; + return p != nullptr ? *p : reinterpret_cast( + ::tensorflow::_StepStats_default_instance_); +} +inline const ::tensorflow::StepStats& RunMetadata::step_stats() const { + // @@protoc_insertion_point(field_get:tensorflow.RunMetadata.step_stats) + return _internal_step_stats(); +} +inline void RunMetadata::unsafe_arena_set_allocated_step_stats( + ::tensorflow::StepStats* step_stats) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.step_stats_); + } + _impl_.step_stats_ = step_stats; + if (step_stats) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.RunMetadata.step_stats) +} +inline ::tensorflow::StepStats* RunMetadata::release_step_stats() { + + ::tensorflow::StepStats* temp = _impl_.step_stats_; + _impl_.step_stats_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tensorflow::StepStats* RunMetadata::unsafe_arena_release_step_stats() { + // @@protoc_insertion_point(field_release:tensorflow.RunMetadata.step_stats) + + ::tensorflow::StepStats* temp = _impl_.step_stats_; + _impl_.step_stats_ = nullptr; + return temp; +} +inline ::tensorflow::StepStats* RunMetadata::_internal_mutable_step_stats() { + + if (_impl_.step_stats_ == nullptr) { + auto* p = CreateMaybeMessage<::tensorflow::StepStats>(GetArenaForAllocation()); + _impl_.step_stats_ = p; + } + return _impl_.step_stats_; +} +inline ::tensorflow::StepStats* RunMetadata::mutable_step_stats() { + ::tensorflow::StepStats* _msg = _internal_mutable_step_stats(); + // @@protoc_insertion_point(field_mutable:tensorflow.RunMetadata.step_stats) + return _msg; +} +inline void RunMetadata::set_allocated_step_stats(::tensorflow::StepStats* step_stats) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.step_stats_); + } + if (step_stats) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( + reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(step_stats)); + if (message_arena != submessage_arena) { + step_stats = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, step_stats, submessage_arena); + } + + } else { + + } + _impl_.step_stats_ = step_stats; + // @@protoc_insertion_point(field_set_allocated:tensorflow.RunMetadata.step_stats) +} + +// .tensorflow.CostGraphDef cost_graph = 2; +inline bool RunMetadata::_internal_has_cost_graph() const { + return this != internal_default_instance() && _impl_.cost_graph_ != nullptr; +} +inline bool RunMetadata::has_cost_graph() const { + return _internal_has_cost_graph(); +} +inline const ::tensorflow::CostGraphDef& RunMetadata::_internal_cost_graph() const { + const ::tensorflow::CostGraphDef* p = _impl_.cost_graph_; + return p != nullptr ? *p : reinterpret_cast( + ::tensorflow::_CostGraphDef_default_instance_); +} +inline const ::tensorflow::CostGraphDef& RunMetadata::cost_graph() const { + // @@protoc_insertion_point(field_get:tensorflow.RunMetadata.cost_graph) + return _internal_cost_graph(); +} +inline void RunMetadata::unsafe_arena_set_allocated_cost_graph( + ::tensorflow::CostGraphDef* cost_graph) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.cost_graph_); + } + _impl_.cost_graph_ = cost_graph; + if (cost_graph) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.RunMetadata.cost_graph) +} +inline ::tensorflow::CostGraphDef* RunMetadata::release_cost_graph() { + + ::tensorflow::CostGraphDef* temp = _impl_.cost_graph_; + _impl_.cost_graph_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tensorflow::CostGraphDef* RunMetadata::unsafe_arena_release_cost_graph() { + // @@protoc_insertion_point(field_release:tensorflow.RunMetadata.cost_graph) + + ::tensorflow::CostGraphDef* temp = _impl_.cost_graph_; + _impl_.cost_graph_ = nullptr; + return temp; +} +inline ::tensorflow::CostGraphDef* RunMetadata::_internal_mutable_cost_graph() { + + if (_impl_.cost_graph_ == nullptr) { + auto* p = CreateMaybeMessage<::tensorflow::CostGraphDef>(GetArenaForAllocation()); + _impl_.cost_graph_ = p; + } + return _impl_.cost_graph_; +} +inline ::tensorflow::CostGraphDef* RunMetadata::mutable_cost_graph() { + ::tensorflow::CostGraphDef* _msg = _internal_mutable_cost_graph(); + // @@protoc_insertion_point(field_mutable:tensorflow.RunMetadata.cost_graph) + return _msg; +} +inline void RunMetadata::set_allocated_cost_graph(::tensorflow::CostGraphDef* cost_graph) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.cost_graph_); + } + if (cost_graph) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( + reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(cost_graph)); + if (message_arena != submessage_arena) { + cost_graph = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, cost_graph, submessage_arena); + } + + } else { + + } + _impl_.cost_graph_ = cost_graph; + // @@protoc_insertion_point(field_set_allocated:tensorflow.RunMetadata.cost_graph) +} + +// repeated .tensorflow.GraphDef partition_graphs = 3; +inline int RunMetadata::_internal_partition_graphs_size() const { + return _impl_.partition_graphs_.size(); +} +inline int RunMetadata::partition_graphs_size() const { + return _internal_partition_graphs_size(); +} +inline ::tensorflow::GraphDef* RunMetadata::mutable_partition_graphs(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.RunMetadata.partition_graphs) + return _impl_.partition_graphs_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::GraphDef >* +RunMetadata::mutable_partition_graphs() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.RunMetadata.partition_graphs) + return &_impl_.partition_graphs_; +} +inline const ::tensorflow::GraphDef& RunMetadata::_internal_partition_graphs(int index) const { + return _impl_.partition_graphs_.Get(index); +} +inline const ::tensorflow::GraphDef& RunMetadata::partition_graphs(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.RunMetadata.partition_graphs) + return _internal_partition_graphs(index); +} +inline ::tensorflow::GraphDef* RunMetadata::_internal_add_partition_graphs() { + return _impl_.partition_graphs_.Add(); +} +inline ::tensorflow::GraphDef* RunMetadata::add_partition_graphs() { + ::tensorflow::GraphDef* _add = _internal_add_partition_graphs(); + // @@protoc_insertion_point(field_add:tensorflow.RunMetadata.partition_graphs) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::GraphDef >& +RunMetadata::partition_graphs() const { + // @@protoc_insertion_point(field_list:tensorflow.RunMetadata.partition_graphs) + return _impl_.partition_graphs_; +} + +// repeated .tensorflow.RunMetadata.FunctionGraphs function_graphs = 4; +inline int RunMetadata::_internal_function_graphs_size() const { + return _impl_.function_graphs_.size(); +} +inline int RunMetadata::function_graphs_size() const { + return _internal_function_graphs_size(); +} +inline void RunMetadata::clear_function_graphs() { + _impl_.function_graphs_.Clear(); +} +inline ::tensorflow::RunMetadata_FunctionGraphs* RunMetadata::mutable_function_graphs(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.RunMetadata.function_graphs) + return _impl_.function_graphs_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::RunMetadata_FunctionGraphs >* +RunMetadata::mutable_function_graphs() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.RunMetadata.function_graphs) + return &_impl_.function_graphs_; +} +inline const ::tensorflow::RunMetadata_FunctionGraphs& RunMetadata::_internal_function_graphs(int index) const { + return _impl_.function_graphs_.Get(index); +} +inline const ::tensorflow::RunMetadata_FunctionGraphs& RunMetadata::function_graphs(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.RunMetadata.function_graphs) + return _internal_function_graphs(index); +} +inline ::tensorflow::RunMetadata_FunctionGraphs* RunMetadata::_internal_add_function_graphs() { + return _impl_.function_graphs_.Add(); +} +inline ::tensorflow::RunMetadata_FunctionGraphs* RunMetadata::add_function_graphs() { + ::tensorflow::RunMetadata_FunctionGraphs* _add = _internal_add_function_graphs(); + // @@protoc_insertion_point(field_add:tensorflow.RunMetadata.function_graphs) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::RunMetadata_FunctionGraphs >& +RunMetadata::function_graphs() const { + // @@protoc_insertion_point(field_list:tensorflow.RunMetadata.function_graphs) + return _impl_.function_graphs_; +} + +// .tensorflow.SessionMetadata session_metadata = 5; +inline bool RunMetadata::_internal_has_session_metadata() const { + return this != internal_default_instance() && _impl_.session_metadata_ != nullptr; +} +inline bool RunMetadata::has_session_metadata() const { + return _internal_has_session_metadata(); +} +inline void RunMetadata::clear_session_metadata() { + if (GetArenaForAllocation() == nullptr && _impl_.session_metadata_ != nullptr) { + delete _impl_.session_metadata_; + } + _impl_.session_metadata_ = nullptr; +} +inline const ::tensorflow::SessionMetadata& RunMetadata::_internal_session_metadata() const { + const ::tensorflow::SessionMetadata* p = _impl_.session_metadata_; + return p != nullptr ? *p : reinterpret_cast( + ::tensorflow::_SessionMetadata_default_instance_); +} +inline const ::tensorflow::SessionMetadata& RunMetadata::session_metadata() const { + // @@protoc_insertion_point(field_get:tensorflow.RunMetadata.session_metadata) + return _internal_session_metadata(); +} +inline void RunMetadata::unsafe_arena_set_allocated_session_metadata( + ::tensorflow::SessionMetadata* session_metadata) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.session_metadata_); + } + _impl_.session_metadata_ = session_metadata; + if (session_metadata) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.RunMetadata.session_metadata) +} +inline ::tensorflow::SessionMetadata* RunMetadata::release_session_metadata() { + + ::tensorflow::SessionMetadata* temp = _impl_.session_metadata_; + _impl_.session_metadata_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tensorflow::SessionMetadata* RunMetadata::unsafe_arena_release_session_metadata() { + // @@protoc_insertion_point(field_release:tensorflow.RunMetadata.session_metadata) + + ::tensorflow::SessionMetadata* temp = _impl_.session_metadata_; + _impl_.session_metadata_ = nullptr; + return temp; +} +inline ::tensorflow::SessionMetadata* RunMetadata::_internal_mutable_session_metadata() { + + if (_impl_.session_metadata_ == nullptr) { + auto* p = CreateMaybeMessage<::tensorflow::SessionMetadata>(GetArenaForAllocation()); + _impl_.session_metadata_ = p; + } + return _impl_.session_metadata_; +} +inline ::tensorflow::SessionMetadata* RunMetadata::mutable_session_metadata() { + ::tensorflow::SessionMetadata* _msg = _internal_mutable_session_metadata(); + // @@protoc_insertion_point(field_mutable:tensorflow.RunMetadata.session_metadata) + return _msg; +} +inline void RunMetadata::set_allocated_session_metadata(::tensorflow::SessionMetadata* session_metadata) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete _impl_.session_metadata_; + } + if (session_metadata) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(session_metadata); + if (message_arena != submessage_arena) { + session_metadata = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, session_metadata, submessage_arena); + } + + } else { + + } + _impl_.session_metadata_ = session_metadata; + // @@protoc_insertion_point(field_set_allocated:tensorflow.RunMetadata.session_metadata) +} + +// ------------------------------------------------------------------- + +// TensorConnection + +// string from_tensor = 1; +inline void TensorConnection::clear_from_tensor() { + _impl_.from_tensor_.ClearToEmpty(); +} +inline const std::string& TensorConnection::from_tensor() const { + // @@protoc_insertion_point(field_get:tensorflow.TensorConnection.from_tensor) + return _internal_from_tensor(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void TensorConnection::set_from_tensor(ArgT0&& arg0, ArgT... args) { + + _impl_.from_tensor_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.TensorConnection.from_tensor) +} +inline std::string* TensorConnection::mutable_from_tensor() { + std::string* _s = _internal_mutable_from_tensor(); + // @@protoc_insertion_point(field_mutable:tensorflow.TensorConnection.from_tensor) + return _s; +} +inline const std::string& TensorConnection::_internal_from_tensor() const { + return _impl_.from_tensor_.Get(); +} +inline void TensorConnection::_internal_set_from_tensor(const std::string& value) { + + _impl_.from_tensor_.Set(value, GetArenaForAllocation()); +} +inline std::string* TensorConnection::_internal_mutable_from_tensor() { + + return _impl_.from_tensor_.Mutable(GetArenaForAllocation()); +} +inline std::string* TensorConnection::release_from_tensor() { + // @@protoc_insertion_point(field_release:tensorflow.TensorConnection.from_tensor) + return _impl_.from_tensor_.Release(); +} +inline void TensorConnection::set_allocated_from_tensor(std::string* from_tensor) { + if (from_tensor != nullptr) { + + } else { + + } + _impl_.from_tensor_.SetAllocated(from_tensor, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.from_tensor_.IsDefault()) { + _impl_.from_tensor_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.TensorConnection.from_tensor) +} + +// string to_tensor = 2; +inline void TensorConnection::clear_to_tensor() { + _impl_.to_tensor_.ClearToEmpty(); +} +inline const std::string& TensorConnection::to_tensor() const { + // @@protoc_insertion_point(field_get:tensorflow.TensorConnection.to_tensor) + return _internal_to_tensor(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void TensorConnection::set_to_tensor(ArgT0&& arg0, ArgT... args) { + + _impl_.to_tensor_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.TensorConnection.to_tensor) +} +inline std::string* TensorConnection::mutable_to_tensor() { + std::string* _s = _internal_mutable_to_tensor(); + // @@protoc_insertion_point(field_mutable:tensorflow.TensorConnection.to_tensor) + return _s; +} +inline const std::string& TensorConnection::_internal_to_tensor() const { + return _impl_.to_tensor_.Get(); +} +inline void TensorConnection::_internal_set_to_tensor(const std::string& value) { + + _impl_.to_tensor_.Set(value, GetArenaForAllocation()); +} +inline std::string* TensorConnection::_internal_mutable_to_tensor() { + + return _impl_.to_tensor_.Mutable(GetArenaForAllocation()); +} +inline std::string* TensorConnection::release_to_tensor() { + // @@protoc_insertion_point(field_release:tensorflow.TensorConnection.to_tensor) + return _impl_.to_tensor_.Release(); +} +inline void TensorConnection::set_allocated_to_tensor(std::string* to_tensor) { + if (to_tensor != nullptr) { + + } else { + + } + _impl_.to_tensor_.SetAllocated(to_tensor, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.to_tensor_.IsDefault()) { + _impl_.to_tensor_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.TensorConnection.to_tensor) +} + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// CallableOptions + +// repeated string feed = 1; +inline int CallableOptions::_internal_feed_size() const { + return _impl_.feed_.size(); +} +inline int CallableOptions::feed_size() const { + return _internal_feed_size(); +} +inline void CallableOptions::clear_feed() { + _impl_.feed_.Clear(); +} +inline std::string* CallableOptions::add_feed() { + std::string* _s = _internal_add_feed(); + // @@protoc_insertion_point(field_add_mutable:tensorflow.CallableOptions.feed) + return _s; +} +inline const std::string& CallableOptions::_internal_feed(int index) const { + return _impl_.feed_.Get(index); +} +inline const std::string& CallableOptions::feed(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.CallableOptions.feed) + return _internal_feed(index); +} +inline std::string* CallableOptions::mutable_feed(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.CallableOptions.feed) + return _impl_.feed_.Mutable(index); +} +inline void CallableOptions::set_feed(int index, const std::string& value) { + _impl_.feed_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set:tensorflow.CallableOptions.feed) +} +inline void CallableOptions::set_feed(int index, std::string&& value) { + _impl_.feed_.Mutable(index)->assign(std::move(value)); + // @@protoc_insertion_point(field_set:tensorflow.CallableOptions.feed) +} +inline void CallableOptions::set_feed(int index, const char* value) { + GOOGLE_DCHECK(value != nullptr); + _impl_.feed_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set_char:tensorflow.CallableOptions.feed) +} +inline void CallableOptions::set_feed(int index, const char* value, size_t size) { + _impl_.feed_.Mutable(index)->assign( + reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:tensorflow.CallableOptions.feed) +} +inline std::string* CallableOptions::_internal_add_feed() { + return _impl_.feed_.Add(); +} +inline void CallableOptions::add_feed(const std::string& value) { + _impl_.feed_.Add()->assign(value); + // @@protoc_insertion_point(field_add:tensorflow.CallableOptions.feed) +} +inline void CallableOptions::add_feed(std::string&& value) { + _impl_.feed_.Add(std::move(value)); + // @@protoc_insertion_point(field_add:tensorflow.CallableOptions.feed) +} +inline void CallableOptions::add_feed(const char* value) { + GOOGLE_DCHECK(value != nullptr); + _impl_.feed_.Add()->assign(value); + // @@protoc_insertion_point(field_add_char:tensorflow.CallableOptions.feed) +} +inline void CallableOptions::add_feed(const char* value, size_t size) { + _impl_.feed_.Add()->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_add_pointer:tensorflow.CallableOptions.feed) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& +CallableOptions::feed() const { + // @@protoc_insertion_point(field_list:tensorflow.CallableOptions.feed) + return _impl_.feed_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* +CallableOptions::mutable_feed() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.CallableOptions.feed) + return &_impl_.feed_; +} + +// repeated string fetch = 2; +inline int CallableOptions::_internal_fetch_size() const { + return _impl_.fetch_.size(); +} +inline int CallableOptions::fetch_size() const { + return _internal_fetch_size(); +} +inline void CallableOptions::clear_fetch() { + _impl_.fetch_.Clear(); +} +inline std::string* CallableOptions::add_fetch() { + std::string* _s = _internal_add_fetch(); + // @@protoc_insertion_point(field_add_mutable:tensorflow.CallableOptions.fetch) + return _s; +} +inline const std::string& CallableOptions::_internal_fetch(int index) const { + return _impl_.fetch_.Get(index); +} +inline const std::string& CallableOptions::fetch(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.CallableOptions.fetch) + return _internal_fetch(index); +} +inline std::string* CallableOptions::mutable_fetch(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.CallableOptions.fetch) + return _impl_.fetch_.Mutable(index); +} +inline void CallableOptions::set_fetch(int index, const std::string& value) { + _impl_.fetch_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set:tensorflow.CallableOptions.fetch) +} +inline void CallableOptions::set_fetch(int index, std::string&& value) { + _impl_.fetch_.Mutable(index)->assign(std::move(value)); + // @@protoc_insertion_point(field_set:tensorflow.CallableOptions.fetch) +} +inline void CallableOptions::set_fetch(int index, const char* value) { + GOOGLE_DCHECK(value != nullptr); + _impl_.fetch_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set_char:tensorflow.CallableOptions.fetch) +} +inline void CallableOptions::set_fetch(int index, const char* value, size_t size) { + _impl_.fetch_.Mutable(index)->assign( + reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:tensorflow.CallableOptions.fetch) +} +inline std::string* CallableOptions::_internal_add_fetch() { + return _impl_.fetch_.Add(); +} +inline void CallableOptions::add_fetch(const std::string& value) { + _impl_.fetch_.Add()->assign(value); + // @@protoc_insertion_point(field_add:tensorflow.CallableOptions.fetch) +} +inline void CallableOptions::add_fetch(std::string&& value) { + _impl_.fetch_.Add(std::move(value)); + // @@protoc_insertion_point(field_add:tensorflow.CallableOptions.fetch) +} +inline void CallableOptions::add_fetch(const char* value) { + GOOGLE_DCHECK(value != nullptr); + _impl_.fetch_.Add()->assign(value); + // @@protoc_insertion_point(field_add_char:tensorflow.CallableOptions.fetch) +} +inline void CallableOptions::add_fetch(const char* value, size_t size) { + _impl_.fetch_.Add()->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_add_pointer:tensorflow.CallableOptions.fetch) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& +CallableOptions::fetch() const { + // @@protoc_insertion_point(field_list:tensorflow.CallableOptions.fetch) + return _impl_.fetch_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* +CallableOptions::mutable_fetch() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.CallableOptions.fetch) + return &_impl_.fetch_; +} + +// repeated string target = 3; +inline int CallableOptions::_internal_target_size() const { + return _impl_.target_.size(); +} +inline int CallableOptions::target_size() const { + return _internal_target_size(); +} +inline void CallableOptions::clear_target() { + _impl_.target_.Clear(); +} +inline std::string* CallableOptions::add_target() { + std::string* _s = _internal_add_target(); + // @@protoc_insertion_point(field_add_mutable:tensorflow.CallableOptions.target) + return _s; +} +inline const std::string& CallableOptions::_internal_target(int index) const { + return _impl_.target_.Get(index); +} +inline const std::string& CallableOptions::target(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.CallableOptions.target) + return _internal_target(index); +} +inline std::string* CallableOptions::mutable_target(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.CallableOptions.target) + return _impl_.target_.Mutable(index); +} +inline void CallableOptions::set_target(int index, const std::string& value) { + _impl_.target_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set:tensorflow.CallableOptions.target) +} +inline void CallableOptions::set_target(int index, std::string&& value) { + _impl_.target_.Mutable(index)->assign(std::move(value)); + // @@protoc_insertion_point(field_set:tensorflow.CallableOptions.target) +} +inline void CallableOptions::set_target(int index, const char* value) { + GOOGLE_DCHECK(value != nullptr); + _impl_.target_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set_char:tensorflow.CallableOptions.target) +} +inline void CallableOptions::set_target(int index, const char* value, size_t size) { + _impl_.target_.Mutable(index)->assign( + reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:tensorflow.CallableOptions.target) +} +inline std::string* CallableOptions::_internal_add_target() { + return _impl_.target_.Add(); +} +inline void CallableOptions::add_target(const std::string& value) { + _impl_.target_.Add()->assign(value); + // @@protoc_insertion_point(field_add:tensorflow.CallableOptions.target) +} +inline void CallableOptions::add_target(std::string&& value) { + _impl_.target_.Add(std::move(value)); + // @@protoc_insertion_point(field_add:tensorflow.CallableOptions.target) +} +inline void CallableOptions::add_target(const char* value) { + GOOGLE_DCHECK(value != nullptr); + _impl_.target_.Add()->assign(value); + // @@protoc_insertion_point(field_add_char:tensorflow.CallableOptions.target) +} +inline void CallableOptions::add_target(const char* value, size_t size) { + _impl_.target_.Add()->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_add_pointer:tensorflow.CallableOptions.target) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& +CallableOptions::target() const { + // @@protoc_insertion_point(field_list:tensorflow.CallableOptions.target) + return _impl_.target_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* +CallableOptions::mutable_target() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.CallableOptions.target) + return &_impl_.target_; +} + +// .tensorflow.RunOptions run_options = 4; +inline bool CallableOptions::_internal_has_run_options() const { + return this != internal_default_instance() && _impl_.run_options_ != nullptr; +} +inline bool CallableOptions::has_run_options() const { + return _internal_has_run_options(); +} +inline void CallableOptions::clear_run_options() { + if (GetArenaForAllocation() == nullptr && _impl_.run_options_ != nullptr) { + delete _impl_.run_options_; + } + _impl_.run_options_ = nullptr; +} +inline const ::tensorflow::RunOptions& CallableOptions::_internal_run_options() const { + const ::tensorflow::RunOptions* p = _impl_.run_options_; + return p != nullptr ? *p : reinterpret_cast( + ::tensorflow::_RunOptions_default_instance_); +} +inline const ::tensorflow::RunOptions& CallableOptions::run_options() const { + // @@protoc_insertion_point(field_get:tensorflow.CallableOptions.run_options) + return _internal_run_options(); +} +inline void CallableOptions::unsafe_arena_set_allocated_run_options( + ::tensorflow::RunOptions* run_options) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.run_options_); + } + _impl_.run_options_ = run_options; + if (run_options) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.CallableOptions.run_options) +} +inline ::tensorflow::RunOptions* CallableOptions::release_run_options() { + + ::tensorflow::RunOptions* temp = _impl_.run_options_; + _impl_.run_options_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tensorflow::RunOptions* CallableOptions::unsafe_arena_release_run_options() { + // @@protoc_insertion_point(field_release:tensorflow.CallableOptions.run_options) + + ::tensorflow::RunOptions* temp = _impl_.run_options_; + _impl_.run_options_ = nullptr; + return temp; +} +inline ::tensorflow::RunOptions* CallableOptions::_internal_mutable_run_options() { + + if (_impl_.run_options_ == nullptr) { + auto* p = CreateMaybeMessage<::tensorflow::RunOptions>(GetArenaForAllocation()); + _impl_.run_options_ = p; + } + return _impl_.run_options_; +} +inline ::tensorflow::RunOptions* CallableOptions::mutable_run_options() { + ::tensorflow::RunOptions* _msg = _internal_mutable_run_options(); + // @@protoc_insertion_point(field_mutable:tensorflow.CallableOptions.run_options) + return _msg; +} +inline void CallableOptions::set_allocated_run_options(::tensorflow::RunOptions* run_options) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete _impl_.run_options_; + } + if (run_options) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(run_options); + if (message_arena != submessage_arena) { + run_options = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, run_options, submessage_arena); + } + + } else { + + } + _impl_.run_options_ = run_options; + // @@protoc_insertion_point(field_set_allocated:tensorflow.CallableOptions.run_options) +} + +// repeated .tensorflow.TensorConnection tensor_connection = 5; +inline int CallableOptions::_internal_tensor_connection_size() const { + return _impl_.tensor_connection_.size(); +} +inline int CallableOptions::tensor_connection_size() const { + return _internal_tensor_connection_size(); +} +inline void CallableOptions::clear_tensor_connection() { + _impl_.tensor_connection_.Clear(); +} +inline ::tensorflow::TensorConnection* CallableOptions::mutable_tensor_connection(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.CallableOptions.tensor_connection) + return _impl_.tensor_connection_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::TensorConnection >* +CallableOptions::mutable_tensor_connection() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.CallableOptions.tensor_connection) + return &_impl_.tensor_connection_; +} +inline const ::tensorflow::TensorConnection& CallableOptions::_internal_tensor_connection(int index) const { + return _impl_.tensor_connection_.Get(index); +} +inline const ::tensorflow::TensorConnection& CallableOptions::tensor_connection(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.CallableOptions.tensor_connection) + return _internal_tensor_connection(index); +} +inline ::tensorflow::TensorConnection* CallableOptions::_internal_add_tensor_connection() { + return _impl_.tensor_connection_.Add(); +} +inline ::tensorflow::TensorConnection* CallableOptions::add_tensor_connection() { + ::tensorflow::TensorConnection* _add = _internal_add_tensor_connection(); + // @@protoc_insertion_point(field_add:tensorflow.CallableOptions.tensor_connection) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::TensorConnection >& +CallableOptions::tensor_connection() const { + // @@protoc_insertion_point(field_list:tensorflow.CallableOptions.tensor_connection) + return _impl_.tensor_connection_; +} + +// map feed_devices = 6; +inline int CallableOptions::_internal_feed_devices_size() const { + return _impl_.feed_devices_.size(); +} +inline int CallableOptions::feed_devices_size() const { + return _internal_feed_devices_size(); +} +inline void CallableOptions::clear_feed_devices() { + _impl_.feed_devices_.Clear(); +} +inline const ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >& +CallableOptions::_internal_feed_devices() const { + return _impl_.feed_devices_.GetMap(); +} +inline const ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >& +CallableOptions::feed_devices() const { + // @@protoc_insertion_point(field_map:tensorflow.CallableOptions.feed_devices) + return _internal_feed_devices(); +} +inline ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >* +CallableOptions::_internal_mutable_feed_devices() { + return _impl_.feed_devices_.MutableMap(); +} +inline ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >* +CallableOptions::mutable_feed_devices() { + // @@protoc_insertion_point(field_mutable_map:tensorflow.CallableOptions.feed_devices) + return _internal_mutable_feed_devices(); +} + +// map fetch_devices = 7; +inline int CallableOptions::_internal_fetch_devices_size() const { + return _impl_.fetch_devices_.size(); +} +inline int CallableOptions::fetch_devices_size() const { + return _internal_fetch_devices_size(); +} +inline void CallableOptions::clear_fetch_devices() { + _impl_.fetch_devices_.Clear(); +} +inline const ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >& +CallableOptions::_internal_fetch_devices() const { + return _impl_.fetch_devices_.GetMap(); +} +inline const ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >& +CallableOptions::fetch_devices() const { + // @@protoc_insertion_point(field_map:tensorflow.CallableOptions.fetch_devices) + return _internal_fetch_devices(); +} +inline ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >* +CallableOptions::_internal_mutable_fetch_devices() { + return _impl_.fetch_devices_.MutableMap(); +} +inline ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >* +CallableOptions::mutable_fetch_devices() { + // @@protoc_insertion_point(field_mutable_map:tensorflow.CallableOptions.fetch_devices) + return _internal_mutable_fetch_devices(); +} + +// bool fetch_skip_sync = 8; +inline void CallableOptions::clear_fetch_skip_sync() { + _impl_.fetch_skip_sync_ = false; +} +inline bool CallableOptions::_internal_fetch_skip_sync() const { + return _impl_.fetch_skip_sync_; +} +inline bool CallableOptions::fetch_skip_sync() const { + // @@protoc_insertion_point(field_get:tensorflow.CallableOptions.fetch_skip_sync) + return _internal_fetch_skip_sync(); +} +inline void CallableOptions::_internal_set_fetch_skip_sync(bool value) { + + _impl_.fetch_skip_sync_ = value; +} +inline void CallableOptions::set_fetch_skip_sync(bool value) { + _internal_set_fetch_skip_sync(value); + // @@protoc_insertion_point(field_set:tensorflow.CallableOptions.fetch_skip_sync) +} + +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + + +// @@protoc_insertion_point(namespace_scope) + +} // namespace tensorflow + +PROTOBUF_NAMESPACE_OPEN + +template <> struct is_proto_enum< ::tensorflow::OptimizerOptions_Level> : ::std::true_type {}; +template <> +inline const EnumDescriptor* GetEnumDescriptor< ::tensorflow::OptimizerOptions_Level>() { + return ::tensorflow::OptimizerOptions_Level_descriptor(); +} +template <> struct is_proto_enum< ::tensorflow::OptimizerOptions_GlobalJitLevel> : ::std::true_type {}; +template <> +inline const EnumDescriptor* GetEnumDescriptor< ::tensorflow::OptimizerOptions_GlobalJitLevel>() { + return ::tensorflow::OptimizerOptions_GlobalJitLevel_descriptor(); +} +template <> struct is_proto_enum< ::tensorflow::ConfigProto_Experimental_MlirBridgeRollout> : ::std::true_type {}; +template <> +inline const EnumDescriptor* GetEnumDescriptor< ::tensorflow::ConfigProto_Experimental_MlirBridgeRollout>() { + return ::tensorflow::ConfigProto_Experimental_MlirBridgeRollout_descriptor(); +} +template <> struct is_proto_enum< ::tensorflow::RunOptions_TraceLevel> : ::std::true_type {}; +template <> +inline const EnumDescriptor* GetEnumDescriptor< ::tensorflow::RunOptions_TraceLevel>() { + return ::tensorflow::RunOptions_TraceLevel_descriptor(); +} + +PROTOBUF_NAMESPACE_CLOSE + +// @@protoc_insertion_point(global_scope) + +#include +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprotobuf_2fconfig_2eproto diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/config.proto b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/config.proto new file mode 100644 index 0000000000000000000000000000000000000000..de23bad54d98decf7760b50c18e07add926049f7 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/config.proto @@ -0,0 +1,922 @@ +syntax = "proto3"; + +package tensorflow; + +import "tensorflow/core/framework/cost_graph.proto"; +import "tensorflow/core/framework/graph.proto"; +import "tensorflow/core/framework/step_stats.proto"; +import "tensorflow/core/protobuf/cluster.proto"; +import "tensorflow/core/protobuf/debug.proto"; +import "tensorflow/core/protobuf/rewriter_config.proto"; +import "tensorflow/core/protobuf/rpc_options.proto"; +import "tsl/protobuf/coordination_config.proto"; + +option cc_enable_arenas = true; +option java_outer_classname = "ConfigProtos"; +option java_multiple_files = true; +option java_package = "org.tensorflow.framework"; +option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/protobuf/for_core_protos_go_proto"; + +message GPUOptions { + // Fraction of the total GPU memory to allocate for each process. + // 1 means to allocate all of the GPU memory, 0.5 means the process + // allocates up to ~50% of the total GPU memory. + // + // GPU memory is pre-allocated unless the allow_growth option is enabled. + // + // If greater than 1.0, uses CUDA unified memory to potentially oversubscribe + // the amount of memory available on the GPU device by using host memory as a + // swap space. Accessing memory not available on the device will be + // significantly slower as that would require memory transfer between the host + // and the device. Options to reduce the memory requirement should be + // considered before enabling this option as this may come with a negative + // performance impact. Oversubscription using the unified memory requires + // Pascal class or newer GPUs and it is currently only supported on the Linux + // operating system. See + // https://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html#um-requirements + // for the detailed requirements. + double per_process_gpu_memory_fraction = 1; + + // If true, the allocator does not pre-allocate the entire specified + // GPU memory region, instead starting small and growing as needed. + bool allow_growth = 4; + + // The type of GPU allocation strategy to use. + // + // Allowed values: + // "": The empty string (default) uses a system-chosen default + // which may change over time. + // + // "BFC": A "Best-fit with coalescing" algorithm, simplified from a + // version of dlmalloc. + string allocator_type = 2; + + // Delay deletion of up to this many bytes to reduce the number of + // interactions with gpu driver code. If 0, the system chooses + // a reasonable default (several MBs). + int64 deferred_deletion_bytes = 3; + + // A comma-separated list of GPU ids that determines the 'visible' + // to 'virtual' mapping of GPU devices. For example, if TensorFlow + // can see 8 GPU devices in the process, and one wanted to map + // visible GPU devices 5 and 3 as "/device:GPU:0", and "/device:GPU:1", + // then one would specify this field as "5,3". This field is similar in + // spirit to the CUDA_VISIBLE_DEVICES environment variable, except + // it applies to the visible GPU devices in the process. + // + // NOTE: + // 1. The GPU driver provides the process with the visible GPUs + // in an order which is not guaranteed to have any correlation to + // the *physical* GPU id in the machine. This field is used for + // remapping "visible" to "virtual", which means this operates only + // after the process starts. Users are required to use vendor + // specific mechanisms (e.g., CUDA_VISIBLE_DEVICES) to control the + // physical to visible device mapping prior to invoking TensorFlow. + // 2. In the code, the ids in this list are also called "platform GPU id"s, + // and the 'virtual' ids of GPU devices (i.e. the ids in the device + // name "/device:GPU:") are also called "TF GPU id"s. Please + // refer to third_party/tensorflow/core/common_runtime/gpu/gpu_id.h + // for more information. + string visible_device_list = 5; + + // In the event polling loop sleep this many microseconds between + // PollEvents calls, when the queue is not empty. If value is not + // set or set to 0, gets set to a non-zero default. + int32 polling_active_delay_usecs = 6; + + // This field is deprecated and ignored. + int32 polling_inactive_delay_msecs = 7; + + // Force all tensors to be gpu_compatible. On a GPU-enabled TensorFlow, + // enabling this option forces all CPU tensors to be allocated with Cuda + // pinned memory. Normally, TensorFlow will infer which tensors should be + // allocated as the pinned memory. But in case where the inference is + // incomplete, this option can significantly speed up the cross-device memory + // copy performance as long as it fits the memory. + // Note that this option is not something that should be + // enabled by default for unknown or very large models, since all Cuda pinned + // memory is unpageable, having too much pinned memory might negatively impact + // the overall host system performance. + bool force_gpu_compatible = 8; + + message Experimental { + // Configuration for breaking down a visible GPU into multiple "virtual" + // devices. + message VirtualDevices { + // Per "virtual" device memory limit, in MB. The number of elements in + // the list is the number of virtual devices to create on the + // corresponding visible GPU (see "virtual_devices" below). + // If empty and `num_virtual_devices_per_gpu` is not set, it will create + // single virtual device taking all available memory from the device. + // + // For the concept of "visible" and "virtual" GPU, see the comments for + // "visible_device_list" above for more information. + repeated float memory_limit_mb = 1; + + // Priority values to use with the virtual devices. Use the cuda function + // cudaDeviceGetStreamPriorityRange to query for valid range of values for + // priority. + // + // On a P4000 GPU with cuda 10.1, the priority range reported was 0 for + // least priority and -1 for greatest priority. + // + // If this field is not specified, then the virtual devices will be + // created with the default. If this field has values set, then the size + // of this must match with the above memory_limit_mb. + repeated int32 priority = 2; + + // Virtual Device ordinal number determines the device ID of the device. + // A Virtual device with a lower ordinal number always receives the a + // smaller device id. The phyiscal device id and location in the + // virtual device list is used to break ties. + repeated int32 device_ordinal = 3; + } + + // The multi virtual device settings. If empty (not set), it will create + // single virtual device on each visible GPU, according to the settings + // in "visible_device_list" above. Otherwise, the number of elements in the + // list must be the same as the number of visible GPUs (after + // "visible_device_list" filtering if it is set), and the string represented + // device names (e.g. /device:GPU:) will refer to the virtual + // devices and have the field assigned sequentially starting from 0, + // according to the order of the virtual devices determined by + // device_ordinal and the location in the virtual device list. + // + // For example, + // visible_device_list = "1,0" + // virtual_devices { memory_limit: 1GB memory_limit: 2GB } + // virtual_devices { memory_limit: 3GB memory_limit: 4GB } + // will create 4 virtual devices as: + // /device:GPU:0 -> visible GPU 1 with 1GB memory + // /device:GPU:1 -> visible GPU 1 with 2GB memory + // /device:GPU:2 -> visible GPU 0 with 3GB memory + // /device:GPU:3 -> visible GPU 0 with 4GB memory + // + // but + // visible_device_list = "1,0" + // virtual_devices { memory_limit: 1GB memory_limit: 2GB + // device_ordinal: 10 device_ordinal: 20} + // virtual_devices { memory_limit: 3GB memory_limit: 4GB + // device_ordinal: 10 device_ordinal: 20} + // will create 4 virtual devices as: + // /device:GPU:0 -> visible GPU 1 with 1GB memory (ordinal 10) + // /device:GPU:1 -> visible GPU 0 with 3GB memory (ordinal 10) + // /device:GPU:2 -> visible GPU 1 with 2GB memory (ordinal 20) + // /device:GPU:3 -> visible GPU 0 with 4GB memory (ordinal 20) + // + // NOTE: + // 1. It's invalid to set both this and "per_process_gpu_memory_fraction" + // at the same time. + // 2. Currently this setting is per-process, not per-session. Using + // different settings in different sessions within same process will + // result in undefined behavior. + repeated VirtualDevices virtual_devices = 1; + + // The number of virtual devices to create on each visible GPU. The + // available memory will be split equally among all virtual devices. If the + // field `memory_limit_mb` in `VirtualDevices` is not empty, this field will + // be ignored. + int32 num_virtual_devices_per_gpu = 15; + + // If true, uses CUDA unified memory for memory allocations. If + // per_process_gpu_memory_fraction option is greater than 1.0, then unified + // memory is used regardless of the value for this field. See comments for + // per_process_gpu_memory_fraction field for more details and requirements + // of the unified memory. This option is useful to oversubscribe memory if + // multiple processes are sharing a single GPU while individually using less + // than 1.0 per process memory fraction. + bool use_unified_memory = 2; + + // If > 1, the number of device-to-device copy streams to create + // for each GPUDevice. Default value is 0, which is automatically + // converted to 1. + int32 num_dev_to_dev_copy_streams = 3; + + // If non-empty, defines a good GPU ring order on a single worker based on + // device interconnect. This assumes that all workers have the same GPU + // topology. Specify as a comma-separated string, e.g. "3,2,1,0,7,6,5,4". + // This ring order is used by the RingReducer implementation of + // CollectiveReduce, and serves as an override to automatic ring order + // generation in OrderTaskDeviceMap() during CollectiveParam resolution. + string collective_ring_order = 4; + + // If true then extra work is done by GPUDevice and GPUBFCAllocator to + // keep track of when GPU memory is freed and when kernels actually + // complete so that we can know when a nominally free memory chunk + // is really not subject to pending use. + bool timestamped_allocator = 5; + + // reserved id: 6 + + // Parameters for GPUKernelTracker. By default no kernel tracking is done. + // Note that timestamped_allocator is only effective if some tracking is + // specified. + // + // If kernel_tracker_max_interval = n > 0, then a tracking event + // is inserted after every n kernels without an event. + int32 kernel_tracker_max_interval = 7; + // If kernel_tracker_max_bytes = n > 0, then a tracking event is + // inserted after every series of kernels allocating a sum of + // memory >= n. If one kernel allocates b * n bytes, then one + // event will be inserted after it, but it will count as b against + // the pending limit. + int32 kernel_tracker_max_bytes = 8; + // If kernel_tracker_max_pending > 0 then no more than this many + // tracking events can be outstanding at a time. An attempt to + // launch an additional kernel will stall until an event + // completes. + int32 kernel_tracker_max_pending = 9; + + // BFC Allocator can return an allocated chunk of memory upto 2x the + // requested size. For virtual devices with tight memory constraints, and + // proportionately large allocation requests, this can lead to a significant + // reduction in available memory. The threshold below controls when a chunk + // should be split if the chunk size exceeds requested memory size. It is + // expressed as a fraction of total available memory for the tf device. For + // example setting it to 0.05 would imply a chunk needs to be split if its + // size exceeds the requested memory by 5% of the total virtual device/gpu + // memory size. + double internal_fragmentation_fraction = 10; + + // When true, use CUDA cudaMallocAsync API instead of TF gpu allocator. + bool use_cuda_malloc_async = 11; + + // By default, BFCAllocator may sleep when it runs out of memory, in the + // hopes that another thread will free up memory in the meantime. Setting + // this to true disables the sleep; instead we'll OOM immediately. + bool disallow_retry_on_allocation_failure = 12; + + // Memory limit for "GPU host allocator", aka pinned memory allocator. This + // can also be set via the envvar TF_GPU_HOST_MEM_LIMIT_IN_MB. + float gpu_host_mem_limit_in_mb = 13; + + // If true, then the host allocator allocates its max memory all upfront and + // never grows. This can be useful for latency-sensitive systems, because + // growing the GPU host memory pool can be expensive. + // + // You probably only want to use this in combination with + // gpu_host_mem_limit_in_mb, because the default GPU host memory limit is + // quite high. + bool gpu_host_mem_disallow_growth = 14; + + // Memory limit for gpu system. This can also be set by + // TF_DEVICE_MIN_SYS_MEMORY_IN_MB, which takes precedence over + // gpu_system_memory_size_in_mb. With this, user can configure the gpu + // system memory size for better resource estimation of multi-tenancy(one + // gpu with multiple model) use case. + int32 gpu_system_memory_size_in_mb = 16; + } + + // Everything inside experimental is subject to change and is not subject + // to API stability guarantees in + // https://www.tensorflow.org/guide/version_compat. + Experimental experimental = 9; +} + +// Options passed to the graph optimizer +message OptimizerOptions { + // If true, optimize the graph using common subexpression elimination. + // Note: the optimization Level L1 will override this setting to true. So in + // order to disable common subexpression elimination the opt_level has to be + // set to L0. + bool do_common_subexpression_elimination = 1; + + // If true, perform constant folding optimization on the graph. + // Note: the optimization Level L1 will override this setting to true. So in + // order to disable constant folding the opt_level has to be set to L0. + bool do_constant_folding = 2; + + // Constant folding optimization replaces tensors whose values can be + // predetermined, with constant nodes. To avoid inserting too large constants, + // the size of each constant created can be limited. If this value is zero, a + // default limit of 10 MiB will be applied. If constant folding optimization + // is disabled, this value is ignored. + int64 max_folded_constant_in_bytes = 6; + + // If true, perform function inlining on the graph. + bool do_function_inlining = 4; + + // Optimization level + enum Level { + // L1 is the default level. + // Optimization performed at L1 : + // 1. Common subexpression elimination + // 2. Constant folding + L1 = 0; + + // No optimizations + L0 = -1; + } + + // Overall optimization level. The actual optimizations applied will be the + // logical OR of the flags that this level implies and any flags already set. + Level opt_level = 3; + + // Control the use of the compiler/jit. Experimental. + enum GlobalJitLevel { + DEFAULT = 0; // Default setting ("off" now, but later expected to be "on") + OFF = -1; + // The following settings turn on compilation, with higher values being + // more aggressive. Higher values may reduce opportunities for parallelism + // and may use more memory. (At present, there is no distinction, but this + // is expected to change.) + ON_1 = 1; + ON_2 = 2; + } + GlobalJitLevel global_jit_level = 5; + + // CPU code will be autoclustered only if global_jit_level >= ON_1 and either: + // - this flag is true, or + // - TF_XLA_FLAGS contains --tf_xla_cpu_global_jit=true. + bool cpu_global_jit = 7; +} + +message GraphOptions { + // Removed, use optimizer_options below. + reserved "skip_common_subexpression_elimination"; + reserved 1; + + // If true, use control flow to schedule the activation of Recv nodes. + // (Currently ignored.) + bool enable_recv_scheduling = 2; + + // Options controlling how graph is optimized. + OptimizerOptions optimizer_options = 3; + + // The number of steps to run before returning a cost model detailing + // the memory usage and performance of each node of the graph. 0 means + // no cost model. + int64 build_cost_model = 4; + + // The number of steps to skip before collecting statistics for the + // cost model. + int64 build_cost_model_after = 9; + + // Annotate each Node with Op output shape data, to the extent it can + // be statically inferred. + bool infer_shapes = 5; + + // Only place the subgraphs that are run, rather than the entire graph. + // + // This is useful for interactive graph building, where one might + // produce graphs that cannot be placed during the debugging + // process. In particular, it allows the client to continue work in + // a session after adding a node to a graph whose placement + // constraints are unsatisfiable. + bool place_pruned_graph = 6; + + // If true, transfer float values between processes as bfloat16. + bool enable_bfloat16_sendrecv = 7; + + // If > 0, record a timeline every this many steps. + // EXPERIMENTAL: This currently has no effect in MasterSession. + int32 timeline_step = 8; + + // Options that control the type and amount of graph rewriting. + // Not currently configurable via the public Python API (i.e. there is no API + // stability guarantee if you import RewriterConfig explicitly). + RewriterConfig rewrite_options = 10; +} + +message ThreadPoolOptionProto { + // The number of threads in the pool. + // + // 0 means the system picks a value based on where this option proto is used + // (see the declaration of the specific field for more info). + int32 num_threads = 1; + + // The global name of the threadpool. + // + // If empty, then the threadpool is made and used according to the scope it's + // in - e.g., for a session threadpool, it is used by that session only. + // + // If non-empty, then: + // - a global threadpool associated with this name is looked + // up or created. This allows, for example, sharing one threadpool across + // many sessions (e.g., like the default behavior, if + // inter_op_parallelism_threads is not configured), but still partitioning + // into a large and small pool. + // - if the threadpool for this global_name already exists, then it is an + // error if the existing pool was created using a different num_threads + // value as is specified on this call. + // - threadpools created this way are never garbage collected. + string global_name = 2; +} + +// Metadata about the session. +// +// This can be used by the runtime and the Ops for debugging, monitoring, etc. +// +// The (name, version) tuple is expected to be a unique identifier for +// sessions within the same process. +// +// NOTE: This is currently used and propagated only by the direct session. +message SessionMetadata { + string name = 1; + + // The version is optional. If set, needs to be >= 0. + int64 version = 2; +} + +// Session configuration parameters. +// The system picks appropriate values for fields that are not set. +message ConfigProto { + // Map from device type name (e.g., "CPU" or "GPU" ) to maximum + // number of devices of that type to use. If a particular device + // type is not found in the map, the system picks an appropriate + // number. + map device_count = 1; + + // The execution of an individual op (for some op types) can be + // parallelized on a pool of intra_op_parallelism_threads. + // 0 means the system picks an appropriate number. + // + // If you create an ordinary session, e.g., from Python or C++, + // then there is exactly one intra op thread pool per process. + // The first session created determines the number of threads in this pool. + // All subsequent sessions reuse/share this one global pool. + // + // There are notable exceptions to the default behavior described above: + // 1. There is an environment variable for overriding this thread pool, + // named TF_OVERRIDE_GLOBAL_THREADPOOL. + // 2. When connecting to a server, such as a remote `tf.train.Server` + // instance, then this option will be ignored altogether. + int32 intra_op_parallelism_threads = 2; + + // Nodes that perform blocking operations are enqueued on a pool of + // inter_op_parallelism_threads available in each process. + // + // 0 means the system picks an appropriate number. + // Negative means all operations are performed in caller's thread. + // + // Note that the first Session created in the process sets the + // number of threads for all future sessions unless use_per_session_threads is + // true or session_inter_op_thread_pool is configured. + int32 inter_op_parallelism_threads = 5; + + // If true, use a new set of threads for this session rather than the global + // pool of threads. Only supported by direct sessions. + // + // If false, use the global threads created by the first session, or the + // per-session thread pools configured by session_inter_op_thread_pool. + // + // This option is deprecated. The same effect can be achieved by setting + // session_inter_op_thread_pool to have one element, whose num_threads equals + // inter_op_parallelism_threads. + bool use_per_session_threads = 9; + + // This option is experimental - it may be replaced with a different mechanism + // in the future. + // + // Configures session thread pools. If this is configured, then RunOptions for + // a Run call can select the thread pool to use. + // + // The intended use is for when some session invocations need to run in a + // background pool limited to a small number of threads: + // - For example, a session may be configured to have one large pool (for + // regular compute) and one small pool (for periodic, low priority work); + // using the small pool is currently the mechanism for limiting the inter-op + // parallelism of the low priority work. Note that it does not limit the + // parallelism of work spawned by a single op kernel implementation. + // - Using this setting is normally not needed in training, but may help some + // serving use cases. + // - It is also generally recommended to set the global_name field of this + // proto, to avoid creating multiple large pools. It is typically better to + // run the non-low-priority work, even across sessions, in a single large + // pool. + repeated ThreadPoolOptionProto session_inter_op_thread_pool = 12; + + // Assignment of Nodes to Devices is recomputed every placement_period + // steps until the system warms up (at which point the recomputation + // typically slows down automatically). + int32 placement_period = 3; + + // When any filters are present sessions will ignore all devices which do not + // match the filters. Each filter can be partially specified, e.g. "/job:ps" + // "/job:worker/replica:3", etc. + repeated string device_filters = 4; + + // Options that apply to all GPUs. + GPUOptions gpu_options = 6; + + // Whether soft placement is allowed. If allow_soft_placement is true, + // an op will be placed on CPU if + // 1. there's no GPU implementation for the OP + // or + // 2. no GPU devices are known or registered + // or + // 3. need to co-locate with reftype input(s) which are from CPU. + bool allow_soft_placement = 7; + + // Whether device placements should be logged. + bool log_device_placement = 8; + + // Options that apply to all graphs. + GraphOptions graph_options = 10; + + // Global timeout for all blocking operations in this session. If non-zero, + // and not overridden on a per-operation basis, this value will be used as the + // deadline for all blocking operations. + int64 operation_timeout_in_ms = 11; + + // Options that apply when this session uses the distributed runtime. + RPCOptions rpc_options = 13; + + // Optional list of all workers to use in this session. + ClusterDef cluster_def = 14; + + // If true, any resources such as Variables used in the session will not be + // shared with other sessions. However, when clusterspec propagation is + // enabled, this field is ignored and sessions are always isolated. + bool isolate_session_state = 15; + + // When true, WorkerSessions are created with device attributes from the + // full cluster. + // This is helpful when a worker wants to partition a graph + // (for example during a PartitionedCallOp). + bool share_cluster_devices_in_session = 17; + + // Everything inside Experimental is subject to change and is not subject + // to API stability guarantees in + // https://www.tensorflow.org/guide/version_compat. + message Experimental { + // Task name for group resolution. + string collective_group_leader = 1; + + // We removed the flag client_handles_error_formatting. Marking the tag + // number as reserved. + // TODO(shikharagarwal): Should we just remove this tag so that it can be + // used in future for other purpose? + reserved 2; + + // Which executor to use, the default executor will be used + // if it is an empty string or "DEFAULT" + string executor_type = 3; + + // Guidance to formatting of large RecvBuf fields for transfer. + // Any positive value sets the max chunk size. 0 defaults to 4096. + // Any negative value indicates no max, i.e. one chunk only. + int32 recv_buf_max_chunk = 4; + + // If true, and supported by the platform, the runtime will attempt to + // use NUMA affinity where applicable. One consequence will be the + // existence of as many CPU devices as there are available NUMA nodes. + bool use_numa_affinity = 5; + + // If true, make collective op execution order sequential and deterministic + // for potentially concurrent collective instances. + bool collective_deterministic_sequential_execution = 6; + + // If true, use NCCL for CollectiveOps. This feature is highly + // experimental. + bool collective_nccl = 7; + + // In the following, session state means the value of a variable, elements + // in a hash table, or any other resource, accessible by worker sessions + // held by a TF server. + // + // When ClusterSpec propagation is enabled, the value of + // isolate_session_state is ignored when deciding whether to share session + // states in a TF server (for backwards compatibility reasons). + // - If share_session_state_in_clusterspec_propagation is true, the session + // states are shared. + // - If share_session_state_in_clusterspec_propagation is false, session + // states are isolated. + // + // When clusterspec propagation is not used, the value of + // share_session_state_in_clusterspec_propagation is ignored when deciding + // whether to share session states in a TF server. + // - If isolate_session_state is true, session states are isolated. + // - If isolate_session_state is false, session states are shared. + // + // TODO(b/129330037): Add a single API that consistently treats + // isolate_session_state and ClusterSpec propagation. + bool share_session_state_in_clusterspec_propagation = 8; + + // If using a direct session, disable spinning while waiting for work in + // the thread pool. This may result in higher latency for completing ops, + // but in the case where there is a lot of spinning may result in lower + // CPU usage. + bool disable_thread_spinning = 9; + + // This was promoted to a non-experimental API. Please use + // ConfigProto.share_cluster_devices_in_session instead. + bool share_cluster_devices_in_session = 10; + + // Metadata about the session. + // + // If set, this can be used by the runtime and the Ops for debugging, + // monitoring, etc. + // + // NOTE: This is currently used and propagated only by the direct session + // and EagerContext. + SessionMetadata session_metadata = 11; + + // If true, the session may treat the graph as being static for optimization + // purposes. + // + // If this option is set to true when a session is created, the full + // GraphDef must be passed in a single call to Session::Create(), and + // Session::Extend() may not be supported. + bool optimize_for_static_graph = 12; + + // Whether to enable the MLIR-based TF->XLA bridge. This is only used if set + // to true. Default value or false is ignored. Use mlir_bridge_rollout for + // finer control. + // + // If this option is set to true when a session is created, MLIR is used to + // perform the set of graph transformations to put the graph in a form that + // can be executed with delegation of some computations to an accelerator. + // This builds on the model of XLA where a subset of the graph is + // encapsulated and attached to a "compile" operation, whose result is fed + // to an "execute" operation. The kernel for these operations is responsible + // to lower the encapsulated graph to a particular device. + bool enable_mlir_bridge = 13; + + // An enum that describes the state of the MLIR bridge rollout. + enum MlirBridgeRollout { + // If this field is left unspecified, the MLIR bridge may be selectively + // enabled on a per graph basis. + MLIR_BRIDGE_ROLLOUT_UNSPECIFIED = 0; + // Enabling the MLIR bridge enables it for all graphs in this session. + MLIR_BRIDGE_ROLLOUT_ENABLED = 1; + // Disabling the MLIR bridge disables it for all graphs in this session. + MLIR_BRIDGE_ROLLOUT_DISABLED = 2; + reserved 3, 4; + reserved "MLIR_BRIDGE_ROLLOUT_SAFE_MODE_ENABLED", + "MLIR_BRIDGE_ROLLOUT_SAFE_MODE_FALLBACK_ENABLED"; + } + // Whether to enable the MLIR-based TF->XLA bridge. + MlirBridgeRollout mlir_bridge_rollout = 17; + + // Whether to enable the MLIR-based Graph optimizations. + // + // This will become a part of standard Tensorflow graph optimization + // pipeline, currently this is only used for gradual migration and testing + // new passes that are replacing existing optimizations in Grappler. + bool enable_mlir_graph_optimization = 16; + + // If true, the session will not store an additional copy of the graph for + // each subgraph. + // + // If this option is set to true when a session is created, the + // `RunOptions.output_partition_graphs` options must not be set. + bool disable_output_partition_graphs = 14; + + // Minimum number of batches run through the XLA graph before XLA fusion + // autotuner is enabled. Default value of zero disables the autotuner. + // + // The XLA fusion autotuner can improve performance by executing a heuristic + // search on the compiler parameters. + int64 xla_fusion_autotuner_thresh = 15; + + // Whether runtime execution uses TFRT. + bool use_tfrt = 18; + + // The field "coordination_service was previously specified as a string; + // this has been replaced with a message below. + reserved 19; + + // We removed the flag fetch_remote_devices_in_multi_client. Marking the tag + // number as reserved. + reserved 20; + + // Whether functional control flow op lowering should be disabled. This is + // useful when executing within a portable runtime where control flow op + // kernels may not be loaded due to selective registration. + bool disable_functional_ops_lowering = 21; + + // Provides a hint to XLA auto clustering to prefer forming a single large + // cluster that encompases most of the graph. + bool xla_prefer_single_graph_cluster = 22; + + // Distributed coordination service configurations. + CoordinationServiceConfig coordination_config = 23; + + // If true, the session will treat the graph as being non-static for + // optimization purposes. + // + // If this option is set to true when a session is created, the full + // GraphDef will be retained to enable calls to Session::Extend(). + // Calling Extend() without setting this flag will result in errors. + // + // This option is meant to replace `optimize_for_static_graph` and it + // aims to negate its value. + bool disable_optimize_for_static_graph = 24; + + // Whether eager remote execution will stream all the function calls or + // allow them to happen in parallel. When true, streaming execution is + // disabled, and parallel execution is allowed. + bool disable_eager_executor_streaming_enqueue = 26; + + reserved 25; + + // Next: 27 + } + + Experimental experimental = 16; + + // Next: 18 +} + +// Options for a single Run() call. +message RunOptions { + // TODO(pbar) Turn this into a TraceOptions proto which allows + // tracing to be controlled in a more orthogonal manner? + enum TraceLevel { + NO_TRACE = 0; + SOFTWARE_TRACE = 1; + HARDWARE_TRACE = 2; + FULL_TRACE = 3; + } + TraceLevel trace_level = 1; + + // Time to wait for operation to complete in milliseconds. + int64 timeout_in_ms = 2; + + // The thread pool to use, if session_inter_op_thread_pool is configured. + // To use the caller thread set this to -1 - this uses the caller thread + // to execute Session::Run() and thus avoids a context switch. Using the + // caller thread to execute Session::Run() should be done ONLY for simple + // graphs, where the overhead of an additional context switch is + // comparable with the overhead of Session::Run(). + int32 inter_op_thread_pool = 3; + + // Whether the partition graph(s) executed by the executor(s) should be + // outputted via RunMetadata. + bool output_partition_graphs = 5; + + // EXPERIMENTAL. Options used to initialize DebuggerState, if enabled. + DebugOptions debug_options = 6; + + // When enabled, causes tensor allocation information to be included in + // the error message when the Run() call fails because the allocator ran + // out of memory (OOM). + // + // Enabling this option can slow down the Run() call. + bool report_tensor_allocations_upon_oom = 7; + + // Everything inside Experimental is subject to change and is not subject + // to API stability guarantees in + // https://www.tensorflow.org/guide/version_compat. + message Experimental { + // If non-zero, declares that this graph is going to use collective + // ops and must synchronize step_ids with any other graph with this + // same group_key value (in a distributed computation where tasks + // run disjoint graphs). + int64 collective_graph_key = 1; + // If true, then operations (using the inter-op pool) across all + // session::run() calls will be centrally scheduled, optimizing for (median + // and tail) latency. + // Consider using this option for CPU-bound workloads like inference. + bool use_run_handler_pool = 2; + // Options for run handler thread pool. + message RunHandlerPoolOptions { + // Priority of the request. The run handler thread pool will schedule ops + // based on the priority number. The larger number means higher priority. + int64 priority = 1; + } + RunHandlerPoolOptions run_handler_pool_options = 3; + } + + Experimental experimental = 8; + + reserved 4; +} + +// Metadata output (i.e., non-Tensor) for a single Run() call. +message RunMetadata { + // Statistics traced for this step. Populated if tracing is turned on via the + // "RunOptions" proto. + // EXPERIMENTAL: The format and set of events may change in future versions. + StepStats step_stats = 1; + + // The cost graph for the computation defined by the run call. + CostGraphDef cost_graph = 2; + + // Graphs of the partitions executed by executors. + repeated GraphDef partition_graphs = 3; + + message FunctionGraphs { + // TODO(nareshmodi): Include some sort of function/cache-key identifier? + repeated GraphDef partition_graphs = 1; + + GraphDef pre_optimization_graph = 2; + GraphDef post_optimization_graph = 3; + } + // This is only populated for graphs that are run as functions in TensorFlow + // V2. There will be an entry below for each function that is traced. + // The main use cases of the post_optimization_graph and the partition_graphs + // is to give the caller insight into the graphs that were actually run by the + // runtime. Additional information (such as those in step_stats) will match + // these graphs. + // We also include the pre_optimization_graph since it is usually easier to + // read, and is helpful in situations where the caller wants to get a high + // level idea of what the built graph looks like (since the various graph + // optimization passes might change the structure of the graph significantly). + repeated FunctionGraphs function_graphs = 4; + + // Metadata about the session. + SessionMetadata session_metadata = 5; +} + +// Defines a connection between two tensors in a `GraphDef`. +message TensorConnection { + // A tensor name. The value of this tensor will be substituted for + // the tensor named in `to_tensor`. + string from_tensor = 1; + + // A tensor name. The value of this tensor will be bound to the + // value of the tensor named in `from_tensor`. + string to_tensor = 2; +} + +// Defines a subgraph in another `GraphDef` as a set of feed points and nodes +// to be fetched or executed. +// +// Compare with the arguments to `Session::Run()`. +message CallableOptions { + // Tensors to be fed in the callable. Each feed is the name of a tensor. + repeated string feed = 1; + + // Fetches. A list of tensor names. The caller of the callable expects a + // tensor to be returned for each fetch[i] (see RunStepResponse.tensor). The + // order of specified fetches does not change the execution order. + repeated string fetch = 2; + + // Target Nodes. A list of node names. The named nodes will be run by the + // callable but their outputs will not be returned. + repeated string target = 3; + + // Options that will be applied to each run. + RunOptions run_options = 4; + + // Tensors to be connected in the callable. Each TensorConnection denotes + // a pair of tensors in the graph, between which an edge will be created + // in the callable. + repeated TensorConnection tensor_connection = 5; + + // The Tensor objects fed in the callable and fetched from the callable + // are expected to be backed by host (CPU) memory by default. + // + // The options below allow changing that - feeding tensors backed by + // device memory, or returning tensors that are backed by device memory. + // + // The maps below map the name of a feed/fetch tensor (which appears in + // 'feed' or 'fetch' fields above), to the fully qualified name of the device + // owning the memory backing the contents of the tensor. + // + // For example, creating a callable with the following options: + // + // CallableOptions { + // feed: "a:0" + // feed: "b:0" + // + // fetch: "x:0" + // fetch: "y:0" + // + // feed_devices: { + // "a:0": "/job:localhost/replica:0/task:0/device:GPU:0" + // } + // + // fetch_devices: { + // "y:0": "/job:localhost/replica:0/task:0/device:GPU:0" + // } + // } + // + // means that the Callable expects: + // - The first argument ("a:0") is a Tensor backed by GPU memory. + // - The second argument ("b:0") is a Tensor backed by host memory. + // and of its return values: + // - The first output ("x:0") will be backed by host memory. + // - The second output ("y:0") will be backed by GPU memory. + // + // FEEDS: + // It is the responsibility of the caller to ensure that the memory of the fed + // tensors will be correctly initialized and synchronized before it is + // accessed by operations executed during the call to Session::RunCallable(). + // + // This is typically ensured by using the TensorFlow memory allocators + // (Device::GetAllocator()) to create the Tensor to be fed. + // + // Alternatively, for CUDA-enabled GPU devices, this typically means that the + // operation that produced the contents of the tensor has completed, i.e., the + // CUDA stream has been synchronized (e.g., via cuCtxSynchronize() or + // cuStreamSynchronize()). + map feed_devices = 6; + map fetch_devices = 7; + + // By default, RunCallable() will synchronize the GPU stream before returning + // fetched tensors on a GPU device, to ensure that the values in those tensors + // have been produced. This simplifies interacting with the tensors, but + // potentially incurs a performance hit. + // + // If this options is set to true, the caller is responsible for ensuring + // that the values in the fetched tensors have been produced before they are + // used. The caller can do this by invoking `Device::Sync()` on the underlying + // device(s), or by feeding the tensors back to the same Session using + // `feed_devices` with the same corresponding device name. + bool fetch_skip_sync = 8; + + // Next: 9 +} diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/control_flow.pb.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/control_flow.pb.h new file mode 100644 index 0000000000000000000000000000000000000000..6b74d54d2331600ecb62be16a0d500dd31a74130 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/control_flow.pb.h @@ -0,0 +1,2262 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/control_flow.proto + +#ifndef GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprotobuf_2fcontrol_5fflow_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprotobuf_2fcontrol_5fflow_2eproto + +#include +#include + +#include +#if PROTOBUF_VERSION < 3021000 +#error This file was generated by a newer version of protoc which is +#error incompatible with your Protocol Buffer headers. Please update +#error your headers. +#endif +#if 3021009 < PROTOBUF_MIN_PROTOC_VERSION +#error This file was generated by an older version of protoc which is +#error incompatible with your Protocol Buffer headers. Please +#error regenerate this file with a newer version of protoc. +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include // IWYU pragma: export +#include // IWYU pragma: export +#include // IWYU pragma: export +#include +#include +#include +// @@protoc_insertion_point(includes) +#include +#define PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2fprotobuf_2fcontrol_5fflow_2eproto +PROTOBUF_NAMESPACE_OPEN +namespace internal { +class AnyMetadata; +} // namespace internal +PROTOBUF_NAMESPACE_CLOSE + +// Internal implementation detail -- do not use these members. +struct TableStruct_tensorflow_2fcore_2fprotobuf_2fcontrol_5fflow_2eproto { + static const uint32_t offsets[]; +}; +extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_tensorflow_2fcore_2fprotobuf_2fcontrol_5fflow_2eproto; +namespace tensorflow { +class CondContextDef; +struct CondContextDefDefaultTypeInternal; +extern CondContextDefDefaultTypeInternal _CondContextDef_default_instance_; +class ControlFlowContextDef; +struct ControlFlowContextDefDefaultTypeInternal; +extern ControlFlowContextDefDefaultTypeInternal _ControlFlowContextDef_default_instance_; +class ValuesDef; +struct ValuesDefDefaultTypeInternal; +extern ValuesDefDefaultTypeInternal _ValuesDef_default_instance_; +class ValuesDef_ExternalValuesEntry_DoNotUse; +struct ValuesDef_ExternalValuesEntry_DoNotUseDefaultTypeInternal; +extern ValuesDef_ExternalValuesEntry_DoNotUseDefaultTypeInternal _ValuesDef_ExternalValuesEntry_DoNotUse_default_instance_; +class WhileContextDef; +struct WhileContextDefDefaultTypeInternal; +extern WhileContextDefDefaultTypeInternal _WhileContextDef_default_instance_; +} // namespace tensorflow +PROTOBUF_NAMESPACE_OPEN +template<> ::tensorflow::CondContextDef* Arena::CreateMaybeMessage<::tensorflow::CondContextDef>(Arena*); +template<> ::tensorflow::ControlFlowContextDef* Arena::CreateMaybeMessage<::tensorflow::ControlFlowContextDef>(Arena*); +template<> ::tensorflow::ValuesDef* Arena::CreateMaybeMessage<::tensorflow::ValuesDef>(Arena*); +template<> ::tensorflow::ValuesDef_ExternalValuesEntry_DoNotUse* Arena::CreateMaybeMessage<::tensorflow::ValuesDef_ExternalValuesEntry_DoNotUse>(Arena*); +template<> ::tensorflow::WhileContextDef* Arena::CreateMaybeMessage<::tensorflow::WhileContextDef>(Arena*); +PROTOBUF_NAMESPACE_CLOSE +namespace tensorflow { + +// =================================================================== + +class ValuesDef_ExternalValuesEntry_DoNotUse : public ::PROTOBUF_NAMESPACE_ID::internal::MapEntry { +public: + typedef ::PROTOBUF_NAMESPACE_ID::internal::MapEntry SuperType; + ValuesDef_ExternalValuesEntry_DoNotUse(); + explicit PROTOBUF_CONSTEXPR ValuesDef_ExternalValuesEntry_DoNotUse( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + explicit ValuesDef_ExternalValuesEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena); + void MergeFrom(const ValuesDef_ExternalValuesEntry_DoNotUse& other); + static const ValuesDef_ExternalValuesEntry_DoNotUse* internal_default_instance() { return reinterpret_cast(&_ValuesDef_ExternalValuesEntry_DoNotUse_default_instance_); } + static bool ValidateKey(std::string* s) { + return ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(s->data(), static_cast(s->size()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, "tensorflow.ValuesDef.ExternalValuesEntry.key"); + } + static bool ValidateValue(std::string* s) { + return ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(s->data(), static_cast(s->size()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, "tensorflow.ValuesDef.ExternalValuesEntry.value"); + } + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fcontrol_5fflow_2eproto; +}; + +// ------------------------------------------------------------------- + +class ValuesDef final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.ValuesDef) */ { + public: + inline ValuesDef() : ValuesDef(nullptr) {} + ~ValuesDef() override; + explicit PROTOBUF_CONSTEXPR ValuesDef(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + ValuesDef(const ValuesDef& from); + ValuesDef(ValuesDef&& from) noexcept + : ValuesDef() { + *this = ::std::move(from); + } + + inline ValuesDef& operator=(const ValuesDef& from) { + CopyFrom(from); + return *this; + } + inline ValuesDef& operator=(ValuesDef&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const ValuesDef& default_instance() { + return *internal_default_instance(); + } + static inline const ValuesDef* internal_default_instance() { + return reinterpret_cast( + &_ValuesDef_default_instance_); + } + static constexpr int kIndexInFileMessages = + 1; + + friend void swap(ValuesDef& a, ValuesDef& b) { + a.Swap(&b); + } + inline void Swap(ValuesDef* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(ValuesDef* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + ValuesDef* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const ValuesDef& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const ValuesDef& from) { + ValuesDef::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(ValuesDef* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.ValuesDef"; + } + protected: + explicit ValuesDef(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + + // accessors ------------------------------------------------------- + + enum : int { + kValuesFieldNumber = 1, + kExternalValuesFieldNumber = 2, + }; + // repeated string values = 1; + int values_size() const; + private: + int _internal_values_size() const; + public: + void clear_values(); + const std::string& values(int index) const; + std::string* mutable_values(int index); + void set_values(int index, const std::string& value); + void set_values(int index, std::string&& value); + void set_values(int index, const char* value); + void set_values(int index, const char* value, size_t size); + std::string* add_values(); + void add_values(const std::string& value); + void add_values(std::string&& value); + void add_values(const char* value); + void add_values(const char* value, size_t size); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& values() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* mutable_values(); + private: + const std::string& _internal_values(int index) const; + std::string* _internal_add_values(); + public: + + // map external_values = 2; + int external_values_size() const; + private: + int _internal_external_values_size() const; + public: + void clear_external_values(); + private: + const ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >& + _internal_external_values() const; + ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >* + _internal_mutable_external_values(); + public: + const ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >& + external_values() const; + ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >* + mutable_external_values(); + + // @@protoc_insertion_point(class_scope:tensorflow.ValuesDef) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField values_; + ::PROTOBUF_NAMESPACE_ID::internal::MapField< + ValuesDef_ExternalValuesEntry_DoNotUse, + std::string, std::string, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING> external_values_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fcontrol_5fflow_2eproto; +}; +// ------------------------------------------------------------------- + +class ControlFlowContextDef final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.ControlFlowContextDef) */ { + public: + inline ControlFlowContextDef() : ControlFlowContextDef(nullptr) {} + ~ControlFlowContextDef() override; + explicit PROTOBUF_CONSTEXPR ControlFlowContextDef(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + ControlFlowContextDef(const ControlFlowContextDef& from); + ControlFlowContextDef(ControlFlowContextDef&& from) noexcept + : ControlFlowContextDef() { + *this = ::std::move(from); + } + + inline ControlFlowContextDef& operator=(const ControlFlowContextDef& from) { + CopyFrom(from); + return *this; + } + inline ControlFlowContextDef& operator=(ControlFlowContextDef&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const ControlFlowContextDef& default_instance() { + return *internal_default_instance(); + } + enum CtxtCase { + kCondCtxt = 1, + kWhileCtxt = 2, + CTXT_NOT_SET = 0, + }; + + static inline const ControlFlowContextDef* internal_default_instance() { + return reinterpret_cast( + &_ControlFlowContextDef_default_instance_); + } + static constexpr int kIndexInFileMessages = + 2; + + friend void swap(ControlFlowContextDef& a, ControlFlowContextDef& b) { + a.Swap(&b); + } + inline void Swap(ControlFlowContextDef* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(ControlFlowContextDef* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + ControlFlowContextDef* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const ControlFlowContextDef& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const ControlFlowContextDef& from) { + ControlFlowContextDef::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(ControlFlowContextDef* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.ControlFlowContextDef"; + } + protected: + explicit ControlFlowContextDef(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kCondCtxtFieldNumber = 1, + kWhileCtxtFieldNumber = 2, + }; + // .tensorflow.CondContextDef cond_ctxt = 1; + bool has_cond_ctxt() const; + private: + bool _internal_has_cond_ctxt() const; + public: + void clear_cond_ctxt(); + const ::tensorflow::CondContextDef& cond_ctxt() const; + PROTOBUF_NODISCARD ::tensorflow::CondContextDef* release_cond_ctxt(); + ::tensorflow::CondContextDef* mutable_cond_ctxt(); + void set_allocated_cond_ctxt(::tensorflow::CondContextDef* cond_ctxt); + private: + const ::tensorflow::CondContextDef& _internal_cond_ctxt() const; + ::tensorflow::CondContextDef* _internal_mutable_cond_ctxt(); + public: + void unsafe_arena_set_allocated_cond_ctxt( + ::tensorflow::CondContextDef* cond_ctxt); + ::tensorflow::CondContextDef* unsafe_arena_release_cond_ctxt(); + + // .tensorflow.WhileContextDef while_ctxt = 2; + bool has_while_ctxt() const; + private: + bool _internal_has_while_ctxt() const; + public: + void clear_while_ctxt(); + const ::tensorflow::WhileContextDef& while_ctxt() const; + PROTOBUF_NODISCARD ::tensorflow::WhileContextDef* release_while_ctxt(); + ::tensorflow::WhileContextDef* mutable_while_ctxt(); + void set_allocated_while_ctxt(::tensorflow::WhileContextDef* while_ctxt); + private: + const ::tensorflow::WhileContextDef& _internal_while_ctxt() const; + ::tensorflow::WhileContextDef* _internal_mutable_while_ctxt(); + public: + void unsafe_arena_set_allocated_while_ctxt( + ::tensorflow::WhileContextDef* while_ctxt); + ::tensorflow::WhileContextDef* unsafe_arena_release_while_ctxt(); + + void clear_ctxt(); + CtxtCase ctxt_case() const; + // @@protoc_insertion_point(class_scope:tensorflow.ControlFlowContextDef) + private: + class _Internal; + void set_has_cond_ctxt(); + void set_has_while_ctxt(); + + inline bool has_ctxt() const; + inline void clear_has_ctxt(); + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + union CtxtUnion { + constexpr CtxtUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + ::tensorflow::CondContextDef* cond_ctxt_; + ::tensorflow::WhileContextDef* while_ctxt_; + } ctxt_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + uint32_t _oneof_case_[1]; + + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fcontrol_5fflow_2eproto; +}; +// ------------------------------------------------------------------- + +class CondContextDef final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.CondContextDef) */ { + public: + inline CondContextDef() : CondContextDef(nullptr) {} + ~CondContextDef() override; + explicit PROTOBUF_CONSTEXPR CondContextDef(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + CondContextDef(const CondContextDef& from); + CondContextDef(CondContextDef&& from) noexcept + : CondContextDef() { + *this = ::std::move(from); + } + + inline CondContextDef& operator=(const CondContextDef& from) { + CopyFrom(from); + return *this; + } + inline CondContextDef& operator=(CondContextDef&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const CondContextDef& default_instance() { + return *internal_default_instance(); + } + static inline const CondContextDef* internal_default_instance() { + return reinterpret_cast( + &_CondContextDef_default_instance_); + } + static constexpr int kIndexInFileMessages = + 3; + + friend void swap(CondContextDef& a, CondContextDef& b) { + a.Swap(&b); + } + inline void Swap(CondContextDef* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(CondContextDef* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + CondContextDef* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const CondContextDef& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const CondContextDef& from) { + CondContextDef::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(CondContextDef* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.CondContextDef"; + } + protected: + explicit CondContextDef(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kNestedContextsFieldNumber = 6, + kContextNameFieldNumber = 1, + kPredNameFieldNumber = 2, + kPivotNameFieldNumber = 3, + kValuesDefFieldNumber = 5, + kBranchFieldNumber = 4, + }; + // repeated .tensorflow.ControlFlowContextDef nested_contexts = 6; + int nested_contexts_size() const; + private: + int _internal_nested_contexts_size() const; + public: + void clear_nested_contexts(); + ::tensorflow::ControlFlowContextDef* mutable_nested_contexts(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::ControlFlowContextDef >* + mutable_nested_contexts(); + private: + const ::tensorflow::ControlFlowContextDef& _internal_nested_contexts(int index) const; + ::tensorflow::ControlFlowContextDef* _internal_add_nested_contexts(); + public: + const ::tensorflow::ControlFlowContextDef& nested_contexts(int index) const; + ::tensorflow::ControlFlowContextDef* add_nested_contexts(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::ControlFlowContextDef >& + nested_contexts() const; + + // string context_name = 1; + void clear_context_name(); + const std::string& context_name() const; + template + void set_context_name(ArgT0&& arg0, ArgT... args); + std::string* mutable_context_name(); + PROTOBUF_NODISCARD std::string* release_context_name(); + void set_allocated_context_name(std::string* context_name); + private: + const std::string& _internal_context_name() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_context_name(const std::string& value); + std::string* _internal_mutable_context_name(); + public: + + // string pred_name = 2; + void clear_pred_name(); + const std::string& pred_name() const; + template + void set_pred_name(ArgT0&& arg0, ArgT... args); + std::string* mutable_pred_name(); + PROTOBUF_NODISCARD std::string* release_pred_name(); + void set_allocated_pred_name(std::string* pred_name); + private: + const std::string& _internal_pred_name() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_pred_name(const std::string& value); + std::string* _internal_mutable_pred_name(); + public: + + // string pivot_name = 3; + void clear_pivot_name(); + const std::string& pivot_name() const; + template + void set_pivot_name(ArgT0&& arg0, ArgT... args); + std::string* mutable_pivot_name(); + PROTOBUF_NODISCARD std::string* release_pivot_name(); + void set_allocated_pivot_name(std::string* pivot_name); + private: + const std::string& _internal_pivot_name() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_pivot_name(const std::string& value); + std::string* _internal_mutable_pivot_name(); + public: + + // .tensorflow.ValuesDef values_def = 5; + bool has_values_def() const; + private: + bool _internal_has_values_def() const; + public: + void clear_values_def(); + const ::tensorflow::ValuesDef& values_def() const; + PROTOBUF_NODISCARD ::tensorflow::ValuesDef* release_values_def(); + ::tensorflow::ValuesDef* mutable_values_def(); + void set_allocated_values_def(::tensorflow::ValuesDef* values_def); + private: + const ::tensorflow::ValuesDef& _internal_values_def() const; + ::tensorflow::ValuesDef* _internal_mutable_values_def(); + public: + void unsafe_arena_set_allocated_values_def( + ::tensorflow::ValuesDef* values_def); + ::tensorflow::ValuesDef* unsafe_arena_release_values_def(); + + // int32 branch = 4; + void clear_branch(); + int32_t branch() const; + void set_branch(int32_t value); + private: + int32_t _internal_branch() const; + void _internal_set_branch(int32_t value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.CondContextDef) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::ControlFlowContextDef > nested_contexts_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr context_name_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr pred_name_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr pivot_name_; + ::tensorflow::ValuesDef* values_def_; + int32_t branch_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fcontrol_5fflow_2eproto; +}; +// ------------------------------------------------------------------- + +class WhileContextDef final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.WhileContextDef) */ { + public: + inline WhileContextDef() : WhileContextDef(nullptr) {} + ~WhileContextDef() override; + explicit PROTOBUF_CONSTEXPR WhileContextDef(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + WhileContextDef(const WhileContextDef& from); + WhileContextDef(WhileContextDef&& from) noexcept + : WhileContextDef() { + *this = ::std::move(from); + } + + inline WhileContextDef& operator=(const WhileContextDef& from) { + CopyFrom(from); + return *this; + } + inline WhileContextDef& operator=(WhileContextDef&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const WhileContextDef& default_instance() { + return *internal_default_instance(); + } + static inline const WhileContextDef* internal_default_instance() { + return reinterpret_cast( + &_WhileContextDef_default_instance_); + } + static constexpr int kIndexInFileMessages = + 4; + + friend void swap(WhileContextDef& a, WhileContextDef& b) { + a.Swap(&b); + } + inline void Swap(WhileContextDef* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(WhileContextDef* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + WhileContextDef* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const WhileContextDef& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const WhileContextDef& from) { + WhileContextDef::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(WhileContextDef* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.WhileContextDef"; + } + protected: + explicit WhileContextDef(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kLoopExitNamesFieldNumber = 8, + kLoopEnterNamesFieldNumber = 10, + kNestedContextsFieldNumber = 12, + kContextNameFieldNumber = 1, + kPivotNameFieldNumber = 5, + kPivotForPredNameFieldNumber = 6, + kPivotForBodyNameFieldNumber = 7, + kMaximumIterationsNameFieldNumber = 11, + kValuesDefFieldNumber = 9, + kParallelIterationsFieldNumber = 2, + kBackPropFieldNumber = 3, + kSwapMemoryFieldNumber = 4, + }; + // repeated string loop_exit_names = 8; + int loop_exit_names_size() const; + private: + int _internal_loop_exit_names_size() const; + public: + void clear_loop_exit_names(); + const std::string& loop_exit_names(int index) const; + std::string* mutable_loop_exit_names(int index); + void set_loop_exit_names(int index, const std::string& value); + void set_loop_exit_names(int index, std::string&& value); + void set_loop_exit_names(int index, const char* value); + void set_loop_exit_names(int index, const char* value, size_t size); + std::string* add_loop_exit_names(); + void add_loop_exit_names(const std::string& value); + void add_loop_exit_names(std::string&& value); + void add_loop_exit_names(const char* value); + void add_loop_exit_names(const char* value, size_t size); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& loop_exit_names() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* mutable_loop_exit_names(); + private: + const std::string& _internal_loop_exit_names(int index) const; + std::string* _internal_add_loop_exit_names(); + public: + + // repeated string loop_enter_names = 10; + int loop_enter_names_size() const; + private: + int _internal_loop_enter_names_size() const; + public: + void clear_loop_enter_names(); + const std::string& loop_enter_names(int index) const; + std::string* mutable_loop_enter_names(int index); + void set_loop_enter_names(int index, const std::string& value); + void set_loop_enter_names(int index, std::string&& value); + void set_loop_enter_names(int index, const char* value); + void set_loop_enter_names(int index, const char* value, size_t size); + std::string* add_loop_enter_names(); + void add_loop_enter_names(const std::string& value); + void add_loop_enter_names(std::string&& value); + void add_loop_enter_names(const char* value); + void add_loop_enter_names(const char* value, size_t size); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& loop_enter_names() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* mutable_loop_enter_names(); + private: + const std::string& _internal_loop_enter_names(int index) const; + std::string* _internal_add_loop_enter_names(); + public: + + // repeated .tensorflow.ControlFlowContextDef nested_contexts = 12; + int nested_contexts_size() const; + private: + int _internal_nested_contexts_size() const; + public: + void clear_nested_contexts(); + ::tensorflow::ControlFlowContextDef* mutable_nested_contexts(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::ControlFlowContextDef >* + mutable_nested_contexts(); + private: + const ::tensorflow::ControlFlowContextDef& _internal_nested_contexts(int index) const; + ::tensorflow::ControlFlowContextDef* _internal_add_nested_contexts(); + public: + const ::tensorflow::ControlFlowContextDef& nested_contexts(int index) const; + ::tensorflow::ControlFlowContextDef* add_nested_contexts(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::ControlFlowContextDef >& + nested_contexts() const; + + // string context_name = 1; + void clear_context_name(); + const std::string& context_name() const; + template + void set_context_name(ArgT0&& arg0, ArgT... args); + std::string* mutable_context_name(); + PROTOBUF_NODISCARD std::string* release_context_name(); + void set_allocated_context_name(std::string* context_name); + private: + const std::string& _internal_context_name() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_context_name(const std::string& value); + std::string* _internal_mutable_context_name(); + public: + + // string pivot_name = 5; + void clear_pivot_name(); + const std::string& pivot_name() const; + template + void set_pivot_name(ArgT0&& arg0, ArgT... args); + std::string* mutable_pivot_name(); + PROTOBUF_NODISCARD std::string* release_pivot_name(); + void set_allocated_pivot_name(std::string* pivot_name); + private: + const std::string& _internal_pivot_name() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_pivot_name(const std::string& value); + std::string* _internal_mutable_pivot_name(); + public: + + // string pivot_for_pred_name = 6; + void clear_pivot_for_pred_name(); + const std::string& pivot_for_pred_name() const; + template + void set_pivot_for_pred_name(ArgT0&& arg0, ArgT... args); + std::string* mutable_pivot_for_pred_name(); + PROTOBUF_NODISCARD std::string* release_pivot_for_pred_name(); + void set_allocated_pivot_for_pred_name(std::string* pivot_for_pred_name); + private: + const std::string& _internal_pivot_for_pred_name() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_pivot_for_pred_name(const std::string& value); + std::string* _internal_mutable_pivot_for_pred_name(); + public: + + // string pivot_for_body_name = 7; + void clear_pivot_for_body_name(); + const std::string& pivot_for_body_name() const; + template + void set_pivot_for_body_name(ArgT0&& arg0, ArgT... args); + std::string* mutable_pivot_for_body_name(); + PROTOBUF_NODISCARD std::string* release_pivot_for_body_name(); + void set_allocated_pivot_for_body_name(std::string* pivot_for_body_name); + private: + const std::string& _internal_pivot_for_body_name() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_pivot_for_body_name(const std::string& value); + std::string* _internal_mutable_pivot_for_body_name(); + public: + + // string maximum_iterations_name = 11; + void clear_maximum_iterations_name(); + const std::string& maximum_iterations_name() const; + template + void set_maximum_iterations_name(ArgT0&& arg0, ArgT... args); + std::string* mutable_maximum_iterations_name(); + PROTOBUF_NODISCARD std::string* release_maximum_iterations_name(); + void set_allocated_maximum_iterations_name(std::string* maximum_iterations_name); + private: + const std::string& _internal_maximum_iterations_name() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_maximum_iterations_name(const std::string& value); + std::string* _internal_mutable_maximum_iterations_name(); + public: + + // .tensorflow.ValuesDef values_def = 9; + bool has_values_def() const; + private: + bool _internal_has_values_def() const; + public: + void clear_values_def(); + const ::tensorflow::ValuesDef& values_def() const; + PROTOBUF_NODISCARD ::tensorflow::ValuesDef* release_values_def(); + ::tensorflow::ValuesDef* mutable_values_def(); + void set_allocated_values_def(::tensorflow::ValuesDef* values_def); + private: + const ::tensorflow::ValuesDef& _internal_values_def() const; + ::tensorflow::ValuesDef* _internal_mutable_values_def(); + public: + void unsafe_arena_set_allocated_values_def( + ::tensorflow::ValuesDef* values_def); + ::tensorflow::ValuesDef* unsafe_arena_release_values_def(); + + // int32 parallel_iterations = 2; + void clear_parallel_iterations(); + int32_t parallel_iterations() const; + void set_parallel_iterations(int32_t value); + private: + int32_t _internal_parallel_iterations() const; + void _internal_set_parallel_iterations(int32_t value); + public: + + // bool back_prop = 3; + void clear_back_prop(); + bool back_prop() const; + void set_back_prop(bool value); + private: + bool _internal_back_prop() const; + void _internal_set_back_prop(bool value); + public: + + // bool swap_memory = 4; + void clear_swap_memory(); + bool swap_memory() const; + void set_swap_memory(bool value); + private: + bool _internal_swap_memory() const; + void _internal_set_swap_memory(bool value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.WhileContextDef) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField loop_exit_names_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField loop_enter_names_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::ControlFlowContextDef > nested_contexts_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr context_name_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr pivot_name_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr pivot_for_pred_name_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr pivot_for_body_name_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr maximum_iterations_name_; + ::tensorflow::ValuesDef* values_def_; + int32_t parallel_iterations_; + bool back_prop_; + bool swap_memory_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fcontrol_5fflow_2eproto; +}; +// =================================================================== + + +// =================================================================== + +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// ------------------------------------------------------------------- + +// ValuesDef + +// repeated string values = 1; +inline int ValuesDef::_internal_values_size() const { + return _impl_.values_.size(); +} +inline int ValuesDef::values_size() const { + return _internal_values_size(); +} +inline void ValuesDef::clear_values() { + _impl_.values_.Clear(); +} +inline std::string* ValuesDef::add_values() { + std::string* _s = _internal_add_values(); + // @@protoc_insertion_point(field_add_mutable:tensorflow.ValuesDef.values) + return _s; +} +inline const std::string& ValuesDef::_internal_values(int index) const { + return _impl_.values_.Get(index); +} +inline const std::string& ValuesDef::values(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.ValuesDef.values) + return _internal_values(index); +} +inline std::string* ValuesDef::mutable_values(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.ValuesDef.values) + return _impl_.values_.Mutable(index); +} +inline void ValuesDef::set_values(int index, const std::string& value) { + _impl_.values_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set:tensorflow.ValuesDef.values) +} +inline void ValuesDef::set_values(int index, std::string&& value) { + _impl_.values_.Mutable(index)->assign(std::move(value)); + // @@protoc_insertion_point(field_set:tensorflow.ValuesDef.values) +} +inline void ValuesDef::set_values(int index, const char* value) { + GOOGLE_DCHECK(value != nullptr); + _impl_.values_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set_char:tensorflow.ValuesDef.values) +} +inline void ValuesDef::set_values(int index, const char* value, size_t size) { + _impl_.values_.Mutable(index)->assign( + reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:tensorflow.ValuesDef.values) +} +inline std::string* ValuesDef::_internal_add_values() { + return _impl_.values_.Add(); +} +inline void ValuesDef::add_values(const std::string& value) { + _impl_.values_.Add()->assign(value); + // @@protoc_insertion_point(field_add:tensorflow.ValuesDef.values) +} +inline void ValuesDef::add_values(std::string&& value) { + _impl_.values_.Add(std::move(value)); + // @@protoc_insertion_point(field_add:tensorflow.ValuesDef.values) +} +inline void ValuesDef::add_values(const char* value) { + GOOGLE_DCHECK(value != nullptr); + _impl_.values_.Add()->assign(value); + // @@protoc_insertion_point(field_add_char:tensorflow.ValuesDef.values) +} +inline void ValuesDef::add_values(const char* value, size_t size) { + _impl_.values_.Add()->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_add_pointer:tensorflow.ValuesDef.values) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& +ValuesDef::values() const { + // @@protoc_insertion_point(field_list:tensorflow.ValuesDef.values) + return _impl_.values_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* +ValuesDef::mutable_values() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.ValuesDef.values) + return &_impl_.values_; +} + +// map external_values = 2; +inline int ValuesDef::_internal_external_values_size() const { + return _impl_.external_values_.size(); +} +inline int ValuesDef::external_values_size() const { + return _internal_external_values_size(); +} +inline void ValuesDef::clear_external_values() { + _impl_.external_values_.Clear(); +} +inline const ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >& +ValuesDef::_internal_external_values() const { + return _impl_.external_values_.GetMap(); +} +inline const ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >& +ValuesDef::external_values() const { + // @@protoc_insertion_point(field_map:tensorflow.ValuesDef.external_values) + return _internal_external_values(); +} +inline ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >* +ValuesDef::_internal_mutable_external_values() { + return _impl_.external_values_.MutableMap(); +} +inline ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >* +ValuesDef::mutable_external_values() { + // @@protoc_insertion_point(field_mutable_map:tensorflow.ValuesDef.external_values) + return _internal_mutable_external_values(); +} + +// ------------------------------------------------------------------- + +// ControlFlowContextDef + +// .tensorflow.CondContextDef cond_ctxt = 1; +inline bool ControlFlowContextDef::_internal_has_cond_ctxt() const { + return ctxt_case() == kCondCtxt; +} +inline bool ControlFlowContextDef::has_cond_ctxt() const { + return _internal_has_cond_ctxt(); +} +inline void ControlFlowContextDef::set_has_cond_ctxt() { + _impl_._oneof_case_[0] = kCondCtxt; +} +inline void ControlFlowContextDef::clear_cond_ctxt() { + if (_internal_has_cond_ctxt()) { + if (GetArenaForAllocation() == nullptr) { + delete _impl_.ctxt_.cond_ctxt_; + } + clear_has_ctxt(); + } +} +inline ::tensorflow::CondContextDef* ControlFlowContextDef::release_cond_ctxt() { + // @@protoc_insertion_point(field_release:tensorflow.ControlFlowContextDef.cond_ctxt) + if (_internal_has_cond_ctxt()) { + clear_has_ctxt(); + ::tensorflow::CondContextDef* temp = _impl_.ctxt_.cond_ctxt_; + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + _impl_.ctxt_.cond_ctxt_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::tensorflow::CondContextDef& ControlFlowContextDef::_internal_cond_ctxt() const { + return _internal_has_cond_ctxt() + ? *_impl_.ctxt_.cond_ctxt_ + : reinterpret_cast< ::tensorflow::CondContextDef&>(::tensorflow::_CondContextDef_default_instance_); +} +inline const ::tensorflow::CondContextDef& ControlFlowContextDef::cond_ctxt() const { + // @@protoc_insertion_point(field_get:tensorflow.ControlFlowContextDef.cond_ctxt) + return _internal_cond_ctxt(); +} +inline ::tensorflow::CondContextDef* ControlFlowContextDef::unsafe_arena_release_cond_ctxt() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.ControlFlowContextDef.cond_ctxt) + if (_internal_has_cond_ctxt()) { + clear_has_ctxt(); + ::tensorflow::CondContextDef* temp = _impl_.ctxt_.cond_ctxt_; + _impl_.ctxt_.cond_ctxt_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void ControlFlowContextDef::unsafe_arena_set_allocated_cond_ctxt(::tensorflow::CondContextDef* cond_ctxt) { + clear_ctxt(); + if (cond_ctxt) { + set_has_cond_ctxt(); + _impl_.ctxt_.cond_ctxt_ = cond_ctxt; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.ControlFlowContextDef.cond_ctxt) +} +inline ::tensorflow::CondContextDef* ControlFlowContextDef::_internal_mutable_cond_ctxt() { + if (!_internal_has_cond_ctxt()) { + clear_ctxt(); + set_has_cond_ctxt(); + _impl_.ctxt_.cond_ctxt_ = CreateMaybeMessage< ::tensorflow::CondContextDef >(GetArenaForAllocation()); + } + return _impl_.ctxt_.cond_ctxt_; +} +inline ::tensorflow::CondContextDef* ControlFlowContextDef::mutable_cond_ctxt() { + ::tensorflow::CondContextDef* _msg = _internal_mutable_cond_ctxt(); + // @@protoc_insertion_point(field_mutable:tensorflow.ControlFlowContextDef.cond_ctxt) + return _msg; +} + +// .tensorflow.WhileContextDef while_ctxt = 2; +inline bool ControlFlowContextDef::_internal_has_while_ctxt() const { + return ctxt_case() == kWhileCtxt; +} +inline bool ControlFlowContextDef::has_while_ctxt() const { + return _internal_has_while_ctxt(); +} +inline void ControlFlowContextDef::set_has_while_ctxt() { + _impl_._oneof_case_[0] = kWhileCtxt; +} +inline void ControlFlowContextDef::clear_while_ctxt() { + if (_internal_has_while_ctxt()) { + if (GetArenaForAllocation() == nullptr) { + delete _impl_.ctxt_.while_ctxt_; + } + clear_has_ctxt(); + } +} +inline ::tensorflow::WhileContextDef* ControlFlowContextDef::release_while_ctxt() { + // @@protoc_insertion_point(field_release:tensorflow.ControlFlowContextDef.while_ctxt) + if (_internal_has_while_ctxt()) { + clear_has_ctxt(); + ::tensorflow::WhileContextDef* temp = _impl_.ctxt_.while_ctxt_; + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + _impl_.ctxt_.while_ctxt_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::tensorflow::WhileContextDef& ControlFlowContextDef::_internal_while_ctxt() const { + return _internal_has_while_ctxt() + ? *_impl_.ctxt_.while_ctxt_ + : reinterpret_cast< ::tensorflow::WhileContextDef&>(::tensorflow::_WhileContextDef_default_instance_); +} +inline const ::tensorflow::WhileContextDef& ControlFlowContextDef::while_ctxt() const { + // @@protoc_insertion_point(field_get:tensorflow.ControlFlowContextDef.while_ctxt) + return _internal_while_ctxt(); +} +inline ::tensorflow::WhileContextDef* ControlFlowContextDef::unsafe_arena_release_while_ctxt() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.ControlFlowContextDef.while_ctxt) + if (_internal_has_while_ctxt()) { + clear_has_ctxt(); + ::tensorflow::WhileContextDef* temp = _impl_.ctxt_.while_ctxt_; + _impl_.ctxt_.while_ctxt_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void ControlFlowContextDef::unsafe_arena_set_allocated_while_ctxt(::tensorflow::WhileContextDef* while_ctxt) { + clear_ctxt(); + if (while_ctxt) { + set_has_while_ctxt(); + _impl_.ctxt_.while_ctxt_ = while_ctxt; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.ControlFlowContextDef.while_ctxt) +} +inline ::tensorflow::WhileContextDef* ControlFlowContextDef::_internal_mutable_while_ctxt() { + if (!_internal_has_while_ctxt()) { + clear_ctxt(); + set_has_while_ctxt(); + _impl_.ctxt_.while_ctxt_ = CreateMaybeMessage< ::tensorflow::WhileContextDef >(GetArenaForAllocation()); + } + return _impl_.ctxt_.while_ctxt_; +} +inline ::tensorflow::WhileContextDef* ControlFlowContextDef::mutable_while_ctxt() { + ::tensorflow::WhileContextDef* _msg = _internal_mutable_while_ctxt(); + // @@protoc_insertion_point(field_mutable:tensorflow.ControlFlowContextDef.while_ctxt) + return _msg; +} + +inline bool ControlFlowContextDef::has_ctxt() const { + return ctxt_case() != CTXT_NOT_SET; +} +inline void ControlFlowContextDef::clear_has_ctxt() { + _impl_._oneof_case_[0] = CTXT_NOT_SET; +} +inline ControlFlowContextDef::CtxtCase ControlFlowContextDef::ctxt_case() const { + return ControlFlowContextDef::CtxtCase(_impl_._oneof_case_[0]); +} +// ------------------------------------------------------------------- + +// CondContextDef + +// string context_name = 1; +inline void CondContextDef::clear_context_name() { + _impl_.context_name_.ClearToEmpty(); +} +inline const std::string& CondContextDef::context_name() const { + // @@protoc_insertion_point(field_get:tensorflow.CondContextDef.context_name) + return _internal_context_name(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void CondContextDef::set_context_name(ArgT0&& arg0, ArgT... args) { + + _impl_.context_name_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.CondContextDef.context_name) +} +inline std::string* CondContextDef::mutable_context_name() { + std::string* _s = _internal_mutable_context_name(); + // @@protoc_insertion_point(field_mutable:tensorflow.CondContextDef.context_name) + return _s; +} +inline const std::string& CondContextDef::_internal_context_name() const { + return _impl_.context_name_.Get(); +} +inline void CondContextDef::_internal_set_context_name(const std::string& value) { + + _impl_.context_name_.Set(value, GetArenaForAllocation()); +} +inline std::string* CondContextDef::_internal_mutable_context_name() { + + return _impl_.context_name_.Mutable(GetArenaForAllocation()); +} +inline std::string* CondContextDef::release_context_name() { + // @@protoc_insertion_point(field_release:tensorflow.CondContextDef.context_name) + return _impl_.context_name_.Release(); +} +inline void CondContextDef::set_allocated_context_name(std::string* context_name) { + if (context_name != nullptr) { + + } else { + + } + _impl_.context_name_.SetAllocated(context_name, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.context_name_.IsDefault()) { + _impl_.context_name_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.CondContextDef.context_name) +} + +// string pred_name = 2; +inline void CondContextDef::clear_pred_name() { + _impl_.pred_name_.ClearToEmpty(); +} +inline const std::string& CondContextDef::pred_name() const { + // @@protoc_insertion_point(field_get:tensorflow.CondContextDef.pred_name) + return _internal_pred_name(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void CondContextDef::set_pred_name(ArgT0&& arg0, ArgT... args) { + + _impl_.pred_name_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.CondContextDef.pred_name) +} +inline std::string* CondContextDef::mutable_pred_name() { + std::string* _s = _internal_mutable_pred_name(); + // @@protoc_insertion_point(field_mutable:tensorflow.CondContextDef.pred_name) + return _s; +} +inline const std::string& CondContextDef::_internal_pred_name() const { + return _impl_.pred_name_.Get(); +} +inline void CondContextDef::_internal_set_pred_name(const std::string& value) { + + _impl_.pred_name_.Set(value, GetArenaForAllocation()); +} +inline std::string* CondContextDef::_internal_mutable_pred_name() { + + return _impl_.pred_name_.Mutable(GetArenaForAllocation()); +} +inline std::string* CondContextDef::release_pred_name() { + // @@protoc_insertion_point(field_release:tensorflow.CondContextDef.pred_name) + return _impl_.pred_name_.Release(); +} +inline void CondContextDef::set_allocated_pred_name(std::string* pred_name) { + if (pred_name != nullptr) { + + } else { + + } + _impl_.pred_name_.SetAllocated(pred_name, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.pred_name_.IsDefault()) { + _impl_.pred_name_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.CondContextDef.pred_name) +} + +// string pivot_name = 3; +inline void CondContextDef::clear_pivot_name() { + _impl_.pivot_name_.ClearToEmpty(); +} +inline const std::string& CondContextDef::pivot_name() const { + // @@protoc_insertion_point(field_get:tensorflow.CondContextDef.pivot_name) + return _internal_pivot_name(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void CondContextDef::set_pivot_name(ArgT0&& arg0, ArgT... args) { + + _impl_.pivot_name_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.CondContextDef.pivot_name) +} +inline std::string* CondContextDef::mutable_pivot_name() { + std::string* _s = _internal_mutable_pivot_name(); + // @@protoc_insertion_point(field_mutable:tensorflow.CondContextDef.pivot_name) + return _s; +} +inline const std::string& CondContextDef::_internal_pivot_name() const { + return _impl_.pivot_name_.Get(); +} +inline void CondContextDef::_internal_set_pivot_name(const std::string& value) { + + _impl_.pivot_name_.Set(value, GetArenaForAllocation()); +} +inline std::string* CondContextDef::_internal_mutable_pivot_name() { + + return _impl_.pivot_name_.Mutable(GetArenaForAllocation()); +} +inline std::string* CondContextDef::release_pivot_name() { + // @@protoc_insertion_point(field_release:tensorflow.CondContextDef.pivot_name) + return _impl_.pivot_name_.Release(); +} +inline void CondContextDef::set_allocated_pivot_name(std::string* pivot_name) { + if (pivot_name != nullptr) { + + } else { + + } + _impl_.pivot_name_.SetAllocated(pivot_name, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.pivot_name_.IsDefault()) { + _impl_.pivot_name_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.CondContextDef.pivot_name) +} + +// int32 branch = 4; +inline void CondContextDef::clear_branch() { + _impl_.branch_ = 0; +} +inline int32_t CondContextDef::_internal_branch() const { + return _impl_.branch_; +} +inline int32_t CondContextDef::branch() const { + // @@protoc_insertion_point(field_get:tensorflow.CondContextDef.branch) + return _internal_branch(); +} +inline void CondContextDef::_internal_set_branch(int32_t value) { + + _impl_.branch_ = value; +} +inline void CondContextDef::set_branch(int32_t value) { + _internal_set_branch(value); + // @@protoc_insertion_point(field_set:tensorflow.CondContextDef.branch) +} + +// .tensorflow.ValuesDef values_def = 5; +inline bool CondContextDef::_internal_has_values_def() const { + return this != internal_default_instance() && _impl_.values_def_ != nullptr; +} +inline bool CondContextDef::has_values_def() const { + return _internal_has_values_def(); +} +inline void CondContextDef::clear_values_def() { + if (GetArenaForAllocation() == nullptr && _impl_.values_def_ != nullptr) { + delete _impl_.values_def_; + } + _impl_.values_def_ = nullptr; +} +inline const ::tensorflow::ValuesDef& CondContextDef::_internal_values_def() const { + const ::tensorflow::ValuesDef* p = _impl_.values_def_; + return p != nullptr ? *p : reinterpret_cast( + ::tensorflow::_ValuesDef_default_instance_); +} +inline const ::tensorflow::ValuesDef& CondContextDef::values_def() const { + // @@protoc_insertion_point(field_get:tensorflow.CondContextDef.values_def) + return _internal_values_def(); +} +inline void CondContextDef::unsafe_arena_set_allocated_values_def( + ::tensorflow::ValuesDef* values_def) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.values_def_); + } + _impl_.values_def_ = values_def; + if (values_def) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.CondContextDef.values_def) +} +inline ::tensorflow::ValuesDef* CondContextDef::release_values_def() { + + ::tensorflow::ValuesDef* temp = _impl_.values_def_; + _impl_.values_def_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tensorflow::ValuesDef* CondContextDef::unsafe_arena_release_values_def() { + // @@protoc_insertion_point(field_release:tensorflow.CondContextDef.values_def) + + ::tensorflow::ValuesDef* temp = _impl_.values_def_; + _impl_.values_def_ = nullptr; + return temp; +} +inline ::tensorflow::ValuesDef* CondContextDef::_internal_mutable_values_def() { + + if (_impl_.values_def_ == nullptr) { + auto* p = CreateMaybeMessage<::tensorflow::ValuesDef>(GetArenaForAllocation()); + _impl_.values_def_ = p; + } + return _impl_.values_def_; +} +inline ::tensorflow::ValuesDef* CondContextDef::mutable_values_def() { + ::tensorflow::ValuesDef* _msg = _internal_mutable_values_def(); + // @@protoc_insertion_point(field_mutable:tensorflow.CondContextDef.values_def) + return _msg; +} +inline void CondContextDef::set_allocated_values_def(::tensorflow::ValuesDef* values_def) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete _impl_.values_def_; + } + if (values_def) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(values_def); + if (message_arena != submessage_arena) { + values_def = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, values_def, submessage_arena); + } + + } else { + + } + _impl_.values_def_ = values_def; + // @@protoc_insertion_point(field_set_allocated:tensorflow.CondContextDef.values_def) +} + +// repeated .tensorflow.ControlFlowContextDef nested_contexts = 6; +inline int CondContextDef::_internal_nested_contexts_size() const { + return _impl_.nested_contexts_.size(); +} +inline int CondContextDef::nested_contexts_size() const { + return _internal_nested_contexts_size(); +} +inline void CondContextDef::clear_nested_contexts() { + _impl_.nested_contexts_.Clear(); +} +inline ::tensorflow::ControlFlowContextDef* CondContextDef::mutable_nested_contexts(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.CondContextDef.nested_contexts) + return _impl_.nested_contexts_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::ControlFlowContextDef >* +CondContextDef::mutable_nested_contexts() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.CondContextDef.nested_contexts) + return &_impl_.nested_contexts_; +} +inline const ::tensorflow::ControlFlowContextDef& CondContextDef::_internal_nested_contexts(int index) const { + return _impl_.nested_contexts_.Get(index); +} +inline const ::tensorflow::ControlFlowContextDef& CondContextDef::nested_contexts(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.CondContextDef.nested_contexts) + return _internal_nested_contexts(index); +} +inline ::tensorflow::ControlFlowContextDef* CondContextDef::_internal_add_nested_contexts() { + return _impl_.nested_contexts_.Add(); +} +inline ::tensorflow::ControlFlowContextDef* CondContextDef::add_nested_contexts() { + ::tensorflow::ControlFlowContextDef* _add = _internal_add_nested_contexts(); + // @@protoc_insertion_point(field_add:tensorflow.CondContextDef.nested_contexts) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::ControlFlowContextDef >& +CondContextDef::nested_contexts() const { + // @@protoc_insertion_point(field_list:tensorflow.CondContextDef.nested_contexts) + return _impl_.nested_contexts_; +} + +// ------------------------------------------------------------------- + +// WhileContextDef + +// string context_name = 1; +inline void WhileContextDef::clear_context_name() { + _impl_.context_name_.ClearToEmpty(); +} +inline const std::string& WhileContextDef::context_name() const { + // @@protoc_insertion_point(field_get:tensorflow.WhileContextDef.context_name) + return _internal_context_name(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void WhileContextDef::set_context_name(ArgT0&& arg0, ArgT... args) { + + _impl_.context_name_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.WhileContextDef.context_name) +} +inline std::string* WhileContextDef::mutable_context_name() { + std::string* _s = _internal_mutable_context_name(); + // @@protoc_insertion_point(field_mutable:tensorflow.WhileContextDef.context_name) + return _s; +} +inline const std::string& WhileContextDef::_internal_context_name() const { + return _impl_.context_name_.Get(); +} +inline void WhileContextDef::_internal_set_context_name(const std::string& value) { + + _impl_.context_name_.Set(value, GetArenaForAllocation()); +} +inline std::string* WhileContextDef::_internal_mutable_context_name() { + + return _impl_.context_name_.Mutable(GetArenaForAllocation()); +} +inline std::string* WhileContextDef::release_context_name() { + // @@protoc_insertion_point(field_release:tensorflow.WhileContextDef.context_name) + return _impl_.context_name_.Release(); +} +inline void WhileContextDef::set_allocated_context_name(std::string* context_name) { + if (context_name != nullptr) { + + } else { + + } + _impl_.context_name_.SetAllocated(context_name, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.context_name_.IsDefault()) { + _impl_.context_name_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.WhileContextDef.context_name) +} + +// int32 parallel_iterations = 2; +inline void WhileContextDef::clear_parallel_iterations() { + _impl_.parallel_iterations_ = 0; +} +inline int32_t WhileContextDef::_internal_parallel_iterations() const { + return _impl_.parallel_iterations_; +} +inline int32_t WhileContextDef::parallel_iterations() const { + // @@protoc_insertion_point(field_get:tensorflow.WhileContextDef.parallel_iterations) + return _internal_parallel_iterations(); +} +inline void WhileContextDef::_internal_set_parallel_iterations(int32_t value) { + + _impl_.parallel_iterations_ = value; +} +inline void WhileContextDef::set_parallel_iterations(int32_t value) { + _internal_set_parallel_iterations(value); + // @@protoc_insertion_point(field_set:tensorflow.WhileContextDef.parallel_iterations) +} + +// bool back_prop = 3; +inline void WhileContextDef::clear_back_prop() { + _impl_.back_prop_ = false; +} +inline bool WhileContextDef::_internal_back_prop() const { + return _impl_.back_prop_; +} +inline bool WhileContextDef::back_prop() const { + // @@protoc_insertion_point(field_get:tensorflow.WhileContextDef.back_prop) + return _internal_back_prop(); +} +inline void WhileContextDef::_internal_set_back_prop(bool value) { + + _impl_.back_prop_ = value; +} +inline void WhileContextDef::set_back_prop(bool value) { + _internal_set_back_prop(value); + // @@protoc_insertion_point(field_set:tensorflow.WhileContextDef.back_prop) +} + +// bool swap_memory = 4; +inline void WhileContextDef::clear_swap_memory() { + _impl_.swap_memory_ = false; +} +inline bool WhileContextDef::_internal_swap_memory() const { + return _impl_.swap_memory_; +} +inline bool WhileContextDef::swap_memory() const { + // @@protoc_insertion_point(field_get:tensorflow.WhileContextDef.swap_memory) + return _internal_swap_memory(); +} +inline void WhileContextDef::_internal_set_swap_memory(bool value) { + + _impl_.swap_memory_ = value; +} +inline void WhileContextDef::set_swap_memory(bool value) { + _internal_set_swap_memory(value); + // @@protoc_insertion_point(field_set:tensorflow.WhileContextDef.swap_memory) +} + +// string pivot_name = 5; +inline void WhileContextDef::clear_pivot_name() { + _impl_.pivot_name_.ClearToEmpty(); +} +inline const std::string& WhileContextDef::pivot_name() const { + // @@protoc_insertion_point(field_get:tensorflow.WhileContextDef.pivot_name) + return _internal_pivot_name(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void WhileContextDef::set_pivot_name(ArgT0&& arg0, ArgT... args) { + + _impl_.pivot_name_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.WhileContextDef.pivot_name) +} +inline std::string* WhileContextDef::mutable_pivot_name() { + std::string* _s = _internal_mutable_pivot_name(); + // @@protoc_insertion_point(field_mutable:tensorflow.WhileContextDef.pivot_name) + return _s; +} +inline const std::string& WhileContextDef::_internal_pivot_name() const { + return _impl_.pivot_name_.Get(); +} +inline void WhileContextDef::_internal_set_pivot_name(const std::string& value) { + + _impl_.pivot_name_.Set(value, GetArenaForAllocation()); +} +inline std::string* WhileContextDef::_internal_mutable_pivot_name() { + + return _impl_.pivot_name_.Mutable(GetArenaForAllocation()); +} +inline std::string* WhileContextDef::release_pivot_name() { + // @@protoc_insertion_point(field_release:tensorflow.WhileContextDef.pivot_name) + return _impl_.pivot_name_.Release(); +} +inline void WhileContextDef::set_allocated_pivot_name(std::string* pivot_name) { + if (pivot_name != nullptr) { + + } else { + + } + _impl_.pivot_name_.SetAllocated(pivot_name, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.pivot_name_.IsDefault()) { + _impl_.pivot_name_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.WhileContextDef.pivot_name) +} + +// string pivot_for_pred_name = 6; +inline void WhileContextDef::clear_pivot_for_pred_name() { + _impl_.pivot_for_pred_name_.ClearToEmpty(); +} +inline const std::string& WhileContextDef::pivot_for_pred_name() const { + // @@protoc_insertion_point(field_get:tensorflow.WhileContextDef.pivot_for_pred_name) + return _internal_pivot_for_pred_name(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void WhileContextDef::set_pivot_for_pred_name(ArgT0&& arg0, ArgT... args) { + + _impl_.pivot_for_pred_name_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.WhileContextDef.pivot_for_pred_name) +} +inline std::string* WhileContextDef::mutable_pivot_for_pred_name() { + std::string* _s = _internal_mutable_pivot_for_pred_name(); + // @@protoc_insertion_point(field_mutable:tensorflow.WhileContextDef.pivot_for_pred_name) + return _s; +} +inline const std::string& WhileContextDef::_internal_pivot_for_pred_name() const { + return _impl_.pivot_for_pred_name_.Get(); +} +inline void WhileContextDef::_internal_set_pivot_for_pred_name(const std::string& value) { + + _impl_.pivot_for_pred_name_.Set(value, GetArenaForAllocation()); +} +inline std::string* WhileContextDef::_internal_mutable_pivot_for_pred_name() { + + return _impl_.pivot_for_pred_name_.Mutable(GetArenaForAllocation()); +} +inline std::string* WhileContextDef::release_pivot_for_pred_name() { + // @@protoc_insertion_point(field_release:tensorflow.WhileContextDef.pivot_for_pred_name) + return _impl_.pivot_for_pred_name_.Release(); +} +inline void WhileContextDef::set_allocated_pivot_for_pred_name(std::string* pivot_for_pred_name) { + if (pivot_for_pred_name != nullptr) { + + } else { + + } + _impl_.pivot_for_pred_name_.SetAllocated(pivot_for_pred_name, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.pivot_for_pred_name_.IsDefault()) { + _impl_.pivot_for_pred_name_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.WhileContextDef.pivot_for_pred_name) +} + +// string pivot_for_body_name = 7; +inline void WhileContextDef::clear_pivot_for_body_name() { + _impl_.pivot_for_body_name_.ClearToEmpty(); +} +inline const std::string& WhileContextDef::pivot_for_body_name() const { + // @@protoc_insertion_point(field_get:tensorflow.WhileContextDef.pivot_for_body_name) + return _internal_pivot_for_body_name(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void WhileContextDef::set_pivot_for_body_name(ArgT0&& arg0, ArgT... args) { + + _impl_.pivot_for_body_name_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.WhileContextDef.pivot_for_body_name) +} +inline std::string* WhileContextDef::mutable_pivot_for_body_name() { + std::string* _s = _internal_mutable_pivot_for_body_name(); + // @@protoc_insertion_point(field_mutable:tensorflow.WhileContextDef.pivot_for_body_name) + return _s; +} +inline const std::string& WhileContextDef::_internal_pivot_for_body_name() const { + return _impl_.pivot_for_body_name_.Get(); +} +inline void WhileContextDef::_internal_set_pivot_for_body_name(const std::string& value) { + + _impl_.pivot_for_body_name_.Set(value, GetArenaForAllocation()); +} +inline std::string* WhileContextDef::_internal_mutable_pivot_for_body_name() { + + return _impl_.pivot_for_body_name_.Mutable(GetArenaForAllocation()); +} +inline std::string* WhileContextDef::release_pivot_for_body_name() { + // @@protoc_insertion_point(field_release:tensorflow.WhileContextDef.pivot_for_body_name) + return _impl_.pivot_for_body_name_.Release(); +} +inline void WhileContextDef::set_allocated_pivot_for_body_name(std::string* pivot_for_body_name) { + if (pivot_for_body_name != nullptr) { + + } else { + + } + _impl_.pivot_for_body_name_.SetAllocated(pivot_for_body_name, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.pivot_for_body_name_.IsDefault()) { + _impl_.pivot_for_body_name_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.WhileContextDef.pivot_for_body_name) +} + +// repeated string loop_exit_names = 8; +inline int WhileContextDef::_internal_loop_exit_names_size() const { + return _impl_.loop_exit_names_.size(); +} +inline int WhileContextDef::loop_exit_names_size() const { + return _internal_loop_exit_names_size(); +} +inline void WhileContextDef::clear_loop_exit_names() { + _impl_.loop_exit_names_.Clear(); +} +inline std::string* WhileContextDef::add_loop_exit_names() { + std::string* _s = _internal_add_loop_exit_names(); + // @@protoc_insertion_point(field_add_mutable:tensorflow.WhileContextDef.loop_exit_names) + return _s; +} +inline const std::string& WhileContextDef::_internal_loop_exit_names(int index) const { + return _impl_.loop_exit_names_.Get(index); +} +inline const std::string& WhileContextDef::loop_exit_names(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.WhileContextDef.loop_exit_names) + return _internal_loop_exit_names(index); +} +inline std::string* WhileContextDef::mutable_loop_exit_names(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.WhileContextDef.loop_exit_names) + return _impl_.loop_exit_names_.Mutable(index); +} +inline void WhileContextDef::set_loop_exit_names(int index, const std::string& value) { + _impl_.loop_exit_names_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set:tensorflow.WhileContextDef.loop_exit_names) +} +inline void WhileContextDef::set_loop_exit_names(int index, std::string&& value) { + _impl_.loop_exit_names_.Mutable(index)->assign(std::move(value)); + // @@protoc_insertion_point(field_set:tensorflow.WhileContextDef.loop_exit_names) +} +inline void WhileContextDef::set_loop_exit_names(int index, const char* value) { + GOOGLE_DCHECK(value != nullptr); + _impl_.loop_exit_names_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set_char:tensorflow.WhileContextDef.loop_exit_names) +} +inline void WhileContextDef::set_loop_exit_names(int index, const char* value, size_t size) { + _impl_.loop_exit_names_.Mutable(index)->assign( + reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:tensorflow.WhileContextDef.loop_exit_names) +} +inline std::string* WhileContextDef::_internal_add_loop_exit_names() { + return _impl_.loop_exit_names_.Add(); +} +inline void WhileContextDef::add_loop_exit_names(const std::string& value) { + _impl_.loop_exit_names_.Add()->assign(value); + // @@protoc_insertion_point(field_add:tensorflow.WhileContextDef.loop_exit_names) +} +inline void WhileContextDef::add_loop_exit_names(std::string&& value) { + _impl_.loop_exit_names_.Add(std::move(value)); + // @@protoc_insertion_point(field_add:tensorflow.WhileContextDef.loop_exit_names) +} +inline void WhileContextDef::add_loop_exit_names(const char* value) { + GOOGLE_DCHECK(value != nullptr); + _impl_.loop_exit_names_.Add()->assign(value); + // @@protoc_insertion_point(field_add_char:tensorflow.WhileContextDef.loop_exit_names) +} +inline void WhileContextDef::add_loop_exit_names(const char* value, size_t size) { + _impl_.loop_exit_names_.Add()->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_add_pointer:tensorflow.WhileContextDef.loop_exit_names) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& +WhileContextDef::loop_exit_names() const { + // @@protoc_insertion_point(field_list:tensorflow.WhileContextDef.loop_exit_names) + return _impl_.loop_exit_names_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* +WhileContextDef::mutable_loop_exit_names() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.WhileContextDef.loop_exit_names) + return &_impl_.loop_exit_names_; +} + +// repeated string loop_enter_names = 10; +inline int WhileContextDef::_internal_loop_enter_names_size() const { + return _impl_.loop_enter_names_.size(); +} +inline int WhileContextDef::loop_enter_names_size() const { + return _internal_loop_enter_names_size(); +} +inline void WhileContextDef::clear_loop_enter_names() { + _impl_.loop_enter_names_.Clear(); +} +inline std::string* WhileContextDef::add_loop_enter_names() { + std::string* _s = _internal_add_loop_enter_names(); + // @@protoc_insertion_point(field_add_mutable:tensorflow.WhileContextDef.loop_enter_names) + return _s; +} +inline const std::string& WhileContextDef::_internal_loop_enter_names(int index) const { + return _impl_.loop_enter_names_.Get(index); +} +inline const std::string& WhileContextDef::loop_enter_names(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.WhileContextDef.loop_enter_names) + return _internal_loop_enter_names(index); +} +inline std::string* WhileContextDef::mutable_loop_enter_names(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.WhileContextDef.loop_enter_names) + return _impl_.loop_enter_names_.Mutable(index); +} +inline void WhileContextDef::set_loop_enter_names(int index, const std::string& value) { + _impl_.loop_enter_names_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set:tensorflow.WhileContextDef.loop_enter_names) +} +inline void WhileContextDef::set_loop_enter_names(int index, std::string&& value) { + _impl_.loop_enter_names_.Mutable(index)->assign(std::move(value)); + // @@protoc_insertion_point(field_set:tensorflow.WhileContextDef.loop_enter_names) +} +inline void WhileContextDef::set_loop_enter_names(int index, const char* value) { + GOOGLE_DCHECK(value != nullptr); + _impl_.loop_enter_names_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set_char:tensorflow.WhileContextDef.loop_enter_names) +} +inline void WhileContextDef::set_loop_enter_names(int index, const char* value, size_t size) { + _impl_.loop_enter_names_.Mutable(index)->assign( + reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:tensorflow.WhileContextDef.loop_enter_names) +} +inline std::string* WhileContextDef::_internal_add_loop_enter_names() { + return _impl_.loop_enter_names_.Add(); +} +inline void WhileContextDef::add_loop_enter_names(const std::string& value) { + _impl_.loop_enter_names_.Add()->assign(value); + // @@protoc_insertion_point(field_add:tensorflow.WhileContextDef.loop_enter_names) +} +inline void WhileContextDef::add_loop_enter_names(std::string&& value) { + _impl_.loop_enter_names_.Add(std::move(value)); + // @@protoc_insertion_point(field_add:tensorflow.WhileContextDef.loop_enter_names) +} +inline void WhileContextDef::add_loop_enter_names(const char* value) { + GOOGLE_DCHECK(value != nullptr); + _impl_.loop_enter_names_.Add()->assign(value); + // @@protoc_insertion_point(field_add_char:tensorflow.WhileContextDef.loop_enter_names) +} +inline void WhileContextDef::add_loop_enter_names(const char* value, size_t size) { + _impl_.loop_enter_names_.Add()->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_add_pointer:tensorflow.WhileContextDef.loop_enter_names) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& +WhileContextDef::loop_enter_names() const { + // @@protoc_insertion_point(field_list:tensorflow.WhileContextDef.loop_enter_names) + return _impl_.loop_enter_names_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* +WhileContextDef::mutable_loop_enter_names() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.WhileContextDef.loop_enter_names) + return &_impl_.loop_enter_names_; +} + +// .tensorflow.ValuesDef values_def = 9; +inline bool WhileContextDef::_internal_has_values_def() const { + return this != internal_default_instance() && _impl_.values_def_ != nullptr; +} +inline bool WhileContextDef::has_values_def() const { + return _internal_has_values_def(); +} +inline void WhileContextDef::clear_values_def() { + if (GetArenaForAllocation() == nullptr && _impl_.values_def_ != nullptr) { + delete _impl_.values_def_; + } + _impl_.values_def_ = nullptr; +} +inline const ::tensorflow::ValuesDef& WhileContextDef::_internal_values_def() const { + const ::tensorflow::ValuesDef* p = _impl_.values_def_; + return p != nullptr ? *p : reinterpret_cast( + ::tensorflow::_ValuesDef_default_instance_); +} +inline const ::tensorflow::ValuesDef& WhileContextDef::values_def() const { + // @@protoc_insertion_point(field_get:tensorflow.WhileContextDef.values_def) + return _internal_values_def(); +} +inline void WhileContextDef::unsafe_arena_set_allocated_values_def( + ::tensorflow::ValuesDef* values_def) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.values_def_); + } + _impl_.values_def_ = values_def; + if (values_def) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.WhileContextDef.values_def) +} +inline ::tensorflow::ValuesDef* WhileContextDef::release_values_def() { + + ::tensorflow::ValuesDef* temp = _impl_.values_def_; + _impl_.values_def_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tensorflow::ValuesDef* WhileContextDef::unsafe_arena_release_values_def() { + // @@protoc_insertion_point(field_release:tensorflow.WhileContextDef.values_def) + + ::tensorflow::ValuesDef* temp = _impl_.values_def_; + _impl_.values_def_ = nullptr; + return temp; +} +inline ::tensorflow::ValuesDef* WhileContextDef::_internal_mutable_values_def() { + + if (_impl_.values_def_ == nullptr) { + auto* p = CreateMaybeMessage<::tensorflow::ValuesDef>(GetArenaForAllocation()); + _impl_.values_def_ = p; + } + return _impl_.values_def_; +} +inline ::tensorflow::ValuesDef* WhileContextDef::mutable_values_def() { + ::tensorflow::ValuesDef* _msg = _internal_mutable_values_def(); + // @@protoc_insertion_point(field_mutable:tensorflow.WhileContextDef.values_def) + return _msg; +} +inline void WhileContextDef::set_allocated_values_def(::tensorflow::ValuesDef* values_def) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete _impl_.values_def_; + } + if (values_def) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(values_def); + if (message_arena != submessage_arena) { + values_def = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, values_def, submessage_arena); + } + + } else { + + } + _impl_.values_def_ = values_def; + // @@protoc_insertion_point(field_set_allocated:tensorflow.WhileContextDef.values_def) +} + +// string maximum_iterations_name = 11; +inline void WhileContextDef::clear_maximum_iterations_name() { + _impl_.maximum_iterations_name_.ClearToEmpty(); +} +inline const std::string& WhileContextDef::maximum_iterations_name() const { + // @@protoc_insertion_point(field_get:tensorflow.WhileContextDef.maximum_iterations_name) + return _internal_maximum_iterations_name(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void WhileContextDef::set_maximum_iterations_name(ArgT0&& arg0, ArgT... args) { + + _impl_.maximum_iterations_name_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.WhileContextDef.maximum_iterations_name) +} +inline std::string* WhileContextDef::mutable_maximum_iterations_name() { + std::string* _s = _internal_mutable_maximum_iterations_name(); + // @@protoc_insertion_point(field_mutable:tensorflow.WhileContextDef.maximum_iterations_name) + return _s; +} +inline const std::string& WhileContextDef::_internal_maximum_iterations_name() const { + return _impl_.maximum_iterations_name_.Get(); +} +inline void WhileContextDef::_internal_set_maximum_iterations_name(const std::string& value) { + + _impl_.maximum_iterations_name_.Set(value, GetArenaForAllocation()); +} +inline std::string* WhileContextDef::_internal_mutable_maximum_iterations_name() { + + return _impl_.maximum_iterations_name_.Mutable(GetArenaForAllocation()); +} +inline std::string* WhileContextDef::release_maximum_iterations_name() { + // @@protoc_insertion_point(field_release:tensorflow.WhileContextDef.maximum_iterations_name) + return _impl_.maximum_iterations_name_.Release(); +} +inline void WhileContextDef::set_allocated_maximum_iterations_name(std::string* maximum_iterations_name) { + if (maximum_iterations_name != nullptr) { + + } else { + + } + _impl_.maximum_iterations_name_.SetAllocated(maximum_iterations_name, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.maximum_iterations_name_.IsDefault()) { + _impl_.maximum_iterations_name_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.WhileContextDef.maximum_iterations_name) +} + +// repeated .tensorflow.ControlFlowContextDef nested_contexts = 12; +inline int WhileContextDef::_internal_nested_contexts_size() const { + return _impl_.nested_contexts_.size(); +} +inline int WhileContextDef::nested_contexts_size() const { + return _internal_nested_contexts_size(); +} +inline void WhileContextDef::clear_nested_contexts() { + _impl_.nested_contexts_.Clear(); +} +inline ::tensorflow::ControlFlowContextDef* WhileContextDef::mutable_nested_contexts(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.WhileContextDef.nested_contexts) + return _impl_.nested_contexts_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::ControlFlowContextDef >* +WhileContextDef::mutable_nested_contexts() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.WhileContextDef.nested_contexts) + return &_impl_.nested_contexts_; +} +inline const ::tensorflow::ControlFlowContextDef& WhileContextDef::_internal_nested_contexts(int index) const { + return _impl_.nested_contexts_.Get(index); +} +inline const ::tensorflow::ControlFlowContextDef& WhileContextDef::nested_contexts(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.WhileContextDef.nested_contexts) + return _internal_nested_contexts(index); +} +inline ::tensorflow::ControlFlowContextDef* WhileContextDef::_internal_add_nested_contexts() { + return _impl_.nested_contexts_.Add(); +} +inline ::tensorflow::ControlFlowContextDef* WhileContextDef::add_nested_contexts() { + ::tensorflow::ControlFlowContextDef* _add = _internal_add_nested_contexts(); + // @@protoc_insertion_point(field_add:tensorflow.WhileContextDef.nested_contexts) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::ControlFlowContextDef >& +WhileContextDef::nested_contexts() const { + // @@protoc_insertion_point(field_list:tensorflow.WhileContextDef.nested_contexts) + return _impl_.nested_contexts_; +} + +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + + +// @@protoc_insertion_point(namespace_scope) + +} // namespace tensorflow + +// @@protoc_insertion_point(global_scope) + +#include +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprotobuf_2fcontrol_5fflow_2eproto diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/control_flow.proto b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/control_flow.proto new file mode 100644 index 0000000000000000000000000000000000000000..8890af6916dc0fb79a45201213457cc9763512d2 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/control_flow.proto @@ -0,0 +1,91 @@ +syntax = "proto3"; + +package tensorflow; + +option cc_enable_arenas = true; +option java_outer_classname = "ControlFlowProtos"; +option java_multiple_files = true; +option java_package = "org.tensorflow.framework"; +option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/protobuf/for_core_protos_go_proto"; + +// Control flow context related protocol buffers. + +// Protocol buffer representing the values in ControlFlowContext. +message ValuesDef { + // Value names that have been seen in this context. + repeated string values = 1; + + // Value names referenced by but external to this context. + map external_values = 2; +} + +// Container for any kind of control flow context. Any other control flow +// contexts that are added below should also be added here. +message ControlFlowContextDef { + oneof ctxt { + CondContextDef cond_ctxt = 1; + WhileContextDef while_ctxt = 2; + } +} + +// Protocol buffer representing a CondContext object. +message CondContextDef { + // Name of the context. + string context_name = 1; + + // Name of the pred tensor. + string pred_name = 2; + + // Name of the pivot tensor. + string pivot_name = 3; + + // Branch prediction. 0 or 1. + int32 branch = 4; + + // Values and external values in control flow context. + ValuesDef values_def = 5; + + // Contexts contained inside this context (e.g. nested conds). + repeated ControlFlowContextDef nested_contexts = 6; +} + +// Protocol buffer representing a WhileContext object. +message WhileContextDef { + // Name of the context. + string context_name = 1; + + // The number of iterations allowed to run in parallel. + int32 parallel_iterations = 2; + + // Whether backprop is enabled for this while loop. + bool back_prop = 3; + + // Whether GPU-CPU memory swap is enabled for this loop. + bool swap_memory = 4; + + // Name of the pivot tensor. + string pivot_name = 5; + + // Name of the pivot_for_pred tensor. + string pivot_for_pred_name = 6; + + // Name of the pivot_for_body tensor. + string pivot_for_body_name = 7; + + // List of names for exit tensors. + repeated string loop_exit_names = 8; + + // List of names for enter tensors. + repeated string loop_enter_names = 10; + + // Values and external values in control flow context. + ValuesDef values_def = 9; + + // Optional name of the maximum_iterations tensor. + string maximum_iterations_name = 11; + + // Contexts contained inside this context (e.g. nested whiles). + repeated ControlFlowContextDef nested_contexts = 12; + + // Next available id: 13. +} diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/conv_autotuning.pb.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/conv_autotuning.pb.h new file mode 100644 index 0000000000000000000000000000000000000000..a3d5165acbd30653bc6c0b1c1ae29d4a477ae5e6 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/conv_autotuning.pb.h @@ -0,0 +1,1528 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/conv_autotuning.proto + +#ifndef GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprotobuf_2fconv_5fautotuning_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprotobuf_2fconv_5fautotuning_2eproto + +#include +#include + +#include +#if PROTOBUF_VERSION < 3021000 +#error This file was generated by a newer version of protoc which is +#error incompatible with your Protocol Buffer headers. Please update +#error your headers. +#endif +#if 3021009 < PROTOBUF_MIN_PROTOC_VERSION +#error This file was generated by an older version of protoc which is +#error incompatible with your Protocol Buffer headers. Please +#error regenerate this file with a newer version of protoc. +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include // IWYU pragma: export +#include // IWYU pragma: export +#include +#include "tsl/protobuf/dnn.pb.h" +// @@protoc_insertion_point(includes) +#include +#define PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2fprotobuf_2fconv_5fautotuning_2eproto +PROTOBUF_NAMESPACE_OPEN +namespace internal { +class AnyMetadata; +} // namespace internal +PROTOBUF_NAMESPACE_CLOSE + +// Internal implementation detail -- do not use these members. +struct TableStruct_tensorflow_2fcore_2fprotobuf_2fconv_5fautotuning_2eproto { + static const uint32_t offsets[]; +}; +extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_tensorflow_2fcore_2fprotobuf_2fconv_5fautotuning_2eproto; +namespace tensorflow { +class ConvolutionProto; +struct ConvolutionProtoDefaultTypeInternal; +extern ConvolutionProtoDefaultTypeInternal _ConvolutionProto_default_instance_; +class MatmulProto; +struct MatmulProtoDefaultTypeInternal; +extern MatmulProtoDefaultTypeInternal _MatmulProto_default_instance_; +} // namespace tensorflow +PROTOBUF_NAMESPACE_OPEN +template<> ::tensorflow::ConvolutionProto* Arena::CreateMaybeMessage<::tensorflow::ConvolutionProto>(Arena*); +template<> ::tensorflow::MatmulProto* Arena::CreateMaybeMessage<::tensorflow::MatmulProto>(Arena*); +PROTOBUF_NAMESPACE_CLOSE +namespace tensorflow { + +// =================================================================== + +class ConvolutionProto final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.ConvolutionProto) */ { + public: + inline ConvolutionProto() : ConvolutionProto(nullptr) {} + ~ConvolutionProto() override; + explicit PROTOBUF_CONSTEXPR ConvolutionProto(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + ConvolutionProto(const ConvolutionProto& from); + ConvolutionProto(ConvolutionProto&& from) noexcept + : ConvolutionProto() { + *this = ::std::move(from); + } + + inline ConvolutionProto& operator=(const ConvolutionProto& from) { + CopyFrom(from); + return *this; + } + inline ConvolutionProto& operator=(ConvolutionProto&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const ConvolutionProto& default_instance() { + return *internal_default_instance(); + } + static inline const ConvolutionProto* internal_default_instance() { + return reinterpret_cast( + &_ConvolutionProto_default_instance_); + } + static constexpr int kIndexInFileMessages = + 0; + + friend void swap(ConvolutionProto& a, ConvolutionProto& b) { + a.Swap(&b); + } + inline void Swap(ConvolutionProto* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(ConvolutionProto* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + ConvolutionProto* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const ConvolutionProto& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const ConvolutionProto& from) { + ConvolutionProto::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(ConvolutionProto* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.ConvolutionProto"; + } + protected: + explicit ConvolutionProto(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kInputFieldNumber = 2, + kFilterFieldNumber = 3, + kOutputFieldNumber = 4, + kConvDescFieldNumber = 5, + kKindFieldNumber = 1, + kActivationFieldNumber = 8, + kConvScaleFieldNumber = 6, + kSideValueScaleFieldNumber = 7, + kInputAddressFieldNumber = 9, + kFilterAddressFieldNumber = 10, + kOutputAddressFieldNumber = 11, + kBiasAddressFieldNumber = 12, + kSideInputAddressFieldNumber = 13, + }; + // .stream_executor.dnn.TensorDescriptorProto input = 2; + bool has_input() const; + private: + bool _internal_has_input() const; + public: + void clear_input(); + const ::stream_executor::dnn::TensorDescriptorProto& input() const; + PROTOBUF_NODISCARD ::stream_executor::dnn::TensorDescriptorProto* release_input(); + ::stream_executor::dnn::TensorDescriptorProto* mutable_input(); + void set_allocated_input(::stream_executor::dnn::TensorDescriptorProto* input); + private: + const ::stream_executor::dnn::TensorDescriptorProto& _internal_input() const; + ::stream_executor::dnn::TensorDescriptorProto* _internal_mutable_input(); + public: + void unsafe_arena_set_allocated_input( + ::stream_executor::dnn::TensorDescriptorProto* input); + ::stream_executor::dnn::TensorDescriptorProto* unsafe_arena_release_input(); + + // .stream_executor.dnn.TensorDescriptorProto filter = 3; + bool has_filter() const; + private: + bool _internal_has_filter() const; + public: + void clear_filter(); + const ::stream_executor::dnn::TensorDescriptorProto& filter() const; + PROTOBUF_NODISCARD ::stream_executor::dnn::TensorDescriptorProto* release_filter(); + ::stream_executor::dnn::TensorDescriptorProto* mutable_filter(); + void set_allocated_filter(::stream_executor::dnn::TensorDescriptorProto* filter); + private: + const ::stream_executor::dnn::TensorDescriptorProto& _internal_filter() const; + ::stream_executor::dnn::TensorDescriptorProto* _internal_mutable_filter(); + public: + void unsafe_arena_set_allocated_filter( + ::stream_executor::dnn::TensorDescriptorProto* filter); + ::stream_executor::dnn::TensorDescriptorProto* unsafe_arena_release_filter(); + + // .stream_executor.dnn.TensorDescriptorProto output = 4; + bool has_output() const; + private: + bool _internal_has_output() const; + public: + void clear_output(); + const ::stream_executor::dnn::TensorDescriptorProto& output() const; + PROTOBUF_NODISCARD ::stream_executor::dnn::TensorDescriptorProto* release_output(); + ::stream_executor::dnn::TensorDescriptorProto* mutable_output(); + void set_allocated_output(::stream_executor::dnn::TensorDescriptorProto* output); + private: + const ::stream_executor::dnn::TensorDescriptorProto& _internal_output() const; + ::stream_executor::dnn::TensorDescriptorProto* _internal_mutable_output(); + public: + void unsafe_arena_set_allocated_output( + ::stream_executor::dnn::TensorDescriptorProto* output); + ::stream_executor::dnn::TensorDescriptorProto* unsafe_arena_release_output(); + + // .stream_executor.dnn.ConvolutionDescriptorProto conv_desc = 5; + bool has_conv_desc() const; + private: + bool _internal_has_conv_desc() const; + public: + void clear_conv_desc(); + const ::stream_executor::dnn::ConvolutionDescriptorProto& conv_desc() const; + PROTOBUF_NODISCARD ::stream_executor::dnn::ConvolutionDescriptorProto* release_conv_desc(); + ::stream_executor::dnn::ConvolutionDescriptorProto* mutable_conv_desc(); + void set_allocated_conv_desc(::stream_executor::dnn::ConvolutionDescriptorProto* conv_desc); + private: + const ::stream_executor::dnn::ConvolutionDescriptorProto& _internal_conv_desc() const; + ::stream_executor::dnn::ConvolutionDescriptorProto* _internal_mutable_conv_desc(); + public: + void unsafe_arena_set_allocated_conv_desc( + ::stream_executor::dnn::ConvolutionDescriptorProto* conv_desc); + ::stream_executor::dnn::ConvolutionDescriptorProto* unsafe_arena_release_conv_desc(); + + // .stream_executor.dnn.ConvolutionKind kind = 1; + void clear_kind(); + ::stream_executor::dnn::ConvolutionKind kind() const; + void set_kind(::stream_executor::dnn::ConvolutionKind value); + private: + ::stream_executor::dnn::ConvolutionKind _internal_kind() const; + void _internal_set_kind(::stream_executor::dnn::ConvolutionKind value); + public: + + // .stream_executor.dnn.ActivationMode activation = 8; + void clear_activation(); + ::stream_executor::dnn::ActivationMode activation() const; + void set_activation(::stream_executor::dnn::ActivationMode value); + private: + ::stream_executor::dnn::ActivationMode _internal_activation() const; + void _internal_set_activation(::stream_executor::dnn::ActivationMode value); + public: + + // double conv_scale = 6; + void clear_conv_scale(); + double conv_scale() const; + void set_conv_scale(double value); + private: + double _internal_conv_scale() const; + void _internal_set_conv_scale(double value); + public: + + // double side_value_scale = 7; + void clear_side_value_scale(); + double side_value_scale() const; + void set_side_value_scale(double value); + private: + double _internal_side_value_scale() const; + void _internal_set_side_value_scale(double value); + public: + + // int64 input_address = 9; + void clear_input_address(); + int64_t input_address() const; + void set_input_address(int64_t value); + private: + int64_t _internal_input_address() const; + void _internal_set_input_address(int64_t value); + public: + + // int64 filter_address = 10; + void clear_filter_address(); + int64_t filter_address() const; + void set_filter_address(int64_t value); + private: + int64_t _internal_filter_address() const; + void _internal_set_filter_address(int64_t value); + public: + + // int64 output_address = 11; + void clear_output_address(); + int64_t output_address() const; + void set_output_address(int64_t value); + private: + int64_t _internal_output_address() const; + void _internal_set_output_address(int64_t value); + public: + + // int64 bias_address = 12; + void clear_bias_address(); + int64_t bias_address() const; + void set_bias_address(int64_t value); + private: + int64_t _internal_bias_address() const; + void _internal_set_bias_address(int64_t value); + public: + + // int64 side_input_address = 13; + void clear_side_input_address(); + int64_t side_input_address() const; + void set_side_input_address(int64_t value); + private: + int64_t _internal_side_input_address() const; + void _internal_set_side_input_address(int64_t value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.ConvolutionProto) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::stream_executor::dnn::TensorDescriptorProto* input_; + ::stream_executor::dnn::TensorDescriptorProto* filter_; + ::stream_executor::dnn::TensorDescriptorProto* output_; + ::stream_executor::dnn::ConvolutionDescriptorProto* conv_desc_; + int kind_; + int activation_; + double conv_scale_; + double side_value_scale_; + int64_t input_address_; + int64_t filter_address_; + int64_t output_address_; + int64_t bias_address_; + int64_t side_input_address_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fconv_5fautotuning_2eproto; +}; +// ------------------------------------------------------------------- + +class MatmulProto final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.MatmulProto) */ { + public: + inline MatmulProto() : MatmulProto(nullptr) {} + ~MatmulProto() override; + explicit PROTOBUF_CONSTEXPR MatmulProto(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + MatmulProto(const MatmulProto& from); + MatmulProto(MatmulProto&& from) noexcept + : MatmulProto() { + *this = ::std::move(from); + } + + inline MatmulProto& operator=(const MatmulProto& from) { + CopyFrom(from); + return *this; + } + inline MatmulProto& operator=(MatmulProto&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const MatmulProto& default_instance() { + return *internal_default_instance(); + } + static inline const MatmulProto* internal_default_instance() { + return reinterpret_cast( + &_MatmulProto_default_instance_); + } + static constexpr int kIndexInFileMessages = + 1; + + friend void swap(MatmulProto& a, MatmulProto& b) { + a.Swap(&b); + } + inline void Swap(MatmulProto* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(MatmulProto* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + MatmulProto* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const MatmulProto& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const MatmulProto& from) { + MatmulProto::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(MatmulProto* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.MatmulProto"; + } + protected: + explicit MatmulProto(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kAbDtypeFieldNumber = 1, + kCDtypeFieldNumber = 2, + kMFieldNumber = 5, + kNFieldNumber = 6, + kTransAFieldNumber = 3, + kTransBFieldNumber = 4, + kActivationFieldNumber = 11, + kKFieldNumber = 7, + kLdaFieldNumber = 8, + kLdbFieldNumber = 9, + kLdcFieldNumber = 10, + kAAddressFieldNumber = 12, + kBAddressFieldNumber = 13, + kCAddressFieldNumber = 14, + kBiasAddressFieldNumber = 15, + }; + // .stream_executor.dnn.DataType ab_dtype = 1; + void clear_ab_dtype(); + ::stream_executor::dnn::DataType ab_dtype() const; + void set_ab_dtype(::stream_executor::dnn::DataType value); + private: + ::stream_executor::dnn::DataType _internal_ab_dtype() const; + void _internal_set_ab_dtype(::stream_executor::dnn::DataType value); + public: + + // .stream_executor.dnn.DataType c_dtype = 2; + void clear_c_dtype(); + ::stream_executor::dnn::DataType c_dtype() const; + void set_c_dtype(::stream_executor::dnn::DataType value); + private: + ::stream_executor::dnn::DataType _internal_c_dtype() const; + void _internal_set_c_dtype(::stream_executor::dnn::DataType value); + public: + + // uint64 m = 5; + void clear_m(); + uint64_t m() const; + void set_m(uint64_t value); + private: + uint64_t _internal_m() const; + void _internal_set_m(uint64_t value); + public: + + // uint64 n = 6; + void clear_n(); + uint64_t n() const; + void set_n(uint64_t value); + private: + uint64_t _internal_n() const; + void _internal_set_n(uint64_t value); + public: + + // bool trans_a = 3; + void clear_trans_a(); + bool trans_a() const; + void set_trans_a(bool value); + private: + bool _internal_trans_a() const; + void _internal_set_trans_a(bool value); + public: + + // bool trans_b = 4; + void clear_trans_b(); + bool trans_b() const; + void set_trans_b(bool value); + private: + bool _internal_trans_b() const; + void _internal_set_trans_b(bool value); + public: + + // .stream_executor.dnn.ActivationMode activation = 11; + void clear_activation(); + ::stream_executor::dnn::ActivationMode activation() const; + void set_activation(::stream_executor::dnn::ActivationMode value); + private: + ::stream_executor::dnn::ActivationMode _internal_activation() const; + void _internal_set_activation(::stream_executor::dnn::ActivationMode value); + public: + + // uint64 k = 7; + void clear_k(); + uint64_t k() const; + void set_k(uint64_t value); + private: + uint64_t _internal_k() const; + void _internal_set_k(uint64_t value); + public: + + // int64 lda = 8; + void clear_lda(); + int64_t lda() const; + void set_lda(int64_t value); + private: + int64_t _internal_lda() const; + void _internal_set_lda(int64_t value); + public: + + // int64 ldb = 9; + void clear_ldb(); + int64_t ldb() const; + void set_ldb(int64_t value); + private: + int64_t _internal_ldb() const; + void _internal_set_ldb(int64_t value); + public: + + // int64 ldc = 10; + void clear_ldc(); + int64_t ldc() const; + void set_ldc(int64_t value); + private: + int64_t _internal_ldc() const; + void _internal_set_ldc(int64_t value); + public: + + // int64 a_address = 12; + void clear_a_address(); + int64_t a_address() const; + void set_a_address(int64_t value); + private: + int64_t _internal_a_address() const; + void _internal_set_a_address(int64_t value); + public: + + // int64 b_address = 13; + void clear_b_address(); + int64_t b_address() const; + void set_b_address(int64_t value); + private: + int64_t _internal_b_address() const; + void _internal_set_b_address(int64_t value); + public: + + // int64 c_address = 14; + void clear_c_address(); + int64_t c_address() const; + void set_c_address(int64_t value); + private: + int64_t _internal_c_address() const; + void _internal_set_c_address(int64_t value); + public: + + // int64 bias_address = 15; + void clear_bias_address(); + int64_t bias_address() const; + void set_bias_address(int64_t value); + private: + int64_t _internal_bias_address() const; + void _internal_set_bias_address(int64_t value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.MatmulProto) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + int ab_dtype_; + int c_dtype_; + uint64_t m_; + uint64_t n_; + bool trans_a_; + bool trans_b_; + int activation_; + uint64_t k_; + int64_t lda_; + int64_t ldb_; + int64_t ldc_; + int64_t a_address_; + int64_t b_address_; + int64_t c_address_; + int64_t bias_address_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fconv_5fautotuning_2eproto; +}; +// =================================================================== + + +// =================================================================== + +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// ConvolutionProto + +// .stream_executor.dnn.ConvolutionKind kind = 1; +inline void ConvolutionProto::clear_kind() { + _impl_.kind_ = 0; +} +inline ::stream_executor::dnn::ConvolutionKind ConvolutionProto::_internal_kind() const { + return static_cast< ::stream_executor::dnn::ConvolutionKind >(_impl_.kind_); +} +inline ::stream_executor::dnn::ConvolutionKind ConvolutionProto::kind() const { + // @@protoc_insertion_point(field_get:tensorflow.ConvolutionProto.kind) + return _internal_kind(); +} +inline void ConvolutionProto::_internal_set_kind(::stream_executor::dnn::ConvolutionKind value) { + + _impl_.kind_ = value; +} +inline void ConvolutionProto::set_kind(::stream_executor::dnn::ConvolutionKind value) { + _internal_set_kind(value); + // @@protoc_insertion_point(field_set:tensorflow.ConvolutionProto.kind) +} + +// .stream_executor.dnn.TensorDescriptorProto input = 2; +inline bool ConvolutionProto::_internal_has_input() const { + return this != internal_default_instance() && _impl_.input_ != nullptr; +} +inline bool ConvolutionProto::has_input() const { + return _internal_has_input(); +} +inline const ::stream_executor::dnn::TensorDescriptorProto& ConvolutionProto::_internal_input() const { + const ::stream_executor::dnn::TensorDescriptorProto* p = _impl_.input_; + return p != nullptr ? *p : reinterpret_cast( + ::stream_executor::dnn::_TensorDescriptorProto_default_instance_); +} +inline const ::stream_executor::dnn::TensorDescriptorProto& ConvolutionProto::input() const { + // @@protoc_insertion_point(field_get:tensorflow.ConvolutionProto.input) + return _internal_input(); +} +inline void ConvolutionProto::unsafe_arena_set_allocated_input( + ::stream_executor::dnn::TensorDescriptorProto* input) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.input_); + } + _impl_.input_ = input; + if (input) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.ConvolutionProto.input) +} +inline ::stream_executor::dnn::TensorDescriptorProto* ConvolutionProto::release_input() { + + ::stream_executor::dnn::TensorDescriptorProto* temp = _impl_.input_; + _impl_.input_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::stream_executor::dnn::TensorDescriptorProto* ConvolutionProto::unsafe_arena_release_input() { + // @@protoc_insertion_point(field_release:tensorflow.ConvolutionProto.input) + + ::stream_executor::dnn::TensorDescriptorProto* temp = _impl_.input_; + _impl_.input_ = nullptr; + return temp; +} +inline ::stream_executor::dnn::TensorDescriptorProto* ConvolutionProto::_internal_mutable_input() { + + if (_impl_.input_ == nullptr) { + auto* p = CreateMaybeMessage<::stream_executor::dnn::TensorDescriptorProto>(GetArenaForAllocation()); + _impl_.input_ = p; + } + return _impl_.input_; +} +inline ::stream_executor::dnn::TensorDescriptorProto* ConvolutionProto::mutable_input() { + ::stream_executor::dnn::TensorDescriptorProto* _msg = _internal_mutable_input(); + // @@protoc_insertion_point(field_mutable:tensorflow.ConvolutionProto.input) + return _msg; +} +inline void ConvolutionProto::set_allocated_input(::stream_executor::dnn::TensorDescriptorProto* input) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.input_); + } + if (input) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( + reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(input)); + if (message_arena != submessage_arena) { + input = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, input, submessage_arena); + } + + } else { + + } + _impl_.input_ = input; + // @@protoc_insertion_point(field_set_allocated:tensorflow.ConvolutionProto.input) +} + +// .stream_executor.dnn.TensorDescriptorProto filter = 3; +inline bool ConvolutionProto::_internal_has_filter() const { + return this != internal_default_instance() && _impl_.filter_ != nullptr; +} +inline bool ConvolutionProto::has_filter() const { + return _internal_has_filter(); +} +inline const ::stream_executor::dnn::TensorDescriptorProto& ConvolutionProto::_internal_filter() const { + const ::stream_executor::dnn::TensorDescriptorProto* p = _impl_.filter_; + return p != nullptr ? *p : reinterpret_cast( + ::stream_executor::dnn::_TensorDescriptorProto_default_instance_); +} +inline const ::stream_executor::dnn::TensorDescriptorProto& ConvolutionProto::filter() const { + // @@protoc_insertion_point(field_get:tensorflow.ConvolutionProto.filter) + return _internal_filter(); +} +inline void ConvolutionProto::unsafe_arena_set_allocated_filter( + ::stream_executor::dnn::TensorDescriptorProto* filter) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.filter_); + } + _impl_.filter_ = filter; + if (filter) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.ConvolutionProto.filter) +} +inline ::stream_executor::dnn::TensorDescriptorProto* ConvolutionProto::release_filter() { + + ::stream_executor::dnn::TensorDescriptorProto* temp = _impl_.filter_; + _impl_.filter_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::stream_executor::dnn::TensorDescriptorProto* ConvolutionProto::unsafe_arena_release_filter() { + // @@protoc_insertion_point(field_release:tensorflow.ConvolutionProto.filter) + + ::stream_executor::dnn::TensorDescriptorProto* temp = _impl_.filter_; + _impl_.filter_ = nullptr; + return temp; +} +inline ::stream_executor::dnn::TensorDescriptorProto* ConvolutionProto::_internal_mutable_filter() { + + if (_impl_.filter_ == nullptr) { + auto* p = CreateMaybeMessage<::stream_executor::dnn::TensorDescriptorProto>(GetArenaForAllocation()); + _impl_.filter_ = p; + } + return _impl_.filter_; +} +inline ::stream_executor::dnn::TensorDescriptorProto* ConvolutionProto::mutable_filter() { + ::stream_executor::dnn::TensorDescriptorProto* _msg = _internal_mutable_filter(); + // @@protoc_insertion_point(field_mutable:tensorflow.ConvolutionProto.filter) + return _msg; +} +inline void ConvolutionProto::set_allocated_filter(::stream_executor::dnn::TensorDescriptorProto* filter) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.filter_); + } + if (filter) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( + reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(filter)); + if (message_arena != submessage_arena) { + filter = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, filter, submessage_arena); + } + + } else { + + } + _impl_.filter_ = filter; + // @@protoc_insertion_point(field_set_allocated:tensorflow.ConvolutionProto.filter) +} + +// .stream_executor.dnn.TensorDescriptorProto output = 4; +inline bool ConvolutionProto::_internal_has_output() const { + return this != internal_default_instance() && _impl_.output_ != nullptr; +} +inline bool ConvolutionProto::has_output() const { + return _internal_has_output(); +} +inline const ::stream_executor::dnn::TensorDescriptorProto& ConvolutionProto::_internal_output() const { + const ::stream_executor::dnn::TensorDescriptorProto* p = _impl_.output_; + return p != nullptr ? *p : reinterpret_cast( + ::stream_executor::dnn::_TensorDescriptorProto_default_instance_); +} +inline const ::stream_executor::dnn::TensorDescriptorProto& ConvolutionProto::output() const { + // @@protoc_insertion_point(field_get:tensorflow.ConvolutionProto.output) + return _internal_output(); +} +inline void ConvolutionProto::unsafe_arena_set_allocated_output( + ::stream_executor::dnn::TensorDescriptorProto* output) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.output_); + } + _impl_.output_ = output; + if (output) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.ConvolutionProto.output) +} +inline ::stream_executor::dnn::TensorDescriptorProto* ConvolutionProto::release_output() { + + ::stream_executor::dnn::TensorDescriptorProto* temp = _impl_.output_; + _impl_.output_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::stream_executor::dnn::TensorDescriptorProto* ConvolutionProto::unsafe_arena_release_output() { + // @@protoc_insertion_point(field_release:tensorflow.ConvolutionProto.output) + + ::stream_executor::dnn::TensorDescriptorProto* temp = _impl_.output_; + _impl_.output_ = nullptr; + return temp; +} +inline ::stream_executor::dnn::TensorDescriptorProto* ConvolutionProto::_internal_mutable_output() { + + if (_impl_.output_ == nullptr) { + auto* p = CreateMaybeMessage<::stream_executor::dnn::TensorDescriptorProto>(GetArenaForAllocation()); + _impl_.output_ = p; + } + return _impl_.output_; +} +inline ::stream_executor::dnn::TensorDescriptorProto* ConvolutionProto::mutable_output() { + ::stream_executor::dnn::TensorDescriptorProto* _msg = _internal_mutable_output(); + // @@protoc_insertion_point(field_mutable:tensorflow.ConvolutionProto.output) + return _msg; +} +inline void ConvolutionProto::set_allocated_output(::stream_executor::dnn::TensorDescriptorProto* output) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.output_); + } + if (output) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( + reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(output)); + if (message_arena != submessage_arena) { + output = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, output, submessage_arena); + } + + } else { + + } + _impl_.output_ = output; + // @@protoc_insertion_point(field_set_allocated:tensorflow.ConvolutionProto.output) +} + +// .stream_executor.dnn.ConvolutionDescriptorProto conv_desc = 5; +inline bool ConvolutionProto::_internal_has_conv_desc() const { + return this != internal_default_instance() && _impl_.conv_desc_ != nullptr; +} +inline bool ConvolutionProto::has_conv_desc() const { + return _internal_has_conv_desc(); +} +inline const ::stream_executor::dnn::ConvolutionDescriptorProto& ConvolutionProto::_internal_conv_desc() const { + const ::stream_executor::dnn::ConvolutionDescriptorProto* p = _impl_.conv_desc_; + return p != nullptr ? *p : reinterpret_cast( + ::stream_executor::dnn::_ConvolutionDescriptorProto_default_instance_); +} +inline const ::stream_executor::dnn::ConvolutionDescriptorProto& ConvolutionProto::conv_desc() const { + // @@protoc_insertion_point(field_get:tensorflow.ConvolutionProto.conv_desc) + return _internal_conv_desc(); +} +inline void ConvolutionProto::unsafe_arena_set_allocated_conv_desc( + ::stream_executor::dnn::ConvolutionDescriptorProto* conv_desc) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.conv_desc_); + } + _impl_.conv_desc_ = conv_desc; + if (conv_desc) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.ConvolutionProto.conv_desc) +} +inline ::stream_executor::dnn::ConvolutionDescriptorProto* ConvolutionProto::release_conv_desc() { + + ::stream_executor::dnn::ConvolutionDescriptorProto* temp = _impl_.conv_desc_; + _impl_.conv_desc_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::stream_executor::dnn::ConvolutionDescriptorProto* ConvolutionProto::unsafe_arena_release_conv_desc() { + // @@protoc_insertion_point(field_release:tensorflow.ConvolutionProto.conv_desc) + + ::stream_executor::dnn::ConvolutionDescriptorProto* temp = _impl_.conv_desc_; + _impl_.conv_desc_ = nullptr; + return temp; +} +inline ::stream_executor::dnn::ConvolutionDescriptorProto* ConvolutionProto::_internal_mutable_conv_desc() { + + if (_impl_.conv_desc_ == nullptr) { + auto* p = CreateMaybeMessage<::stream_executor::dnn::ConvolutionDescriptorProto>(GetArenaForAllocation()); + _impl_.conv_desc_ = p; + } + return _impl_.conv_desc_; +} +inline ::stream_executor::dnn::ConvolutionDescriptorProto* ConvolutionProto::mutable_conv_desc() { + ::stream_executor::dnn::ConvolutionDescriptorProto* _msg = _internal_mutable_conv_desc(); + // @@protoc_insertion_point(field_mutable:tensorflow.ConvolutionProto.conv_desc) + return _msg; +} +inline void ConvolutionProto::set_allocated_conv_desc(::stream_executor::dnn::ConvolutionDescriptorProto* conv_desc) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.conv_desc_); + } + if (conv_desc) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( + reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(conv_desc)); + if (message_arena != submessage_arena) { + conv_desc = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, conv_desc, submessage_arena); + } + + } else { + + } + _impl_.conv_desc_ = conv_desc; + // @@protoc_insertion_point(field_set_allocated:tensorflow.ConvolutionProto.conv_desc) +} + +// double conv_scale = 6; +inline void ConvolutionProto::clear_conv_scale() { + _impl_.conv_scale_ = 0; +} +inline double ConvolutionProto::_internal_conv_scale() const { + return _impl_.conv_scale_; +} +inline double ConvolutionProto::conv_scale() const { + // @@protoc_insertion_point(field_get:tensorflow.ConvolutionProto.conv_scale) + return _internal_conv_scale(); +} +inline void ConvolutionProto::_internal_set_conv_scale(double value) { + + _impl_.conv_scale_ = value; +} +inline void ConvolutionProto::set_conv_scale(double value) { + _internal_set_conv_scale(value); + // @@protoc_insertion_point(field_set:tensorflow.ConvolutionProto.conv_scale) +} + +// double side_value_scale = 7; +inline void ConvolutionProto::clear_side_value_scale() { + _impl_.side_value_scale_ = 0; +} +inline double ConvolutionProto::_internal_side_value_scale() const { + return _impl_.side_value_scale_; +} +inline double ConvolutionProto::side_value_scale() const { + // @@protoc_insertion_point(field_get:tensorflow.ConvolutionProto.side_value_scale) + return _internal_side_value_scale(); +} +inline void ConvolutionProto::_internal_set_side_value_scale(double value) { + + _impl_.side_value_scale_ = value; +} +inline void ConvolutionProto::set_side_value_scale(double value) { + _internal_set_side_value_scale(value); + // @@protoc_insertion_point(field_set:tensorflow.ConvolutionProto.side_value_scale) +} + +// .stream_executor.dnn.ActivationMode activation = 8; +inline void ConvolutionProto::clear_activation() { + _impl_.activation_ = 0; +} +inline ::stream_executor::dnn::ActivationMode ConvolutionProto::_internal_activation() const { + return static_cast< ::stream_executor::dnn::ActivationMode >(_impl_.activation_); +} +inline ::stream_executor::dnn::ActivationMode ConvolutionProto::activation() const { + // @@protoc_insertion_point(field_get:tensorflow.ConvolutionProto.activation) + return _internal_activation(); +} +inline void ConvolutionProto::_internal_set_activation(::stream_executor::dnn::ActivationMode value) { + + _impl_.activation_ = value; +} +inline void ConvolutionProto::set_activation(::stream_executor::dnn::ActivationMode value) { + _internal_set_activation(value); + // @@protoc_insertion_point(field_set:tensorflow.ConvolutionProto.activation) +} + +// int64 input_address = 9; +inline void ConvolutionProto::clear_input_address() { + _impl_.input_address_ = int64_t{0}; +} +inline int64_t ConvolutionProto::_internal_input_address() const { + return _impl_.input_address_; +} +inline int64_t ConvolutionProto::input_address() const { + // @@protoc_insertion_point(field_get:tensorflow.ConvolutionProto.input_address) + return _internal_input_address(); +} +inline void ConvolutionProto::_internal_set_input_address(int64_t value) { + + _impl_.input_address_ = value; +} +inline void ConvolutionProto::set_input_address(int64_t value) { + _internal_set_input_address(value); + // @@protoc_insertion_point(field_set:tensorflow.ConvolutionProto.input_address) +} + +// int64 filter_address = 10; +inline void ConvolutionProto::clear_filter_address() { + _impl_.filter_address_ = int64_t{0}; +} +inline int64_t ConvolutionProto::_internal_filter_address() const { + return _impl_.filter_address_; +} +inline int64_t ConvolutionProto::filter_address() const { + // @@protoc_insertion_point(field_get:tensorflow.ConvolutionProto.filter_address) + return _internal_filter_address(); +} +inline void ConvolutionProto::_internal_set_filter_address(int64_t value) { + + _impl_.filter_address_ = value; +} +inline void ConvolutionProto::set_filter_address(int64_t value) { + _internal_set_filter_address(value); + // @@protoc_insertion_point(field_set:tensorflow.ConvolutionProto.filter_address) +} + +// int64 output_address = 11; +inline void ConvolutionProto::clear_output_address() { + _impl_.output_address_ = int64_t{0}; +} +inline int64_t ConvolutionProto::_internal_output_address() const { + return _impl_.output_address_; +} +inline int64_t ConvolutionProto::output_address() const { + // @@protoc_insertion_point(field_get:tensorflow.ConvolutionProto.output_address) + return _internal_output_address(); +} +inline void ConvolutionProto::_internal_set_output_address(int64_t value) { + + _impl_.output_address_ = value; +} +inline void ConvolutionProto::set_output_address(int64_t value) { + _internal_set_output_address(value); + // @@protoc_insertion_point(field_set:tensorflow.ConvolutionProto.output_address) +} + +// int64 bias_address = 12; +inline void ConvolutionProto::clear_bias_address() { + _impl_.bias_address_ = int64_t{0}; +} +inline int64_t ConvolutionProto::_internal_bias_address() const { + return _impl_.bias_address_; +} +inline int64_t ConvolutionProto::bias_address() const { + // @@protoc_insertion_point(field_get:tensorflow.ConvolutionProto.bias_address) + return _internal_bias_address(); +} +inline void ConvolutionProto::_internal_set_bias_address(int64_t value) { + + _impl_.bias_address_ = value; +} +inline void ConvolutionProto::set_bias_address(int64_t value) { + _internal_set_bias_address(value); + // @@protoc_insertion_point(field_set:tensorflow.ConvolutionProto.bias_address) +} + +// int64 side_input_address = 13; +inline void ConvolutionProto::clear_side_input_address() { + _impl_.side_input_address_ = int64_t{0}; +} +inline int64_t ConvolutionProto::_internal_side_input_address() const { + return _impl_.side_input_address_; +} +inline int64_t ConvolutionProto::side_input_address() const { + // @@protoc_insertion_point(field_get:tensorflow.ConvolutionProto.side_input_address) + return _internal_side_input_address(); +} +inline void ConvolutionProto::_internal_set_side_input_address(int64_t value) { + + _impl_.side_input_address_ = value; +} +inline void ConvolutionProto::set_side_input_address(int64_t value) { + _internal_set_side_input_address(value); + // @@protoc_insertion_point(field_set:tensorflow.ConvolutionProto.side_input_address) +} + +// ------------------------------------------------------------------- + +// MatmulProto + +// .stream_executor.dnn.DataType ab_dtype = 1; +inline void MatmulProto::clear_ab_dtype() { + _impl_.ab_dtype_ = 0; +} +inline ::stream_executor::dnn::DataType MatmulProto::_internal_ab_dtype() const { + return static_cast< ::stream_executor::dnn::DataType >(_impl_.ab_dtype_); +} +inline ::stream_executor::dnn::DataType MatmulProto::ab_dtype() const { + // @@protoc_insertion_point(field_get:tensorflow.MatmulProto.ab_dtype) + return _internal_ab_dtype(); +} +inline void MatmulProto::_internal_set_ab_dtype(::stream_executor::dnn::DataType value) { + + _impl_.ab_dtype_ = value; +} +inline void MatmulProto::set_ab_dtype(::stream_executor::dnn::DataType value) { + _internal_set_ab_dtype(value); + // @@protoc_insertion_point(field_set:tensorflow.MatmulProto.ab_dtype) +} + +// .stream_executor.dnn.DataType c_dtype = 2; +inline void MatmulProto::clear_c_dtype() { + _impl_.c_dtype_ = 0; +} +inline ::stream_executor::dnn::DataType MatmulProto::_internal_c_dtype() const { + return static_cast< ::stream_executor::dnn::DataType >(_impl_.c_dtype_); +} +inline ::stream_executor::dnn::DataType MatmulProto::c_dtype() const { + // @@protoc_insertion_point(field_get:tensorflow.MatmulProto.c_dtype) + return _internal_c_dtype(); +} +inline void MatmulProto::_internal_set_c_dtype(::stream_executor::dnn::DataType value) { + + _impl_.c_dtype_ = value; +} +inline void MatmulProto::set_c_dtype(::stream_executor::dnn::DataType value) { + _internal_set_c_dtype(value); + // @@protoc_insertion_point(field_set:tensorflow.MatmulProto.c_dtype) +} + +// bool trans_a = 3; +inline void MatmulProto::clear_trans_a() { + _impl_.trans_a_ = false; +} +inline bool MatmulProto::_internal_trans_a() const { + return _impl_.trans_a_; +} +inline bool MatmulProto::trans_a() const { + // @@protoc_insertion_point(field_get:tensorflow.MatmulProto.trans_a) + return _internal_trans_a(); +} +inline void MatmulProto::_internal_set_trans_a(bool value) { + + _impl_.trans_a_ = value; +} +inline void MatmulProto::set_trans_a(bool value) { + _internal_set_trans_a(value); + // @@protoc_insertion_point(field_set:tensorflow.MatmulProto.trans_a) +} + +// bool trans_b = 4; +inline void MatmulProto::clear_trans_b() { + _impl_.trans_b_ = false; +} +inline bool MatmulProto::_internal_trans_b() const { + return _impl_.trans_b_; +} +inline bool MatmulProto::trans_b() const { + // @@protoc_insertion_point(field_get:tensorflow.MatmulProto.trans_b) + return _internal_trans_b(); +} +inline void MatmulProto::_internal_set_trans_b(bool value) { + + _impl_.trans_b_ = value; +} +inline void MatmulProto::set_trans_b(bool value) { + _internal_set_trans_b(value); + // @@protoc_insertion_point(field_set:tensorflow.MatmulProto.trans_b) +} + +// uint64 m = 5; +inline void MatmulProto::clear_m() { + _impl_.m_ = uint64_t{0u}; +} +inline uint64_t MatmulProto::_internal_m() const { + return _impl_.m_; +} +inline uint64_t MatmulProto::m() const { + // @@protoc_insertion_point(field_get:tensorflow.MatmulProto.m) + return _internal_m(); +} +inline void MatmulProto::_internal_set_m(uint64_t value) { + + _impl_.m_ = value; +} +inline void MatmulProto::set_m(uint64_t value) { + _internal_set_m(value); + // @@protoc_insertion_point(field_set:tensorflow.MatmulProto.m) +} + +// uint64 n = 6; +inline void MatmulProto::clear_n() { + _impl_.n_ = uint64_t{0u}; +} +inline uint64_t MatmulProto::_internal_n() const { + return _impl_.n_; +} +inline uint64_t MatmulProto::n() const { + // @@protoc_insertion_point(field_get:tensorflow.MatmulProto.n) + return _internal_n(); +} +inline void MatmulProto::_internal_set_n(uint64_t value) { + + _impl_.n_ = value; +} +inline void MatmulProto::set_n(uint64_t value) { + _internal_set_n(value); + // @@protoc_insertion_point(field_set:tensorflow.MatmulProto.n) +} + +// uint64 k = 7; +inline void MatmulProto::clear_k() { + _impl_.k_ = uint64_t{0u}; +} +inline uint64_t MatmulProto::_internal_k() const { + return _impl_.k_; +} +inline uint64_t MatmulProto::k() const { + // @@protoc_insertion_point(field_get:tensorflow.MatmulProto.k) + return _internal_k(); +} +inline void MatmulProto::_internal_set_k(uint64_t value) { + + _impl_.k_ = value; +} +inline void MatmulProto::set_k(uint64_t value) { + _internal_set_k(value); + // @@protoc_insertion_point(field_set:tensorflow.MatmulProto.k) +} + +// int64 lda = 8; +inline void MatmulProto::clear_lda() { + _impl_.lda_ = int64_t{0}; +} +inline int64_t MatmulProto::_internal_lda() const { + return _impl_.lda_; +} +inline int64_t MatmulProto::lda() const { + // @@protoc_insertion_point(field_get:tensorflow.MatmulProto.lda) + return _internal_lda(); +} +inline void MatmulProto::_internal_set_lda(int64_t value) { + + _impl_.lda_ = value; +} +inline void MatmulProto::set_lda(int64_t value) { + _internal_set_lda(value); + // @@protoc_insertion_point(field_set:tensorflow.MatmulProto.lda) +} + +// int64 ldb = 9; +inline void MatmulProto::clear_ldb() { + _impl_.ldb_ = int64_t{0}; +} +inline int64_t MatmulProto::_internal_ldb() const { + return _impl_.ldb_; +} +inline int64_t MatmulProto::ldb() const { + // @@protoc_insertion_point(field_get:tensorflow.MatmulProto.ldb) + return _internal_ldb(); +} +inline void MatmulProto::_internal_set_ldb(int64_t value) { + + _impl_.ldb_ = value; +} +inline void MatmulProto::set_ldb(int64_t value) { + _internal_set_ldb(value); + // @@protoc_insertion_point(field_set:tensorflow.MatmulProto.ldb) +} + +// int64 ldc = 10; +inline void MatmulProto::clear_ldc() { + _impl_.ldc_ = int64_t{0}; +} +inline int64_t MatmulProto::_internal_ldc() const { + return _impl_.ldc_; +} +inline int64_t MatmulProto::ldc() const { + // @@protoc_insertion_point(field_get:tensorflow.MatmulProto.ldc) + return _internal_ldc(); +} +inline void MatmulProto::_internal_set_ldc(int64_t value) { + + _impl_.ldc_ = value; +} +inline void MatmulProto::set_ldc(int64_t value) { + _internal_set_ldc(value); + // @@protoc_insertion_point(field_set:tensorflow.MatmulProto.ldc) +} + +// .stream_executor.dnn.ActivationMode activation = 11; +inline void MatmulProto::clear_activation() { + _impl_.activation_ = 0; +} +inline ::stream_executor::dnn::ActivationMode MatmulProto::_internal_activation() const { + return static_cast< ::stream_executor::dnn::ActivationMode >(_impl_.activation_); +} +inline ::stream_executor::dnn::ActivationMode MatmulProto::activation() const { + // @@protoc_insertion_point(field_get:tensorflow.MatmulProto.activation) + return _internal_activation(); +} +inline void MatmulProto::_internal_set_activation(::stream_executor::dnn::ActivationMode value) { + + _impl_.activation_ = value; +} +inline void MatmulProto::set_activation(::stream_executor::dnn::ActivationMode value) { + _internal_set_activation(value); + // @@protoc_insertion_point(field_set:tensorflow.MatmulProto.activation) +} + +// int64 a_address = 12; +inline void MatmulProto::clear_a_address() { + _impl_.a_address_ = int64_t{0}; +} +inline int64_t MatmulProto::_internal_a_address() const { + return _impl_.a_address_; +} +inline int64_t MatmulProto::a_address() const { + // @@protoc_insertion_point(field_get:tensorflow.MatmulProto.a_address) + return _internal_a_address(); +} +inline void MatmulProto::_internal_set_a_address(int64_t value) { + + _impl_.a_address_ = value; +} +inline void MatmulProto::set_a_address(int64_t value) { + _internal_set_a_address(value); + // @@protoc_insertion_point(field_set:tensorflow.MatmulProto.a_address) +} + +// int64 b_address = 13; +inline void MatmulProto::clear_b_address() { + _impl_.b_address_ = int64_t{0}; +} +inline int64_t MatmulProto::_internal_b_address() const { + return _impl_.b_address_; +} +inline int64_t MatmulProto::b_address() const { + // @@protoc_insertion_point(field_get:tensorflow.MatmulProto.b_address) + return _internal_b_address(); +} +inline void MatmulProto::_internal_set_b_address(int64_t value) { + + _impl_.b_address_ = value; +} +inline void MatmulProto::set_b_address(int64_t value) { + _internal_set_b_address(value); + // @@protoc_insertion_point(field_set:tensorflow.MatmulProto.b_address) +} + +// int64 c_address = 14; +inline void MatmulProto::clear_c_address() { + _impl_.c_address_ = int64_t{0}; +} +inline int64_t MatmulProto::_internal_c_address() const { + return _impl_.c_address_; +} +inline int64_t MatmulProto::c_address() const { + // @@protoc_insertion_point(field_get:tensorflow.MatmulProto.c_address) + return _internal_c_address(); +} +inline void MatmulProto::_internal_set_c_address(int64_t value) { + + _impl_.c_address_ = value; +} +inline void MatmulProto::set_c_address(int64_t value) { + _internal_set_c_address(value); + // @@protoc_insertion_point(field_set:tensorflow.MatmulProto.c_address) +} + +// int64 bias_address = 15; +inline void MatmulProto::clear_bias_address() { + _impl_.bias_address_ = int64_t{0}; +} +inline int64_t MatmulProto::_internal_bias_address() const { + return _impl_.bias_address_; +} +inline int64_t MatmulProto::bias_address() const { + // @@protoc_insertion_point(field_get:tensorflow.MatmulProto.bias_address) + return _internal_bias_address(); +} +inline void MatmulProto::_internal_set_bias_address(int64_t value) { + + _impl_.bias_address_ = value; +} +inline void MatmulProto::set_bias_address(int64_t value) { + _internal_set_bias_address(value); + // @@protoc_insertion_point(field_set:tensorflow.MatmulProto.bias_address) +} + +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ +// ------------------------------------------------------------------- + + +// @@protoc_insertion_point(namespace_scope) + +} // namespace tensorflow + +// @@protoc_insertion_point(global_scope) + +#include +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprotobuf_2fconv_5fautotuning_2eproto diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/core_platform_payloads.pb.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/core_platform_payloads.pb.h new file mode 100644 index 0000000000000000000000000000000000000000..958e669e59bdb2c68e732702fa3bc2e411c5cd88 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/core_platform_payloads.pb.h @@ -0,0 +1,333 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/core_platform_payloads.proto + +#ifndef GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprotobuf_2fcore_5fplatform_5fpayloads_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprotobuf_2fcore_5fplatform_5fpayloads_2eproto + +#include +#include + +#include +#if PROTOBUF_VERSION < 3021000 +#error This file was generated by a newer version of protoc which is +#error incompatible with your Protocol Buffer headers. Please update +#error your headers. +#endif +#if 3021009 < PROTOBUF_MIN_PROTOC_VERSION +#error This file was generated by an older version of protoc which is +#error incompatible with your Protocol Buffer headers. Please +#error regenerate this file with a newer version of protoc. +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include // IWYU pragma: export +#include // IWYU pragma: export +#include +#include +// @@protoc_insertion_point(includes) +#include +#define PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2fprotobuf_2fcore_5fplatform_5fpayloads_2eproto +PROTOBUF_NAMESPACE_OPEN +namespace internal { +class AnyMetadata; +} // namespace internal +PROTOBUF_NAMESPACE_CLOSE + +// Internal implementation detail -- do not use these members. +struct TableStruct_tensorflow_2fcore_2fprotobuf_2fcore_5fplatform_5fpayloads_2eproto { + static const uint32_t offsets[]; +}; +extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_tensorflow_2fcore_2fprotobuf_2fcore_5fplatform_5fpayloads_2eproto; +namespace tensorflow { +namespace core { +namespace platform { +class ErrorSourceProto; +struct ErrorSourceProtoDefaultTypeInternal; +extern ErrorSourceProtoDefaultTypeInternal _ErrorSourceProto_default_instance_; +} // namespace platform +} // namespace core +} // namespace tensorflow +PROTOBUF_NAMESPACE_OPEN +template<> ::tensorflow::core::platform::ErrorSourceProto* Arena::CreateMaybeMessage<::tensorflow::core::platform::ErrorSourceProto>(Arena*); +PROTOBUF_NAMESPACE_CLOSE +namespace tensorflow { +namespace core { +namespace platform { + +enum ErrorSourceProto_ErrorSource : int { + ErrorSourceProto_ErrorSource_UNKNOWN = 0, + ErrorSourceProto_ErrorSource_TPU_COMPILE_OP = 1, + ErrorSourceProto_ErrorSource_TF_XLA_BRIDGE = 2, + ErrorSourceProto_ErrorSource_MLIR_BRIDGE_PHASE_1 = 3, + ErrorSourceProto_ErrorSource_MLIR_BRIDGE_PHASE_2 = 4, + ErrorSourceProto_ErrorSource_EAGER_REMOTE_MGR = 5, + ErrorSourceProto_ErrorSource_ErrorSourceProto_ErrorSource_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits::min(), + ErrorSourceProto_ErrorSource_ErrorSourceProto_ErrorSource_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits::max() +}; +bool ErrorSourceProto_ErrorSource_IsValid(int value); +constexpr ErrorSourceProto_ErrorSource ErrorSourceProto_ErrorSource_ErrorSource_MIN = ErrorSourceProto_ErrorSource_UNKNOWN; +constexpr ErrorSourceProto_ErrorSource ErrorSourceProto_ErrorSource_ErrorSource_MAX = ErrorSourceProto_ErrorSource_EAGER_REMOTE_MGR; +constexpr int ErrorSourceProto_ErrorSource_ErrorSource_ARRAYSIZE = ErrorSourceProto_ErrorSource_ErrorSource_MAX + 1; + +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* ErrorSourceProto_ErrorSource_descriptor(); +template +inline const std::string& ErrorSourceProto_ErrorSource_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function ErrorSourceProto_ErrorSource_Name."); + return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( + ErrorSourceProto_ErrorSource_descriptor(), enum_t_value); +} +inline bool ErrorSourceProto_ErrorSource_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, ErrorSourceProto_ErrorSource* value) { + return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( + ErrorSourceProto_ErrorSource_descriptor(), name, value); +} +// =================================================================== + +class ErrorSourceProto final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.core.platform.ErrorSourceProto) */ { + public: + inline ErrorSourceProto() : ErrorSourceProto(nullptr) {} + ~ErrorSourceProto() override; + explicit PROTOBUF_CONSTEXPR ErrorSourceProto(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + ErrorSourceProto(const ErrorSourceProto& from); + ErrorSourceProto(ErrorSourceProto&& from) noexcept + : ErrorSourceProto() { + *this = ::std::move(from); + } + + inline ErrorSourceProto& operator=(const ErrorSourceProto& from) { + CopyFrom(from); + return *this; + } + inline ErrorSourceProto& operator=(ErrorSourceProto&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const ErrorSourceProto& default_instance() { + return *internal_default_instance(); + } + static inline const ErrorSourceProto* internal_default_instance() { + return reinterpret_cast( + &_ErrorSourceProto_default_instance_); + } + static constexpr int kIndexInFileMessages = + 0; + + friend void swap(ErrorSourceProto& a, ErrorSourceProto& b) { + a.Swap(&b); + } + inline void Swap(ErrorSourceProto* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(ErrorSourceProto* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + ErrorSourceProto* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const ErrorSourceProto& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const ErrorSourceProto& from) { + ErrorSourceProto::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(ErrorSourceProto* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.core.platform.ErrorSourceProto"; + } + protected: + explicit ErrorSourceProto(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + typedef ErrorSourceProto_ErrorSource ErrorSource; + static constexpr ErrorSource UNKNOWN = + ErrorSourceProto_ErrorSource_UNKNOWN; + static constexpr ErrorSource TPU_COMPILE_OP = + ErrorSourceProto_ErrorSource_TPU_COMPILE_OP; + static constexpr ErrorSource TF_XLA_BRIDGE = + ErrorSourceProto_ErrorSource_TF_XLA_BRIDGE; + static constexpr ErrorSource MLIR_BRIDGE_PHASE_1 = + ErrorSourceProto_ErrorSource_MLIR_BRIDGE_PHASE_1; + static constexpr ErrorSource MLIR_BRIDGE_PHASE_2 = + ErrorSourceProto_ErrorSource_MLIR_BRIDGE_PHASE_2; + static constexpr ErrorSource EAGER_REMOTE_MGR = + ErrorSourceProto_ErrorSource_EAGER_REMOTE_MGR; + static inline bool ErrorSource_IsValid(int value) { + return ErrorSourceProto_ErrorSource_IsValid(value); + } + static constexpr ErrorSource ErrorSource_MIN = + ErrorSourceProto_ErrorSource_ErrorSource_MIN; + static constexpr ErrorSource ErrorSource_MAX = + ErrorSourceProto_ErrorSource_ErrorSource_MAX; + static constexpr int ErrorSource_ARRAYSIZE = + ErrorSourceProto_ErrorSource_ErrorSource_ARRAYSIZE; + static inline const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* + ErrorSource_descriptor() { + return ErrorSourceProto_ErrorSource_descriptor(); + } + template + static inline const std::string& ErrorSource_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function ErrorSource_Name."); + return ErrorSourceProto_ErrorSource_Name(enum_t_value); + } + static inline bool ErrorSource_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name, + ErrorSource* value) { + return ErrorSourceProto_ErrorSource_Parse(name, value); + } + + // accessors ------------------------------------------------------- + + enum : int { + kErrorSourceFieldNumber = 1, + }; + // .tensorflow.core.platform.ErrorSourceProto.ErrorSource error_source = 1; + void clear_error_source(); + ::tensorflow::core::platform::ErrorSourceProto_ErrorSource error_source() const; + void set_error_source(::tensorflow::core::platform::ErrorSourceProto_ErrorSource value); + private: + ::tensorflow::core::platform::ErrorSourceProto_ErrorSource _internal_error_source() const; + void _internal_set_error_source(::tensorflow::core::platform::ErrorSourceProto_ErrorSource value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.core.platform.ErrorSourceProto) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + int error_source_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fcore_5fplatform_5fpayloads_2eproto; +}; +// =================================================================== + + +// =================================================================== + +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// ErrorSourceProto + +// .tensorflow.core.platform.ErrorSourceProto.ErrorSource error_source = 1; +inline void ErrorSourceProto::clear_error_source() { + _impl_.error_source_ = 0; +} +inline ::tensorflow::core::platform::ErrorSourceProto_ErrorSource ErrorSourceProto::_internal_error_source() const { + return static_cast< ::tensorflow::core::platform::ErrorSourceProto_ErrorSource >(_impl_.error_source_); +} +inline ::tensorflow::core::platform::ErrorSourceProto_ErrorSource ErrorSourceProto::error_source() const { + // @@protoc_insertion_point(field_get:tensorflow.core.platform.ErrorSourceProto.error_source) + return _internal_error_source(); +} +inline void ErrorSourceProto::_internal_set_error_source(::tensorflow::core::platform::ErrorSourceProto_ErrorSource value) { + + _impl_.error_source_ = value; +} +inline void ErrorSourceProto::set_error_source(::tensorflow::core::platform::ErrorSourceProto_ErrorSource value) { + _internal_set_error_source(value); + // @@protoc_insertion_point(field_set:tensorflow.core.platform.ErrorSourceProto.error_source) +} + +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ + +// @@protoc_insertion_point(namespace_scope) + +} // namespace platform +} // namespace core +} // namespace tensorflow + +PROTOBUF_NAMESPACE_OPEN + +template <> struct is_proto_enum< ::tensorflow::core::platform::ErrorSourceProto_ErrorSource> : ::std::true_type {}; +template <> +inline const EnumDescriptor* GetEnumDescriptor< ::tensorflow::core::platform::ErrorSourceProto_ErrorSource>() { + return ::tensorflow::core::platform::ErrorSourceProto_ErrorSource_descriptor(); +} + +PROTOBUF_NAMESPACE_CLOSE + +// @@protoc_insertion_point(global_scope) + +#include +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprotobuf_2fcore_5fplatform_5fpayloads_2eproto diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/core_platform_payloads.proto b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/core_platform_payloads.proto new file mode 100644 index 0000000000000000000000000000000000000000..c155e758292fe4205a367d269ec6015fcf7aa600 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/core_platform_payloads.proto @@ -0,0 +1,25 @@ +syntax = "proto3"; + +package tensorflow.core.platform; + +option cc_enable_arenas = true; +option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/protobuf/for_core_protos_go_proto"; + +// If included as a payload, this message contains the error source information +// where the error was raised. +// URI: "type.googleapis.com/tensorflow.core.platform.ErrorSourceProto" +message ErrorSourceProto { + enum ErrorSource { + UNKNOWN = 0; + TPU_COMPILE_OP = 1; + // Old bridge. + TF_XLA_BRIDGE = 2; + // TPUBridge. + MLIR_BRIDGE_PHASE_1 = 3; + // LegalizeToHlo. + MLIR_BRIDGE_PHASE_2 = 4; + // eager::RemoteMgr. + EAGER_REMOTE_MGR = 5; + } + ErrorSource error_source = 1; +} diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/data_service.pb.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/data_service.pb.h new file mode 100644 index 0000000000000000000000000000000000000000..90dbc22410a6126278d38ad321bfb41c0e0bf8e6 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/data_service.pb.h @@ -0,0 +1,1147 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/data_service.proto + +#ifndef GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprotobuf_2fdata_5fservice_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprotobuf_2fdata_5fservice_2eproto + +#include +#include + +#include +#if PROTOBUF_VERSION < 3021000 +#error This file was generated by a newer version of protoc which is +#error incompatible with your Protocol Buffer headers. Please update +#error your headers. +#endif +#if 3021009 < PROTOBUF_MIN_PROTOC_VERSION +#error This file was generated by an older version of protoc which is +#error incompatible with your Protocol Buffer headers. Please +#error regenerate this file with a newer version of protoc. +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include // IWYU pragma: export +#include // IWYU pragma: export +#include +#include +// @@protoc_insertion_point(includes) +#include +#define PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2fprotobuf_2fdata_5fservice_2eproto +PROTOBUF_NAMESPACE_OPEN +namespace internal { +class AnyMetadata; +} // namespace internal +PROTOBUF_NAMESPACE_CLOSE + +// Internal implementation detail -- do not use these members. +struct TableStruct_tensorflow_2fcore_2fprotobuf_2fdata_5fservice_2eproto { + static const uint32_t offsets[]; +}; +extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_tensorflow_2fcore_2fprotobuf_2fdata_5fservice_2eproto; +namespace tensorflow { +namespace data { +class CrossTrainerCacheOptions; +struct CrossTrainerCacheOptionsDefaultTypeInternal; +extern CrossTrainerCacheOptionsDefaultTypeInternal _CrossTrainerCacheOptions_default_instance_; +class DataServiceConfig; +struct DataServiceConfigDefaultTypeInternal; +extern DataServiceConfigDefaultTypeInternal _DataServiceConfig_default_instance_; +class DataServiceMetadata; +struct DataServiceMetadataDefaultTypeInternal; +extern DataServiceMetadataDefaultTypeInternal _DataServiceMetadata_default_instance_; +class ProcessingModeDef; +struct ProcessingModeDefDefaultTypeInternal; +extern ProcessingModeDefDefaultTypeInternal _ProcessingModeDef_default_instance_; +} // namespace data +} // namespace tensorflow +PROTOBUF_NAMESPACE_OPEN +template<> ::tensorflow::data::CrossTrainerCacheOptions* Arena::CreateMaybeMessage<::tensorflow::data::CrossTrainerCacheOptions>(Arena*); +template<> ::tensorflow::data::DataServiceConfig* Arena::CreateMaybeMessage<::tensorflow::data::DataServiceConfig>(Arena*); +template<> ::tensorflow::data::DataServiceMetadata* Arena::CreateMaybeMessage<::tensorflow::data::DataServiceMetadata>(Arena*); +template<> ::tensorflow::data::ProcessingModeDef* Arena::CreateMaybeMessage<::tensorflow::data::ProcessingModeDef>(Arena*); +PROTOBUF_NAMESPACE_CLOSE +namespace tensorflow { +namespace data { + +enum ProcessingModeDef_ShardingPolicy : int { + ProcessingModeDef_ShardingPolicy_OFF = 0, + ProcessingModeDef_ShardingPolicy_DYNAMIC = 1, + ProcessingModeDef_ShardingPolicy_FILE = 2, + ProcessingModeDef_ShardingPolicy_DATA = 3, + ProcessingModeDef_ShardingPolicy_FILE_OR_DATA = 4, + ProcessingModeDef_ShardingPolicy_HINT = 5, + ProcessingModeDef_ShardingPolicy_ProcessingModeDef_ShardingPolicy_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits::min(), + ProcessingModeDef_ShardingPolicy_ProcessingModeDef_ShardingPolicy_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits::max() +}; +bool ProcessingModeDef_ShardingPolicy_IsValid(int value); +constexpr ProcessingModeDef_ShardingPolicy ProcessingModeDef_ShardingPolicy_ShardingPolicy_MIN = ProcessingModeDef_ShardingPolicy_OFF; +constexpr ProcessingModeDef_ShardingPolicy ProcessingModeDef_ShardingPolicy_ShardingPolicy_MAX = ProcessingModeDef_ShardingPolicy_HINT; +constexpr int ProcessingModeDef_ShardingPolicy_ShardingPolicy_ARRAYSIZE = ProcessingModeDef_ShardingPolicy_ShardingPolicy_MAX + 1; + +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* ProcessingModeDef_ShardingPolicy_descriptor(); +template +inline const std::string& ProcessingModeDef_ShardingPolicy_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function ProcessingModeDef_ShardingPolicy_Name."); + return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( + ProcessingModeDef_ShardingPolicy_descriptor(), enum_t_value); +} +inline bool ProcessingModeDef_ShardingPolicy_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, ProcessingModeDef_ShardingPolicy* value) { + return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( + ProcessingModeDef_ShardingPolicy_descriptor(), name, value); +} +enum DataServiceMetadata_Compression : int { + DataServiceMetadata_Compression_COMPRESSION_UNSPECIFIED = 0, + DataServiceMetadata_Compression_COMPRESSION_OFF = 1, + DataServiceMetadata_Compression_COMPRESSION_SNAPPY = 2, + DataServiceMetadata_Compression_DataServiceMetadata_Compression_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits::min(), + DataServiceMetadata_Compression_DataServiceMetadata_Compression_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits::max() +}; +bool DataServiceMetadata_Compression_IsValid(int value); +constexpr DataServiceMetadata_Compression DataServiceMetadata_Compression_Compression_MIN = DataServiceMetadata_Compression_COMPRESSION_UNSPECIFIED; +constexpr DataServiceMetadata_Compression DataServiceMetadata_Compression_Compression_MAX = DataServiceMetadata_Compression_COMPRESSION_SNAPPY; +constexpr int DataServiceMetadata_Compression_Compression_ARRAYSIZE = DataServiceMetadata_Compression_Compression_MAX + 1; + +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* DataServiceMetadata_Compression_descriptor(); +template +inline const std::string& DataServiceMetadata_Compression_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function DataServiceMetadata_Compression_Name."); + return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( + DataServiceMetadata_Compression_descriptor(), enum_t_value); +} +inline bool DataServiceMetadata_Compression_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, DataServiceMetadata_Compression* value) { + return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( + DataServiceMetadata_Compression_descriptor(), name, value); +} +enum DeploymentMode : int { + DEPLOYMENT_MODE_UNSPECIFIED = 0, + DEPLOYMENT_MODE_COLOCATED = 1, + DEPLOYMENT_MODE_REMOTE = 2, + DEPLOYMENT_MODE_HYBRID = 3, + DeploymentMode_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits::min(), + DeploymentMode_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits::max() +}; +bool DeploymentMode_IsValid(int value); +constexpr DeploymentMode DeploymentMode_MIN = DEPLOYMENT_MODE_UNSPECIFIED; +constexpr DeploymentMode DeploymentMode_MAX = DEPLOYMENT_MODE_HYBRID; +constexpr int DeploymentMode_ARRAYSIZE = DeploymentMode_MAX + 1; + +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* DeploymentMode_descriptor(); +template +inline const std::string& DeploymentMode_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function DeploymentMode_Name."); + return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( + DeploymentMode_descriptor(), enum_t_value); +} +inline bool DeploymentMode_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, DeploymentMode* value) { + return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( + DeploymentMode_descriptor(), name, value); +} +// =================================================================== + +class ProcessingModeDef final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.data.ProcessingModeDef) */ { + public: + inline ProcessingModeDef() : ProcessingModeDef(nullptr) {} + ~ProcessingModeDef() override; + explicit PROTOBUF_CONSTEXPR ProcessingModeDef(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + ProcessingModeDef(const ProcessingModeDef& from); + ProcessingModeDef(ProcessingModeDef&& from) noexcept + : ProcessingModeDef() { + *this = ::std::move(from); + } + + inline ProcessingModeDef& operator=(const ProcessingModeDef& from) { + CopyFrom(from); + return *this; + } + inline ProcessingModeDef& operator=(ProcessingModeDef&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const ProcessingModeDef& default_instance() { + return *internal_default_instance(); + } + static inline const ProcessingModeDef* internal_default_instance() { + return reinterpret_cast( + &_ProcessingModeDef_default_instance_); + } + static constexpr int kIndexInFileMessages = + 0; + + friend void swap(ProcessingModeDef& a, ProcessingModeDef& b) { + a.Swap(&b); + } + inline void Swap(ProcessingModeDef* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(ProcessingModeDef* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + ProcessingModeDef* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const ProcessingModeDef& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const ProcessingModeDef& from) { + ProcessingModeDef::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(ProcessingModeDef* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.data.ProcessingModeDef"; + } + protected: + explicit ProcessingModeDef(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + typedef ProcessingModeDef_ShardingPolicy ShardingPolicy; + static constexpr ShardingPolicy OFF = + ProcessingModeDef_ShardingPolicy_OFF; + static constexpr ShardingPolicy DYNAMIC = + ProcessingModeDef_ShardingPolicy_DYNAMIC; + static constexpr ShardingPolicy FILE = + ProcessingModeDef_ShardingPolicy_FILE; + static constexpr ShardingPolicy DATA = + ProcessingModeDef_ShardingPolicy_DATA; + static constexpr ShardingPolicy FILE_OR_DATA = + ProcessingModeDef_ShardingPolicy_FILE_OR_DATA; + static constexpr ShardingPolicy HINT = + ProcessingModeDef_ShardingPolicy_HINT; + static inline bool ShardingPolicy_IsValid(int value) { + return ProcessingModeDef_ShardingPolicy_IsValid(value); + } + static constexpr ShardingPolicy ShardingPolicy_MIN = + ProcessingModeDef_ShardingPolicy_ShardingPolicy_MIN; + static constexpr ShardingPolicy ShardingPolicy_MAX = + ProcessingModeDef_ShardingPolicy_ShardingPolicy_MAX; + static constexpr int ShardingPolicy_ARRAYSIZE = + ProcessingModeDef_ShardingPolicy_ShardingPolicy_ARRAYSIZE; + static inline const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* + ShardingPolicy_descriptor() { + return ProcessingModeDef_ShardingPolicy_descriptor(); + } + template + static inline const std::string& ShardingPolicy_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function ShardingPolicy_Name."); + return ProcessingModeDef_ShardingPolicy_Name(enum_t_value); + } + static inline bool ShardingPolicy_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name, + ShardingPolicy* value) { + return ProcessingModeDef_ShardingPolicy_Parse(name, value); + } + + // accessors ------------------------------------------------------- + + enum : int { + kShardingPolicyFieldNumber = 1, + }; + // .tensorflow.data.ProcessingModeDef.ShardingPolicy sharding_policy = 1; + void clear_sharding_policy(); + ::tensorflow::data::ProcessingModeDef_ShardingPolicy sharding_policy() const; + void set_sharding_policy(::tensorflow::data::ProcessingModeDef_ShardingPolicy value); + private: + ::tensorflow::data::ProcessingModeDef_ShardingPolicy _internal_sharding_policy() const; + void _internal_set_sharding_policy(::tensorflow::data::ProcessingModeDef_ShardingPolicy value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.data.ProcessingModeDef) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + int sharding_policy_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fdata_5fservice_2eproto; +}; +// ------------------------------------------------------------------- + +class DataServiceMetadata final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.data.DataServiceMetadata) */ { + public: + inline DataServiceMetadata() : DataServiceMetadata(nullptr) {} + ~DataServiceMetadata() override; + explicit PROTOBUF_CONSTEXPR DataServiceMetadata(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + DataServiceMetadata(const DataServiceMetadata& from); + DataServiceMetadata(DataServiceMetadata&& from) noexcept + : DataServiceMetadata() { + *this = ::std::move(from); + } + + inline DataServiceMetadata& operator=(const DataServiceMetadata& from) { + CopyFrom(from); + return *this; + } + inline DataServiceMetadata& operator=(DataServiceMetadata&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const DataServiceMetadata& default_instance() { + return *internal_default_instance(); + } + enum OptionalElementSpecCase { + kElementSpec = 1, + OPTIONAL_ELEMENT_SPEC_NOT_SET = 0, + }; + + static inline const DataServiceMetadata* internal_default_instance() { + return reinterpret_cast( + &_DataServiceMetadata_default_instance_); + } + static constexpr int kIndexInFileMessages = + 1; + + friend void swap(DataServiceMetadata& a, DataServiceMetadata& b) { + a.Swap(&b); + } + inline void Swap(DataServiceMetadata* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(DataServiceMetadata* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + DataServiceMetadata* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const DataServiceMetadata& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const DataServiceMetadata& from) { + DataServiceMetadata::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(DataServiceMetadata* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.data.DataServiceMetadata"; + } + protected: + explicit DataServiceMetadata(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + typedef DataServiceMetadata_Compression Compression; + static constexpr Compression COMPRESSION_UNSPECIFIED = + DataServiceMetadata_Compression_COMPRESSION_UNSPECIFIED; + static constexpr Compression COMPRESSION_OFF = + DataServiceMetadata_Compression_COMPRESSION_OFF; + static constexpr Compression COMPRESSION_SNAPPY = + DataServiceMetadata_Compression_COMPRESSION_SNAPPY; + static inline bool Compression_IsValid(int value) { + return DataServiceMetadata_Compression_IsValid(value); + } + static constexpr Compression Compression_MIN = + DataServiceMetadata_Compression_Compression_MIN; + static constexpr Compression Compression_MAX = + DataServiceMetadata_Compression_Compression_MAX; + static constexpr int Compression_ARRAYSIZE = + DataServiceMetadata_Compression_Compression_ARRAYSIZE; + static inline const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* + Compression_descriptor() { + return DataServiceMetadata_Compression_descriptor(); + } + template + static inline const std::string& Compression_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function Compression_Name."); + return DataServiceMetadata_Compression_Name(enum_t_value); + } + static inline bool Compression_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name, + Compression* value) { + return DataServiceMetadata_Compression_Parse(name, value); + } + + // accessors ------------------------------------------------------- + + enum : int { + kCardinalityFieldNumber = 3, + kCompressionFieldNumber = 2, + kElementSpecFieldNumber = 1, + }; + // int64 cardinality = 3; + void clear_cardinality(); + int64_t cardinality() const; + void set_cardinality(int64_t value); + private: + int64_t _internal_cardinality() const; + void _internal_set_cardinality(int64_t value); + public: + + // .tensorflow.data.DataServiceMetadata.Compression compression = 2; + void clear_compression(); + ::tensorflow::data::DataServiceMetadata_Compression compression() const; + void set_compression(::tensorflow::data::DataServiceMetadata_Compression value); + private: + ::tensorflow::data::DataServiceMetadata_Compression _internal_compression() const; + void _internal_set_compression(::tensorflow::data::DataServiceMetadata_Compression value); + public: + + // bytes element_spec = 1; + bool has_element_spec() const; + private: + bool _internal_has_element_spec() const; + public: + void clear_element_spec(); + const std::string& element_spec() const; + template + void set_element_spec(ArgT0&& arg0, ArgT... args); + std::string* mutable_element_spec(); + PROTOBUF_NODISCARD std::string* release_element_spec(); + void set_allocated_element_spec(std::string* element_spec); + private: + const std::string& _internal_element_spec() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_element_spec(const std::string& value); + std::string* _internal_mutable_element_spec(); + public: + + void clear_optional_element_spec(); + OptionalElementSpecCase optional_element_spec_case() const; + // @@protoc_insertion_point(class_scope:tensorflow.data.DataServiceMetadata) + private: + class _Internal; + void set_has_element_spec(); + + inline bool has_optional_element_spec() const; + inline void clear_has_optional_element_spec(); + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + int64_t cardinality_; + int compression_; + union OptionalElementSpecUnion { + constexpr OptionalElementSpecUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr element_spec_; + } optional_element_spec_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + uint32_t _oneof_case_[1]; + + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fdata_5fservice_2eproto; +}; +// ------------------------------------------------------------------- + +class CrossTrainerCacheOptions final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.data.CrossTrainerCacheOptions) */ { + public: + inline CrossTrainerCacheOptions() : CrossTrainerCacheOptions(nullptr) {} + ~CrossTrainerCacheOptions() override; + explicit PROTOBUF_CONSTEXPR CrossTrainerCacheOptions(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + CrossTrainerCacheOptions(const CrossTrainerCacheOptions& from); + CrossTrainerCacheOptions(CrossTrainerCacheOptions&& from) noexcept + : CrossTrainerCacheOptions() { + *this = ::std::move(from); + } + + inline CrossTrainerCacheOptions& operator=(const CrossTrainerCacheOptions& from) { + CopyFrom(from); + return *this; + } + inline CrossTrainerCacheOptions& operator=(CrossTrainerCacheOptions&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const CrossTrainerCacheOptions& default_instance() { + return *internal_default_instance(); + } + static inline const CrossTrainerCacheOptions* internal_default_instance() { + return reinterpret_cast( + &_CrossTrainerCacheOptions_default_instance_); + } + static constexpr int kIndexInFileMessages = + 2; + + friend void swap(CrossTrainerCacheOptions& a, CrossTrainerCacheOptions& b) { + a.Swap(&b); + } + inline void Swap(CrossTrainerCacheOptions* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(CrossTrainerCacheOptions* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + CrossTrainerCacheOptions* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const CrossTrainerCacheOptions& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const CrossTrainerCacheOptions& from) { + CrossTrainerCacheOptions::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(CrossTrainerCacheOptions* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.data.CrossTrainerCacheOptions"; + } + protected: + explicit CrossTrainerCacheOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kTrainerIdFieldNumber = 1, + }; + // string trainer_id = 1; + void clear_trainer_id(); + const std::string& trainer_id() const; + template + void set_trainer_id(ArgT0&& arg0, ArgT... args); + std::string* mutable_trainer_id(); + PROTOBUF_NODISCARD std::string* release_trainer_id(); + void set_allocated_trainer_id(std::string* trainer_id); + private: + const std::string& _internal_trainer_id() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_trainer_id(const std::string& value); + std::string* _internal_mutable_trainer_id(); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.data.CrossTrainerCacheOptions) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr trainer_id_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fdata_5fservice_2eproto; +}; +// ------------------------------------------------------------------- + +class DataServiceConfig final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.data.DataServiceConfig) */ { + public: + inline DataServiceConfig() : DataServiceConfig(nullptr) {} + ~DataServiceConfig() override; + explicit PROTOBUF_CONSTEXPR DataServiceConfig(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + DataServiceConfig(const DataServiceConfig& from); + DataServiceConfig(DataServiceConfig&& from) noexcept + : DataServiceConfig() { + *this = ::std::move(from); + } + + inline DataServiceConfig& operator=(const DataServiceConfig& from) { + CopyFrom(from); + return *this; + } + inline DataServiceConfig& operator=(DataServiceConfig&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const DataServiceConfig& default_instance() { + return *internal_default_instance(); + } + static inline const DataServiceConfig* internal_default_instance() { + return reinterpret_cast( + &_DataServiceConfig_default_instance_); + } + static constexpr int kIndexInFileMessages = + 3; + + friend void swap(DataServiceConfig& a, DataServiceConfig& b) { + a.Swap(&b); + } + inline void Swap(DataServiceConfig* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(DataServiceConfig* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + DataServiceConfig* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const DataServiceConfig& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const DataServiceConfig& from) { + DataServiceConfig::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(DataServiceConfig* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.data.DataServiceConfig"; + } + protected: + explicit DataServiceConfig(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kDeploymentModeFieldNumber = 1, + }; + // .tensorflow.data.DeploymentMode deployment_mode = 1; + void clear_deployment_mode(); + ::tensorflow::data::DeploymentMode deployment_mode() const; + void set_deployment_mode(::tensorflow::data::DeploymentMode value); + private: + ::tensorflow::data::DeploymentMode _internal_deployment_mode() const; + void _internal_set_deployment_mode(::tensorflow::data::DeploymentMode value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.data.DataServiceConfig) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + int deployment_mode_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fdata_5fservice_2eproto; +}; +// =================================================================== + + +// =================================================================== + +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// ProcessingModeDef + +// .tensorflow.data.ProcessingModeDef.ShardingPolicy sharding_policy = 1; +inline void ProcessingModeDef::clear_sharding_policy() { + _impl_.sharding_policy_ = 0; +} +inline ::tensorflow::data::ProcessingModeDef_ShardingPolicy ProcessingModeDef::_internal_sharding_policy() const { + return static_cast< ::tensorflow::data::ProcessingModeDef_ShardingPolicy >(_impl_.sharding_policy_); +} +inline ::tensorflow::data::ProcessingModeDef_ShardingPolicy ProcessingModeDef::sharding_policy() const { + // @@protoc_insertion_point(field_get:tensorflow.data.ProcessingModeDef.sharding_policy) + return _internal_sharding_policy(); +} +inline void ProcessingModeDef::_internal_set_sharding_policy(::tensorflow::data::ProcessingModeDef_ShardingPolicy value) { + + _impl_.sharding_policy_ = value; +} +inline void ProcessingModeDef::set_sharding_policy(::tensorflow::data::ProcessingModeDef_ShardingPolicy value) { + _internal_set_sharding_policy(value); + // @@protoc_insertion_point(field_set:tensorflow.data.ProcessingModeDef.sharding_policy) +} + +// ------------------------------------------------------------------- + +// DataServiceMetadata + +// bytes element_spec = 1; +inline bool DataServiceMetadata::_internal_has_element_spec() const { + return optional_element_spec_case() == kElementSpec; +} +inline bool DataServiceMetadata::has_element_spec() const { + return _internal_has_element_spec(); +} +inline void DataServiceMetadata::set_has_element_spec() { + _impl_._oneof_case_[0] = kElementSpec; +} +inline void DataServiceMetadata::clear_element_spec() { + if (_internal_has_element_spec()) { + _impl_.optional_element_spec_.element_spec_.Destroy(); + clear_has_optional_element_spec(); + } +} +inline const std::string& DataServiceMetadata::element_spec() const { + // @@protoc_insertion_point(field_get:tensorflow.data.DataServiceMetadata.element_spec) + return _internal_element_spec(); +} +template +inline void DataServiceMetadata::set_element_spec(ArgT0&& arg0, ArgT... args) { + if (!_internal_has_element_spec()) { + clear_optional_element_spec(); + set_has_element_spec(); + _impl_.optional_element_spec_.element_spec_.InitDefault(); + } + _impl_.optional_element_spec_.element_spec_.SetBytes( static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.data.DataServiceMetadata.element_spec) +} +inline std::string* DataServiceMetadata::mutable_element_spec() { + std::string* _s = _internal_mutable_element_spec(); + // @@protoc_insertion_point(field_mutable:tensorflow.data.DataServiceMetadata.element_spec) + return _s; +} +inline const std::string& DataServiceMetadata::_internal_element_spec() const { + if (_internal_has_element_spec()) { + return _impl_.optional_element_spec_.element_spec_.Get(); + } + return ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(); +} +inline void DataServiceMetadata::_internal_set_element_spec(const std::string& value) { + if (!_internal_has_element_spec()) { + clear_optional_element_spec(); + set_has_element_spec(); + _impl_.optional_element_spec_.element_spec_.InitDefault(); + } + _impl_.optional_element_spec_.element_spec_.Set(value, GetArenaForAllocation()); +} +inline std::string* DataServiceMetadata::_internal_mutable_element_spec() { + if (!_internal_has_element_spec()) { + clear_optional_element_spec(); + set_has_element_spec(); + _impl_.optional_element_spec_.element_spec_.InitDefault(); + } + return _impl_.optional_element_spec_.element_spec_.Mutable( GetArenaForAllocation()); +} +inline std::string* DataServiceMetadata::release_element_spec() { + // @@protoc_insertion_point(field_release:tensorflow.data.DataServiceMetadata.element_spec) + if (_internal_has_element_spec()) { + clear_has_optional_element_spec(); + return _impl_.optional_element_spec_.element_spec_.Release(); + } else { + return nullptr; + } +} +inline void DataServiceMetadata::set_allocated_element_spec(std::string* element_spec) { + if (has_optional_element_spec()) { + clear_optional_element_spec(); + } + if (element_spec != nullptr) { + set_has_element_spec(); + _impl_.optional_element_spec_.element_spec_.InitAllocated(element_spec, GetArenaForAllocation()); + } + // @@protoc_insertion_point(field_set_allocated:tensorflow.data.DataServiceMetadata.element_spec) +} + +// .tensorflow.data.DataServiceMetadata.Compression compression = 2; +inline void DataServiceMetadata::clear_compression() { + _impl_.compression_ = 0; +} +inline ::tensorflow::data::DataServiceMetadata_Compression DataServiceMetadata::_internal_compression() const { + return static_cast< ::tensorflow::data::DataServiceMetadata_Compression >(_impl_.compression_); +} +inline ::tensorflow::data::DataServiceMetadata_Compression DataServiceMetadata::compression() const { + // @@protoc_insertion_point(field_get:tensorflow.data.DataServiceMetadata.compression) + return _internal_compression(); +} +inline void DataServiceMetadata::_internal_set_compression(::tensorflow::data::DataServiceMetadata_Compression value) { + + _impl_.compression_ = value; +} +inline void DataServiceMetadata::set_compression(::tensorflow::data::DataServiceMetadata_Compression value) { + _internal_set_compression(value); + // @@protoc_insertion_point(field_set:tensorflow.data.DataServiceMetadata.compression) +} + +// int64 cardinality = 3; +inline void DataServiceMetadata::clear_cardinality() { + _impl_.cardinality_ = int64_t{0}; +} +inline int64_t DataServiceMetadata::_internal_cardinality() const { + return _impl_.cardinality_; +} +inline int64_t DataServiceMetadata::cardinality() const { + // @@protoc_insertion_point(field_get:tensorflow.data.DataServiceMetadata.cardinality) + return _internal_cardinality(); +} +inline void DataServiceMetadata::_internal_set_cardinality(int64_t value) { + + _impl_.cardinality_ = value; +} +inline void DataServiceMetadata::set_cardinality(int64_t value) { + _internal_set_cardinality(value); + // @@protoc_insertion_point(field_set:tensorflow.data.DataServiceMetadata.cardinality) +} + +inline bool DataServiceMetadata::has_optional_element_spec() const { + return optional_element_spec_case() != OPTIONAL_ELEMENT_SPEC_NOT_SET; +} +inline void DataServiceMetadata::clear_has_optional_element_spec() { + _impl_._oneof_case_[0] = OPTIONAL_ELEMENT_SPEC_NOT_SET; +} +inline DataServiceMetadata::OptionalElementSpecCase DataServiceMetadata::optional_element_spec_case() const { + return DataServiceMetadata::OptionalElementSpecCase(_impl_._oneof_case_[0]); +} +// ------------------------------------------------------------------- + +// CrossTrainerCacheOptions + +// string trainer_id = 1; +inline void CrossTrainerCacheOptions::clear_trainer_id() { + _impl_.trainer_id_.ClearToEmpty(); +} +inline const std::string& CrossTrainerCacheOptions::trainer_id() const { + // @@protoc_insertion_point(field_get:tensorflow.data.CrossTrainerCacheOptions.trainer_id) + return _internal_trainer_id(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void CrossTrainerCacheOptions::set_trainer_id(ArgT0&& arg0, ArgT... args) { + + _impl_.trainer_id_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.data.CrossTrainerCacheOptions.trainer_id) +} +inline std::string* CrossTrainerCacheOptions::mutable_trainer_id() { + std::string* _s = _internal_mutable_trainer_id(); + // @@protoc_insertion_point(field_mutable:tensorflow.data.CrossTrainerCacheOptions.trainer_id) + return _s; +} +inline const std::string& CrossTrainerCacheOptions::_internal_trainer_id() const { + return _impl_.trainer_id_.Get(); +} +inline void CrossTrainerCacheOptions::_internal_set_trainer_id(const std::string& value) { + + _impl_.trainer_id_.Set(value, GetArenaForAllocation()); +} +inline std::string* CrossTrainerCacheOptions::_internal_mutable_trainer_id() { + + return _impl_.trainer_id_.Mutable(GetArenaForAllocation()); +} +inline std::string* CrossTrainerCacheOptions::release_trainer_id() { + // @@protoc_insertion_point(field_release:tensorflow.data.CrossTrainerCacheOptions.trainer_id) + return _impl_.trainer_id_.Release(); +} +inline void CrossTrainerCacheOptions::set_allocated_trainer_id(std::string* trainer_id) { + if (trainer_id != nullptr) { + + } else { + + } + _impl_.trainer_id_.SetAllocated(trainer_id, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.trainer_id_.IsDefault()) { + _impl_.trainer_id_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.data.CrossTrainerCacheOptions.trainer_id) +} + +// ------------------------------------------------------------------- + +// DataServiceConfig + +// .tensorflow.data.DeploymentMode deployment_mode = 1; +inline void DataServiceConfig::clear_deployment_mode() { + _impl_.deployment_mode_ = 0; +} +inline ::tensorflow::data::DeploymentMode DataServiceConfig::_internal_deployment_mode() const { + return static_cast< ::tensorflow::data::DeploymentMode >(_impl_.deployment_mode_); +} +inline ::tensorflow::data::DeploymentMode DataServiceConfig::deployment_mode() const { + // @@protoc_insertion_point(field_get:tensorflow.data.DataServiceConfig.deployment_mode) + return _internal_deployment_mode(); +} +inline void DataServiceConfig::_internal_set_deployment_mode(::tensorflow::data::DeploymentMode value) { + + _impl_.deployment_mode_ = value; +} +inline void DataServiceConfig::set_deployment_mode(::tensorflow::data::DeploymentMode value) { + _internal_set_deployment_mode(value); + // @@protoc_insertion_point(field_set:tensorflow.data.DataServiceConfig.deployment_mode) +} + +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + + +// @@protoc_insertion_point(namespace_scope) + +} // namespace data +} // namespace tensorflow + +PROTOBUF_NAMESPACE_OPEN + +template <> struct is_proto_enum< ::tensorflow::data::ProcessingModeDef_ShardingPolicy> : ::std::true_type {}; +template <> +inline const EnumDescriptor* GetEnumDescriptor< ::tensorflow::data::ProcessingModeDef_ShardingPolicy>() { + return ::tensorflow::data::ProcessingModeDef_ShardingPolicy_descriptor(); +} +template <> struct is_proto_enum< ::tensorflow::data::DataServiceMetadata_Compression> : ::std::true_type {}; +template <> +inline const EnumDescriptor* GetEnumDescriptor< ::tensorflow::data::DataServiceMetadata_Compression>() { + return ::tensorflow::data::DataServiceMetadata_Compression_descriptor(); +} +template <> struct is_proto_enum< ::tensorflow::data::DeploymentMode> : ::std::true_type {}; +template <> +inline const EnumDescriptor* GetEnumDescriptor< ::tensorflow::data::DeploymentMode>() { + return ::tensorflow::data::DeploymentMode_descriptor(); +} + +PROTOBUF_NAMESPACE_CLOSE + +// @@protoc_insertion_point(global_scope) + +#include +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprotobuf_2fdata_5fservice_2eproto diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/data_service.proto b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/data_service.proto new file mode 100644 index 0000000000000000000000000000000000000000..baf389a9c664646168bce593a0bad1e427d00ad8 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/data_service.proto @@ -0,0 +1,92 @@ +syntax = "proto3"; + +package tensorflow.data; + +option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/protobuf/for_core_protos_go_proto"; + +// Next tag: 2 +message ProcessingModeDef { + // Specifies how data is sharded among tf.data service workers. + enum ShardingPolicy { + // No sharding will be performed. Each worker produces the entire dataset + // without any sharding. With this mode, the best practice is to shuffle the + // dataset nondeterministically so that workers process the dataset in + // different orders. + OFF = 0; + + // The input dataset is dynamically split among workers at runtime. Each + // worker gets the next split when it reads data from the dispatcher. There + // is no fixed sharding with this mode. + DYNAMIC = 1; + + // The following are static sharding policies. The semantics are similar to + // `tf.data.experimental.AutoShardPolicy`. These policies require: + // * The tf.data service cluster has a fixed size, and you need to specify + // the workers in DispatcherConfig. + // * Each client only reads from the local tf.data service worker. + // + // Shards by input files (each worker will get a set of files to process). + // When this option is selected, make sure that there is at least as many + // files as workers. If there are fewer input files than workers, a runtime + // error will be raised. + FILE = 2; + + // Shards by elements produced by the dataset. Each worker will process the + // whole dataset and discard the portion that is not for itself. Note that + // for this mode to correctly partitions the dataset elements, the dataset + // needs to produce elements in a deterministic order. + DATA = 3; + + // Attempts FILE-based sharding, falling back to DATA-based sharding on + // failures. + FILE_OR_DATA = 4; + + // Looks for the presence of `shard(SHARD_HINT, ...)` which is treated as a + // placeholder to replace with `shard(num_workers, worker_index)`. + HINT = 5; + } + ShardingPolicy sharding_policy = 1; +} + +// tf.data service deployment mode. +enum DeploymentMode { + DEPLOYMENT_MODE_UNSPECIFIED = 0; + // tf.data service workers colocate with TF workers. + DEPLOYMENT_MODE_COLOCATED = 1; + // tf.data service workers run in dedicated tf.data hosts. + DEPLOYMENT_MODE_REMOTE = 2; + // tf.data service workers run in colocated TF hosts and dedicated tf.data + // hosts. + DEPLOYMENT_MODE_HYBRID = 3; +} + +// Metadata related to tf.data service datasets. +// Next tag: 4 +message DataServiceMetadata { + oneof optional_element_spec { + // Serialized element spec. + bytes element_spec = 1; + } + + enum Compression { + COMPRESSION_UNSPECIFIED = 0; + // No compression. + COMPRESSION_OFF = 1; + // Snappy compression as defined in tensorflow/core/platform/snappy.h. + COMPRESSION_SNAPPY = 2; + } + Compression compression = 2; + + // Cardinality of the dataset. + int64 cardinality = 3; +} + +message CrossTrainerCacheOptions { + string trainer_id = 1; +} + +// Data service config available to the client through GetDataServiceConfig RPC. +// Next tag: 2 +message DataServiceConfig { + DeploymentMode deployment_mode = 1; +} diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/debug.pb.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/debug.pb.h new file mode 100644 index 0000000000000000000000000000000000000000..eadac079713d2db53a5da3d6967e34904fb67ac4 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/debug.pb.h @@ -0,0 +1,1464 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/debug.proto + +#ifndef GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprotobuf_2fdebug_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprotobuf_2fdebug_2eproto + +#include +#include + +#include +#if PROTOBUF_VERSION < 3021000 +#error This file was generated by a newer version of protoc which is +#error incompatible with your Protocol Buffer headers. Please update +#error your headers. +#endif +#if 3021009 < PROTOBUF_MIN_PROTOC_VERSION +#error This file was generated by an older version of protoc which is +#error incompatible with your Protocol Buffer headers. Please +#error regenerate this file with a newer version of protoc. +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include // IWYU pragma: export +#include // IWYU pragma: export +#include +// @@protoc_insertion_point(includes) +#include +#define PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2fprotobuf_2fdebug_2eproto +PROTOBUF_NAMESPACE_OPEN +namespace internal { +class AnyMetadata; +} // namespace internal +PROTOBUF_NAMESPACE_CLOSE + +// Internal implementation detail -- do not use these members. +struct TableStruct_tensorflow_2fcore_2fprotobuf_2fdebug_2eproto { + static const uint32_t offsets[]; +}; +extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_tensorflow_2fcore_2fprotobuf_2fdebug_2eproto; +namespace tensorflow { +class DebugOptions; +struct DebugOptionsDefaultTypeInternal; +extern DebugOptionsDefaultTypeInternal _DebugOptions_default_instance_; +class DebugTensorWatch; +struct DebugTensorWatchDefaultTypeInternal; +extern DebugTensorWatchDefaultTypeInternal _DebugTensorWatch_default_instance_; +class DebuggedSourceFile; +struct DebuggedSourceFileDefaultTypeInternal; +extern DebuggedSourceFileDefaultTypeInternal _DebuggedSourceFile_default_instance_; +class DebuggedSourceFiles; +struct DebuggedSourceFilesDefaultTypeInternal; +extern DebuggedSourceFilesDefaultTypeInternal _DebuggedSourceFiles_default_instance_; +} // namespace tensorflow +PROTOBUF_NAMESPACE_OPEN +template<> ::tensorflow::DebugOptions* Arena::CreateMaybeMessage<::tensorflow::DebugOptions>(Arena*); +template<> ::tensorflow::DebugTensorWatch* Arena::CreateMaybeMessage<::tensorflow::DebugTensorWatch>(Arena*); +template<> ::tensorflow::DebuggedSourceFile* Arena::CreateMaybeMessage<::tensorflow::DebuggedSourceFile>(Arena*); +template<> ::tensorflow::DebuggedSourceFiles* Arena::CreateMaybeMessage<::tensorflow::DebuggedSourceFiles>(Arena*); +PROTOBUF_NAMESPACE_CLOSE +namespace tensorflow { + +// =================================================================== + +class DebugTensorWatch final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.DebugTensorWatch) */ { + public: + inline DebugTensorWatch() : DebugTensorWatch(nullptr) {} + ~DebugTensorWatch() override; + explicit PROTOBUF_CONSTEXPR DebugTensorWatch(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + DebugTensorWatch(const DebugTensorWatch& from); + DebugTensorWatch(DebugTensorWatch&& from) noexcept + : DebugTensorWatch() { + *this = ::std::move(from); + } + + inline DebugTensorWatch& operator=(const DebugTensorWatch& from) { + CopyFrom(from); + return *this; + } + inline DebugTensorWatch& operator=(DebugTensorWatch&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const DebugTensorWatch& default_instance() { + return *internal_default_instance(); + } + static inline const DebugTensorWatch* internal_default_instance() { + return reinterpret_cast( + &_DebugTensorWatch_default_instance_); + } + static constexpr int kIndexInFileMessages = + 0; + + friend void swap(DebugTensorWatch& a, DebugTensorWatch& b) { + a.Swap(&b); + } + inline void Swap(DebugTensorWatch* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(DebugTensorWatch* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + DebugTensorWatch* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const DebugTensorWatch& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const DebugTensorWatch& from) { + DebugTensorWatch::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(DebugTensorWatch* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.DebugTensorWatch"; + } + protected: + explicit DebugTensorWatch(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kDebugOpsFieldNumber = 3, + kDebugUrlsFieldNumber = 4, + kNodeNameFieldNumber = 1, + kOutputSlotFieldNumber = 2, + kTolerateDebugOpCreationFailuresFieldNumber = 5, + }; + // repeated string debug_ops = 3; + int debug_ops_size() const; + private: + int _internal_debug_ops_size() const; + public: + void clear_debug_ops(); + const std::string& debug_ops(int index) const; + std::string* mutable_debug_ops(int index); + void set_debug_ops(int index, const std::string& value); + void set_debug_ops(int index, std::string&& value); + void set_debug_ops(int index, const char* value); + void set_debug_ops(int index, const char* value, size_t size); + std::string* add_debug_ops(); + void add_debug_ops(const std::string& value); + void add_debug_ops(std::string&& value); + void add_debug_ops(const char* value); + void add_debug_ops(const char* value, size_t size); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& debug_ops() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* mutable_debug_ops(); + private: + const std::string& _internal_debug_ops(int index) const; + std::string* _internal_add_debug_ops(); + public: + + // repeated string debug_urls = 4; + int debug_urls_size() const; + private: + int _internal_debug_urls_size() const; + public: + void clear_debug_urls(); + const std::string& debug_urls(int index) const; + std::string* mutable_debug_urls(int index); + void set_debug_urls(int index, const std::string& value); + void set_debug_urls(int index, std::string&& value); + void set_debug_urls(int index, const char* value); + void set_debug_urls(int index, const char* value, size_t size); + std::string* add_debug_urls(); + void add_debug_urls(const std::string& value); + void add_debug_urls(std::string&& value); + void add_debug_urls(const char* value); + void add_debug_urls(const char* value, size_t size); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& debug_urls() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* mutable_debug_urls(); + private: + const std::string& _internal_debug_urls(int index) const; + std::string* _internal_add_debug_urls(); + public: + + // string node_name = 1; + void clear_node_name(); + const std::string& node_name() const; + template + void set_node_name(ArgT0&& arg0, ArgT... args); + std::string* mutable_node_name(); + PROTOBUF_NODISCARD std::string* release_node_name(); + void set_allocated_node_name(std::string* node_name); + private: + const std::string& _internal_node_name() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_node_name(const std::string& value); + std::string* _internal_mutable_node_name(); + public: + + // int32 output_slot = 2; + void clear_output_slot(); + int32_t output_slot() const; + void set_output_slot(int32_t value); + private: + int32_t _internal_output_slot() const; + void _internal_set_output_slot(int32_t value); + public: + + // bool tolerate_debug_op_creation_failures = 5; + void clear_tolerate_debug_op_creation_failures(); + bool tolerate_debug_op_creation_failures() const; + void set_tolerate_debug_op_creation_failures(bool value); + private: + bool _internal_tolerate_debug_op_creation_failures() const; + void _internal_set_tolerate_debug_op_creation_failures(bool value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.DebugTensorWatch) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField debug_ops_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField debug_urls_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr node_name_; + int32_t output_slot_; + bool tolerate_debug_op_creation_failures_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fdebug_2eproto; +}; +// ------------------------------------------------------------------- + +class DebugOptions final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.DebugOptions) */ { + public: + inline DebugOptions() : DebugOptions(nullptr) {} + ~DebugOptions() override; + explicit PROTOBUF_CONSTEXPR DebugOptions(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + DebugOptions(const DebugOptions& from); + DebugOptions(DebugOptions&& from) noexcept + : DebugOptions() { + *this = ::std::move(from); + } + + inline DebugOptions& operator=(const DebugOptions& from) { + CopyFrom(from); + return *this; + } + inline DebugOptions& operator=(DebugOptions&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const DebugOptions& default_instance() { + return *internal_default_instance(); + } + static inline const DebugOptions* internal_default_instance() { + return reinterpret_cast( + &_DebugOptions_default_instance_); + } + static constexpr int kIndexInFileMessages = + 1; + + friend void swap(DebugOptions& a, DebugOptions& b) { + a.Swap(&b); + } + inline void Swap(DebugOptions* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(DebugOptions* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + DebugOptions* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const DebugOptions& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const DebugOptions& from) { + DebugOptions::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(DebugOptions* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.DebugOptions"; + } + protected: + explicit DebugOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kDebugTensorWatchOptsFieldNumber = 4, + kGlobalStepFieldNumber = 10, + kResetDiskByteUsageFieldNumber = 11, + }; + // repeated .tensorflow.DebugTensorWatch debug_tensor_watch_opts = 4; + int debug_tensor_watch_opts_size() const; + private: + int _internal_debug_tensor_watch_opts_size() const; + public: + void clear_debug_tensor_watch_opts(); + ::tensorflow::DebugTensorWatch* mutable_debug_tensor_watch_opts(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::DebugTensorWatch >* + mutable_debug_tensor_watch_opts(); + private: + const ::tensorflow::DebugTensorWatch& _internal_debug_tensor_watch_opts(int index) const; + ::tensorflow::DebugTensorWatch* _internal_add_debug_tensor_watch_opts(); + public: + const ::tensorflow::DebugTensorWatch& debug_tensor_watch_opts(int index) const; + ::tensorflow::DebugTensorWatch* add_debug_tensor_watch_opts(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::DebugTensorWatch >& + debug_tensor_watch_opts() const; + + // int64 global_step = 10; + void clear_global_step(); + int64_t global_step() const; + void set_global_step(int64_t value); + private: + int64_t _internal_global_step() const; + void _internal_set_global_step(int64_t value); + public: + + // bool reset_disk_byte_usage = 11; + void clear_reset_disk_byte_usage(); + bool reset_disk_byte_usage() const; + void set_reset_disk_byte_usage(bool value); + private: + bool _internal_reset_disk_byte_usage() const; + void _internal_set_reset_disk_byte_usage(bool value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.DebugOptions) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::DebugTensorWatch > debug_tensor_watch_opts_; + int64_t global_step_; + bool reset_disk_byte_usage_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fdebug_2eproto; +}; +// ------------------------------------------------------------------- + +class DebuggedSourceFile final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.DebuggedSourceFile) */ { + public: + inline DebuggedSourceFile() : DebuggedSourceFile(nullptr) {} + ~DebuggedSourceFile() override; + explicit PROTOBUF_CONSTEXPR DebuggedSourceFile(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + DebuggedSourceFile(const DebuggedSourceFile& from); + DebuggedSourceFile(DebuggedSourceFile&& from) noexcept + : DebuggedSourceFile() { + *this = ::std::move(from); + } + + inline DebuggedSourceFile& operator=(const DebuggedSourceFile& from) { + CopyFrom(from); + return *this; + } + inline DebuggedSourceFile& operator=(DebuggedSourceFile&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const DebuggedSourceFile& default_instance() { + return *internal_default_instance(); + } + static inline const DebuggedSourceFile* internal_default_instance() { + return reinterpret_cast( + &_DebuggedSourceFile_default_instance_); + } + static constexpr int kIndexInFileMessages = + 2; + + friend void swap(DebuggedSourceFile& a, DebuggedSourceFile& b) { + a.Swap(&b); + } + inline void Swap(DebuggedSourceFile* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(DebuggedSourceFile* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + DebuggedSourceFile* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const DebuggedSourceFile& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const DebuggedSourceFile& from) { + DebuggedSourceFile::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(DebuggedSourceFile* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.DebuggedSourceFile"; + } + protected: + explicit DebuggedSourceFile(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kLinesFieldNumber = 5, + kHostFieldNumber = 1, + kFilePathFieldNumber = 2, + kLastModifiedFieldNumber = 3, + kBytesFieldNumber = 4, + }; + // repeated string lines = 5; + int lines_size() const; + private: + int _internal_lines_size() const; + public: + void clear_lines(); + const std::string& lines(int index) const; + std::string* mutable_lines(int index); + void set_lines(int index, const std::string& value); + void set_lines(int index, std::string&& value); + void set_lines(int index, const char* value); + void set_lines(int index, const char* value, size_t size); + std::string* add_lines(); + void add_lines(const std::string& value); + void add_lines(std::string&& value); + void add_lines(const char* value); + void add_lines(const char* value, size_t size); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& lines() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* mutable_lines(); + private: + const std::string& _internal_lines(int index) const; + std::string* _internal_add_lines(); + public: + + // string host = 1; + void clear_host(); + const std::string& host() const; + template + void set_host(ArgT0&& arg0, ArgT... args); + std::string* mutable_host(); + PROTOBUF_NODISCARD std::string* release_host(); + void set_allocated_host(std::string* host); + private: + const std::string& _internal_host() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_host(const std::string& value); + std::string* _internal_mutable_host(); + public: + + // string file_path = 2; + void clear_file_path(); + const std::string& file_path() const; + template + void set_file_path(ArgT0&& arg0, ArgT... args); + std::string* mutable_file_path(); + PROTOBUF_NODISCARD std::string* release_file_path(); + void set_allocated_file_path(std::string* file_path); + private: + const std::string& _internal_file_path() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_file_path(const std::string& value); + std::string* _internal_mutable_file_path(); + public: + + // int64 last_modified = 3; + void clear_last_modified(); + int64_t last_modified() const; + void set_last_modified(int64_t value); + private: + int64_t _internal_last_modified() const; + void _internal_set_last_modified(int64_t value); + public: + + // int64 bytes = 4; + void clear_bytes(); + int64_t bytes() const; + void set_bytes(int64_t value); + private: + int64_t _internal_bytes() const; + void _internal_set_bytes(int64_t value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.DebuggedSourceFile) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField lines_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr host_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr file_path_; + int64_t last_modified_; + int64_t bytes_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fdebug_2eproto; +}; +// ------------------------------------------------------------------- + +class DebuggedSourceFiles final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.DebuggedSourceFiles) */ { + public: + inline DebuggedSourceFiles() : DebuggedSourceFiles(nullptr) {} + ~DebuggedSourceFiles() override; + explicit PROTOBUF_CONSTEXPR DebuggedSourceFiles(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + DebuggedSourceFiles(const DebuggedSourceFiles& from); + DebuggedSourceFiles(DebuggedSourceFiles&& from) noexcept + : DebuggedSourceFiles() { + *this = ::std::move(from); + } + + inline DebuggedSourceFiles& operator=(const DebuggedSourceFiles& from) { + CopyFrom(from); + return *this; + } + inline DebuggedSourceFiles& operator=(DebuggedSourceFiles&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const DebuggedSourceFiles& default_instance() { + return *internal_default_instance(); + } + static inline const DebuggedSourceFiles* internal_default_instance() { + return reinterpret_cast( + &_DebuggedSourceFiles_default_instance_); + } + static constexpr int kIndexInFileMessages = + 3; + + friend void swap(DebuggedSourceFiles& a, DebuggedSourceFiles& b) { + a.Swap(&b); + } + inline void Swap(DebuggedSourceFiles* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(DebuggedSourceFiles* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + DebuggedSourceFiles* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const DebuggedSourceFiles& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const DebuggedSourceFiles& from) { + DebuggedSourceFiles::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(DebuggedSourceFiles* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.DebuggedSourceFiles"; + } + protected: + explicit DebuggedSourceFiles(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kSourceFilesFieldNumber = 1, + }; + // repeated .tensorflow.DebuggedSourceFile source_files = 1; + int source_files_size() const; + private: + int _internal_source_files_size() const; + public: + void clear_source_files(); + ::tensorflow::DebuggedSourceFile* mutable_source_files(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::DebuggedSourceFile >* + mutable_source_files(); + private: + const ::tensorflow::DebuggedSourceFile& _internal_source_files(int index) const; + ::tensorflow::DebuggedSourceFile* _internal_add_source_files(); + public: + const ::tensorflow::DebuggedSourceFile& source_files(int index) const; + ::tensorflow::DebuggedSourceFile* add_source_files(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::DebuggedSourceFile >& + source_files() const; + + // @@protoc_insertion_point(class_scope:tensorflow.DebuggedSourceFiles) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::DebuggedSourceFile > source_files_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fdebug_2eproto; +}; +// =================================================================== + + +// =================================================================== + +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// DebugTensorWatch + +// string node_name = 1; +inline void DebugTensorWatch::clear_node_name() { + _impl_.node_name_.ClearToEmpty(); +} +inline const std::string& DebugTensorWatch::node_name() const { + // @@protoc_insertion_point(field_get:tensorflow.DebugTensorWatch.node_name) + return _internal_node_name(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void DebugTensorWatch::set_node_name(ArgT0&& arg0, ArgT... args) { + + _impl_.node_name_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.DebugTensorWatch.node_name) +} +inline std::string* DebugTensorWatch::mutable_node_name() { + std::string* _s = _internal_mutable_node_name(); + // @@protoc_insertion_point(field_mutable:tensorflow.DebugTensorWatch.node_name) + return _s; +} +inline const std::string& DebugTensorWatch::_internal_node_name() const { + return _impl_.node_name_.Get(); +} +inline void DebugTensorWatch::_internal_set_node_name(const std::string& value) { + + _impl_.node_name_.Set(value, GetArenaForAllocation()); +} +inline std::string* DebugTensorWatch::_internal_mutable_node_name() { + + return _impl_.node_name_.Mutable(GetArenaForAllocation()); +} +inline std::string* DebugTensorWatch::release_node_name() { + // @@protoc_insertion_point(field_release:tensorflow.DebugTensorWatch.node_name) + return _impl_.node_name_.Release(); +} +inline void DebugTensorWatch::set_allocated_node_name(std::string* node_name) { + if (node_name != nullptr) { + + } else { + + } + _impl_.node_name_.SetAllocated(node_name, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.node_name_.IsDefault()) { + _impl_.node_name_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.DebugTensorWatch.node_name) +} + +// int32 output_slot = 2; +inline void DebugTensorWatch::clear_output_slot() { + _impl_.output_slot_ = 0; +} +inline int32_t DebugTensorWatch::_internal_output_slot() const { + return _impl_.output_slot_; +} +inline int32_t DebugTensorWatch::output_slot() const { + // @@protoc_insertion_point(field_get:tensorflow.DebugTensorWatch.output_slot) + return _internal_output_slot(); +} +inline void DebugTensorWatch::_internal_set_output_slot(int32_t value) { + + _impl_.output_slot_ = value; +} +inline void DebugTensorWatch::set_output_slot(int32_t value) { + _internal_set_output_slot(value); + // @@protoc_insertion_point(field_set:tensorflow.DebugTensorWatch.output_slot) +} + +// repeated string debug_ops = 3; +inline int DebugTensorWatch::_internal_debug_ops_size() const { + return _impl_.debug_ops_.size(); +} +inline int DebugTensorWatch::debug_ops_size() const { + return _internal_debug_ops_size(); +} +inline void DebugTensorWatch::clear_debug_ops() { + _impl_.debug_ops_.Clear(); +} +inline std::string* DebugTensorWatch::add_debug_ops() { + std::string* _s = _internal_add_debug_ops(); + // @@protoc_insertion_point(field_add_mutable:tensorflow.DebugTensorWatch.debug_ops) + return _s; +} +inline const std::string& DebugTensorWatch::_internal_debug_ops(int index) const { + return _impl_.debug_ops_.Get(index); +} +inline const std::string& DebugTensorWatch::debug_ops(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.DebugTensorWatch.debug_ops) + return _internal_debug_ops(index); +} +inline std::string* DebugTensorWatch::mutable_debug_ops(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.DebugTensorWatch.debug_ops) + return _impl_.debug_ops_.Mutable(index); +} +inline void DebugTensorWatch::set_debug_ops(int index, const std::string& value) { + _impl_.debug_ops_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set:tensorflow.DebugTensorWatch.debug_ops) +} +inline void DebugTensorWatch::set_debug_ops(int index, std::string&& value) { + _impl_.debug_ops_.Mutable(index)->assign(std::move(value)); + // @@protoc_insertion_point(field_set:tensorflow.DebugTensorWatch.debug_ops) +} +inline void DebugTensorWatch::set_debug_ops(int index, const char* value) { + GOOGLE_DCHECK(value != nullptr); + _impl_.debug_ops_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set_char:tensorflow.DebugTensorWatch.debug_ops) +} +inline void DebugTensorWatch::set_debug_ops(int index, const char* value, size_t size) { + _impl_.debug_ops_.Mutable(index)->assign( + reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:tensorflow.DebugTensorWatch.debug_ops) +} +inline std::string* DebugTensorWatch::_internal_add_debug_ops() { + return _impl_.debug_ops_.Add(); +} +inline void DebugTensorWatch::add_debug_ops(const std::string& value) { + _impl_.debug_ops_.Add()->assign(value); + // @@protoc_insertion_point(field_add:tensorflow.DebugTensorWatch.debug_ops) +} +inline void DebugTensorWatch::add_debug_ops(std::string&& value) { + _impl_.debug_ops_.Add(std::move(value)); + // @@protoc_insertion_point(field_add:tensorflow.DebugTensorWatch.debug_ops) +} +inline void DebugTensorWatch::add_debug_ops(const char* value) { + GOOGLE_DCHECK(value != nullptr); + _impl_.debug_ops_.Add()->assign(value); + // @@protoc_insertion_point(field_add_char:tensorflow.DebugTensorWatch.debug_ops) +} +inline void DebugTensorWatch::add_debug_ops(const char* value, size_t size) { + _impl_.debug_ops_.Add()->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_add_pointer:tensorflow.DebugTensorWatch.debug_ops) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& +DebugTensorWatch::debug_ops() const { + // @@protoc_insertion_point(field_list:tensorflow.DebugTensorWatch.debug_ops) + return _impl_.debug_ops_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* +DebugTensorWatch::mutable_debug_ops() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.DebugTensorWatch.debug_ops) + return &_impl_.debug_ops_; +} + +// repeated string debug_urls = 4; +inline int DebugTensorWatch::_internal_debug_urls_size() const { + return _impl_.debug_urls_.size(); +} +inline int DebugTensorWatch::debug_urls_size() const { + return _internal_debug_urls_size(); +} +inline void DebugTensorWatch::clear_debug_urls() { + _impl_.debug_urls_.Clear(); +} +inline std::string* DebugTensorWatch::add_debug_urls() { + std::string* _s = _internal_add_debug_urls(); + // @@protoc_insertion_point(field_add_mutable:tensorflow.DebugTensorWatch.debug_urls) + return _s; +} +inline const std::string& DebugTensorWatch::_internal_debug_urls(int index) const { + return _impl_.debug_urls_.Get(index); +} +inline const std::string& DebugTensorWatch::debug_urls(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.DebugTensorWatch.debug_urls) + return _internal_debug_urls(index); +} +inline std::string* DebugTensorWatch::mutable_debug_urls(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.DebugTensorWatch.debug_urls) + return _impl_.debug_urls_.Mutable(index); +} +inline void DebugTensorWatch::set_debug_urls(int index, const std::string& value) { + _impl_.debug_urls_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set:tensorflow.DebugTensorWatch.debug_urls) +} +inline void DebugTensorWatch::set_debug_urls(int index, std::string&& value) { + _impl_.debug_urls_.Mutable(index)->assign(std::move(value)); + // @@protoc_insertion_point(field_set:tensorflow.DebugTensorWatch.debug_urls) +} +inline void DebugTensorWatch::set_debug_urls(int index, const char* value) { + GOOGLE_DCHECK(value != nullptr); + _impl_.debug_urls_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set_char:tensorflow.DebugTensorWatch.debug_urls) +} +inline void DebugTensorWatch::set_debug_urls(int index, const char* value, size_t size) { + _impl_.debug_urls_.Mutable(index)->assign( + reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:tensorflow.DebugTensorWatch.debug_urls) +} +inline std::string* DebugTensorWatch::_internal_add_debug_urls() { + return _impl_.debug_urls_.Add(); +} +inline void DebugTensorWatch::add_debug_urls(const std::string& value) { + _impl_.debug_urls_.Add()->assign(value); + // @@protoc_insertion_point(field_add:tensorflow.DebugTensorWatch.debug_urls) +} +inline void DebugTensorWatch::add_debug_urls(std::string&& value) { + _impl_.debug_urls_.Add(std::move(value)); + // @@protoc_insertion_point(field_add:tensorflow.DebugTensorWatch.debug_urls) +} +inline void DebugTensorWatch::add_debug_urls(const char* value) { + GOOGLE_DCHECK(value != nullptr); + _impl_.debug_urls_.Add()->assign(value); + // @@protoc_insertion_point(field_add_char:tensorflow.DebugTensorWatch.debug_urls) +} +inline void DebugTensorWatch::add_debug_urls(const char* value, size_t size) { + _impl_.debug_urls_.Add()->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_add_pointer:tensorflow.DebugTensorWatch.debug_urls) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& +DebugTensorWatch::debug_urls() const { + // @@protoc_insertion_point(field_list:tensorflow.DebugTensorWatch.debug_urls) + return _impl_.debug_urls_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* +DebugTensorWatch::mutable_debug_urls() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.DebugTensorWatch.debug_urls) + return &_impl_.debug_urls_; +} + +// bool tolerate_debug_op_creation_failures = 5; +inline void DebugTensorWatch::clear_tolerate_debug_op_creation_failures() { + _impl_.tolerate_debug_op_creation_failures_ = false; +} +inline bool DebugTensorWatch::_internal_tolerate_debug_op_creation_failures() const { + return _impl_.tolerate_debug_op_creation_failures_; +} +inline bool DebugTensorWatch::tolerate_debug_op_creation_failures() const { + // @@protoc_insertion_point(field_get:tensorflow.DebugTensorWatch.tolerate_debug_op_creation_failures) + return _internal_tolerate_debug_op_creation_failures(); +} +inline void DebugTensorWatch::_internal_set_tolerate_debug_op_creation_failures(bool value) { + + _impl_.tolerate_debug_op_creation_failures_ = value; +} +inline void DebugTensorWatch::set_tolerate_debug_op_creation_failures(bool value) { + _internal_set_tolerate_debug_op_creation_failures(value); + // @@protoc_insertion_point(field_set:tensorflow.DebugTensorWatch.tolerate_debug_op_creation_failures) +} + +// ------------------------------------------------------------------- + +// DebugOptions + +// repeated .tensorflow.DebugTensorWatch debug_tensor_watch_opts = 4; +inline int DebugOptions::_internal_debug_tensor_watch_opts_size() const { + return _impl_.debug_tensor_watch_opts_.size(); +} +inline int DebugOptions::debug_tensor_watch_opts_size() const { + return _internal_debug_tensor_watch_opts_size(); +} +inline void DebugOptions::clear_debug_tensor_watch_opts() { + _impl_.debug_tensor_watch_opts_.Clear(); +} +inline ::tensorflow::DebugTensorWatch* DebugOptions::mutable_debug_tensor_watch_opts(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.DebugOptions.debug_tensor_watch_opts) + return _impl_.debug_tensor_watch_opts_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::DebugTensorWatch >* +DebugOptions::mutable_debug_tensor_watch_opts() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.DebugOptions.debug_tensor_watch_opts) + return &_impl_.debug_tensor_watch_opts_; +} +inline const ::tensorflow::DebugTensorWatch& DebugOptions::_internal_debug_tensor_watch_opts(int index) const { + return _impl_.debug_tensor_watch_opts_.Get(index); +} +inline const ::tensorflow::DebugTensorWatch& DebugOptions::debug_tensor_watch_opts(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.DebugOptions.debug_tensor_watch_opts) + return _internal_debug_tensor_watch_opts(index); +} +inline ::tensorflow::DebugTensorWatch* DebugOptions::_internal_add_debug_tensor_watch_opts() { + return _impl_.debug_tensor_watch_opts_.Add(); +} +inline ::tensorflow::DebugTensorWatch* DebugOptions::add_debug_tensor_watch_opts() { + ::tensorflow::DebugTensorWatch* _add = _internal_add_debug_tensor_watch_opts(); + // @@protoc_insertion_point(field_add:tensorflow.DebugOptions.debug_tensor_watch_opts) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::DebugTensorWatch >& +DebugOptions::debug_tensor_watch_opts() const { + // @@protoc_insertion_point(field_list:tensorflow.DebugOptions.debug_tensor_watch_opts) + return _impl_.debug_tensor_watch_opts_; +} + +// int64 global_step = 10; +inline void DebugOptions::clear_global_step() { + _impl_.global_step_ = int64_t{0}; +} +inline int64_t DebugOptions::_internal_global_step() const { + return _impl_.global_step_; +} +inline int64_t DebugOptions::global_step() const { + // @@protoc_insertion_point(field_get:tensorflow.DebugOptions.global_step) + return _internal_global_step(); +} +inline void DebugOptions::_internal_set_global_step(int64_t value) { + + _impl_.global_step_ = value; +} +inline void DebugOptions::set_global_step(int64_t value) { + _internal_set_global_step(value); + // @@protoc_insertion_point(field_set:tensorflow.DebugOptions.global_step) +} + +// bool reset_disk_byte_usage = 11; +inline void DebugOptions::clear_reset_disk_byte_usage() { + _impl_.reset_disk_byte_usage_ = false; +} +inline bool DebugOptions::_internal_reset_disk_byte_usage() const { + return _impl_.reset_disk_byte_usage_; +} +inline bool DebugOptions::reset_disk_byte_usage() const { + // @@protoc_insertion_point(field_get:tensorflow.DebugOptions.reset_disk_byte_usage) + return _internal_reset_disk_byte_usage(); +} +inline void DebugOptions::_internal_set_reset_disk_byte_usage(bool value) { + + _impl_.reset_disk_byte_usage_ = value; +} +inline void DebugOptions::set_reset_disk_byte_usage(bool value) { + _internal_set_reset_disk_byte_usage(value); + // @@protoc_insertion_point(field_set:tensorflow.DebugOptions.reset_disk_byte_usage) +} + +// ------------------------------------------------------------------- + +// DebuggedSourceFile + +// string host = 1; +inline void DebuggedSourceFile::clear_host() { + _impl_.host_.ClearToEmpty(); +} +inline const std::string& DebuggedSourceFile::host() const { + // @@protoc_insertion_point(field_get:tensorflow.DebuggedSourceFile.host) + return _internal_host(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void DebuggedSourceFile::set_host(ArgT0&& arg0, ArgT... args) { + + _impl_.host_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.DebuggedSourceFile.host) +} +inline std::string* DebuggedSourceFile::mutable_host() { + std::string* _s = _internal_mutable_host(); + // @@protoc_insertion_point(field_mutable:tensorflow.DebuggedSourceFile.host) + return _s; +} +inline const std::string& DebuggedSourceFile::_internal_host() const { + return _impl_.host_.Get(); +} +inline void DebuggedSourceFile::_internal_set_host(const std::string& value) { + + _impl_.host_.Set(value, GetArenaForAllocation()); +} +inline std::string* DebuggedSourceFile::_internal_mutable_host() { + + return _impl_.host_.Mutable(GetArenaForAllocation()); +} +inline std::string* DebuggedSourceFile::release_host() { + // @@protoc_insertion_point(field_release:tensorflow.DebuggedSourceFile.host) + return _impl_.host_.Release(); +} +inline void DebuggedSourceFile::set_allocated_host(std::string* host) { + if (host != nullptr) { + + } else { + + } + _impl_.host_.SetAllocated(host, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.host_.IsDefault()) { + _impl_.host_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.DebuggedSourceFile.host) +} + +// string file_path = 2; +inline void DebuggedSourceFile::clear_file_path() { + _impl_.file_path_.ClearToEmpty(); +} +inline const std::string& DebuggedSourceFile::file_path() const { + // @@protoc_insertion_point(field_get:tensorflow.DebuggedSourceFile.file_path) + return _internal_file_path(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void DebuggedSourceFile::set_file_path(ArgT0&& arg0, ArgT... args) { + + _impl_.file_path_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.DebuggedSourceFile.file_path) +} +inline std::string* DebuggedSourceFile::mutable_file_path() { + std::string* _s = _internal_mutable_file_path(); + // @@protoc_insertion_point(field_mutable:tensorflow.DebuggedSourceFile.file_path) + return _s; +} +inline const std::string& DebuggedSourceFile::_internal_file_path() const { + return _impl_.file_path_.Get(); +} +inline void DebuggedSourceFile::_internal_set_file_path(const std::string& value) { + + _impl_.file_path_.Set(value, GetArenaForAllocation()); +} +inline std::string* DebuggedSourceFile::_internal_mutable_file_path() { + + return _impl_.file_path_.Mutable(GetArenaForAllocation()); +} +inline std::string* DebuggedSourceFile::release_file_path() { + // @@protoc_insertion_point(field_release:tensorflow.DebuggedSourceFile.file_path) + return _impl_.file_path_.Release(); +} +inline void DebuggedSourceFile::set_allocated_file_path(std::string* file_path) { + if (file_path != nullptr) { + + } else { + + } + _impl_.file_path_.SetAllocated(file_path, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.file_path_.IsDefault()) { + _impl_.file_path_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.DebuggedSourceFile.file_path) +} + +// int64 last_modified = 3; +inline void DebuggedSourceFile::clear_last_modified() { + _impl_.last_modified_ = int64_t{0}; +} +inline int64_t DebuggedSourceFile::_internal_last_modified() const { + return _impl_.last_modified_; +} +inline int64_t DebuggedSourceFile::last_modified() const { + // @@protoc_insertion_point(field_get:tensorflow.DebuggedSourceFile.last_modified) + return _internal_last_modified(); +} +inline void DebuggedSourceFile::_internal_set_last_modified(int64_t value) { + + _impl_.last_modified_ = value; +} +inline void DebuggedSourceFile::set_last_modified(int64_t value) { + _internal_set_last_modified(value); + // @@protoc_insertion_point(field_set:tensorflow.DebuggedSourceFile.last_modified) +} + +// int64 bytes = 4; +inline void DebuggedSourceFile::clear_bytes() { + _impl_.bytes_ = int64_t{0}; +} +inline int64_t DebuggedSourceFile::_internal_bytes() const { + return _impl_.bytes_; +} +inline int64_t DebuggedSourceFile::bytes() const { + // @@protoc_insertion_point(field_get:tensorflow.DebuggedSourceFile.bytes) + return _internal_bytes(); +} +inline void DebuggedSourceFile::_internal_set_bytes(int64_t value) { + + _impl_.bytes_ = value; +} +inline void DebuggedSourceFile::set_bytes(int64_t value) { + _internal_set_bytes(value); + // @@protoc_insertion_point(field_set:tensorflow.DebuggedSourceFile.bytes) +} + +// repeated string lines = 5; +inline int DebuggedSourceFile::_internal_lines_size() const { + return _impl_.lines_.size(); +} +inline int DebuggedSourceFile::lines_size() const { + return _internal_lines_size(); +} +inline void DebuggedSourceFile::clear_lines() { + _impl_.lines_.Clear(); +} +inline std::string* DebuggedSourceFile::add_lines() { + std::string* _s = _internal_add_lines(); + // @@protoc_insertion_point(field_add_mutable:tensorflow.DebuggedSourceFile.lines) + return _s; +} +inline const std::string& DebuggedSourceFile::_internal_lines(int index) const { + return _impl_.lines_.Get(index); +} +inline const std::string& DebuggedSourceFile::lines(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.DebuggedSourceFile.lines) + return _internal_lines(index); +} +inline std::string* DebuggedSourceFile::mutable_lines(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.DebuggedSourceFile.lines) + return _impl_.lines_.Mutable(index); +} +inline void DebuggedSourceFile::set_lines(int index, const std::string& value) { + _impl_.lines_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set:tensorflow.DebuggedSourceFile.lines) +} +inline void DebuggedSourceFile::set_lines(int index, std::string&& value) { + _impl_.lines_.Mutable(index)->assign(std::move(value)); + // @@protoc_insertion_point(field_set:tensorflow.DebuggedSourceFile.lines) +} +inline void DebuggedSourceFile::set_lines(int index, const char* value) { + GOOGLE_DCHECK(value != nullptr); + _impl_.lines_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set_char:tensorflow.DebuggedSourceFile.lines) +} +inline void DebuggedSourceFile::set_lines(int index, const char* value, size_t size) { + _impl_.lines_.Mutable(index)->assign( + reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:tensorflow.DebuggedSourceFile.lines) +} +inline std::string* DebuggedSourceFile::_internal_add_lines() { + return _impl_.lines_.Add(); +} +inline void DebuggedSourceFile::add_lines(const std::string& value) { + _impl_.lines_.Add()->assign(value); + // @@protoc_insertion_point(field_add:tensorflow.DebuggedSourceFile.lines) +} +inline void DebuggedSourceFile::add_lines(std::string&& value) { + _impl_.lines_.Add(std::move(value)); + // @@protoc_insertion_point(field_add:tensorflow.DebuggedSourceFile.lines) +} +inline void DebuggedSourceFile::add_lines(const char* value) { + GOOGLE_DCHECK(value != nullptr); + _impl_.lines_.Add()->assign(value); + // @@protoc_insertion_point(field_add_char:tensorflow.DebuggedSourceFile.lines) +} +inline void DebuggedSourceFile::add_lines(const char* value, size_t size) { + _impl_.lines_.Add()->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_add_pointer:tensorflow.DebuggedSourceFile.lines) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& +DebuggedSourceFile::lines() const { + // @@protoc_insertion_point(field_list:tensorflow.DebuggedSourceFile.lines) + return _impl_.lines_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* +DebuggedSourceFile::mutable_lines() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.DebuggedSourceFile.lines) + return &_impl_.lines_; +} + +// ------------------------------------------------------------------- + +// DebuggedSourceFiles + +// repeated .tensorflow.DebuggedSourceFile source_files = 1; +inline int DebuggedSourceFiles::_internal_source_files_size() const { + return _impl_.source_files_.size(); +} +inline int DebuggedSourceFiles::source_files_size() const { + return _internal_source_files_size(); +} +inline void DebuggedSourceFiles::clear_source_files() { + _impl_.source_files_.Clear(); +} +inline ::tensorflow::DebuggedSourceFile* DebuggedSourceFiles::mutable_source_files(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.DebuggedSourceFiles.source_files) + return _impl_.source_files_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::DebuggedSourceFile >* +DebuggedSourceFiles::mutable_source_files() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.DebuggedSourceFiles.source_files) + return &_impl_.source_files_; +} +inline const ::tensorflow::DebuggedSourceFile& DebuggedSourceFiles::_internal_source_files(int index) const { + return _impl_.source_files_.Get(index); +} +inline const ::tensorflow::DebuggedSourceFile& DebuggedSourceFiles::source_files(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.DebuggedSourceFiles.source_files) + return _internal_source_files(index); +} +inline ::tensorflow::DebuggedSourceFile* DebuggedSourceFiles::_internal_add_source_files() { + return _impl_.source_files_.Add(); +} +inline ::tensorflow::DebuggedSourceFile* DebuggedSourceFiles::add_source_files() { + ::tensorflow::DebuggedSourceFile* _add = _internal_add_source_files(); + // @@protoc_insertion_point(field_add:tensorflow.DebuggedSourceFiles.source_files) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::DebuggedSourceFile >& +DebuggedSourceFiles::source_files() const { + // @@protoc_insertion_point(field_list:tensorflow.DebuggedSourceFiles.source_files) + return _impl_.source_files_; +} + +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + + +// @@protoc_insertion_point(namespace_scope) + +} // namespace tensorflow + +// @@protoc_insertion_point(global_scope) + +#include +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprotobuf_2fdebug_2eproto diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/debug.proto b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/debug.proto new file mode 100644 index 0000000000000000000000000000000000000000..2fabd0319fe56fa50c2dc29c5653905078e78473 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/debug.proto @@ -0,0 +1,94 @@ +syntax = "proto3"; + +package tensorflow; + +option cc_enable_arenas = true; +option java_outer_classname = "DebugProtos"; +option java_multiple_files = true; +option java_package = "org.tensorflow.framework"; +option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/protobuf/for_core_protos_go_proto"; + +// Option for watching a node in TensorFlow Debugger (tfdbg). +message DebugTensorWatch { + // Name of the node to watch. + // Use "*" for wildcard. But note: currently, regex is not supported in + // general. + string node_name = 1; + + // Output slot to watch. + // The semantics of output_slot == -1 is that all outputs of the node + // will be watched (i.e., a wildcard). + // Other negative values of output_slot are invalid and will lead to + // errors currently. + int32 output_slot = 2; + + // Name(s) of the debugging op(s). + // One or more than one probes on a tensor. + // e.g., {"DebugIdentity", "DebugNanCount"} + repeated string debug_ops = 3; + + // URL(s) for debug targets(s). + // + // Supported URL formats are: + // - file:///foo/tfdbg_dump: Writes out Event content to file + // /foo/tfdbg_dump. Assumes all directories can be created if they don't + // already exist. + // - grpc://localhost:11011: Sends an RPC request to an EventListener + // service running at localhost:11011 with the event. + // - memcbk:///event_key: Routes tensors to clients using the + // callback registered with the DebugCallbackRegistry for event_key. + // + // Each debug op listed in debug_ops will publish its output tensor (debug + // signal) to all URLs in debug_urls. + // + // N.B. Session::Run() supports concurrent invocations of the same inputs + // (feed keys), outputs and target nodes. If such concurrent invocations + // are to be debugged, the callers of Session::Run() must use distinct + // debug_urls to make sure that the streamed or dumped events do not overlap + // among the invocations. + // TODO(cais): More visible documentation of this in g3docs. + repeated string debug_urls = 4; + + // Do not error out if debug op creation fails (e.g., due to dtype + // incompatibility). Instead, just log the failure. + bool tolerate_debug_op_creation_failures = 5; +} + +// Options for initializing DebuggerState in TensorFlow Debugger (tfdbg). +message DebugOptions { + // Debugging options + repeated DebugTensorWatch debug_tensor_watch_opts = 4; + + // Caller-specified global step count. + // Note that this is distinct from the session run count and the executor + // step count. + int64 global_step = 10; + + // Whether the total disk usage of tfdbg is to be reset to zero + // in this Session.run call. This is used by wrappers and hooks + // such as the local CLI ones to indicate that the dumped tensors + // are cleaned up from the disk after each Session.run. + bool reset_disk_byte_usage = 11; +} + +message DebuggedSourceFile { + // The host name on which a source code file is located. + string host = 1; + + // Path to the source code file. + string file_path = 2; + + // The timestamp at which the source code file is last modified. + int64 last_modified = 3; + + // Byte size of the file. + int64 bytes = 4; + + // Line-by-line content of the source code file. + repeated string lines = 5; +} + +message DebuggedSourceFiles { + // A collection of source code files. + repeated DebuggedSourceFile source_files = 1; +} diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/debug_event.pb.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/debug_event.pb.h new file mode 100644 index 0000000000000000000000000000000000000000..e53de96d9617bf81db8366b673cf2d939d130261 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/debug_event.pb.h @@ -0,0 +1,5420 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/debug_event.proto + +#ifndef GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprotobuf_2fdebug_5fevent_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprotobuf_2fdebug_5fevent_2eproto + +#include +#include + +#include +#if PROTOBUF_VERSION < 3021000 +#error This file was generated by a newer version of protoc which is +#error incompatible with your Protocol Buffer headers. Please update +#error your headers. +#endif +#if 3021009 < PROTOBUF_MIN_PROTOC_VERSION +#error This file was generated by an older version of protoc which is +#error incompatible with your Protocol Buffer headers. Please +#error regenerate this file with a newer version of protoc. +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include // IWYU pragma: export +#include // IWYU pragma: export +#include +#include +#include "tensorflow/core/framework/graph_debug_info.pb.h" +#include "tensorflow/core/framework/tensor.pb.h" +// @@protoc_insertion_point(includes) +#include +#define PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2fprotobuf_2fdebug_5fevent_2eproto +PROTOBUF_NAMESPACE_OPEN +namespace internal { +class AnyMetadata; +} // namespace internal +PROTOBUF_NAMESPACE_CLOSE + +// Internal implementation detail -- do not use these members. +struct TableStruct_tensorflow_2fcore_2fprotobuf_2fdebug_5fevent_2eproto { + static const uint32_t offsets[]; +}; +extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_tensorflow_2fcore_2fprotobuf_2fdebug_5fevent_2eproto; +namespace tensorflow { +class CodeLocation; +struct CodeLocationDefaultTypeInternal; +extern CodeLocationDefaultTypeInternal _CodeLocation_default_instance_; +class DebugEvent; +struct DebugEventDefaultTypeInternal; +extern DebugEventDefaultTypeInternal _DebugEvent_default_instance_; +class DebugMetadata; +struct DebugMetadataDefaultTypeInternal; +extern DebugMetadataDefaultTypeInternal _DebugMetadata_default_instance_; +class DebuggedDevice; +struct DebuggedDeviceDefaultTypeInternal; +extern DebuggedDeviceDefaultTypeInternal _DebuggedDevice_default_instance_; +class DebuggedGraph; +struct DebuggedGraphDefaultTypeInternal; +extern DebuggedGraphDefaultTypeInternal _DebuggedGraph_default_instance_; +class Execution; +struct ExecutionDefaultTypeInternal; +extern ExecutionDefaultTypeInternal _Execution_default_instance_; +class GraphExecutionTrace; +struct GraphExecutionTraceDefaultTypeInternal; +extern GraphExecutionTraceDefaultTypeInternal _GraphExecutionTrace_default_instance_; +class GraphOpCreation; +struct GraphOpCreationDefaultTypeInternal; +extern GraphOpCreationDefaultTypeInternal _GraphOpCreation_default_instance_; +class SourceFile; +struct SourceFileDefaultTypeInternal; +extern SourceFileDefaultTypeInternal _SourceFile_default_instance_; +class StackFrameWithId; +struct StackFrameWithIdDefaultTypeInternal; +extern StackFrameWithIdDefaultTypeInternal _StackFrameWithId_default_instance_; +} // namespace tensorflow +PROTOBUF_NAMESPACE_OPEN +template<> ::tensorflow::CodeLocation* Arena::CreateMaybeMessage<::tensorflow::CodeLocation>(Arena*); +template<> ::tensorflow::DebugEvent* Arena::CreateMaybeMessage<::tensorflow::DebugEvent>(Arena*); +template<> ::tensorflow::DebugMetadata* Arena::CreateMaybeMessage<::tensorflow::DebugMetadata>(Arena*); +template<> ::tensorflow::DebuggedDevice* Arena::CreateMaybeMessage<::tensorflow::DebuggedDevice>(Arena*); +template<> ::tensorflow::DebuggedGraph* Arena::CreateMaybeMessage<::tensorflow::DebuggedGraph>(Arena*); +template<> ::tensorflow::Execution* Arena::CreateMaybeMessage<::tensorflow::Execution>(Arena*); +template<> ::tensorflow::GraphExecutionTrace* Arena::CreateMaybeMessage<::tensorflow::GraphExecutionTrace>(Arena*); +template<> ::tensorflow::GraphOpCreation* Arena::CreateMaybeMessage<::tensorflow::GraphOpCreation>(Arena*); +template<> ::tensorflow::SourceFile* Arena::CreateMaybeMessage<::tensorflow::SourceFile>(Arena*); +template<> ::tensorflow::StackFrameWithId* Arena::CreateMaybeMessage<::tensorflow::StackFrameWithId>(Arena*); +PROTOBUF_NAMESPACE_CLOSE +namespace tensorflow { + +enum TensorDebugMode : int { + UNSPECIFIED = 0, + NO_TENSOR = 1, + CURT_HEALTH = 2, + CONCISE_HEALTH = 3, + FULL_HEALTH = 4, + SHAPE = 5, + FULL_NUMERICS = 6, + FULL_TENSOR = 7, + REDUCE_INF_NAN_THREE_SLOTS = 8, + TensorDebugMode_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits::min(), + TensorDebugMode_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits::max() +}; +bool TensorDebugMode_IsValid(int value); +constexpr TensorDebugMode TensorDebugMode_MIN = UNSPECIFIED; +constexpr TensorDebugMode TensorDebugMode_MAX = REDUCE_INF_NAN_THREE_SLOTS; +constexpr int TensorDebugMode_ARRAYSIZE = TensorDebugMode_MAX + 1; + +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* TensorDebugMode_descriptor(); +template +inline const std::string& TensorDebugMode_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function TensorDebugMode_Name."); + return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( + TensorDebugMode_descriptor(), enum_t_value); +} +inline bool TensorDebugMode_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, TensorDebugMode* value) { + return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( + TensorDebugMode_descriptor(), name, value); +} +// =================================================================== + +class DebugEvent final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.DebugEvent) */ { + public: + inline DebugEvent() : DebugEvent(nullptr) {} + ~DebugEvent() override; + explicit PROTOBUF_CONSTEXPR DebugEvent(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + DebugEvent(const DebugEvent& from); + DebugEvent(DebugEvent&& from) noexcept + : DebugEvent() { + *this = ::std::move(from); + } + + inline DebugEvent& operator=(const DebugEvent& from) { + CopyFrom(from); + return *this; + } + inline DebugEvent& operator=(DebugEvent&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const DebugEvent& default_instance() { + return *internal_default_instance(); + } + enum WhatCase { + kDebugMetadata = 3, + kSourceFile = 4, + kStackFrameWithId = 6, + kGraphOpCreation = 7, + kDebuggedGraph = 8, + kExecution = 9, + kGraphExecutionTrace = 10, + kGraphId = 11, + kDebuggedDevice = 12, + WHAT_NOT_SET = 0, + }; + + static inline const DebugEvent* internal_default_instance() { + return reinterpret_cast( + &_DebugEvent_default_instance_); + } + static constexpr int kIndexInFileMessages = + 0; + + friend void swap(DebugEvent& a, DebugEvent& b) { + a.Swap(&b); + } + inline void Swap(DebugEvent* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(DebugEvent* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + DebugEvent* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const DebugEvent& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const DebugEvent& from) { + DebugEvent::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(DebugEvent* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.DebugEvent"; + } + protected: + explicit DebugEvent(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kWallTimeFieldNumber = 1, + kStepFieldNumber = 2, + kDebugMetadataFieldNumber = 3, + kSourceFileFieldNumber = 4, + kStackFrameWithIdFieldNumber = 6, + kGraphOpCreationFieldNumber = 7, + kDebuggedGraphFieldNumber = 8, + kExecutionFieldNumber = 9, + kGraphExecutionTraceFieldNumber = 10, + kGraphIdFieldNumber = 11, + kDebuggedDeviceFieldNumber = 12, + }; + // double wall_time = 1; + void clear_wall_time(); + double wall_time() const; + void set_wall_time(double value); + private: + double _internal_wall_time() const; + void _internal_set_wall_time(double value); + public: + + // int64 step = 2; + void clear_step(); + int64_t step() const; + void set_step(int64_t value); + private: + int64_t _internal_step() const; + void _internal_set_step(int64_t value); + public: + + // .tensorflow.DebugMetadata debug_metadata = 3; + bool has_debug_metadata() const; + private: + bool _internal_has_debug_metadata() const; + public: + void clear_debug_metadata(); + const ::tensorflow::DebugMetadata& debug_metadata() const; + PROTOBUF_NODISCARD ::tensorflow::DebugMetadata* release_debug_metadata(); + ::tensorflow::DebugMetadata* mutable_debug_metadata(); + void set_allocated_debug_metadata(::tensorflow::DebugMetadata* debug_metadata); + private: + const ::tensorflow::DebugMetadata& _internal_debug_metadata() const; + ::tensorflow::DebugMetadata* _internal_mutable_debug_metadata(); + public: + void unsafe_arena_set_allocated_debug_metadata( + ::tensorflow::DebugMetadata* debug_metadata); + ::tensorflow::DebugMetadata* unsafe_arena_release_debug_metadata(); + + // .tensorflow.SourceFile source_file = 4; + bool has_source_file() const; + private: + bool _internal_has_source_file() const; + public: + void clear_source_file(); + const ::tensorflow::SourceFile& source_file() const; + PROTOBUF_NODISCARD ::tensorflow::SourceFile* release_source_file(); + ::tensorflow::SourceFile* mutable_source_file(); + void set_allocated_source_file(::tensorflow::SourceFile* source_file); + private: + const ::tensorflow::SourceFile& _internal_source_file() const; + ::tensorflow::SourceFile* _internal_mutable_source_file(); + public: + void unsafe_arena_set_allocated_source_file( + ::tensorflow::SourceFile* source_file); + ::tensorflow::SourceFile* unsafe_arena_release_source_file(); + + // .tensorflow.StackFrameWithId stack_frame_with_id = 6; + bool has_stack_frame_with_id() const; + private: + bool _internal_has_stack_frame_with_id() const; + public: + void clear_stack_frame_with_id(); + const ::tensorflow::StackFrameWithId& stack_frame_with_id() const; + PROTOBUF_NODISCARD ::tensorflow::StackFrameWithId* release_stack_frame_with_id(); + ::tensorflow::StackFrameWithId* mutable_stack_frame_with_id(); + void set_allocated_stack_frame_with_id(::tensorflow::StackFrameWithId* stack_frame_with_id); + private: + const ::tensorflow::StackFrameWithId& _internal_stack_frame_with_id() const; + ::tensorflow::StackFrameWithId* _internal_mutable_stack_frame_with_id(); + public: + void unsafe_arena_set_allocated_stack_frame_with_id( + ::tensorflow::StackFrameWithId* stack_frame_with_id); + ::tensorflow::StackFrameWithId* unsafe_arena_release_stack_frame_with_id(); + + // .tensorflow.GraphOpCreation graph_op_creation = 7; + bool has_graph_op_creation() const; + private: + bool _internal_has_graph_op_creation() const; + public: + void clear_graph_op_creation(); + const ::tensorflow::GraphOpCreation& graph_op_creation() const; + PROTOBUF_NODISCARD ::tensorflow::GraphOpCreation* release_graph_op_creation(); + ::tensorflow::GraphOpCreation* mutable_graph_op_creation(); + void set_allocated_graph_op_creation(::tensorflow::GraphOpCreation* graph_op_creation); + private: + const ::tensorflow::GraphOpCreation& _internal_graph_op_creation() const; + ::tensorflow::GraphOpCreation* _internal_mutable_graph_op_creation(); + public: + void unsafe_arena_set_allocated_graph_op_creation( + ::tensorflow::GraphOpCreation* graph_op_creation); + ::tensorflow::GraphOpCreation* unsafe_arena_release_graph_op_creation(); + + // .tensorflow.DebuggedGraph debugged_graph = 8; + bool has_debugged_graph() const; + private: + bool _internal_has_debugged_graph() const; + public: + void clear_debugged_graph(); + const ::tensorflow::DebuggedGraph& debugged_graph() const; + PROTOBUF_NODISCARD ::tensorflow::DebuggedGraph* release_debugged_graph(); + ::tensorflow::DebuggedGraph* mutable_debugged_graph(); + void set_allocated_debugged_graph(::tensorflow::DebuggedGraph* debugged_graph); + private: + const ::tensorflow::DebuggedGraph& _internal_debugged_graph() const; + ::tensorflow::DebuggedGraph* _internal_mutable_debugged_graph(); + public: + void unsafe_arena_set_allocated_debugged_graph( + ::tensorflow::DebuggedGraph* debugged_graph); + ::tensorflow::DebuggedGraph* unsafe_arena_release_debugged_graph(); + + // .tensorflow.Execution execution = 9; + bool has_execution() const; + private: + bool _internal_has_execution() const; + public: + void clear_execution(); + const ::tensorflow::Execution& execution() const; + PROTOBUF_NODISCARD ::tensorflow::Execution* release_execution(); + ::tensorflow::Execution* mutable_execution(); + void set_allocated_execution(::tensorflow::Execution* execution); + private: + const ::tensorflow::Execution& _internal_execution() const; + ::tensorflow::Execution* _internal_mutable_execution(); + public: + void unsafe_arena_set_allocated_execution( + ::tensorflow::Execution* execution); + ::tensorflow::Execution* unsafe_arena_release_execution(); + + // .tensorflow.GraphExecutionTrace graph_execution_trace = 10; + bool has_graph_execution_trace() const; + private: + bool _internal_has_graph_execution_trace() const; + public: + void clear_graph_execution_trace(); + const ::tensorflow::GraphExecutionTrace& graph_execution_trace() const; + PROTOBUF_NODISCARD ::tensorflow::GraphExecutionTrace* release_graph_execution_trace(); + ::tensorflow::GraphExecutionTrace* mutable_graph_execution_trace(); + void set_allocated_graph_execution_trace(::tensorflow::GraphExecutionTrace* graph_execution_trace); + private: + const ::tensorflow::GraphExecutionTrace& _internal_graph_execution_trace() const; + ::tensorflow::GraphExecutionTrace* _internal_mutable_graph_execution_trace(); + public: + void unsafe_arena_set_allocated_graph_execution_trace( + ::tensorflow::GraphExecutionTrace* graph_execution_trace); + ::tensorflow::GraphExecutionTrace* unsafe_arena_release_graph_execution_trace(); + + // string graph_id = 11; + bool has_graph_id() const; + private: + bool _internal_has_graph_id() const; + public: + void clear_graph_id(); + const std::string& graph_id() const; + template + void set_graph_id(ArgT0&& arg0, ArgT... args); + std::string* mutable_graph_id(); + PROTOBUF_NODISCARD std::string* release_graph_id(); + void set_allocated_graph_id(std::string* graph_id); + private: + const std::string& _internal_graph_id() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_graph_id(const std::string& value); + std::string* _internal_mutable_graph_id(); + public: + + // .tensorflow.DebuggedDevice debugged_device = 12; + bool has_debugged_device() const; + private: + bool _internal_has_debugged_device() const; + public: + void clear_debugged_device(); + const ::tensorflow::DebuggedDevice& debugged_device() const; + PROTOBUF_NODISCARD ::tensorflow::DebuggedDevice* release_debugged_device(); + ::tensorflow::DebuggedDevice* mutable_debugged_device(); + void set_allocated_debugged_device(::tensorflow::DebuggedDevice* debugged_device); + private: + const ::tensorflow::DebuggedDevice& _internal_debugged_device() const; + ::tensorflow::DebuggedDevice* _internal_mutable_debugged_device(); + public: + void unsafe_arena_set_allocated_debugged_device( + ::tensorflow::DebuggedDevice* debugged_device); + ::tensorflow::DebuggedDevice* unsafe_arena_release_debugged_device(); + + void clear_what(); + WhatCase what_case() const; + // @@protoc_insertion_point(class_scope:tensorflow.DebugEvent) + private: + class _Internal; + void set_has_debug_metadata(); + void set_has_source_file(); + void set_has_stack_frame_with_id(); + void set_has_graph_op_creation(); + void set_has_debugged_graph(); + void set_has_execution(); + void set_has_graph_execution_trace(); + void set_has_graph_id(); + void set_has_debugged_device(); + + inline bool has_what() const; + inline void clear_has_what(); + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + double wall_time_; + int64_t step_; + union WhatUnion { + constexpr WhatUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + ::tensorflow::DebugMetadata* debug_metadata_; + ::tensorflow::SourceFile* source_file_; + ::tensorflow::StackFrameWithId* stack_frame_with_id_; + ::tensorflow::GraphOpCreation* graph_op_creation_; + ::tensorflow::DebuggedGraph* debugged_graph_; + ::tensorflow::Execution* execution_; + ::tensorflow::GraphExecutionTrace* graph_execution_trace_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr graph_id_; + ::tensorflow::DebuggedDevice* debugged_device_; + } what_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + uint32_t _oneof_case_[1]; + + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fdebug_5fevent_2eproto; +}; +// ------------------------------------------------------------------- + +class DebugMetadata final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.DebugMetadata) */ { + public: + inline DebugMetadata() : DebugMetadata(nullptr) {} + ~DebugMetadata() override; + explicit PROTOBUF_CONSTEXPR DebugMetadata(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + DebugMetadata(const DebugMetadata& from); + DebugMetadata(DebugMetadata&& from) noexcept + : DebugMetadata() { + *this = ::std::move(from); + } + + inline DebugMetadata& operator=(const DebugMetadata& from) { + CopyFrom(from); + return *this; + } + inline DebugMetadata& operator=(DebugMetadata&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const DebugMetadata& default_instance() { + return *internal_default_instance(); + } + static inline const DebugMetadata* internal_default_instance() { + return reinterpret_cast( + &_DebugMetadata_default_instance_); + } + static constexpr int kIndexInFileMessages = + 1; + + friend void swap(DebugMetadata& a, DebugMetadata& b) { + a.Swap(&b); + } + inline void Swap(DebugMetadata* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(DebugMetadata* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + DebugMetadata* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const DebugMetadata& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const DebugMetadata& from) { + DebugMetadata::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(DebugMetadata* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.DebugMetadata"; + } + protected: + explicit DebugMetadata(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kTensorflowVersionFieldNumber = 1, + kFileVersionFieldNumber = 2, + kTfdbgRunIdFieldNumber = 3, + }; + // string tensorflow_version = 1; + void clear_tensorflow_version(); + const std::string& tensorflow_version() const; + template + void set_tensorflow_version(ArgT0&& arg0, ArgT... args); + std::string* mutable_tensorflow_version(); + PROTOBUF_NODISCARD std::string* release_tensorflow_version(); + void set_allocated_tensorflow_version(std::string* tensorflow_version); + private: + const std::string& _internal_tensorflow_version() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_tensorflow_version(const std::string& value); + std::string* _internal_mutable_tensorflow_version(); + public: + + // string file_version = 2; + void clear_file_version(); + const std::string& file_version() const; + template + void set_file_version(ArgT0&& arg0, ArgT... args); + std::string* mutable_file_version(); + PROTOBUF_NODISCARD std::string* release_file_version(); + void set_allocated_file_version(std::string* file_version); + private: + const std::string& _internal_file_version() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_file_version(const std::string& value); + std::string* _internal_mutable_file_version(); + public: + + // string tfdbg_run_id = 3; + void clear_tfdbg_run_id(); + const std::string& tfdbg_run_id() const; + template + void set_tfdbg_run_id(ArgT0&& arg0, ArgT... args); + std::string* mutable_tfdbg_run_id(); + PROTOBUF_NODISCARD std::string* release_tfdbg_run_id(); + void set_allocated_tfdbg_run_id(std::string* tfdbg_run_id); + private: + const std::string& _internal_tfdbg_run_id() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_tfdbg_run_id(const std::string& value); + std::string* _internal_mutable_tfdbg_run_id(); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.DebugMetadata) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr tensorflow_version_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr file_version_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr tfdbg_run_id_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fdebug_5fevent_2eproto; +}; +// ------------------------------------------------------------------- + +class SourceFile final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.SourceFile) */ { + public: + inline SourceFile() : SourceFile(nullptr) {} + ~SourceFile() override; + explicit PROTOBUF_CONSTEXPR SourceFile(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + SourceFile(const SourceFile& from); + SourceFile(SourceFile&& from) noexcept + : SourceFile() { + *this = ::std::move(from); + } + + inline SourceFile& operator=(const SourceFile& from) { + CopyFrom(from); + return *this; + } + inline SourceFile& operator=(SourceFile&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const SourceFile& default_instance() { + return *internal_default_instance(); + } + static inline const SourceFile* internal_default_instance() { + return reinterpret_cast( + &_SourceFile_default_instance_); + } + static constexpr int kIndexInFileMessages = + 2; + + friend void swap(SourceFile& a, SourceFile& b) { + a.Swap(&b); + } + inline void Swap(SourceFile* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(SourceFile* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + SourceFile* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const SourceFile& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const SourceFile& from) { + SourceFile::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(SourceFile* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.SourceFile"; + } + protected: + explicit SourceFile(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kLinesFieldNumber = 3, + kFilePathFieldNumber = 1, + kHostNameFieldNumber = 2, + }; + // repeated string lines = 3; + int lines_size() const; + private: + int _internal_lines_size() const; + public: + void clear_lines(); + const std::string& lines(int index) const; + std::string* mutable_lines(int index); + void set_lines(int index, const std::string& value); + void set_lines(int index, std::string&& value); + void set_lines(int index, const char* value); + void set_lines(int index, const char* value, size_t size); + std::string* add_lines(); + void add_lines(const std::string& value); + void add_lines(std::string&& value); + void add_lines(const char* value); + void add_lines(const char* value, size_t size); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& lines() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* mutable_lines(); + private: + const std::string& _internal_lines(int index) const; + std::string* _internal_add_lines(); + public: + + // string file_path = 1; + void clear_file_path(); + const std::string& file_path() const; + template + void set_file_path(ArgT0&& arg0, ArgT... args); + std::string* mutable_file_path(); + PROTOBUF_NODISCARD std::string* release_file_path(); + void set_allocated_file_path(std::string* file_path); + private: + const std::string& _internal_file_path() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_file_path(const std::string& value); + std::string* _internal_mutable_file_path(); + public: + + // string host_name = 2; + void clear_host_name(); + const std::string& host_name() const; + template + void set_host_name(ArgT0&& arg0, ArgT... args); + std::string* mutable_host_name(); + PROTOBUF_NODISCARD std::string* release_host_name(); + void set_allocated_host_name(std::string* host_name); + private: + const std::string& _internal_host_name() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_host_name(const std::string& value); + std::string* _internal_mutable_host_name(); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.SourceFile) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField lines_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr file_path_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr host_name_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fdebug_5fevent_2eproto; +}; +// ------------------------------------------------------------------- + +class StackFrameWithId final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.StackFrameWithId) */ { + public: + inline StackFrameWithId() : StackFrameWithId(nullptr) {} + ~StackFrameWithId() override; + explicit PROTOBUF_CONSTEXPR StackFrameWithId(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + StackFrameWithId(const StackFrameWithId& from); + StackFrameWithId(StackFrameWithId&& from) noexcept + : StackFrameWithId() { + *this = ::std::move(from); + } + + inline StackFrameWithId& operator=(const StackFrameWithId& from) { + CopyFrom(from); + return *this; + } + inline StackFrameWithId& operator=(StackFrameWithId&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const StackFrameWithId& default_instance() { + return *internal_default_instance(); + } + static inline const StackFrameWithId* internal_default_instance() { + return reinterpret_cast( + &_StackFrameWithId_default_instance_); + } + static constexpr int kIndexInFileMessages = + 3; + + friend void swap(StackFrameWithId& a, StackFrameWithId& b) { + a.Swap(&b); + } + inline void Swap(StackFrameWithId* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(StackFrameWithId* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + StackFrameWithId* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const StackFrameWithId& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const StackFrameWithId& from) { + StackFrameWithId::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(StackFrameWithId* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.StackFrameWithId"; + } + protected: + explicit StackFrameWithId(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kIdFieldNumber = 1, + kFileLineColFieldNumber = 2, + }; + // string id = 1; + void clear_id(); + const std::string& id() const; + template + void set_id(ArgT0&& arg0, ArgT... args); + std::string* mutable_id(); + PROTOBUF_NODISCARD std::string* release_id(); + void set_allocated_id(std::string* id); + private: + const std::string& _internal_id() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_id(const std::string& value); + std::string* _internal_mutable_id(); + public: + + // .tensorflow.GraphDebugInfo.FileLineCol file_line_col = 2; + bool has_file_line_col() const; + private: + bool _internal_has_file_line_col() const; + public: + void clear_file_line_col(); + const ::tensorflow::GraphDebugInfo_FileLineCol& file_line_col() const; + PROTOBUF_NODISCARD ::tensorflow::GraphDebugInfo_FileLineCol* release_file_line_col(); + ::tensorflow::GraphDebugInfo_FileLineCol* mutable_file_line_col(); + void set_allocated_file_line_col(::tensorflow::GraphDebugInfo_FileLineCol* file_line_col); + private: + const ::tensorflow::GraphDebugInfo_FileLineCol& _internal_file_line_col() const; + ::tensorflow::GraphDebugInfo_FileLineCol* _internal_mutable_file_line_col(); + public: + void unsafe_arena_set_allocated_file_line_col( + ::tensorflow::GraphDebugInfo_FileLineCol* file_line_col); + ::tensorflow::GraphDebugInfo_FileLineCol* unsafe_arena_release_file_line_col(); + + // @@protoc_insertion_point(class_scope:tensorflow.StackFrameWithId) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr id_; + ::tensorflow::GraphDebugInfo_FileLineCol* file_line_col_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fdebug_5fevent_2eproto; +}; +// ------------------------------------------------------------------- + +class CodeLocation final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.CodeLocation) */ { + public: + inline CodeLocation() : CodeLocation(nullptr) {} + ~CodeLocation() override; + explicit PROTOBUF_CONSTEXPR CodeLocation(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + CodeLocation(const CodeLocation& from); + CodeLocation(CodeLocation&& from) noexcept + : CodeLocation() { + *this = ::std::move(from); + } + + inline CodeLocation& operator=(const CodeLocation& from) { + CopyFrom(from); + return *this; + } + inline CodeLocation& operator=(CodeLocation&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const CodeLocation& default_instance() { + return *internal_default_instance(); + } + static inline const CodeLocation* internal_default_instance() { + return reinterpret_cast( + &_CodeLocation_default_instance_); + } + static constexpr int kIndexInFileMessages = + 4; + + friend void swap(CodeLocation& a, CodeLocation& b) { + a.Swap(&b); + } + inline void Swap(CodeLocation* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(CodeLocation* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + CodeLocation* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const CodeLocation& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const CodeLocation& from) { + CodeLocation::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(CodeLocation* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.CodeLocation"; + } + protected: + explicit CodeLocation(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kStackFrameIdsFieldNumber = 2, + kHostNameFieldNumber = 1, + }; + // repeated string stack_frame_ids = 2; + int stack_frame_ids_size() const; + private: + int _internal_stack_frame_ids_size() const; + public: + void clear_stack_frame_ids(); + const std::string& stack_frame_ids(int index) const; + std::string* mutable_stack_frame_ids(int index); + void set_stack_frame_ids(int index, const std::string& value); + void set_stack_frame_ids(int index, std::string&& value); + void set_stack_frame_ids(int index, const char* value); + void set_stack_frame_ids(int index, const char* value, size_t size); + std::string* add_stack_frame_ids(); + void add_stack_frame_ids(const std::string& value); + void add_stack_frame_ids(std::string&& value); + void add_stack_frame_ids(const char* value); + void add_stack_frame_ids(const char* value, size_t size); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& stack_frame_ids() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* mutable_stack_frame_ids(); + private: + const std::string& _internal_stack_frame_ids(int index) const; + std::string* _internal_add_stack_frame_ids(); + public: + + // string host_name = 1; + void clear_host_name(); + const std::string& host_name() const; + template + void set_host_name(ArgT0&& arg0, ArgT... args); + std::string* mutable_host_name(); + PROTOBUF_NODISCARD std::string* release_host_name(); + void set_allocated_host_name(std::string* host_name); + private: + const std::string& _internal_host_name() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_host_name(const std::string& value); + std::string* _internal_mutable_host_name(); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.CodeLocation) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField stack_frame_ids_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr host_name_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fdebug_5fevent_2eproto; +}; +// ------------------------------------------------------------------- + +class GraphOpCreation final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.GraphOpCreation) */ { + public: + inline GraphOpCreation() : GraphOpCreation(nullptr) {} + ~GraphOpCreation() override; + explicit PROTOBUF_CONSTEXPR GraphOpCreation(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + GraphOpCreation(const GraphOpCreation& from); + GraphOpCreation(GraphOpCreation&& from) noexcept + : GraphOpCreation() { + *this = ::std::move(from); + } + + inline GraphOpCreation& operator=(const GraphOpCreation& from) { + CopyFrom(from); + return *this; + } + inline GraphOpCreation& operator=(GraphOpCreation&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const GraphOpCreation& default_instance() { + return *internal_default_instance(); + } + static inline const GraphOpCreation* internal_default_instance() { + return reinterpret_cast( + &_GraphOpCreation_default_instance_); + } + static constexpr int kIndexInFileMessages = + 5; + + friend void swap(GraphOpCreation& a, GraphOpCreation& b) { + a.Swap(&b); + } + inline void Swap(GraphOpCreation* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(GraphOpCreation* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + GraphOpCreation* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const GraphOpCreation& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const GraphOpCreation& from) { + GraphOpCreation::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(GraphOpCreation* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.GraphOpCreation"; + } + protected: + explicit GraphOpCreation(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kInputNamesFieldNumber = 6, + kOutputTensorIdsFieldNumber = 9, + kOpTypeFieldNumber = 1, + kOpNameFieldNumber = 2, + kGraphNameFieldNumber = 3, + kGraphIdFieldNumber = 4, + kDeviceNameFieldNumber = 5, + kCodeLocationFieldNumber = 8, + kNumOutputsFieldNumber = 7, + }; + // repeated string input_names = 6; + int input_names_size() const; + private: + int _internal_input_names_size() const; + public: + void clear_input_names(); + const std::string& input_names(int index) const; + std::string* mutable_input_names(int index); + void set_input_names(int index, const std::string& value); + void set_input_names(int index, std::string&& value); + void set_input_names(int index, const char* value); + void set_input_names(int index, const char* value, size_t size); + std::string* add_input_names(); + void add_input_names(const std::string& value); + void add_input_names(std::string&& value); + void add_input_names(const char* value); + void add_input_names(const char* value, size_t size); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& input_names() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* mutable_input_names(); + private: + const std::string& _internal_input_names(int index) const; + std::string* _internal_add_input_names(); + public: + + // repeated int32 output_tensor_ids = 9; + int output_tensor_ids_size() const; + private: + int _internal_output_tensor_ids_size() const; + public: + void clear_output_tensor_ids(); + private: + int32_t _internal_output_tensor_ids(int index) const; + const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >& + _internal_output_tensor_ids() const; + void _internal_add_output_tensor_ids(int32_t value); + ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >* + _internal_mutable_output_tensor_ids(); + public: + int32_t output_tensor_ids(int index) const; + void set_output_tensor_ids(int index, int32_t value); + void add_output_tensor_ids(int32_t value); + const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >& + output_tensor_ids() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >* + mutable_output_tensor_ids(); + + // string op_type = 1; + void clear_op_type(); + const std::string& op_type() const; + template + void set_op_type(ArgT0&& arg0, ArgT... args); + std::string* mutable_op_type(); + PROTOBUF_NODISCARD std::string* release_op_type(); + void set_allocated_op_type(std::string* op_type); + private: + const std::string& _internal_op_type() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_op_type(const std::string& value); + std::string* _internal_mutable_op_type(); + public: + + // string op_name = 2; + void clear_op_name(); + const std::string& op_name() const; + template + void set_op_name(ArgT0&& arg0, ArgT... args); + std::string* mutable_op_name(); + PROTOBUF_NODISCARD std::string* release_op_name(); + void set_allocated_op_name(std::string* op_name); + private: + const std::string& _internal_op_name() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_op_name(const std::string& value); + std::string* _internal_mutable_op_name(); + public: + + // string graph_name = 3; + void clear_graph_name(); + const std::string& graph_name() const; + template + void set_graph_name(ArgT0&& arg0, ArgT... args); + std::string* mutable_graph_name(); + PROTOBUF_NODISCARD std::string* release_graph_name(); + void set_allocated_graph_name(std::string* graph_name); + private: + const std::string& _internal_graph_name() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_graph_name(const std::string& value); + std::string* _internal_mutable_graph_name(); + public: + + // string graph_id = 4; + void clear_graph_id(); + const std::string& graph_id() const; + template + void set_graph_id(ArgT0&& arg0, ArgT... args); + std::string* mutable_graph_id(); + PROTOBUF_NODISCARD std::string* release_graph_id(); + void set_allocated_graph_id(std::string* graph_id); + private: + const std::string& _internal_graph_id() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_graph_id(const std::string& value); + std::string* _internal_mutable_graph_id(); + public: + + // string device_name = 5; + void clear_device_name(); + const std::string& device_name() const; + template + void set_device_name(ArgT0&& arg0, ArgT... args); + std::string* mutable_device_name(); + PROTOBUF_NODISCARD std::string* release_device_name(); + void set_allocated_device_name(std::string* device_name); + private: + const std::string& _internal_device_name() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_device_name(const std::string& value); + std::string* _internal_mutable_device_name(); + public: + + // .tensorflow.CodeLocation code_location = 8; + bool has_code_location() const; + private: + bool _internal_has_code_location() const; + public: + void clear_code_location(); + const ::tensorflow::CodeLocation& code_location() const; + PROTOBUF_NODISCARD ::tensorflow::CodeLocation* release_code_location(); + ::tensorflow::CodeLocation* mutable_code_location(); + void set_allocated_code_location(::tensorflow::CodeLocation* code_location); + private: + const ::tensorflow::CodeLocation& _internal_code_location() const; + ::tensorflow::CodeLocation* _internal_mutable_code_location(); + public: + void unsafe_arena_set_allocated_code_location( + ::tensorflow::CodeLocation* code_location); + ::tensorflow::CodeLocation* unsafe_arena_release_code_location(); + + // int32 num_outputs = 7; + void clear_num_outputs(); + int32_t num_outputs() const; + void set_num_outputs(int32_t value); + private: + int32_t _internal_num_outputs() const; + void _internal_set_num_outputs(int32_t value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.GraphOpCreation) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField input_names_; + ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t > output_tensor_ids_; + mutable std::atomic _output_tensor_ids_cached_byte_size_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr op_type_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr op_name_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr graph_name_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr graph_id_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr device_name_; + ::tensorflow::CodeLocation* code_location_; + int32_t num_outputs_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fdebug_5fevent_2eproto; +}; +// ------------------------------------------------------------------- + +class DebuggedGraph final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.DebuggedGraph) */ { + public: + inline DebuggedGraph() : DebuggedGraph(nullptr) {} + ~DebuggedGraph() override; + explicit PROTOBUF_CONSTEXPR DebuggedGraph(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + DebuggedGraph(const DebuggedGraph& from); + DebuggedGraph(DebuggedGraph&& from) noexcept + : DebuggedGraph() { + *this = ::std::move(from); + } + + inline DebuggedGraph& operator=(const DebuggedGraph& from) { + CopyFrom(from); + return *this; + } + inline DebuggedGraph& operator=(DebuggedGraph&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const DebuggedGraph& default_instance() { + return *internal_default_instance(); + } + static inline const DebuggedGraph* internal_default_instance() { + return reinterpret_cast( + &_DebuggedGraph_default_instance_); + } + static constexpr int kIndexInFileMessages = + 6; + + friend void swap(DebuggedGraph& a, DebuggedGraph& b) { + a.Swap(&b); + } + inline void Swap(DebuggedGraph* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(DebuggedGraph* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + DebuggedGraph* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const DebuggedGraph& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const DebuggedGraph& from) { + DebuggedGraph::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(DebuggedGraph* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.DebuggedGraph"; + } + protected: + explicit DebuggedGraph(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kInstrumentedOpsFieldNumber = 3, + kGraphIdFieldNumber = 1, + kGraphNameFieldNumber = 2, + kOriginalGraphDefFieldNumber = 4, + kInstrumentedGraphDefFieldNumber = 5, + kOuterContextIdFieldNumber = 6, + }; + // repeated string instrumented_ops = 3; + int instrumented_ops_size() const; + private: + int _internal_instrumented_ops_size() const; + public: + void clear_instrumented_ops(); + const std::string& instrumented_ops(int index) const; + std::string* mutable_instrumented_ops(int index); + void set_instrumented_ops(int index, const std::string& value); + void set_instrumented_ops(int index, std::string&& value); + void set_instrumented_ops(int index, const char* value); + void set_instrumented_ops(int index, const char* value, size_t size); + std::string* add_instrumented_ops(); + void add_instrumented_ops(const std::string& value); + void add_instrumented_ops(std::string&& value); + void add_instrumented_ops(const char* value); + void add_instrumented_ops(const char* value, size_t size); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& instrumented_ops() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* mutable_instrumented_ops(); + private: + const std::string& _internal_instrumented_ops(int index) const; + std::string* _internal_add_instrumented_ops(); + public: + + // string graph_id = 1; + void clear_graph_id(); + const std::string& graph_id() const; + template + void set_graph_id(ArgT0&& arg0, ArgT... args); + std::string* mutable_graph_id(); + PROTOBUF_NODISCARD std::string* release_graph_id(); + void set_allocated_graph_id(std::string* graph_id); + private: + const std::string& _internal_graph_id() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_graph_id(const std::string& value); + std::string* _internal_mutable_graph_id(); + public: + + // string graph_name = 2; + void clear_graph_name(); + const std::string& graph_name() const; + template + void set_graph_name(ArgT0&& arg0, ArgT... args); + std::string* mutable_graph_name(); + PROTOBUF_NODISCARD std::string* release_graph_name(); + void set_allocated_graph_name(std::string* graph_name); + private: + const std::string& _internal_graph_name() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_graph_name(const std::string& value); + std::string* _internal_mutable_graph_name(); + public: + + // bytes original_graph_def = 4; + void clear_original_graph_def(); + const std::string& original_graph_def() const; + template + void set_original_graph_def(ArgT0&& arg0, ArgT... args); + std::string* mutable_original_graph_def(); + PROTOBUF_NODISCARD std::string* release_original_graph_def(); + void set_allocated_original_graph_def(std::string* original_graph_def); + private: + const std::string& _internal_original_graph_def() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_original_graph_def(const std::string& value); + std::string* _internal_mutable_original_graph_def(); + public: + + // bytes instrumented_graph_def = 5; + void clear_instrumented_graph_def(); + const std::string& instrumented_graph_def() const; + template + void set_instrumented_graph_def(ArgT0&& arg0, ArgT... args); + std::string* mutable_instrumented_graph_def(); + PROTOBUF_NODISCARD std::string* release_instrumented_graph_def(); + void set_allocated_instrumented_graph_def(std::string* instrumented_graph_def); + private: + const std::string& _internal_instrumented_graph_def() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_instrumented_graph_def(const std::string& value); + std::string* _internal_mutable_instrumented_graph_def(); + public: + + // string outer_context_id = 6; + void clear_outer_context_id(); + const std::string& outer_context_id() const; + template + void set_outer_context_id(ArgT0&& arg0, ArgT... args); + std::string* mutable_outer_context_id(); + PROTOBUF_NODISCARD std::string* release_outer_context_id(); + void set_allocated_outer_context_id(std::string* outer_context_id); + private: + const std::string& _internal_outer_context_id() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_outer_context_id(const std::string& value); + std::string* _internal_mutable_outer_context_id(); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.DebuggedGraph) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField instrumented_ops_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr graph_id_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr graph_name_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr original_graph_def_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr instrumented_graph_def_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr outer_context_id_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fdebug_5fevent_2eproto; +}; +// ------------------------------------------------------------------- + +class DebuggedDevice final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.DebuggedDevice) */ { + public: + inline DebuggedDevice() : DebuggedDevice(nullptr) {} + ~DebuggedDevice() override; + explicit PROTOBUF_CONSTEXPR DebuggedDevice(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + DebuggedDevice(const DebuggedDevice& from); + DebuggedDevice(DebuggedDevice&& from) noexcept + : DebuggedDevice() { + *this = ::std::move(from); + } + + inline DebuggedDevice& operator=(const DebuggedDevice& from) { + CopyFrom(from); + return *this; + } + inline DebuggedDevice& operator=(DebuggedDevice&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const DebuggedDevice& default_instance() { + return *internal_default_instance(); + } + static inline const DebuggedDevice* internal_default_instance() { + return reinterpret_cast( + &_DebuggedDevice_default_instance_); + } + static constexpr int kIndexInFileMessages = + 7; + + friend void swap(DebuggedDevice& a, DebuggedDevice& b) { + a.Swap(&b); + } + inline void Swap(DebuggedDevice* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(DebuggedDevice* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + DebuggedDevice* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const DebuggedDevice& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const DebuggedDevice& from) { + DebuggedDevice::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(DebuggedDevice* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.DebuggedDevice"; + } + protected: + explicit DebuggedDevice(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kDeviceNameFieldNumber = 1, + kDeviceIdFieldNumber = 2, + }; + // string device_name = 1; + void clear_device_name(); + const std::string& device_name() const; + template + void set_device_name(ArgT0&& arg0, ArgT... args); + std::string* mutable_device_name(); + PROTOBUF_NODISCARD std::string* release_device_name(); + void set_allocated_device_name(std::string* device_name); + private: + const std::string& _internal_device_name() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_device_name(const std::string& value); + std::string* _internal_mutable_device_name(); + public: + + // int32 device_id = 2; + void clear_device_id(); + int32_t device_id() const; + void set_device_id(int32_t value); + private: + int32_t _internal_device_id() const; + void _internal_set_device_id(int32_t value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.DebuggedDevice) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr device_name_; + int32_t device_id_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fdebug_5fevent_2eproto; +}; +// ------------------------------------------------------------------- + +class Execution final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.Execution) */ { + public: + inline Execution() : Execution(nullptr) {} + ~Execution() override; + explicit PROTOBUF_CONSTEXPR Execution(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + Execution(const Execution& from); + Execution(Execution&& from) noexcept + : Execution() { + *this = ::std::move(from); + } + + inline Execution& operator=(const Execution& from) { + CopyFrom(from); + return *this; + } + inline Execution& operator=(Execution&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const Execution& default_instance() { + return *internal_default_instance(); + } + static inline const Execution* internal_default_instance() { + return reinterpret_cast( + &_Execution_default_instance_); + } + static constexpr int kIndexInFileMessages = + 8; + + friend void swap(Execution& a, Execution& b) { + a.Swap(&b); + } + inline void Swap(Execution* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(Execution* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + Execution* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const Execution& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const Execution& from) { + Execution::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(Execution* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.Execution"; + } + protected: + explicit Execution(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kInputTensorIdsFieldNumber = 4, + kOutputTensorIdsFieldNumber = 5, + kTensorProtosFieldNumber = 7, + kOutputTensorDeviceIdsFieldNumber = 9, + kOpTypeFieldNumber = 1, + kGraphIdFieldNumber = 3, + kCodeLocationFieldNumber = 8, + kNumOutputsFieldNumber = 2, + kTensorDebugModeFieldNumber = 6, + }; + // repeated int64 input_tensor_ids = 4; + int input_tensor_ids_size() const; + private: + int _internal_input_tensor_ids_size() const; + public: + void clear_input_tensor_ids(); + private: + int64_t _internal_input_tensor_ids(int index) const; + const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >& + _internal_input_tensor_ids() const; + void _internal_add_input_tensor_ids(int64_t value); + ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >* + _internal_mutable_input_tensor_ids(); + public: + int64_t input_tensor_ids(int index) const; + void set_input_tensor_ids(int index, int64_t value); + void add_input_tensor_ids(int64_t value); + const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >& + input_tensor_ids() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >* + mutable_input_tensor_ids(); + + // repeated int64 output_tensor_ids = 5; + int output_tensor_ids_size() const; + private: + int _internal_output_tensor_ids_size() const; + public: + void clear_output_tensor_ids(); + private: + int64_t _internal_output_tensor_ids(int index) const; + const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >& + _internal_output_tensor_ids() const; + void _internal_add_output_tensor_ids(int64_t value); + ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >* + _internal_mutable_output_tensor_ids(); + public: + int64_t output_tensor_ids(int index) const; + void set_output_tensor_ids(int index, int64_t value); + void add_output_tensor_ids(int64_t value); + const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >& + output_tensor_ids() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >* + mutable_output_tensor_ids(); + + // repeated .tensorflow.TensorProto tensor_protos = 7; + int tensor_protos_size() const; + private: + int _internal_tensor_protos_size() const; + public: + void clear_tensor_protos(); + ::tensorflow::TensorProto* mutable_tensor_protos(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::TensorProto >* + mutable_tensor_protos(); + private: + const ::tensorflow::TensorProto& _internal_tensor_protos(int index) const; + ::tensorflow::TensorProto* _internal_add_tensor_protos(); + public: + const ::tensorflow::TensorProto& tensor_protos(int index) const; + ::tensorflow::TensorProto* add_tensor_protos(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::TensorProto >& + tensor_protos() const; + + // repeated int32 output_tensor_device_ids = 9; + int output_tensor_device_ids_size() const; + private: + int _internal_output_tensor_device_ids_size() const; + public: + void clear_output_tensor_device_ids(); + private: + int32_t _internal_output_tensor_device_ids(int index) const; + const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >& + _internal_output_tensor_device_ids() const; + void _internal_add_output_tensor_device_ids(int32_t value); + ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >* + _internal_mutable_output_tensor_device_ids(); + public: + int32_t output_tensor_device_ids(int index) const; + void set_output_tensor_device_ids(int index, int32_t value); + void add_output_tensor_device_ids(int32_t value); + const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >& + output_tensor_device_ids() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >* + mutable_output_tensor_device_ids(); + + // string op_type = 1; + void clear_op_type(); + const std::string& op_type() const; + template + void set_op_type(ArgT0&& arg0, ArgT... args); + std::string* mutable_op_type(); + PROTOBUF_NODISCARD std::string* release_op_type(); + void set_allocated_op_type(std::string* op_type); + private: + const std::string& _internal_op_type() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_op_type(const std::string& value); + std::string* _internal_mutable_op_type(); + public: + + // string graph_id = 3; + void clear_graph_id(); + const std::string& graph_id() const; + template + void set_graph_id(ArgT0&& arg0, ArgT... args); + std::string* mutable_graph_id(); + PROTOBUF_NODISCARD std::string* release_graph_id(); + void set_allocated_graph_id(std::string* graph_id); + private: + const std::string& _internal_graph_id() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_graph_id(const std::string& value); + std::string* _internal_mutable_graph_id(); + public: + + // .tensorflow.CodeLocation code_location = 8; + bool has_code_location() const; + private: + bool _internal_has_code_location() const; + public: + void clear_code_location(); + const ::tensorflow::CodeLocation& code_location() const; + PROTOBUF_NODISCARD ::tensorflow::CodeLocation* release_code_location(); + ::tensorflow::CodeLocation* mutable_code_location(); + void set_allocated_code_location(::tensorflow::CodeLocation* code_location); + private: + const ::tensorflow::CodeLocation& _internal_code_location() const; + ::tensorflow::CodeLocation* _internal_mutable_code_location(); + public: + void unsafe_arena_set_allocated_code_location( + ::tensorflow::CodeLocation* code_location); + ::tensorflow::CodeLocation* unsafe_arena_release_code_location(); + + // int32 num_outputs = 2; + void clear_num_outputs(); + int32_t num_outputs() const; + void set_num_outputs(int32_t value); + private: + int32_t _internal_num_outputs() const; + void _internal_set_num_outputs(int32_t value); + public: + + // .tensorflow.TensorDebugMode tensor_debug_mode = 6; + void clear_tensor_debug_mode(); + ::tensorflow::TensorDebugMode tensor_debug_mode() const; + void set_tensor_debug_mode(::tensorflow::TensorDebugMode value); + private: + ::tensorflow::TensorDebugMode _internal_tensor_debug_mode() const; + void _internal_set_tensor_debug_mode(::tensorflow::TensorDebugMode value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.Execution) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t > input_tensor_ids_; + mutable std::atomic _input_tensor_ids_cached_byte_size_; + ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t > output_tensor_ids_; + mutable std::atomic _output_tensor_ids_cached_byte_size_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::TensorProto > tensor_protos_; + ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t > output_tensor_device_ids_; + mutable std::atomic _output_tensor_device_ids_cached_byte_size_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr op_type_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr graph_id_; + ::tensorflow::CodeLocation* code_location_; + int32_t num_outputs_; + int tensor_debug_mode_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fdebug_5fevent_2eproto; +}; +// ------------------------------------------------------------------- + +class GraphExecutionTrace final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.GraphExecutionTrace) */ { + public: + inline GraphExecutionTrace() : GraphExecutionTrace(nullptr) {} + ~GraphExecutionTrace() override; + explicit PROTOBUF_CONSTEXPR GraphExecutionTrace(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + GraphExecutionTrace(const GraphExecutionTrace& from); + GraphExecutionTrace(GraphExecutionTrace&& from) noexcept + : GraphExecutionTrace() { + *this = ::std::move(from); + } + + inline GraphExecutionTrace& operator=(const GraphExecutionTrace& from) { + CopyFrom(from); + return *this; + } + inline GraphExecutionTrace& operator=(GraphExecutionTrace&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const GraphExecutionTrace& default_instance() { + return *internal_default_instance(); + } + static inline const GraphExecutionTrace* internal_default_instance() { + return reinterpret_cast( + &_GraphExecutionTrace_default_instance_); + } + static constexpr int kIndexInFileMessages = + 9; + + friend void swap(GraphExecutionTrace& a, GraphExecutionTrace& b) { + a.Swap(&b); + } + inline void Swap(GraphExecutionTrace* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(GraphExecutionTrace* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + GraphExecutionTrace* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const GraphExecutionTrace& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const GraphExecutionTrace& from) { + GraphExecutionTrace::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(GraphExecutionTrace* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.GraphExecutionTrace"; + } + protected: + explicit GraphExecutionTrace(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kTfdbgContextIdFieldNumber = 1, + kOpNameFieldNumber = 2, + kDeviceNameFieldNumber = 6, + kTensorProtoFieldNumber = 5, + kOutputSlotFieldNumber = 3, + kTensorDebugModeFieldNumber = 4, + }; + // string tfdbg_context_id = 1; + void clear_tfdbg_context_id(); + const std::string& tfdbg_context_id() const; + template + void set_tfdbg_context_id(ArgT0&& arg0, ArgT... args); + std::string* mutable_tfdbg_context_id(); + PROTOBUF_NODISCARD std::string* release_tfdbg_context_id(); + void set_allocated_tfdbg_context_id(std::string* tfdbg_context_id); + private: + const std::string& _internal_tfdbg_context_id() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_tfdbg_context_id(const std::string& value); + std::string* _internal_mutable_tfdbg_context_id(); + public: + + // string op_name = 2; + void clear_op_name(); + const std::string& op_name() const; + template + void set_op_name(ArgT0&& arg0, ArgT... args); + std::string* mutable_op_name(); + PROTOBUF_NODISCARD std::string* release_op_name(); + void set_allocated_op_name(std::string* op_name); + private: + const std::string& _internal_op_name() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_op_name(const std::string& value); + std::string* _internal_mutable_op_name(); + public: + + // string device_name = 6; + void clear_device_name(); + const std::string& device_name() const; + template + void set_device_name(ArgT0&& arg0, ArgT... args); + std::string* mutable_device_name(); + PROTOBUF_NODISCARD std::string* release_device_name(); + void set_allocated_device_name(std::string* device_name); + private: + const std::string& _internal_device_name() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_device_name(const std::string& value); + std::string* _internal_mutable_device_name(); + public: + + // .tensorflow.TensorProto tensor_proto = 5; + bool has_tensor_proto() const; + private: + bool _internal_has_tensor_proto() const; + public: + void clear_tensor_proto(); + const ::tensorflow::TensorProto& tensor_proto() const; + PROTOBUF_NODISCARD ::tensorflow::TensorProto* release_tensor_proto(); + ::tensorflow::TensorProto* mutable_tensor_proto(); + void set_allocated_tensor_proto(::tensorflow::TensorProto* tensor_proto); + private: + const ::tensorflow::TensorProto& _internal_tensor_proto() const; + ::tensorflow::TensorProto* _internal_mutable_tensor_proto(); + public: + void unsafe_arena_set_allocated_tensor_proto( + ::tensorflow::TensorProto* tensor_proto); + ::tensorflow::TensorProto* unsafe_arena_release_tensor_proto(); + + // int32 output_slot = 3; + void clear_output_slot(); + int32_t output_slot() const; + void set_output_slot(int32_t value); + private: + int32_t _internal_output_slot() const; + void _internal_set_output_slot(int32_t value); + public: + + // .tensorflow.TensorDebugMode tensor_debug_mode = 4; + void clear_tensor_debug_mode(); + ::tensorflow::TensorDebugMode tensor_debug_mode() const; + void set_tensor_debug_mode(::tensorflow::TensorDebugMode value); + private: + ::tensorflow::TensorDebugMode _internal_tensor_debug_mode() const; + void _internal_set_tensor_debug_mode(::tensorflow::TensorDebugMode value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.GraphExecutionTrace) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr tfdbg_context_id_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr op_name_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr device_name_; + ::tensorflow::TensorProto* tensor_proto_; + int32_t output_slot_; + int tensor_debug_mode_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fdebug_5fevent_2eproto; +}; +// =================================================================== + + +// =================================================================== + +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// DebugEvent + +// double wall_time = 1; +inline void DebugEvent::clear_wall_time() { + _impl_.wall_time_ = 0; +} +inline double DebugEvent::_internal_wall_time() const { + return _impl_.wall_time_; +} +inline double DebugEvent::wall_time() const { + // @@protoc_insertion_point(field_get:tensorflow.DebugEvent.wall_time) + return _internal_wall_time(); +} +inline void DebugEvent::_internal_set_wall_time(double value) { + + _impl_.wall_time_ = value; +} +inline void DebugEvent::set_wall_time(double value) { + _internal_set_wall_time(value); + // @@protoc_insertion_point(field_set:tensorflow.DebugEvent.wall_time) +} + +// int64 step = 2; +inline void DebugEvent::clear_step() { + _impl_.step_ = int64_t{0}; +} +inline int64_t DebugEvent::_internal_step() const { + return _impl_.step_; +} +inline int64_t DebugEvent::step() const { + // @@protoc_insertion_point(field_get:tensorflow.DebugEvent.step) + return _internal_step(); +} +inline void DebugEvent::_internal_set_step(int64_t value) { + + _impl_.step_ = value; +} +inline void DebugEvent::set_step(int64_t value) { + _internal_set_step(value); + // @@protoc_insertion_point(field_set:tensorflow.DebugEvent.step) +} + +// .tensorflow.DebugMetadata debug_metadata = 3; +inline bool DebugEvent::_internal_has_debug_metadata() const { + return what_case() == kDebugMetadata; +} +inline bool DebugEvent::has_debug_metadata() const { + return _internal_has_debug_metadata(); +} +inline void DebugEvent::set_has_debug_metadata() { + _impl_._oneof_case_[0] = kDebugMetadata; +} +inline void DebugEvent::clear_debug_metadata() { + if (_internal_has_debug_metadata()) { + if (GetArenaForAllocation() == nullptr) { + delete _impl_.what_.debug_metadata_; + } + clear_has_what(); + } +} +inline ::tensorflow::DebugMetadata* DebugEvent::release_debug_metadata() { + // @@protoc_insertion_point(field_release:tensorflow.DebugEvent.debug_metadata) + if (_internal_has_debug_metadata()) { + clear_has_what(); + ::tensorflow::DebugMetadata* temp = _impl_.what_.debug_metadata_; + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + _impl_.what_.debug_metadata_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::tensorflow::DebugMetadata& DebugEvent::_internal_debug_metadata() const { + return _internal_has_debug_metadata() + ? *_impl_.what_.debug_metadata_ + : reinterpret_cast< ::tensorflow::DebugMetadata&>(::tensorflow::_DebugMetadata_default_instance_); +} +inline const ::tensorflow::DebugMetadata& DebugEvent::debug_metadata() const { + // @@protoc_insertion_point(field_get:tensorflow.DebugEvent.debug_metadata) + return _internal_debug_metadata(); +} +inline ::tensorflow::DebugMetadata* DebugEvent::unsafe_arena_release_debug_metadata() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.DebugEvent.debug_metadata) + if (_internal_has_debug_metadata()) { + clear_has_what(); + ::tensorflow::DebugMetadata* temp = _impl_.what_.debug_metadata_; + _impl_.what_.debug_metadata_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void DebugEvent::unsafe_arena_set_allocated_debug_metadata(::tensorflow::DebugMetadata* debug_metadata) { + clear_what(); + if (debug_metadata) { + set_has_debug_metadata(); + _impl_.what_.debug_metadata_ = debug_metadata; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.DebugEvent.debug_metadata) +} +inline ::tensorflow::DebugMetadata* DebugEvent::_internal_mutable_debug_metadata() { + if (!_internal_has_debug_metadata()) { + clear_what(); + set_has_debug_metadata(); + _impl_.what_.debug_metadata_ = CreateMaybeMessage< ::tensorflow::DebugMetadata >(GetArenaForAllocation()); + } + return _impl_.what_.debug_metadata_; +} +inline ::tensorflow::DebugMetadata* DebugEvent::mutable_debug_metadata() { + ::tensorflow::DebugMetadata* _msg = _internal_mutable_debug_metadata(); + // @@protoc_insertion_point(field_mutable:tensorflow.DebugEvent.debug_metadata) + return _msg; +} + +// .tensorflow.SourceFile source_file = 4; +inline bool DebugEvent::_internal_has_source_file() const { + return what_case() == kSourceFile; +} +inline bool DebugEvent::has_source_file() const { + return _internal_has_source_file(); +} +inline void DebugEvent::set_has_source_file() { + _impl_._oneof_case_[0] = kSourceFile; +} +inline void DebugEvent::clear_source_file() { + if (_internal_has_source_file()) { + if (GetArenaForAllocation() == nullptr) { + delete _impl_.what_.source_file_; + } + clear_has_what(); + } +} +inline ::tensorflow::SourceFile* DebugEvent::release_source_file() { + // @@protoc_insertion_point(field_release:tensorflow.DebugEvent.source_file) + if (_internal_has_source_file()) { + clear_has_what(); + ::tensorflow::SourceFile* temp = _impl_.what_.source_file_; + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + _impl_.what_.source_file_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::tensorflow::SourceFile& DebugEvent::_internal_source_file() const { + return _internal_has_source_file() + ? *_impl_.what_.source_file_ + : reinterpret_cast< ::tensorflow::SourceFile&>(::tensorflow::_SourceFile_default_instance_); +} +inline const ::tensorflow::SourceFile& DebugEvent::source_file() const { + // @@protoc_insertion_point(field_get:tensorflow.DebugEvent.source_file) + return _internal_source_file(); +} +inline ::tensorflow::SourceFile* DebugEvent::unsafe_arena_release_source_file() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.DebugEvent.source_file) + if (_internal_has_source_file()) { + clear_has_what(); + ::tensorflow::SourceFile* temp = _impl_.what_.source_file_; + _impl_.what_.source_file_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void DebugEvent::unsafe_arena_set_allocated_source_file(::tensorflow::SourceFile* source_file) { + clear_what(); + if (source_file) { + set_has_source_file(); + _impl_.what_.source_file_ = source_file; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.DebugEvent.source_file) +} +inline ::tensorflow::SourceFile* DebugEvent::_internal_mutable_source_file() { + if (!_internal_has_source_file()) { + clear_what(); + set_has_source_file(); + _impl_.what_.source_file_ = CreateMaybeMessage< ::tensorflow::SourceFile >(GetArenaForAllocation()); + } + return _impl_.what_.source_file_; +} +inline ::tensorflow::SourceFile* DebugEvent::mutable_source_file() { + ::tensorflow::SourceFile* _msg = _internal_mutable_source_file(); + // @@protoc_insertion_point(field_mutable:tensorflow.DebugEvent.source_file) + return _msg; +} + +// .tensorflow.StackFrameWithId stack_frame_with_id = 6; +inline bool DebugEvent::_internal_has_stack_frame_with_id() const { + return what_case() == kStackFrameWithId; +} +inline bool DebugEvent::has_stack_frame_with_id() const { + return _internal_has_stack_frame_with_id(); +} +inline void DebugEvent::set_has_stack_frame_with_id() { + _impl_._oneof_case_[0] = kStackFrameWithId; +} +inline void DebugEvent::clear_stack_frame_with_id() { + if (_internal_has_stack_frame_with_id()) { + if (GetArenaForAllocation() == nullptr) { + delete _impl_.what_.stack_frame_with_id_; + } + clear_has_what(); + } +} +inline ::tensorflow::StackFrameWithId* DebugEvent::release_stack_frame_with_id() { + // @@protoc_insertion_point(field_release:tensorflow.DebugEvent.stack_frame_with_id) + if (_internal_has_stack_frame_with_id()) { + clear_has_what(); + ::tensorflow::StackFrameWithId* temp = _impl_.what_.stack_frame_with_id_; + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + _impl_.what_.stack_frame_with_id_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::tensorflow::StackFrameWithId& DebugEvent::_internal_stack_frame_with_id() const { + return _internal_has_stack_frame_with_id() + ? *_impl_.what_.stack_frame_with_id_ + : reinterpret_cast< ::tensorflow::StackFrameWithId&>(::tensorflow::_StackFrameWithId_default_instance_); +} +inline const ::tensorflow::StackFrameWithId& DebugEvent::stack_frame_with_id() const { + // @@protoc_insertion_point(field_get:tensorflow.DebugEvent.stack_frame_with_id) + return _internal_stack_frame_with_id(); +} +inline ::tensorflow::StackFrameWithId* DebugEvent::unsafe_arena_release_stack_frame_with_id() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.DebugEvent.stack_frame_with_id) + if (_internal_has_stack_frame_with_id()) { + clear_has_what(); + ::tensorflow::StackFrameWithId* temp = _impl_.what_.stack_frame_with_id_; + _impl_.what_.stack_frame_with_id_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void DebugEvent::unsafe_arena_set_allocated_stack_frame_with_id(::tensorflow::StackFrameWithId* stack_frame_with_id) { + clear_what(); + if (stack_frame_with_id) { + set_has_stack_frame_with_id(); + _impl_.what_.stack_frame_with_id_ = stack_frame_with_id; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.DebugEvent.stack_frame_with_id) +} +inline ::tensorflow::StackFrameWithId* DebugEvent::_internal_mutable_stack_frame_with_id() { + if (!_internal_has_stack_frame_with_id()) { + clear_what(); + set_has_stack_frame_with_id(); + _impl_.what_.stack_frame_with_id_ = CreateMaybeMessage< ::tensorflow::StackFrameWithId >(GetArenaForAllocation()); + } + return _impl_.what_.stack_frame_with_id_; +} +inline ::tensorflow::StackFrameWithId* DebugEvent::mutable_stack_frame_with_id() { + ::tensorflow::StackFrameWithId* _msg = _internal_mutable_stack_frame_with_id(); + // @@protoc_insertion_point(field_mutable:tensorflow.DebugEvent.stack_frame_with_id) + return _msg; +} + +// .tensorflow.GraphOpCreation graph_op_creation = 7; +inline bool DebugEvent::_internal_has_graph_op_creation() const { + return what_case() == kGraphOpCreation; +} +inline bool DebugEvent::has_graph_op_creation() const { + return _internal_has_graph_op_creation(); +} +inline void DebugEvent::set_has_graph_op_creation() { + _impl_._oneof_case_[0] = kGraphOpCreation; +} +inline void DebugEvent::clear_graph_op_creation() { + if (_internal_has_graph_op_creation()) { + if (GetArenaForAllocation() == nullptr) { + delete _impl_.what_.graph_op_creation_; + } + clear_has_what(); + } +} +inline ::tensorflow::GraphOpCreation* DebugEvent::release_graph_op_creation() { + // @@protoc_insertion_point(field_release:tensorflow.DebugEvent.graph_op_creation) + if (_internal_has_graph_op_creation()) { + clear_has_what(); + ::tensorflow::GraphOpCreation* temp = _impl_.what_.graph_op_creation_; + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + _impl_.what_.graph_op_creation_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::tensorflow::GraphOpCreation& DebugEvent::_internal_graph_op_creation() const { + return _internal_has_graph_op_creation() + ? *_impl_.what_.graph_op_creation_ + : reinterpret_cast< ::tensorflow::GraphOpCreation&>(::tensorflow::_GraphOpCreation_default_instance_); +} +inline const ::tensorflow::GraphOpCreation& DebugEvent::graph_op_creation() const { + // @@protoc_insertion_point(field_get:tensorflow.DebugEvent.graph_op_creation) + return _internal_graph_op_creation(); +} +inline ::tensorflow::GraphOpCreation* DebugEvent::unsafe_arena_release_graph_op_creation() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.DebugEvent.graph_op_creation) + if (_internal_has_graph_op_creation()) { + clear_has_what(); + ::tensorflow::GraphOpCreation* temp = _impl_.what_.graph_op_creation_; + _impl_.what_.graph_op_creation_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void DebugEvent::unsafe_arena_set_allocated_graph_op_creation(::tensorflow::GraphOpCreation* graph_op_creation) { + clear_what(); + if (graph_op_creation) { + set_has_graph_op_creation(); + _impl_.what_.graph_op_creation_ = graph_op_creation; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.DebugEvent.graph_op_creation) +} +inline ::tensorflow::GraphOpCreation* DebugEvent::_internal_mutable_graph_op_creation() { + if (!_internal_has_graph_op_creation()) { + clear_what(); + set_has_graph_op_creation(); + _impl_.what_.graph_op_creation_ = CreateMaybeMessage< ::tensorflow::GraphOpCreation >(GetArenaForAllocation()); + } + return _impl_.what_.graph_op_creation_; +} +inline ::tensorflow::GraphOpCreation* DebugEvent::mutable_graph_op_creation() { + ::tensorflow::GraphOpCreation* _msg = _internal_mutable_graph_op_creation(); + // @@protoc_insertion_point(field_mutable:tensorflow.DebugEvent.graph_op_creation) + return _msg; +} + +// .tensorflow.DebuggedGraph debugged_graph = 8; +inline bool DebugEvent::_internal_has_debugged_graph() const { + return what_case() == kDebuggedGraph; +} +inline bool DebugEvent::has_debugged_graph() const { + return _internal_has_debugged_graph(); +} +inline void DebugEvent::set_has_debugged_graph() { + _impl_._oneof_case_[0] = kDebuggedGraph; +} +inline void DebugEvent::clear_debugged_graph() { + if (_internal_has_debugged_graph()) { + if (GetArenaForAllocation() == nullptr) { + delete _impl_.what_.debugged_graph_; + } + clear_has_what(); + } +} +inline ::tensorflow::DebuggedGraph* DebugEvent::release_debugged_graph() { + // @@protoc_insertion_point(field_release:tensorflow.DebugEvent.debugged_graph) + if (_internal_has_debugged_graph()) { + clear_has_what(); + ::tensorflow::DebuggedGraph* temp = _impl_.what_.debugged_graph_; + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + _impl_.what_.debugged_graph_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::tensorflow::DebuggedGraph& DebugEvent::_internal_debugged_graph() const { + return _internal_has_debugged_graph() + ? *_impl_.what_.debugged_graph_ + : reinterpret_cast< ::tensorflow::DebuggedGraph&>(::tensorflow::_DebuggedGraph_default_instance_); +} +inline const ::tensorflow::DebuggedGraph& DebugEvent::debugged_graph() const { + // @@protoc_insertion_point(field_get:tensorflow.DebugEvent.debugged_graph) + return _internal_debugged_graph(); +} +inline ::tensorflow::DebuggedGraph* DebugEvent::unsafe_arena_release_debugged_graph() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.DebugEvent.debugged_graph) + if (_internal_has_debugged_graph()) { + clear_has_what(); + ::tensorflow::DebuggedGraph* temp = _impl_.what_.debugged_graph_; + _impl_.what_.debugged_graph_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void DebugEvent::unsafe_arena_set_allocated_debugged_graph(::tensorflow::DebuggedGraph* debugged_graph) { + clear_what(); + if (debugged_graph) { + set_has_debugged_graph(); + _impl_.what_.debugged_graph_ = debugged_graph; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.DebugEvent.debugged_graph) +} +inline ::tensorflow::DebuggedGraph* DebugEvent::_internal_mutable_debugged_graph() { + if (!_internal_has_debugged_graph()) { + clear_what(); + set_has_debugged_graph(); + _impl_.what_.debugged_graph_ = CreateMaybeMessage< ::tensorflow::DebuggedGraph >(GetArenaForAllocation()); + } + return _impl_.what_.debugged_graph_; +} +inline ::tensorflow::DebuggedGraph* DebugEvent::mutable_debugged_graph() { + ::tensorflow::DebuggedGraph* _msg = _internal_mutable_debugged_graph(); + // @@protoc_insertion_point(field_mutable:tensorflow.DebugEvent.debugged_graph) + return _msg; +} + +// .tensorflow.Execution execution = 9; +inline bool DebugEvent::_internal_has_execution() const { + return what_case() == kExecution; +} +inline bool DebugEvent::has_execution() const { + return _internal_has_execution(); +} +inline void DebugEvent::set_has_execution() { + _impl_._oneof_case_[0] = kExecution; +} +inline void DebugEvent::clear_execution() { + if (_internal_has_execution()) { + if (GetArenaForAllocation() == nullptr) { + delete _impl_.what_.execution_; + } + clear_has_what(); + } +} +inline ::tensorflow::Execution* DebugEvent::release_execution() { + // @@protoc_insertion_point(field_release:tensorflow.DebugEvent.execution) + if (_internal_has_execution()) { + clear_has_what(); + ::tensorflow::Execution* temp = _impl_.what_.execution_; + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + _impl_.what_.execution_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::tensorflow::Execution& DebugEvent::_internal_execution() const { + return _internal_has_execution() + ? *_impl_.what_.execution_ + : reinterpret_cast< ::tensorflow::Execution&>(::tensorflow::_Execution_default_instance_); +} +inline const ::tensorflow::Execution& DebugEvent::execution() const { + // @@protoc_insertion_point(field_get:tensorflow.DebugEvent.execution) + return _internal_execution(); +} +inline ::tensorflow::Execution* DebugEvent::unsafe_arena_release_execution() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.DebugEvent.execution) + if (_internal_has_execution()) { + clear_has_what(); + ::tensorflow::Execution* temp = _impl_.what_.execution_; + _impl_.what_.execution_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void DebugEvent::unsafe_arena_set_allocated_execution(::tensorflow::Execution* execution) { + clear_what(); + if (execution) { + set_has_execution(); + _impl_.what_.execution_ = execution; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.DebugEvent.execution) +} +inline ::tensorflow::Execution* DebugEvent::_internal_mutable_execution() { + if (!_internal_has_execution()) { + clear_what(); + set_has_execution(); + _impl_.what_.execution_ = CreateMaybeMessage< ::tensorflow::Execution >(GetArenaForAllocation()); + } + return _impl_.what_.execution_; +} +inline ::tensorflow::Execution* DebugEvent::mutable_execution() { + ::tensorflow::Execution* _msg = _internal_mutable_execution(); + // @@protoc_insertion_point(field_mutable:tensorflow.DebugEvent.execution) + return _msg; +} + +// .tensorflow.GraphExecutionTrace graph_execution_trace = 10; +inline bool DebugEvent::_internal_has_graph_execution_trace() const { + return what_case() == kGraphExecutionTrace; +} +inline bool DebugEvent::has_graph_execution_trace() const { + return _internal_has_graph_execution_trace(); +} +inline void DebugEvent::set_has_graph_execution_trace() { + _impl_._oneof_case_[0] = kGraphExecutionTrace; +} +inline void DebugEvent::clear_graph_execution_trace() { + if (_internal_has_graph_execution_trace()) { + if (GetArenaForAllocation() == nullptr) { + delete _impl_.what_.graph_execution_trace_; + } + clear_has_what(); + } +} +inline ::tensorflow::GraphExecutionTrace* DebugEvent::release_graph_execution_trace() { + // @@protoc_insertion_point(field_release:tensorflow.DebugEvent.graph_execution_trace) + if (_internal_has_graph_execution_trace()) { + clear_has_what(); + ::tensorflow::GraphExecutionTrace* temp = _impl_.what_.graph_execution_trace_; + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + _impl_.what_.graph_execution_trace_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::tensorflow::GraphExecutionTrace& DebugEvent::_internal_graph_execution_trace() const { + return _internal_has_graph_execution_trace() + ? *_impl_.what_.graph_execution_trace_ + : reinterpret_cast< ::tensorflow::GraphExecutionTrace&>(::tensorflow::_GraphExecutionTrace_default_instance_); +} +inline const ::tensorflow::GraphExecutionTrace& DebugEvent::graph_execution_trace() const { + // @@protoc_insertion_point(field_get:tensorflow.DebugEvent.graph_execution_trace) + return _internal_graph_execution_trace(); +} +inline ::tensorflow::GraphExecutionTrace* DebugEvent::unsafe_arena_release_graph_execution_trace() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.DebugEvent.graph_execution_trace) + if (_internal_has_graph_execution_trace()) { + clear_has_what(); + ::tensorflow::GraphExecutionTrace* temp = _impl_.what_.graph_execution_trace_; + _impl_.what_.graph_execution_trace_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void DebugEvent::unsafe_arena_set_allocated_graph_execution_trace(::tensorflow::GraphExecutionTrace* graph_execution_trace) { + clear_what(); + if (graph_execution_trace) { + set_has_graph_execution_trace(); + _impl_.what_.graph_execution_trace_ = graph_execution_trace; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.DebugEvent.graph_execution_trace) +} +inline ::tensorflow::GraphExecutionTrace* DebugEvent::_internal_mutable_graph_execution_trace() { + if (!_internal_has_graph_execution_trace()) { + clear_what(); + set_has_graph_execution_trace(); + _impl_.what_.graph_execution_trace_ = CreateMaybeMessage< ::tensorflow::GraphExecutionTrace >(GetArenaForAllocation()); + } + return _impl_.what_.graph_execution_trace_; +} +inline ::tensorflow::GraphExecutionTrace* DebugEvent::mutable_graph_execution_trace() { + ::tensorflow::GraphExecutionTrace* _msg = _internal_mutable_graph_execution_trace(); + // @@protoc_insertion_point(field_mutable:tensorflow.DebugEvent.graph_execution_trace) + return _msg; +} + +// string graph_id = 11; +inline bool DebugEvent::_internal_has_graph_id() const { + return what_case() == kGraphId; +} +inline bool DebugEvent::has_graph_id() const { + return _internal_has_graph_id(); +} +inline void DebugEvent::set_has_graph_id() { + _impl_._oneof_case_[0] = kGraphId; +} +inline void DebugEvent::clear_graph_id() { + if (_internal_has_graph_id()) { + _impl_.what_.graph_id_.Destroy(); + clear_has_what(); + } +} +inline const std::string& DebugEvent::graph_id() const { + // @@protoc_insertion_point(field_get:tensorflow.DebugEvent.graph_id) + return _internal_graph_id(); +} +template +inline void DebugEvent::set_graph_id(ArgT0&& arg0, ArgT... args) { + if (!_internal_has_graph_id()) { + clear_what(); + set_has_graph_id(); + _impl_.what_.graph_id_.InitDefault(); + } + _impl_.what_.graph_id_.Set( static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.DebugEvent.graph_id) +} +inline std::string* DebugEvent::mutable_graph_id() { + std::string* _s = _internal_mutable_graph_id(); + // @@protoc_insertion_point(field_mutable:tensorflow.DebugEvent.graph_id) + return _s; +} +inline const std::string& DebugEvent::_internal_graph_id() const { + if (_internal_has_graph_id()) { + return _impl_.what_.graph_id_.Get(); + } + return ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(); +} +inline void DebugEvent::_internal_set_graph_id(const std::string& value) { + if (!_internal_has_graph_id()) { + clear_what(); + set_has_graph_id(); + _impl_.what_.graph_id_.InitDefault(); + } + _impl_.what_.graph_id_.Set(value, GetArenaForAllocation()); +} +inline std::string* DebugEvent::_internal_mutable_graph_id() { + if (!_internal_has_graph_id()) { + clear_what(); + set_has_graph_id(); + _impl_.what_.graph_id_.InitDefault(); + } + return _impl_.what_.graph_id_.Mutable( GetArenaForAllocation()); +} +inline std::string* DebugEvent::release_graph_id() { + // @@protoc_insertion_point(field_release:tensorflow.DebugEvent.graph_id) + if (_internal_has_graph_id()) { + clear_has_what(); + return _impl_.what_.graph_id_.Release(); + } else { + return nullptr; + } +} +inline void DebugEvent::set_allocated_graph_id(std::string* graph_id) { + if (has_what()) { + clear_what(); + } + if (graph_id != nullptr) { + set_has_graph_id(); + _impl_.what_.graph_id_.InitAllocated(graph_id, GetArenaForAllocation()); + } + // @@protoc_insertion_point(field_set_allocated:tensorflow.DebugEvent.graph_id) +} + +// .tensorflow.DebuggedDevice debugged_device = 12; +inline bool DebugEvent::_internal_has_debugged_device() const { + return what_case() == kDebuggedDevice; +} +inline bool DebugEvent::has_debugged_device() const { + return _internal_has_debugged_device(); +} +inline void DebugEvent::set_has_debugged_device() { + _impl_._oneof_case_[0] = kDebuggedDevice; +} +inline void DebugEvent::clear_debugged_device() { + if (_internal_has_debugged_device()) { + if (GetArenaForAllocation() == nullptr) { + delete _impl_.what_.debugged_device_; + } + clear_has_what(); + } +} +inline ::tensorflow::DebuggedDevice* DebugEvent::release_debugged_device() { + // @@protoc_insertion_point(field_release:tensorflow.DebugEvent.debugged_device) + if (_internal_has_debugged_device()) { + clear_has_what(); + ::tensorflow::DebuggedDevice* temp = _impl_.what_.debugged_device_; + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + _impl_.what_.debugged_device_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::tensorflow::DebuggedDevice& DebugEvent::_internal_debugged_device() const { + return _internal_has_debugged_device() + ? *_impl_.what_.debugged_device_ + : reinterpret_cast< ::tensorflow::DebuggedDevice&>(::tensorflow::_DebuggedDevice_default_instance_); +} +inline const ::tensorflow::DebuggedDevice& DebugEvent::debugged_device() const { + // @@protoc_insertion_point(field_get:tensorflow.DebugEvent.debugged_device) + return _internal_debugged_device(); +} +inline ::tensorflow::DebuggedDevice* DebugEvent::unsafe_arena_release_debugged_device() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.DebugEvent.debugged_device) + if (_internal_has_debugged_device()) { + clear_has_what(); + ::tensorflow::DebuggedDevice* temp = _impl_.what_.debugged_device_; + _impl_.what_.debugged_device_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void DebugEvent::unsafe_arena_set_allocated_debugged_device(::tensorflow::DebuggedDevice* debugged_device) { + clear_what(); + if (debugged_device) { + set_has_debugged_device(); + _impl_.what_.debugged_device_ = debugged_device; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.DebugEvent.debugged_device) +} +inline ::tensorflow::DebuggedDevice* DebugEvent::_internal_mutable_debugged_device() { + if (!_internal_has_debugged_device()) { + clear_what(); + set_has_debugged_device(); + _impl_.what_.debugged_device_ = CreateMaybeMessage< ::tensorflow::DebuggedDevice >(GetArenaForAllocation()); + } + return _impl_.what_.debugged_device_; +} +inline ::tensorflow::DebuggedDevice* DebugEvent::mutable_debugged_device() { + ::tensorflow::DebuggedDevice* _msg = _internal_mutable_debugged_device(); + // @@protoc_insertion_point(field_mutable:tensorflow.DebugEvent.debugged_device) + return _msg; +} + +inline bool DebugEvent::has_what() const { + return what_case() != WHAT_NOT_SET; +} +inline void DebugEvent::clear_has_what() { + _impl_._oneof_case_[0] = WHAT_NOT_SET; +} +inline DebugEvent::WhatCase DebugEvent::what_case() const { + return DebugEvent::WhatCase(_impl_._oneof_case_[0]); +} +// ------------------------------------------------------------------- + +// DebugMetadata + +// string tensorflow_version = 1; +inline void DebugMetadata::clear_tensorflow_version() { + _impl_.tensorflow_version_.ClearToEmpty(); +} +inline const std::string& DebugMetadata::tensorflow_version() const { + // @@protoc_insertion_point(field_get:tensorflow.DebugMetadata.tensorflow_version) + return _internal_tensorflow_version(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void DebugMetadata::set_tensorflow_version(ArgT0&& arg0, ArgT... args) { + + _impl_.tensorflow_version_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.DebugMetadata.tensorflow_version) +} +inline std::string* DebugMetadata::mutable_tensorflow_version() { + std::string* _s = _internal_mutable_tensorflow_version(); + // @@protoc_insertion_point(field_mutable:tensorflow.DebugMetadata.tensorflow_version) + return _s; +} +inline const std::string& DebugMetadata::_internal_tensorflow_version() const { + return _impl_.tensorflow_version_.Get(); +} +inline void DebugMetadata::_internal_set_tensorflow_version(const std::string& value) { + + _impl_.tensorflow_version_.Set(value, GetArenaForAllocation()); +} +inline std::string* DebugMetadata::_internal_mutable_tensorflow_version() { + + return _impl_.tensorflow_version_.Mutable(GetArenaForAllocation()); +} +inline std::string* DebugMetadata::release_tensorflow_version() { + // @@protoc_insertion_point(field_release:tensorflow.DebugMetadata.tensorflow_version) + return _impl_.tensorflow_version_.Release(); +} +inline void DebugMetadata::set_allocated_tensorflow_version(std::string* tensorflow_version) { + if (tensorflow_version != nullptr) { + + } else { + + } + _impl_.tensorflow_version_.SetAllocated(tensorflow_version, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.tensorflow_version_.IsDefault()) { + _impl_.tensorflow_version_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.DebugMetadata.tensorflow_version) +} + +// string file_version = 2; +inline void DebugMetadata::clear_file_version() { + _impl_.file_version_.ClearToEmpty(); +} +inline const std::string& DebugMetadata::file_version() const { + // @@protoc_insertion_point(field_get:tensorflow.DebugMetadata.file_version) + return _internal_file_version(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void DebugMetadata::set_file_version(ArgT0&& arg0, ArgT... args) { + + _impl_.file_version_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.DebugMetadata.file_version) +} +inline std::string* DebugMetadata::mutable_file_version() { + std::string* _s = _internal_mutable_file_version(); + // @@protoc_insertion_point(field_mutable:tensorflow.DebugMetadata.file_version) + return _s; +} +inline const std::string& DebugMetadata::_internal_file_version() const { + return _impl_.file_version_.Get(); +} +inline void DebugMetadata::_internal_set_file_version(const std::string& value) { + + _impl_.file_version_.Set(value, GetArenaForAllocation()); +} +inline std::string* DebugMetadata::_internal_mutable_file_version() { + + return _impl_.file_version_.Mutable(GetArenaForAllocation()); +} +inline std::string* DebugMetadata::release_file_version() { + // @@protoc_insertion_point(field_release:tensorflow.DebugMetadata.file_version) + return _impl_.file_version_.Release(); +} +inline void DebugMetadata::set_allocated_file_version(std::string* file_version) { + if (file_version != nullptr) { + + } else { + + } + _impl_.file_version_.SetAllocated(file_version, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.file_version_.IsDefault()) { + _impl_.file_version_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.DebugMetadata.file_version) +} + +// string tfdbg_run_id = 3; +inline void DebugMetadata::clear_tfdbg_run_id() { + _impl_.tfdbg_run_id_.ClearToEmpty(); +} +inline const std::string& DebugMetadata::tfdbg_run_id() const { + // @@protoc_insertion_point(field_get:tensorflow.DebugMetadata.tfdbg_run_id) + return _internal_tfdbg_run_id(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void DebugMetadata::set_tfdbg_run_id(ArgT0&& arg0, ArgT... args) { + + _impl_.tfdbg_run_id_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.DebugMetadata.tfdbg_run_id) +} +inline std::string* DebugMetadata::mutable_tfdbg_run_id() { + std::string* _s = _internal_mutable_tfdbg_run_id(); + // @@protoc_insertion_point(field_mutable:tensorflow.DebugMetadata.tfdbg_run_id) + return _s; +} +inline const std::string& DebugMetadata::_internal_tfdbg_run_id() const { + return _impl_.tfdbg_run_id_.Get(); +} +inline void DebugMetadata::_internal_set_tfdbg_run_id(const std::string& value) { + + _impl_.tfdbg_run_id_.Set(value, GetArenaForAllocation()); +} +inline std::string* DebugMetadata::_internal_mutable_tfdbg_run_id() { + + return _impl_.tfdbg_run_id_.Mutable(GetArenaForAllocation()); +} +inline std::string* DebugMetadata::release_tfdbg_run_id() { + // @@protoc_insertion_point(field_release:tensorflow.DebugMetadata.tfdbg_run_id) + return _impl_.tfdbg_run_id_.Release(); +} +inline void DebugMetadata::set_allocated_tfdbg_run_id(std::string* tfdbg_run_id) { + if (tfdbg_run_id != nullptr) { + + } else { + + } + _impl_.tfdbg_run_id_.SetAllocated(tfdbg_run_id, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.tfdbg_run_id_.IsDefault()) { + _impl_.tfdbg_run_id_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.DebugMetadata.tfdbg_run_id) +} + +// ------------------------------------------------------------------- + +// SourceFile + +// string file_path = 1; +inline void SourceFile::clear_file_path() { + _impl_.file_path_.ClearToEmpty(); +} +inline const std::string& SourceFile::file_path() const { + // @@protoc_insertion_point(field_get:tensorflow.SourceFile.file_path) + return _internal_file_path(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void SourceFile::set_file_path(ArgT0&& arg0, ArgT... args) { + + _impl_.file_path_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.SourceFile.file_path) +} +inline std::string* SourceFile::mutable_file_path() { + std::string* _s = _internal_mutable_file_path(); + // @@protoc_insertion_point(field_mutable:tensorflow.SourceFile.file_path) + return _s; +} +inline const std::string& SourceFile::_internal_file_path() const { + return _impl_.file_path_.Get(); +} +inline void SourceFile::_internal_set_file_path(const std::string& value) { + + _impl_.file_path_.Set(value, GetArenaForAllocation()); +} +inline std::string* SourceFile::_internal_mutable_file_path() { + + return _impl_.file_path_.Mutable(GetArenaForAllocation()); +} +inline std::string* SourceFile::release_file_path() { + // @@protoc_insertion_point(field_release:tensorflow.SourceFile.file_path) + return _impl_.file_path_.Release(); +} +inline void SourceFile::set_allocated_file_path(std::string* file_path) { + if (file_path != nullptr) { + + } else { + + } + _impl_.file_path_.SetAllocated(file_path, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.file_path_.IsDefault()) { + _impl_.file_path_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.SourceFile.file_path) +} + +// string host_name = 2; +inline void SourceFile::clear_host_name() { + _impl_.host_name_.ClearToEmpty(); +} +inline const std::string& SourceFile::host_name() const { + // @@protoc_insertion_point(field_get:tensorflow.SourceFile.host_name) + return _internal_host_name(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void SourceFile::set_host_name(ArgT0&& arg0, ArgT... args) { + + _impl_.host_name_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.SourceFile.host_name) +} +inline std::string* SourceFile::mutable_host_name() { + std::string* _s = _internal_mutable_host_name(); + // @@protoc_insertion_point(field_mutable:tensorflow.SourceFile.host_name) + return _s; +} +inline const std::string& SourceFile::_internal_host_name() const { + return _impl_.host_name_.Get(); +} +inline void SourceFile::_internal_set_host_name(const std::string& value) { + + _impl_.host_name_.Set(value, GetArenaForAllocation()); +} +inline std::string* SourceFile::_internal_mutable_host_name() { + + return _impl_.host_name_.Mutable(GetArenaForAllocation()); +} +inline std::string* SourceFile::release_host_name() { + // @@protoc_insertion_point(field_release:tensorflow.SourceFile.host_name) + return _impl_.host_name_.Release(); +} +inline void SourceFile::set_allocated_host_name(std::string* host_name) { + if (host_name != nullptr) { + + } else { + + } + _impl_.host_name_.SetAllocated(host_name, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.host_name_.IsDefault()) { + _impl_.host_name_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.SourceFile.host_name) +} + +// repeated string lines = 3; +inline int SourceFile::_internal_lines_size() const { + return _impl_.lines_.size(); +} +inline int SourceFile::lines_size() const { + return _internal_lines_size(); +} +inline void SourceFile::clear_lines() { + _impl_.lines_.Clear(); +} +inline std::string* SourceFile::add_lines() { + std::string* _s = _internal_add_lines(); + // @@protoc_insertion_point(field_add_mutable:tensorflow.SourceFile.lines) + return _s; +} +inline const std::string& SourceFile::_internal_lines(int index) const { + return _impl_.lines_.Get(index); +} +inline const std::string& SourceFile::lines(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.SourceFile.lines) + return _internal_lines(index); +} +inline std::string* SourceFile::mutable_lines(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.SourceFile.lines) + return _impl_.lines_.Mutable(index); +} +inline void SourceFile::set_lines(int index, const std::string& value) { + _impl_.lines_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set:tensorflow.SourceFile.lines) +} +inline void SourceFile::set_lines(int index, std::string&& value) { + _impl_.lines_.Mutable(index)->assign(std::move(value)); + // @@protoc_insertion_point(field_set:tensorflow.SourceFile.lines) +} +inline void SourceFile::set_lines(int index, const char* value) { + GOOGLE_DCHECK(value != nullptr); + _impl_.lines_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set_char:tensorflow.SourceFile.lines) +} +inline void SourceFile::set_lines(int index, const char* value, size_t size) { + _impl_.lines_.Mutable(index)->assign( + reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:tensorflow.SourceFile.lines) +} +inline std::string* SourceFile::_internal_add_lines() { + return _impl_.lines_.Add(); +} +inline void SourceFile::add_lines(const std::string& value) { + _impl_.lines_.Add()->assign(value); + // @@protoc_insertion_point(field_add:tensorflow.SourceFile.lines) +} +inline void SourceFile::add_lines(std::string&& value) { + _impl_.lines_.Add(std::move(value)); + // @@protoc_insertion_point(field_add:tensorflow.SourceFile.lines) +} +inline void SourceFile::add_lines(const char* value) { + GOOGLE_DCHECK(value != nullptr); + _impl_.lines_.Add()->assign(value); + // @@protoc_insertion_point(field_add_char:tensorflow.SourceFile.lines) +} +inline void SourceFile::add_lines(const char* value, size_t size) { + _impl_.lines_.Add()->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_add_pointer:tensorflow.SourceFile.lines) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& +SourceFile::lines() const { + // @@protoc_insertion_point(field_list:tensorflow.SourceFile.lines) + return _impl_.lines_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* +SourceFile::mutable_lines() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.SourceFile.lines) + return &_impl_.lines_; +} + +// ------------------------------------------------------------------- + +// StackFrameWithId + +// string id = 1; +inline void StackFrameWithId::clear_id() { + _impl_.id_.ClearToEmpty(); +} +inline const std::string& StackFrameWithId::id() const { + // @@protoc_insertion_point(field_get:tensorflow.StackFrameWithId.id) + return _internal_id(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void StackFrameWithId::set_id(ArgT0&& arg0, ArgT... args) { + + _impl_.id_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.StackFrameWithId.id) +} +inline std::string* StackFrameWithId::mutable_id() { + std::string* _s = _internal_mutable_id(); + // @@protoc_insertion_point(field_mutable:tensorflow.StackFrameWithId.id) + return _s; +} +inline const std::string& StackFrameWithId::_internal_id() const { + return _impl_.id_.Get(); +} +inline void StackFrameWithId::_internal_set_id(const std::string& value) { + + _impl_.id_.Set(value, GetArenaForAllocation()); +} +inline std::string* StackFrameWithId::_internal_mutable_id() { + + return _impl_.id_.Mutable(GetArenaForAllocation()); +} +inline std::string* StackFrameWithId::release_id() { + // @@protoc_insertion_point(field_release:tensorflow.StackFrameWithId.id) + return _impl_.id_.Release(); +} +inline void StackFrameWithId::set_allocated_id(std::string* id) { + if (id != nullptr) { + + } else { + + } + _impl_.id_.SetAllocated(id, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.id_.IsDefault()) { + _impl_.id_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.StackFrameWithId.id) +} + +// .tensorflow.GraphDebugInfo.FileLineCol file_line_col = 2; +inline bool StackFrameWithId::_internal_has_file_line_col() const { + return this != internal_default_instance() && _impl_.file_line_col_ != nullptr; +} +inline bool StackFrameWithId::has_file_line_col() const { + return _internal_has_file_line_col(); +} +inline const ::tensorflow::GraphDebugInfo_FileLineCol& StackFrameWithId::_internal_file_line_col() const { + const ::tensorflow::GraphDebugInfo_FileLineCol* p = _impl_.file_line_col_; + return p != nullptr ? *p : reinterpret_cast( + ::tensorflow::_GraphDebugInfo_FileLineCol_default_instance_); +} +inline const ::tensorflow::GraphDebugInfo_FileLineCol& StackFrameWithId::file_line_col() const { + // @@protoc_insertion_point(field_get:tensorflow.StackFrameWithId.file_line_col) + return _internal_file_line_col(); +} +inline void StackFrameWithId::unsafe_arena_set_allocated_file_line_col( + ::tensorflow::GraphDebugInfo_FileLineCol* file_line_col) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.file_line_col_); + } + _impl_.file_line_col_ = file_line_col; + if (file_line_col) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.StackFrameWithId.file_line_col) +} +inline ::tensorflow::GraphDebugInfo_FileLineCol* StackFrameWithId::release_file_line_col() { + + ::tensorflow::GraphDebugInfo_FileLineCol* temp = _impl_.file_line_col_; + _impl_.file_line_col_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tensorflow::GraphDebugInfo_FileLineCol* StackFrameWithId::unsafe_arena_release_file_line_col() { + // @@protoc_insertion_point(field_release:tensorflow.StackFrameWithId.file_line_col) + + ::tensorflow::GraphDebugInfo_FileLineCol* temp = _impl_.file_line_col_; + _impl_.file_line_col_ = nullptr; + return temp; +} +inline ::tensorflow::GraphDebugInfo_FileLineCol* StackFrameWithId::_internal_mutable_file_line_col() { + + if (_impl_.file_line_col_ == nullptr) { + auto* p = CreateMaybeMessage<::tensorflow::GraphDebugInfo_FileLineCol>(GetArenaForAllocation()); + _impl_.file_line_col_ = p; + } + return _impl_.file_line_col_; +} +inline ::tensorflow::GraphDebugInfo_FileLineCol* StackFrameWithId::mutable_file_line_col() { + ::tensorflow::GraphDebugInfo_FileLineCol* _msg = _internal_mutable_file_line_col(); + // @@protoc_insertion_point(field_mutable:tensorflow.StackFrameWithId.file_line_col) + return _msg; +} +inline void StackFrameWithId::set_allocated_file_line_col(::tensorflow::GraphDebugInfo_FileLineCol* file_line_col) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.file_line_col_); + } + if (file_line_col) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( + reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(file_line_col)); + if (message_arena != submessage_arena) { + file_line_col = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, file_line_col, submessage_arena); + } + + } else { + + } + _impl_.file_line_col_ = file_line_col; + // @@protoc_insertion_point(field_set_allocated:tensorflow.StackFrameWithId.file_line_col) +} + +// ------------------------------------------------------------------- + +// CodeLocation + +// string host_name = 1; +inline void CodeLocation::clear_host_name() { + _impl_.host_name_.ClearToEmpty(); +} +inline const std::string& CodeLocation::host_name() const { + // @@protoc_insertion_point(field_get:tensorflow.CodeLocation.host_name) + return _internal_host_name(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void CodeLocation::set_host_name(ArgT0&& arg0, ArgT... args) { + + _impl_.host_name_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.CodeLocation.host_name) +} +inline std::string* CodeLocation::mutable_host_name() { + std::string* _s = _internal_mutable_host_name(); + // @@protoc_insertion_point(field_mutable:tensorflow.CodeLocation.host_name) + return _s; +} +inline const std::string& CodeLocation::_internal_host_name() const { + return _impl_.host_name_.Get(); +} +inline void CodeLocation::_internal_set_host_name(const std::string& value) { + + _impl_.host_name_.Set(value, GetArenaForAllocation()); +} +inline std::string* CodeLocation::_internal_mutable_host_name() { + + return _impl_.host_name_.Mutable(GetArenaForAllocation()); +} +inline std::string* CodeLocation::release_host_name() { + // @@protoc_insertion_point(field_release:tensorflow.CodeLocation.host_name) + return _impl_.host_name_.Release(); +} +inline void CodeLocation::set_allocated_host_name(std::string* host_name) { + if (host_name != nullptr) { + + } else { + + } + _impl_.host_name_.SetAllocated(host_name, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.host_name_.IsDefault()) { + _impl_.host_name_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.CodeLocation.host_name) +} + +// repeated string stack_frame_ids = 2; +inline int CodeLocation::_internal_stack_frame_ids_size() const { + return _impl_.stack_frame_ids_.size(); +} +inline int CodeLocation::stack_frame_ids_size() const { + return _internal_stack_frame_ids_size(); +} +inline void CodeLocation::clear_stack_frame_ids() { + _impl_.stack_frame_ids_.Clear(); +} +inline std::string* CodeLocation::add_stack_frame_ids() { + std::string* _s = _internal_add_stack_frame_ids(); + // @@protoc_insertion_point(field_add_mutable:tensorflow.CodeLocation.stack_frame_ids) + return _s; +} +inline const std::string& CodeLocation::_internal_stack_frame_ids(int index) const { + return _impl_.stack_frame_ids_.Get(index); +} +inline const std::string& CodeLocation::stack_frame_ids(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.CodeLocation.stack_frame_ids) + return _internal_stack_frame_ids(index); +} +inline std::string* CodeLocation::mutable_stack_frame_ids(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.CodeLocation.stack_frame_ids) + return _impl_.stack_frame_ids_.Mutable(index); +} +inline void CodeLocation::set_stack_frame_ids(int index, const std::string& value) { + _impl_.stack_frame_ids_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set:tensorflow.CodeLocation.stack_frame_ids) +} +inline void CodeLocation::set_stack_frame_ids(int index, std::string&& value) { + _impl_.stack_frame_ids_.Mutable(index)->assign(std::move(value)); + // @@protoc_insertion_point(field_set:tensorflow.CodeLocation.stack_frame_ids) +} +inline void CodeLocation::set_stack_frame_ids(int index, const char* value) { + GOOGLE_DCHECK(value != nullptr); + _impl_.stack_frame_ids_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set_char:tensorflow.CodeLocation.stack_frame_ids) +} +inline void CodeLocation::set_stack_frame_ids(int index, const char* value, size_t size) { + _impl_.stack_frame_ids_.Mutable(index)->assign( + reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:tensorflow.CodeLocation.stack_frame_ids) +} +inline std::string* CodeLocation::_internal_add_stack_frame_ids() { + return _impl_.stack_frame_ids_.Add(); +} +inline void CodeLocation::add_stack_frame_ids(const std::string& value) { + _impl_.stack_frame_ids_.Add()->assign(value); + // @@protoc_insertion_point(field_add:tensorflow.CodeLocation.stack_frame_ids) +} +inline void CodeLocation::add_stack_frame_ids(std::string&& value) { + _impl_.stack_frame_ids_.Add(std::move(value)); + // @@protoc_insertion_point(field_add:tensorflow.CodeLocation.stack_frame_ids) +} +inline void CodeLocation::add_stack_frame_ids(const char* value) { + GOOGLE_DCHECK(value != nullptr); + _impl_.stack_frame_ids_.Add()->assign(value); + // @@protoc_insertion_point(field_add_char:tensorflow.CodeLocation.stack_frame_ids) +} +inline void CodeLocation::add_stack_frame_ids(const char* value, size_t size) { + _impl_.stack_frame_ids_.Add()->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_add_pointer:tensorflow.CodeLocation.stack_frame_ids) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& +CodeLocation::stack_frame_ids() const { + // @@protoc_insertion_point(field_list:tensorflow.CodeLocation.stack_frame_ids) + return _impl_.stack_frame_ids_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* +CodeLocation::mutable_stack_frame_ids() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.CodeLocation.stack_frame_ids) + return &_impl_.stack_frame_ids_; +} + +// ------------------------------------------------------------------- + +// GraphOpCreation + +// string op_type = 1; +inline void GraphOpCreation::clear_op_type() { + _impl_.op_type_.ClearToEmpty(); +} +inline const std::string& GraphOpCreation::op_type() const { + // @@protoc_insertion_point(field_get:tensorflow.GraphOpCreation.op_type) + return _internal_op_type(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void GraphOpCreation::set_op_type(ArgT0&& arg0, ArgT... args) { + + _impl_.op_type_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.GraphOpCreation.op_type) +} +inline std::string* GraphOpCreation::mutable_op_type() { + std::string* _s = _internal_mutable_op_type(); + // @@protoc_insertion_point(field_mutable:tensorflow.GraphOpCreation.op_type) + return _s; +} +inline const std::string& GraphOpCreation::_internal_op_type() const { + return _impl_.op_type_.Get(); +} +inline void GraphOpCreation::_internal_set_op_type(const std::string& value) { + + _impl_.op_type_.Set(value, GetArenaForAllocation()); +} +inline std::string* GraphOpCreation::_internal_mutable_op_type() { + + return _impl_.op_type_.Mutable(GetArenaForAllocation()); +} +inline std::string* GraphOpCreation::release_op_type() { + // @@protoc_insertion_point(field_release:tensorflow.GraphOpCreation.op_type) + return _impl_.op_type_.Release(); +} +inline void GraphOpCreation::set_allocated_op_type(std::string* op_type) { + if (op_type != nullptr) { + + } else { + + } + _impl_.op_type_.SetAllocated(op_type, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.op_type_.IsDefault()) { + _impl_.op_type_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.GraphOpCreation.op_type) +} + +// string op_name = 2; +inline void GraphOpCreation::clear_op_name() { + _impl_.op_name_.ClearToEmpty(); +} +inline const std::string& GraphOpCreation::op_name() const { + // @@protoc_insertion_point(field_get:tensorflow.GraphOpCreation.op_name) + return _internal_op_name(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void GraphOpCreation::set_op_name(ArgT0&& arg0, ArgT... args) { + + _impl_.op_name_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.GraphOpCreation.op_name) +} +inline std::string* GraphOpCreation::mutable_op_name() { + std::string* _s = _internal_mutable_op_name(); + // @@protoc_insertion_point(field_mutable:tensorflow.GraphOpCreation.op_name) + return _s; +} +inline const std::string& GraphOpCreation::_internal_op_name() const { + return _impl_.op_name_.Get(); +} +inline void GraphOpCreation::_internal_set_op_name(const std::string& value) { + + _impl_.op_name_.Set(value, GetArenaForAllocation()); +} +inline std::string* GraphOpCreation::_internal_mutable_op_name() { + + return _impl_.op_name_.Mutable(GetArenaForAllocation()); +} +inline std::string* GraphOpCreation::release_op_name() { + // @@protoc_insertion_point(field_release:tensorflow.GraphOpCreation.op_name) + return _impl_.op_name_.Release(); +} +inline void GraphOpCreation::set_allocated_op_name(std::string* op_name) { + if (op_name != nullptr) { + + } else { + + } + _impl_.op_name_.SetAllocated(op_name, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.op_name_.IsDefault()) { + _impl_.op_name_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.GraphOpCreation.op_name) +} + +// string graph_name = 3; +inline void GraphOpCreation::clear_graph_name() { + _impl_.graph_name_.ClearToEmpty(); +} +inline const std::string& GraphOpCreation::graph_name() const { + // @@protoc_insertion_point(field_get:tensorflow.GraphOpCreation.graph_name) + return _internal_graph_name(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void GraphOpCreation::set_graph_name(ArgT0&& arg0, ArgT... args) { + + _impl_.graph_name_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.GraphOpCreation.graph_name) +} +inline std::string* GraphOpCreation::mutable_graph_name() { + std::string* _s = _internal_mutable_graph_name(); + // @@protoc_insertion_point(field_mutable:tensorflow.GraphOpCreation.graph_name) + return _s; +} +inline const std::string& GraphOpCreation::_internal_graph_name() const { + return _impl_.graph_name_.Get(); +} +inline void GraphOpCreation::_internal_set_graph_name(const std::string& value) { + + _impl_.graph_name_.Set(value, GetArenaForAllocation()); +} +inline std::string* GraphOpCreation::_internal_mutable_graph_name() { + + return _impl_.graph_name_.Mutable(GetArenaForAllocation()); +} +inline std::string* GraphOpCreation::release_graph_name() { + // @@protoc_insertion_point(field_release:tensorflow.GraphOpCreation.graph_name) + return _impl_.graph_name_.Release(); +} +inline void GraphOpCreation::set_allocated_graph_name(std::string* graph_name) { + if (graph_name != nullptr) { + + } else { + + } + _impl_.graph_name_.SetAllocated(graph_name, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.graph_name_.IsDefault()) { + _impl_.graph_name_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.GraphOpCreation.graph_name) +} + +// string graph_id = 4; +inline void GraphOpCreation::clear_graph_id() { + _impl_.graph_id_.ClearToEmpty(); +} +inline const std::string& GraphOpCreation::graph_id() const { + // @@protoc_insertion_point(field_get:tensorflow.GraphOpCreation.graph_id) + return _internal_graph_id(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void GraphOpCreation::set_graph_id(ArgT0&& arg0, ArgT... args) { + + _impl_.graph_id_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.GraphOpCreation.graph_id) +} +inline std::string* GraphOpCreation::mutable_graph_id() { + std::string* _s = _internal_mutable_graph_id(); + // @@protoc_insertion_point(field_mutable:tensorflow.GraphOpCreation.graph_id) + return _s; +} +inline const std::string& GraphOpCreation::_internal_graph_id() const { + return _impl_.graph_id_.Get(); +} +inline void GraphOpCreation::_internal_set_graph_id(const std::string& value) { + + _impl_.graph_id_.Set(value, GetArenaForAllocation()); +} +inline std::string* GraphOpCreation::_internal_mutable_graph_id() { + + return _impl_.graph_id_.Mutable(GetArenaForAllocation()); +} +inline std::string* GraphOpCreation::release_graph_id() { + // @@protoc_insertion_point(field_release:tensorflow.GraphOpCreation.graph_id) + return _impl_.graph_id_.Release(); +} +inline void GraphOpCreation::set_allocated_graph_id(std::string* graph_id) { + if (graph_id != nullptr) { + + } else { + + } + _impl_.graph_id_.SetAllocated(graph_id, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.graph_id_.IsDefault()) { + _impl_.graph_id_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.GraphOpCreation.graph_id) +} + +// string device_name = 5; +inline void GraphOpCreation::clear_device_name() { + _impl_.device_name_.ClearToEmpty(); +} +inline const std::string& GraphOpCreation::device_name() const { + // @@protoc_insertion_point(field_get:tensorflow.GraphOpCreation.device_name) + return _internal_device_name(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void GraphOpCreation::set_device_name(ArgT0&& arg0, ArgT... args) { + + _impl_.device_name_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.GraphOpCreation.device_name) +} +inline std::string* GraphOpCreation::mutable_device_name() { + std::string* _s = _internal_mutable_device_name(); + // @@protoc_insertion_point(field_mutable:tensorflow.GraphOpCreation.device_name) + return _s; +} +inline const std::string& GraphOpCreation::_internal_device_name() const { + return _impl_.device_name_.Get(); +} +inline void GraphOpCreation::_internal_set_device_name(const std::string& value) { + + _impl_.device_name_.Set(value, GetArenaForAllocation()); +} +inline std::string* GraphOpCreation::_internal_mutable_device_name() { + + return _impl_.device_name_.Mutable(GetArenaForAllocation()); +} +inline std::string* GraphOpCreation::release_device_name() { + // @@protoc_insertion_point(field_release:tensorflow.GraphOpCreation.device_name) + return _impl_.device_name_.Release(); +} +inline void GraphOpCreation::set_allocated_device_name(std::string* device_name) { + if (device_name != nullptr) { + + } else { + + } + _impl_.device_name_.SetAllocated(device_name, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.device_name_.IsDefault()) { + _impl_.device_name_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.GraphOpCreation.device_name) +} + +// repeated string input_names = 6; +inline int GraphOpCreation::_internal_input_names_size() const { + return _impl_.input_names_.size(); +} +inline int GraphOpCreation::input_names_size() const { + return _internal_input_names_size(); +} +inline void GraphOpCreation::clear_input_names() { + _impl_.input_names_.Clear(); +} +inline std::string* GraphOpCreation::add_input_names() { + std::string* _s = _internal_add_input_names(); + // @@protoc_insertion_point(field_add_mutable:tensorflow.GraphOpCreation.input_names) + return _s; +} +inline const std::string& GraphOpCreation::_internal_input_names(int index) const { + return _impl_.input_names_.Get(index); +} +inline const std::string& GraphOpCreation::input_names(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.GraphOpCreation.input_names) + return _internal_input_names(index); +} +inline std::string* GraphOpCreation::mutable_input_names(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.GraphOpCreation.input_names) + return _impl_.input_names_.Mutable(index); +} +inline void GraphOpCreation::set_input_names(int index, const std::string& value) { + _impl_.input_names_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set:tensorflow.GraphOpCreation.input_names) +} +inline void GraphOpCreation::set_input_names(int index, std::string&& value) { + _impl_.input_names_.Mutable(index)->assign(std::move(value)); + // @@protoc_insertion_point(field_set:tensorflow.GraphOpCreation.input_names) +} +inline void GraphOpCreation::set_input_names(int index, const char* value) { + GOOGLE_DCHECK(value != nullptr); + _impl_.input_names_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set_char:tensorflow.GraphOpCreation.input_names) +} +inline void GraphOpCreation::set_input_names(int index, const char* value, size_t size) { + _impl_.input_names_.Mutable(index)->assign( + reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:tensorflow.GraphOpCreation.input_names) +} +inline std::string* GraphOpCreation::_internal_add_input_names() { + return _impl_.input_names_.Add(); +} +inline void GraphOpCreation::add_input_names(const std::string& value) { + _impl_.input_names_.Add()->assign(value); + // @@protoc_insertion_point(field_add:tensorflow.GraphOpCreation.input_names) +} +inline void GraphOpCreation::add_input_names(std::string&& value) { + _impl_.input_names_.Add(std::move(value)); + // @@protoc_insertion_point(field_add:tensorflow.GraphOpCreation.input_names) +} +inline void GraphOpCreation::add_input_names(const char* value) { + GOOGLE_DCHECK(value != nullptr); + _impl_.input_names_.Add()->assign(value); + // @@protoc_insertion_point(field_add_char:tensorflow.GraphOpCreation.input_names) +} +inline void GraphOpCreation::add_input_names(const char* value, size_t size) { + _impl_.input_names_.Add()->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_add_pointer:tensorflow.GraphOpCreation.input_names) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& +GraphOpCreation::input_names() const { + // @@protoc_insertion_point(field_list:tensorflow.GraphOpCreation.input_names) + return _impl_.input_names_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* +GraphOpCreation::mutable_input_names() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.GraphOpCreation.input_names) + return &_impl_.input_names_; +} + +// int32 num_outputs = 7; +inline void GraphOpCreation::clear_num_outputs() { + _impl_.num_outputs_ = 0; +} +inline int32_t GraphOpCreation::_internal_num_outputs() const { + return _impl_.num_outputs_; +} +inline int32_t GraphOpCreation::num_outputs() const { + // @@protoc_insertion_point(field_get:tensorflow.GraphOpCreation.num_outputs) + return _internal_num_outputs(); +} +inline void GraphOpCreation::_internal_set_num_outputs(int32_t value) { + + _impl_.num_outputs_ = value; +} +inline void GraphOpCreation::set_num_outputs(int32_t value) { + _internal_set_num_outputs(value); + // @@protoc_insertion_point(field_set:tensorflow.GraphOpCreation.num_outputs) +} + +// .tensorflow.CodeLocation code_location = 8; +inline bool GraphOpCreation::_internal_has_code_location() const { + return this != internal_default_instance() && _impl_.code_location_ != nullptr; +} +inline bool GraphOpCreation::has_code_location() const { + return _internal_has_code_location(); +} +inline void GraphOpCreation::clear_code_location() { + if (GetArenaForAllocation() == nullptr && _impl_.code_location_ != nullptr) { + delete _impl_.code_location_; + } + _impl_.code_location_ = nullptr; +} +inline const ::tensorflow::CodeLocation& GraphOpCreation::_internal_code_location() const { + const ::tensorflow::CodeLocation* p = _impl_.code_location_; + return p != nullptr ? *p : reinterpret_cast( + ::tensorflow::_CodeLocation_default_instance_); +} +inline const ::tensorflow::CodeLocation& GraphOpCreation::code_location() const { + // @@protoc_insertion_point(field_get:tensorflow.GraphOpCreation.code_location) + return _internal_code_location(); +} +inline void GraphOpCreation::unsafe_arena_set_allocated_code_location( + ::tensorflow::CodeLocation* code_location) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.code_location_); + } + _impl_.code_location_ = code_location; + if (code_location) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.GraphOpCreation.code_location) +} +inline ::tensorflow::CodeLocation* GraphOpCreation::release_code_location() { + + ::tensorflow::CodeLocation* temp = _impl_.code_location_; + _impl_.code_location_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tensorflow::CodeLocation* GraphOpCreation::unsafe_arena_release_code_location() { + // @@protoc_insertion_point(field_release:tensorflow.GraphOpCreation.code_location) + + ::tensorflow::CodeLocation* temp = _impl_.code_location_; + _impl_.code_location_ = nullptr; + return temp; +} +inline ::tensorflow::CodeLocation* GraphOpCreation::_internal_mutable_code_location() { + + if (_impl_.code_location_ == nullptr) { + auto* p = CreateMaybeMessage<::tensorflow::CodeLocation>(GetArenaForAllocation()); + _impl_.code_location_ = p; + } + return _impl_.code_location_; +} +inline ::tensorflow::CodeLocation* GraphOpCreation::mutable_code_location() { + ::tensorflow::CodeLocation* _msg = _internal_mutable_code_location(); + // @@protoc_insertion_point(field_mutable:tensorflow.GraphOpCreation.code_location) + return _msg; +} +inline void GraphOpCreation::set_allocated_code_location(::tensorflow::CodeLocation* code_location) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete _impl_.code_location_; + } + if (code_location) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(code_location); + if (message_arena != submessage_arena) { + code_location = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, code_location, submessage_arena); + } + + } else { + + } + _impl_.code_location_ = code_location; + // @@protoc_insertion_point(field_set_allocated:tensorflow.GraphOpCreation.code_location) +} + +// repeated int32 output_tensor_ids = 9; +inline int GraphOpCreation::_internal_output_tensor_ids_size() const { + return _impl_.output_tensor_ids_.size(); +} +inline int GraphOpCreation::output_tensor_ids_size() const { + return _internal_output_tensor_ids_size(); +} +inline void GraphOpCreation::clear_output_tensor_ids() { + _impl_.output_tensor_ids_.Clear(); +} +inline int32_t GraphOpCreation::_internal_output_tensor_ids(int index) const { + return _impl_.output_tensor_ids_.Get(index); +} +inline int32_t GraphOpCreation::output_tensor_ids(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.GraphOpCreation.output_tensor_ids) + return _internal_output_tensor_ids(index); +} +inline void GraphOpCreation::set_output_tensor_ids(int index, int32_t value) { + _impl_.output_tensor_ids_.Set(index, value); + // @@protoc_insertion_point(field_set:tensorflow.GraphOpCreation.output_tensor_ids) +} +inline void GraphOpCreation::_internal_add_output_tensor_ids(int32_t value) { + _impl_.output_tensor_ids_.Add(value); +} +inline void GraphOpCreation::add_output_tensor_ids(int32_t value) { + _internal_add_output_tensor_ids(value); + // @@protoc_insertion_point(field_add:tensorflow.GraphOpCreation.output_tensor_ids) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >& +GraphOpCreation::_internal_output_tensor_ids() const { + return _impl_.output_tensor_ids_; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >& +GraphOpCreation::output_tensor_ids() const { + // @@protoc_insertion_point(field_list:tensorflow.GraphOpCreation.output_tensor_ids) + return _internal_output_tensor_ids(); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >* +GraphOpCreation::_internal_mutable_output_tensor_ids() { + return &_impl_.output_tensor_ids_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >* +GraphOpCreation::mutable_output_tensor_ids() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.GraphOpCreation.output_tensor_ids) + return _internal_mutable_output_tensor_ids(); +} + +// ------------------------------------------------------------------- + +// DebuggedGraph + +// string graph_id = 1; +inline void DebuggedGraph::clear_graph_id() { + _impl_.graph_id_.ClearToEmpty(); +} +inline const std::string& DebuggedGraph::graph_id() const { + // @@protoc_insertion_point(field_get:tensorflow.DebuggedGraph.graph_id) + return _internal_graph_id(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void DebuggedGraph::set_graph_id(ArgT0&& arg0, ArgT... args) { + + _impl_.graph_id_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.DebuggedGraph.graph_id) +} +inline std::string* DebuggedGraph::mutable_graph_id() { + std::string* _s = _internal_mutable_graph_id(); + // @@protoc_insertion_point(field_mutable:tensorflow.DebuggedGraph.graph_id) + return _s; +} +inline const std::string& DebuggedGraph::_internal_graph_id() const { + return _impl_.graph_id_.Get(); +} +inline void DebuggedGraph::_internal_set_graph_id(const std::string& value) { + + _impl_.graph_id_.Set(value, GetArenaForAllocation()); +} +inline std::string* DebuggedGraph::_internal_mutable_graph_id() { + + return _impl_.graph_id_.Mutable(GetArenaForAllocation()); +} +inline std::string* DebuggedGraph::release_graph_id() { + // @@protoc_insertion_point(field_release:tensorflow.DebuggedGraph.graph_id) + return _impl_.graph_id_.Release(); +} +inline void DebuggedGraph::set_allocated_graph_id(std::string* graph_id) { + if (graph_id != nullptr) { + + } else { + + } + _impl_.graph_id_.SetAllocated(graph_id, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.graph_id_.IsDefault()) { + _impl_.graph_id_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.DebuggedGraph.graph_id) +} + +// string graph_name = 2; +inline void DebuggedGraph::clear_graph_name() { + _impl_.graph_name_.ClearToEmpty(); +} +inline const std::string& DebuggedGraph::graph_name() const { + // @@protoc_insertion_point(field_get:tensorflow.DebuggedGraph.graph_name) + return _internal_graph_name(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void DebuggedGraph::set_graph_name(ArgT0&& arg0, ArgT... args) { + + _impl_.graph_name_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.DebuggedGraph.graph_name) +} +inline std::string* DebuggedGraph::mutable_graph_name() { + std::string* _s = _internal_mutable_graph_name(); + // @@protoc_insertion_point(field_mutable:tensorflow.DebuggedGraph.graph_name) + return _s; +} +inline const std::string& DebuggedGraph::_internal_graph_name() const { + return _impl_.graph_name_.Get(); +} +inline void DebuggedGraph::_internal_set_graph_name(const std::string& value) { + + _impl_.graph_name_.Set(value, GetArenaForAllocation()); +} +inline std::string* DebuggedGraph::_internal_mutable_graph_name() { + + return _impl_.graph_name_.Mutable(GetArenaForAllocation()); +} +inline std::string* DebuggedGraph::release_graph_name() { + // @@protoc_insertion_point(field_release:tensorflow.DebuggedGraph.graph_name) + return _impl_.graph_name_.Release(); +} +inline void DebuggedGraph::set_allocated_graph_name(std::string* graph_name) { + if (graph_name != nullptr) { + + } else { + + } + _impl_.graph_name_.SetAllocated(graph_name, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.graph_name_.IsDefault()) { + _impl_.graph_name_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.DebuggedGraph.graph_name) +} + +// repeated string instrumented_ops = 3; +inline int DebuggedGraph::_internal_instrumented_ops_size() const { + return _impl_.instrumented_ops_.size(); +} +inline int DebuggedGraph::instrumented_ops_size() const { + return _internal_instrumented_ops_size(); +} +inline void DebuggedGraph::clear_instrumented_ops() { + _impl_.instrumented_ops_.Clear(); +} +inline std::string* DebuggedGraph::add_instrumented_ops() { + std::string* _s = _internal_add_instrumented_ops(); + // @@protoc_insertion_point(field_add_mutable:tensorflow.DebuggedGraph.instrumented_ops) + return _s; +} +inline const std::string& DebuggedGraph::_internal_instrumented_ops(int index) const { + return _impl_.instrumented_ops_.Get(index); +} +inline const std::string& DebuggedGraph::instrumented_ops(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.DebuggedGraph.instrumented_ops) + return _internal_instrumented_ops(index); +} +inline std::string* DebuggedGraph::mutable_instrumented_ops(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.DebuggedGraph.instrumented_ops) + return _impl_.instrumented_ops_.Mutable(index); +} +inline void DebuggedGraph::set_instrumented_ops(int index, const std::string& value) { + _impl_.instrumented_ops_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set:tensorflow.DebuggedGraph.instrumented_ops) +} +inline void DebuggedGraph::set_instrumented_ops(int index, std::string&& value) { + _impl_.instrumented_ops_.Mutable(index)->assign(std::move(value)); + // @@protoc_insertion_point(field_set:tensorflow.DebuggedGraph.instrumented_ops) +} +inline void DebuggedGraph::set_instrumented_ops(int index, const char* value) { + GOOGLE_DCHECK(value != nullptr); + _impl_.instrumented_ops_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set_char:tensorflow.DebuggedGraph.instrumented_ops) +} +inline void DebuggedGraph::set_instrumented_ops(int index, const char* value, size_t size) { + _impl_.instrumented_ops_.Mutable(index)->assign( + reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:tensorflow.DebuggedGraph.instrumented_ops) +} +inline std::string* DebuggedGraph::_internal_add_instrumented_ops() { + return _impl_.instrumented_ops_.Add(); +} +inline void DebuggedGraph::add_instrumented_ops(const std::string& value) { + _impl_.instrumented_ops_.Add()->assign(value); + // @@protoc_insertion_point(field_add:tensorflow.DebuggedGraph.instrumented_ops) +} +inline void DebuggedGraph::add_instrumented_ops(std::string&& value) { + _impl_.instrumented_ops_.Add(std::move(value)); + // @@protoc_insertion_point(field_add:tensorflow.DebuggedGraph.instrumented_ops) +} +inline void DebuggedGraph::add_instrumented_ops(const char* value) { + GOOGLE_DCHECK(value != nullptr); + _impl_.instrumented_ops_.Add()->assign(value); + // @@protoc_insertion_point(field_add_char:tensorflow.DebuggedGraph.instrumented_ops) +} +inline void DebuggedGraph::add_instrumented_ops(const char* value, size_t size) { + _impl_.instrumented_ops_.Add()->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_add_pointer:tensorflow.DebuggedGraph.instrumented_ops) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& +DebuggedGraph::instrumented_ops() const { + // @@protoc_insertion_point(field_list:tensorflow.DebuggedGraph.instrumented_ops) + return _impl_.instrumented_ops_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* +DebuggedGraph::mutable_instrumented_ops() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.DebuggedGraph.instrumented_ops) + return &_impl_.instrumented_ops_; +} + +// bytes original_graph_def = 4; +inline void DebuggedGraph::clear_original_graph_def() { + _impl_.original_graph_def_.ClearToEmpty(); +} +inline const std::string& DebuggedGraph::original_graph_def() const { + // @@protoc_insertion_point(field_get:tensorflow.DebuggedGraph.original_graph_def) + return _internal_original_graph_def(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void DebuggedGraph::set_original_graph_def(ArgT0&& arg0, ArgT... args) { + + _impl_.original_graph_def_.SetBytes(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.DebuggedGraph.original_graph_def) +} +inline std::string* DebuggedGraph::mutable_original_graph_def() { + std::string* _s = _internal_mutable_original_graph_def(); + // @@protoc_insertion_point(field_mutable:tensorflow.DebuggedGraph.original_graph_def) + return _s; +} +inline const std::string& DebuggedGraph::_internal_original_graph_def() const { + return _impl_.original_graph_def_.Get(); +} +inline void DebuggedGraph::_internal_set_original_graph_def(const std::string& value) { + + _impl_.original_graph_def_.Set(value, GetArenaForAllocation()); +} +inline std::string* DebuggedGraph::_internal_mutable_original_graph_def() { + + return _impl_.original_graph_def_.Mutable(GetArenaForAllocation()); +} +inline std::string* DebuggedGraph::release_original_graph_def() { + // @@protoc_insertion_point(field_release:tensorflow.DebuggedGraph.original_graph_def) + return _impl_.original_graph_def_.Release(); +} +inline void DebuggedGraph::set_allocated_original_graph_def(std::string* original_graph_def) { + if (original_graph_def != nullptr) { + + } else { + + } + _impl_.original_graph_def_.SetAllocated(original_graph_def, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.original_graph_def_.IsDefault()) { + _impl_.original_graph_def_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.DebuggedGraph.original_graph_def) +} + +// bytes instrumented_graph_def = 5; +inline void DebuggedGraph::clear_instrumented_graph_def() { + _impl_.instrumented_graph_def_.ClearToEmpty(); +} +inline const std::string& DebuggedGraph::instrumented_graph_def() const { + // @@protoc_insertion_point(field_get:tensorflow.DebuggedGraph.instrumented_graph_def) + return _internal_instrumented_graph_def(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void DebuggedGraph::set_instrumented_graph_def(ArgT0&& arg0, ArgT... args) { + + _impl_.instrumented_graph_def_.SetBytes(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.DebuggedGraph.instrumented_graph_def) +} +inline std::string* DebuggedGraph::mutable_instrumented_graph_def() { + std::string* _s = _internal_mutable_instrumented_graph_def(); + // @@protoc_insertion_point(field_mutable:tensorflow.DebuggedGraph.instrumented_graph_def) + return _s; +} +inline const std::string& DebuggedGraph::_internal_instrumented_graph_def() const { + return _impl_.instrumented_graph_def_.Get(); +} +inline void DebuggedGraph::_internal_set_instrumented_graph_def(const std::string& value) { + + _impl_.instrumented_graph_def_.Set(value, GetArenaForAllocation()); +} +inline std::string* DebuggedGraph::_internal_mutable_instrumented_graph_def() { + + return _impl_.instrumented_graph_def_.Mutable(GetArenaForAllocation()); +} +inline std::string* DebuggedGraph::release_instrumented_graph_def() { + // @@protoc_insertion_point(field_release:tensorflow.DebuggedGraph.instrumented_graph_def) + return _impl_.instrumented_graph_def_.Release(); +} +inline void DebuggedGraph::set_allocated_instrumented_graph_def(std::string* instrumented_graph_def) { + if (instrumented_graph_def != nullptr) { + + } else { + + } + _impl_.instrumented_graph_def_.SetAllocated(instrumented_graph_def, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.instrumented_graph_def_.IsDefault()) { + _impl_.instrumented_graph_def_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.DebuggedGraph.instrumented_graph_def) +} + +// string outer_context_id = 6; +inline void DebuggedGraph::clear_outer_context_id() { + _impl_.outer_context_id_.ClearToEmpty(); +} +inline const std::string& DebuggedGraph::outer_context_id() const { + // @@protoc_insertion_point(field_get:tensorflow.DebuggedGraph.outer_context_id) + return _internal_outer_context_id(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void DebuggedGraph::set_outer_context_id(ArgT0&& arg0, ArgT... args) { + + _impl_.outer_context_id_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.DebuggedGraph.outer_context_id) +} +inline std::string* DebuggedGraph::mutable_outer_context_id() { + std::string* _s = _internal_mutable_outer_context_id(); + // @@protoc_insertion_point(field_mutable:tensorflow.DebuggedGraph.outer_context_id) + return _s; +} +inline const std::string& DebuggedGraph::_internal_outer_context_id() const { + return _impl_.outer_context_id_.Get(); +} +inline void DebuggedGraph::_internal_set_outer_context_id(const std::string& value) { + + _impl_.outer_context_id_.Set(value, GetArenaForAllocation()); +} +inline std::string* DebuggedGraph::_internal_mutable_outer_context_id() { + + return _impl_.outer_context_id_.Mutable(GetArenaForAllocation()); +} +inline std::string* DebuggedGraph::release_outer_context_id() { + // @@protoc_insertion_point(field_release:tensorflow.DebuggedGraph.outer_context_id) + return _impl_.outer_context_id_.Release(); +} +inline void DebuggedGraph::set_allocated_outer_context_id(std::string* outer_context_id) { + if (outer_context_id != nullptr) { + + } else { + + } + _impl_.outer_context_id_.SetAllocated(outer_context_id, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.outer_context_id_.IsDefault()) { + _impl_.outer_context_id_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.DebuggedGraph.outer_context_id) +} + +// ------------------------------------------------------------------- + +// DebuggedDevice + +// string device_name = 1; +inline void DebuggedDevice::clear_device_name() { + _impl_.device_name_.ClearToEmpty(); +} +inline const std::string& DebuggedDevice::device_name() const { + // @@protoc_insertion_point(field_get:tensorflow.DebuggedDevice.device_name) + return _internal_device_name(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void DebuggedDevice::set_device_name(ArgT0&& arg0, ArgT... args) { + + _impl_.device_name_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.DebuggedDevice.device_name) +} +inline std::string* DebuggedDevice::mutable_device_name() { + std::string* _s = _internal_mutable_device_name(); + // @@protoc_insertion_point(field_mutable:tensorflow.DebuggedDevice.device_name) + return _s; +} +inline const std::string& DebuggedDevice::_internal_device_name() const { + return _impl_.device_name_.Get(); +} +inline void DebuggedDevice::_internal_set_device_name(const std::string& value) { + + _impl_.device_name_.Set(value, GetArenaForAllocation()); +} +inline std::string* DebuggedDevice::_internal_mutable_device_name() { + + return _impl_.device_name_.Mutable(GetArenaForAllocation()); +} +inline std::string* DebuggedDevice::release_device_name() { + // @@protoc_insertion_point(field_release:tensorflow.DebuggedDevice.device_name) + return _impl_.device_name_.Release(); +} +inline void DebuggedDevice::set_allocated_device_name(std::string* device_name) { + if (device_name != nullptr) { + + } else { + + } + _impl_.device_name_.SetAllocated(device_name, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.device_name_.IsDefault()) { + _impl_.device_name_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.DebuggedDevice.device_name) +} + +// int32 device_id = 2; +inline void DebuggedDevice::clear_device_id() { + _impl_.device_id_ = 0; +} +inline int32_t DebuggedDevice::_internal_device_id() const { + return _impl_.device_id_; +} +inline int32_t DebuggedDevice::device_id() const { + // @@protoc_insertion_point(field_get:tensorflow.DebuggedDevice.device_id) + return _internal_device_id(); +} +inline void DebuggedDevice::_internal_set_device_id(int32_t value) { + + _impl_.device_id_ = value; +} +inline void DebuggedDevice::set_device_id(int32_t value) { + _internal_set_device_id(value); + // @@protoc_insertion_point(field_set:tensorflow.DebuggedDevice.device_id) +} + +// ------------------------------------------------------------------- + +// Execution + +// string op_type = 1; +inline void Execution::clear_op_type() { + _impl_.op_type_.ClearToEmpty(); +} +inline const std::string& Execution::op_type() const { + // @@protoc_insertion_point(field_get:tensorflow.Execution.op_type) + return _internal_op_type(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void Execution::set_op_type(ArgT0&& arg0, ArgT... args) { + + _impl_.op_type_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.Execution.op_type) +} +inline std::string* Execution::mutable_op_type() { + std::string* _s = _internal_mutable_op_type(); + // @@protoc_insertion_point(field_mutable:tensorflow.Execution.op_type) + return _s; +} +inline const std::string& Execution::_internal_op_type() const { + return _impl_.op_type_.Get(); +} +inline void Execution::_internal_set_op_type(const std::string& value) { + + _impl_.op_type_.Set(value, GetArenaForAllocation()); +} +inline std::string* Execution::_internal_mutable_op_type() { + + return _impl_.op_type_.Mutable(GetArenaForAllocation()); +} +inline std::string* Execution::release_op_type() { + // @@protoc_insertion_point(field_release:tensorflow.Execution.op_type) + return _impl_.op_type_.Release(); +} +inline void Execution::set_allocated_op_type(std::string* op_type) { + if (op_type != nullptr) { + + } else { + + } + _impl_.op_type_.SetAllocated(op_type, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.op_type_.IsDefault()) { + _impl_.op_type_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.Execution.op_type) +} + +// int32 num_outputs = 2; +inline void Execution::clear_num_outputs() { + _impl_.num_outputs_ = 0; +} +inline int32_t Execution::_internal_num_outputs() const { + return _impl_.num_outputs_; +} +inline int32_t Execution::num_outputs() const { + // @@protoc_insertion_point(field_get:tensorflow.Execution.num_outputs) + return _internal_num_outputs(); +} +inline void Execution::_internal_set_num_outputs(int32_t value) { + + _impl_.num_outputs_ = value; +} +inline void Execution::set_num_outputs(int32_t value) { + _internal_set_num_outputs(value); + // @@protoc_insertion_point(field_set:tensorflow.Execution.num_outputs) +} + +// string graph_id = 3; +inline void Execution::clear_graph_id() { + _impl_.graph_id_.ClearToEmpty(); +} +inline const std::string& Execution::graph_id() const { + // @@protoc_insertion_point(field_get:tensorflow.Execution.graph_id) + return _internal_graph_id(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void Execution::set_graph_id(ArgT0&& arg0, ArgT... args) { + + _impl_.graph_id_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.Execution.graph_id) +} +inline std::string* Execution::mutable_graph_id() { + std::string* _s = _internal_mutable_graph_id(); + // @@protoc_insertion_point(field_mutable:tensorflow.Execution.graph_id) + return _s; +} +inline const std::string& Execution::_internal_graph_id() const { + return _impl_.graph_id_.Get(); +} +inline void Execution::_internal_set_graph_id(const std::string& value) { + + _impl_.graph_id_.Set(value, GetArenaForAllocation()); +} +inline std::string* Execution::_internal_mutable_graph_id() { + + return _impl_.graph_id_.Mutable(GetArenaForAllocation()); +} +inline std::string* Execution::release_graph_id() { + // @@protoc_insertion_point(field_release:tensorflow.Execution.graph_id) + return _impl_.graph_id_.Release(); +} +inline void Execution::set_allocated_graph_id(std::string* graph_id) { + if (graph_id != nullptr) { + + } else { + + } + _impl_.graph_id_.SetAllocated(graph_id, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.graph_id_.IsDefault()) { + _impl_.graph_id_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.Execution.graph_id) +} + +// repeated int64 input_tensor_ids = 4; +inline int Execution::_internal_input_tensor_ids_size() const { + return _impl_.input_tensor_ids_.size(); +} +inline int Execution::input_tensor_ids_size() const { + return _internal_input_tensor_ids_size(); +} +inline void Execution::clear_input_tensor_ids() { + _impl_.input_tensor_ids_.Clear(); +} +inline int64_t Execution::_internal_input_tensor_ids(int index) const { + return _impl_.input_tensor_ids_.Get(index); +} +inline int64_t Execution::input_tensor_ids(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.Execution.input_tensor_ids) + return _internal_input_tensor_ids(index); +} +inline void Execution::set_input_tensor_ids(int index, int64_t value) { + _impl_.input_tensor_ids_.Set(index, value); + // @@protoc_insertion_point(field_set:tensorflow.Execution.input_tensor_ids) +} +inline void Execution::_internal_add_input_tensor_ids(int64_t value) { + _impl_.input_tensor_ids_.Add(value); +} +inline void Execution::add_input_tensor_ids(int64_t value) { + _internal_add_input_tensor_ids(value); + // @@protoc_insertion_point(field_add:tensorflow.Execution.input_tensor_ids) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >& +Execution::_internal_input_tensor_ids() const { + return _impl_.input_tensor_ids_; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >& +Execution::input_tensor_ids() const { + // @@protoc_insertion_point(field_list:tensorflow.Execution.input_tensor_ids) + return _internal_input_tensor_ids(); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >* +Execution::_internal_mutable_input_tensor_ids() { + return &_impl_.input_tensor_ids_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >* +Execution::mutable_input_tensor_ids() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.Execution.input_tensor_ids) + return _internal_mutable_input_tensor_ids(); +} + +// repeated int64 output_tensor_ids = 5; +inline int Execution::_internal_output_tensor_ids_size() const { + return _impl_.output_tensor_ids_.size(); +} +inline int Execution::output_tensor_ids_size() const { + return _internal_output_tensor_ids_size(); +} +inline void Execution::clear_output_tensor_ids() { + _impl_.output_tensor_ids_.Clear(); +} +inline int64_t Execution::_internal_output_tensor_ids(int index) const { + return _impl_.output_tensor_ids_.Get(index); +} +inline int64_t Execution::output_tensor_ids(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.Execution.output_tensor_ids) + return _internal_output_tensor_ids(index); +} +inline void Execution::set_output_tensor_ids(int index, int64_t value) { + _impl_.output_tensor_ids_.Set(index, value); + // @@protoc_insertion_point(field_set:tensorflow.Execution.output_tensor_ids) +} +inline void Execution::_internal_add_output_tensor_ids(int64_t value) { + _impl_.output_tensor_ids_.Add(value); +} +inline void Execution::add_output_tensor_ids(int64_t value) { + _internal_add_output_tensor_ids(value); + // @@protoc_insertion_point(field_add:tensorflow.Execution.output_tensor_ids) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >& +Execution::_internal_output_tensor_ids() const { + return _impl_.output_tensor_ids_; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >& +Execution::output_tensor_ids() const { + // @@protoc_insertion_point(field_list:tensorflow.Execution.output_tensor_ids) + return _internal_output_tensor_ids(); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >* +Execution::_internal_mutable_output_tensor_ids() { + return &_impl_.output_tensor_ids_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >* +Execution::mutable_output_tensor_ids() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.Execution.output_tensor_ids) + return _internal_mutable_output_tensor_ids(); +} + +// .tensorflow.TensorDebugMode tensor_debug_mode = 6; +inline void Execution::clear_tensor_debug_mode() { + _impl_.tensor_debug_mode_ = 0; +} +inline ::tensorflow::TensorDebugMode Execution::_internal_tensor_debug_mode() const { + return static_cast< ::tensorflow::TensorDebugMode >(_impl_.tensor_debug_mode_); +} +inline ::tensorflow::TensorDebugMode Execution::tensor_debug_mode() const { + // @@protoc_insertion_point(field_get:tensorflow.Execution.tensor_debug_mode) + return _internal_tensor_debug_mode(); +} +inline void Execution::_internal_set_tensor_debug_mode(::tensorflow::TensorDebugMode value) { + + _impl_.tensor_debug_mode_ = value; +} +inline void Execution::set_tensor_debug_mode(::tensorflow::TensorDebugMode value) { + _internal_set_tensor_debug_mode(value); + // @@protoc_insertion_point(field_set:tensorflow.Execution.tensor_debug_mode) +} + +// repeated .tensorflow.TensorProto tensor_protos = 7; +inline int Execution::_internal_tensor_protos_size() const { + return _impl_.tensor_protos_.size(); +} +inline int Execution::tensor_protos_size() const { + return _internal_tensor_protos_size(); +} +inline ::tensorflow::TensorProto* Execution::mutable_tensor_protos(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.Execution.tensor_protos) + return _impl_.tensor_protos_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::TensorProto >* +Execution::mutable_tensor_protos() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.Execution.tensor_protos) + return &_impl_.tensor_protos_; +} +inline const ::tensorflow::TensorProto& Execution::_internal_tensor_protos(int index) const { + return _impl_.tensor_protos_.Get(index); +} +inline const ::tensorflow::TensorProto& Execution::tensor_protos(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.Execution.tensor_protos) + return _internal_tensor_protos(index); +} +inline ::tensorflow::TensorProto* Execution::_internal_add_tensor_protos() { + return _impl_.tensor_protos_.Add(); +} +inline ::tensorflow::TensorProto* Execution::add_tensor_protos() { + ::tensorflow::TensorProto* _add = _internal_add_tensor_protos(); + // @@protoc_insertion_point(field_add:tensorflow.Execution.tensor_protos) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::TensorProto >& +Execution::tensor_protos() const { + // @@protoc_insertion_point(field_list:tensorflow.Execution.tensor_protos) + return _impl_.tensor_protos_; +} + +// .tensorflow.CodeLocation code_location = 8; +inline bool Execution::_internal_has_code_location() const { + return this != internal_default_instance() && _impl_.code_location_ != nullptr; +} +inline bool Execution::has_code_location() const { + return _internal_has_code_location(); +} +inline void Execution::clear_code_location() { + if (GetArenaForAllocation() == nullptr && _impl_.code_location_ != nullptr) { + delete _impl_.code_location_; + } + _impl_.code_location_ = nullptr; +} +inline const ::tensorflow::CodeLocation& Execution::_internal_code_location() const { + const ::tensorflow::CodeLocation* p = _impl_.code_location_; + return p != nullptr ? *p : reinterpret_cast( + ::tensorflow::_CodeLocation_default_instance_); +} +inline const ::tensorflow::CodeLocation& Execution::code_location() const { + // @@protoc_insertion_point(field_get:tensorflow.Execution.code_location) + return _internal_code_location(); +} +inline void Execution::unsafe_arena_set_allocated_code_location( + ::tensorflow::CodeLocation* code_location) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.code_location_); + } + _impl_.code_location_ = code_location; + if (code_location) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.Execution.code_location) +} +inline ::tensorflow::CodeLocation* Execution::release_code_location() { + + ::tensorflow::CodeLocation* temp = _impl_.code_location_; + _impl_.code_location_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tensorflow::CodeLocation* Execution::unsafe_arena_release_code_location() { + // @@protoc_insertion_point(field_release:tensorflow.Execution.code_location) + + ::tensorflow::CodeLocation* temp = _impl_.code_location_; + _impl_.code_location_ = nullptr; + return temp; +} +inline ::tensorflow::CodeLocation* Execution::_internal_mutable_code_location() { + + if (_impl_.code_location_ == nullptr) { + auto* p = CreateMaybeMessage<::tensorflow::CodeLocation>(GetArenaForAllocation()); + _impl_.code_location_ = p; + } + return _impl_.code_location_; +} +inline ::tensorflow::CodeLocation* Execution::mutable_code_location() { + ::tensorflow::CodeLocation* _msg = _internal_mutable_code_location(); + // @@protoc_insertion_point(field_mutable:tensorflow.Execution.code_location) + return _msg; +} +inline void Execution::set_allocated_code_location(::tensorflow::CodeLocation* code_location) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete _impl_.code_location_; + } + if (code_location) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(code_location); + if (message_arena != submessage_arena) { + code_location = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, code_location, submessage_arena); + } + + } else { + + } + _impl_.code_location_ = code_location; + // @@protoc_insertion_point(field_set_allocated:tensorflow.Execution.code_location) +} + +// repeated int32 output_tensor_device_ids = 9; +inline int Execution::_internal_output_tensor_device_ids_size() const { + return _impl_.output_tensor_device_ids_.size(); +} +inline int Execution::output_tensor_device_ids_size() const { + return _internal_output_tensor_device_ids_size(); +} +inline void Execution::clear_output_tensor_device_ids() { + _impl_.output_tensor_device_ids_.Clear(); +} +inline int32_t Execution::_internal_output_tensor_device_ids(int index) const { + return _impl_.output_tensor_device_ids_.Get(index); +} +inline int32_t Execution::output_tensor_device_ids(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.Execution.output_tensor_device_ids) + return _internal_output_tensor_device_ids(index); +} +inline void Execution::set_output_tensor_device_ids(int index, int32_t value) { + _impl_.output_tensor_device_ids_.Set(index, value); + // @@protoc_insertion_point(field_set:tensorflow.Execution.output_tensor_device_ids) +} +inline void Execution::_internal_add_output_tensor_device_ids(int32_t value) { + _impl_.output_tensor_device_ids_.Add(value); +} +inline void Execution::add_output_tensor_device_ids(int32_t value) { + _internal_add_output_tensor_device_ids(value); + // @@protoc_insertion_point(field_add:tensorflow.Execution.output_tensor_device_ids) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >& +Execution::_internal_output_tensor_device_ids() const { + return _impl_.output_tensor_device_ids_; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >& +Execution::output_tensor_device_ids() const { + // @@protoc_insertion_point(field_list:tensorflow.Execution.output_tensor_device_ids) + return _internal_output_tensor_device_ids(); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >* +Execution::_internal_mutable_output_tensor_device_ids() { + return &_impl_.output_tensor_device_ids_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >* +Execution::mutable_output_tensor_device_ids() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.Execution.output_tensor_device_ids) + return _internal_mutable_output_tensor_device_ids(); +} + +// ------------------------------------------------------------------- + +// GraphExecutionTrace + +// string tfdbg_context_id = 1; +inline void GraphExecutionTrace::clear_tfdbg_context_id() { + _impl_.tfdbg_context_id_.ClearToEmpty(); +} +inline const std::string& GraphExecutionTrace::tfdbg_context_id() const { + // @@protoc_insertion_point(field_get:tensorflow.GraphExecutionTrace.tfdbg_context_id) + return _internal_tfdbg_context_id(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void GraphExecutionTrace::set_tfdbg_context_id(ArgT0&& arg0, ArgT... args) { + + _impl_.tfdbg_context_id_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.GraphExecutionTrace.tfdbg_context_id) +} +inline std::string* GraphExecutionTrace::mutable_tfdbg_context_id() { + std::string* _s = _internal_mutable_tfdbg_context_id(); + // @@protoc_insertion_point(field_mutable:tensorflow.GraphExecutionTrace.tfdbg_context_id) + return _s; +} +inline const std::string& GraphExecutionTrace::_internal_tfdbg_context_id() const { + return _impl_.tfdbg_context_id_.Get(); +} +inline void GraphExecutionTrace::_internal_set_tfdbg_context_id(const std::string& value) { + + _impl_.tfdbg_context_id_.Set(value, GetArenaForAllocation()); +} +inline std::string* GraphExecutionTrace::_internal_mutable_tfdbg_context_id() { + + return _impl_.tfdbg_context_id_.Mutable(GetArenaForAllocation()); +} +inline std::string* GraphExecutionTrace::release_tfdbg_context_id() { + // @@protoc_insertion_point(field_release:tensorflow.GraphExecutionTrace.tfdbg_context_id) + return _impl_.tfdbg_context_id_.Release(); +} +inline void GraphExecutionTrace::set_allocated_tfdbg_context_id(std::string* tfdbg_context_id) { + if (tfdbg_context_id != nullptr) { + + } else { + + } + _impl_.tfdbg_context_id_.SetAllocated(tfdbg_context_id, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.tfdbg_context_id_.IsDefault()) { + _impl_.tfdbg_context_id_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.GraphExecutionTrace.tfdbg_context_id) +} + +// string op_name = 2; +inline void GraphExecutionTrace::clear_op_name() { + _impl_.op_name_.ClearToEmpty(); +} +inline const std::string& GraphExecutionTrace::op_name() const { + // @@protoc_insertion_point(field_get:tensorflow.GraphExecutionTrace.op_name) + return _internal_op_name(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void GraphExecutionTrace::set_op_name(ArgT0&& arg0, ArgT... args) { + + _impl_.op_name_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.GraphExecutionTrace.op_name) +} +inline std::string* GraphExecutionTrace::mutable_op_name() { + std::string* _s = _internal_mutable_op_name(); + // @@protoc_insertion_point(field_mutable:tensorflow.GraphExecutionTrace.op_name) + return _s; +} +inline const std::string& GraphExecutionTrace::_internal_op_name() const { + return _impl_.op_name_.Get(); +} +inline void GraphExecutionTrace::_internal_set_op_name(const std::string& value) { + + _impl_.op_name_.Set(value, GetArenaForAllocation()); +} +inline std::string* GraphExecutionTrace::_internal_mutable_op_name() { + + return _impl_.op_name_.Mutable(GetArenaForAllocation()); +} +inline std::string* GraphExecutionTrace::release_op_name() { + // @@protoc_insertion_point(field_release:tensorflow.GraphExecutionTrace.op_name) + return _impl_.op_name_.Release(); +} +inline void GraphExecutionTrace::set_allocated_op_name(std::string* op_name) { + if (op_name != nullptr) { + + } else { + + } + _impl_.op_name_.SetAllocated(op_name, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.op_name_.IsDefault()) { + _impl_.op_name_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.GraphExecutionTrace.op_name) +} + +// int32 output_slot = 3; +inline void GraphExecutionTrace::clear_output_slot() { + _impl_.output_slot_ = 0; +} +inline int32_t GraphExecutionTrace::_internal_output_slot() const { + return _impl_.output_slot_; +} +inline int32_t GraphExecutionTrace::output_slot() const { + // @@protoc_insertion_point(field_get:tensorflow.GraphExecutionTrace.output_slot) + return _internal_output_slot(); +} +inline void GraphExecutionTrace::_internal_set_output_slot(int32_t value) { + + _impl_.output_slot_ = value; +} +inline void GraphExecutionTrace::set_output_slot(int32_t value) { + _internal_set_output_slot(value); + // @@protoc_insertion_point(field_set:tensorflow.GraphExecutionTrace.output_slot) +} + +// .tensorflow.TensorDebugMode tensor_debug_mode = 4; +inline void GraphExecutionTrace::clear_tensor_debug_mode() { + _impl_.tensor_debug_mode_ = 0; +} +inline ::tensorflow::TensorDebugMode GraphExecutionTrace::_internal_tensor_debug_mode() const { + return static_cast< ::tensorflow::TensorDebugMode >(_impl_.tensor_debug_mode_); +} +inline ::tensorflow::TensorDebugMode GraphExecutionTrace::tensor_debug_mode() const { + // @@protoc_insertion_point(field_get:tensorflow.GraphExecutionTrace.tensor_debug_mode) + return _internal_tensor_debug_mode(); +} +inline void GraphExecutionTrace::_internal_set_tensor_debug_mode(::tensorflow::TensorDebugMode value) { + + _impl_.tensor_debug_mode_ = value; +} +inline void GraphExecutionTrace::set_tensor_debug_mode(::tensorflow::TensorDebugMode value) { + _internal_set_tensor_debug_mode(value); + // @@protoc_insertion_point(field_set:tensorflow.GraphExecutionTrace.tensor_debug_mode) +} + +// .tensorflow.TensorProto tensor_proto = 5; +inline bool GraphExecutionTrace::_internal_has_tensor_proto() const { + return this != internal_default_instance() && _impl_.tensor_proto_ != nullptr; +} +inline bool GraphExecutionTrace::has_tensor_proto() const { + return _internal_has_tensor_proto(); +} +inline const ::tensorflow::TensorProto& GraphExecutionTrace::_internal_tensor_proto() const { + const ::tensorflow::TensorProto* p = _impl_.tensor_proto_; + return p != nullptr ? *p : reinterpret_cast( + ::tensorflow::_TensorProto_default_instance_); +} +inline const ::tensorflow::TensorProto& GraphExecutionTrace::tensor_proto() const { + // @@protoc_insertion_point(field_get:tensorflow.GraphExecutionTrace.tensor_proto) + return _internal_tensor_proto(); +} +inline void GraphExecutionTrace::unsafe_arena_set_allocated_tensor_proto( + ::tensorflow::TensorProto* tensor_proto) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.tensor_proto_); + } + _impl_.tensor_proto_ = tensor_proto; + if (tensor_proto) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.GraphExecutionTrace.tensor_proto) +} +inline ::tensorflow::TensorProto* GraphExecutionTrace::release_tensor_proto() { + + ::tensorflow::TensorProto* temp = _impl_.tensor_proto_; + _impl_.tensor_proto_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tensorflow::TensorProto* GraphExecutionTrace::unsafe_arena_release_tensor_proto() { + // @@protoc_insertion_point(field_release:tensorflow.GraphExecutionTrace.tensor_proto) + + ::tensorflow::TensorProto* temp = _impl_.tensor_proto_; + _impl_.tensor_proto_ = nullptr; + return temp; +} +inline ::tensorflow::TensorProto* GraphExecutionTrace::_internal_mutable_tensor_proto() { + + if (_impl_.tensor_proto_ == nullptr) { + auto* p = CreateMaybeMessage<::tensorflow::TensorProto>(GetArenaForAllocation()); + _impl_.tensor_proto_ = p; + } + return _impl_.tensor_proto_; +} +inline ::tensorflow::TensorProto* GraphExecutionTrace::mutable_tensor_proto() { + ::tensorflow::TensorProto* _msg = _internal_mutable_tensor_proto(); + // @@protoc_insertion_point(field_mutable:tensorflow.GraphExecutionTrace.tensor_proto) + return _msg; +} +inline void GraphExecutionTrace::set_allocated_tensor_proto(::tensorflow::TensorProto* tensor_proto) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.tensor_proto_); + } + if (tensor_proto) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( + reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(tensor_proto)); + if (message_arena != submessage_arena) { + tensor_proto = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, tensor_proto, submessage_arena); + } + + } else { + + } + _impl_.tensor_proto_ = tensor_proto; + // @@protoc_insertion_point(field_set_allocated:tensorflow.GraphExecutionTrace.tensor_proto) +} + +// string device_name = 6; +inline void GraphExecutionTrace::clear_device_name() { + _impl_.device_name_.ClearToEmpty(); +} +inline const std::string& GraphExecutionTrace::device_name() const { + // @@protoc_insertion_point(field_get:tensorflow.GraphExecutionTrace.device_name) + return _internal_device_name(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void GraphExecutionTrace::set_device_name(ArgT0&& arg0, ArgT... args) { + + _impl_.device_name_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.GraphExecutionTrace.device_name) +} +inline std::string* GraphExecutionTrace::mutable_device_name() { + std::string* _s = _internal_mutable_device_name(); + // @@protoc_insertion_point(field_mutable:tensorflow.GraphExecutionTrace.device_name) + return _s; +} +inline const std::string& GraphExecutionTrace::_internal_device_name() const { + return _impl_.device_name_.Get(); +} +inline void GraphExecutionTrace::_internal_set_device_name(const std::string& value) { + + _impl_.device_name_.Set(value, GetArenaForAllocation()); +} +inline std::string* GraphExecutionTrace::_internal_mutable_device_name() { + + return _impl_.device_name_.Mutable(GetArenaForAllocation()); +} +inline std::string* GraphExecutionTrace::release_device_name() { + // @@protoc_insertion_point(field_release:tensorflow.GraphExecutionTrace.device_name) + return _impl_.device_name_.Release(); +} +inline void GraphExecutionTrace::set_allocated_device_name(std::string* device_name) { + if (device_name != nullptr) { + + } else { + + } + _impl_.device_name_.SetAllocated(device_name, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.device_name_.IsDefault()) { + _impl_.device_name_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.GraphExecutionTrace.device_name) +} + +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + + +// @@protoc_insertion_point(namespace_scope) + +} // namespace tensorflow + +PROTOBUF_NAMESPACE_OPEN + +template <> struct is_proto_enum< ::tensorflow::TensorDebugMode> : ::std::true_type {}; +template <> +inline const EnumDescriptor* GetEnumDescriptor< ::tensorflow::TensorDebugMode>() { + return ::tensorflow::TensorDebugMode_descriptor(); +} + +PROTOBUF_NAMESPACE_CLOSE + +// @@protoc_insertion_point(global_scope) + +#include +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprotobuf_2fdebug_5fevent_2eproto diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/debug_event.proto b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/debug_event.proto new file mode 100644 index 0000000000000000000000000000000000000000..9e1dba295694307f56a03b56343f87747f28060d --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/debug_event.proto @@ -0,0 +1,300 @@ +syntax = "proto3"; + +package tensorflow; + +import "tensorflow/core/framework/graph_debug_info.proto"; +import "tensorflow/core/framework/tensor.proto"; + +option cc_enable_arenas = true; +option java_outer_classname = "DebugEventProtos"; +option java_multiple_files = true; +option java_package = "org.tensorflow.util"; +option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/protobuf/for_core_protos_go_proto"; + +// Available modes for extracting debugging information from a Tensor. +// TODO(cais): Document the detailed column names and semantics in a separate +// markdown file once the implementation settles. +enum TensorDebugMode { + UNSPECIFIED = 0; + + // Only records what tensors are computed, eagerly or in graphs. + // No information regarding the value of the tensor is available. + NO_TENSOR = 1; + + // A minimalist health summary for float-type tensors. + // Contains information only about the presence/absence of pathological + // values including Infinity and NaN. + // Applicable only to float dtypes. + CURT_HEALTH = 2; + + // A concise health summary for float-type tensors. + // Contains more information that CURT_HEALTH. + // Infinity and NaN are treated differently. + // Applicable only to float and integer dtypes. + CONCISE_HEALTH = 3; + + // A detailed health summary. + // Contains further detailed information than `CONCISE_HEALTH`. + // Information about device, dtype and shape are included. + // Counts for various types of values (Infinity, NaN, negative, zero, + // positive) are included. + // Applicable to float, integer and boolean dtypes. + FULL_HEALTH = 4; + + // Provides full runtime shape information, up to a maximum rank, beyond + // which the dimension sizes are truncated. + SHAPE = 5; + + // Full numeric summary. + // Including device, dtype, shape, counts of various types of values + // (Infinity, NaN, negative, zero, positive), and summary statistics + // (minimum, maximum, mean and variance). + // Applicable to float, integer and boolean dtypes. + FULL_NUMERICS = 6; + + // Full tensor value. + FULL_TENSOR = 7; + + // Reduce the elements of a tensor to a rank-1 tensor of shape [3], in which + // - the 1st element is -inf if any element of the tensor is -inf, + // or zero otherwise. + // - the 2nd element is +inf if any element of the tensor is +inf, + // or zero otherwise. + // - the 3rd element is nan if any element of the tensor is nan, or zero + // otherwise. + REDUCE_INF_NAN_THREE_SLOTS = 8; +} + +// An Event related to the debugging of a TensorFlow program. +message DebugEvent { + // Timestamp in seconds (with microsecond precision). + double wall_time = 1; + + // Step of training (if available). + int64 step = 2; + + oneof what { + // Metadata related to this debugging data. + DebugMetadata debug_metadata = 3; + + // The content of a source file. + SourceFile source_file = 4; + + // A stack frame (filename, line number and column number, function name and + // code string) with ID. + StackFrameWithId stack_frame_with_id = 6; + + // The creation of an op within a graph (e.g., a FuncGraph compiled from + // a Python function). + GraphOpCreation graph_op_creation = 7; + + // Information about a debugged graph. + DebuggedGraph debugged_graph = 8; + + // Execution of an op or a Graph (e.g., a tf.function). + Execution execution = 9; + + // A graph execution trace: Contains information about the intermediate + // tensors computed during the graph execution. + GraphExecutionTrace graph_execution_trace = 10; + + // The ID of the graph (i.e., FuncGraph) executed here: applicable only + // to the execution of a FuncGraph. + string graph_id = 11; + + // A device on which debugger-instrumented ops and/or tensors reside. + DebuggedDevice debugged_device = 12; + } +} + +// Metadata about the debugger and the debugged TensorFlow program. +message DebugMetadata { + // Version of TensorFlow. + string tensorflow_version = 1; + + // Version of the DebugEvent file format. + // Has a format of "debug.Event:", e.g., "debug.Event:1". + string file_version = 2; + + // A unique ID for the current run of tfdbg. + // A run of tfdbg is defined as a TensorFlow job instrumented by tfdbg. + // Multiple hosts in a distributed TensorFlow job instrumented by tfdbg + // have the same ID. + string tfdbg_run_id = 3; +} + +// Content of a source file involved in the execution of the debugged TensorFlow +// program. +message SourceFile { + // Path to the file. + string file_path = 1; + + // Name of the host on which the file is located. + string host_name = 2; + + // Line-by-line content of the file. + repeated string lines = 3; +} + +// A stack frame with ID. +message StackFrameWithId { + // A unique ID for the stack frame: A UUID-like string. + string id = 1; + + // Stack frame, i.e., a frame of a stack trace, containing information + // regarding the file name, line number, function name, code content + // of the line, and column number (if available). + GraphDebugInfo.FileLineCol file_line_col = 2; +} + +// Code location information: A stack trace with host-name information. +// Instead of encoding the detailed stack trace, this proto refers to IDs of +// stack frames stored as `StackFrameWithId` protos. +message CodeLocation { + // Host name on which the source files are located. + string host_name = 1; + + // ID to a stack frame, each of which is pointed to + // by a unique ID. The ordering of the frames is consistent with Python's + // `traceback.extract_tb()`. + repeated string stack_frame_ids = 2; +} + +// The creation of an op in a TensorFlow Graph (e.g., FuncGraph in TF2). +message GraphOpCreation { + // Type of the op (e.g., "MatMul"). + string op_type = 1; + + // Name of the op (e.g., "Dense/MatMul_1"). + string op_name = 2; + + // Name of the graph that the op is a part of (if available). + string graph_name = 3; + + // Unique ID of the graph (generated by debugger). + // This is the ID of the immediately-enclosing graph. + string graph_id = 4; + + // Name of the device that the op is assigned to (if available). + string device_name = 5; + + // Names of the input tensors to the op. + repeated string input_names = 6; + + // Number of output tensors emitted by the op. + int32 num_outputs = 7; + + // The unique ID for code location (stack trace) of the op's creation. + CodeLocation code_location = 8; + + // Unique IDs for the output tensors of this op. + repeated int32 output_tensor_ids = 9; +} + +// A debugger-instrumented graph. +message DebuggedGraph { + // An ID for the graph. + // This can be used up to look up graph names. Generated by the debugger. + string graph_id = 1; + + // Name of the graph (if available). + string graph_name = 2; + + // Names of the instrumented ops. This can be used to look up op name + // based on the numeric-summary tensors (2nd column). + repeated string instrumented_ops = 3; + + // Original (uninstrumented) GraphDef (if available). + bytes original_graph_def = 4; + + // An encoded version of a GraphDef. + // This graph may include the debugger-inserted ops. + bytes instrumented_graph_def = 5; + + // IDs of the immediate enclosing context (graph), if any. + string outer_context_id = 6; +} + +// A device on which ops and/or tensors are instrumented by the debugger. +message DebuggedDevice { + // Name of the device. + string device_name = 1; + + // A debugger-generated ID for the device. Guaranteed to be unique within + // the scope of the debugged TensorFlow program, including single-host and + // multi-host settings. + // TODO(cais): Test the uniqueness guarantee in multi-host settings. + int32 device_id = 2; +} + +// Data relating to the eager execution of an op or a Graph. +// For a op that generates N output tensors (N >= 0), only one +// Execution proto will be used to describe the execution event. +message Execution { + // Op type (e.g., "MatMul"). + // In the case of a Graph, this is the name of the Graph. + string op_type = 1; + + // Number of output tensors. + int32 num_outputs = 2; + + // The graph that's executed: applicable only to the eager + // execution of a FuncGraph. + string graph_id = 3; + + // IDs of the input tensors (if available). + repeated int64 input_tensor_ids = 4; + + // IDs of the output tensors (if availbable). + // If specified, must have the same length as tensor_protos. + repeated int64 output_tensor_ids = 5; + + // Type of the tensor value encapsulated in this proto. + TensorDebugMode tensor_debug_mode = 6; + + // Output Tensor values in the type described by `tensor_value_type`. + // The length of this should match `num_outputs`. + repeated TensorProto tensor_protos = 7; + + // Stack trace of the eager execution. + CodeLocation code_location = 8; + + // Debugged-generated IDs of the devices on which the output tensors reside. + // To look up details about the device (e.g., name), cross-reference this + // field with the DebuggedDevice messages. + repeated int32 output_tensor_device_ids = 9; + + // TODO(cais): When backporting to V1 Session.run() support, add more fields + // such as fetches and feeds. +} + +// Data relating to an execution of a Graph (e.g., an eager execution of a +// FuncGraph). +// The values of the intermediate tensors computed in the graph are recorded +// in this proto. A graph execution may correspond to one or more pieces of +// `GraphExecutionTrace`, depending on whether the instrumented tensor values +// are summarized in an aggregated or separate fashion. +message GraphExecutionTrace { + // Unique ID of the context that the executed op(s) belong to (e.g., a + // compiled concrete tf.function). + string tfdbg_context_id = 1; + + // Name of the op (applicable only in the case of the `FULL_TENSOR` trace + // level). + string op_name = 2; + + // Output slot of the tensor (applicable only in the case of the `FULL_TENSOR` + // trace level). + int32 output_slot = 3; + + // Type of the tensor value encapsulated in this proto. + TensorDebugMode tensor_debug_mode = 4; + + // Tensor value in the type described by `tensor_value_type`. + // This tensor may summarize the value of a single intermediate op of the + // graph, or those of multiple intermediate tensors. + TensorProto tensor_proto = 5; + + // Name of the device that the op belongs to. + string device_name = 6; +} diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/device_filters.pb.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/device_filters.pb.h new file mode 100644 index 0000000000000000000000000000000000000000..6ab1bf45b190feb8eb05d5fb0b528e9816b5d0b8 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/device_filters.pb.h @@ -0,0 +1,827 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/device_filters.proto + +#ifndef GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprotobuf_2fdevice_5ffilters_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprotobuf_2fdevice_5ffilters_2eproto + +#include +#include + +#include +#if PROTOBUF_VERSION < 3021000 +#error This file was generated by a newer version of protoc which is +#error incompatible with your Protocol Buffer headers. Please update +#error your headers. +#endif +#if 3021009 < PROTOBUF_MIN_PROTOC_VERSION +#error This file was generated by an older version of protoc which is +#error incompatible with your Protocol Buffer headers. Please +#error regenerate this file with a newer version of protoc. +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include // IWYU pragma: export +#include // IWYU pragma: export +#include // IWYU pragma: export +#include +#include +#include +// @@protoc_insertion_point(includes) +#include +#define PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2fprotobuf_2fdevice_5ffilters_2eproto +PROTOBUF_NAMESPACE_OPEN +namespace internal { +class AnyMetadata; +} // namespace internal +PROTOBUF_NAMESPACE_CLOSE + +// Internal implementation detail -- do not use these members. +struct TableStruct_tensorflow_2fcore_2fprotobuf_2fdevice_5ffilters_2eproto { + static const uint32_t offsets[]; +}; +extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_tensorflow_2fcore_2fprotobuf_2fdevice_5ffilters_2eproto; +namespace tensorflow { +class ClusterDeviceFilters; +struct ClusterDeviceFiltersDefaultTypeInternal; +extern ClusterDeviceFiltersDefaultTypeInternal _ClusterDeviceFilters_default_instance_; +class JobDeviceFilters; +struct JobDeviceFiltersDefaultTypeInternal; +extern JobDeviceFiltersDefaultTypeInternal _JobDeviceFilters_default_instance_; +class JobDeviceFilters_TasksEntry_DoNotUse; +struct JobDeviceFilters_TasksEntry_DoNotUseDefaultTypeInternal; +extern JobDeviceFilters_TasksEntry_DoNotUseDefaultTypeInternal _JobDeviceFilters_TasksEntry_DoNotUse_default_instance_; +class TaskDeviceFilters; +struct TaskDeviceFiltersDefaultTypeInternal; +extern TaskDeviceFiltersDefaultTypeInternal _TaskDeviceFilters_default_instance_; +} // namespace tensorflow +PROTOBUF_NAMESPACE_OPEN +template<> ::tensorflow::ClusterDeviceFilters* Arena::CreateMaybeMessage<::tensorflow::ClusterDeviceFilters>(Arena*); +template<> ::tensorflow::JobDeviceFilters* Arena::CreateMaybeMessage<::tensorflow::JobDeviceFilters>(Arena*); +template<> ::tensorflow::JobDeviceFilters_TasksEntry_DoNotUse* Arena::CreateMaybeMessage<::tensorflow::JobDeviceFilters_TasksEntry_DoNotUse>(Arena*); +template<> ::tensorflow::TaskDeviceFilters* Arena::CreateMaybeMessage<::tensorflow::TaskDeviceFilters>(Arena*); +PROTOBUF_NAMESPACE_CLOSE +namespace tensorflow { + +// =================================================================== + +class TaskDeviceFilters final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.TaskDeviceFilters) */ { + public: + inline TaskDeviceFilters() : TaskDeviceFilters(nullptr) {} + ~TaskDeviceFilters() override; + explicit PROTOBUF_CONSTEXPR TaskDeviceFilters(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + TaskDeviceFilters(const TaskDeviceFilters& from); + TaskDeviceFilters(TaskDeviceFilters&& from) noexcept + : TaskDeviceFilters() { + *this = ::std::move(from); + } + + inline TaskDeviceFilters& operator=(const TaskDeviceFilters& from) { + CopyFrom(from); + return *this; + } + inline TaskDeviceFilters& operator=(TaskDeviceFilters&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const TaskDeviceFilters& default_instance() { + return *internal_default_instance(); + } + static inline const TaskDeviceFilters* internal_default_instance() { + return reinterpret_cast( + &_TaskDeviceFilters_default_instance_); + } + static constexpr int kIndexInFileMessages = + 0; + + friend void swap(TaskDeviceFilters& a, TaskDeviceFilters& b) { + a.Swap(&b); + } + inline void Swap(TaskDeviceFilters* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(TaskDeviceFilters* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + TaskDeviceFilters* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const TaskDeviceFilters& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const TaskDeviceFilters& from) { + TaskDeviceFilters::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(TaskDeviceFilters* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.TaskDeviceFilters"; + } + protected: + explicit TaskDeviceFilters(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kDeviceFiltersFieldNumber = 1, + }; + // repeated string device_filters = 1; + int device_filters_size() const; + private: + int _internal_device_filters_size() const; + public: + void clear_device_filters(); + const std::string& device_filters(int index) const; + std::string* mutable_device_filters(int index); + void set_device_filters(int index, const std::string& value); + void set_device_filters(int index, std::string&& value); + void set_device_filters(int index, const char* value); + void set_device_filters(int index, const char* value, size_t size); + std::string* add_device_filters(); + void add_device_filters(const std::string& value); + void add_device_filters(std::string&& value); + void add_device_filters(const char* value); + void add_device_filters(const char* value, size_t size); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& device_filters() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* mutable_device_filters(); + private: + const std::string& _internal_device_filters(int index) const; + std::string* _internal_add_device_filters(); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.TaskDeviceFilters) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField device_filters_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fdevice_5ffilters_2eproto; +}; +// ------------------------------------------------------------------- + +class JobDeviceFilters_TasksEntry_DoNotUse : public ::PROTOBUF_NAMESPACE_ID::internal::MapEntry { +public: + typedef ::PROTOBUF_NAMESPACE_ID::internal::MapEntry SuperType; + JobDeviceFilters_TasksEntry_DoNotUse(); + explicit PROTOBUF_CONSTEXPR JobDeviceFilters_TasksEntry_DoNotUse( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + explicit JobDeviceFilters_TasksEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena); + void MergeFrom(const JobDeviceFilters_TasksEntry_DoNotUse& other); + static const JobDeviceFilters_TasksEntry_DoNotUse* internal_default_instance() { return reinterpret_cast(&_JobDeviceFilters_TasksEntry_DoNotUse_default_instance_); } + static bool ValidateKey(void*) { return true; } + static bool ValidateValue(void*) { return true; } + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fdevice_5ffilters_2eproto; +}; + +// ------------------------------------------------------------------- + +class JobDeviceFilters final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.JobDeviceFilters) */ { + public: + inline JobDeviceFilters() : JobDeviceFilters(nullptr) {} + ~JobDeviceFilters() override; + explicit PROTOBUF_CONSTEXPR JobDeviceFilters(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + JobDeviceFilters(const JobDeviceFilters& from); + JobDeviceFilters(JobDeviceFilters&& from) noexcept + : JobDeviceFilters() { + *this = ::std::move(from); + } + + inline JobDeviceFilters& operator=(const JobDeviceFilters& from) { + CopyFrom(from); + return *this; + } + inline JobDeviceFilters& operator=(JobDeviceFilters&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const JobDeviceFilters& default_instance() { + return *internal_default_instance(); + } + static inline const JobDeviceFilters* internal_default_instance() { + return reinterpret_cast( + &_JobDeviceFilters_default_instance_); + } + static constexpr int kIndexInFileMessages = + 2; + + friend void swap(JobDeviceFilters& a, JobDeviceFilters& b) { + a.Swap(&b); + } + inline void Swap(JobDeviceFilters* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(JobDeviceFilters* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + JobDeviceFilters* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const JobDeviceFilters& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const JobDeviceFilters& from) { + JobDeviceFilters::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(JobDeviceFilters* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.JobDeviceFilters"; + } + protected: + explicit JobDeviceFilters(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + + // accessors ------------------------------------------------------- + + enum : int { + kTasksFieldNumber = 2, + kNameFieldNumber = 1, + }; + // map tasks = 2; + int tasks_size() const; + private: + int _internal_tasks_size() const; + public: + void clear_tasks(); + private: + const ::PROTOBUF_NAMESPACE_ID::Map< int32_t, ::tensorflow::TaskDeviceFilters >& + _internal_tasks() const; + ::PROTOBUF_NAMESPACE_ID::Map< int32_t, ::tensorflow::TaskDeviceFilters >* + _internal_mutable_tasks(); + public: + const ::PROTOBUF_NAMESPACE_ID::Map< int32_t, ::tensorflow::TaskDeviceFilters >& + tasks() const; + ::PROTOBUF_NAMESPACE_ID::Map< int32_t, ::tensorflow::TaskDeviceFilters >* + mutable_tasks(); + + // string name = 1; + void clear_name(); + const std::string& name() const; + template + void set_name(ArgT0&& arg0, ArgT... args); + std::string* mutable_name(); + PROTOBUF_NODISCARD std::string* release_name(); + void set_allocated_name(std::string* name); + private: + const std::string& _internal_name() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_name(const std::string& value); + std::string* _internal_mutable_name(); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.JobDeviceFilters) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::MapField< + JobDeviceFilters_TasksEntry_DoNotUse, + int32_t, ::tensorflow::TaskDeviceFilters, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT32, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_MESSAGE> tasks_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fdevice_5ffilters_2eproto; +}; +// ------------------------------------------------------------------- + +class ClusterDeviceFilters final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.ClusterDeviceFilters) */ { + public: + inline ClusterDeviceFilters() : ClusterDeviceFilters(nullptr) {} + ~ClusterDeviceFilters() override; + explicit PROTOBUF_CONSTEXPR ClusterDeviceFilters(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + ClusterDeviceFilters(const ClusterDeviceFilters& from); + ClusterDeviceFilters(ClusterDeviceFilters&& from) noexcept + : ClusterDeviceFilters() { + *this = ::std::move(from); + } + + inline ClusterDeviceFilters& operator=(const ClusterDeviceFilters& from) { + CopyFrom(from); + return *this; + } + inline ClusterDeviceFilters& operator=(ClusterDeviceFilters&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const ClusterDeviceFilters& default_instance() { + return *internal_default_instance(); + } + static inline const ClusterDeviceFilters* internal_default_instance() { + return reinterpret_cast( + &_ClusterDeviceFilters_default_instance_); + } + static constexpr int kIndexInFileMessages = + 3; + + friend void swap(ClusterDeviceFilters& a, ClusterDeviceFilters& b) { + a.Swap(&b); + } + inline void Swap(ClusterDeviceFilters* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(ClusterDeviceFilters* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + ClusterDeviceFilters* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const ClusterDeviceFilters& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const ClusterDeviceFilters& from) { + ClusterDeviceFilters::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(ClusterDeviceFilters* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.ClusterDeviceFilters"; + } + protected: + explicit ClusterDeviceFilters(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kJobsFieldNumber = 1, + }; + // repeated .tensorflow.JobDeviceFilters jobs = 1; + int jobs_size() const; + private: + int _internal_jobs_size() const; + public: + void clear_jobs(); + ::tensorflow::JobDeviceFilters* mutable_jobs(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::JobDeviceFilters >* + mutable_jobs(); + private: + const ::tensorflow::JobDeviceFilters& _internal_jobs(int index) const; + ::tensorflow::JobDeviceFilters* _internal_add_jobs(); + public: + const ::tensorflow::JobDeviceFilters& jobs(int index) const; + ::tensorflow::JobDeviceFilters* add_jobs(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::JobDeviceFilters >& + jobs() const; + + // @@protoc_insertion_point(class_scope:tensorflow.ClusterDeviceFilters) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::JobDeviceFilters > jobs_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fdevice_5ffilters_2eproto; +}; +// =================================================================== + + +// =================================================================== + +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// TaskDeviceFilters + +// repeated string device_filters = 1; +inline int TaskDeviceFilters::_internal_device_filters_size() const { + return _impl_.device_filters_.size(); +} +inline int TaskDeviceFilters::device_filters_size() const { + return _internal_device_filters_size(); +} +inline void TaskDeviceFilters::clear_device_filters() { + _impl_.device_filters_.Clear(); +} +inline std::string* TaskDeviceFilters::add_device_filters() { + std::string* _s = _internal_add_device_filters(); + // @@protoc_insertion_point(field_add_mutable:tensorflow.TaskDeviceFilters.device_filters) + return _s; +} +inline const std::string& TaskDeviceFilters::_internal_device_filters(int index) const { + return _impl_.device_filters_.Get(index); +} +inline const std::string& TaskDeviceFilters::device_filters(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.TaskDeviceFilters.device_filters) + return _internal_device_filters(index); +} +inline std::string* TaskDeviceFilters::mutable_device_filters(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.TaskDeviceFilters.device_filters) + return _impl_.device_filters_.Mutable(index); +} +inline void TaskDeviceFilters::set_device_filters(int index, const std::string& value) { + _impl_.device_filters_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set:tensorflow.TaskDeviceFilters.device_filters) +} +inline void TaskDeviceFilters::set_device_filters(int index, std::string&& value) { + _impl_.device_filters_.Mutable(index)->assign(std::move(value)); + // @@protoc_insertion_point(field_set:tensorflow.TaskDeviceFilters.device_filters) +} +inline void TaskDeviceFilters::set_device_filters(int index, const char* value) { + GOOGLE_DCHECK(value != nullptr); + _impl_.device_filters_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set_char:tensorflow.TaskDeviceFilters.device_filters) +} +inline void TaskDeviceFilters::set_device_filters(int index, const char* value, size_t size) { + _impl_.device_filters_.Mutable(index)->assign( + reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:tensorflow.TaskDeviceFilters.device_filters) +} +inline std::string* TaskDeviceFilters::_internal_add_device_filters() { + return _impl_.device_filters_.Add(); +} +inline void TaskDeviceFilters::add_device_filters(const std::string& value) { + _impl_.device_filters_.Add()->assign(value); + // @@protoc_insertion_point(field_add:tensorflow.TaskDeviceFilters.device_filters) +} +inline void TaskDeviceFilters::add_device_filters(std::string&& value) { + _impl_.device_filters_.Add(std::move(value)); + // @@protoc_insertion_point(field_add:tensorflow.TaskDeviceFilters.device_filters) +} +inline void TaskDeviceFilters::add_device_filters(const char* value) { + GOOGLE_DCHECK(value != nullptr); + _impl_.device_filters_.Add()->assign(value); + // @@protoc_insertion_point(field_add_char:tensorflow.TaskDeviceFilters.device_filters) +} +inline void TaskDeviceFilters::add_device_filters(const char* value, size_t size) { + _impl_.device_filters_.Add()->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_add_pointer:tensorflow.TaskDeviceFilters.device_filters) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& +TaskDeviceFilters::device_filters() const { + // @@protoc_insertion_point(field_list:tensorflow.TaskDeviceFilters.device_filters) + return _impl_.device_filters_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* +TaskDeviceFilters::mutable_device_filters() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.TaskDeviceFilters.device_filters) + return &_impl_.device_filters_; +} + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// JobDeviceFilters + +// string name = 1; +inline void JobDeviceFilters::clear_name() { + _impl_.name_.ClearToEmpty(); +} +inline const std::string& JobDeviceFilters::name() const { + // @@protoc_insertion_point(field_get:tensorflow.JobDeviceFilters.name) + return _internal_name(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void JobDeviceFilters::set_name(ArgT0&& arg0, ArgT... args) { + + _impl_.name_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.JobDeviceFilters.name) +} +inline std::string* JobDeviceFilters::mutable_name() { + std::string* _s = _internal_mutable_name(); + // @@protoc_insertion_point(field_mutable:tensorflow.JobDeviceFilters.name) + return _s; +} +inline const std::string& JobDeviceFilters::_internal_name() const { + return _impl_.name_.Get(); +} +inline void JobDeviceFilters::_internal_set_name(const std::string& value) { + + _impl_.name_.Set(value, GetArenaForAllocation()); +} +inline std::string* JobDeviceFilters::_internal_mutable_name() { + + return _impl_.name_.Mutable(GetArenaForAllocation()); +} +inline std::string* JobDeviceFilters::release_name() { + // @@protoc_insertion_point(field_release:tensorflow.JobDeviceFilters.name) + return _impl_.name_.Release(); +} +inline void JobDeviceFilters::set_allocated_name(std::string* name) { + if (name != nullptr) { + + } else { + + } + _impl_.name_.SetAllocated(name, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.name_.IsDefault()) { + _impl_.name_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.JobDeviceFilters.name) +} + +// map tasks = 2; +inline int JobDeviceFilters::_internal_tasks_size() const { + return _impl_.tasks_.size(); +} +inline int JobDeviceFilters::tasks_size() const { + return _internal_tasks_size(); +} +inline void JobDeviceFilters::clear_tasks() { + _impl_.tasks_.Clear(); +} +inline const ::PROTOBUF_NAMESPACE_ID::Map< int32_t, ::tensorflow::TaskDeviceFilters >& +JobDeviceFilters::_internal_tasks() const { + return _impl_.tasks_.GetMap(); +} +inline const ::PROTOBUF_NAMESPACE_ID::Map< int32_t, ::tensorflow::TaskDeviceFilters >& +JobDeviceFilters::tasks() const { + // @@protoc_insertion_point(field_map:tensorflow.JobDeviceFilters.tasks) + return _internal_tasks(); +} +inline ::PROTOBUF_NAMESPACE_ID::Map< int32_t, ::tensorflow::TaskDeviceFilters >* +JobDeviceFilters::_internal_mutable_tasks() { + return _impl_.tasks_.MutableMap(); +} +inline ::PROTOBUF_NAMESPACE_ID::Map< int32_t, ::tensorflow::TaskDeviceFilters >* +JobDeviceFilters::mutable_tasks() { + // @@protoc_insertion_point(field_mutable_map:tensorflow.JobDeviceFilters.tasks) + return _internal_mutable_tasks(); +} + +// ------------------------------------------------------------------- + +// ClusterDeviceFilters + +// repeated .tensorflow.JobDeviceFilters jobs = 1; +inline int ClusterDeviceFilters::_internal_jobs_size() const { + return _impl_.jobs_.size(); +} +inline int ClusterDeviceFilters::jobs_size() const { + return _internal_jobs_size(); +} +inline void ClusterDeviceFilters::clear_jobs() { + _impl_.jobs_.Clear(); +} +inline ::tensorflow::JobDeviceFilters* ClusterDeviceFilters::mutable_jobs(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.ClusterDeviceFilters.jobs) + return _impl_.jobs_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::JobDeviceFilters >* +ClusterDeviceFilters::mutable_jobs() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.ClusterDeviceFilters.jobs) + return &_impl_.jobs_; +} +inline const ::tensorflow::JobDeviceFilters& ClusterDeviceFilters::_internal_jobs(int index) const { + return _impl_.jobs_.Get(index); +} +inline const ::tensorflow::JobDeviceFilters& ClusterDeviceFilters::jobs(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.ClusterDeviceFilters.jobs) + return _internal_jobs(index); +} +inline ::tensorflow::JobDeviceFilters* ClusterDeviceFilters::_internal_add_jobs() { + return _impl_.jobs_.Add(); +} +inline ::tensorflow::JobDeviceFilters* ClusterDeviceFilters::add_jobs() { + ::tensorflow::JobDeviceFilters* _add = _internal_add_jobs(); + // @@protoc_insertion_point(field_add:tensorflow.ClusterDeviceFilters.jobs) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::JobDeviceFilters >& +ClusterDeviceFilters::jobs() const { + // @@protoc_insertion_point(field_list:tensorflow.ClusterDeviceFilters.jobs) + return _impl_.jobs_; +} + +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + + +// @@protoc_insertion_point(namespace_scope) + +} // namespace tensorflow + +// @@protoc_insertion_point(global_scope) + +#include +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprotobuf_2fdevice_5ffilters_2eproto diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/device_filters.proto b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/device_filters.proto new file mode 100644 index 0000000000000000000000000000000000000000..8fd8e2ec1431caa8e70442e0ae1fa07ebb072848 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/device_filters.proto @@ -0,0 +1,73 @@ +/* Copyright 2020 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +syntax = "proto3"; + +package tensorflow; + +option cc_enable_arenas = true; +option java_outer_classname = "DeviceFiltersProtos"; +option java_multiple_files = true; +option java_package = "org.tensorflow.distruntime"; +option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/protobuf/for_core_protos_go_proto"; + +// This file contains protos to be used when defining a TensorFlow +// cluster. +// +// Configure device filters for remote tasks in the cluster. When associated +// with a ClusterDef in setting up the cluster, a remote task will ignore all +// devices which do not match any of its filters. Device filters must be +// configured at the cluster startup, and cannot be updated once the cluster is +// up and running. +// +// EXAMPLES +// -------- +// +// A two-job cluster with the following ClusterDef: +// +// Cluster: +// job { name: 'worker' tasks { key: 0 value: 'worker1:2222' } +// tasks { key: 1 value: 'worker2:2222' } } +// job { name: 'ps' tasks { key: 0 value: 'ps0:2222' } +// tasks { key: 1 value: 'ps1:2222' } } +// +// Set device filters to isolate worker tasks: +// +// ClusterDeviceFilters: +// job { name: 'worker' tasks { key: 0 +// value: device_filter '/job:ps' +// device_filter '/job:worker/task:0' } +// tasks { key: 1 +// value: device_filter '/job:ps' +// device_filter '/job:worker/task:1' } } + +// Defines the device filters for a remote task. +message TaskDeviceFilters { + repeated string device_filters = 1; +} + +// Defines the device filters for tasks in a job. +message JobDeviceFilters { + // The name of this job. + string name = 1; + + // Mapping from task ID to task device filters. + map tasks = 2; +} + +// Defines the device filters for jobs in a cluster. +message ClusterDeviceFilters { + repeated JobDeviceFilters jobs = 1; +} diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/device_properties.pb.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/device_properties.pb.h new file mode 100644 index 0000000000000000000000000000000000000000..e1b86ab83ba7b3f14e5ad653bfc8dc18ef5d1780 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/device_properties.pb.h @@ -0,0 +1,1110 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/device_properties.proto + +#ifndef GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprotobuf_2fdevice_5fproperties_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprotobuf_2fdevice_5fproperties_2eproto + +#include +#include + +#include +#if PROTOBUF_VERSION < 3021000 +#error This file was generated by a newer version of protoc which is +#error incompatible with your Protocol Buffer headers. Please update +#error your headers. +#endif +#if 3021009 < PROTOBUF_MIN_PROTOC_VERSION +#error This file was generated by an older version of protoc which is +#error incompatible with your Protocol Buffer headers. Please +#error regenerate this file with a newer version of protoc. +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include // IWYU pragma: export +#include // IWYU pragma: export +#include // IWYU pragma: export +#include +#include +#include +// @@protoc_insertion_point(includes) +#include +#define PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2fprotobuf_2fdevice_5fproperties_2eproto +PROTOBUF_NAMESPACE_OPEN +namespace internal { +class AnyMetadata; +} // namespace internal +PROTOBUF_NAMESPACE_CLOSE + +// Internal implementation detail -- do not use these members. +struct TableStruct_tensorflow_2fcore_2fprotobuf_2fdevice_5fproperties_2eproto { + static const uint32_t offsets[]; +}; +extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_tensorflow_2fcore_2fprotobuf_2fdevice_5fproperties_2eproto; +namespace tensorflow { +class DeviceProperties; +struct DevicePropertiesDefaultTypeInternal; +extern DevicePropertiesDefaultTypeInternal _DeviceProperties_default_instance_; +class DeviceProperties_EnvironmentEntry_DoNotUse; +struct DeviceProperties_EnvironmentEntry_DoNotUseDefaultTypeInternal; +extern DeviceProperties_EnvironmentEntry_DoNotUseDefaultTypeInternal _DeviceProperties_EnvironmentEntry_DoNotUse_default_instance_; +class NamedDevice; +struct NamedDeviceDefaultTypeInternal; +extern NamedDeviceDefaultTypeInternal _NamedDevice_default_instance_; +} // namespace tensorflow +PROTOBUF_NAMESPACE_OPEN +template<> ::tensorflow::DeviceProperties* Arena::CreateMaybeMessage<::tensorflow::DeviceProperties>(Arena*); +template<> ::tensorflow::DeviceProperties_EnvironmentEntry_DoNotUse* Arena::CreateMaybeMessage<::tensorflow::DeviceProperties_EnvironmentEntry_DoNotUse>(Arena*); +template<> ::tensorflow::NamedDevice* Arena::CreateMaybeMessage<::tensorflow::NamedDevice>(Arena*); +PROTOBUF_NAMESPACE_CLOSE +namespace tensorflow { + +// =================================================================== + +class DeviceProperties_EnvironmentEntry_DoNotUse : public ::PROTOBUF_NAMESPACE_ID::internal::MapEntry { +public: + typedef ::PROTOBUF_NAMESPACE_ID::internal::MapEntry SuperType; + DeviceProperties_EnvironmentEntry_DoNotUse(); + explicit PROTOBUF_CONSTEXPR DeviceProperties_EnvironmentEntry_DoNotUse( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + explicit DeviceProperties_EnvironmentEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena); + void MergeFrom(const DeviceProperties_EnvironmentEntry_DoNotUse& other); + static const DeviceProperties_EnvironmentEntry_DoNotUse* internal_default_instance() { return reinterpret_cast(&_DeviceProperties_EnvironmentEntry_DoNotUse_default_instance_); } + static bool ValidateKey(std::string* s) { + return ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(s->data(), static_cast(s->size()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, "tensorflow.DeviceProperties.EnvironmentEntry.key"); + } + static bool ValidateValue(std::string* s) { + return ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(s->data(), static_cast(s->size()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, "tensorflow.DeviceProperties.EnvironmentEntry.value"); + } + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fdevice_5fproperties_2eproto; +}; + +// ------------------------------------------------------------------- + +class DeviceProperties final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.DeviceProperties) */ { + public: + inline DeviceProperties() : DeviceProperties(nullptr) {} + ~DeviceProperties() override; + explicit PROTOBUF_CONSTEXPR DeviceProperties(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + DeviceProperties(const DeviceProperties& from); + DeviceProperties(DeviceProperties&& from) noexcept + : DeviceProperties() { + *this = ::std::move(from); + } + + inline DeviceProperties& operator=(const DeviceProperties& from) { + CopyFrom(from); + return *this; + } + inline DeviceProperties& operator=(DeviceProperties&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const DeviceProperties& default_instance() { + return *internal_default_instance(); + } + static inline const DeviceProperties* internal_default_instance() { + return reinterpret_cast( + &_DeviceProperties_default_instance_); + } + static constexpr int kIndexInFileMessages = + 1; + + friend void swap(DeviceProperties& a, DeviceProperties& b) { + a.Swap(&b); + } + inline void Swap(DeviceProperties* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(DeviceProperties* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + DeviceProperties* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const DeviceProperties& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const DeviceProperties& from) { + DeviceProperties::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(DeviceProperties* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.DeviceProperties"; + } + protected: + explicit DeviceProperties(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + + // accessors ------------------------------------------------------- + + enum : int { + kEnvironmentFieldNumber = 6, + kTypeFieldNumber = 1, + kVendorFieldNumber = 2, + kModelFieldNumber = 3, + kFrequencyFieldNumber = 4, + kNumCoresFieldNumber = 5, + kNumRegistersFieldNumber = 7, + kL1CacheSizeFieldNumber = 8, + kL2CacheSizeFieldNumber = 9, + kL3CacheSizeFieldNumber = 10, + kSharedMemorySizePerMultiprocessorFieldNumber = 11, + kMemorySizeFieldNumber = 12, + kBandwidthFieldNumber = 13, + }; + // map environment = 6; + int environment_size() const; + private: + int _internal_environment_size() const; + public: + void clear_environment(); + private: + const ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >& + _internal_environment() const; + ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >* + _internal_mutable_environment(); + public: + const ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >& + environment() const; + ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >* + mutable_environment(); + + // string type = 1; + void clear_type(); + const std::string& type() const; + template + void set_type(ArgT0&& arg0, ArgT... args); + std::string* mutable_type(); + PROTOBUF_NODISCARD std::string* release_type(); + void set_allocated_type(std::string* type); + private: + const std::string& _internal_type() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_type(const std::string& value); + std::string* _internal_mutable_type(); + public: + + // string vendor = 2; + void clear_vendor(); + const std::string& vendor() const; + template + void set_vendor(ArgT0&& arg0, ArgT... args); + std::string* mutable_vendor(); + PROTOBUF_NODISCARD std::string* release_vendor(); + void set_allocated_vendor(std::string* vendor); + private: + const std::string& _internal_vendor() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_vendor(const std::string& value); + std::string* _internal_mutable_vendor(); + public: + + // string model = 3; + void clear_model(); + const std::string& model() const; + template + void set_model(ArgT0&& arg0, ArgT... args); + std::string* mutable_model(); + PROTOBUF_NODISCARD std::string* release_model(); + void set_allocated_model(std::string* model); + private: + const std::string& _internal_model() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_model(const std::string& value); + std::string* _internal_mutable_model(); + public: + + // int64 frequency = 4; + void clear_frequency(); + int64_t frequency() const; + void set_frequency(int64_t value); + private: + int64_t _internal_frequency() const; + void _internal_set_frequency(int64_t value); + public: + + // int64 num_cores = 5; + void clear_num_cores(); + int64_t num_cores() const; + void set_num_cores(int64_t value); + private: + int64_t _internal_num_cores() const; + void _internal_set_num_cores(int64_t value); + public: + + // int64 num_registers = 7; + void clear_num_registers(); + int64_t num_registers() const; + void set_num_registers(int64_t value); + private: + int64_t _internal_num_registers() const; + void _internal_set_num_registers(int64_t value); + public: + + // int64 l1_cache_size = 8; + void clear_l1_cache_size(); + int64_t l1_cache_size() const; + void set_l1_cache_size(int64_t value); + private: + int64_t _internal_l1_cache_size() const; + void _internal_set_l1_cache_size(int64_t value); + public: + + // int64 l2_cache_size = 9; + void clear_l2_cache_size(); + int64_t l2_cache_size() const; + void set_l2_cache_size(int64_t value); + private: + int64_t _internal_l2_cache_size() const; + void _internal_set_l2_cache_size(int64_t value); + public: + + // int64 l3_cache_size = 10; + void clear_l3_cache_size(); + int64_t l3_cache_size() const; + void set_l3_cache_size(int64_t value); + private: + int64_t _internal_l3_cache_size() const; + void _internal_set_l3_cache_size(int64_t value); + public: + + // int64 shared_memory_size_per_multiprocessor = 11; + void clear_shared_memory_size_per_multiprocessor(); + int64_t shared_memory_size_per_multiprocessor() const; + void set_shared_memory_size_per_multiprocessor(int64_t value); + private: + int64_t _internal_shared_memory_size_per_multiprocessor() const; + void _internal_set_shared_memory_size_per_multiprocessor(int64_t value); + public: + + // int64 memory_size = 12; + void clear_memory_size(); + int64_t memory_size() const; + void set_memory_size(int64_t value); + private: + int64_t _internal_memory_size() const; + void _internal_set_memory_size(int64_t value); + public: + + // int64 bandwidth = 13; + void clear_bandwidth(); + int64_t bandwidth() const; + void set_bandwidth(int64_t value); + private: + int64_t _internal_bandwidth() const; + void _internal_set_bandwidth(int64_t value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.DeviceProperties) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::MapField< + DeviceProperties_EnvironmentEntry_DoNotUse, + std::string, std::string, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING> environment_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr type_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr vendor_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr model_; + int64_t frequency_; + int64_t num_cores_; + int64_t num_registers_; + int64_t l1_cache_size_; + int64_t l2_cache_size_; + int64_t l3_cache_size_; + int64_t shared_memory_size_per_multiprocessor_; + int64_t memory_size_; + int64_t bandwidth_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fdevice_5fproperties_2eproto; +}; +// ------------------------------------------------------------------- + +class NamedDevice final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.NamedDevice) */ { + public: + inline NamedDevice() : NamedDevice(nullptr) {} + ~NamedDevice() override; + explicit PROTOBUF_CONSTEXPR NamedDevice(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + NamedDevice(const NamedDevice& from); + NamedDevice(NamedDevice&& from) noexcept + : NamedDevice() { + *this = ::std::move(from); + } + + inline NamedDevice& operator=(const NamedDevice& from) { + CopyFrom(from); + return *this; + } + inline NamedDevice& operator=(NamedDevice&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const NamedDevice& default_instance() { + return *internal_default_instance(); + } + static inline const NamedDevice* internal_default_instance() { + return reinterpret_cast( + &_NamedDevice_default_instance_); + } + static constexpr int kIndexInFileMessages = + 2; + + friend void swap(NamedDevice& a, NamedDevice& b) { + a.Swap(&b); + } + inline void Swap(NamedDevice* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(NamedDevice* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + NamedDevice* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const NamedDevice& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const NamedDevice& from) { + NamedDevice::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(NamedDevice* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.NamedDevice"; + } + protected: + explicit NamedDevice(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kNameFieldNumber = 1, + kPropertiesFieldNumber = 2, + }; + // string name = 1; + void clear_name(); + const std::string& name() const; + template + void set_name(ArgT0&& arg0, ArgT... args); + std::string* mutable_name(); + PROTOBUF_NODISCARD std::string* release_name(); + void set_allocated_name(std::string* name); + private: + const std::string& _internal_name() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_name(const std::string& value); + std::string* _internal_mutable_name(); + public: + + // .tensorflow.DeviceProperties properties = 2; + bool has_properties() const; + private: + bool _internal_has_properties() const; + public: + void clear_properties(); + const ::tensorflow::DeviceProperties& properties() const; + PROTOBUF_NODISCARD ::tensorflow::DeviceProperties* release_properties(); + ::tensorflow::DeviceProperties* mutable_properties(); + void set_allocated_properties(::tensorflow::DeviceProperties* properties); + private: + const ::tensorflow::DeviceProperties& _internal_properties() const; + ::tensorflow::DeviceProperties* _internal_mutable_properties(); + public: + void unsafe_arena_set_allocated_properties( + ::tensorflow::DeviceProperties* properties); + ::tensorflow::DeviceProperties* unsafe_arena_release_properties(); + + // @@protoc_insertion_point(class_scope:tensorflow.NamedDevice) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_; + ::tensorflow::DeviceProperties* properties_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fdevice_5fproperties_2eproto; +}; +// =================================================================== + + +// =================================================================== + +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// ------------------------------------------------------------------- + +// DeviceProperties + +// string type = 1; +inline void DeviceProperties::clear_type() { + _impl_.type_.ClearToEmpty(); +} +inline const std::string& DeviceProperties::type() const { + // @@protoc_insertion_point(field_get:tensorflow.DeviceProperties.type) + return _internal_type(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void DeviceProperties::set_type(ArgT0&& arg0, ArgT... args) { + + _impl_.type_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.DeviceProperties.type) +} +inline std::string* DeviceProperties::mutable_type() { + std::string* _s = _internal_mutable_type(); + // @@protoc_insertion_point(field_mutable:tensorflow.DeviceProperties.type) + return _s; +} +inline const std::string& DeviceProperties::_internal_type() const { + return _impl_.type_.Get(); +} +inline void DeviceProperties::_internal_set_type(const std::string& value) { + + _impl_.type_.Set(value, GetArenaForAllocation()); +} +inline std::string* DeviceProperties::_internal_mutable_type() { + + return _impl_.type_.Mutable(GetArenaForAllocation()); +} +inline std::string* DeviceProperties::release_type() { + // @@protoc_insertion_point(field_release:tensorflow.DeviceProperties.type) + return _impl_.type_.Release(); +} +inline void DeviceProperties::set_allocated_type(std::string* type) { + if (type != nullptr) { + + } else { + + } + _impl_.type_.SetAllocated(type, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.type_.IsDefault()) { + _impl_.type_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.DeviceProperties.type) +} + +// string vendor = 2; +inline void DeviceProperties::clear_vendor() { + _impl_.vendor_.ClearToEmpty(); +} +inline const std::string& DeviceProperties::vendor() const { + // @@protoc_insertion_point(field_get:tensorflow.DeviceProperties.vendor) + return _internal_vendor(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void DeviceProperties::set_vendor(ArgT0&& arg0, ArgT... args) { + + _impl_.vendor_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.DeviceProperties.vendor) +} +inline std::string* DeviceProperties::mutable_vendor() { + std::string* _s = _internal_mutable_vendor(); + // @@protoc_insertion_point(field_mutable:tensorflow.DeviceProperties.vendor) + return _s; +} +inline const std::string& DeviceProperties::_internal_vendor() const { + return _impl_.vendor_.Get(); +} +inline void DeviceProperties::_internal_set_vendor(const std::string& value) { + + _impl_.vendor_.Set(value, GetArenaForAllocation()); +} +inline std::string* DeviceProperties::_internal_mutable_vendor() { + + return _impl_.vendor_.Mutable(GetArenaForAllocation()); +} +inline std::string* DeviceProperties::release_vendor() { + // @@protoc_insertion_point(field_release:tensorflow.DeviceProperties.vendor) + return _impl_.vendor_.Release(); +} +inline void DeviceProperties::set_allocated_vendor(std::string* vendor) { + if (vendor != nullptr) { + + } else { + + } + _impl_.vendor_.SetAllocated(vendor, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.vendor_.IsDefault()) { + _impl_.vendor_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.DeviceProperties.vendor) +} + +// string model = 3; +inline void DeviceProperties::clear_model() { + _impl_.model_.ClearToEmpty(); +} +inline const std::string& DeviceProperties::model() const { + // @@protoc_insertion_point(field_get:tensorflow.DeviceProperties.model) + return _internal_model(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void DeviceProperties::set_model(ArgT0&& arg0, ArgT... args) { + + _impl_.model_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.DeviceProperties.model) +} +inline std::string* DeviceProperties::mutable_model() { + std::string* _s = _internal_mutable_model(); + // @@protoc_insertion_point(field_mutable:tensorflow.DeviceProperties.model) + return _s; +} +inline const std::string& DeviceProperties::_internal_model() const { + return _impl_.model_.Get(); +} +inline void DeviceProperties::_internal_set_model(const std::string& value) { + + _impl_.model_.Set(value, GetArenaForAllocation()); +} +inline std::string* DeviceProperties::_internal_mutable_model() { + + return _impl_.model_.Mutable(GetArenaForAllocation()); +} +inline std::string* DeviceProperties::release_model() { + // @@protoc_insertion_point(field_release:tensorflow.DeviceProperties.model) + return _impl_.model_.Release(); +} +inline void DeviceProperties::set_allocated_model(std::string* model) { + if (model != nullptr) { + + } else { + + } + _impl_.model_.SetAllocated(model, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.model_.IsDefault()) { + _impl_.model_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.DeviceProperties.model) +} + +// int64 frequency = 4; +inline void DeviceProperties::clear_frequency() { + _impl_.frequency_ = int64_t{0}; +} +inline int64_t DeviceProperties::_internal_frequency() const { + return _impl_.frequency_; +} +inline int64_t DeviceProperties::frequency() const { + // @@protoc_insertion_point(field_get:tensorflow.DeviceProperties.frequency) + return _internal_frequency(); +} +inline void DeviceProperties::_internal_set_frequency(int64_t value) { + + _impl_.frequency_ = value; +} +inline void DeviceProperties::set_frequency(int64_t value) { + _internal_set_frequency(value); + // @@protoc_insertion_point(field_set:tensorflow.DeviceProperties.frequency) +} + +// int64 num_cores = 5; +inline void DeviceProperties::clear_num_cores() { + _impl_.num_cores_ = int64_t{0}; +} +inline int64_t DeviceProperties::_internal_num_cores() const { + return _impl_.num_cores_; +} +inline int64_t DeviceProperties::num_cores() const { + // @@protoc_insertion_point(field_get:tensorflow.DeviceProperties.num_cores) + return _internal_num_cores(); +} +inline void DeviceProperties::_internal_set_num_cores(int64_t value) { + + _impl_.num_cores_ = value; +} +inline void DeviceProperties::set_num_cores(int64_t value) { + _internal_set_num_cores(value); + // @@protoc_insertion_point(field_set:tensorflow.DeviceProperties.num_cores) +} + +// map environment = 6; +inline int DeviceProperties::_internal_environment_size() const { + return _impl_.environment_.size(); +} +inline int DeviceProperties::environment_size() const { + return _internal_environment_size(); +} +inline void DeviceProperties::clear_environment() { + _impl_.environment_.Clear(); +} +inline const ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >& +DeviceProperties::_internal_environment() const { + return _impl_.environment_.GetMap(); +} +inline const ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >& +DeviceProperties::environment() const { + // @@protoc_insertion_point(field_map:tensorflow.DeviceProperties.environment) + return _internal_environment(); +} +inline ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >* +DeviceProperties::_internal_mutable_environment() { + return _impl_.environment_.MutableMap(); +} +inline ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >* +DeviceProperties::mutable_environment() { + // @@protoc_insertion_point(field_mutable_map:tensorflow.DeviceProperties.environment) + return _internal_mutable_environment(); +} + +// int64 num_registers = 7; +inline void DeviceProperties::clear_num_registers() { + _impl_.num_registers_ = int64_t{0}; +} +inline int64_t DeviceProperties::_internal_num_registers() const { + return _impl_.num_registers_; +} +inline int64_t DeviceProperties::num_registers() const { + // @@protoc_insertion_point(field_get:tensorflow.DeviceProperties.num_registers) + return _internal_num_registers(); +} +inline void DeviceProperties::_internal_set_num_registers(int64_t value) { + + _impl_.num_registers_ = value; +} +inline void DeviceProperties::set_num_registers(int64_t value) { + _internal_set_num_registers(value); + // @@protoc_insertion_point(field_set:tensorflow.DeviceProperties.num_registers) +} + +// int64 l1_cache_size = 8; +inline void DeviceProperties::clear_l1_cache_size() { + _impl_.l1_cache_size_ = int64_t{0}; +} +inline int64_t DeviceProperties::_internal_l1_cache_size() const { + return _impl_.l1_cache_size_; +} +inline int64_t DeviceProperties::l1_cache_size() const { + // @@protoc_insertion_point(field_get:tensorflow.DeviceProperties.l1_cache_size) + return _internal_l1_cache_size(); +} +inline void DeviceProperties::_internal_set_l1_cache_size(int64_t value) { + + _impl_.l1_cache_size_ = value; +} +inline void DeviceProperties::set_l1_cache_size(int64_t value) { + _internal_set_l1_cache_size(value); + // @@protoc_insertion_point(field_set:tensorflow.DeviceProperties.l1_cache_size) +} + +// int64 l2_cache_size = 9; +inline void DeviceProperties::clear_l2_cache_size() { + _impl_.l2_cache_size_ = int64_t{0}; +} +inline int64_t DeviceProperties::_internal_l2_cache_size() const { + return _impl_.l2_cache_size_; +} +inline int64_t DeviceProperties::l2_cache_size() const { + // @@protoc_insertion_point(field_get:tensorflow.DeviceProperties.l2_cache_size) + return _internal_l2_cache_size(); +} +inline void DeviceProperties::_internal_set_l2_cache_size(int64_t value) { + + _impl_.l2_cache_size_ = value; +} +inline void DeviceProperties::set_l2_cache_size(int64_t value) { + _internal_set_l2_cache_size(value); + // @@protoc_insertion_point(field_set:tensorflow.DeviceProperties.l2_cache_size) +} + +// int64 l3_cache_size = 10; +inline void DeviceProperties::clear_l3_cache_size() { + _impl_.l3_cache_size_ = int64_t{0}; +} +inline int64_t DeviceProperties::_internal_l3_cache_size() const { + return _impl_.l3_cache_size_; +} +inline int64_t DeviceProperties::l3_cache_size() const { + // @@protoc_insertion_point(field_get:tensorflow.DeviceProperties.l3_cache_size) + return _internal_l3_cache_size(); +} +inline void DeviceProperties::_internal_set_l3_cache_size(int64_t value) { + + _impl_.l3_cache_size_ = value; +} +inline void DeviceProperties::set_l3_cache_size(int64_t value) { + _internal_set_l3_cache_size(value); + // @@protoc_insertion_point(field_set:tensorflow.DeviceProperties.l3_cache_size) +} + +// int64 shared_memory_size_per_multiprocessor = 11; +inline void DeviceProperties::clear_shared_memory_size_per_multiprocessor() { + _impl_.shared_memory_size_per_multiprocessor_ = int64_t{0}; +} +inline int64_t DeviceProperties::_internal_shared_memory_size_per_multiprocessor() const { + return _impl_.shared_memory_size_per_multiprocessor_; +} +inline int64_t DeviceProperties::shared_memory_size_per_multiprocessor() const { + // @@protoc_insertion_point(field_get:tensorflow.DeviceProperties.shared_memory_size_per_multiprocessor) + return _internal_shared_memory_size_per_multiprocessor(); +} +inline void DeviceProperties::_internal_set_shared_memory_size_per_multiprocessor(int64_t value) { + + _impl_.shared_memory_size_per_multiprocessor_ = value; +} +inline void DeviceProperties::set_shared_memory_size_per_multiprocessor(int64_t value) { + _internal_set_shared_memory_size_per_multiprocessor(value); + // @@protoc_insertion_point(field_set:tensorflow.DeviceProperties.shared_memory_size_per_multiprocessor) +} + +// int64 memory_size = 12; +inline void DeviceProperties::clear_memory_size() { + _impl_.memory_size_ = int64_t{0}; +} +inline int64_t DeviceProperties::_internal_memory_size() const { + return _impl_.memory_size_; +} +inline int64_t DeviceProperties::memory_size() const { + // @@protoc_insertion_point(field_get:tensorflow.DeviceProperties.memory_size) + return _internal_memory_size(); +} +inline void DeviceProperties::_internal_set_memory_size(int64_t value) { + + _impl_.memory_size_ = value; +} +inline void DeviceProperties::set_memory_size(int64_t value) { + _internal_set_memory_size(value); + // @@protoc_insertion_point(field_set:tensorflow.DeviceProperties.memory_size) +} + +// int64 bandwidth = 13; +inline void DeviceProperties::clear_bandwidth() { + _impl_.bandwidth_ = int64_t{0}; +} +inline int64_t DeviceProperties::_internal_bandwidth() const { + return _impl_.bandwidth_; +} +inline int64_t DeviceProperties::bandwidth() const { + // @@protoc_insertion_point(field_get:tensorflow.DeviceProperties.bandwidth) + return _internal_bandwidth(); +} +inline void DeviceProperties::_internal_set_bandwidth(int64_t value) { + + _impl_.bandwidth_ = value; +} +inline void DeviceProperties::set_bandwidth(int64_t value) { + _internal_set_bandwidth(value); + // @@protoc_insertion_point(field_set:tensorflow.DeviceProperties.bandwidth) +} + +// ------------------------------------------------------------------- + +// NamedDevice + +// string name = 1; +inline void NamedDevice::clear_name() { + _impl_.name_.ClearToEmpty(); +} +inline const std::string& NamedDevice::name() const { + // @@protoc_insertion_point(field_get:tensorflow.NamedDevice.name) + return _internal_name(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void NamedDevice::set_name(ArgT0&& arg0, ArgT... args) { + + _impl_.name_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.NamedDevice.name) +} +inline std::string* NamedDevice::mutable_name() { + std::string* _s = _internal_mutable_name(); + // @@protoc_insertion_point(field_mutable:tensorflow.NamedDevice.name) + return _s; +} +inline const std::string& NamedDevice::_internal_name() const { + return _impl_.name_.Get(); +} +inline void NamedDevice::_internal_set_name(const std::string& value) { + + _impl_.name_.Set(value, GetArenaForAllocation()); +} +inline std::string* NamedDevice::_internal_mutable_name() { + + return _impl_.name_.Mutable(GetArenaForAllocation()); +} +inline std::string* NamedDevice::release_name() { + // @@protoc_insertion_point(field_release:tensorflow.NamedDevice.name) + return _impl_.name_.Release(); +} +inline void NamedDevice::set_allocated_name(std::string* name) { + if (name != nullptr) { + + } else { + + } + _impl_.name_.SetAllocated(name, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.name_.IsDefault()) { + _impl_.name_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.NamedDevice.name) +} + +// .tensorflow.DeviceProperties properties = 2; +inline bool NamedDevice::_internal_has_properties() const { + return this != internal_default_instance() && _impl_.properties_ != nullptr; +} +inline bool NamedDevice::has_properties() const { + return _internal_has_properties(); +} +inline void NamedDevice::clear_properties() { + if (GetArenaForAllocation() == nullptr && _impl_.properties_ != nullptr) { + delete _impl_.properties_; + } + _impl_.properties_ = nullptr; +} +inline const ::tensorflow::DeviceProperties& NamedDevice::_internal_properties() const { + const ::tensorflow::DeviceProperties* p = _impl_.properties_; + return p != nullptr ? *p : reinterpret_cast( + ::tensorflow::_DeviceProperties_default_instance_); +} +inline const ::tensorflow::DeviceProperties& NamedDevice::properties() const { + // @@protoc_insertion_point(field_get:tensorflow.NamedDevice.properties) + return _internal_properties(); +} +inline void NamedDevice::unsafe_arena_set_allocated_properties( + ::tensorflow::DeviceProperties* properties) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.properties_); + } + _impl_.properties_ = properties; + if (properties) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.NamedDevice.properties) +} +inline ::tensorflow::DeviceProperties* NamedDevice::release_properties() { + + ::tensorflow::DeviceProperties* temp = _impl_.properties_; + _impl_.properties_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tensorflow::DeviceProperties* NamedDevice::unsafe_arena_release_properties() { + // @@protoc_insertion_point(field_release:tensorflow.NamedDevice.properties) + + ::tensorflow::DeviceProperties* temp = _impl_.properties_; + _impl_.properties_ = nullptr; + return temp; +} +inline ::tensorflow::DeviceProperties* NamedDevice::_internal_mutable_properties() { + + if (_impl_.properties_ == nullptr) { + auto* p = CreateMaybeMessage<::tensorflow::DeviceProperties>(GetArenaForAllocation()); + _impl_.properties_ = p; + } + return _impl_.properties_; +} +inline ::tensorflow::DeviceProperties* NamedDevice::mutable_properties() { + ::tensorflow::DeviceProperties* _msg = _internal_mutable_properties(); + // @@protoc_insertion_point(field_mutable:tensorflow.NamedDevice.properties) + return _msg; +} +inline void NamedDevice::set_allocated_properties(::tensorflow::DeviceProperties* properties) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete _impl_.properties_; + } + if (properties) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(properties); + if (message_arena != submessage_arena) { + properties = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, properties, submessage_arena); + } + + } else { + + } + _impl_.properties_ = properties; + // @@protoc_insertion_point(field_set_allocated:tensorflow.NamedDevice.properties) +} + +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + + +// @@protoc_insertion_point(namespace_scope) + +} // namespace tensorflow + +// @@protoc_insertion_point(global_scope) + +#include +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprotobuf_2fdevice_5fproperties_2eproto diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/device_properties.proto b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/device_properties.proto new file mode 100644 index 0000000000000000000000000000000000000000..b892bdcc85412d922978fda88c90bffb005c6da9 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/device_properties.proto @@ -0,0 +1,58 @@ +/* Copyright 2017 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +syntax = "proto3"; + +package tensorflow; + +option cc_enable_arenas = true; +option java_outer_classname = "DevicePropertiesProtos"; +option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/protobuf/for_core_protos_go_proto"; + +message DeviceProperties { + // Device type (CPU, GPU, ...) + string type = 1; + // Vendor (Intel, nvidia, ...) + string vendor = 2; + // Model (Haswell, K40, ...) + string model = 3; + // Core Frequency in Mhz + int64 frequency = 4; + // Number of cores + int64 num_cores = 5; + // Version of the tools and libraries used with this device (e.g. gcc 4.9, + // cudnn 5.1) + map environment = 6; + // Number of registers per core. + int64 num_registers = 7; + // L1 cache size in bytes + int64 l1_cache_size = 8; + // L2 cache size in bytes + int64 l2_cache_size = 9; + // L3 cache size in bytes + int64 l3_cache_size = 10; + // Shared memory size per multiprocessor in bytes. This field is + // applicable to GPUs only. + int64 shared_memory_size_per_multiprocessor = 11; + // Memory size in bytes + int64 memory_size = 12; + // Memory bandwidth in KB/s + int64 bandwidth = 13; +} + +message NamedDevice { + string name = 1; + DeviceProperties properties = 2; +} diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/eager_service.grpc.pb.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/eager_service.grpc.pb.h new file mode 100644 index 0000000000000000000000000000000000000000..f35bc65035d67301ab809c58f2d1bd6607853c79 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/eager_service.grpc.pb.h @@ -0,0 +1,1870 @@ +// Generated by the gRPC C++ plugin. +// If you make any local change, they will be lost. +// source: tensorflow/core/protobuf/eager_service.proto +#ifndef GRPC_tensorflow_2fcore_2fprotobuf_2feager_5fservice_2eproto__INCLUDED +#define GRPC_tensorflow_2fcore_2fprotobuf_2feager_5fservice_2eproto__INCLUDED + +#include "tensorflow/core/protobuf/eager_service.pb.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace tensorflow { +namespace eager { + + +namespace grpc { + +// ////////////////////////////////////////////////////////////////////////////// +// +// Eager Service defines a TensorFlow service that executes operations eagerly +// on a set of local devices, on behalf of a remote Eager executor. +// +// The service impl will keep track of the various clients and devices it has +// access to and allows the client to enqueue ops on any devices that it is able +// to access and schedule data transfers from/to any of the peers. +// +// A client can generate multiple contexts to be able to independently execute +// operations, but cannot share data between the two contexts. +// +// NOTE: Even though contexts generated by clients should be independent, the +// lower level tensorflow execution engine is not, so they might share some data +// (e.g. a Device's ResourceMgr). +// +// ////////////////////////////////////////////////////////////////////////////// +class EagerService final { + public: + static constexpr char const* service_full_name() { + return "tensorflow.eager.EagerService"; + } + class StubInterface { + public: + virtual ~StubInterface() {} + // This initializes the worker, informing it about the other workers in the + // cluster and exchanging authentication tokens which will be used in all + // other RPCs to detect whether the worker has restarted. + virtual ::grpc::Status CreateContext(::grpc::ClientContext* context, const ::tensorflow::eager::CreateContextRequest& request, ::tensorflow::eager::CreateContextResponse* response) = 0; + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::tensorflow::eager::CreateContextResponse>> AsyncCreateContext(::grpc::ClientContext* context, const ::tensorflow::eager::CreateContextRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::tensorflow::eager::CreateContextResponse>>(AsyncCreateContextRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::tensorflow::eager::CreateContextResponse>> PrepareAsyncCreateContext(::grpc::ClientContext* context, const ::tensorflow::eager::CreateContextRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::tensorflow::eager::CreateContextResponse>>(PrepareAsyncCreateContextRaw(context, request, cq)); + } + // [AUTOMATION]: Internal rpc option goes here. + // This updates the eager context on an existing worker when updating the set + // of servers in a distributed eager cluster. + virtual ::grpc::Status UpdateContext(::grpc::ClientContext* context, const ::tensorflow::eager::UpdateContextRequest& request, ::tensorflow::eager::UpdateContextResponse* response) = 0; + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::tensorflow::eager::UpdateContextResponse>> AsyncUpdateContext(::grpc::ClientContext* context, const ::tensorflow::eager::UpdateContextRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::tensorflow::eager::UpdateContextResponse>>(AsyncUpdateContextRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::tensorflow::eager::UpdateContextResponse>> PrepareAsyncUpdateContext(::grpc::ClientContext* context, const ::tensorflow::eager::UpdateContextRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::tensorflow::eager::UpdateContextResponse>>(PrepareAsyncUpdateContextRaw(context, request, cq)); + } + // [AUTOMATION]: Internal rpc option goes here. + // This takes a list of Execute and DeleteTensorHandle operations and enqueues + // (in async mode) or executes (in sync mode) them on the remote server. + // All outputs of ops which were not explicitly deleted with + // DeleteTensorHandle entries will be assumed to be alive and are usable by + // future calls to Enqueue. + virtual ::grpc::Status Enqueue(::grpc::ClientContext* context, const ::tensorflow::eager::EnqueueRequest& request, ::tensorflow::eager::EnqueueResponse* response) = 0; + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::tensorflow::eager::EnqueueResponse>> AsyncEnqueue(::grpc::ClientContext* context, const ::tensorflow::eager::EnqueueRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::tensorflow::eager::EnqueueResponse>>(AsyncEnqueueRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::tensorflow::eager::EnqueueResponse>> PrepareAsyncEnqueue(::grpc::ClientContext* context, const ::tensorflow::eager::EnqueueRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::tensorflow::eager::EnqueueResponse>>(PrepareAsyncEnqueueRaw(context, request, cq)); + } + // [AUTOMATION]: Internal rpc option goes here. + // A streaming version of Enqueue. + // Current server implementation sends one response per received request. + // The benefit for using a streaming version is that subsequent requests + // can be sent without waiting for a response to the previous request. This + // synchronization is required in the regular Enqueue call because gRPC does + // not guarantee to preserve request order. + std::unique_ptr< ::grpc::ClientReaderWriterInterface< ::tensorflow::eager::EnqueueRequest, ::tensorflow::eager::EnqueueResponse>> StreamingEnqueue(::grpc::ClientContext* context) { + return std::unique_ptr< ::grpc::ClientReaderWriterInterface< ::tensorflow::eager::EnqueueRequest, ::tensorflow::eager::EnqueueResponse>>(StreamingEnqueueRaw(context)); + } + std::unique_ptr< ::grpc::ClientAsyncReaderWriterInterface< ::tensorflow::eager::EnqueueRequest, ::tensorflow::eager::EnqueueResponse>> AsyncStreamingEnqueue(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) { + return std::unique_ptr< ::grpc::ClientAsyncReaderWriterInterface< ::tensorflow::eager::EnqueueRequest, ::tensorflow::eager::EnqueueResponse>>(AsyncStreamingEnqueueRaw(context, cq, tag)); + } + std::unique_ptr< ::grpc::ClientAsyncReaderWriterInterface< ::tensorflow::eager::EnqueueRequest, ::tensorflow::eager::EnqueueResponse>> PrepareAsyncStreamingEnqueue(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncReaderWriterInterface< ::tensorflow::eager::EnqueueRequest, ::tensorflow::eager::EnqueueResponse>>(PrepareAsyncStreamingEnqueueRaw(context, cq)); + } + // [AUTOMATION]: Internal rpc option goes here. + // Takes a set of op IDs and waits until those ops are done. Returns any error + // in the stream so far. + virtual ::grpc::Status WaitQueueDone(::grpc::ClientContext* context, const ::tensorflow::eager::WaitQueueDoneRequest& request, ::tensorflow::eager::WaitQueueDoneResponse* response) = 0; + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::tensorflow::eager::WaitQueueDoneResponse>> AsyncWaitQueueDone(::grpc::ClientContext* context, const ::tensorflow::eager::WaitQueueDoneRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::tensorflow::eager::WaitQueueDoneResponse>>(AsyncWaitQueueDoneRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::tensorflow::eager::WaitQueueDoneResponse>> PrepareAsyncWaitQueueDone(::grpc::ClientContext* context, const ::tensorflow::eager::WaitQueueDoneRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::tensorflow::eager::WaitQueueDoneResponse>>(PrepareAsyncWaitQueueDoneRaw(context, request, cq)); + } + // [AUTOMATION]: Internal rpc option goes here. + // This takes an Eager operation and executes it in async mode on the remote + // server. Different from EnqueueRequest, ops/functions sent through this + // type of requests are allowed to execute in parallel and no ordering is + // preserved by RPC stream or executor. + // This request type should only be used for executing component functions. + // Ordering of component functions should be enforced by their corresponding + // main functions. The runtime ensures the following invarients for component + // functions (CFs) and their main functions (MFs): + // (1) MF1 -> MF2 ==> CF1 -> CF2 ("->" indicates order of execution); + // (2) MF1 || MF2 ==> CF1 || CF2 ("||" indicates possible parallel execution); + // (3) For CF1 and CF2 that come from the same MF, CF1 || CF2 + // For executing ops/main functions, use Enqueue or StreamingEnqueue instead + // for correct ordering. + virtual ::grpc::Status RunComponentFunction(::grpc::ClientContext* context, const ::tensorflow::eager::RunComponentFunctionRequest& request, ::tensorflow::eager::RunComponentFunctionResponse* response) = 0; + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::tensorflow::eager::RunComponentFunctionResponse>> AsyncRunComponentFunction(::grpc::ClientContext* context, const ::tensorflow::eager::RunComponentFunctionRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::tensorflow::eager::RunComponentFunctionResponse>>(AsyncRunComponentFunctionRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::tensorflow::eager::RunComponentFunctionResponse>> PrepareAsyncRunComponentFunction(::grpc::ClientContext* context, const ::tensorflow::eager::RunComponentFunctionRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::tensorflow::eager::RunComponentFunctionResponse>>(PrepareAsyncRunComponentFunctionRaw(context, request, cq)); + } + // [AUTOMATION]: Internal rpc option goes here. + // Contexts are always created with a deadline and no RPCs within a deadline + // will trigger a context garbage collection. KeepAlive calls can be used to + // delay this. It can also be used to validate the existence of a context ID + // on remote eager worker. If the context is on remote worker, return the same + // ID and the current context view ID. This is useful for checking if the + // remote worker (potentially with the same task name and hostname / port) is + // replaced with a new process. + virtual ::grpc::Status KeepAlive(::grpc::ClientContext* context, const ::tensorflow::eager::KeepAliveRequest& request, ::tensorflow::eager::KeepAliveResponse* response) = 0; + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::tensorflow::eager::KeepAliveResponse>> AsyncKeepAlive(::grpc::ClientContext* context, const ::tensorflow::eager::KeepAliveRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::tensorflow::eager::KeepAliveResponse>>(AsyncKeepAliveRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::tensorflow::eager::KeepAliveResponse>> PrepareAsyncKeepAlive(::grpc::ClientContext* context, const ::tensorflow::eager::KeepAliveRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::tensorflow::eager::KeepAliveResponse>>(PrepareAsyncKeepAliveRaw(context, request, cq)); + } + // [AUTOMATION]: Internal rpc option goes here. + // Closes the context. No calls to other methods using the existing context ID + // are valid after this. + virtual ::grpc::Status CloseContext(::grpc::ClientContext* context, const ::tensorflow::eager::CloseContextRequest& request, ::tensorflow::eager::CloseContextResponse* response) = 0; + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::tensorflow::eager::CloseContextResponse>> AsyncCloseContext(::grpc::ClientContext* context, const ::tensorflow::eager::CloseContextRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::tensorflow::eager::CloseContextResponse>>(AsyncCloseContextRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::tensorflow::eager::CloseContextResponse>> PrepareAsyncCloseContext(::grpc::ClientContext* context, const ::tensorflow::eager::CloseContextRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::tensorflow::eager::CloseContextResponse>>(PrepareAsyncCloseContextRaw(context, request, cq)); + } + // [AUTOMATION]: Internal rpc option goes here. + class experimental_async_interface { + public: + virtual ~experimental_async_interface() {} + // This initializes the worker, informing it about the other workers in the + // cluster and exchanging authentication tokens which will be used in all + // other RPCs to detect whether the worker has restarted. + virtual void CreateContext(::grpc::ClientContext* context, const ::tensorflow::eager::CreateContextRequest* request, ::tensorflow::eager::CreateContextResponse* response, std::function) = 0; + virtual void CreateContext(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::tensorflow::eager::CreateContextResponse* response, std::function) = 0; + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual void CreateContext(::grpc::ClientContext* context, const ::tensorflow::eager::CreateContextRequest* request, ::tensorflow::eager::CreateContextResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0; + #else + virtual void CreateContext(::grpc::ClientContext* context, const ::tensorflow::eager::CreateContextRequest* request, ::tensorflow::eager::CreateContextResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0; + #endif + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual void CreateContext(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::tensorflow::eager::CreateContextResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0; + #else + virtual void CreateContext(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::tensorflow::eager::CreateContextResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0; + #endif + // [AUTOMATION]: Internal rpc option goes here. + // This updates the eager context on an existing worker when updating the set + // of servers in a distributed eager cluster. + virtual void UpdateContext(::grpc::ClientContext* context, const ::tensorflow::eager::UpdateContextRequest* request, ::tensorflow::eager::UpdateContextResponse* response, std::function) = 0; + virtual void UpdateContext(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::tensorflow::eager::UpdateContextResponse* response, std::function) = 0; + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual void UpdateContext(::grpc::ClientContext* context, const ::tensorflow::eager::UpdateContextRequest* request, ::tensorflow::eager::UpdateContextResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0; + #else + virtual void UpdateContext(::grpc::ClientContext* context, const ::tensorflow::eager::UpdateContextRequest* request, ::tensorflow::eager::UpdateContextResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0; + #endif + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual void UpdateContext(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::tensorflow::eager::UpdateContextResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0; + #else + virtual void UpdateContext(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::tensorflow::eager::UpdateContextResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0; + #endif + // [AUTOMATION]: Internal rpc option goes here. + // This takes a list of Execute and DeleteTensorHandle operations and enqueues + // (in async mode) or executes (in sync mode) them on the remote server. + // All outputs of ops which were not explicitly deleted with + // DeleteTensorHandle entries will be assumed to be alive and are usable by + // future calls to Enqueue. + virtual void Enqueue(::grpc::ClientContext* context, const ::tensorflow::eager::EnqueueRequest* request, ::tensorflow::eager::EnqueueResponse* response, std::function) = 0; + virtual void Enqueue(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::tensorflow::eager::EnqueueResponse* response, std::function) = 0; + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual void Enqueue(::grpc::ClientContext* context, const ::tensorflow::eager::EnqueueRequest* request, ::tensorflow::eager::EnqueueResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0; + #else + virtual void Enqueue(::grpc::ClientContext* context, const ::tensorflow::eager::EnqueueRequest* request, ::tensorflow::eager::EnqueueResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0; + #endif + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual void Enqueue(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::tensorflow::eager::EnqueueResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0; + #else + virtual void Enqueue(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::tensorflow::eager::EnqueueResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0; + #endif + // [AUTOMATION]: Internal rpc option goes here. + // A streaming version of Enqueue. + // Current server implementation sends one response per received request. + // The benefit for using a streaming version is that subsequent requests + // can be sent without waiting for a response to the previous request. This + // synchronization is required in the regular Enqueue call because gRPC does + // not guarantee to preserve request order. + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual void StreamingEnqueue(::grpc::ClientContext* context, ::grpc::ClientBidiReactor< ::tensorflow::eager::EnqueueRequest,::tensorflow::eager::EnqueueResponse>* reactor) = 0; + #else + virtual void StreamingEnqueue(::grpc::ClientContext* context, ::grpc::experimental::ClientBidiReactor< ::tensorflow::eager::EnqueueRequest,::tensorflow::eager::EnqueueResponse>* reactor) = 0; + #endif + // [AUTOMATION]: Internal rpc option goes here. + // Takes a set of op IDs and waits until those ops are done. Returns any error + // in the stream so far. + virtual void WaitQueueDone(::grpc::ClientContext* context, const ::tensorflow::eager::WaitQueueDoneRequest* request, ::tensorflow::eager::WaitQueueDoneResponse* response, std::function) = 0; + virtual void WaitQueueDone(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::tensorflow::eager::WaitQueueDoneResponse* response, std::function) = 0; + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual void WaitQueueDone(::grpc::ClientContext* context, const ::tensorflow::eager::WaitQueueDoneRequest* request, ::tensorflow::eager::WaitQueueDoneResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0; + #else + virtual void WaitQueueDone(::grpc::ClientContext* context, const ::tensorflow::eager::WaitQueueDoneRequest* request, ::tensorflow::eager::WaitQueueDoneResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0; + #endif + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual void WaitQueueDone(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::tensorflow::eager::WaitQueueDoneResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0; + #else + virtual void WaitQueueDone(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::tensorflow::eager::WaitQueueDoneResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0; + #endif + // [AUTOMATION]: Internal rpc option goes here. + // This takes an Eager operation and executes it in async mode on the remote + // server. Different from EnqueueRequest, ops/functions sent through this + // type of requests are allowed to execute in parallel and no ordering is + // preserved by RPC stream or executor. + // This request type should only be used for executing component functions. + // Ordering of component functions should be enforced by their corresponding + // main functions. The runtime ensures the following invarients for component + // functions (CFs) and their main functions (MFs): + // (1) MF1 -> MF2 ==> CF1 -> CF2 ("->" indicates order of execution); + // (2) MF1 || MF2 ==> CF1 || CF2 ("||" indicates possible parallel execution); + // (3) For CF1 and CF2 that come from the same MF, CF1 || CF2 + // For executing ops/main functions, use Enqueue or StreamingEnqueue instead + // for correct ordering. + virtual void RunComponentFunction(::grpc::ClientContext* context, const ::tensorflow::eager::RunComponentFunctionRequest* request, ::tensorflow::eager::RunComponentFunctionResponse* response, std::function) = 0; + virtual void RunComponentFunction(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::tensorflow::eager::RunComponentFunctionResponse* response, std::function) = 0; + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual void RunComponentFunction(::grpc::ClientContext* context, const ::tensorflow::eager::RunComponentFunctionRequest* request, ::tensorflow::eager::RunComponentFunctionResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0; + #else + virtual void RunComponentFunction(::grpc::ClientContext* context, const ::tensorflow::eager::RunComponentFunctionRequest* request, ::tensorflow::eager::RunComponentFunctionResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0; + #endif + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual void RunComponentFunction(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::tensorflow::eager::RunComponentFunctionResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0; + #else + virtual void RunComponentFunction(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::tensorflow::eager::RunComponentFunctionResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0; + #endif + // [AUTOMATION]: Internal rpc option goes here. + // Contexts are always created with a deadline and no RPCs within a deadline + // will trigger a context garbage collection. KeepAlive calls can be used to + // delay this. It can also be used to validate the existence of a context ID + // on remote eager worker. If the context is on remote worker, return the same + // ID and the current context view ID. This is useful for checking if the + // remote worker (potentially with the same task name and hostname / port) is + // replaced with a new process. + virtual void KeepAlive(::grpc::ClientContext* context, const ::tensorflow::eager::KeepAliveRequest* request, ::tensorflow::eager::KeepAliveResponse* response, std::function) = 0; + virtual void KeepAlive(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::tensorflow::eager::KeepAliveResponse* response, std::function) = 0; + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual void KeepAlive(::grpc::ClientContext* context, const ::tensorflow::eager::KeepAliveRequest* request, ::tensorflow::eager::KeepAliveResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0; + #else + virtual void KeepAlive(::grpc::ClientContext* context, const ::tensorflow::eager::KeepAliveRequest* request, ::tensorflow::eager::KeepAliveResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0; + #endif + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual void KeepAlive(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::tensorflow::eager::KeepAliveResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0; + #else + virtual void KeepAlive(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::tensorflow::eager::KeepAliveResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0; + #endif + // [AUTOMATION]: Internal rpc option goes here. + // Closes the context. No calls to other methods using the existing context ID + // are valid after this. + virtual void CloseContext(::grpc::ClientContext* context, const ::tensorflow::eager::CloseContextRequest* request, ::tensorflow::eager::CloseContextResponse* response, std::function) = 0; + virtual void CloseContext(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::tensorflow::eager::CloseContextResponse* response, std::function) = 0; + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual void CloseContext(::grpc::ClientContext* context, const ::tensorflow::eager::CloseContextRequest* request, ::tensorflow::eager::CloseContextResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0; + #else + virtual void CloseContext(::grpc::ClientContext* context, const ::tensorflow::eager::CloseContextRequest* request, ::tensorflow::eager::CloseContextResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0; + #endif + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual void CloseContext(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::tensorflow::eager::CloseContextResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0; + #else + virtual void CloseContext(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::tensorflow::eager::CloseContextResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0; + #endif + // [AUTOMATION]: Internal rpc option goes here. + }; + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + typedef class experimental_async_interface async_interface; + #endif + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + async_interface* async() { return experimental_async(); } + #endif + virtual class experimental_async_interface* experimental_async() { return nullptr; } + private: + virtual ::grpc::ClientAsyncResponseReaderInterface< ::tensorflow::eager::CreateContextResponse>* AsyncCreateContextRaw(::grpc::ClientContext* context, const ::tensorflow::eager::CreateContextRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::tensorflow::eager::CreateContextResponse>* PrepareAsyncCreateContextRaw(::grpc::ClientContext* context, const ::tensorflow::eager::CreateContextRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::tensorflow::eager::UpdateContextResponse>* AsyncUpdateContextRaw(::grpc::ClientContext* context, const ::tensorflow::eager::UpdateContextRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::tensorflow::eager::UpdateContextResponse>* PrepareAsyncUpdateContextRaw(::grpc::ClientContext* context, const ::tensorflow::eager::UpdateContextRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::tensorflow::eager::EnqueueResponse>* AsyncEnqueueRaw(::grpc::ClientContext* context, const ::tensorflow::eager::EnqueueRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::tensorflow::eager::EnqueueResponse>* PrepareAsyncEnqueueRaw(::grpc::ClientContext* context, const ::tensorflow::eager::EnqueueRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientReaderWriterInterface< ::tensorflow::eager::EnqueueRequest, ::tensorflow::eager::EnqueueResponse>* StreamingEnqueueRaw(::grpc::ClientContext* context) = 0; + virtual ::grpc::ClientAsyncReaderWriterInterface< ::tensorflow::eager::EnqueueRequest, ::tensorflow::eager::EnqueueResponse>* AsyncStreamingEnqueueRaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) = 0; + virtual ::grpc::ClientAsyncReaderWriterInterface< ::tensorflow::eager::EnqueueRequest, ::tensorflow::eager::EnqueueResponse>* PrepareAsyncStreamingEnqueueRaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::tensorflow::eager::WaitQueueDoneResponse>* AsyncWaitQueueDoneRaw(::grpc::ClientContext* context, const ::tensorflow::eager::WaitQueueDoneRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::tensorflow::eager::WaitQueueDoneResponse>* PrepareAsyncWaitQueueDoneRaw(::grpc::ClientContext* context, const ::tensorflow::eager::WaitQueueDoneRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::tensorflow::eager::RunComponentFunctionResponse>* AsyncRunComponentFunctionRaw(::grpc::ClientContext* context, const ::tensorflow::eager::RunComponentFunctionRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::tensorflow::eager::RunComponentFunctionResponse>* PrepareAsyncRunComponentFunctionRaw(::grpc::ClientContext* context, const ::tensorflow::eager::RunComponentFunctionRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::tensorflow::eager::KeepAliveResponse>* AsyncKeepAliveRaw(::grpc::ClientContext* context, const ::tensorflow::eager::KeepAliveRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::tensorflow::eager::KeepAliveResponse>* PrepareAsyncKeepAliveRaw(::grpc::ClientContext* context, const ::tensorflow::eager::KeepAliveRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::tensorflow::eager::CloseContextResponse>* AsyncCloseContextRaw(::grpc::ClientContext* context, const ::tensorflow::eager::CloseContextRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::tensorflow::eager::CloseContextResponse>* PrepareAsyncCloseContextRaw(::grpc::ClientContext* context, const ::tensorflow::eager::CloseContextRequest& request, ::grpc::CompletionQueue* cq) = 0; + }; + class Stub final : public StubInterface { + public: + Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel); + ::grpc::Status CreateContext(::grpc::ClientContext* context, const ::tensorflow::eager::CreateContextRequest& request, ::tensorflow::eager::CreateContextResponse* response) override; + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::tensorflow::eager::CreateContextResponse>> AsyncCreateContext(::grpc::ClientContext* context, const ::tensorflow::eager::CreateContextRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::tensorflow::eager::CreateContextResponse>>(AsyncCreateContextRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::tensorflow::eager::CreateContextResponse>> PrepareAsyncCreateContext(::grpc::ClientContext* context, const ::tensorflow::eager::CreateContextRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::tensorflow::eager::CreateContextResponse>>(PrepareAsyncCreateContextRaw(context, request, cq)); + } + ::grpc::Status UpdateContext(::grpc::ClientContext* context, const ::tensorflow::eager::UpdateContextRequest& request, ::tensorflow::eager::UpdateContextResponse* response) override; + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::tensorflow::eager::UpdateContextResponse>> AsyncUpdateContext(::grpc::ClientContext* context, const ::tensorflow::eager::UpdateContextRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::tensorflow::eager::UpdateContextResponse>>(AsyncUpdateContextRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::tensorflow::eager::UpdateContextResponse>> PrepareAsyncUpdateContext(::grpc::ClientContext* context, const ::tensorflow::eager::UpdateContextRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::tensorflow::eager::UpdateContextResponse>>(PrepareAsyncUpdateContextRaw(context, request, cq)); + } + ::grpc::Status Enqueue(::grpc::ClientContext* context, const ::tensorflow::eager::EnqueueRequest& request, ::tensorflow::eager::EnqueueResponse* response) override; + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::tensorflow::eager::EnqueueResponse>> AsyncEnqueue(::grpc::ClientContext* context, const ::tensorflow::eager::EnqueueRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::tensorflow::eager::EnqueueResponse>>(AsyncEnqueueRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::tensorflow::eager::EnqueueResponse>> PrepareAsyncEnqueue(::grpc::ClientContext* context, const ::tensorflow::eager::EnqueueRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::tensorflow::eager::EnqueueResponse>>(PrepareAsyncEnqueueRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientReaderWriter< ::tensorflow::eager::EnqueueRequest, ::tensorflow::eager::EnqueueResponse>> StreamingEnqueue(::grpc::ClientContext* context) { + return std::unique_ptr< ::grpc::ClientReaderWriter< ::tensorflow::eager::EnqueueRequest, ::tensorflow::eager::EnqueueResponse>>(StreamingEnqueueRaw(context)); + } + std::unique_ptr< ::grpc::ClientAsyncReaderWriter< ::tensorflow::eager::EnqueueRequest, ::tensorflow::eager::EnqueueResponse>> AsyncStreamingEnqueue(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) { + return std::unique_ptr< ::grpc::ClientAsyncReaderWriter< ::tensorflow::eager::EnqueueRequest, ::tensorflow::eager::EnqueueResponse>>(AsyncStreamingEnqueueRaw(context, cq, tag)); + } + std::unique_ptr< ::grpc::ClientAsyncReaderWriter< ::tensorflow::eager::EnqueueRequest, ::tensorflow::eager::EnqueueResponse>> PrepareAsyncStreamingEnqueue(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncReaderWriter< ::tensorflow::eager::EnqueueRequest, ::tensorflow::eager::EnqueueResponse>>(PrepareAsyncStreamingEnqueueRaw(context, cq)); + } + ::grpc::Status WaitQueueDone(::grpc::ClientContext* context, const ::tensorflow::eager::WaitQueueDoneRequest& request, ::tensorflow::eager::WaitQueueDoneResponse* response) override; + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::tensorflow::eager::WaitQueueDoneResponse>> AsyncWaitQueueDone(::grpc::ClientContext* context, const ::tensorflow::eager::WaitQueueDoneRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::tensorflow::eager::WaitQueueDoneResponse>>(AsyncWaitQueueDoneRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::tensorflow::eager::WaitQueueDoneResponse>> PrepareAsyncWaitQueueDone(::grpc::ClientContext* context, const ::tensorflow::eager::WaitQueueDoneRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::tensorflow::eager::WaitQueueDoneResponse>>(PrepareAsyncWaitQueueDoneRaw(context, request, cq)); + } + ::grpc::Status RunComponentFunction(::grpc::ClientContext* context, const ::tensorflow::eager::RunComponentFunctionRequest& request, ::tensorflow::eager::RunComponentFunctionResponse* response) override; + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::tensorflow::eager::RunComponentFunctionResponse>> AsyncRunComponentFunction(::grpc::ClientContext* context, const ::tensorflow::eager::RunComponentFunctionRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::tensorflow::eager::RunComponentFunctionResponse>>(AsyncRunComponentFunctionRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::tensorflow::eager::RunComponentFunctionResponse>> PrepareAsyncRunComponentFunction(::grpc::ClientContext* context, const ::tensorflow::eager::RunComponentFunctionRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::tensorflow::eager::RunComponentFunctionResponse>>(PrepareAsyncRunComponentFunctionRaw(context, request, cq)); + } + ::grpc::Status KeepAlive(::grpc::ClientContext* context, const ::tensorflow::eager::KeepAliveRequest& request, ::tensorflow::eager::KeepAliveResponse* response) override; + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::tensorflow::eager::KeepAliveResponse>> AsyncKeepAlive(::grpc::ClientContext* context, const ::tensorflow::eager::KeepAliveRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::tensorflow::eager::KeepAliveResponse>>(AsyncKeepAliveRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::tensorflow::eager::KeepAliveResponse>> PrepareAsyncKeepAlive(::grpc::ClientContext* context, const ::tensorflow::eager::KeepAliveRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::tensorflow::eager::KeepAliveResponse>>(PrepareAsyncKeepAliveRaw(context, request, cq)); + } + ::grpc::Status CloseContext(::grpc::ClientContext* context, const ::tensorflow::eager::CloseContextRequest& request, ::tensorflow::eager::CloseContextResponse* response) override; + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::tensorflow::eager::CloseContextResponse>> AsyncCloseContext(::grpc::ClientContext* context, const ::tensorflow::eager::CloseContextRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::tensorflow::eager::CloseContextResponse>>(AsyncCloseContextRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::tensorflow::eager::CloseContextResponse>> PrepareAsyncCloseContext(::grpc::ClientContext* context, const ::tensorflow::eager::CloseContextRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::tensorflow::eager::CloseContextResponse>>(PrepareAsyncCloseContextRaw(context, request, cq)); + } + class experimental_async final : + public StubInterface::experimental_async_interface { + public: + void CreateContext(::grpc::ClientContext* context, const ::tensorflow::eager::CreateContextRequest* request, ::tensorflow::eager::CreateContextResponse* response, std::function) override; + void CreateContext(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::tensorflow::eager::CreateContextResponse* response, std::function) override; + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + void CreateContext(::grpc::ClientContext* context, const ::tensorflow::eager::CreateContextRequest* request, ::tensorflow::eager::CreateContextResponse* response, ::grpc::ClientUnaryReactor* reactor) override; + #else + void CreateContext(::grpc::ClientContext* context, const ::tensorflow::eager::CreateContextRequest* request, ::tensorflow::eager::CreateContextResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) override; + #endif + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + void CreateContext(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::tensorflow::eager::CreateContextResponse* response, ::grpc::ClientUnaryReactor* reactor) override; + #else + void CreateContext(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::tensorflow::eager::CreateContextResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) override; + #endif + void UpdateContext(::grpc::ClientContext* context, const ::tensorflow::eager::UpdateContextRequest* request, ::tensorflow::eager::UpdateContextResponse* response, std::function) override; + void UpdateContext(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::tensorflow::eager::UpdateContextResponse* response, std::function) override; + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + void UpdateContext(::grpc::ClientContext* context, const ::tensorflow::eager::UpdateContextRequest* request, ::tensorflow::eager::UpdateContextResponse* response, ::grpc::ClientUnaryReactor* reactor) override; + #else + void UpdateContext(::grpc::ClientContext* context, const ::tensorflow::eager::UpdateContextRequest* request, ::tensorflow::eager::UpdateContextResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) override; + #endif + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + void UpdateContext(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::tensorflow::eager::UpdateContextResponse* response, ::grpc::ClientUnaryReactor* reactor) override; + #else + void UpdateContext(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::tensorflow::eager::UpdateContextResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) override; + #endif + void Enqueue(::grpc::ClientContext* context, const ::tensorflow::eager::EnqueueRequest* request, ::tensorflow::eager::EnqueueResponse* response, std::function) override; + void Enqueue(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::tensorflow::eager::EnqueueResponse* response, std::function) override; + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + void Enqueue(::grpc::ClientContext* context, const ::tensorflow::eager::EnqueueRequest* request, ::tensorflow::eager::EnqueueResponse* response, ::grpc::ClientUnaryReactor* reactor) override; + #else + void Enqueue(::grpc::ClientContext* context, const ::tensorflow::eager::EnqueueRequest* request, ::tensorflow::eager::EnqueueResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) override; + #endif + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + void Enqueue(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::tensorflow::eager::EnqueueResponse* response, ::grpc::ClientUnaryReactor* reactor) override; + #else + void Enqueue(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::tensorflow::eager::EnqueueResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) override; + #endif + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + void StreamingEnqueue(::grpc::ClientContext* context, ::grpc::ClientBidiReactor< ::tensorflow::eager::EnqueueRequest,::tensorflow::eager::EnqueueResponse>* reactor) override; + #else + void StreamingEnqueue(::grpc::ClientContext* context, ::grpc::experimental::ClientBidiReactor< ::tensorflow::eager::EnqueueRequest,::tensorflow::eager::EnqueueResponse>* reactor) override; + #endif + void WaitQueueDone(::grpc::ClientContext* context, const ::tensorflow::eager::WaitQueueDoneRequest* request, ::tensorflow::eager::WaitQueueDoneResponse* response, std::function) override; + void WaitQueueDone(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::tensorflow::eager::WaitQueueDoneResponse* response, std::function) override; + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + void WaitQueueDone(::grpc::ClientContext* context, const ::tensorflow::eager::WaitQueueDoneRequest* request, ::tensorflow::eager::WaitQueueDoneResponse* response, ::grpc::ClientUnaryReactor* reactor) override; + #else + void WaitQueueDone(::grpc::ClientContext* context, const ::tensorflow::eager::WaitQueueDoneRequest* request, ::tensorflow::eager::WaitQueueDoneResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) override; + #endif + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + void WaitQueueDone(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::tensorflow::eager::WaitQueueDoneResponse* response, ::grpc::ClientUnaryReactor* reactor) override; + #else + void WaitQueueDone(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::tensorflow::eager::WaitQueueDoneResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) override; + #endif + void RunComponentFunction(::grpc::ClientContext* context, const ::tensorflow::eager::RunComponentFunctionRequest* request, ::tensorflow::eager::RunComponentFunctionResponse* response, std::function) override; + void RunComponentFunction(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::tensorflow::eager::RunComponentFunctionResponse* response, std::function) override; + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + void RunComponentFunction(::grpc::ClientContext* context, const ::tensorflow::eager::RunComponentFunctionRequest* request, ::tensorflow::eager::RunComponentFunctionResponse* response, ::grpc::ClientUnaryReactor* reactor) override; + #else + void RunComponentFunction(::grpc::ClientContext* context, const ::tensorflow::eager::RunComponentFunctionRequest* request, ::tensorflow::eager::RunComponentFunctionResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) override; + #endif + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + void RunComponentFunction(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::tensorflow::eager::RunComponentFunctionResponse* response, ::grpc::ClientUnaryReactor* reactor) override; + #else + void RunComponentFunction(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::tensorflow::eager::RunComponentFunctionResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) override; + #endif + void KeepAlive(::grpc::ClientContext* context, const ::tensorflow::eager::KeepAliveRequest* request, ::tensorflow::eager::KeepAliveResponse* response, std::function) override; + void KeepAlive(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::tensorflow::eager::KeepAliveResponse* response, std::function) override; + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + void KeepAlive(::grpc::ClientContext* context, const ::tensorflow::eager::KeepAliveRequest* request, ::tensorflow::eager::KeepAliveResponse* response, ::grpc::ClientUnaryReactor* reactor) override; + #else + void KeepAlive(::grpc::ClientContext* context, const ::tensorflow::eager::KeepAliveRequest* request, ::tensorflow::eager::KeepAliveResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) override; + #endif + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + void KeepAlive(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::tensorflow::eager::KeepAliveResponse* response, ::grpc::ClientUnaryReactor* reactor) override; + #else + void KeepAlive(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::tensorflow::eager::KeepAliveResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) override; + #endif + void CloseContext(::grpc::ClientContext* context, const ::tensorflow::eager::CloseContextRequest* request, ::tensorflow::eager::CloseContextResponse* response, std::function) override; + void CloseContext(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::tensorflow::eager::CloseContextResponse* response, std::function) override; + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + void CloseContext(::grpc::ClientContext* context, const ::tensorflow::eager::CloseContextRequest* request, ::tensorflow::eager::CloseContextResponse* response, ::grpc::ClientUnaryReactor* reactor) override; + #else + void CloseContext(::grpc::ClientContext* context, const ::tensorflow::eager::CloseContextRequest* request, ::tensorflow::eager::CloseContextResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) override; + #endif + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + void CloseContext(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::tensorflow::eager::CloseContextResponse* response, ::grpc::ClientUnaryReactor* reactor) override; + #else + void CloseContext(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::tensorflow::eager::CloseContextResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) override; + #endif + private: + friend class Stub; + explicit experimental_async(Stub* stub): stub_(stub) { } + Stub* stub() { return stub_; } + Stub* stub_; + }; + class experimental_async_interface* experimental_async() override { return &async_stub_; } + + private: + std::shared_ptr< ::grpc::ChannelInterface> channel_; + class experimental_async async_stub_{this}; + ::grpc::ClientAsyncResponseReader< ::tensorflow::eager::CreateContextResponse>* AsyncCreateContextRaw(::grpc::ClientContext* context, const ::tensorflow::eager::CreateContextRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::tensorflow::eager::CreateContextResponse>* PrepareAsyncCreateContextRaw(::grpc::ClientContext* context, const ::tensorflow::eager::CreateContextRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::tensorflow::eager::UpdateContextResponse>* AsyncUpdateContextRaw(::grpc::ClientContext* context, const ::tensorflow::eager::UpdateContextRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::tensorflow::eager::UpdateContextResponse>* PrepareAsyncUpdateContextRaw(::grpc::ClientContext* context, const ::tensorflow::eager::UpdateContextRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::tensorflow::eager::EnqueueResponse>* AsyncEnqueueRaw(::grpc::ClientContext* context, const ::tensorflow::eager::EnqueueRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::tensorflow::eager::EnqueueResponse>* PrepareAsyncEnqueueRaw(::grpc::ClientContext* context, const ::tensorflow::eager::EnqueueRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientReaderWriter< ::tensorflow::eager::EnqueueRequest, ::tensorflow::eager::EnqueueResponse>* StreamingEnqueueRaw(::grpc::ClientContext* context) override; + ::grpc::ClientAsyncReaderWriter< ::tensorflow::eager::EnqueueRequest, ::tensorflow::eager::EnqueueResponse>* AsyncStreamingEnqueueRaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) override; + ::grpc::ClientAsyncReaderWriter< ::tensorflow::eager::EnqueueRequest, ::tensorflow::eager::EnqueueResponse>* PrepareAsyncStreamingEnqueueRaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::tensorflow::eager::WaitQueueDoneResponse>* AsyncWaitQueueDoneRaw(::grpc::ClientContext* context, const ::tensorflow::eager::WaitQueueDoneRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::tensorflow::eager::WaitQueueDoneResponse>* PrepareAsyncWaitQueueDoneRaw(::grpc::ClientContext* context, const ::tensorflow::eager::WaitQueueDoneRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::tensorflow::eager::RunComponentFunctionResponse>* AsyncRunComponentFunctionRaw(::grpc::ClientContext* context, const ::tensorflow::eager::RunComponentFunctionRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::tensorflow::eager::RunComponentFunctionResponse>* PrepareAsyncRunComponentFunctionRaw(::grpc::ClientContext* context, const ::tensorflow::eager::RunComponentFunctionRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::tensorflow::eager::KeepAliveResponse>* AsyncKeepAliveRaw(::grpc::ClientContext* context, const ::tensorflow::eager::KeepAliveRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::tensorflow::eager::KeepAliveResponse>* PrepareAsyncKeepAliveRaw(::grpc::ClientContext* context, const ::tensorflow::eager::KeepAliveRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::tensorflow::eager::CloseContextResponse>* AsyncCloseContextRaw(::grpc::ClientContext* context, const ::tensorflow::eager::CloseContextRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::tensorflow::eager::CloseContextResponse>* PrepareAsyncCloseContextRaw(::grpc::ClientContext* context, const ::tensorflow::eager::CloseContextRequest& request, ::grpc::CompletionQueue* cq) override; + const ::grpc::internal::RpcMethod rpcmethod_CreateContext_; + const ::grpc::internal::RpcMethod rpcmethod_UpdateContext_; + const ::grpc::internal::RpcMethod rpcmethod_Enqueue_; + const ::grpc::internal::RpcMethod rpcmethod_StreamingEnqueue_; + const ::grpc::internal::RpcMethod rpcmethod_WaitQueueDone_; + const ::grpc::internal::RpcMethod rpcmethod_RunComponentFunction_; + const ::grpc::internal::RpcMethod rpcmethod_KeepAlive_; + const ::grpc::internal::RpcMethod rpcmethod_CloseContext_; + }; + static std::unique_ptr NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options = ::grpc::StubOptions()); + + class Service : public ::grpc::Service { + public: + Service(); + virtual ~Service(); + // This initializes the worker, informing it about the other workers in the + // cluster and exchanging authentication tokens which will be used in all + // other RPCs to detect whether the worker has restarted. + virtual ::grpc::Status CreateContext(::grpc::ServerContext* context, const ::tensorflow::eager::CreateContextRequest* request, ::tensorflow::eager::CreateContextResponse* response); + // [AUTOMATION]: Internal rpc option goes here. + // This updates the eager context on an existing worker when updating the set + // of servers in a distributed eager cluster. + virtual ::grpc::Status UpdateContext(::grpc::ServerContext* context, const ::tensorflow::eager::UpdateContextRequest* request, ::tensorflow::eager::UpdateContextResponse* response); + // [AUTOMATION]: Internal rpc option goes here. + // This takes a list of Execute and DeleteTensorHandle operations and enqueues + // (in async mode) or executes (in sync mode) them on the remote server. + // All outputs of ops which were not explicitly deleted with + // DeleteTensorHandle entries will be assumed to be alive and are usable by + // future calls to Enqueue. + virtual ::grpc::Status Enqueue(::grpc::ServerContext* context, const ::tensorflow::eager::EnqueueRequest* request, ::tensorflow::eager::EnqueueResponse* response); + // [AUTOMATION]: Internal rpc option goes here. + // A streaming version of Enqueue. + // Current server implementation sends one response per received request. + // The benefit for using a streaming version is that subsequent requests + // can be sent without waiting for a response to the previous request. This + // synchronization is required in the regular Enqueue call because gRPC does + // not guarantee to preserve request order. + virtual ::grpc::Status StreamingEnqueue(::grpc::ServerContext* context, ::grpc::ServerReaderWriter< ::tensorflow::eager::EnqueueResponse, ::tensorflow::eager::EnqueueRequest>* stream); + // [AUTOMATION]: Internal rpc option goes here. + // Takes a set of op IDs and waits until those ops are done. Returns any error + // in the stream so far. + virtual ::grpc::Status WaitQueueDone(::grpc::ServerContext* context, const ::tensorflow::eager::WaitQueueDoneRequest* request, ::tensorflow::eager::WaitQueueDoneResponse* response); + // [AUTOMATION]: Internal rpc option goes here. + // This takes an Eager operation and executes it in async mode on the remote + // server. Different from EnqueueRequest, ops/functions sent through this + // type of requests are allowed to execute in parallel and no ordering is + // preserved by RPC stream or executor. + // This request type should only be used for executing component functions. + // Ordering of component functions should be enforced by their corresponding + // main functions. The runtime ensures the following invarients for component + // functions (CFs) and their main functions (MFs): + // (1) MF1 -> MF2 ==> CF1 -> CF2 ("->" indicates order of execution); + // (2) MF1 || MF2 ==> CF1 || CF2 ("||" indicates possible parallel execution); + // (3) For CF1 and CF2 that come from the same MF, CF1 || CF2 + // For executing ops/main functions, use Enqueue or StreamingEnqueue instead + // for correct ordering. + virtual ::grpc::Status RunComponentFunction(::grpc::ServerContext* context, const ::tensorflow::eager::RunComponentFunctionRequest* request, ::tensorflow::eager::RunComponentFunctionResponse* response); + // [AUTOMATION]: Internal rpc option goes here. + // Contexts are always created with a deadline and no RPCs within a deadline + // will trigger a context garbage collection. KeepAlive calls can be used to + // delay this. It can also be used to validate the existence of a context ID + // on remote eager worker. If the context is on remote worker, return the same + // ID and the current context view ID. This is useful for checking if the + // remote worker (potentially with the same task name and hostname / port) is + // replaced with a new process. + virtual ::grpc::Status KeepAlive(::grpc::ServerContext* context, const ::tensorflow::eager::KeepAliveRequest* request, ::tensorflow::eager::KeepAliveResponse* response); + // [AUTOMATION]: Internal rpc option goes here. + // Closes the context. No calls to other methods using the existing context ID + // are valid after this. + virtual ::grpc::Status CloseContext(::grpc::ServerContext* context, const ::tensorflow::eager::CloseContextRequest* request, ::tensorflow::eager::CloseContextResponse* response); + // [AUTOMATION]: Internal rpc option goes here. + }; + template + class WithAsyncMethod_CreateContext : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithAsyncMethod_CreateContext() { + ::grpc::Service::MarkMethodAsync(0); + } + ~WithAsyncMethod_CreateContext() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status CreateContext(::grpc::ServerContext* /*context*/, const ::tensorflow::eager::CreateContextRequest* /*request*/, ::tensorflow::eager::CreateContextResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestCreateContext(::grpc::ServerContext* context, ::tensorflow::eager::CreateContextRequest* request, ::grpc::ServerAsyncResponseWriter< ::tensorflow::eager::CreateContextResponse>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(0, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithAsyncMethod_UpdateContext : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithAsyncMethod_UpdateContext() { + ::grpc::Service::MarkMethodAsync(1); + } + ~WithAsyncMethod_UpdateContext() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status UpdateContext(::grpc::ServerContext* /*context*/, const ::tensorflow::eager::UpdateContextRequest* /*request*/, ::tensorflow::eager::UpdateContextResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestUpdateContext(::grpc::ServerContext* context, ::tensorflow::eager::UpdateContextRequest* request, ::grpc::ServerAsyncResponseWriter< ::tensorflow::eager::UpdateContextResponse>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(1, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithAsyncMethod_Enqueue : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithAsyncMethod_Enqueue() { + ::grpc::Service::MarkMethodAsync(2); + } + ~WithAsyncMethod_Enqueue() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status Enqueue(::grpc::ServerContext* /*context*/, const ::tensorflow::eager::EnqueueRequest* /*request*/, ::tensorflow::eager::EnqueueResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestEnqueue(::grpc::ServerContext* context, ::tensorflow::eager::EnqueueRequest* request, ::grpc::ServerAsyncResponseWriter< ::tensorflow::eager::EnqueueResponse>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(2, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithAsyncMethod_StreamingEnqueue : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithAsyncMethod_StreamingEnqueue() { + ::grpc::Service::MarkMethodAsync(3); + } + ~WithAsyncMethod_StreamingEnqueue() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status StreamingEnqueue(::grpc::ServerContext* /*context*/, ::grpc::ServerReaderWriter< ::tensorflow::eager::EnqueueResponse, ::tensorflow::eager::EnqueueRequest>* /*stream*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestStreamingEnqueue(::grpc::ServerContext* context, ::grpc::ServerAsyncReaderWriter< ::tensorflow::eager::EnqueueResponse, ::tensorflow::eager::EnqueueRequest>* stream, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncBidiStreaming(3, context, stream, new_call_cq, notification_cq, tag); + } + }; + template + class WithAsyncMethod_WaitQueueDone : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithAsyncMethod_WaitQueueDone() { + ::grpc::Service::MarkMethodAsync(4); + } + ~WithAsyncMethod_WaitQueueDone() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status WaitQueueDone(::grpc::ServerContext* /*context*/, const ::tensorflow::eager::WaitQueueDoneRequest* /*request*/, ::tensorflow::eager::WaitQueueDoneResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestWaitQueueDone(::grpc::ServerContext* context, ::tensorflow::eager::WaitQueueDoneRequest* request, ::grpc::ServerAsyncResponseWriter< ::tensorflow::eager::WaitQueueDoneResponse>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(4, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithAsyncMethod_RunComponentFunction : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithAsyncMethod_RunComponentFunction() { + ::grpc::Service::MarkMethodAsync(5); + } + ~WithAsyncMethod_RunComponentFunction() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status RunComponentFunction(::grpc::ServerContext* /*context*/, const ::tensorflow::eager::RunComponentFunctionRequest* /*request*/, ::tensorflow::eager::RunComponentFunctionResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestRunComponentFunction(::grpc::ServerContext* context, ::tensorflow::eager::RunComponentFunctionRequest* request, ::grpc::ServerAsyncResponseWriter< ::tensorflow::eager::RunComponentFunctionResponse>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(5, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithAsyncMethod_KeepAlive : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithAsyncMethod_KeepAlive() { + ::grpc::Service::MarkMethodAsync(6); + } + ~WithAsyncMethod_KeepAlive() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status KeepAlive(::grpc::ServerContext* /*context*/, const ::tensorflow::eager::KeepAliveRequest* /*request*/, ::tensorflow::eager::KeepAliveResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestKeepAlive(::grpc::ServerContext* context, ::tensorflow::eager::KeepAliveRequest* request, ::grpc::ServerAsyncResponseWriter< ::tensorflow::eager::KeepAliveResponse>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(6, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithAsyncMethod_CloseContext : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithAsyncMethod_CloseContext() { + ::grpc::Service::MarkMethodAsync(7); + } + ~WithAsyncMethod_CloseContext() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status CloseContext(::grpc::ServerContext* /*context*/, const ::tensorflow::eager::CloseContextRequest* /*request*/, ::tensorflow::eager::CloseContextResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestCloseContext(::grpc::ServerContext* context, ::tensorflow::eager::CloseContextRequest* request, ::grpc::ServerAsyncResponseWriter< ::tensorflow::eager::CloseContextResponse>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(7, context, request, response, new_call_cq, notification_cq, tag); + } + }; + typedef WithAsyncMethod_CreateContext > > > > > > > AsyncService; + template + class ExperimentalWithCallbackMethod_CreateContext : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + ExperimentalWithCallbackMethod_CreateContext() { + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::Service:: + #else + ::grpc::Service::experimental(). + #endif + MarkMethodCallback(0, + new ::grpc_impl::internal::CallbackUnaryHandler< ::tensorflow::eager::CreateContextRequest, ::tensorflow::eager::CreateContextResponse>( + [this]( + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::CallbackServerContext* + #else + ::grpc::experimental::CallbackServerContext* + #endif + context, const ::tensorflow::eager::CreateContextRequest* request, ::tensorflow::eager::CreateContextResponse* response) { return this->CreateContext(context, request, response); }));} + void SetMessageAllocatorFor_CreateContext( + ::grpc::experimental::MessageAllocator< ::tensorflow::eager::CreateContextRequest, ::tensorflow::eager::CreateContextResponse>* allocator) { + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(0); + #else + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::experimental().GetHandler(0); + #endif + static_cast<::grpc_impl::internal::CallbackUnaryHandler< ::tensorflow::eager::CreateContextRequest, ::tensorflow::eager::CreateContextResponse>*>(handler) + ->SetMessageAllocator(allocator); + } + ~ExperimentalWithCallbackMethod_CreateContext() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status CreateContext(::grpc::ServerContext* /*context*/, const ::tensorflow::eager::CreateContextRequest* /*request*/, ::tensorflow::eager::CreateContextResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual ::grpc::ServerUnaryReactor* CreateContext( + ::grpc::CallbackServerContext* /*context*/, const ::tensorflow::eager::CreateContextRequest* /*request*/, ::tensorflow::eager::CreateContextResponse* /*response*/) + #else + virtual ::grpc::experimental::ServerUnaryReactor* CreateContext( + ::grpc::experimental::CallbackServerContext* /*context*/, const ::tensorflow::eager::CreateContextRequest* /*request*/, ::tensorflow::eager::CreateContextResponse* /*response*/) + #endif + { return nullptr; } + }; + template + class ExperimentalWithCallbackMethod_UpdateContext : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + ExperimentalWithCallbackMethod_UpdateContext() { + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::Service:: + #else + ::grpc::Service::experimental(). + #endif + MarkMethodCallback(1, + new ::grpc_impl::internal::CallbackUnaryHandler< ::tensorflow::eager::UpdateContextRequest, ::tensorflow::eager::UpdateContextResponse>( + [this]( + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::CallbackServerContext* + #else + ::grpc::experimental::CallbackServerContext* + #endif + context, const ::tensorflow::eager::UpdateContextRequest* request, ::tensorflow::eager::UpdateContextResponse* response) { return this->UpdateContext(context, request, response); }));} + void SetMessageAllocatorFor_UpdateContext( + ::grpc::experimental::MessageAllocator< ::tensorflow::eager::UpdateContextRequest, ::tensorflow::eager::UpdateContextResponse>* allocator) { + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(1); + #else + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::experimental().GetHandler(1); + #endif + static_cast<::grpc_impl::internal::CallbackUnaryHandler< ::tensorflow::eager::UpdateContextRequest, ::tensorflow::eager::UpdateContextResponse>*>(handler) + ->SetMessageAllocator(allocator); + } + ~ExperimentalWithCallbackMethod_UpdateContext() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status UpdateContext(::grpc::ServerContext* /*context*/, const ::tensorflow::eager::UpdateContextRequest* /*request*/, ::tensorflow::eager::UpdateContextResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual ::grpc::ServerUnaryReactor* UpdateContext( + ::grpc::CallbackServerContext* /*context*/, const ::tensorflow::eager::UpdateContextRequest* /*request*/, ::tensorflow::eager::UpdateContextResponse* /*response*/) + #else + virtual ::grpc::experimental::ServerUnaryReactor* UpdateContext( + ::grpc::experimental::CallbackServerContext* /*context*/, const ::tensorflow::eager::UpdateContextRequest* /*request*/, ::tensorflow::eager::UpdateContextResponse* /*response*/) + #endif + { return nullptr; } + }; + template + class ExperimentalWithCallbackMethod_Enqueue : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + ExperimentalWithCallbackMethod_Enqueue() { + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::Service:: + #else + ::grpc::Service::experimental(). + #endif + MarkMethodCallback(2, + new ::grpc_impl::internal::CallbackUnaryHandler< ::tensorflow::eager::EnqueueRequest, ::tensorflow::eager::EnqueueResponse>( + [this]( + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::CallbackServerContext* + #else + ::grpc::experimental::CallbackServerContext* + #endif + context, const ::tensorflow::eager::EnqueueRequest* request, ::tensorflow::eager::EnqueueResponse* response) { return this->Enqueue(context, request, response); }));} + void SetMessageAllocatorFor_Enqueue( + ::grpc::experimental::MessageAllocator< ::tensorflow::eager::EnqueueRequest, ::tensorflow::eager::EnqueueResponse>* allocator) { + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(2); + #else + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::experimental().GetHandler(2); + #endif + static_cast<::grpc_impl::internal::CallbackUnaryHandler< ::tensorflow::eager::EnqueueRequest, ::tensorflow::eager::EnqueueResponse>*>(handler) + ->SetMessageAllocator(allocator); + } + ~ExperimentalWithCallbackMethod_Enqueue() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status Enqueue(::grpc::ServerContext* /*context*/, const ::tensorflow::eager::EnqueueRequest* /*request*/, ::tensorflow::eager::EnqueueResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual ::grpc::ServerUnaryReactor* Enqueue( + ::grpc::CallbackServerContext* /*context*/, const ::tensorflow::eager::EnqueueRequest* /*request*/, ::tensorflow::eager::EnqueueResponse* /*response*/) + #else + virtual ::grpc::experimental::ServerUnaryReactor* Enqueue( + ::grpc::experimental::CallbackServerContext* /*context*/, const ::tensorflow::eager::EnqueueRequest* /*request*/, ::tensorflow::eager::EnqueueResponse* /*response*/) + #endif + { return nullptr; } + }; + template + class ExperimentalWithCallbackMethod_StreamingEnqueue : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + ExperimentalWithCallbackMethod_StreamingEnqueue() { + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::Service:: + #else + ::grpc::Service::experimental(). + #endif + MarkMethodCallback(3, + new ::grpc_impl::internal::CallbackBidiHandler< ::tensorflow::eager::EnqueueRequest, ::tensorflow::eager::EnqueueResponse>( + [this]( + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::CallbackServerContext* + #else + ::grpc::experimental::CallbackServerContext* + #endif + context) { return this->StreamingEnqueue(context); })); + } + ~ExperimentalWithCallbackMethod_StreamingEnqueue() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status StreamingEnqueue(::grpc::ServerContext* /*context*/, ::grpc::ServerReaderWriter< ::tensorflow::eager::EnqueueResponse, ::tensorflow::eager::EnqueueRequest>* /*stream*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual ::grpc::ServerBidiReactor< ::tensorflow::eager::EnqueueRequest, ::tensorflow::eager::EnqueueResponse>* StreamingEnqueue( + ::grpc::CallbackServerContext* /*context*/) + #else + virtual ::grpc::experimental::ServerBidiReactor< ::tensorflow::eager::EnqueueRequest, ::tensorflow::eager::EnqueueResponse>* StreamingEnqueue( + ::grpc::experimental::CallbackServerContext* /*context*/) + #endif + { return nullptr; } + }; + template + class ExperimentalWithCallbackMethod_WaitQueueDone : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + ExperimentalWithCallbackMethod_WaitQueueDone() { + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::Service:: + #else + ::grpc::Service::experimental(). + #endif + MarkMethodCallback(4, + new ::grpc_impl::internal::CallbackUnaryHandler< ::tensorflow::eager::WaitQueueDoneRequest, ::tensorflow::eager::WaitQueueDoneResponse>( + [this]( + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::CallbackServerContext* + #else + ::grpc::experimental::CallbackServerContext* + #endif + context, const ::tensorflow::eager::WaitQueueDoneRequest* request, ::tensorflow::eager::WaitQueueDoneResponse* response) { return this->WaitQueueDone(context, request, response); }));} + void SetMessageAllocatorFor_WaitQueueDone( + ::grpc::experimental::MessageAllocator< ::tensorflow::eager::WaitQueueDoneRequest, ::tensorflow::eager::WaitQueueDoneResponse>* allocator) { + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(4); + #else + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::experimental().GetHandler(4); + #endif + static_cast<::grpc_impl::internal::CallbackUnaryHandler< ::tensorflow::eager::WaitQueueDoneRequest, ::tensorflow::eager::WaitQueueDoneResponse>*>(handler) + ->SetMessageAllocator(allocator); + } + ~ExperimentalWithCallbackMethod_WaitQueueDone() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status WaitQueueDone(::grpc::ServerContext* /*context*/, const ::tensorflow::eager::WaitQueueDoneRequest* /*request*/, ::tensorflow::eager::WaitQueueDoneResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual ::grpc::ServerUnaryReactor* WaitQueueDone( + ::grpc::CallbackServerContext* /*context*/, const ::tensorflow::eager::WaitQueueDoneRequest* /*request*/, ::tensorflow::eager::WaitQueueDoneResponse* /*response*/) + #else + virtual ::grpc::experimental::ServerUnaryReactor* WaitQueueDone( + ::grpc::experimental::CallbackServerContext* /*context*/, const ::tensorflow::eager::WaitQueueDoneRequest* /*request*/, ::tensorflow::eager::WaitQueueDoneResponse* /*response*/) + #endif + { return nullptr; } + }; + template + class ExperimentalWithCallbackMethod_RunComponentFunction : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + ExperimentalWithCallbackMethod_RunComponentFunction() { + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::Service:: + #else + ::grpc::Service::experimental(). + #endif + MarkMethodCallback(5, + new ::grpc_impl::internal::CallbackUnaryHandler< ::tensorflow::eager::RunComponentFunctionRequest, ::tensorflow::eager::RunComponentFunctionResponse>( + [this]( + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::CallbackServerContext* + #else + ::grpc::experimental::CallbackServerContext* + #endif + context, const ::tensorflow::eager::RunComponentFunctionRequest* request, ::tensorflow::eager::RunComponentFunctionResponse* response) { return this->RunComponentFunction(context, request, response); }));} + void SetMessageAllocatorFor_RunComponentFunction( + ::grpc::experimental::MessageAllocator< ::tensorflow::eager::RunComponentFunctionRequest, ::tensorflow::eager::RunComponentFunctionResponse>* allocator) { + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(5); + #else + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::experimental().GetHandler(5); + #endif + static_cast<::grpc_impl::internal::CallbackUnaryHandler< ::tensorflow::eager::RunComponentFunctionRequest, ::tensorflow::eager::RunComponentFunctionResponse>*>(handler) + ->SetMessageAllocator(allocator); + } + ~ExperimentalWithCallbackMethod_RunComponentFunction() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status RunComponentFunction(::grpc::ServerContext* /*context*/, const ::tensorflow::eager::RunComponentFunctionRequest* /*request*/, ::tensorflow::eager::RunComponentFunctionResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual ::grpc::ServerUnaryReactor* RunComponentFunction( + ::grpc::CallbackServerContext* /*context*/, const ::tensorflow::eager::RunComponentFunctionRequest* /*request*/, ::tensorflow::eager::RunComponentFunctionResponse* /*response*/) + #else + virtual ::grpc::experimental::ServerUnaryReactor* RunComponentFunction( + ::grpc::experimental::CallbackServerContext* /*context*/, const ::tensorflow::eager::RunComponentFunctionRequest* /*request*/, ::tensorflow::eager::RunComponentFunctionResponse* /*response*/) + #endif + { return nullptr; } + }; + template + class ExperimentalWithCallbackMethod_KeepAlive : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + ExperimentalWithCallbackMethod_KeepAlive() { + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::Service:: + #else + ::grpc::Service::experimental(). + #endif + MarkMethodCallback(6, + new ::grpc_impl::internal::CallbackUnaryHandler< ::tensorflow::eager::KeepAliveRequest, ::tensorflow::eager::KeepAliveResponse>( + [this]( + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::CallbackServerContext* + #else + ::grpc::experimental::CallbackServerContext* + #endif + context, const ::tensorflow::eager::KeepAliveRequest* request, ::tensorflow::eager::KeepAliveResponse* response) { return this->KeepAlive(context, request, response); }));} + void SetMessageAllocatorFor_KeepAlive( + ::grpc::experimental::MessageAllocator< ::tensorflow::eager::KeepAliveRequest, ::tensorflow::eager::KeepAliveResponse>* allocator) { + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(6); + #else + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::experimental().GetHandler(6); + #endif + static_cast<::grpc_impl::internal::CallbackUnaryHandler< ::tensorflow::eager::KeepAliveRequest, ::tensorflow::eager::KeepAliveResponse>*>(handler) + ->SetMessageAllocator(allocator); + } + ~ExperimentalWithCallbackMethod_KeepAlive() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status KeepAlive(::grpc::ServerContext* /*context*/, const ::tensorflow::eager::KeepAliveRequest* /*request*/, ::tensorflow::eager::KeepAliveResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual ::grpc::ServerUnaryReactor* KeepAlive( + ::grpc::CallbackServerContext* /*context*/, const ::tensorflow::eager::KeepAliveRequest* /*request*/, ::tensorflow::eager::KeepAliveResponse* /*response*/) + #else + virtual ::grpc::experimental::ServerUnaryReactor* KeepAlive( + ::grpc::experimental::CallbackServerContext* /*context*/, const ::tensorflow::eager::KeepAliveRequest* /*request*/, ::tensorflow::eager::KeepAliveResponse* /*response*/) + #endif + { return nullptr; } + }; + template + class ExperimentalWithCallbackMethod_CloseContext : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + ExperimentalWithCallbackMethod_CloseContext() { + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::Service:: + #else + ::grpc::Service::experimental(). + #endif + MarkMethodCallback(7, + new ::grpc_impl::internal::CallbackUnaryHandler< ::tensorflow::eager::CloseContextRequest, ::tensorflow::eager::CloseContextResponse>( + [this]( + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::CallbackServerContext* + #else + ::grpc::experimental::CallbackServerContext* + #endif + context, const ::tensorflow::eager::CloseContextRequest* request, ::tensorflow::eager::CloseContextResponse* response) { return this->CloseContext(context, request, response); }));} + void SetMessageAllocatorFor_CloseContext( + ::grpc::experimental::MessageAllocator< ::tensorflow::eager::CloseContextRequest, ::tensorflow::eager::CloseContextResponse>* allocator) { + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(7); + #else + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::experimental().GetHandler(7); + #endif + static_cast<::grpc_impl::internal::CallbackUnaryHandler< ::tensorflow::eager::CloseContextRequest, ::tensorflow::eager::CloseContextResponse>*>(handler) + ->SetMessageAllocator(allocator); + } + ~ExperimentalWithCallbackMethod_CloseContext() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status CloseContext(::grpc::ServerContext* /*context*/, const ::tensorflow::eager::CloseContextRequest* /*request*/, ::tensorflow::eager::CloseContextResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual ::grpc::ServerUnaryReactor* CloseContext( + ::grpc::CallbackServerContext* /*context*/, const ::tensorflow::eager::CloseContextRequest* /*request*/, ::tensorflow::eager::CloseContextResponse* /*response*/) + #else + virtual ::grpc::experimental::ServerUnaryReactor* CloseContext( + ::grpc::experimental::CallbackServerContext* /*context*/, const ::tensorflow::eager::CloseContextRequest* /*request*/, ::tensorflow::eager::CloseContextResponse* /*response*/) + #endif + { return nullptr; } + }; + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + typedef ExperimentalWithCallbackMethod_CreateContext > > > > > > > CallbackService; + #endif + + typedef ExperimentalWithCallbackMethod_CreateContext > > > > > > > ExperimentalCallbackService; + template + class WithGenericMethod_CreateContext : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithGenericMethod_CreateContext() { + ::grpc::Service::MarkMethodGeneric(0); + } + ~WithGenericMethod_CreateContext() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status CreateContext(::grpc::ServerContext* /*context*/, const ::tensorflow::eager::CreateContextRequest* /*request*/, ::tensorflow::eager::CreateContextResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithGenericMethod_UpdateContext : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithGenericMethod_UpdateContext() { + ::grpc::Service::MarkMethodGeneric(1); + } + ~WithGenericMethod_UpdateContext() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status UpdateContext(::grpc::ServerContext* /*context*/, const ::tensorflow::eager::UpdateContextRequest* /*request*/, ::tensorflow::eager::UpdateContextResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithGenericMethod_Enqueue : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithGenericMethod_Enqueue() { + ::grpc::Service::MarkMethodGeneric(2); + } + ~WithGenericMethod_Enqueue() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status Enqueue(::grpc::ServerContext* /*context*/, const ::tensorflow::eager::EnqueueRequest* /*request*/, ::tensorflow::eager::EnqueueResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithGenericMethod_StreamingEnqueue : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithGenericMethod_StreamingEnqueue() { + ::grpc::Service::MarkMethodGeneric(3); + } + ~WithGenericMethod_StreamingEnqueue() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status StreamingEnqueue(::grpc::ServerContext* /*context*/, ::grpc::ServerReaderWriter< ::tensorflow::eager::EnqueueResponse, ::tensorflow::eager::EnqueueRequest>* /*stream*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithGenericMethod_WaitQueueDone : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithGenericMethod_WaitQueueDone() { + ::grpc::Service::MarkMethodGeneric(4); + } + ~WithGenericMethod_WaitQueueDone() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status WaitQueueDone(::grpc::ServerContext* /*context*/, const ::tensorflow::eager::WaitQueueDoneRequest* /*request*/, ::tensorflow::eager::WaitQueueDoneResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithGenericMethod_RunComponentFunction : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithGenericMethod_RunComponentFunction() { + ::grpc::Service::MarkMethodGeneric(5); + } + ~WithGenericMethod_RunComponentFunction() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status RunComponentFunction(::grpc::ServerContext* /*context*/, const ::tensorflow::eager::RunComponentFunctionRequest* /*request*/, ::tensorflow::eager::RunComponentFunctionResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithGenericMethod_KeepAlive : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithGenericMethod_KeepAlive() { + ::grpc::Service::MarkMethodGeneric(6); + } + ~WithGenericMethod_KeepAlive() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status KeepAlive(::grpc::ServerContext* /*context*/, const ::tensorflow::eager::KeepAliveRequest* /*request*/, ::tensorflow::eager::KeepAliveResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithGenericMethod_CloseContext : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithGenericMethod_CloseContext() { + ::grpc::Service::MarkMethodGeneric(7); + } + ~WithGenericMethod_CloseContext() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status CloseContext(::grpc::ServerContext* /*context*/, const ::tensorflow::eager::CloseContextRequest* /*request*/, ::tensorflow::eager::CloseContextResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithRawMethod_CreateContext : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawMethod_CreateContext() { + ::grpc::Service::MarkMethodRaw(0); + } + ~WithRawMethod_CreateContext() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status CreateContext(::grpc::ServerContext* /*context*/, const ::tensorflow::eager::CreateContextRequest* /*request*/, ::tensorflow::eager::CreateContextResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestCreateContext(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(0, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithRawMethod_UpdateContext : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawMethod_UpdateContext() { + ::grpc::Service::MarkMethodRaw(1); + } + ~WithRawMethod_UpdateContext() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status UpdateContext(::grpc::ServerContext* /*context*/, const ::tensorflow::eager::UpdateContextRequest* /*request*/, ::tensorflow::eager::UpdateContextResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestUpdateContext(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(1, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithRawMethod_Enqueue : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawMethod_Enqueue() { + ::grpc::Service::MarkMethodRaw(2); + } + ~WithRawMethod_Enqueue() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status Enqueue(::grpc::ServerContext* /*context*/, const ::tensorflow::eager::EnqueueRequest* /*request*/, ::tensorflow::eager::EnqueueResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestEnqueue(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(2, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithRawMethod_StreamingEnqueue : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawMethod_StreamingEnqueue() { + ::grpc::Service::MarkMethodRaw(3); + } + ~WithRawMethod_StreamingEnqueue() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status StreamingEnqueue(::grpc::ServerContext* /*context*/, ::grpc::ServerReaderWriter< ::tensorflow::eager::EnqueueResponse, ::tensorflow::eager::EnqueueRequest>* /*stream*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestStreamingEnqueue(::grpc::ServerContext* context, ::grpc::ServerAsyncReaderWriter< ::grpc::ByteBuffer, ::grpc::ByteBuffer>* stream, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncBidiStreaming(3, context, stream, new_call_cq, notification_cq, tag); + } + }; + template + class WithRawMethod_WaitQueueDone : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawMethod_WaitQueueDone() { + ::grpc::Service::MarkMethodRaw(4); + } + ~WithRawMethod_WaitQueueDone() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status WaitQueueDone(::grpc::ServerContext* /*context*/, const ::tensorflow::eager::WaitQueueDoneRequest* /*request*/, ::tensorflow::eager::WaitQueueDoneResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestWaitQueueDone(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(4, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithRawMethod_RunComponentFunction : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawMethod_RunComponentFunction() { + ::grpc::Service::MarkMethodRaw(5); + } + ~WithRawMethod_RunComponentFunction() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status RunComponentFunction(::grpc::ServerContext* /*context*/, const ::tensorflow::eager::RunComponentFunctionRequest* /*request*/, ::tensorflow::eager::RunComponentFunctionResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestRunComponentFunction(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(5, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithRawMethod_KeepAlive : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawMethod_KeepAlive() { + ::grpc::Service::MarkMethodRaw(6); + } + ~WithRawMethod_KeepAlive() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status KeepAlive(::grpc::ServerContext* /*context*/, const ::tensorflow::eager::KeepAliveRequest* /*request*/, ::tensorflow::eager::KeepAliveResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestKeepAlive(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(6, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithRawMethod_CloseContext : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawMethod_CloseContext() { + ::grpc::Service::MarkMethodRaw(7); + } + ~WithRawMethod_CloseContext() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status CloseContext(::grpc::ServerContext* /*context*/, const ::tensorflow::eager::CloseContextRequest* /*request*/, ::tensorflow::eager::CloseContextResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestCloseContext(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(7, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class ExperimentalWithRawCallbackMethod_CreateContext : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + ExperimentalWithRawCallbackMethod_CreateContext() { + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::Service:: + #else + ::grpc::Service::experimental(). + #endif + MarkMethodRawCallback(0, + new ::grpc_impl::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + [this]( + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::CallbackServerContext* + #else + ::grpc::experimental::CallbackServerContext* + #endif + context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->CreateContext(context, request, response); })); + } + ~ExperimentalWithRawCallbackMethod_CreateContext() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status CreateContext(::grpc::ServerContext* /*context*/, const ::tensorflow::eager::CreateContextRequest* /*request*/, ::tensorflow::eager::CreateContextResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual ::grpc::ServerUnaryReactor* CreateContext( + ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) + #else + virtual ::grpc::experimental::ServerUnaryReactor* CreateContext( + ::grpc::experimental::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) + #endif + { return nullptr; } + }; + template + class ExperimentalWithRawCallbackMethod_UpdateContext : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + ExperimentalWithRawCallbackMethod_UpdateContext() { + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::Service:: + #else + ::grpc::Service::experimental(). + #endif + MarkMethodRawCallback(1, + new ::grpc_impl::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + [this]( + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::CallbackServerContext* + #else + ::grpc::experimental::CallbackServerContext* + #endif + context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->UpdateContext(context, request, response); })); + } + ~ExperimentalWithRawCallbackMethod_UpdateContext() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status UpdateContext(::grpc::ServerContext* /*context*/, const ::tensorflow::eager::UpdateContextRequest* /*request*/, ::tensorflow::eager::UpdateContextResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual ::grpc::ServerUnaryReactor* UpdateContext( + ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) + #else + virtual ::grpc::experimental::ServerUnaryReactor* UpdateContext( + ::grpc::experimental::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) + #endif + { return nullptr; } + }; + template + class ExperimentalWithRawCallbackMethod_Enqueue : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + ExperimentalWithRawCallbackMethod_Enqueue() { + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::Service:: + #else + ::grpc::Service::experimental(). + #endif + MarkMethodRawCallback(2, + new ::grpc_impl::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + [this]( + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::CallbackServerContext* + #else + ::grpc::experimental::CallbackServerContext* + #endif + context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->Enqueue(context, request, response); })); + } + ~ExperimentalWithRawCallbackMethod_Enqueue() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status Enqueue(::grpc::ServerContext* /*context*/, const ::tensorflow::eager::EnqueueRequest* /*request*/, ::tensorflow::eager::EnqueueResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual ::grpc::ServerUnaryReactor* Enqueue( + ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) + #else + virtual ::grpc::experimental::ServerUnaryReactor* Enqueue( + ::grpc::experimental::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) + #endif + { return nullptr; } + }; + template + class ExperimentalWithRawCallbackMethod_StreamingEnqueue : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + ExperimentalWithRawCallbackMethod_StreamingEnqueue() { + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::Service:: + #else + ::grpc::Service::experimental(). + #endif + MarkMethodRawCallback(3, + new ::grpc_impl::internal::CallbackBidiHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + [this]( + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::CallbackServerContext* + #else + ::grpc::experimental::CallbackServerContext* + #endif + context) { return this->StreamingEnqueue(context); })); + } + ~ExperimentalWithRawCallbackMethod_StreamingEnqueue() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status StreamingEnqueue(::grpc::ServerContext* /*context*/, ::grpc::ServerReaderWriter< ::tensorflow::eager::EnqueueResponse, ::tensorflow::eager::EnqueueRequest>* /*stream*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual ::grpc::ServerBidiReactor< ::grpc::ByteBuffer, ::grpc::ByteBuffer>* StreamingEnqueue( + ::grpc::CallbackServerContext* /*context*/) + #else + virtual ::grpc::experimental::ServerBidiReactor< ::grpc::ByteBuffer, ::grpc::ByteBuffer>* StreamingEnqueue( + ::grpc::experimental::CallbackServerContext* /*context*/) + #endif + { return nullptr; } + }; + template + class ExperimentalWithRawCallbackMethod_WaitQueueDone : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + ExperimentalWithRawCallbackMethod_WaitQueueDone() { + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::Service:: + #else + ::grpc::Service::experimental(). + #endif + MarkMethodRawCallback(4, + new ::grpc_impl::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + [this]( + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::CallbackServerContext* + #else + ::grpc::experimental::CallbackServerContext* + #endif + context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->WaitQueueDone(context, request, response); })); + } + ~ExperimentalWithRawCallbackMethod_WaitQueueDone() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status WaitQueueDone(::grpc::ServerContext* /*context*/, const ::tensorflow::eager::WaitQueueDoneRequest* /*request*/, ::tensorflow::eager::WaitQueueDoneResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual ::grpc::ServerUnaryReactor* WaitQueueDone( + ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) + #else + virtual ::grpc::experimental::ServerUnaryReactor* WaitQueueDone( + ::grpc::experimental::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) + #endif + { return nullptr; } + }; + template + class ExperimentalWithRawCallbackMethod_RunComponentFunction : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + ExperimentalWithRawCallbackMethod_RunComponentFunction() { + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::Service:: + #else + ::grpc::Service::experimental(). + #endif + MarkMethodRawCallback(5, + new ::grpc_impl::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + [this]( + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::CallbackServerContext* + #else + ::grpc::experimental::CallbackServerContext* + #endif + context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->RunComponentFunction(context, request, response); })); + } + ~ExperimentalWithRawCallbackMethod_RunComponentFunction() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status RunComponentFunction(::grpc::ServerContext* /*context*/, const ::tensorflow::eager::RunComponentFunctionRequest* /*request*/, ::tensorflow::eager::RunComponentFunctionResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual ::grpc::ServerUnaryReactor* RunComponentFunction( + ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) + #else + virtual ::grpc::experimental::ServerUnaryReactor* RunComponentFunction( + ::grpc::experimental::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) + #endif + { return nullptr; } + }; + template + class ExperimentalWithRawCallbackMethod_KeepAlive : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + ExperimentalWithRawCallbackMethod_KeepAlive() { + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::Service:: + #else + ::grpc::Service::experimental(). + #endif + MarkMethodRawCallback(6, + new ::grpc_impl::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + [this]( + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::CallbackServerContext* + #else + ::grpc::experimental::CallbackServerContext* + #endif + context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->KeepAlive(context, request, response); })); + } + ~ExperimentalWithRawCallbackMethod_KeepAlive() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status KeepAlive(::grpc::ServerContext* /*context*/, const ::tensorflow::eager::KeepAliveRequest* /*request*/, ::tensorflow::eager::KeepAliveResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual ::grpc::ServerUnaryReactor* KeepAlive( + ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) + #else + virtual ::grpc::experimental::ServerUnaryReactor* KeepAlive( + ::grpc::experimental::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) + #endif + { return nullptr; } + }; + template + class ExperimentalWithRawCallbackMethod_CloseContext : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + ExperimentalWithRawCallbackMethod_CloseContext() { + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::Service:: + #else + ::grpc::Service::experimental(). + #endif + MarkMethodRawCallback(7, + new ::grpc_impl::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + [this]( + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::CallbackServerContext* + #else + ::grpc::experimental::CallbackServerContext* + #endif + context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->CloseContext(context, request, response); })); + } + ~ExperimentalWithRawCallbackMethod_CloseContext() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status CloseContext(::grpc::ServerContext* /*context*/, const ::tensorflow::eager::CloseContextRequest* /*request*/, ::tensorflow::eager::CloseContextResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual ::grpc::ServerUnaryReactor* CloseContext( + ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) + #else + virtual ::grpc::experimental::ServerUnaryReactor* CloseContext( + ::grpc::experimental::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) + #endif + { return nullptr; } + }; + template + class WithStreamedUnaryMethod_CreateContext : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithStreamedUnaryMethod_CreateContext() { + ::grpc::Service::MarkMethodStreamed(0, + new ::grpc::internal::StreamedUnaryHandler< ::tensorflow::eager::CreateContextRequest, ::tensorflow::eager::CreateContextResponse>(std::bind(&WithStreamedUnaryMethod_CreateContext::StreamedCreateContext, this, std::placeholders::_1, std::placeholders::_2))); + } + ~WithStreamedUnaryMethod_CreateContext() override { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status CreateContext(::grpc::ServerContext* /*context*/, const ::tensorflow::eager::CreateContextRequest* /*request*/, ::tensorflow::eager::CreateContextResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with streamed unary + virtual ::grpc::Status StreamedCreateContext(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::tensorflow::eager::CreateContextRequest,::tensorflow::eager::CreateContextResponse>* server_unary_streamer) = 0; + }; + template + class WithStreamedUnaryMethod_UpdateContext : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithStreamedUnaryMethod_UpdateContext() { + ::grpc::Service::MarkMethodStreamed(1, + new ::grpc::internal::StreamedUnaryHandler< ::tensorflow::eager::UpdateContextRequest, ::tensorflow::eager::UpdateContextResponse>(std::bind(&WithStreamedUnaryMethod_UpdateContext::StreamedUpdateContext, this, std::placeholders::_1, std::placeholders::_2))); + } + ~WithStreamedUnaryMethod_UpdateContext() override { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status UpdateContext(::grpc::ServerContext* /*context*/, const ::tensorflow::eager::UpdateContextRequest* /*request*/, ::tensorflow::eager::UpdateContextResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with streamed unary + virtual ::grpc::Status StreamedUpdateContext(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::tensorflow::eager::UpdateContextRequest,::tensorflow::eager::UpdateContextResponse>* server_unary_streamer) = 0; + }; + template + class WithStreamedUnaryMethod_Enqueue : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithStreamedUnaryMethod_Enqueue() { + ::grpc::Service::MarkMethodStreamed(2, + new ::grpc::internal::StreamedUnaryHandler< ::tensorflow::eager::EnqueueRequest, ::tensorflow::eager::EnqueueResponse>(std::bind(&WithStreamedUnaryMethod_Enqueue::StreamedEnqueue, this, std::placeholders::_1, std::placeholders::_2))); + } + ~WithStreamedUnaryMethod_Enqueue() override { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status Enqueue(::grpc::ServerContext* /*context*/, const ::tensorflow::eager::EnqueueRequest* /*request*/, ::tensorflow::eager::EnqueueResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with streamed unary + virtual ::grpc::Status StreamedEnqueue(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::tensorflow::eager::EnqueueRequest,::tensorflow::eager::EnqueueResponse>* server_unary_streamer) = 0; + }; + template + class WithStreamedUnaryMethod_WaitQueueDone : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithStreamedUnaryMethod_WaitQueueDone() { + ::grpc::Service::MarkMethodStreamed(4, + new ::grpc::internal::StreamedUnaryHandler< ::tensorflow::eager::WaitQueueDoneRequest, ::tensorflow::eager::WaitQueueDoneResponse>(std::bind(&WithStreamedUnaryMethod_WaitQueueDone::StreamedWaitQueueDone, this, std::placeholders::_1, std::placeholders::_2))); + } + ~WithStreamedUnaryMethod_WaitQueueDone() override { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status WaitQueueDone(::grpc::ServerContext* /*context*/, const ::tensorflow::eager::WaitQueueDoneRequest* /*request*/, ::tensorflow::eager::WaitQueueDoneResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with streamed unary + virtual ::grpc::Status StreamedWaitQueueDone(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::tensorflow::eager::WaitQueueDoneRequest,::tensorflow::eager::WaitQueueDoneResponse>* server_unary_streamer) = 0; + }; + template + class WithStreamedUnaryMethod_RunComponentFunction : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithStreamedUnaryMethod_RunComponentFunction() { + ::grpc::Service::MarkMethodStreamed(5, + new ::grpc::internal::StreamedUnaryHandler< ::tensorflow::eager::RunComponentFunctionRequest, ::tensorflow::eager::RunComponentFunctionResponse>(std::bind(&WithStreamedUnaryMethod_RunComponentFunction::StreamedRunComponentFunction, this, std::placeholders::_1, std::placeholders::_2))); + } + ~WithStreamedUnaryMethod_RunComponentFunction() override { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status RunComponentFunction(::grpc::ServerContext* /*context*/, const ::tensorflow::eager::RunComponentFunctionRequest* /*request*/, ::tensorflow::eager::RunComponentFunctionResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with streamed unary + virtual ::grpc::Status StreamedRunComponentFunction(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::tensorflow::eager::RunComponentFunctionRequest,::tensorflow::eager::RunComponentFunctionResponse>* server_unary_streamer) = 0; + }; + template + class WithStreamedUnaryMethod_KeepAlive : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithStreamedUnaryMethod_KeepAlive() { + ::grpc::Service::MarkMethodStreamed(6, + new ::grpc::internal::StreamedUnaryHandler< ::tensorflow::eager::KeepAliveRequest, ::tensorflow::eager::KeepAliveResponse>(std::bind(&WithStreamedUnaryMethod_KeepAlive::StreamedKeepAlive, this, std::placeholders::_1, std::placeholders::_2))); + } + ~WithStreamedUnaryMethod_KeepAlive() override { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status KeepAlive(::grpc::ServerContext* /*context*/, const ::tensorflow::eager::KeepAliveRequest* /*request*/, ::tensorflow::eager::KeepAliveResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with streamed unary + virtual ::grpc::Status StreamedKeepAlive(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::tensorflow::eager::KeepAliveRequest,::tensorflow::eager::KeepAliveResponse>* server_unary_streamer) = 0; + }; + template + class WithStreamedUnaryMethod_CloseContext : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithStreamedUnaryMethod_CloseContext() { + ::grpc::Service::MarkMethodStreamed(7, + new ::grpc::internal::StreamedUnaryHandler< ::tensorflow::eager::CloseContextRequest, ::tensorflow::eager::CloseContextResponse>(std::bind(&WithStreamedUnaryMethod_CloseContext::StreamedCloseContext, this, std::placeholders::_1, std::placeholders::_2))); + } + ~WithStreamedUnaryMethod_CloseContext() override { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status CloseContext(::grpc::ServerContext* /*context*/, const ::tensorflow::eager::CloseContextRequest* /*request*/, ::tensorflow::eager::CloseContextResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with streamed unary + virtual ::grpc::Status StreamedCloseContext(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::tensorflow::eager::CloseContextRequest,::tensorflow::eager::CloseContextResponse>* server_unary_streamer) = 0; + }; + typedef WithStreamedUnaryMethod_CreateContext > > > > > > StreamedUnaryService; + typedef Service SplitStreamedService; + typedef WithStreamedUnaryMethod_CreateContext > > > > > > StreamedService; +}; + +} // namespace grpc + +} // namespace eager +} // namespace tensorflow + + +#endif // GRPC_tensorflow_2fcore_2fprotobuf_2feager_5fservice_2eproto__INCLUDED diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/eager_service.pb.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/eager_service.pb.h new file mode 100644 index 0000000000000000000000000000000000000000..f65237dee81907c62d306a2c4751aca33b4c3705 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/eager_service.pb.h @@ -0,0 +1,8020 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/eager_service.proto + +#ifndef GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprotobuf_2feager_5fservice_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprotobuf_2feager_5fservice_2eproto + +#include +#include + +#include +#if PROTOBUF_VERSION < 3021000 +#error This file was generated by a newer version of protoc which is +#error incompatible with your Protocol Buffer headers. Please update +#error your headers. +#endif +#if 3021009 < PROTOBUF_MIN_PROTOC_VERSION +#error This file was generated by an older version of protoc which is +#error incompatible with your Protocol Buffer headers. Please +#error regenerate this file with a newer version of protoc. +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include // IWYU pragma: export +#include // IWYU pragma: export +#include // IWYU pragma: export +#include +#include +#include +#include "tensorflow/core/framework/attr_value.pb.h" +#include "tensorflow/core/framework/device_attributes.pb.h" +#include "tensorflow/core/framework/function.pb.h" +#include "tensorflow/core/framework/tensor.pb.h" +#include "tensorflow/core/framework/tensor_shape.pb.h" +#include "tensorflow/core/framework/versions.pb.h" +#include "tensorflow/core/protobuf/remote_tensor_handle.pb.h" +#include "tensorflow/core/protobuf/tensorflow_server.pb.h" +// @@protoc_insertion_point(includes) +#include +#define PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2fprotobuf_2feager_5fservice_2eproto +PROTOBUF_NAMESPACE_OPEN +namespace internal { +class AnyMetadata; +} // namespace internal +PROTOBUF_NAMESPACE_CLOSE + +// Internal implementation detail -- do not use these members. +struct TableStruct_tensorflow_2fcore_2fprotobuf_2feager_5fservice_2eproto { + static const uint32_t offsets[]; +}; +extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_tensorflow_2fcore_2fprotobuf_2feager_5fservice_2eproto; +namespace tensorflow { +namespace eager { +class CleanupFunctionOp; +struct CleanupFunctionOpDefaultTypeInternal; +extern CleanupFunctionOpDefaultTypeInternal _CleanupFunctionOp_default_instance_; +class CloseContextRequest; +struct CloseContextRequestDefaultTypeInternal; +extern CloseContextRequestDefaultTypeInternal _CloseContextRequest_default_instance_; +class CloseContextResponse; +struct CloseContextResponseDefaultTypeInternal; +extern CloseContextResponseDefaultTypeInternal _CloseContextResponse_default_instance_; +class CreateContextRequest; +struct CreateContextRequestDefaultTypeInternal; +extern CreateContextRequestDefaultTypeInternal _CreateContextRequest_default_instance_; +class CreateContextResponse; +struct CreateContextResponseDefaultTypeInternal; +extern CreateContextResponseDefaultTypeInternal _CreateContextResponse_default_instance_; +class EnqueueRequest; +struct EnqueueRequestDefaultTypeInternal; +extern EnqueueRequestDefaultTypeInternal _EnqueueRequest_default_instance_; +class EnqueueResponse; +struct EnqueueResponseDefaultTypeInternal; +extern EnqueueResponseDefaultTypeInternal _EnqueueResponse_default_instance_; +class KeepAliveRequest; +struct KeepAliveRequestDefaultTypeInternal; +extern KeepAliveRequestDefaultTypeInternal _KeepAliveRequest_default_instance_; +class KeepAliveResponse; +struct KeepAliveResponseDefaultTypeInternal; +extern KeepAliveResponseDefaultTypeInternal _KeepAliveResponse_default_instance_; +class Operation; +struct OperationDefaultTypeInternal; +extern OperationDefaultTypeInternal _Operation_default_instance_; +class Operation_AttrsEntry_DoNotUse; +struct Operation_AttrsEntry_DoNotUseDefaultTypeInternal; +extern Operation_AttrsEntry_DoNotUseDefaultTypeInternal _Operation_AttrsEntry_DoNotUse_default_instance_; +class Operation_Input; +struct Operation_InputDefaultTypeInternal; +extern Operation_InputDefaultTypeInternal _Operation_Input_default_instance_; +class QueueItem; +struct QueueItemDefaultTypeInternal; +extern QueueItemDefaultTypeInternal _QueueItem_default_instance_; +class QueueResponse; +struct QueueResponseDefaultTypeInternal; +extern QueueResponseDefaultTypeInternal _QueueResponse_default_instance_; +class RegisterFunctionOp; +struct RegisterFunctionOpDefaultTypeInternal; +extern RegisterFunctionOpDefaultTypeInternal _RegisterFunctionOp_default_instance_; +class RemoveFunctionOp; +struct RemoveFunctionOpDefaultTypeInternal; +extern RemoveFunctionOpDefaultTypeInternal _RemoveFunctionOp_default_instance_; +class RunComponentFunctionRequest; +struct RunComponentFunctionRequestDefaultTypeInternal; +extern RunComponentFunctionRequestDefaultTypeInternal _RunComponentFunctionRequest_default_instance_; +class RunComponentFunctionResponse; +struct RunComponentFunctionResponseDefaultTypeInternal; +extern RunComponentFunctionResponseDefaultTypeInternal _RunComponentFunctionResponse_default_instance_; +class SendPackedHandleOp; +struct SendPackedHandleOpDefaultTypeInternal; +extern SendPackedHandleOpDefaultTypeInternal _SendPackedHandleOp_default_instance_; +class SendPackedHandleOp_Handle; +struct SendPackedHandleOp_HandleDefaultTypeInternal; +extern SendPackedHandleOp_HandleDefaultTypeInternal _SendPackedHandleOp_Handle_default_instance_; +class SendPackedHandleOp_LocalTensorHandle; +struct SendPackedHandleOp_LocalTensorHandleDefaultTypeInternal; +extern SendPackedHandleOp_LocalTensorHandleDefaultTypeInternal _SendPackedHandleOp_LocalTensorHandle_default_instance_; +class SendTensorOp; +struct SendTensorOpDefaultTypeInternal; +extern SendTensorOpDefaultTypeInternal _SendTensorOp_default_instance_; +class SyncRemoteExecutorForStream; +struct SyncRemoteExecutorForStreamDefaultTypeInternal; +extern SyncRemoteExecutorForStreamDefaultTypeInternal _SyncRemoteExecutorForStream_default_instance_; +class UpdateContextRequest; +struct UpdateContextRequestDefaultTypeInternal; +extern UpdateContextRequestDefaultTypeInternal _UpdateContextRequest_default_instance_; +class UpdateContextResponse; +struct UpdateContextResponseDefaultTypeInternal; +extern UpdateContextResponseDefaultTypeInternal _UpdateContextResponse_default_instance_; +class WaitQueueDoneRequest; +struct WaitQueueDoneRequestDefaultTypeInternal; +extern WaitQueueDoneRequestDefaultTypeInternal _WaitQueueDoneRequest_default_instance_; +class WaitQueueDoneResponse; +struct WaitQueueDoneResponseDefaultTypeInternal; +extern WaitQueueDoneResponseDefaultTypeInternal _WaitQueueDoneResponse_default_instance_; +} // namespace eager +} // namespace tensorflow +PROTOBUF_NAMESPACE_OPEN +template<> ::tensorflow::eager::CleanupFunctionOp* Arena::CreateMaybeMessage<::tensorflow::eager::CleanupFunctionOp>(Arena*); +template<> ::tensorflow::eager::CloseContextRequest* Arena::CreateMaybeMessage<::tensorflow::eager::CloseContextRequest>(Arena*); +template<> ::tensorflow::eager::CloseContextResponse* Arena::CreateMaybeMessage<::tensorflow::eager::CloseContextResponse>(Arena*); +template<> ::tensorflow::eager::CreateContextRequest* Arena::CreateMaybeMessage<::tensorflow::eager::CreateContextRequest>(Arena*); +template<> ::tensorflow::eager::CreateContextResponse* Arena::CreateMaybeMessage<::tensorflow::eager::CreateContextResponse>(Arena*); +template<> ::tensorflow::eager::EnqueueRequest* Arena::CreateMaybeMessage<::tensorflow::eager::EnqueueRequest>(Arena*); +template<> ::tensorflow::eager::EnqueueResponse* Arena::CreateMaybeMessage<::tensorflow::eager::EnqueueResponse>(Arena*); +template<> ::tensorflow::eager::KeepAliveRequest* Arena::CreateMaybeMessage<::tensorflow::eager::KeepAliveRequest>(Arena*); +template<> ::tensorflow::eager::KeepAliveResponse* Arena::CreateMaybeMessage<::tensorflow::eager::KeepAliveResponse>(Arena*); +template<> ::tensorflow::eager::Operation* Arena::CreateMaybeMessage<::tensorflow::eager::Operation>(Arena*); +template<> ::tensorflow::eager::Operation_AttrsEntry_DoNotUse* Arena::CreateMaybeMessage<::tensorflow::eager::Operation_AttrsEntry_DoNotUse>(Arena*); +template<> ::tensorflow::eager::Operation_Input* Arena::CreateMaybeMessage<::tensorflow::eager::Operation_Input>(Arena*); +template<> ::tensorflow::eager::QueueItem* Arena::CreateMaybeMessage<::tensorflow::eager::QueueItem>(Arena*); +template<> ::tensorflow::eager::QueueResponse* Arena::CreateMaybeMessage<::tensorflow::eager::QueueResponse>(Arena*); +template<> ::tensorflow::eager::RegisterFunctionOp* Arena::CreateMaybeMessage<::tensorflow::eager::RegisterFunctionOp>(Arena*); +template<> ::tensorflow::eager::RemoveFunctionOp* Arena::CreateMaybeMessage<::tensorflow::eager::RemoveFunctionOp>(Arena*); +template<> ::tensorflow::eager::RunComponentFunctionRequest* Arena::CreateMaybeMessage<::tensorflow::eager::RunComponentFunctionRequest>(Arena*); +template<> ::tensorflow::eager::RunComponentFunctionResponse* Arena::CreateMaybeMessage<::tensorflow::eager::RunComponentFunctionResponse>(Arena*); +template<> ::tensorflow::eager::SendPackedHandleOp* Arena::CreateMaybeMessage<::tensorflow::eager::SendPackedHandleOp>(Arena*); +template<> ::tensorflow::eager::SendPackedHandleOp_Handle* Arena::CreateMaybeMessage<::tensorflow::eager::SendPackedHandleOp_Handle>(Arena*); +template<> ::tensorflow::eager::SendPackedHandleOp_LocalTensorHandle* Arena::CreateMaybeMessage<::tensorflow::eager::SendPackedHandleOp_LocalTensorHandle>(Arena*); +template<> ::tensorflow::eager::SendTensorOp* Arena::CreateMaybeMessage<::tensorflow::eager::SendTensorOp>(Arena*); +template<> ::tensorflow::eager::SyncRemoteExecutorForStream* Arena::CreateMaybeMessage<::tensorflow::eager::SyncRemoteExecutorForStream>(Arena*); +template<> ::tensorflow::eager::UpdateContextRequest* Arena::CreateMaybeMessage<::tensorflow::eager::UpdateContextRequest>(Arena*); +template<> ::tensorflow::eager::UpdateContextResponse* Arena::CreateMaybeMessage<::tensorflow::eager::UpdateContextResponse>(Arena*); +template<> ::tensorflow::eager::WaitQueueDoneRequest* Arena::CreateMaybeMessage<::tensorflow::eager::WaitQueueDoneRequest>(Arena*); +template<> ::tensorflow::eager::WaitQueueDoneResponse* Arena::CreateMaybeMessage<::tensorflow::eager::WaitQueueDoneResponse>(Arena*); +PROTOBUF_NAMESPACE_CLOSE +namespace tensorflow { +namespace eager { + +// =================================================================== + +class Operation_Input final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.eager.Operation.Input) */ { + public: + inline Operation_Input() : Operation_Input(nullptr) {} + ~Operation_Input() override; + explicit PROTOBUF_CONSTEXPR Operation_Input(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + Operation_Input(const Operation_Input& from); + Operation_Input(Operation_Input&& from) noexcept + : Operation_Input() { + *this = ::std::move(from); + } + + inline Operation_Input& operator=(const Operation_Input& from) { + CopyFrom(from); + return *this; + } + inline Operation_Input& operator=(Operation_Input&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const Operation_Input& default_instance() { + return *internal_default_instance(); + } + enum ItemCase { + kRemoteHandle = 1, + kTensor = 2, + ITEM_NOT_SET = 0, + }; + + static inline const Operation_Input* internal_default_instance() { + return reinterpret_cast( + &_Operation_Input_default_instance_); + } + static constexpr int kIndexInFileMessages = + 0; + + friend void swap(Operation_Input& a, Operation_Input& b) { + a.Swap(&b); + } + inline void Swap(Operation_Input* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(Operation_Input* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + Operation_Input* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const Operation_Input& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const Operation_Input& from) { + Operation_Input::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(Operation_Input* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.eager.Operation.Input"; + } + protected: + explicit Operation_Input(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kRemoteHandleFieldNumber = 1, + kTensorFieldNumber = 2, + }; + // .tensorflow.eager.RemoteTensorHandle remote_handle = 1; + bool has_remote_handle() const; + private: + bool _internal_has_remote_handle() const; + public: + void clear_remote_handle(); + const ::tensorflow::eager::RemoteTensorHandle& remote_handle() const; + PROTOBUF_NODISCARD ::tensorflow::eager::RemoteTensorHandle* release_remote_handle(); + ::tensorflow::eager::RemoteTensorHandle* mutable_remote_handle(); + void set_allocated_remote_handle(::tensorflow::eager::RemoteTensorHandle* remote_handle); + private: + const ::tensorflow::eager::RemoteTensorHandle& _internal_remote_handle() const; + ::tensorflow::eager::RemoteTensorHandle* _internal_mutable_remote_handle(); + public: + void unsafe_arena_set_allocated_remote_handle( + ::tensorflow::eager::RemoteTensorHandle* remote_handle); + ::tensorflow::eager::RemoteTensorHandle* unsafe_arena_release_remote_handle(); + + // .tensorflow.TensorProto tensor = 2; + bool has_tensor() const; + private: + bool _internal_has_tensor() const; + public: + void clear_tensor(); + const ::tensorflow::TensorProto& tensor() const; + PROTOBUF_NODISCARD ::tensorflow::TensorProto* release_tensor(); + ::tensorflow::TensorProto* mutable_tensor(); + void set_allocated_tensor(::tensorflow::TensorProto* tensor); + private: + const ::tensorflow::TensorProto& _internal_tensor() const; + ::tensorflow::TensorProto* _internal_mutable_tensor(); + public: + void unsafe_arena_set_allocated_tensor( + ::tensorflow::TensorProto* tensor); + ::tensorflow::TensorProto* unsafe_arena_release_tensor(); + + void clear_item(); + ItemCase item_case() const; + // @@protoc_insertion_point(class_scope:tensorflow.eager.Operation.Input) + private: + class _Internal; + void set_has_remote_handle(); + void set_has_tensor(); + + inline bool has_item() const; + inline void clear_has_item(); + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + union ItemUnion { + constexpr ItemUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + ::tensorflow::eager::RemoteTensorHandle* remote_handle_; + ::tensorflow::TensorProto* tensor_; + } item_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + uint32_t _oneof_case_[1]; + + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2feager_5fservice_2eproto; +}; +// ------------------------------------------------------------------- + +class Operation_AttrsEntry_DoNotUse : public ::PROTOBUF_NAMESPACE_ID::internal::MapEntry { +public: + typedef ::PROTOBUF_NAMESPACE_ID::internal::MapEntry SuperType; + Operation_AttrsEntry_DoNotUse(); + explicit PROTOBUF_CONSTEXPR Operation_AttrsEntry_DoNotUse( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + explicit Operation_AttrsEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena); + void MergeFrom(const Operation_AttrsEntry_DoNotUse& other); + static const Operation_AttrsEntry_DoNotUse* internal_default_instance() { return reinterpret_cast(&_Operation_AttrsEntry_DoNotUse_default_instance_); } + static bool ValidateKey(std::string* s) { + return ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(s->data(), static_cast(s->size()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, "tensorflow.eager.Operation.AttrsEntry.key"); + } + static bool ValidateValue(void*) { return true; } + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2feager_5fservice_2eproto; +}; + +// ------------------------------------------------------------------- + +class Operation final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.eager.Operation) */ { + public: + inline Operation() : Operation(nullptr) {} + ~Operation() override; + explicit PROTOBUF_CONSTEXPR Operation(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + Operation(const Operation& from); + Operation(Operation&& from) noexcept + : Operation() { + *this = ::std::move(from); + } + + inline Operation& operator=(const Operation& from) { + CopyFrom(from); + return *this; + } + inline Operation& operator=(Operation&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const Operation& default_instance() { + return *internal_default_instance(); + } + static inline const Operation* internal_default_instance() { + return reinterpret_cast( + &_Operation_default_instance_); + } + static constexpr int kIndexInFileMessages = + 2; + + friend void swap(Operation& a, Operation& b) { + a.Swap(&b); + } + inline void Swap(Operation* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(Operation* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + Operation* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const Operation& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const Operation& from) { + Operation::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(Operation* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.eager.Operation"; + } + protected: + explicit Operation(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + typedef Operation_Input Input; + + // accessors ------------------------------------------------------- + + enum : int { + kControlOpIdsFieldNumber = 4, + kAttrsFieldNumber = 5, + kOpInputsFieldNumber = 10, + kNameFieldNumber = 2, + kDeviceFieldNumber = 6, + kIdFieldNumber = 1, + kFuncStepIdFieldNumber = 8, + kIsComponentFunctionFieldNumber = 7, + kIsFunctionFieldNumber = 9, + }; + // repeated int64 control_op_ids = 4; + int control_op_ids_size() const; + private: + int _internal_control_op_ids_size() const; + public: + void clear_control_op_ids(); + private: + int64_t _internal_control_op_ids(int index) const; + const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >& + _internal_control_op_ids() const; + void _internal_add_control_op_ids(int64_t value); + ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >* + _internal_mutable_control_op_ids(); + public: + int64_t control_op_ids(int index) const; + void set_control_op_ids(int index, int64_t value); + void add_control_op_ids(int64_t value); + const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >& + control_op_ids() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >* + mutable_control_op_ids(); + + // map attrs = 5; + int attrs_size() const; + private: + int _internal_attrs_size() const; + public: + void clear_attrs(); + private: + const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::AttrValue >& + _internal_attrs() const; + ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::AttrValue >* + _internal_mutable_attrs(); + public: + const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::AttrValue >& + attrs() const; + ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::AttrValue >* + mutable_attrs(); + + // repeated .tensorflow.eager.Operation.Input op_inputs = 10; + int op_inputs_size() const; + private: + int _internal_op_inputs_size() const; + public: + void clear_op_inputs(); + ::tensorflow::eager::Operation_Input* mutable_op_inputs(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::eager::Operation_Input >* + mutable_op_inputs(); + private: + const ::tensorflow::eager::Operation_Input& _internal_op_inputs(int index) const; + ::tensorflow::eager::Operation_Input* _internal_add_op_inputs(); + public: + const ::tensorflow::eager::Operation_Input& op_inputs(int index) const; + ::tensorflow::eager::Operation_Input* add_op_inputs(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::eager::Operation_Input >& + op_inputs() const; + + // string name = 2; + void clear_name(); + const std::string& name() const; + template + void set_name(ArgT0&& arg0, ArgT... args); + std::string* mutable_name(); + PROTOBUF_NODISCARD std::string* release_name(); + void set_allocated_name(std::string* name); + private: + const std::string& _internal_name() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_name(const std::string& value); + std::string* _internal_mutable_name(); + public: + + // string device = 6; + void clear_device(); + const std::string& device() const; + template + void set_device(ArgT0&& arg0, ArgT... args); + std::string* mutable_device(); + PROTOBUF_NODISCARD std::string* release_device(); + void set_allocated_device(std::string* device); + private: + const std::string& _internal_device() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_device(const std::string& value); + std::string* _internal_mutable_device(); + public: + + // int64 id = 1; + void clear_id(); + int64_t id() const; + void set_id(int64_t value); + private: + int64_t _internal_id() const; + void _internal_set_id(int64_t value); + public: + + // int64 func_step_id = 8; + void clear_func_step_id(); + int64_t func_step_id() const; + void set_func_step_id(int64_t value); + private: + int64_t _internal_func_step_id() const; + void _internal_set_func_step_id(int64_t value); + public: + + // bool is_component_function = 7; + void clear_is_component_function(); + bool is_component_function() const; + void set_is_component_function(bool value); + private: + bool _internal_is_component_function() const; + void _internal_set_is_component_function(bool value); + public: + + // bool is_function = 9; + void clear_is_function(); + bool is_function() const; + void set_is_function(bool value); + private: + bool _internal_is_function() const; + void _internal_set_is_function(bool value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.eager.Operation) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t > control_op_ids_; + mutable std::atomic _control_op_ids_cached_byte_size_; + ::PROTOBUF_NAMESPACE_ID::internal::MapField< + Operation_AttrsEntry_DoNotUse, + std::string, ::tensorflow::AttrValue, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_MESSAGE> attrs_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::eager::Operation_Input > op_inputs_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr device_; + int64_t id_; + int64_t func_step_id_; + bool is_component_function_; + bool is_function_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2feager_5fservice_2eproto; +}; +// ------------------------------------------------------------------- + +class QueueItem final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.eager.QueueItem) */ { + public: + inline QueueItem() : QueueItem(nullptr) {} + ~QueueItem() override; + explicit PROTOBUF_CONSTEXPR QueueItem(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + QueueItem(const QueueItem& from); + QueueItem(QueueItem&& from) noexcept + : QueueItem() { + *this = ::std::move(from); + } + + inline QueueItem& operator=(const QueueItem& from) { + CopyFrom(from); + return *this; + } + inline QueueItem& operator=(QueueItem&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const QueueItem& default_instance() { + return *internal_default_instance(); + } + enum ItemCase { + kHandleToDecref = 1, + kOperation = 2, + kSendTensor = 3, + kRegisterFunction = 4, + kCleanupFunction = 5, + kSyncRemoteExecutorForStream = 6, + kSendPackedHandle = 7, + kRemoveFunction = 8, + ITEM_NOT_SET = 0, + }; + + static inline const QueueItem* internal_default_instance() { + return reinterpret_cast( + &_QueueItem_default_instance_); + } + static constexpr int kIndexInFileMessages = + 3; + + friend void swap(QueueItem& a, QueueItem& b) { + a.Swap(&b); + } + inline void Swap(QueueItem* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(QueueItem* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + QueueItem* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const QueueItem& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const QueueItem& from) { + QueueItem::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(QueueItem* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.eager.QueueItem"; + } + protected: + explicit QueueItem(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kHandleToDecrefFieldNumber = 1, + kOperationFieldNumber = 2, + kSendTensorFieldNumber = 3, + kRegisterFunctionFieldNumber = 4, + kCleanupFunctionFieldNumber = 5, + kSyncRemoteExecutorForStreamFieldNumber = 6, + kSendPackedHandleFieldNumber = 7, + kRemoveFunctionFieldNumber = 8, + }; + // .tensorflow.eager.RemoteTensorHandle handle_to_decref = 1; + bool has_handle_to_decref() const; + private: + bool _internal_has_handle_to_decref() const; + public: + void clear_handle_to_decref(); + const ::tensorflow::eager::RemoteTensorHandle& handle_to_decref() const; + PROTOBUF_NODISCARD ::tensorflow::eager::RemoteTensorHandle* release_handle_to_decref(); + ::tensorflow::eager::RemoteTensorHandle* mutable_handle_to_decref(); + void set_allocated_handle_to_decref(::tensorflow::eager::RemoteTensorHandle* handle_to_decref); + private: + const ::tensorflow::eager::RemoteTensorHandle& _internal_handle_to_decref() const; + ::tensorflow::eager::RemoteTensorHandle* _internal_mutable_handle_to_decref(); + public: + void unsafe_arena_set_allocated_handle_to_decref( + ::tensorflow::eager::RemoteTensorHandle* handle_to_decref); + ::tensorflow::eager::RemoteTensorHandle* unsafe_arena_release_handle_to_decref(); + + // .tensorflow.eager.Operation operation = 2; + bool has_operation() const; + private: + bool _internal_has_operation() const; + public: + void clear_operation(); + const ::tensorflow::eager::Operation& operation() const; + PROTOBUF_NODISCARD ::tensorflow::eager::Operation* release_operation(); + ::tensorflow::eager::Operation* mutable_operation(); + void set_allocated_operation(::tensorflow::eager::Operation* operation); + private: + const ::tensorflow::eager::Operation& _internal_operation() const; + ::tensorflow::eager::Operation* _internal_mutable_operation(); + public: + void unsafe_arena_set_allocated_operation( + ::tensorflow::eager::Operation* operation); + ::tensorflow::eager::Operation* unsafe_arena_release_operation(); + + // .tensorflow.eager.SendTensorOp send_tensor = 3; + bool has_send_tensor() const; + private: + bool _internal_has_send_tensor() const; + public: + void clear_send_tensor(); + const ::tensorflow::eager::SendTensorOp& send_tensor() const; + PROTOBUF_NODISCARD ::tensorflow::eager::SendTensorOp* release_send_tensor(); + ::tensorflow::eager::SendTensorOp* mutable_send_tensor(); + void set_allocated_send_tensor(::tensorflow::eager::SendTensorOp* send_tensor); + private: + const ::tensorflow::eager::SendTensorOp& _internal_send_tensor() const; + ::tensorflow::eager::SendTensorOp* _internal_mutable_send_tensor(); + public: + void unsafe_arena_set_allocated_send_tensor( + ::tensorflow::eager::SendTensorOp* send_tensor); + ::tensorflow::eager::SendTensorOp* unsafe_arena_release_send_tensor(); + + // .tensorflow.eager.RegisterFunctionOp register_function = 4; + bool has_register_function() const; + private: + bool _internal_has_register_function() const; + public: + void clear_register_function(); + const ::tensorflow::eager::RegisterFunctionOp& register_function() const; + PROTOBUF_NODISCARD ::tensorflow::eager::RegisterFunctionOp* release_register_function(); + ::tensorflow::eager::RegisterFunctionOp* mutable_register_function(); + void set_allocated_register_function(::tensorflow::eager::RegisterFunctionOp* register_function); + private: + const ::tensorflow::eager::RegisterFunctionOp& _internal_register_function() const; + ::tensorflow::eager::RegisterFunctionOp* _internal_mutable_register_function(); + public: + void unsafe_arena_set_allocated_register_function( + ::tensorflow::eager::RegisterFunctionOp* register_function); + ::tensorflow::eager::RegisterFunctionOp* unsafe_arena_release_register_function(); + + // .tensorflow.eager.CleanupFunctionOp cleanup_function = 5; + bool has_cleanup_function() const; + private: + bool _internal_has_cleanup_function() const; + public: + void clear_cleanup_function(); + const ::tensorflow::eager::CleanupFunctionOp& cleanup_function() const; + PROTOBUF_NODISCARD ::tensorflow::eager::CleanupFunctionOp* release_cleanup_function(); + ::tensorflow::eager::CleanupFunctionOp* mutable_cleanup_function(); + void set_allocated_cleanup_function(::tensorflow::eager::CleanupFunctionOp* cleanup_function); + private: + const ::tensorflow::eager::CleanupFunctionOp& _internal_cleanup_function() const; + ::tensorflow::eager::CleanupFunctionOp* _internal_mutable_cleanup_function(); + public: + void unsafe_arena_set_allocated_cleanup_function( + ::tensorflow::eager::CleanupFunctionOp* cleanup_function); + ::tensorflow::eager::CleanupFunctionOp* unsafe_arena_release_cleanup_function(); + + // .tensorflow.eager.SyncRemoteExecutorForStream sync_remote_executor_for_stream = 6; + bool has_sync_remote_executor_for_stream() const; + private: + bool _internal_has_sync_remote_executor_for_stream() const; + public: + void clear_sync_remote_executor_for_stream(); + const ::tensorflow::eager::SyncRemoteExecutorForStream& sync_remote_executor_for_stream() const; + PROTOBUF_NODISCARD ::tensorflow::eager::SyncRemoteExecutorForStream* release_sync_remote_executor_for_stream(); + ::tensorflow::eager::SyncRemoteExecutorForStream* mutable_sync_remote_executor_for_stream(); + void set_allocated_sync_remote_executor_for_stream(::tensorflow::eager::SyncRemoteExecutorForStream* sync_remote_executor_for_stream); + private: + const ::tensorflow::eager::SyncRemoteExecutorForStream& _internal_sync_remote_executor_for_stream() const; + ::tensorflow::eager::SyncRemoteExecutorForStream* _internal_mutable_sync_remote_executor_for_stream(); + public: + void unsafe_arena_set_allocated_sync_remote_executor_for_stream( + ::tensorflow::eager::SyncRemoteExecutorForStream* sync_remote_executor_for_stream); + ::tensorflow::eager::SyncRemoteExecutorForStream* unsafe_arena_release_sync_remote_executor_for_stream(); + + // .tensorflow.eager.SendPackedHandleOp send_packed_handle = 7; + bool has_send_packed_handle() const; + private: + bool _internal_has_send_packed_handle() const; + public: + void clear_send_packed_handle(); + const ::tensorflow::eager::SendPackedHandleOp& send_packed_handle() const; + PROTOBUF_NODISCARD ::tensorflow::eager::SendPackedHandleOp* release_send_packed_handle(); + ::tensorflow::eager::SendPackedHandleOp* mutable_send_packed_handle(); + void set_allocated_send_packed_handle(::tensorflow::eager::SendPackedHandleOp* send_packed_handle); + private: + const ::tensorflow::eager::SendPackedHandleOp& _internal_send_packed_handle() const; + ::tensorflow::eager::SendPackedHandleOp* _internal_mutable_send_packed_handle(); + public: + void unsafe_arena_set_allocated_send_packed_handle( + ::tensorflow::eager::SendPackedHandleOp* send_packed_handle); + ::tensorflow::eager::SendPackedHandleOp* unsafe_arena_release_send_packed_handle(); + + // .tensorflow.eager.RemoveFunctionOp remove_function = 8; + bool has_remove_function() const; + private: + bool _internal_has_remove_function() const; + public: + void clear_remove_function(); + const ::tensorflow::eager::RemoveFunctionOp& remove_function() const; + PROTOBUF_NODISCARD ::tensorflow::eager::RemoveFunctionOp* release_remove_function(); + ::tensorflow::eager::RemoveFunctionOp* mutable_remove_function(); + void set_allocated_remove_function(::tensorflow::eager::RemoveFunctionOp* remove_function); + private: + const ::tensorflow::eager::RemoveFunctionOp& _internal_remove_function() const; + ::tensorflow::eager::RemoveFunctionOp* _internal_mutable_remove_function(); + public: + void unsafe_arena_set_allocated_remove_function( + ::tensorflow::eager::RemoveFunctionOp* remove_function); + ::tensorflow::eager::RemoveFunctionOp* unsafe_arena_release_remove_function(); + + void clear_item(); + ItemCase item_case() const; + // @@protoc_insertion_point(class_scope:tensorflow.eager.QueueItem) + private: + class _Internal; + void set_has_handle_to_decref(); + void set_has_operation(); + void set_has_send_tensor(); + void set_has_register_function(); + void set_has_cleanup_function(); + void set_has_sync_remote_executor_for_stream(); + void set_has_send_packed_handle(); + void set_has_remove_function(); + + inline bool has_item() const; + inline void clear_has_item(); + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + union ItemUnion { + constexpr ItemUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + ::tensorflow::eager::RemoteTensorHandle* handle_to_decref_; + ::tensorflow::eager::Operation* operation_; + ::tensorflow::eager::SendTensorOp* send_tensor_; + ::tensorflow::eager::RegisterFunctionOp* register_function_; + ::tensorflow::eager::CleanupFunctionOp* cleanup_function_; + ::tensorflow::eager::SyncRemoteExecutorForStream* sync_remote_executor_for_stream_; + ::tensorflow::eager::SendPackedHandleOp* send_packed_handle_; + ::tensorflow::eager::RemoveFunctionOp* remove_function_; + } item_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + uint32_t _oneof_case_[1]; + + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2feager_5fservice_2eproto; +}; +// ------------------------------------------------------------------- + +class QueueResponse final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.eager.QueueResponse) */ { + public: + inline QueueResponse() : QueueResponse(nullptr) {} + ~QueueResponse() override; + explicit PROTOBUF_CONSTEXPR QueueResponse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + QueueResponse(const QueueResponse& from); + QueueResponse(QueueResponse&& from) noexcept + : QueueResponse() { + *this = ::std::move(from); + } + + inline QueueResponse& operator=(const QueueResponse& from) { + CopyFrom(from); + return *this; + } + inline QueueResponse& operator=(QueueResponse&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const QueueResponse& default_instance() { + return *internal_default_instance(); + } + static inline const QueueResponse* internal_default_instance() { + return reinterpret_cast( + &_QueueResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = + 4; + + friend void swap(QueueResponse& a, QueueResponse& b) { + a.Swap(&b); + } + inline void Swap(QueueResponse* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(QueueResponse* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + QueueResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const QueueResponse& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const QueueResponse& from) { + QueueResponse::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(QueueResponse* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.eager.QueueResponse"; + } + protected: + explicit QueueResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kShapeFieldNumber = 1, + kTensorFieldNumber = 2, + kDeviceFieldNumber = 3, + }; + // repeated .tensorflow.TensorShapeProto shape = 1; + int shape_size() const; + private: + int _internal_shape_size() const; + public: + void clear_shape(); + ::tensorflow::TensorShapeProto* mutable_shape(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::TensorShapeProto >* + mutable_shape(); + private: + const ::tensorflow::TensorShapeProto& _internal_shape(int index) const; + ::tensorflow::TensorShapeProto* _internal_add_shape(); + public: + const ::tensorflow::TensorShapeProto& shape(int index) const; + ::tensorflow::TensorShapeProto* add_shape(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::TensorShapeProto >& + shape() const; + + // repeated .tensorflow.TensorProto tensor = 2; + int tensor_size() const; + private: + int _internal_tensor_size() const; + public: + void clear_tensor(); + ::tensorflow::TensorProto* mutable_tensor(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::TensorProto >* + mutable_tensor(); + private: + const ::tensorflow::TensorProto& _internal_tensor(int index) const; + ::tensorflow::TensorProto* _internal_add_tensor(); + public: + const ::tensorflow::TensorProto& tensor(int index) const; + ::tensorflow::TensorProto* add_tensor(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::TensorProto >& + tensor() const; + + // repeated string device = 3; + int device_size() const; + private: + int _internal_device_size() const; + public: + void clear_device(); + const std::string& device(int index) const; + std::string* mutable_device(int index); + void set_device(int index, const std::string& value); + void set_device(int index, std::string&& value); + void set_device(int index, const char* value); + void set_device(int index, const char* value, size_t size); + std::string* add_device(); + void add_device(const std::string& value); + void add_device(std::string&& value); + void add_device(const char* value); + void add_device(const char* value, size_t size); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& device() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* mutable_device(); + private: + const std::string& _internal_device(int index) const; + std::string* _internal_add_device(); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.eager.QueueResponse) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::TensorShapeProto > shape_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::TensorProto > tensor_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField device_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2feager_5fservice_2eproto; +}; +// ------------------------------------------------------------------- + +class CreateContextRequest final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.eager.CreateContextRequest) */ { + public: + inline CreateContextRequest() : CreateContextRequest(nullptr) {} + ~CreateContextRequest() override; + explicit PROTOBUF_CONSTEXPR CreateContextRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + CreateContextRequest(const CreateContextRequest& from); + CreateContextRequest(CreateContextRequest&& from) noexcept + : CreateContextRequest() { + *this = ::std::move(from); + } + + inline CreateContextRequest& operator=(const CreateContextRequest& from) { + CopyFrom(from); + return *this; + } + inline CreateContextRequest& operator=(CreateContextRequest&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const CreateContextRequest& default_instance() { + return *internal_default_instance(); + } + static inline const CreateContextRequest* internal_default_instance() { + return reinterpret_cast( + &_CreateContextRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 5; + + friend void swap(CreateContextRequest& a, CreateContextRequest& b) { + a.Swap(&b); + } + inline void Swap(CreateContextRequest* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(CreateContextRequest* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + CreateContextRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const CreateContextRequest& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const CreateContextRequest& from) { + CreateContextRequest::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(CreateContextRequest* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.eager.CreateContextRequest"; + } + protected: + explicit CreateContextRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kClusterDeviceAttributesFieldNumber = 6, + kServerDefFieldNumber = 1, + kVersionDefFieldNumber = 4, + kKeepAliveSecsFieldNumber = 3, + kContextIdFieldNumber = 7, + kContextViewIdFieldNumber = 8, + kAsyncFieldNumber = 2, + kLazyCopyRemoteFunctionInputsFieldNumber = 9, + }; + // repeated .tensorflow.DeviceAttributes cluster_device_attributes = 6; + int cluster_device_attributes_size() const; + private: + int _internal_cluster_device_attributes_size() const; + public: + void clear_cluster_device_attributes(); + ::tensorflow::DeviceAttributes* mutable_cluster_device_attributes(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::DeviceAttributes >* + mutable_cluster_device_attributes(); + private: + const ::tensorflow::DeviceAttributes& _internal_cluster_device_attributes(int index) const; + ::tensorflow::DeviceAttributes* _internal_add_cluster_device_attributes(); + public: + const ::tensorflow::DeviceAttributes& cluster_device_attributes(int index) const; + ::tensorflow::DeviceAttributes* add_cluster_device_attributes(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::DeviceAttributes >& + cluster_device_attributes() const; + + // .tensorflow.ServerDef server_def = 1; + bool has_server_def() const; + private: + bool _internal_has_server_def() const; + public: + void clear_server_def(); + const ::tensorflow::ServerDef& server_def() const; + PROTOBUF_NODISCARD ::tensorflow::ServerDef* release_server_def(); + ::tensorflow::ServerDef* mutable_server_def(); + void set_allocated_server_def(::tensorflow::ServerDef* server_def); + private: + const ::tensorflow::ServerDef& _internal_server_def() const; + ::tensorflow::ServerDef* _internal_mutable_server_def(); + public: + void unsafe_arena_set_allocated_server_def( + ::tensorflow::ServerDef* server_def); + ::tensorflow::ServerDef* unsafe_arena_release_server_def(); + + // .tensorflow.VersionDef version_def = 4; + bool has_version_def() const; + private: + bool _internal_has_version_def() const; + public: + void clear_version_def(); + const ::tensorflow::VersionDef& version_def() const; + PROTOBUF_NODISCARD ::tensorflow::VersionDef* release_version_def(); + ::tensorflow::VersionDef* mutable_version_def(); + void set_allocated_version_def(::tensorflow::VersionDef* version_def); + private: + const ::tensorflow::VersionDef& _internal_version_def() const; + ::tensorflow::VersionDef* _internal_mutable_version_def(); + public: + void unsafe_arena_set_allocated_version_def( + ::tensorflow::VersionDef* version_def); + ::tensorflow::VersionDef* unsafe_arena_release_version_def(); + + // int64 keep_alive_secs = 3; + void clear_keep_alive_secs(); + int64_t keep_alive_secs() const; + void set_keep_alive_secs(int64_t value); + private: + int64_t _internal_keep_alive_secs() const; + void _internal_set_keep_alive_secs(int64_t value); + public: + + // fixed64 context_id = 7; + void clear_context_id(); + uint64_t context_id() const; + void set_context_id(uint64_t value); + private: + uint64_t _internal_context_id() const; + void _internal_set_context_id(uint64_t value); + public: + + // fixed64 context_view_id = 8; + void clear_context_view_id(); + uint64_t context_view_id() const; + void set_context_view_id(uint64_t value); + private: + uint64_t _internal_context_view_id() const; + void _internal_set_context_view_id(uint64_t value); + public: + + // bool async = 2; + void clear_async(); + bool async() const; + void set_async(bool value); + private: + bool _internal_async() const; + void _internal_set_async(bool value); + public: + + // bool lazy_copy_remote_function_inputs = 9; + void clear_lazy_copy_remote_function_inputs(); + bool lazy_copy_remote_function_inputs() const; + void set_lazy_copy_remote_function_inputs(bool value); + private: + bool _internal_lazy_copy_remote_function_inputs() const; + void _internal_set_lazy_copy_remote_function_inputs(bool value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.eager.CreateContextRequest) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::DeviceAttributes > cluster_device_attributes_; + ::tensorflow::ServerDef* server_def_; + ::tensorflow::VersionDef* version_def_; + int64_t keep_alive_secs_; + uint64_t context_id_; + uint64_t context_view_id_; + bool async_; + bool lazy_copy_remote_function_inputs_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2feager_5fservice_2eproto; +}; +// ------------------------------------------------------------------- + +class CreateContextResponse final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.eager.CreateContextResponse) */ { + public: + inline CreateContextResponse() : CreateContextResponse(nullptr) {} + ~CreateContextResponse() override; + explicit PROTOBUF_CONSTEXPR CreateContextResponse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + CreateContextResponse(const CreateContextResponse& from); + CreateContextResponse(CreateContextResponse&& from) noexcept + : CreateContextResponse() { + *this = ::std::move(from); + } + + inline CreateContextResponse& operator=(const CreateContextResponse& from) { + CopyFrom(from); + return *this; + } + inline CreateContextResponse& operator=(CreateContextResponse&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const CreateContextResponse& default_instance() { + return *internal_default_instance(); + } + static inline const CreateContextResponse* internal_default_instance() { + return reinterpret_cast( + &_CreateContextResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = + 6; + + friend void swap(CreateContextResponse& a, CreateContextResponse& b) { + a.Swap(&b); + } + inline void Swap(CreateContextResponse* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(CreateContextResponse* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + CreateContextResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const CreateContextResponse& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const CreateContextResponse& from) { + CreateContextResponse::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(CreateContextResponse* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.eager.CreateContextResponse"; + } + protected: + explicit CreateContextResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kDeviceAttributesFieldNumber = 2, + }; + // repeated .tensorflow.DeviceAttributes device_attributes = 2; + int device_attributes_size() const; + private: + int _internal_device_attributes_size() const; + public: + void clear_device_attributes(); + ::tensorflow::DeviceAttributes* mutable_device_attributes(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::DeviceAttributes >* + mutable_device_attributes(); + private: + const ::tensorflow::DeviceAttributes& _internal_device_attributes(int index) const; + ::tensorflow::DeviceAttributes* _internal_add_device_attributes(); + public: + const ::tensorflow::DeviceAttributes& device_attributes(int index) const; + ::tensorflow::DeviceAttributes* add_device_attributes(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::DeviceAttributes >& + device_attributes() const; + + // @@protoc_insertion_point(class_scope:tensorflow.eager.CreateContextResponse) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::DeviceAttributes > device_attributes_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2feager_5fservice_2eproto; +}; +// ------------------------------------------------------------------- + +class UpdateContextRequest final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.eager.UpdateContextRequest) */ { + public: + inline UpdateContextRequest() : UpdateContextRequest(nullptr) {} + ~UpdateContextRequest() override; + explicit PROTOBUF_CONSTEXPR UpdateContextRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + UpdateContextRequest(const UpdateContextRequest& from); + UpdateContextRequest(UpdateContextRequest&& from) noexcept + : UpdateContextRequest() { + *this = ::std::move(from); + } + + inline UpdateContextRequest& operator=(const UpdateContextRequest& from) { + CopyFrom(from); + return *this; + } + inline UpdateContextRequest& operator=(UpdateContextRequest&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const UpdateContextRequest& default_instance() { + return *internal_default_instance(); + } + static inline const UpdateContextRequest* internal_default_instance() { + return reinterpret_cast( + &_UpdateContextRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 7; + + friend void swap(UpdateContextRequest& a, UpdateContextRequest& b) { + a.Swap(&b); + } + inline void Swap(UpdateContextRequest* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(UpdateContextRequest* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + UpdateContextRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const UpdateContextRequest& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const UpdateContextRequest& from) { + UpdateContextRequest::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(UpdateContextRequest* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.eager.UpdateContextRequest"; + } + protected: + explicit UpdateContextRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kClusterDeviceAttributesFieldNumber = 2, + kServerDefFieldNumber = 1, + kContextIdFieldNumber = 3, + kContextViewIdFieldNumber = 4, + }; + // repeated .tensorflow.DeviceAttributes cluster_device_attributes = 2; + int cluster_device_attributes_size() const; + private: + int _internal_cluster_device_attributes_size() const; + public: + void clear_cluster_device_attributes(); + ::tensorflow::DeviceAttributes* mutable_cluster_device_attributes(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::DeviceAttributes >* + mutable_cluster_device_attributes(); + private: + const ::tensorflow::DeviceAttributes& _internal_cluster_device_attributes(int index) const; + ::tensorflow::DeviceAttributes* _internal_add_cluster_device_attributes(); + public: + const ::tensorflow::DeviceAttributes& cluster_device_attributes(int index) const; + ::tensorflow::DeviceAttributes* add_cluster_device_attributes(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::DeviceAttributes >& + cluster_device_attributes() const; + + // .tensorflow.ServerDef server_def = 1; + bool has_server_def() const; + private: + bool _internal_has_server_def() const; + public: + void clear_server_def(); + const ::tensorflow::ServerDef& server_def() const; + PROTOBUF_NODISCARD ::tensorflow::ServerDef* release_server_def(); + ::tensorflow::ServerDef* mutable_server_def(); + void set_allocated_server_def(::tensorflow::ServerDef* server_def); + private: + const ::tensorflow::ServerDef& _internal_server_def() const; + ::tensorflow::ServerDef* _internal_mutable_server_def(); + public: + void unsafe_arena_set_allocated_server_def( + ::tensorflow::ServerDef* server_def); + ::tensorflow::ServerDef* unsafe_arena_release_server_def(); + + // fixed64 context_id = 3; + void clear_context_id(); + uint64_t context_id() const; + void set_context_id(uint64_t value); + private: + uint64_t _internal_context_id() const; + void _internal_set_context_id(uint64_t value); + public: + + // fixed64 context_view_id = 4; + void clear_context_view_id(); + uint64_t context_view_id() const; + void set_context_view_id(uint64_t value); + private: + uint64_t _internal_context_view_id() const; + void _internal_set_context_view_id(uint64_t value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.eager.UpdateContextRequest) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::DeviceAttributes > cluster_device_attributes_; + ::tensorflow::ServerDef* server_def_; + uint64_t context_id_; + uint64_t context_view_id_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2feager_5fservice_2eproto; +}; +// ------------------------------------------------------------------- + +class UpdateContextResponse final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.eager.UpdateContextResponse) */ { + public: + inline UpdateContextResponse() : UpdateContextResponse(nullptr) {} + ~UpdateContextResponse() override; + explicit PROTOBUF_CONSTEXPR UpdateContextResponse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + UpdateContextResponse(const UpdateContextResponse& from); + UpdateContextResponse(UpdateContextResponse&& from) noexcept + : UpdateContextResponse() { + *this = ::std::move(from); + } + + inline UpdateContextResponse& operator=(const UpdateContextResponse& from) { + CopyFrom(from); + return *this; + } + inline UpdateContextResponse& operator=(UpdateContextResponse&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const UpdateContextResponse& default_instance() { + return *internal_default_instance(); + } + static inline const UpdateContextResponse* internal_default_instance() { + return reinterpret_cast( + &_UpdateContextResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = + 8; + + friend void swap(UpdateContextResponse& a, UpdateContextResponse& b) { + a.Swap(&b); + } + inline void Swap(UpdateContextResponse* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(UpdateContextResponse* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + UpdateContextResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const UpdateContextResponse& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const UpdateContextResponse& from) { + UpdateContextResponse::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(UpdateContextResponse* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.eager.UpdateContextResponse"; + } + protected: + explicit UpdateContextResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kDeviceAttributesFieldNumber = 1, + }; + // repeated .tensorflow.DeviceAttributes device_attributes = 1; + int device_attributes_size() const; + private: + int _internal_device_attributes_size() const; + public: + void clear_device_attributes(); + ::tensorflow::DeviceAttributes* mutable_device_attributes(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::DeviceAttributes >* + mutable_device_attributes(); + private: + const ::tensorflow::DeviceAttributes& _internal_device_attributes(int index) const; + ::tensorflow::DeviceAttributes* _internal_add_device_attributes(); + public: + const ::tensorflow::DeviceAttributes& device_attributes(int index) const; + ::tensorflow::DeviceAttributes* add_device_attributes(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::DeviceAttributes >& + device_attributes() const; + + // @@protoc_insertion_point(class_scope:tensorflow.eager.UpdateContextResponse) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::DeviceAttributes > device_attributes_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2feager_5fservice_2eproto; +}; +// ------------------------------------------------------------------- + +class EnqueueRequest final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.eager.EnqueueRequest) */ { + public: + inline EnqueueRequest() : EnqueueRequest(nullptr) {} + ~EnqueueRequest() override; + explicit PROTOBUF_CONSTEXPR EnqueueRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + EnqueueRequest(const EnqueueRequest& from); + EnqueueRequest(EnqueueRequest&& from) noexcept + : EnqueueRequest() { + *this = ::std::move(from); + } + + inline EnqueueRequest& operator=(const EnqueueRequest& from) { + CopyFrom(from); + return *this; + } + inline EnqueueRequest& operator=(EnqueueRequest&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const EnqueueRequest& default_instance() { + return *internal_default_instance(); + } + static inline const EnqueueRequest* internal_default_instance() { + return reinterpret_cast( + &_EnqueueRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 9; + + friend void swap(EnqueueRequest& a, EnqueueRequest& b) { + a.Swap(&b); + } + inline void Swap(EnqueueRequest* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(EnqueueRequest* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + EnqueueRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const EnqueueRequest& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const EnqueueRequest& from) { + EnqueueRequest::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(EnqueueRequest* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.eager.EnqueueRequest"; + } + protected: + explicit EnqueueRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kQueueFieldNumber = 3, + kContextIdFieldNumber = 1, + }; + // repeated .tensorflow.eager.QueueItem queue = 3; + int queue_size() const; + private: + int _internal_queue_size() const; + public: + void clear_queue(); + ::tensorflow::eager::QueueItem* mutable_queue(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::eager::QueueItem >* + mutable_queue(); + private: + const ::tensorflow::eager::QueueItem& _internal_queue(int index) const; + ::tensorflow::eager::QueueItem* _internal_add_queue(); + public: + const ::tensorflow::eager::QueueItem& queue(int index) const; + ::tensorflow::eager::QueueItem* add_queue(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::eager::QueueItem >& + queue() const; + + // fixed64 context_id = 1; + void clear_context_id(); + uint64_t context_id() const; + void set_context_id(uint64_t value); + private: + uint64_t _internal_context_id() const; + void _internal_set_context_id(uint64_t value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.eager.EnqueueRequest) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::eager::QueueItem > queue_; + uint64_t context_id_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2feager_5fservice_2eproto; +}; +// ------------------------------------------------------------------- + +class EnqueueResponse final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.eager.EnqueueResponse) */ { + public: + inline EnqueueResponse() : EnqueueResponse(nullptr) {} + ~EnqueueResponse() override; + explicit PROTOBUF_CONSTEXPR EnqueueResponse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + EnqueueResponse(const EnqueueResponse& from); + EnqueueResponse(EnqueueResponse&& from) noexcept + : EnqueueResponse() { + *this = ::std::move(from); + } + + inline EnqueueResponse& operator=(const EnqueueResponse& from) { + CopyFrom(from); + return *this; + } + inline EnqueueResponse& operator=(EnqueueResponse&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const EnqueueResponse& default_instance() { + return *internal_default_instance(); + } + static inline const EnqueueResponse* internal_default_instance() { + return reinterpret_cast( + &_EnqueueResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = + 10; + + friend void swap(EnqueueResponse& a, EnqueueResponse& b) { + a.Swap(&b); + } + inline void Swap(EnqueueResponse* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(EnqueueResponse* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + EnqueueResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const EnqueueResponse& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const EnqueueResponse& from) { + EnqueueResponse::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(EnqueueResponse* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.eager.EnqueueResponse"; + } + protected: + explicit EnqueueResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kQueueResponseFieldNumber = 1, + }; + // repeated .tensorflow.eager.QueueResponse queue_response = 1; + int queue_response_size() const; + private: + int _internal_queue_response_size() const; + public: + void clear_queue_response(); + ::tensorflow::eager::QueueResponse* mutable_queue_response(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::eager::QueueResponse >* + mutable_queue_response(); + private: + const ::tensorflow::eager::QueueResponse& _internal_queue_response(int index) const; + ::tensorflow::eager::QueueResponse* _internal_add_queue_response(); + public: + const ::tensorflow::eager::QueueResponse& queue_response(int index) const; + ::tensorflow::eager::QueueResponse* add_queue_response(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::eager::QueueResponse >& + queue_response() const; + + // @@protoc_insertion_point(class_scope:tensorflow.eager.EnqueueResponse) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::eager::QueueResponse > queue_response_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2feager_5fservice_2eproto; +}; +// ------------------------------------------------------------------- + +class WaitQueueDoneRequest final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.eager.WaitQueueDoneRequest) */ { + public: + inline WaitQueueDoneRequest() : WaitQueueDoneRequest(nullptr) {} + ~WaitQueueDoneRequest() override; + explicit PROTOBUF_CONSTEXPR WaitQueueDoneRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + WaitQueueDoneRequest(const WaitQueueDoneRequest& from); + WaitQueueDoneRequest(WaitQueueDoneRequest&& from) noexcept + : WaitQueueDoneRequest() { + *this = ::std::move(from); + } + + inline WaitQueueDoneRequest& operator=(const WaitQueueDoneRequest& from) { + CopyFrom(from); + return *this; + } + inline WaitQueueDoneRequest& operator=(WaitQueueDoneRequest&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const WaitQueueDoneRequest& default_instance() { + return *internal_default_instance(); + } + static inline const WaitQueueDoneRequest* internal_default_instance() { + return reinterpret_cast( + &_WaitQueueDoneRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 11; + + friend void swap(WaitQueueDoneRequest& a, WaitQueueDoneRequest& b) { + a.Swap(&b); + } + inline void Swap(WaitQueueDoneRequest* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(WaitQueueDoneRequest* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + WaitQueueDoneRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const WaitQueueDoneRequest& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const WaitQueueDoneRequest& from) { + WaitQueueDoneRequest::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(WaitQueueDoneRequest* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.eager.WaitQueueDoneRequest"; + } + protected: + explicit WaitQueueDoneRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kOpIdFieldNumber = 2, + kContextIdFieldNumber = 1, + }; + // repeated int64 op_id = 2; + int op_id_size() const; + private: + int _internal_op_id_size() const; + public: + void clear_op_id(); + private: + int64_t _internal_op_id(int index) const; + const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >& + _internal_op_id() const; + void _internal_add_op_id(int64_t value); + ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >* + _internal_mutable_op_id(); + public: + int64_t op_id(int index) const; + void set_op_id(int index, int64_t value); + void add_op_id(int64_t value); + const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >& + op_id() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >* + mutable_op_id(); + + // fixed64 context_id = 1; + void clear_context_id(); + uint64_t context_id() const; + void set_context_id(uint64_t value); + private: + uint64_t _internal_context_id() const; + void _internal_set_context_id(uint64_t value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.eager.WaitQueueDoneRequest) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t > op_id_; + mutable std::atomic _op_id_cached_byte_size_; + uint64_t context_id_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2feager_5fservice_2eproto; +}; +// ------------------------------------------------------------------- + +class WaitQueueDoneResponse final : + public ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase /* @@protoc_insertion_point(class_definition:tensorflow.eager.WaitQueueDoneResponse) */ { + public: + inline WaitQueueDoneResponse() : WaitQueueDoneResponse(nullptr) {} + explicit PROTOBUF_CONSTEXPR WaitQueueDoneResponse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + WaitQueueDoneResponse(const WaitQueueDoneResponse& from); + WaitQueueDoneResponse(WaitQueueDoneResponse&& from) noexcept + : WaitQueueDoneResponse() { + *this = ::std::move(from); + } + + inline WaitQueueDoneResponse& operator=(const WaitQueueDoneResponse& from) { + CopyFrom(from); + return *this; + } + inline WaitQueueDoneResponse& operator=(WaitQueueDoneResponse&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const WaitQueueDoneResponse& default_instance() { + return *internal_default_instance(); + } + static inline const WaitQueueDoneResponse* internal_default_instance() { + return reinterpret_cast( + &_WaitQueueDoneResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = + 12; + + friend void swap(WaitQueueDoneResponse& a, WaitQueueDoneResponse& b) { + a.Swap(&b); + } + inline void Swap(WaitQueueDoneResponse* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(WaitQueueDoneResponse* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + WaitQueueDoneResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::CopyFrom; + inline void CopyFrom(const WaitQueueDoneResponse& from) { + ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::CopyImpl(*this, from); + } + using ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::MergeFrom; + void MergeFrom(const WaitQueueDoneResponse& from) { + ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::MergeImpl(*this, from); + } + public: + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.eager.WaitQueueDoneResponse"; + } + protected: + explicit WaitQueueDoneResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // @@protoc_insertion_point(class_scope:tensorflow.eager.WaitQueueDoneResponse) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2feager_5fservice_2eproto; +}; +// ------------------------------------------------------------------- + +class RunComponentFunctionRequest final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.eager.RunComponentFunctionRequest) */ { + public: + inline RunComponentFunctionRequest() : RunComponentFunctionRequest(nullptr) {} + ~RunComponentFunctionRequest() override; + explicit PROTOBUF_CONSTEXPR RunComponentFunctionRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + RunComponentFunctionRequest(const RunComponentFunctionRequest& from); + RunComponentFunctionRequest(RunComponentFunctionRequest&& from) noexcept + : RunComponentFunctionRequest() { + *this = ::std::move(from); + } + + inline RunComponentFunctionRequest& operator=(const RunComponentFunctionRequest& from) { + CopyFrom(from); + return *this; + } + inline RunComponentFunctionRequest& operator=(RunComponentFunctionRequest&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const RunComponentFunctionRequest& default_instance() { + return *internal_default_instance(); + } + static inline const RunComponentFunctionRequest* internal_default_instance() { + return reinterpret_cast( + &_RunComponentFunctionRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 13; + + friend void swap(RunComponentFunctionRequest& a, RunComponentFunctionRequest& b) { + a.Swap(&b); + } + inline void Swap(RunComponentFunctionRequest* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(RunComponentFunctionRequest* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + RunComponentFunctionRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const RunComponentFunctionRequest& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const RunComponentFunctionRequest& from) { + RunComponentFunctionRequest::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(RunComponentFunctionRequest* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.eager.RunComponentFunctionRequest"; + } + protected: + explicit RunComponentFunctionRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kOutputNumFieldNumber = 3, + kOperationFieldNumber = 2, + kContextIdFieldNumber = 1, + }; + // repeated int32 output_num = 3; + int output_num_size() const; + private: + int _internal_output_num_size() const; + public: + void clear_output_num(); + private: + int32_t _internal_output_num(int index) const; + const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >& + _internal_output_num() const; + void _internal_add_output_num(int32_t value); + ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >* + _internal_mutable_output_num(); + public: + int32_t output_num(int index) const; + void set_output_num(int index, int32_t value); + void add_output_num(int32_t value); + const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >& + output_num() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >* + mutable_output_num(); + + // .tensorflow.eager.Operation operation = 2; + bool has_operation() const; + private: + bool _internal_has_operation() const; + public: + void clear_operation(); + const ::tensorflow::eager::Operation& operation() const; + PROTOBUF_NODISCARD ::tensorflow::eager::Operation* release_operation(); + ::tensorflow::eager::Operation* mutable_operation(); + void set_allocated_operation(::tensorflow::eager::Operation* operation); + private: + const ::tensorflow::eager::Operation& _internal_operation() const; + ::tensorflow::eager::Operation* _internal_mutable_operation(); + public: + void unsafe_arena_set_allocated_operation( + ::tensorflow::eager::Operation* operation); + ::tensorflow::eager::Operation* unsafe_arena_release_operation(); + + // fixed64 context_id = 1; + void clear_context_id(); + uint64_t context_id() const; + void set_context_id(uint64_t value); + private: + uint64_t _internal_context_id() const; + void _internal_set_context_id(uint64_t value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.eager.RunComponentFunctionRequest) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t > output_num_; + mutable std::atomic _output_num_cached_byte_size_; + ::tensorflow::eager::Operation* operation_; + uint64_t context_id_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2feager_5fservice_2eproto; +}; +// ------------------------------------------------------------------- + +class RunComponentFunctionResponse final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.eager.RunComponentFunctionResponse) */ { + public: + inline RunComponentFunctionResponse() : RunComponentFunctionResponse(nullptr) {} + ~RunComponentFunctionResponse() override; + explicit PROTOBUF_CONSTEXPR RunComponentFunctionResponse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + RunComponentFunctionResponse(const RunComponentFunctionResponse& from); + RunComponentFunctionResponse(RunComponentFunctionResponse&& from) noexcept + : RunComponentFunctionResponse() { + *this = ::std::move(from); + } + + inline RunComponentFunctionResponse& operator=(const RunComponentFunctionResponse& from) { + CopyFrom(from); + return *this; + } + inline RunComponentFunctionResponse& operator=(RunComponentFunctionResponse&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const RunComponentFunctionResponse& default_instance() { + return *internal_default_instance(); + } + static inline const RunComponentFunctionResponse* internal_default_instance() { + return reinterpret_cast( + &_RunComponentFunctionResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = + 14; + + friend void swap(RunComponentFunctionResponse& a, RunComponentFunctionResponse& b) { + a.Swap(&b); + } + inline void Swap(RunComponentFunctionResponse* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(RunComponentFunctionResponse* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + RunComponentFunctionResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const RunComponentFunctionResponse& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const RunComponentFunctionResponse& from) { + RunComponentFunctionResponse::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(RunComponentFunctionResponse* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.eager.RunComponentFunctionResponse"; + } + protected: + explicit RunComponentFunctionResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kShapeFieldNumber = 1, + kTensorFieldNumber = 2, + }; + // repeated .tensorflow.TensorShapeProto shape = 1; + int shape_size() const; + private: + int _internal_shape_size() const; + public: + void clear_shape(); + ::tensorflow::TensorShapeProto* mutable_shape(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::TensorShapeProto >* + mutable_shape(); + private: + const ::tensorflow::TensorShapeProto& _internal_shape(int index) const; + ::tensorflow::TensorShapeProto* _internal_add_shape(); + public: + const ::tensorflow::TensorShapeProto& shape(int index) const; + ::tensorflow::TensorShapeProto* add_shape(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::TensorShapeProto >& + shape() const; + + // repeated .tensorflow.TensorProto tensor = 2; + int tensor_size() const; + private: + int _internal_tensor_size() const; + public: + void clear_tensor(); + ::tensorflow::TensorProto* mutable_tensor(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::TensorProto >* + mutable_tensor(); + private: + const ::tensorflow::TensorProto& _internal_tensor(int index) const; + ::tensorflow::TensorProto* _internal_add_tensor(); + public: + const ::tensorflow::TensorProto& tensor(int index) const; + ::tensorflow::TensorProto* add_tensor(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::TensorProto >& + tensor() const; + + // @@protoc_insertion_point(class_scope:tensorflow.eager.RunComponentFunctionResponse) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::TensorShapeProto > shape_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::TensorProto > tensor_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2feager_5fservice_2eproto; +}; +// ------------------------------------------------------------------- + +class KeepAliveRequest final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.eager.KeepAliveRequest) */ { + public: + inline KeepAliveRequest() : KeepAliveRequest(nullptr) {} + ~KeepAliveRequest() override; + explicit PROTOBUF_CONSTEXPR KeepAliveRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + KeepAliveRequest(const KeepAliveRequest& from); + KeepAliveRequest(KeepAliveRequest&& from) noexcept + : KeepAliveRequest() { + *this = ::std::move(from); + } + + inline KeepAliveRequest& operator=(const KeepAliveRequest& from) { + CopyFrom(from); + return *this; + } + inline KeepAliveRequest& operator=(KeepAliveRequest&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const KeepAliveRequest& default_instance() { + return *internal_default_instance(); + } + static inline const KeepAliveRequest* internal_default_instance() { + return reinterpret_cast( + &_KeepAliveRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 15; + + friend void swap(KeepAliveRequest& a, KeepAliveRequest& b) { + a.Swap(&b); + } + inline void Swap(KeepAliveRequest* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(KeepAliveRequest* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + KeepAliveRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const KeepAliveRequest& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const KeepAliveRequest& from) { + KeepAliveRequest::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(KeepAliveRequest* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.eager.KeepAliveRequest"; + } + protected: + explicit KeepAliveRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kContextIdFieldNumber = 1, + }; + // fixed64 context_id = 1; + void clear_context_id(); + uint64_t context_id() const; + void set_context_id(uint64_t value); + private: + uint64_t _internal_context_id() const; + void _internal_set_context_id(uint64_t value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.eager.KeepAliveRequest) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + uint64_t context_id_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2feager_5fservice_2eproto; +}; +// ------------------------------------------------------------------- + +class KeepAliveResponse final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.eager.KeepAliveResponse) */ { + public: + inline KeepAliveResponse() : KeepAliveResponse(nullptr) {} + ~KeepAliveResponse() override; + explicit PROTOBUF_CONSTEXPR KeepAliveResponse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + KeepAliveResponse(const KeepAliveResponse& from); + KeepAliveResponse(KeepAliveResponse&& from) noexcept + : KeepAliveResponse() { + *this = ::std::move(from); + } + + inline KeepAliveResponse& operator=(const KeepAliveResponse& from) { + CopyFrom(from); + return *this; + } + inline KeepAliveResponse& operator=(KeepAliveResponse&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const KeepAliveResponse& default_instance() { + return *internal_default_instance(); + } + static inline const KeepAliveResponse* internal_default_instance() { + return reinterpret_cast( + &_KeepAliveResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = + 16; + + friend void swap(KeepAliveResponse& a, KeepAliveResponse& b) { + a.Swap(&b); + } + inline void Swap(KeepAliveResponse* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(KeepAliveResponse* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + KeepAliveResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const KeepAliveResponse& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const KeepAliveResponse& from) { + KeepAliveResponse::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(KeepAliveResponse* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.eager.KeepAliveResponse"; + } + protected: + explicit KeepAliveResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kContextViewIdFieldNumber = 1, + }; + // fixed64 context_view_id = 1; + void clear_context_view_id(); + uint64_t context_view_id() const; + void set_context_view_id(uint64_t value); + private: + uint64_t _internal_context_view_id() const; + void _internal_set_context_view_id(uint64_t value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.eager.KeepAliveResponse) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + uint64_t context_view_id_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2feager_5fservice_2eproto; +}; +// ------------------------------------------------------------------- + +class CloseContextRequest final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.eager.CloseContextRequest) */ { + public: + inline CloseContextRequest() : CloseContextRequest(nullptr) {} + ~CloseContextRequest() override; + explicit PROTOBUF_CONSTEXPR CloseContextRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + CloseContextRequest(const CloseContextRequest& from); + CloseContextRequest(CloseContextRequest&& from) noexcept + : CloseContextRequest() { + *this = ::std::move(from); + } + + inline CloseContextRequest& operator=(const CloseContextRequest& from) { + CopyFrom(from); + return *this; + } + inline CloseContextRequest& operator=(CloseContextRequest&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const CloseContextRequest& default_instance() { + return *internal_default_instance(); + } + static inline const CloseContextRequest* internal_default_instance() { + return reinterpret_cast( + &_CloseContextRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 17; + + friend void swap(CloseContextRequest& a, CloseContextRequest& b) { + a.Swap(&b); + } + inline void Swap(CloseContextRequest* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(CloseContextRequest* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + CloseContextRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const CloseContextRequest& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const CloseContextRequest& from) { + CloseContextRequest::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(CloseContextRequest* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.eager.CloseContextRequest"; + } + protected: + explicit CloseContextRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kContextIdFieldNumber = 1, + kContextViewIdFieldNumber = 2, + }; + // fixed64 context_id = 1; + void clear_context_id(); + uint64_t context_id() const; + void set_context_id(uint64_t value); + private: + uint64_t _internal_context_id() const; + void _internal_set_context_id(uint64_t value); + public: + + // fixed64 context_view_id = 2; + void clear_context_view_id(); + uint64_t context_view_id() const; + void set_context_view_id(uint64_t value); + private: + uint64_t _internal_context_view_id() const; + void _internal_set_context_view_id(uint64_t value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.eager.CloseContextRequest) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + uint64_t context_id_; + uint64_t context_view_id_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2feager_5fservice_2eproto; +}; +// ------------------------------------------------------------------- + +class CloseContextResponse final : + public ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase /* @@protoc_insertion_point(class_definition:tensorflow.eager.CloseContextResponse) */ { + public: + inline CloseContextResponse() : CloseContextResponse(nullptr) {} + explicit PROTOBUF_CONSTEXPR CloseContextResponse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + CloseContextResponse(const CloseContextResponse& from); + CloseContextResponse(CloseContextResponse&& from) noexcept + : CloseContextResponse() { + *this = ::std::move(from); + } + + inline CloseContextResponse& operator=(const CloseContextResponse& from) { + CopyFrom(from); + return *this; + } + inline CloseContextResponse& operator=(CloseContextResponse&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const CloseContextResponse& default_instance() { + return *internal_default_instance(); + } + static inline const CloseContextResponse* internal_default_instance() { + return reinterpret_cast( + &_CloseContextResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = + 18; + + friend void swap(CloseContextResponse& a, CloseContextResponse& b) { + a.Swap(&b); + } + inline void Swap(CloseContextResponse* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(CloseContextResponse* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + CloseContextResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::CopyFrom; + inline void CopyFrom(const CloseContextResponse& from) { + ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::CopyImpl(*this, from); + } + using ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::MergeFrom; + void MergeFrom(const CloseContextResponse& from) { + ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::MergeImpl(*this, from); + } + public: + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.eager.CloseContextResponse"; + } + protected: + explicit CloseContextResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // @@protoc_insertion_point(class_scope:tensorflow.eager.CloseContextResponse) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2feager_5fservice_2eproto; +}; +// ------------------------------------------------------------------- + +class RegisterFunctionOp final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.eager.RegisterFunctionOp) */ { + public: + inline RegisterFunctionOp() : RegisterFunctionOp(nullptr) {} + ~RegisterFunctionOp() override; + explicit PROTOBUF_CONSTEXPR RegisterFunctionOp(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + RegisterFunctionOp(const RegisterFunctionOp& from); + RegisterFunctionOp(RegisterFunctionOp&& from) noexcept + : RegisterFunctionOp() { + *this = ::std::move(from); + } + + inline RegisterFunctionOp& operator=(const RegisterFunctionOp& from) { + CopyFrom(from); + return *this; + } + inline RegisterFunctionOp& operator=(RegisterFunctionOp&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const RegisterFunctionOp& default_instance() { + return *internal_default_instance(); + } + static inline const RegisterFunctionOp* internal_default_instance() { + return reinterpret_cast( + &_RegisterFunctionOp_default_instance_); + } + static constexpr int kIndexInFileMessages = + 19; + + friend void swap(RegisterFunctionOp& a, RegisterFunctionOp& b) { + a.Swap(&b); + } + inline void Swap(RegisterFunctionOp* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(RegisterFunctionOp* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + RegisterFunctionOp* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const RegisterFunctionOp& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const RegisterFunctionOp& from) { + RegisterFunctionOp::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(RegisterFunctionOp* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.eager.RegisterFunctionOp"; + } + protected: + explicit RegisterFunctionOp(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kFunctionDefFieldNumber = 1, + kLibraryFieldNumber = 3, + kIsComponentFunctionFieldNumber = 2, + }; + // .tensorflow.FunctionDef function_def = 1; + bool has_function_def() const; + private: + bool _internal_has_function_def() const; + public: + void clear_function_def(); + const ::tensorflow::FunctionDef& function_def() const; + PROTOBUF_NODISCARD ::tensorflow::FunctionDef* release_function_def(); + ::tensorflow::FunctionDef* mutable_function_def(); + void set_allocated_function_def(::tensorflow::FunctionDef* function_def); + private: + const ::tensorflow::FunctionDef& _internal_function_def() const; + ::tensorflow::FunctionDef* _internal_mutable_function_def(); + public: + void unsafe_arena_set_allocated_function_def( + ::tensorflow::FunctionDef* function_def); + ::tensorflow::FunctionDef* unsafe_arena_release_function_def(); + + // .tensorflow.FunctionDefLibrary library = 3; + bool has_library() const; + private: + bool _internal_has_library() const; + public: + void clear_library(); + const ::tensorflow::FunctionDefLibrary& library() const; + PROTOBUF_NODISCARD ::tensorflow::FunctionDefLibrary* release_library(); + ::tensorflow::FunctionDefLibrary* mutable_library(); + void set_allocated_library(::tensorflow::FunctionDefLibrary* library); + private: + const ::tensorflow::FunctionDefLibrary& _internal_library() const; + ::tensorflow::FunctionDefLibrary* _internal_mutable_library(); + public: + void unsafe_arena_set_allocated_library( + ::tensorflow::FunctionDefLibrary* library); + ::tensorflow::FunctionDefLibrary* unsafe_arena_release_library(); + + // bool is_component_function = 2; + void clear_is_component_function(); + bool is_component_function() const; + void set_is_component_function(bool value); + private: + bool _internal_is_component_function() const; + void _internal_set_is_component_function(bool value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.eager.RegisterFunctionOp) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::tensorflow::FunctionDef* function_def_; + ::tensorflow::FunctionDefLibrary* library_; + bool is_component_function_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2feager_5fservice_2eproto; +}; +// ------------------------------------------------------------------- + +class RemoveFunctionOp final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.eager.RemoveFunctionOp) */ { + public: + inline RemoveFunctionOp() : RemoveFunctionOp(nullptr) {} + ~RemoveFunctionOp() override; + explicit PROTOBUF_CONSTEXPR RemoveFunctionOp(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + RemoveFunctionOp(const RemoveFunctionOp& from); + RemoveFunctionOp(RemoveFunctionOp&& from) noexcept + : RemoveFunctionOp() { + *this = ::std::move(from); + } + + inline RemoveFunctionOp& operator=(const RemoveFunctionOp& from) { + CopyFrom(from); + return *this; + } + inline RemoveFunctionOp& operator=(RemoveFunctionOp&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const RemoveFunctionOp& default_instance() { + return *internal_default_instance(); + } + static inline const RemoveFunctionOp* internal_default_instance() { + return reinterpret_cast( + &_RemoveFunctionOp_default_instance_); + } + static constexpr int kIndexInFileMessages = + 20; + + friend void swap(RemoveFunctionOp& a, RemoveFunctionOp& b) { + a.Swap(&b); + } + inline void Swap(RemoveFunctionOp* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(RemoveFunctionOp* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + RemoveFunctionOp* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const RemoveFunctionOp& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const RemoveFunctionOp& from) { + RemoveFunctionOp::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(RemoveFunctionOp* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.eager.RemoveFunctionOp"; + } + protected: + explicit RemoveFunctionOp(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kFunctionNameFieldNumber = 1, + }; + // string function_name = 1; + void clear_function_name(); + const std::string& function_name() const; + template + void set_function_name(ArgT0&& arg0, ArgT... args); + std::string* mutable_function_name(); + PROTOBUF_NODISCARD std::string* release_function_name(); + void set_allocated_function_name(std::string* function_name); + private: + const std::string& _internal_function_name() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_function_name(const std::string& value); + std::string* _internal_mutable_function_name(); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.eager.RemoveFunctionOp) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr function_name_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2feager_5fservice_2eproto; +}; +// ------------------------------------------------------------------- + +class CleanupFunctionOp final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.eager.CleanupFunctionOp) */ { + public: + inline CleanupFunctionOp() : CleanupFunctionOp(nullptr) {} + ~CleanupFunctionOp() override; + explicit PROTOBUF_CONSTEXPR CleanupFunctionOp(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + CleanupFunctionOp(const CleanupFunctionOp& from); + CleanupFunctionOp(CleanupFunctionOp&& from) noexcept + : CleanupFunctionOp() { + *this = ::std::move(from); + } + + inline CleanupFunctionOp& operator=(const CleanupFunctionOp& from) { + CopyFrom(from); + return *this; + } + inline CleanupFunctionOp& operator=(CleanupFunctionOp&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const CleanupFunctionOp& default_instance() { + return *internal_default_instance(); + } + static inline const CleanupFunctionOp* internal_default_instance() { + return reinterpret_cast( + &_CleanupFunctionOp_default_instance_); + } + static constexpr int kIndexInFileMessages = + 21; + + friend void swap(CleanupFunctionOp& a, CleanupFunctionOp& b) { + a.Swap(&b); + } + inline void Swap(CleanupFunctionOp* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(CleanupFunctionOp* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + CleanupFunctionOp* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const CleanupFunctionOp& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const CleanupFunctionOp& from) { + CleanupFunctionOp::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(CleanupFunctionOp* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.eager.CleanupFunctionOp"; + } + protected: + explicit CleanupFunctionOp(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kStepIdFieldNumber = 1, + }; + // int64 step_id = 1; + void clear_step_id(); + int64_t step_id() const; + void set_step_id(int64_t value); + private: + int64_t _internal_step_id() const; + void _internal_set_step_id(int64_t value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.eager.CleanupFunctionOp) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + int64_t step_id_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2feager_5fservice_2eproto; +}; +// ------------------------------------------------------------------- + +class SyncRemoteExecutorForStream final : + public ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase /* @@protoc_insertion_point(class_definition:tensorflow.eager.SyncRemoteExecutorForStream) */ { + public: + inline SyncRemoteExecutorForStream() : SyncRemoteExecutorForStream(nullptr) {} + explicit PROTOBUF_CONSTEXPR SyncRemoteExecutorForStream(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + SyncRemoteExecutorForStream(const SyncRemoteExecutorForStream& from); + SyncRemoteExecutorForStream(SyncRemoteExecutorForStream&& from) noexcept + : SyncRemoteExecutorForStream() { + *this = ::std::move(from); + } + + inline SyncRemoteExecutorForStream& operator=(const SyncRemoteExecutorForStream& from) { + CopyFrom(from); + return *this; + } + inline SyncRemoteExecutorForStream& operator=(SyncRemoteExecutorForStream&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const SyncRemoteExecutorForStream& default_instance() { + return *internal_default_instance(); + } + static inline const SyncRemoteExecutorForStream* internal_default_instance() { + return reinterpret_cast( + &_SyncRemoteExecutorForStream_default_instance_); + } + static constexpr int kIndexInFileMessages = + 22; + + friend void swap(SyncRemoteExecutorForStream& a, SyncRemoteExecutorForStream& b) { + a.Swap(&b); + } + inline void Swap(SyncRemoteExecutorForStream* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(SyncRemoteExecutorForStream* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + SyncRemoteExecutorForStream* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::CopyFrom; + inline void CopyFrom(const SyncRemoteExecutorForStream& from) { + ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::CopyImpl(*this, from); + } + using ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::MergeFrom; + void MergeFrom(const SyncRemoteExecutorForStream& from) { + ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::MergeImpl(*this, from); + } + public: + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.eager.SyncRemoteExecutorForStream"; + } + protected: + explicit SyncRemoteExecutorForStream(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // @@protoc_insertion_point(class_scope:tensorflow.eager.SyncRemoteExecutorForStream) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2feager_5fservice_2eproto; +}; +// ------------------------------------------------------------------- + +class SendTensorOp final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.eager.SendTensorOp) */ { + public: + inline SendTensorOp() : SendTensorOp(nullptr) {} + ~SendTensorOp() override; + explicit PROTOBUF_CONSTEXPR SendTensorOp(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + SendTensorOp(const SendTensorOp& from); + SendTensorOp(SendTensorOp&& from) noexcept + : SendTensorOp() { + *this = ::std::move(from); + } + + inline SendTensorOp& operator=(const SendTensorOp& from) { + CopyFrom(from); + return *this; + } + inline SendTensorOp& operator=(SendTensorOp&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const SendTensorOp& default_instance() { + return *internal_default_instance(); + } + static inline const SendTensorOp* internal_default_instance() { + return reinterpret_cast( + &_SendTensorOp_default_instance_); + } + static constexpr int kIndexInFileMessages = + 23; + + friend void swap(SendTensorOp& a, SendTensorOp& b) { + a.Swap(&b); + } + inline void Swap(SendTensorOp* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(SendTensorOp* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + SendTensorOp* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const SendTensorOp& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const SendTensorOp& from) { + SendTensorOp::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(SendTensorOp* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.eager.SendTensorOp"; + } + protected: + explicit SendTensorOp(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kTensorsFieldNumber = 2, + kDeviceNameFieldNumber = 3, + kOpIdFieldNumber = 1, + }; + // repeated .tensorflow.TensorProto tensors = 2; + int tensors_size() const; + private: + int _internal_tensors_size() const; + public: + void clear_tensors(); + ::tensorflow::TensorProto* mutable_tensors(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::TensorProto >* + mutable_tensors(); + private: + const ::tensorflow::TensorProto& _internal_tensors(int index) const; + ::tensorflow::TensorProto* _internal_add_tensors(); + public: + const ::tensorflow::TensorProto& tensors(int index) const; + ::tensorflow::TensorProto* add_tensors(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::TensorProto >& + tensors() const; + + // string device_name = 3; + void clear_device_name(); + const std::string& device_name() const; + template + void set_device_name(ArgT0&& arg0, ArgT... args); + std::string* mutable_device_name(); + PROTOBUF_NODISCARD std::string* release_device_name(); + void set_allocated_device_name(std::string* device_name); + private: + const std::string& _internal_device_name() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_device_name(const std::string& value); + std::string* _internal_mutable_device_name(); + public: + + // int64 op_id = 1; + void clear_op_id(); + int64_t op_id() const; + void set_op_id(int64_t value); + private: + int64_t _internal_op_id() const; + void _internal_set_op_id(int64_t value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.eager.SendTensorOp) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::TensorProto > tensors_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr device_name_; + int64_t op_id_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2feager_5fservice_2eproto; +}; +// ------------------------------------------------------------------- + +class SendPackedHandleOp_LocalTensorHandle final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.eager.SendPackedHandleOp.LocalTensorHandle) */ { + public: + inline SendPackedHandleOp_LocalTensorHandle() : SendPackedHandleOp_LocalTensorHandle(nullptr) {} + ~SendPackedHandleOp_LocalTensorHandle() override; + explicit PROTOBUF_CONSTEXPR SendPackedHandleOp_LocalTensorHandle(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + SendPackedHandleOp_LocalTensorHandle(const SendPackedHandleOp_LocalTensorHandle& from); + SendPackedHandleOp_LocalTensorHandle(SendPackedHandleOp_LocalTensorHandle&& from) noexcept + : SendPackedHandleOp_LocalTensorHandle() { + *this = ::std::move(from); + } + + inline SendPackedHandleOp_LocalTensorHandle& operator=(const SendPackedHandleOp_LocalTensorHandle& from) { + CopyFrom(from); + return *this; + } + inline SendPackedHandleOp_LocalTensorHandle& operator=(SendPackedHandleOp_LocalTensorHandle&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const SendPackedHandleOp_LocalTensorHandle& default_instance() { + return *internal_default_instance(); + } + static inline const SendPackedHandleOp_LocalTensorHandle* internal_default_instance() { + return reinterpret_cast( + &_SendPackedHandleOp_LocalTensorHandle_default_instance_); + } + static constexpr int kIndexInFileMessages = + 24; + + friend void swap(SendPackedHandleOp_LocalTensorHandle& a, SendPackedHandleOp_LocalTensorHandle& b) { + a.Swap(&b); + } + inline void Swap(SendPackedHandleOp_LocalTensorHandle* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(SendPackedHandleOp_LocalTensorHandle* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + SendPackedHandleOp_LocalTensorHandle* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const SendPackedHandleOp_LocalTensorHandle& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const SendPackedHandleOp_LocalTensorHandle& from) { + SendPackedHandleOp_LocalTensorHandle::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(SendPackedHandleOp_LocalTensorHandle* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.eager.SendPackedHandleOp.LocalTensorHandle"; + } + protected: + explicit SendPackedHandleOp_LocalTensorHandle(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kDeviceFieldNumber = 2, + kTensorFieldNumber = 1, + }; + // string device = 2; + void clear_device(); + const std::string& device() const; + template + void set_device(ArgT0&& arg0, ArgT... args); + std::string* mutable_device(); + PROTOBUF_NODISCARD std::string* release_device(); + void set_allocated_device(std::string* device); + private: + const std::string& _internal_device() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_device(const std::string& value); + std::string* _internal_mutable_device(); + public: + + // .tensorflow.TensorProto tensor = 1; + bool has_tensor() const; + private: + bool _internal_has_tensor() const; + public: + void clear_tensor(); + const ::tensorflow::TensorProto& tensor() const; + PROTOBUF_NODISCARD ::tensorflow::TensorProto* release_tensor(); + ::tensorflow::TensorProto* mutable_tensor(); + void set_allocated_tensor(::tensorflow::TensorProto* tensor); + private: + const ::tensorflow::TensorProto& _internal_tensor() const; + ::tensorflow::TensorProto* _internal_mutable_tensor(); + public: + void unsafe_arena_set_allocated_tensor( + ::tensorflow::TensorProto* tensor); + ::tensorflow::TensorProto* unsafe_arena_release_tensor(); + + // @@protoc_insertion_point(class_scope:tensorflow.eager.SendPackedHandleOp.LocalTensorHandle) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr device_; + ::tensorflow::TensorProto* tensor_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2feager_5fservice_2eproto; +}; +// ------------------------------------------------------------------- + +class SendPackedHandleOp_Handle final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.eager.SendPackedHandleOp.Handle) */ { + public: + inline SendPackedHandleOp_Handle() : SendPackedHandleOp_Handle(nullptr) {} + ~SendPackedHandleOp_Handle() override; + explicit PROTOBUF_CONSTEXPR SendPackedHandleOp_Handle(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + SendPackedHandleOp_Handle(const SendPackedHandleOp_Handle& from); + SendPackedHandleOp_Handle(SendPackedHandleOp_Handle&& from) noexcept + : SendPackedHandleOp_Handle() { + *this = ::std::move(from); + } + + inline SendPackedHandleOp_Handle& operator=(const SendPackedHandleOp_Handle& from) { + CopyFrom(from); + return *this; + } + inline SendPackedHandleOp_Handle& operator=(SendPackedHandleOp_Handle&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const SendPackedHandleOp_Handle& default_instance() { + return *internal_default_instance(); + } + enum ItemCase { + kLocalHandle = 1, + kRemoteHandle = 2, + ITEM_NOT_SET = 0, + }; + + static inline const SendPackedHandleOp_Handle* internal_default_instance() { + return reinterpret_cast( + &_SendPackedHandleOp_Handle_default_instance_); + } + static constexpr int kIndexInFileMessages = + 25; + + friend void swap(SendPackedHandleOp_Handle& a, SendPackedHandleOp_Handle& b) { + a.Swap(&b); + } + inline void Swap(SendPackedHandleOp_Handle* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(SendPackedHandleOp_Handle* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + SendPackedHandleOp_Handle* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const SendPackedHandleOp_Handle& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const SendPackedHandleOp_Handle& from) { + SendPackedHandleOp_Handle::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(SendPackedHandleOp_Handle* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.eager.SendPackedHandleOp.Handle"; + } + protected: + explicit SendPackedHandleOp_Handle(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kLocalHandleFieldNumber = 1, + kRemoteHandleFieldNumber = 2, + }; + // .tensorflow.eager.SendPackedHandleOp.LocalTensorHandle local_handle = 1; + bool has_local_handle() const; + private: + bool _internal_has_local_handle() const; + public: + void clear_local_handle(); + const ::tensorflow::eager::SendPackedHandleOp_LocalTensorHandle& local_handle() const; + PROTOBUF_NODISCARD ::tensorflow::eager::SendPackedHandleOp_LocalTensorHandle* release_local_handle(); + ::tensorflow::eager::SendPackedHandleOp_LocalTensorHandle* mutable_local_handle(); + void set_allocated_local_handle(::tensorflow::eager::SendPackedHandleOp_LocalTensorHandle* local_handle); + private: + const ::tensorflow::eager::SendPackedHandleOp_LocalTensorHandle& _internal_local_handle() const; + ::tensorflow::eager::SendPackedHandleOp_LocalTensorHandle* _internal_mutable_local_handle(); + public: + void unsafe_arena_set_allocated_local_handle( + ::tensorflow::eager::SendPackedHandleOp_LocalTensorHandle* local_handle); + ::tensorflow::eager::SendPackedHandleOp_LocalTensorHandle* unsafe_arena_release_local_handle(); + + // .tensorflow.eager.RemoteTensorHandle remote_handle = 2; + bool has_remote_handle() const; + private: + bool _internal_has_remote_handle() const; + public: + void clear_remote_handle(); + const ::tensorflow::eager::RemoteTensorHandle& remote_handle() const; + PROTOBUF_NODISCARD ::tensorflow::eager::RemoteTensorHandle* release_remote_handle(); + ::tensorflow::eager::RemoteTensorHandle* mutable_remote_handle(); + void set_allocated_remote_handle(::tensorflow::eager::RemoteTensorHandle* remote_handle); + private: + const ::tensorflow::eager::RemoteTensorHandle& _internal_remote_handle() const; + ::tensorflow::eager::RemoteTensorHandle* _internal_mutable_remote_handle(); + public: + void unsafe_arena_set_allocated_remote_handle( + ::tensorflow::eager::RemoteTensorHandle* remote_handle); + ::tensorflow::eager::RemoteTensorHandle* unsafe_arena_release_remote_handle(); + + void clear_item(); + ItemCase item_case() const; + // @@protoc_insertion_point(class_scope:tensorflow.eager.SendPackedHandleOp.Handle) + private: + class _Internal; + void set_has_local_handle(); + void set_has_remote_handle(); + + inline bool has_item() const; + inline void clear_has_item(); + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + union ItemUnion { + constexpr ItemUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + ::tensorflow::eager::SendPackedHandleOp_LocalTensorHandle* local_handle_; + ::tensorflow::eager::RemoteTensorHandle* remote_handle_; + } item_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + uint32_t _oneof_case_[1]; + + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2feager_5fservice_2eproto; +}; +// ------------------------------------------------------------------- + +class SendPackedHandleOp final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.eager.SendPackedHandleOp) */ { + public: + inline SendPackedHandleOp() : SendPackedHandleOp(nullptr) {} + ~SendPackedHandleOp() override; + explicit PROTOBUF_CONSTEXPR SendPackedHandleOp(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + SendPackedHandleOp(const SendPackedHandleOp& from); + SendPackedHandleOp(SendPackedHandleOp&& from) noexcept + : SendPackedHandleOp() { + *this = ::std::move(from); + } + + inline SendPackedHandleOp& operator=(const SendPackedHandleOp& from) { + CopyFrom(from); + return *this; + } + inline SendPackedHandleOp& operator=(SendPackedHandleOp&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const SendPackedHandleOp& default_instance() { + return *internal_default_instance(); + } + static inline const SendPackedHandleOp* internal_default_instance() { + return reinterpret_cast( + &_SendPackedHandleOp_default_instance_); + } + static constexpr int kIndexInFileMessages = + 26; + + friend void swap(SendPackedHandleOp& a, SendPackedHandleOp& b) { + a.Swap(&b); + } + inline void Swap(SendPackedHandleOp* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(SendPackedHandleOp* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + SendPackedHandleOp* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const SendPackedHandleOp& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const SendPackedHandleOp& from) { + SendPackedHandleOp::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(SendPackedHandleOp* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.eager.SendPackedHandleOp"; + } + protected: + explicit SendPackedHandleOp(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + typedef SendPackedHandleOp_LocalTensorHandle LocalTensorHandle; + typedef SendPackedHandleOp_Handle Handle; + + // accessors ------------------------------------------------------- + + enum : int { + kHandlesFieldNumber = 2, + kDeviceNameFieldNumber = 3, + kOpIdFieldNumber = 1, + }; + // repeated .tensorflow.eager.SendPackedHandleOp.Handle handles = 2; + int handles_size() const; + private: + int _internal_handles_size() const; + public: + void clear_handles(); + ::tensorflow::eager::SendPackedHandleOp_Handle* mutable_handles(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::eager::SendPackedHandleOp_Handle >* + mutable_handles(); + private: + const ::tensorflow::eager::SendPackedHandleOp_Handle& _internal_handles(int index) const; + ::tensorflow::eager::SendPackedHandleOp_Handle* _internal_add_handles(); + public: + const ::tensorflow::eager::SendPackedHandleOp_Handle& handles(int index) const; + ::tensorflow::eager::SendPackedHandleOp_Handle* add_handles(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::eager::SendPackedHandleOp_Handle >& + handles() const; + + // string device_name = 3; + void clear_device_name(); + const std::string& device_name() const; + template + void set_device_name(ArgT0&& arg0, ArgT... args); + std::string* mutable_device_name(); + PROTOBUF_NODISCARD std::string* release_device_name(); + void set_allocated_device_name(std::string* device_name); + private: + const std::string& _internal_device_name() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_device_name(const std::string& value); + std::string* _internal_mutable_device_name(); + public: + + // int64 op_id = 1; + void clear_op_id(); + int64_t op_id() const; + void set_op_id(int64_t value); + private: + int64_t _internal_op_id() const; + void _internal_set_op_id(int64_t value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.eager.SendPackedHandleOp) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::eager::SendPackedHandleOp_Handle > handles_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr device_name_; + int64_t op_id_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2feager_5fservice_2eproto; +}; +// =================================================================== + + +// =================================================================== + +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// Operation_Input + +// .tensorflow.eager.RemoteTensorHandle remote_handle = 1; +inline bool Operation_Input::_internal_has_remote_handle() const { + return item_case() == kRemoteHandle; +} +inline bool Operation_Input::has_remote_handle() const { + return _internal_has_remote_handle(); +} +inline void Operation_Input::set_has_remote_handle() { + _impl_._oneof_case_[0] = kRemoteHandle; +} +inline ::tensorflow::eager::RemoteTensorHandle* Operation_Input::release_remote_handle() { + // @@protoc_insertion_point(field_release:tensorflow.eager.Operation.Input.remote_handle) + if (_internal_has_remote_handle()) { + clear_has_item(); + ::tensorflow::eager::RemoteTensorHandle* temp = _impl_.item_.remote_handle_; + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + _impl_.item_.remote_handle_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::tensorflow::eager::RemoteTensorHandle& Operation_Input::_internal_remote_handle() const { + return _internal_has_remote_handle() + ? *_impl_.item_.remote_handle_ + : reinterpret_cast< ::tensorflow::eager::RemoteTensorHandle&>(::tensorflow::eager::_RemoteTensorHandle_default_instance_); +} +inline const ::tensorflow::eager::RemoteTensorHandle& Operation_Input::remote_handle() const { + // @@protoc_insertion_point(field_get:tensorflow.eager.Operation.Input.remote_handle) + return _internal_remote_handle(); +} +inline ::tensorflow::eager::RemoteTensorHandle* Operation_Input::unsafe_arena_release_remote_handle() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.eager.Operation.Input.remote_handle) + if (_internal_has_remote_handle()) { + clear_has_item(); + ::tensorflow::eager::RemoteTensorHandle* temp = _impl_.item_.remote_handle_; + _impl_.item_.remote_handle_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void Operation_Input::unsafe_arena_set_allocated_remote_handle(::tensorflow::eager::RemoteTensorHandle* remote_handle) { + clear_item(); + if (remote_handle) { + set_has_remote_handle(); + _impl_.item_.remote_handle_ = remote_handle; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.eager.Operation.Input.remote_handle) +} +inline ::tensorflow::eager::RemoteTensorHandle* Operation_Input::_internal_mutable_remote_handle() { + if (!_internal_has_remote_handle()) { + clear_item(); + set_has_remote_handle(); + _impl_.item_.remote_handle_ = CreateMaybeMessage< ::tensorflow::eager::RemoteTensorHandle >(GetArenaForAllocation()); + } + return _impl_.item_.remote_handle_; +} +inline ::tensorflow::eager::RemoteTensorHandle* Operation_Input::mutable_remote_handle() { + ::tensorflow::eager::RemoteTensorHandle* _msg = _internal_mutable_remote_handle(); + // @@protoc_insertion_point(field_mutable:tensorflow.eager.Operation.Input.remote_handle) + return _msg; +} + +// .tensorflow.TensorProto tensor = 2; +inline bool Operation_Input::_internal_has_tensor() const { + return item_case() == kTensor; +} +inline bool Operation_Input::has_tensor() const { + return _internal_has_tensor(); +} +inline void Operation_Input::set_has_tensor() { + _impl_._oneof_case_[0] = kTensor; +} +inline ::tensorflow::TensorProto* Operation_Input::release_tensor() { + // @@protoc_insertion_point(field_release:tensorflow.eager.Operation.Input.tensor) + if (_internal_has_tensor()) { + clear_has_item(); + ::tensorflow::TensorProto* temp = _impl_.item_.tensor_; + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + _impl_.item_.tensor_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::tensorflow::TensorProto& Operation_Input::_internal_tensor() const { + return _internal_has_tensor() + ? *_impl_.item_.tensor_ + : reinterpret_cast< ::tensorflow::TensorProto&>(::tensorflow::_TensorProto_default_instance_); +} +inline const ::tensorflow::TensorProto& Operation_Input::tensor() const { + // @@protoc_insertion_point(field_get:tensorflow.eager.Operation.Input.tensor) + return _internal_tensor(); +} +inline ::tensorflow::TensorProto* Operation_Input::unsafe_arena_release_tensor() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.eager.Operation.Input.tensor) + if (_internal_has_tensor()) { + clear_has_item(); + ::tensorflow::TensorProto* temp = _impl_.item_.tensor_; + _impl_.item_.tensor_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void Operation_Input::unsafe_arena_set_allocated_tensor(::tensorflow::TensorProto* tensor) { + clear_item(); + if (tensor) { + set_has_tensor(); + _impl_.item_.tensor_ = tensor; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.eager.Operation.Input.tensor) +} +inline ::tensorflow::TensorProto* Operation_Input::_internal_mutable_tensor() { + if (!_internal_has_tensor()) { + clear_item(); + set_has_tensor(); + _impl_.item_.tensor_ = CreateMaybeMessage< ::tensorflow::TensorProto >(GetArenaForAllocation()); + } + return _impl_.item_.tensor_; +} +inline ::tensorflow::TensorProto* Operation_Input::mutable_tensor() { + ::tensorflow::TensorProto* _msg = _internal_mutable_tensor(); + // @@protoc_insertion_point(field_mutable:tensorflow.eager.Operation.Input.tensor) + return _msg; +} + +inline bool Operation_Input::has_item() const { + return item_case() != ITEM_NOT_SET; +} +inline void Operation_Input::clear_has_item() { + _impl_._oneof_case_[0] = ITEM_NOT_SET; +} +inline Operation_Input::ItemCase Operation_Input::item_case() const { + return Operation_Input::ItemCase(_impl_._oneof_case_[0]); +} +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// Operation + +// int64 id = 1; +inline void Operation::clear_id() { + _impl_.id_ = int64_t{0}; +} +inline int64_t Operation::_internal_id() const { + return _impl_.id_; +} +inline int64_t Operation::id() const { + // @@protoc_insertion_point(field_get:tensorflow.eager.Operation.id) + return _internal_id(); +} +inline void Operation::_internal_set_id(int64_t value) { + + _impl_.id_ = value; +} +inline void Operation::set_id(int64_t value) { + _internal_set_id(value); + // @@protoc_insertion_point(field_set:tensorflow.eager.Operation.id) +} + +// string name = 2; +inline void Operation::clear_name() { + _impl_.name_.ClearToEmpty(); +} +inline const std::string& Operation::name() const { + // @@protoc_insertion_point(field_get:tensorflow.eager.Operation.name) + return _internal_name(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void Operation::set_name(ArgT0&& arg0, ArgT... args) { + + _impl_.name_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.eager.Operation.name) +} +inline std::string* Operation::mutable_name() { + std::string* _s = _internal_mutable_name(); + // @@protoc_insertion_point(field_mutable:tensorflow.eager.Operation.name) + return _s; +} +inline const std::string& Operation::_internal_name() const { + return _impl_.name_.Get(); +} +inline void Operation::_internal_set_name(const std::string& value) { + + _impl_.name_.Set(value, GetArenaForAllocation()); +} +inline std::string* Operation::_internal_mutable_name() { + + return _impl_.name_.Mutable(GetArenaForAllocation()); +} +inline std::string* Operation::release_name() { + // @@protoc_insertion_point(field_release:tensorflow.eager.Operation.name) + return _impl_.name_.Release(); +} +inline void Operation::set_allocated_name(std::string* name) { + if (name != nullptr) { + + } else { + + } + _impl_.name_.SetAllocated(name, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.name_.IsDefault()) { + _impl_.name_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.eager.Operation.name) +} + +// repeated .tensorflow.eager.Operation.Input op_inputs = 10; +inline int Operation::_internal_op_inputs_size() const { + return _impl_.op_inputs_.size(); +} +inline int Operation::op_inputs_size() const { + return _internal_op_inputs_size(); +} +inline void Operation::clear_op_inputs() { + _impl_.op_inputs_.Clear(); +} +inline ::tensorflow::eager::Operation_Input* Operation::mutable_op_inputs(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.eager.Operation.op_inputs) + return _impl_.op_inputs_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::eager::Operation_Input >* +Operation::mutable_op_inputs() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.eager.Operation.op_inputs) + return &_impl_.op_inputs_; +} +inline const ::tensorflow::eager::Operation_Input& Operation::_internal_op_inputs(int index) const { + return _impl_.op_inputs_.Get(index); +} +inline const ::tensorflow::eager::Operation_Input& Operation::op_inputs(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.eager.Operation.op_inputs) + return _internal_op_inputs(index); +} +inline ::tensorflow::eager::Operation_Input* Operation::_internal_add_op_inputs() { + return _impl_.op_inputs_.Add(); +} +inline ::tensorflow::eager::Operation_Input* Operation::add_op_inputs() { + ::tensorflow::eager::Operation_Input* _add = _internal_add_op_inputs(); + // @@protoc_insertion_point(field_add:tensorflow.eager.Operation.op_inputs) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::eager::Operation_Input >& +Operation::op_inputs() const { + // @@protoc_insertion_point(field_list:tensorflow.eager.Operation.op_inputs) + return _impl_.op_inputs_; +} + +// repeated int64 control_op_ids = 4; +inline int Operation::_internal_control_op_ids_size() const { + return _impl_.control_op_ids_.size(); +} +inline int Operation::control_op_ids_size() const { + return _internal_control_op_ids_size(); +} +inline void Operation::clear_control_op_ids() { + _impl_.control_op_ids_.Clear(); +} +inline int64_t Operation::_internal_control_op_ids(int index) const { + return _impl_.control_op_ids_.Get(index); +} +inline int64_t Operation::control_op_ids(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.eager.Operation.control_op_ids) + return _internal_control_op_ids(index); +} +inline void Operation::set_control_op_ids(int index, int64_t value) { + _impl_.control_op_ids_.Set(index, value); + // @@protoc_insertion_point(field_set:tensorflow.eager.Operation.control_op_ids) +} +inline void Operation::_internal_add_control_op_ids(int64_t value) { + _impl_.control_op_ids_.Add(value); +} +inline void Operation::add_control_op_ids(int64_t value) { + _internal_add_control_op_ids(value); + // @@protoc_insertion_point(field_add:tensorflow.eager.Operation.control_op_ids) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >& +Operation::_internal_control_op_ids() const { + return _impl_.control_op_ids_; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >& +Operation::control_op_ids() const { + // @@protoc_insertion_point(field_list:tensorflow.eager.Operation.control_op_ids) + return _internal_control_op_ids(); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >* +Operation::_internal_mutable_control_op_ids() { + return &_impl_.control_op_ids_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >* +Operation::mutable_control_op_ids() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.eager.Operation.control_op_ids) + return _internal_mutable_control_op_ids(); +} + +// map attrs = 5; +inline int Operation::_internal_attrs_size() const { + return _impl_.attrs_.size(); +} +inline int Operation::attrs_size() const { + return _internal_attrs_size(); +} +inline const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::AttrValue >& +Operation::_internal_attrs() const { + return _impl_.attrs_.GetMap(); +} +inline const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::AttrValue >& +Operation::attrs() const { + // @@protoc_insertion_point(field_map:tensorflow.eager.Operation.attrs) + return _internal_attrs(); +} +inline ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::AttrValue >* +Operation::_internal_mutable_attrs() { + return _impl_.attrs_.MutableMap(); +} +inline ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::AttrValue >* +Operation::mutable_attrs() { + // @@protoc_insertion_point(field_mutable_map:tensorflow.eager.Operation.attrs) + return _internal_mutable_attrs(); +} + +// string device = 6; +inline void Operation::clear_device() { + _impl_.device_.ClearToEmpty(); +} +inline const std::string& Operation::device() const { + // @@protoc_insertion_point(field_get:tensorflow.eager.Operation.device) + return _internal_device(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void Operation::set_device(ArgT0&& arg0, ArgT... args) { + + _impl_.device_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.eager.Operation.device) +} +inline std::string* Operation::mutable_device() { + std::string* _s = _internal_mutable_device(); + // @@protoc_insertion_point(field_mutable:tensorflow.eager.Operation.device) + return _s; +} +inline const std::string& Operation::_internal_device() const { + return _impl_.device_.Get(); +} +inline void Operation::_internal_set_device(const std::string& value) { + + _impl_.device_.Set(value, GetArenaForAllocation()); +} +inline std::string* Operation::_internal_mutable_device() { + + return _impl_.device_.Mutable(GetArenaForAllocation()); +} +inline std::string* Operation::release_device() { + // @@protoc_insertion_point(field_release:tensorflow.eager.Operation.device) + return _impl_.device_.Release(); +} +inline void Operation::set_allocated_device(std::string* device) { + if (device != nullptr) { + + } else { + + } + _impl_.device_.SetAllocated(device, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.device_.IsDefault()) { + _impl_.device_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.eager.Operation.device) +} + +// bool is_component_function = 7; +inline void Operation::clear_is_component_function() { + _impl_.is_component_function_ = false; +} +inline bool Operation::_internal_is_component_function() const { + return _impl_.is_component_function_; +} +inline bool Operation::is_component_function() const { + // @@protoc_insertion_point(field_get:tensorflow.eager.Operation.is_component_function) + return _internal_is_component_function(); +} +inline void Operation::_internal_set_is_component_function(bool value) { + + _impl_.is_component_function_ = value; +} +inline void Operation::set_is_component_function(bool value) { + _internal_set_is_component_function(value); + // @@protoc_insertion_point(field_set:tensorflow.eager.Operation.is_component_function) +} + +// int64 func_step_id = 8; +inline void Operation::clear_func_step_id() { + _impl_.func_step_id_ = int64_t{0}; +} +inline int64_t Operation::_internal_func_step_id() const { + return _impl_.func_step_id_; +} +inline int64_t Operation::func_step_id() const { + // @@protoc_insertion_point(field_get:tensorflow.eager.Operation.func_step_id) + return _internal_func_step_id(); +} +inline void Operation::_internal_set_func_step_id(int64_t value) { + + _impl_.func_step_id_ = value; +} +inline void Operation::set_func_step_id(int64_t value) { + _internal_set_func_step_id(value); + // @@protoc_insertion_point(field_set:tensorflow.eager.Operation.func_step_id) +} + +// bool is_function = 9; +inline void Operation::clear_is_function() { + _impl_.is_function_ = false; +} +inline bool Operation::_internal_is_function() const { + return _impl_.is_function_; +} +inline bool Operation::is_function() const { + // @@protoc_insertion_point(field_get:tensorflow.eager.Operation.is_function) + return _internal_is_function(); +} +inline void Operation::_internal_set_is_function(bool value) { + + _impl_.is_function_ = value; +} +inline void Operation::set_is_function(bool value) { + _internal_set_is_function(value); + // @@protoc_insertion_point(field_set:tensorflow.eager.Operation.is_function) +} + +// ------------------------------------------------------------------- + +// QueueItem + +// .tensorflow.eager.RemoteTensorHandle handle_to_decref = 1; +inline bool QueueItem::_internal_has_handle_to_decref() const { + return item_case() == kHandleToDecref; +} +inline bool QueueItem::has_handle_to_decref() const { + return _internal_has_handle_to_decref(); +} +inline void QueueItem::set_has_handle_to_decref() { + _impl_._oneof_case_[0] = kHandleToDecref; +} +inline ::tensorflow::eager::RemoteTensorHandle* QueueItem::release_handle_to_decref() { + // @@protoc_insertion_point(field_release:tensorflow.eager.QueueItem.handle_to_decref) + if (_internal_has_handle_to_decref()) { + clear_has_item(); + ::tensorflow::eager::RemoteTensorHandle* temp = _impl_.item_.handle_to_decref_; + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + _impl_.item_.handle_to_decref_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::tensorflow::eager::RemoteTensorHandle& QueueItem::_internal_handle_to_decref() const { + return _internal_has_handle_to_decref() + ? *_impl_.item_.handle_to_decref_ + : reinterpret_cast< ::tensorflow::eager::RemoteTensorHandle&>(::tensorflow::eager::_RemoteTensorHandle_default_instance_); +} +inline const ::tensorflow::eager::RemoteTensorHandle& QueueItem::handle_to_decref() const { + // @@protoc_insertion_point(field_get:tensorflow.eager.QueueItem.handle_to_decref) + return _internal_handle_to_decref(); +} +inline ::tensorflow::eager::RemoteTensorHandle* QueueItem::unsafe_arena_release_handle_to_decref() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.eager.QueueItem.handle_to_decref) + if (_internal_has_handle_to_decref()) { + clear_has_item(); + ::tensorflow::eager::RemoteTensorHandle* temp = _impl_.item_.handle_to_decref_; + _impl_.item_.handle_to_decref_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void QueueItem::unsafe_arena_set_allocated_handle_to_decref(::tensorflow::eager::RemoteTensorHandle* handle_to_decref) { + clear_item(); + if (handle_to_decref) { + set_has_handle_to_decref(); + _impl_.item_.handle_to_decref_ = handle_to_decref; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.eager.QueueItem.handle_to_decref) +} +inline ::tensorflow::eager::RemoteTensorHandle* QueueItem::_internal_mutable_handle_to_decref() { + if (!_internal_has_handle_to_decref()) { + clear_item(); + set_has_handle_to_decref(); + _impl_.item_.handle_to_decref_ = CreateMaybeMessage< ::tensorflow::eager::RemoteTensorHandle >(GetArenaForAllocation()); + } + return _impl_.item_.handle_to_decref_; +} +inline ::tensorflow::eager::RemoteTensorHandle* QueueItem::mutable_handle_to_decref() { + ::tensorflow::eager::RemoteTensorHandle* _msg = _internal_mutable_handle_to_decref(); + // @@protoc_insertion_point(field_mutable:tensorflow.eager.QueueItem.handle_to_decref) + return _msg; +} + +// .tensorflow.eager.Operation operation = 2; +inline bool QueueItem::_internal_has_operation() const { + return item_case() == kOperation; +} +inline bool QueueItem::has_operation() const { + return _internal_has_operation(); +} +inline void QueueItem::set_has_operation() { + _impl_._oneof_case_[0] = kOperation; +} +inline void QueueItem::clear_operation() { + if (_internal_has_operation()) { + if (GetArenaForAllocation() == nullptr) { + delete _impl_.item_.operation_; + } + clear_has_item(); + } +} +inline ::tensorflow::eager::Operation* QueueItem::release_operation() { + // @@protoc_insertion_point(field_release:tensorflow.eager.QueueItem.operation) + if (_internal_has_operation()) { + clear_has_item(); + ::tensorflow::eager::Operation* temp = _impl_.item_.operation_; + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + _impl_.item_.operation_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::tensorflow::eager::Operation& QueueItem::_internal_operation() const { + return _internal_has_operation() + ? *_impl_.item_.operation_ + : reinterpret_cast< ::tensorflow::eager::Operation&>(::tensorflow::eager::_Operation_default_instance_); +} +inline const ::tensorflow::eager::Operation& QueueItem::operation() const { + // @@protoc_insertion_point(field_get:tensorflow.eager.QueueItem.operation) + return _internal_operation(); +} +inline ::tensorflow::eager::Operation* QueueItem::unsafe_arena_release_operation() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.eager.QueueItem.operation) + if (_internal_has_operation()) { + clear_has_item(); + ::tensorflow::eager::Operation* temp = _impl_.item_.operation_; + _impl_.item_.operation_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void QueueItem::unsafe_arena_set_allocated_operation(::tensorflow::eager::Operation* operation) { + clear_item(); + if (operation) { + set_has_operation(); + _impl_.item_.operation_ = operation; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.eager.QueueItem.operation) +} +inline ::tensorflow::eager::Operation* QueueItem::_internal_mutable_operation() { + if (!_internal_has_operation()) { + clear_item(); + set_has_operation(); + _impl_.item_.operation_ = CreateMaybeMessage< ::tensorflow::eager::Operation >(GetArenaForAllocation()); + } + return _impl_.item_.operation_; +} +inline ::tensorflow::eager::Operation* QueueItem::mutable_operation() { + ::tensorflow::eager::Operation* _msg = _internal_mutable_operation(); + // @@protoc_insertion_point(field_mutable:tensorflow.eager.QueueItem.operation) + return _msg; +} + +// .tensorflow.eager.SendTensorOp send_tensor = 3; +inline bool QueueItem::_internal_has_send_tensor() const { + return item_case() == kSendTensor; +} +inline bool QueueItem::has_send_tensor() const { + return _internal_has_send_tensor(); +} +inline void QueueItem::set_has_send_tensor() { + _impl_._oneof_case_[0] = kSendTensor; +} +inline void QueueItem::clear_send_tensor() { + if (_internal_has_send_tensor()) { + if (GetArenaForAllocation() == nullptr) { + delete _impl_.item_.send_tensor_; + } + clear_has_item(); + } +} +inline ::tensorflow::eager::SendTensorOp* QueueItem::release_send_tensor() { + // @@protoc_insertion_point(field_release:tensorflow.eager.QueueItem.send_tensor) + if (_internal_has_send_tensor()) { + clear_has_item(); + ::tensorflow::eager::SendTensorOp* temp = _impl_.item_.send_tensor_; + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + _impl_.item_.send_tensor_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::tensorflow::eager::SendTensorOp& QueueItem::_internal_send_tensor() const { + return _internal_has_send_tensor() + ? *_impl_.item_.send_tensor_ + : reinterpret_cast< ::tensorflow::eager::SendTensorOp&>(::tensorflow::eager::_SendTensorOp_default_instance_); +} +inline const ::tensorflow::eager::SendTensorOp& QueueItem::send_tensor() const { + // @@protoc_insertion_point(field_get:tensorflow.eager.QueueItem.send_tensor) + return _internal_send_tensor(); +} +inline ::tensorflow::eager::SendTensorOp* QueueItem::unsafe_arena_release_send_tensor() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.eager.QueueItem.send_tensor) + if (_internal_has_send_tensor()) { + clear_has_item(); + ::tensorflow::eager::SendTensorOp* temp = _impl_.item_.send_tensor_; + _impl_.item_.send_tensor_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void QueueItem::unsafe_arena_set_allocated_send_tensor(::tensorflow::eager::SendTensorOp* send_tensor) { + clear_item(); + if (send_tensor) { + set_has_send_tensor(); + _impl_.item_.send_tensor_ = send_tensor; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.eager.QueueItem.send_tensor) +} +inline ::tensorflow::eager::SendTensorOp* QueueItem::_internal_mutable_send_tensor() { + if (!_internal_has_send_tensor()) { + clear_item(); + set_has_send_tensor(); + _impl_.item_.send_tensor_ = CreateMaybeMessage< ::tensorflow::eager::SendTensorOp >(GetArenaForAllocation()); + } + return _impl_.item_.send_tensor_; +} +inline ::tensorflow::eager::SendTensorOp* QueueItem::mutable_send_tensor() { + ::tensorflow::eager::SendTensorOp* _msg = _internal_mutable_send_tensor(); + // @@protoc_insertion_point(field_mutable:tensorflow.eager.QueueItem.send_tensor) + return _msg; +} + +// .tensorflow.eager.RegisterFunctionOp register_function = 4; +inline bool QueueItem::_internal_has_register_function() const { + return item_case() == kRegisterFunction; +} +inline bool QueueItem::has_register_function() const { + return _internal_has_register_function(); +} +inline void QueueItem::set_has_register_function() { + _impl_._oneof_case_[0] = kRegisterFunction; +} +inline void QueueItem::clear_register_function() { + if (_internal_has_register_function()) { + if (GetArenaForAllocation() == nullptr) { + delete _impl_.item_.register_function_; + } + clear_has_item(); + } +} +inline ::tensorflow::eager::RegisterFunctionOp* QueueItem::release_register_function() { + // @@protoc_insertion_point(field_release:tensorflow.eager.QueueItem.register_function) + if (_internal_has_register_function()) { + clear_has_item(); + ::tensorflow::eager::RegisterFunctionOp* temp = _impl_.item_.register_function_; + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + _impl_.item_.register_function_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::tensorflow::eager::RegisterFunctionOp& QueueItem::_internal_register_function() const { + return _internal_has_register_function() + ? *_impl_.item_.register_function_ + : reinterpret_cast< ::tensorflow::eager::RegisterFunctionOp&>(::tensorflow::eager::_RegisterFunctionOp_default_instance_); +} +inline const ::tensorflow::eager::RegisterFunctionOp& QueueItem::register_function() const { + // @@protoc_insertion_point(field_get:tensorflow.eager.QueueItem.register_function) + return _internal_register_function(); +} +inline ::tensorflow::eager::RegisterFunctionOp* QueueItem::unsafe_arena_release_register_function() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.eager.QueueItem.register_function) + if (_internal_has_register_function()) { + clear_has_item(); + ::tensorflow::eager::RegisterFunctionOp* temp = _impl_.item_.register_function_; + _impl_.item_.register_function_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void QueueItem::unsafe_arena_set_allocated_register_function(::tensorflow::eager::RegisterFunctionOp* register_function) { + clear_item(); + if (register_function) { + set_has_register_function(); + _impl_.item_.register_function_ = register_function; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.eager.QueueItem.register_function) +} +inline ::tensorflow::eager::RegisterFunctionOp* QueueItem::_internal_mutable_register_function() { + if (!_internal_has_register_function()) { + clear_item(); + set_has_register_function(); + _impl_.item_.register_function_ = CreateMaybeMessage< ::tensorflow::eager::RegisterFunctionOp >(GetArenaForAllocation()); + } + return _impl_.item_.register_function_; +} +inline ::tensorflow::eager::RegisterFunctionOp* QueueItem::mutable_register_function() { + ::tensorflow::eager::RegisterFunctionOp* _msg = _internal_mutable_register_function(); + // @@protoc_insertion_point(field_mutable:tensorflow.eager.QueueItem.register_function) + return _msg; +} + +// .tensorflow.eager.CleanupFunctionOp cleanup_function = 5; +inline bool QueueItem::_internal_has_cleanup_function() const { + return item_case() == kCleanupFunction; +} +inline bool QueueItem::has_cleanup_function() const { + return _internal_has_cleanup_function(); +} +inline void QueueItem::set_has_cleanup_function() { + _impl_._oneof_case_[0] = kCleanupFunction; +} +inline void QueueItem::clear_cleanup_function() { + if (_internal_has_cleanup_function()) { + if (GetArenaForAllocation() == nullptr) { + delete _impl_.item_.cleanup_function_; + } + clear_has_item(); + } +} +inline ::tensorflow::eager::CleanupFunctionOp* QueueItem::release_cleanup_function() { + // @@protoc_insertion_point(field_release:tensorflow.eager.QueueItem.cleanup_function) + if (_internal_has_cleanup_function()) { + clear_has_item(); + ::tensorflow::eager::CleanupFunctionOp* temp = _impl_.item_.cleanup_function_; + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + _impl_.item_.cleanup_function_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::tensorflow::eager::CleanupFunctionOp& QueueItem::_internal_cleanup_function() const { + return _internal_has_cleanup_function() + ? *_impl_.item_.cleanup_function_ + : reinterpret_cast< ::tensorflow::eager::CleanupFunctionOp&>(::tensorflow::eager::_CleanupFunctionOp_default_instance_); +} +inline const ::tensorflow::eager::CleanupFunctionOp& QueueItem::cleanup_function() const { + // @@protoc_insertion_point(field_get:tensorflow.eager.QueueItem.cleanup_function) + return _internal_cleanup_function(); +} +inline ::tensorflow::eager::CleanupFunctionOp* QueueItem::unsafe_arena_release_cleanup_function() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.eager.QueueItem.cleanup_function) + if (_internal_has_cleanup_function()) { + clear_has_item(); + ::tensorflow::eager::CleanupFunctionOp* temp = _impl_.item_.cleanup_function_; + _impl_.item_.cleanup_function_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void QueueItem::unsafe_arena_set_allocated_cleanup_function(::tensorflow::eager::CleanupFunctionOp* cleanup_function) { + clear_item(); + if (cleanup_function) { + set_has_cleanup_function(); + _impl_.item_.cleanup_function_ = cleanup_function; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.eager.QueueItem.cleanup_function) +} +inline ::tensorflow::eager::CleanupFunctionOp* QueueItem::_internal_mutable_cleanup_function() { + if (!_internal_has_cleanup_function()) { + clear_item(); + set_has_cleanup_function(); + _impl_.item_.cleanup_function_ = CreateMaybeMessage< ::tensorflow::eager::CleanupFunctionOp >(GetArenaForAllocation()); + } + return _impl_.item_.cleanup_function_; +} +inline ::tensorflow::eager::CleanupFunctionOp* QueueItem::mutable_cleanup_function() { + ::tensorflow::eager::CleanupFunctionOp* _msg = _internal_mutable_cleanup_function(); + // @@protoc_insertion_point(field_mutable:tensorflow.eager.QueueItem.cleanup_function) + return _msg; +} + +// .tensorflow.eager.SyncRemoteExecutorForStream sync_remote_executor_for_stream = 6; +inline bool QueueItem::_internal_has_sync_remote_executor_for_stream() const { + return item_case() == kSyncRemoteExecutorForStream; +} +inline bool QueueItem::has_sync_remote_executor_for_stream() const { + return _internal_has_sync_remote_executor_for_stream(); +} +inline void QueueItem::set_has_sync_remote_executor_for_stream() { + _impl_._oneof_case_[0] = kSyncRemoteExecutorForStream; +} +inline void QueueItem::clear_sync_remote_executor_for_stream() { + if (_internal_has_sync_remote_executor_for_stream()) { + if (GetArenaForAllocation() == nullptr) { + delete _impl_.item_.sync_remote_executor_for_stream_; + } + clear_has_item(); + } +} +inline ::tensorflow::eager::SyncRemoteExecutorForStream* QueueItem::release_sync_remote_executor_for_stream() { + // @@protoc_insertion_point(field_release:tensorflow.eager.QueueItem.sync_remote_executor_for_stream) + if (_internal_has_sync_remote_executor_for_stream()) { + clear_has_item(); + ::tensorflow::eager::SyncRemoteExecutorForStream* temp = _impl_.item_.sync_remote_executor_for_stream_; + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + _impl_.item_.sync_remote_executor_for_stream_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::tensorflow::eager::SyncRemoteExecutorForStream& QueueItem::_internal_sync_remote_executor_for_stream() const { + return _internal_has_sync_remote_executor_for_stream() + ? *_impl_.item_.sync_remote_executor_for_stream_ + : reinterpret_cast< ::tensorflow::eager::SyncRemoteExecutorForStream&>(::tensorflow::eager::_SyncRemoteExecutorForStream_default_instance_); +} +inline const ::tensorflow::eager::SyncRemoteExecutorForStream& QueueItem::sync_remote_executor_for_stream() const { + // @@protoc_insertion_point(field_get:tensorflow.eager.QueueItem.sync_remote_executor_for_stream) + return _internal_sync_remote_executor_for_stream(); +} +inline ::tensorflow::eager::SyncRemoteExecutorForStream* QueueItem::unsafe_arena_release_sync_remote_executor_for_stream() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.eager.QueueItem.sync_remote_executor_for_stream) + if (_internal_has_sync_remote_executor_for_stream()) { + clear_has_item(); + ::tensorflow::eager::SyncRemoteExecutorForStream* temp = _impl_.item_.sync_remote_executor_for_stream_; + _impl_.item_.sync_remote_executor_for_stream_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void QueueItem::unsafe_arena_set_allocated_sync_remote_executor_for_stream(::tensorflow::eager::SyncRemoteExecutorForStream* sync_remote_executor_for_stream) { + clear_item(); + if (sync_remote_executor_for_stream) { + set_has_sync_remote_executor_for_stream(); + _impl_.item_.sync_remote_executor_for_stream_ = sync_remote_executor_for_stream; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.eager.QueueItem.sync_remote_executor_for_stream) +} +inline ::tensorflow::eager::SyncRemoteExecutorForStream* QueueItem::_internal_mutable_sync_remote_executor_for_stream() { + if (!_internal_has_sync_remote_executor_for_stream()) { + clear_item(); + set_has_sync_remote_executor_for_stream(); + _impl_.item_.sync_remote_executor_for_stream_ = CreateMaybeMessage< ::tensorflow::eager::SyncRemoteExecutorForStream >(GetArenaForAllocation()); + } + return _impl_.item_.sync_remote_executor_for_stream_; +} +inline ::tensorflow::eager::SyncRemoteExecutorForStream* QueueItem::mutable_sync_remote_executor_for_stream() { + ::tensorflow::eager::SyncRemoteExecutorForStream* _msg = _internal_mutable_sync_remote_executor_for_stream(); + // @@protoc_insertion_point(field_mutable:tensorflow.eager.QueueItem.sync_remote_executor_for_stream) + return _msg; +} + +// .tensorflow.eager.SendPackedHandleOp send_packed_handle = 7; +inline bool QueueItem::_internal_has_send_packed_handle() const { + return item_case() == kSendPackedHandle; +} +inline bool QueueItem::has_send_packed_handle() const { + return _internal_has_send_packed_handle(); +} +inline void QueueItem::set_has_send_packed_handle() { + _impl_._oneof_case_[0] = kSendPackedHandle; +} +inline void QueueItem::clear_send_packed_handle() { + if (_internal_has_send_packed_handle()) { + if (GetArenaForAllocation() == nullptr) { + delete _impl_.item_.send_packed_handle_; + } + clear_has_item(); + } +} +inline ::tensorflow::eager::SendPackedHandleOp* QueueItem::release_send_packed_handle() { + // @@protoc_insertion_point(field_release:tensorflow.eager.QueueItem.send_packed_handle) + if (_internal_has_send_packed_handle()) { + clear_has_item(); + ::tensorflow::eager::SendPackedHandleOp* temp = _impl_.item_.send_packed_handle_; + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + _impl_.item_.send_packed_handle_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::tensorflow::eager::SendPackedHandleOp& QueueItem::_internal_send_packed_handle() const { + return _internal_has_send_packed_handle() + ? *_impl_.item_.send_packed_handle_ + : reinterpret_cast< ::tensorflow::eager::SendPackedHandleOp&>(::tensorflow::eager::_SendPackedHandleOp_default_instance_); +} +inline const ::tensorflow::eager::SendPackedHandleOp& QueueItem::send_packed_handle() const { + // @@protoc_insertion_point(field_get:tensorflow.eager.QueueItem.send_packed_handle) + return _internal_send_packed_handle(); +} +inline ::tensorflow::eager::SendPackedHandleOp* QueueItem::unsafe_arena_release_send_packed_handle() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.eager.QueueItem.send_packed_handle) + if (_internal_has_send_packed_handle()) { + clear_has_item(); + ::tensorflow::eager::SendPackedHandleOp* temp = _impl_.item_.send_packed_handle_; + _impl_.item_.send_packed_handle_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void QueueItem::unsafe_arena_set_allocated_send_packed_handle(::tensorflow::eager::SendPackedHandleOp* send_packed_handle) { + clear_item(); + if (send_packed_handle) { + set_has_send_packed_handle(); + _impl_.item_.send_packed_handle_ = send_packed_handle; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.eager.QueueItem.send_packed_handle) +} +inline ::tensorflow::eager::SendPackedHandleOp* QueueItem::_internal_mutable_send_packed_handle() { + if (!_internal_has_send_packed_handle()) { + clear_item(); + set_has_send_packed_handle(); + _impl_.item_.send_packed_handle_ = CreateMaybeMessage< ::tensorflow::eager::SendPackedHandleOp >(GetArenaForAllocation()); + } + return _impl_.item_.send_packed_handle_; +} +inline ::tensorflow::eager::SendPackedHandleOp* QueueItem::mutable_send_packed_handle() { + ::tensorflow::eager::SendPackedHandleOp* _msg = _internal_mutable_send_packed_handle(); + // @@protoc_insertion_point(field_mutable:tensorflow.eager.QueueItem.send_packed_handle) + return _msg; +} + +// .tensorflow.eager.RemoveFunctionOp remove_function = 8; +inline bool QueueItem::_internal_has_remove_function() const { + return item_case() == kRemoveFunction; +} +inline bool QueueItem::has_remove_function() const { + return _internal_has_remove_function(); +} +inline void QueueItem::set_has_remove_function() { + _impl_._oneof_case_[0] = kRemoveFunction; +} +inline void QueueItem::clear_remove_function() { + if (_internal_has_remove_function()) { + if (GetArenaForAllocation() == nullptr) { + delete _impl_.item_.remove_function_; + } + clear_has_item(); + } +} +inline ::tensorflow::eager::RemoveFunctionOp* QueueItem::release_remove_function() { + // @@protoc_insertion_point(field_release:tensorflow.eager.QueueItem.remove_function) + if (_internal_has_remove_function()) { + clear_has_item(); + ::tensorflow::eager::RemoveFunctionOp* temp = _impl_.item_.remove_function_; + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + _impl_.item_.remove_function_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::tensorflow::eager::RemoveFunctionOp& QueueItem::_internal_remove_function() const { + return _internal_has_remove_function() + ? *_impl_.item_.remove_function_ + : reinterpret_cast< ::tensorflow::eager::RemoveFunctionOp&>(::tensorflow::eager::_RemoveFunctionOp_default_instance_); +} +inline const ::tensorflow::eager::RemoveFunctionOp& QueueItem::remove_function() const { + // @@protoc_insertion_point(field_get:tensorflow.eager.QueueItem.remove_function) + return _internal_remove_function(); +} +inline ::tensorflow::eager::RemoveFunctionOp* QueueItem::unsafe_arena_release_remove_function() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.eager.QueueItem.remove_function) + if (_internal_has_remove_function()) { + clear_has_item(); + ::tensorflow::eager::RemoveFunctionOp* temp = _impl_.item_.remove_function_; + _impl_.item_.remove_function_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void QueueItem::unsafe_arena_set_allocated_remove_function(::tensorflow::eager::RemoveFunctionOp* remove_function) { + clear_item(); + if (remove_function) { + set_has_remove_function(); + _impl_.item_.remove_function_ = remove_function; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.eager.QueueItem.remove_function) +} +inline ::tensorflow::eager::RemoveFunctionOp* QueueItem::_internal_mutable_remove_function() { + if (!_internal_has_remove_function()) { + clear_item(); + set_has_remove_function(); + _impl_.item_.remove_function_ = CreateMaybeMessage< ::tensorflow::eager::RemoveFunctionOp >(GetArenaForAllocation()); + } + return _impl_.item_.remove_function_; +} +inline ::tensorflow::eager::RemoveFunctionOp* QueueItem::mutable_remove_function() { + ::tensorflow::eager::RemoveFunctionOp* _msg = _internal_mutable_remove_function(); + // @@protoc_insertion_point(field_mutable:tensorflow.eager.QueueItem.remove_function) + return _msg; +} + +inline bool QueueItem::has_item() const { + return item_case() != ITEM_NOT_SET; +} +inline void QueueItem::clear_has_item() { + _impl_._oneof_case_[0] = ITEM_NOT_SET; +} +inline QueueItem::ItemCase QueueItem::item_case() const { + return QueueItem::ItemCase(_impl_._oneof_case_[0]); +} +// ------------------------------------------------------------------- + +// QueueResponse + +// repeated .tensorflow.TensorShapeProto shape = 1; +inline int QueueResponse::_internal_shape_size() const { + return _impl_.shape_.size(); +} +inline int QueueResponse::shape_size() const { + return _internal_shape_size(); +} +inline ::tensorflow::TensorShapeProto* QueueResponse::mutable_shape(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.eager.QueueResponse.shape) + return _impl_.shape_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::TensorShapeProto >* +QueueResponse::mutable_shape() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.eager.QueueResponse.shape) + return &_impl_.shape_; +} +inline const ::tensorflow::TensorShapeProto& QueueResponse::_internal_shape(int index) const { + return _impl_.shape_.Get(index); +} +inline const ::tensorflow::TensorShapeProto& QueueResponse::shape(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.eager.QueueResponse.shape) + return _internal_shape(index); +} +inline ::tensorflow::TensorShapeProto* QueueResponse::_internal_add_shape() { + return _impl_.shape_.Add(); +} +inline ::tensorflow::TensorShapeProto* QueueResponse::add_shape() { + ::tensorflow::TensorShapeProto* _add = _internal_add_shape(); + // @@protoc_insertion_point(field_add:tensorflow.eager.QueueResponse.shape) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::TensorShapeProto >& +QueueResponse::shape() const { + // @@protoc_insertion_point(field_list:tensorflow.eager.QueueResponse.shape) + return _impl_.shape_; +} + +// repeated string device = 3; +inline int QueueResponse::_internal_device_size() const { + return _impl_.device_.size(); +} +inline int QueueResponse::device_size() const { + return _internal_device_size(); +} +inline void QueueResponse::clear_device() { + _impl_.device_.Clear(); +} +inline std::string* QueueResponse::add_device() { + std::string* _s = _internal_add_device(); + // @@protoc_insertion_point(field_add_mutable:tensorflow.eager.QueueResponse.device) + return _s; +} +inline const std::string& QueueResponse::_internal_device(int index) const { + return _impl_.device_.Get(index); +} +inline const std::string& QueueResponse::device(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.eager.QueueResponse.device) + return _internal_device(index); +} +inline std::string* QueueResponse::mutable_device(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.eager.QueueResponse.device) + return _impl_.device_.Mutable(index); +} +inline void QueueResponse::set_device(int index, const std::string& value) { + _impl_.device_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set:tensorflow.eager.QueueResponse.device) +} +inline void QueueResponse::set_device(int index, std::string&& value) { + _impl_.device_.Mutable(index)->assign(std::move(value)); + // @@protoc_insertion_point(field_set:tensorflow.eager.QueueResponse.device) +} +inline void QueueResponse::set_device(int index, const char* value) { + GOOGLE_DCHECK(value != nullptr); + _impl_.device_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set_char:tensorflow.eager.QueueResponse.device) +} +inline void QueueResponse::set_device(int index, const char* value, size_t size) { + _impl_.device_.Mutable(index)->assign( + reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:tensorflow.eager.QueueResponse.device) +} +inline std::string* QueueResponse::_internal_add_device() { + return _impl_.device_.Add(); +} +inline void QueueResponse::add_device(const std::string& value) { + _impl_.device_.Add()->assign(value); + // @@protoc_insertion_point(field_add:tensorflow.eager.QueueResponse.device) +} +inline void QueueResponse::add_device(std::string&& value) { + _impl_.device_.Add(std::move(value)); + // @@protoc_insertion_point(field_add:tensorflow.eager.QueueResponse.device) +} +inline void QueueResponse::add_device(const char* value) { + GOOGLE_DCHECK(value != nullptr); + _impl_.device_.Add()->assign(value); + // @@protoc_insertion_point(field_add_char:tensorflow.eager.QueueResponse.device) +} +inline void QueueResponse::add_device(const char* value, size_t size) { + _impl_.device_.Add()->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_add_pointer:tensorflow.eager.QueueResponse.device) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& +QueueResponse::device() const { + // @@protoc_insertion_point(field_list:tensorflow.eager.QueueResponse.device) + return _impl_.device_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* +QueueResponse::mutable_device() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.eager.QueueResponse.device) + return &_impl_.device_; +} + +// repeated .tensorflow.TensorProto tensor = 2; +inline int QueueResponse::_internal_tensor_size() const { + return _impl_.tensor_.size(); +} +inline int QueueResponse::tensor_size() const { + return _internal_tensor_size(); +} +inline ::tensorflow::TensorProto* QueueResponse::mutable_tensor(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.eager.QueueResponse.tensor) + return _impl_.tensor_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::TensorProto >* +QueueResponse::mutable_tensor() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.eager.QueueResponse.tensor) + return &_impl_.tensor_; +} +inline const ::tensorflow::TensorProto& QueueResponse::_internal_tensor(int index) const { + return _impl_.tensor_.Get(index); +} +inline const ::tensorflow::TensorProto& QueueResponse::tensor(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.eager.QueueResponse.tensor) + return _internal_tensor(index); +} +inline ::tensorflow::TensorProto* QueueResponse::_internal_add_tensor() { + return _impl_.tensor_.Add(); +} +inline ::tensorflow::TensorProto* QueueResponse::add_tensor() { + ::tensorflow::TensorProto* _add = _internal_add_tensor(); + // @@protoc_insertion_point(field_add:tensorflow.eager.QueueResponse.tensor) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::TensorProto >& +QueueResponse::tensor() const { + // @@protoc_insertion_point(field_list:tensorflow.eager.QueueResponse.tensor) + return _impl_.tensor_; +} + +// ------------------------------------------------------------------- + +// CreateContextRequest + +// .tensorflow.ServerDef server_def = 1; +inline bool CreateContextRequest::_internal_has_server_def() const { + return this != internal_default_instance() && _impl_.server_def_ != nullptr; +} +inline bool CreateContextRequest::has_server_def() const { + return _internal_has_server_def(); +} +inline const ::tensorflow::ServerDef& CreateContextRequest::_internal_server_def() const { + const ::tensorflow::ServerDef* p = _impl_.server_def_; + return p != nullptr ? *p : reinterpret_cast( + ::tensorflow::_ServerDef_default_instance_); +} +inline const ::tensorflow::ServerDef& CreateContextRequest::server_def() const { + // @@protoc_insertion_point(field_get:tensorflow.eager.CreateContextRequest.server_def) + return _internal_server_def(); +} +inline void CreateContextRequest::unsafe_arena_set_allocated_server_def( + ::tensorflow::ServerDef* server_def) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.server_def_); + } + _impl_.server_def_ = server_def; + if (server_def) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.eager.CreateContextRequest.server_def) +} +inline ::tensorflow::ServerDef* CreateContextRequest::release_server_def() { + + ::tensorflow::ServerDef* temp = _impl_.server_def_; + _impl_.server_def_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tensorflow::ServerDef* CreateContextRequest::unsafe_arena_release_server_def() { + // @@protoc_insertion_point(field_release:tensorflow.eager.CreateContextRequest.server_def) + + ::tensorflow::ServerDef* temp = _impl_.server_def_; + _impl_.server_def_ = nullptr; + return temp; +} +inline ::tensorflow::ServerDef* CreateContextRequest::_internal_mutable_server_def() { + + if (_impl_.server_def_ == nullptr) { + auto* p = CreateMaybeMessage<::tensorflow::ServerDef>(GetArenaForAllocation()); + _impl_.server_def_ = p; + } + return _impl_.server_def_; +} +inline ::tensorflow::ServerDef* CreateContextRequest::mutable_server_def() { + ::tensorflow::ServerDef* _msg = _internal_mutable_server_def(); + // @@protoc_insertion_point(field_mutable:tensorflow.eager.CreateContextRequest.server_def) + return _msg; +} +inline void CreateContextRequest::set_allocated_server_def(::tensorflow::ServerDef* server_def) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.server_def_); + } + if (server_def) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( + reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(server_def)); + if (message_arena != submessage_arena) { + server_def = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, server_def, submessage_arena); + } + + } else { + + } + _impl_.server_def_ = server_def; + // @@protoc_insertion_point(field_set_allocated:tensorflow.eager.CreateContextRequest.server_def) +} + +// bool async = 2; +inline void CreateContextRequest::clear_async() { + _impl_.async_ = false; +} +inline bool CreateContextRequest::_internal_async() const { + return _impl_.async_; +} +inline bool CreateContextRequest::async() const { + // @@protoc_insertion_point(field_get:tensorflow.eager.CreateContextRequest.async) + return _internal_async(); +} +inline void CreateContextRequest::_internal_set_async(bool value) { + + _impl_.async_ = value; +} +inline void CreateContextRequest::set_async(bool value) { + _internal_set_async(value); + // @@protoc_insertion_point(field_set:tensorflow.eager.CreateContextRequest.async) +} + +// int64 keep_alive_secs = 3; +inline void CreateContextRequest::clear_keep_alive_secs() { + _impl_.keep_alive_secs_ = int64_t{0}; +} +inline int64_t CreateContextRequest::_internal_keep_alive_secs() const { + return _impl_.keep_alive_secs_; +} +inline int64_t CreateContextRequest::keep_alive_secs() const { + // @@protoc_insertion_point(field_get:tensorflow.eager.CreateContextRequest.keep_alive_secs) + return _internal_keep_alive_secs(); +} +inline void CreateContextRequest::_internal_set_keep_alive_secs(int64_t value) { + + _impl_.keep_alive_secs_ = value; +} +inline void CreateContextRequest::set_keep_alive_secs(int64_t value) { + _internal_set_keep_alive_secs(value); + // @@protoc_insertion_point(field_set:tensorflow.eager.CreateContextRequest.keep_alive_secs) +} + +// .tensorflow.VersionDef version_def = 4; +inline bool CreateContextRequest::_internal_has_version_def() const { + return this != internal_default_instance() && _impl_.version_def_ != nullptr; +} +inline bool CreateContextRequest::has_version_def() const { + return _internal_has_version_def(); +} +inline const ::tensorflow::VersionDef& CreateContextRequest::_internal_version_def() const { + const ::tensorflow::VersionDef* p = _impl_.version_def_; + return p != nullptr ? *p : reinterpret_cast( + ::tensorflow::_VersionDef_default_instance_); +} +inline const ::tensorflow::VersionDef& CreateContextRequest::version_def() const { + // @@protoc_insertion_point(field_get:tensorflow.eager.CreateContextRequest.version_def) + return _internal_version_def(); +} +inline void CreateContextRequest::unsafe_arena_set_allocated_version_def( + ::tensorflow::VersionDef* version_def) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.version_def_); + } + _impl_.version_def_ = version_def; + if (version_def) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.eager.CreateContextRequest.version_def) +} +inline ::tensorflow::VersionDef* CreateContextRequest::release_version_def() { + + ::tensorflow::VersionDef* temp = _impl_.version_def_; + _impl_.version_def_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tensorflow::VersionDef* CreateContextRequest::unsafe_arena_release_version_def() { + // @@protoc_insertion_point(field_release:tensorflow.eager.CreateContextRequest.version_def) + + ::tensorflow::VersionDef* temp = _impl_.version_def_; + _impl_.version_def_ = nullptr; + return temp; +} +inline ::tensorflow::VersionDef* CreateContextRequest::_internal_mutable_version_def() { + + if (_impl_.version_def_ == nullptr) { + auto* p = CreateMaybeMessage<::tensorflow::VersionDef>(GetArenaForAllocation()); + _impl_.version_def_ = p; + } + return _impl_.version_def_; +} +inline ::tensorflow::VersionDef* CreateContextRequest::mutable_version_def() { + ::tensorflow::VersionDef* _msg = _internal_mutable_version_def(); + // @@protoc_insertion_point(field_mutable:tensorflow.eager.CreateContextRequest.version_def) + return _msg; +} +inline void CreateContextRequest::set_allocated_version_def(::tensorflow::VersionDef* version_def) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.version_def_); + } + if (version_def) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( + reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(version_def)); + if (message_arena != submessage_arena) { + version_def = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, version_def, submessage_arena); + } + + } else { + + } + _impl_.version_def_ = version_def; + // @@protoc_insertion_point(field_set_allocated:tensorflow.eager.CreateContextRequest.version_def) +} + +// repeated .tensorflow.DeviceAttributes cluster_device_attributes = 6; +inline int CreateContextRequest::_internal_cluster_device_attributes_size() const { + return _impl_.cluster_device_attributes_.size(); +} +inline int CreateContextRequest::cluster_device_attributes_size() const { + return _internal_cluster_device_attributes_size(); +} +inline ::tensorflow::DeviceAttributes* CreateContextRequest::mutable_cluster_device_attributes(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.eager.CreateContextRequest.cluster_device_attributes) + return _impl_.cluster_device_attributes_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::DeviceAttributes >* +CreateContextRequest::mutable_cluster_device_attributes() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.eager.CreateContextRequest.cluster_device_attributes) + return &_impl_.cluster_device_attributes_; +} +inline const ::tensorflow::DeviceAttributes& CreateContextRequest::_internal_cluster_device_attributes(int index) const { + return _impl_.cluster_device_attributes_.Get(index); +} +inline const ::tensorflow::DeviceAttributes& CreateContextRequest::cluster_device_attributes(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.eager.CreateContextRequest.cluster_device_attributes) + return _internal_cluster_device_attributes(index); +} +inline ::tensorflow::DeviceAttributes* CreateContextRequest::_internal_add_cluster_device_attributes() { + return _impl_.cluster_device_attributes_.Add(); +} +inline ::tensorflow::DeviceAttributes* CreateContextRequest::add_cluster_device_attributes() { + ::tensorflow::DeviceAttributes* _add = _internal_add_cluster_device_attributes(); + // @@protoc_insertion_point(field_add:tensorflow.eager.CreateContextRequest.cluster_device_attributes) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::DeviceAttributes >& +CreateContextRequest::cluster_device_attributes() const { + // @@protoc_insertion_point(field_list:tensorflow.eager.CreateContextRequest.cluster_device_attributes) + return _impl_.cluster_device_attributes_; +} + +// fixed64 context_id = 7; +inline void CreateContextRequest::clear_context_id() { + _impl_.context_id_ = uint64_t{0u}; +} +inline uint64_t CreateContextRequest::_internal_context_id() const { + return _impl_.context_id_; +} +inline uint64_t CreateContextRequest::context_id() const { + // @@protoc_insertion_point(field_get:tensorflow.eager.CreateContextRequest.context_id) + return _internal_context_id(); +} +inline void CreateContextRequest::_internal_set_context_id(uint64_t value) { + + _impl_.context_id_ = value; +} +inline void CreateContextRequest::set_context_id(uint64_t value) { + _internal_set_context_id(value); + // @@protoc_insertion_point(field_set:tensorflow.eager.CreateContextRequest.context_id) +} + +// fixed64 context_view_id = 8; +inline void CreateContextRequest::clear_context_view_id() { + _impl_.context_view_id_ = uint64_t{0u}; +} +inline uint64_t CreateContextRequest::_internal_context_view_id() const { + return _impl_.context_view_id_; +} +inline uint64_t CreateContextRequest::context_view_id() const { + // @@protoc_insertion_point(field_get:tensorflow.eager.CreateContextRequest.context_view_id) + return _internal_context_view_id(); +} +inline void CreateContextRequest::_internal_set_context_view_id(uint64_t value) { + + _impl_.context_view_id_ = value; +} +inline void CreateContextRequest::set_context_view_id(uint64_t value) { + _internal_set_context_view_id(value); + // @@protoc_insertion_point(field_set:tensorflow.eager.CreateContextRequest.context_view_id) +} + +// bool lazy_copy_remote_function_inputs = 9; +inline void CreateContextRequest::clear_lazy_copy_remote_function_inputs() { + _impl_.lazy_copy_remote_function_inputs_ = false; +} +inline bool CreateContextRequest::_internal_lazy_copy_remote_function_inputs() const { + return _impl_.lazy_copy_remote_function_inputs_; +} +inline bool CreateContextRequest::lazy_copy_remote_function_inputs() const { + // @@protoc_insertion_point(field_get:tensorflow.eager.CreateContextRequest.lazy_copy_remote_function_inputs) + return _internal_lazy_copy_remote_function_inputs(); +} +inline void CreateContextRequest::_internal_set_lazy_copy_remote_function_inputs(bool value) { + + _impl_.lazy_copy_remote_function_inputs_ = value; +} +inline void CreateContextRequest::set_lazy_copy_remote_function_inputs(bool value) { + _internal_set_lazy_copy_remote_function_inputs(value); + // @@protoc_insertion_point(field_set:tensorflow.eager.CreateContextRequest.lazy_copy_remote_function_inputs) +} + +// ------------------------------------------------------------------- + +// CreateContextResponse + +// repeated .tensorflow.DeviceAttributes device_attributes = 2; +inline int CreateContextResponse::_internal_device_attributes_size() const { + return _impl_.device_attributes_.size(); +} +inline int CreateContextResponse::device_attributes_size() const { + return _internal_device_attributes_size(); +} +inline ::tensorflow::DeviceAttributes* CreateContextResponse::mutable_device_attributes(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.eager.CreateContextResponse.device_attributes) + return _impl_.device_attributes_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::DeviceAttributes >* +CreateContextResponse::mutable_device_attributes() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.eager.CreateContextResponse.device_attributes) + return &_impl_.device_attributes_; +} +inline const ::tensorflow::DeviceAttributes& CreateContextResponse::_internal_device_attributes(int index) const { + return _impl_.device_attributes_.Get(index); +} +inline const ::tensorflow::DeviceAttributes& CreateContextResponse::device_attributes(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.eager.CreateContextResponse.device_attributes) + return _internal_device_attributes(index); +} +inline ::tensorflow::DeviceAttributes* CreateContextResponse::_internal_add_device_attributes() { + return _impl_.device_attributes_.Add(); +} +inline ::tensorflow::DeviceAttributes* CreateContextResponse::add_device_attributes() { + ::tensorflow::DeviceAttributes* _add = _internal_add_device_attributes(); + // @@protoc_insertion_point(field_add:tensorflow.eager.CreateContextResponse.device_attributes) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::DeviceAttributes >& +CreateContextResponse::device_attributes() const { + // @@protoc_insertion_point(field_list:tensorflow.eager.CreateContextResponse.device_attributes) + return _impl_.device_attributes_; +} + +// ------------------------------------------------------------------- + +// UpdateContextRequest + +// .tensorflow.ServerDef server_def = 1; +inline bool UpdateContextRequest::_internal_has_server_def() const { + return this != internal_default_instance() && _impl_.server_def_ != nullptr; +} +inline bool UpdateContextRequest::has_server_def() const { + return _internal_has_server_def(); +} +inline const ::tensorflow::ServerDef& UpdateContextRequest::_internal_server_def() const { + const ::tensorflow::ServerDef* p = _impl_.server_def_; + return p != nullptr ? *p : reinterpret_cast( + ::tensorflow::_ServerDef_default_instance_); +} +inline const ::tensorflow::ServerDef& UpdateContextRequest::server_def() const { + // @@protoc_insertion_point(field_get:tensorflow.eager.UpdateContextRequest.server_def) + return _internal_server_def(); +} +inline void UpdateContextRequest::unsafe_arena_set_allocated_server_def( + ::tensorflow::ServerDef* server_def) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.server_def_); + } + _impl_.server_def_ = server_def; + if (server_def) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.eager.UpdateContextRequest.server_def) +} +inline ::tensorflow::ServerDef* UpdateContextRequest::release_server_def() { + + ::tensorflow::ServerDef* temp = _impl_.server_def_; + _impl_.server_def_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tensorflow::ServerDef* UpdateContextRequest::unsafe_arena_release_server_def() { + // @@protoc_insertion_point(field_release:tensorflow.eager.UpdateContextRequest.server_def) + + ::tensorflow::ServerDef* temp = _impl_.server_def_; + _impl_.server_def_ = nullptr; + return temp; +} +inline ::tensorflow::ServerDef* UpdateContextRequest::_internal_mutable_server_def() { + + if (_impl_.server_def_ == nullptr) { + auto* p = CreateMaybeMessage<::tensorflow::ServerDef>(GetArenaForAllocation()); + _impl_.server_def_ = p; + } + return _impl_.server_def_; +} +inline ::tensorflow::ServerDef* UpdateContextRequest::mutable_server_def() { + ::tensorflow::ServerDef* _msg = _internal_mutable_server_def(); + // @@protoc_insertion_point(field_mutable:tensorflow.eager.UpdateContextRequest.server_def) + return _msg; +} +inline void UpdateContextRequest::set_allocated_server_def(::tensorflow::ServerDef* server_def) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.server_def_); + } + if (server_def) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( + reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(server_def)); + if (message_arena != submessage_arena) { + server_def = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, server_def, submessage_arena); + } + + } else { + + } + _impl_.server_def_ = server_def; + // @@protoc_insertion_point(field_set_allocated:tensorflow.eager.UpdateContextRequest.server_def) +} + +// repeated .tensorflow.DeviceAttributes cluster_device_attributes = 2; +inline int UpdateContextRequest::_internal_cluster_device_attributes_size() const { + return _impl_.cluster_device_attributes_.size(); +} +inline int UpdateContextRequest::cluster_device_attributes_size() const { + return _internal_cluster_device_attributes_size(); +} +inline ::tensorflow::DeviceAttributes* UpdateContextRequest::mutable_cluster_device_attributes(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.eager.UpdateContextRequest.cluster_device_attributes) + return _impl_.cluster_device_attributes_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::DeviceAttributes >* +UpdateContextRequest::mutable_cluster_device_attributes() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.eager.UpdateContextRequest.cluster_device_attributes) + return &_impl_.cluster_device_attributes_; +} +inline const ::tensorflow::DeviceAttributes& UpdateContextRequest::_internal_cluster_device_attributes(int index) const { + return _impl_.cluster_device_attributes_.Get(index); +} +inline const ::tensorflow::DeviceAttributes& UpdateContextRequest::cluster_device_attributes(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.eager.UpdateContextRequest.cluster_device_attributes) + return _internal_cluster_device_attributes(index); +} +inline ::tensorflow::DeviceAttributes* UpdateContextRequest::_internal_add_cluster_device_attributes() { + return _impl_.cluster_device_attributes_.Add(); +} +inline ::tensorflow::DeviceAttributes* UpdateContextRequest::add_cluster_device_attributes() { + ::tensorflow::DeviceAttributes* _add = _internal_add_cluster_device_attributes(); + // @@protoc_insertion_point(field_add:tensorflow.eager.UpdateContextRequest.cluster_device_attributes) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::DeviceAttributes >& +UpdateContextRequest::cluster_device_attributes() const { + // @@protoc_insertion_point(field_list:tensorflow.eager.UpdateContextRequest.cluster_device_attributes) + return _impl_.cluster_device_attributes_; +} + +// fixed64 context_id = 3; +inline void UpdateContextRequest::clear_context_id() { + _impl_.context_id_ = uint64_t{0u}; +} +inline uint64_t UpdateContextRequest::_internal_context_id() const { + return _impl_.context_id_; +} +inline uint64_t UpdateContextRequest::context_id() const { + // @@protoc_insertion_point(field_get:tensorflow.eager.UpdateContextRequest.context_id) + return _internal_context_id(); +} +inline void UpdateContextRequest::_internal_set_context_id(uint64_t value) { + + _impl_.context_id_ = value; +} +inline void UpdateContextRequest::set_context_id(uint64_t value) { + _internal_set_context_id(value); + // @@protoc_insertion_point(field_set:tensorflow.eager.UpdateContextRequest.context_id) +} + +// fixed64 context_view_id = 4; +inline void UpdateContextRequest::clear_context_view_id() { + _impl_.context_view_id_ = uint64_t{0u}; +} +inline uint64_t UpdateContextRequest::_internal_context_view_id() const { + return _impl_.context_view_id_; +} +inline uint64_t UpdateContextRequest::context_view_id() const { + // @@protoc_insertion_point(field_get:tensorflow.eager.UpdateContextRequest.context_view_id) + return _internal_context_view_id(); +} +inline void UpdateContextRequest::_internal_set_context_view_id(uint64_t value) { + + _impl_.context_view_id_ = value; +} +inline void UpdateContextRequest::set_context_view_id(uint64_t value) { + _internal_set_context_view_id(value); + // @@protoc_insertion_point(field_set:tensorflow.eager.UpdateContextRequest.context_view_id) +} + +// ------------------------------------------------------------------- + +// UpdateContextResponse + +// repeated .tensorflow.DeviceAttributes device_attributes = 1; +inline int UpdateContextResponse::_internal_device_attributes_size() const { + return _impl_.device_attributes_.size(); +} +inline int UpdateContextResponse::device_attributes_size() const { + return _internal_device_attributes_size(); +} +inline ::tensorflow::DeviceAttributes* UpdateContextResponse::mutable_device_attributes(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.eager.UpdateContextResponse.device_attributes) + return _impl_.device_attributes_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::DeviceAttributes >* +UpdateContextResponse::mutable_device_attributes() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.eager.UpdateContextResponse.device_attributes) + return &_impl_.device_attributes_; +} +inline const ::tensorflow::DeviceAttributes& UpdateContextResponse::_internal_device_attributes(int index) const { + return _impl_.device_attributes_.Get(index); +} +inline const ::tensorflow::DeviceAttributes& UpdateContextResponse::device_attributes(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.eager.UpdateContextResponse.device_attributes) + return _internal_device_attributes(index); +} +inline ::tensorflow::DeviceAttributes* UpdateContextResponse::_internal_add_device_attributes() { + return _impl_.device_attributes_.Add(); +} +inline ::tensorflow::DeviceAttributes* UpdateContextResponse::add_device_attributes() { + ::tensorflow::DeviceAttributes* _add = _internal_add_device_attributes(); + // @@protoc_insertion_point(field_add:tensorflow.eager.UpdateContextResponse.device_attributes) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::DeviceAttributes >& +UpdateContextResponse::device_attributes() const { + // @@protoc_insertion_point(field_list:tensorflow.eager.UpdateContextResponse.device_attributes) + return _impl_.device_attributes_; +} + +// ------------------------------------------------------------------- + +// EnqueueRequest + +// fixed64 context_id = 1; +inline void EnqueueRequest::clear_context_id() { + _impl_.context_id_ = uint64_t{0u}; +} +inline uint64_t EnqueueRequest::_internal_context_id() const { + return _impl_.context_id_; +} +inline uint64_t EnqueueRequest::context_id() const { + // @@protoc_insertion_point(field_get:tensorflow.eager.EnqueueRequest.context_id) + return _internal_context_id(); +} +inline void EnqueueRequest::_internal_set_context_id(uint64_t value) { + + _impl_.context_id_ = value; +} +inline void EnqueueRequest::set_context_id(uint64_t value) { + _internal_set_context_id(value); + // @@protoc_insertion_point(field_set:tensorflow.eager.EnqueueRequest.context_id) +} + +// repeated .tensorflow.eager.QueueItem queue = 3; +inline int EnqueueRequest::_internal_queue_size() const { + return _impl_.queue_.size(); +} +inline int EnqueueRequest::queue_size() const { + return _internal_queue_size(); +} +inline void EnqueueRequest::clear_queue() { + _impl_.queue_.Clear(); +} +inline ::tensorflow::eager::QueueItem* EnqueueRequest::mutable_queue(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.eager.EnqueueRequest.queue) + return _impl_.queue_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::eager::QueueItem >* +EnqueueRequest::mutable_queue() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.eager.EnqueueRequest.queue) + return &_impl_.queue_; +} +inline const ::tensorflow::eager::QueueItem& EnqueueRequest::_internal_queue(int index) const { + return _impl_.queue_.Get(index); +} +inline const ::tensorflow::eager::QueueItem& EnqueueRequest::queue(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.eager.EnqueueRequest.queue) + return _internal_queue(index); +} +inline ::tensorflow::eager::QueueItem* EnqueueRequest::_internal_add_queue() { + return _impl_.queue_.Add(); +} +inline ::tensorflow::eager::QueueItem* EnqueueRequest::add_queue() { + ::tensorflow::eager::QueueItem* _add = _internal_add_queue(); + // @@protoc_insertion_point(field_add:tensorflow.eager.EnqueueRequest.queue) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::eager::QueueItem >& +EnqueueRequest::queue() const { + // @@protoc_insertion_point(field_list:tensorflow.eager.EnqueueRequest.queue) + return _impl_.queue_; +} + +// ------------------------------------------------------------------- + +// EnqueueResponse + +// repeated .tensorflow.eager.QueueResponse queue_response = 1; +inline int EnqueueResponse::_internal_queue_response_size() const { + return _impl_.queue_response_.size(); +} +inline int EnqueueResponse::queue_response_size() const { + return _internal_queue_response_size(); +} +inline void EnqueueResponse::clear_queue_response() { + _impl_.queue_response_.Clear(); +} +inline ::tensorflow::eager::QueueResponse* EnqueueResponse::mutable_queue_response(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.eager.EnqueueResponse.queue_response) + return _impl_.queue_response_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::eager::QueueResponse >* +EnqueueResponse::mutable_queue_response() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.eager.EnqueueResponse.queue_response) + return &_impl_.queue_response_; +} +inline const ::tensorflow::eager::QueueResponse& EnqueueResponse::_internal_queue_response(int index) const { + return _impl_.queue_response_.Get(index); +} +inline const ::tensorflow::eager::QueueResponse& EnqueueResponse::queue_response(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.eager.EnqueueResponse.queue_response) + return _internal_queue_response(index); +} +inline ::tensorflow::eager::QueueResponse* EnqueueResponse::_internal_add_queue_response() { + return _impl_.queue_response_.Add(); +} +inline ::tensorflow::eager::QueueResponse* EnqueueResponse::add_queue_response() { + ::tensorflow::eager::QueueResponse* _add = _internal_add_queue_response(); + // @@protoc_insertion_point(field_add:tensorflow.eager.EnqueueResponse.queue_response) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::eager::QueueResponse >& +EnqueueResponse::queue_response() const { + // @@protoc_insertion_point(field_list:tensorflow.eager.EnqueueResponse.queue_response) + return _impl_.queue_response_; +} + +// ------------------------------------------------------------------- + +// WaitQueueDoneRequest + +// fixed64 context_id = 1; +inline void WaitQueueDoneRequest::clear_context_id() { + _impl_.context_id_ = uint64_t{0u}; +} +inline uint64_t WaitQueueDoneRequest::_internal_context_id() const { + return _impl_.context_id_; +} +inline uint64_t WaitQueueDoneRequest::context_id() const { + // @@protoc_insertion_point(field_get:tensorflow.eager.WaitQueueDoneRequest.context_id) + return _internal_context_id(); +} +inline void WaitQueueDoneRequest::_internal_set_context_id(uint64_t value) { + + _impl_.context_id_ = value; +} +inline void WaitQueueDoneRequest::set_context_id(uint64_t value) { + _internal_set_context_id(value); + // @@protoc_insertion_point(field_set:tensorflow.eager.WaitQueueDoneRequest.context_id) +} + +// repeated int64 op_id = 2; +inline int WaitQueueDoneRequest::_internal_op_id_size() const { + return _impl_.op_id_.size(); +} +inline int WaitQueueDoneRequest::op_id_size() const { + return _internal_op_id_size(); +} +inline void WaitQueueDoneRequest::clear_op_id() { + _impl_.op_id_.Clear(); +} +inline int64_t WaitQueueDoneRequest::_internal_op_id(int index) const { + return _impl_.op_id_.Get(index); +} +inline int64_t WaitQueueDoneRequest::op_id(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.eager.WaitQueueDoneRequest.op_id) + return _internal_op_id(index); +} +inline void WaitQueueDoneRequest::set_op_id(int index, int64_t value) { + _impl_.op_id_.Set(index, value); + // @@protoc_insertion_point(field_set:tensorflow.eager.WaitQueueDoneRequest.op_id) +} +inline void WaitQueueDoneRequest::_internal_add_op_id(int64_t value) { + _impl_.op_id_.Add(value); +} +inline void WaitQueueDoneRequest::add_op_id(int64_t value) { + _internal_add_op_id(value); + // @@protoc_insertion_point(field_add:tensorflow.eager.WaitQueueDoneRequest.op_id) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >& +WaitQueueDoneRequest::_internal_op_id() const { + return _impl_.op_id_; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >& +WaitQueueDoneRequest::op_id() const { + // @@protoc_insertion_point(field_list:tensorflow.eager.WaitQueueDoneRequest.op_id) + return _internal_op_id(); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >* +WaitQueueDoneRequest::_internal_mutable_op_id() { + return &_impl_.op_id_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >* +WaitQueueDoneRequest::mutable_op_id() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.eager.WaitQueueDoneRequest.op_id) + return _internal_mutable_op_id(); +} + +// ------------------------------------------------------------------- + +// WaitQueueDoneResponse + +// ------------------------------------------------------------------- + +// RunComponentFunctionRequest + +// fixed64 context_id = 1; +inline void RunComponentFunctionRequest::clear_context_id() { + _impl_.context_id_ = uint64_t{0u}; +} +inline uint64_t RunComponentFunctionRequest::_internal_context_id() const { + return _impl_.context_id_; +} +inline uint64_t RunComponentFunctionRequest::context_id() const { + // @@protoc_insertion_point(field_get:tensorflow.eager.RunComponentFunctionRequest.context_id) + return _internal_context_id(); +} +inline void RunComponentFunctionRequest::_internal_set_context_id(uint64_t value) { + + _impl_.context_id_ = value; +} +inline void RunComponentFunctionRequest::set_context_id(uint64_t value) { + _internal_set_context_id(value); + // @@protoc_insertion_point(field_set:tensorflow.eager.RunComponentFunctionRequest.context_id) +} + +// .tensorflow.eager.Operation operation = 2; +inline bool RunComponentFunctionRequest::_internal_has_operation() const { + return this != internal_default_instance() && _impl_.operation_ != nullptr; +} +inline bool RunComponentFunctionRequest::has_operation() const { + return _internal_has_operation(); +} +inline void RunComponentFunctionRequest::clear_operation() { + if (GetArenaForAllocation() == nullptr && _impl_.operation_ != nullptr) { + delete _impl_.operation_; + } + _impl_.operation_ = nullptr; +} +inline const ::tensorflow::eager::Operation& RunComponentFunctionRequest::_internal_operation() const { + const ::tensorflow::eager::Operation* p = _impl_.operation_; + return p != nullptr ? *p : reinterpret_cast( + ::tensorflow::eager::_Operation_default_instance_); +} +inline const ::tensorflow::eager::Operation& RunComponentFunctionRequest::operation() const { + // @@protoc_insertion_point(field_get:tensorflow.eager.RunComponentFunctionRequest.operation) + return _internal_operation(); +} +inline void RunComponentFunctionRequest::unsafe_arena_set_allocated_operation( + ::tensorflow::eager::Operation* operation) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.operation_); + } + _impl_.operation_ = operation; + if (operation) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.eager.RunComponentFunctionRequest.operation) +} +inline ::tensorflow::eager::Operation* RunComponentFunctionRequest::release_operation() { + + ::tensorflow::eager::Operation* temp = _impl_.operation_; + _impl_.operation_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tensorflow::eager::Operation* RunComponentFunctionRequest::unsafe_arena_release_operation() { + // @@protoc_insertion_point(field_release:tensorflow.eager.RunComponentFunctionRequest.operation) + + ::tensorflow::eager::Operation* temp = _impl_.operation_; + _impl_.operation_ = nullptr; + return temp; +} +inline ::tensorflow::eager::Operation* RunComponentFunctionRequest::_internal_mutable_operation() { + + if (_impl_.operation_ == nullptr) { + auto* p = CreateMaybeMessage<::tensorflow::eager::Operation>(GetArenaForAllocation()); + _impl_.operation_ = p; + } + return _impl_.operation_; +} +inline ::tensorflow::eager::Operation* RunComponentFunctionRequest::mutable_operation() { + ::tensorflow::eager::Operation* _msg = _internal_mutable_operation(); + // @@protoc_insertion_point(field_mutable:tensorflow.eager.RunComponentFunctionRequest.operation) + return _msg; +} +inline void RunComponentFunctionRequest::set_allocated_operation(::tensorflow::eager::Operation* operation) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete _impl_.operation_; + } + if (operation) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(operation); + if (message_arena != submessage_arena) { + operation = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, operation, submessage_arena); + } + + } else { + + } + _impl_.operation_ = operation; + // @@protoc_insertion_point(field_set_allocated:tensorflow.eager.RunComponentFunctionRequest.operation) +} + +// repeated int32 output_num = 3; +inline int RunComponentFunctionRequest::_internal_output_num_size() const { + return _impl_.output_num_.size(); +} +inline int RunComponentFunctionRequest::output_num_size() const { + return _internal_output_num_size(); +} +inline void RunComponentFunctionRequest::clear_output_num() { + _impl_.output_num_.Clear(); +} +inline int32_t RunComponentFunctionRequest::_internal_output_num(int index) const { + return _impl_.output_num_.Get(index); +} +inline int32_t RunComponentFunctionRequest::output_num(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.eager.RunComponentFunctionRequest.output_num) + return _internal_output_num(index); +} +inline void RunComponentFunctionRequest::set_output_num(int index, int32_t value) { + _impl_.output_num_.Set(index, value); + // @@protoc_insertion_point(field_set:tensorflow.eager.RunComponentFunctionRequest.output_num) +} +inline void RunComponentFunctionRequest::_internal_add_output_num(int32_t value) { + _impl_.output_num_.Add(value); +} +inline void RunComponentFunctionRequest::add_output_num(int32_t value) { + _internal_add_output_num(value); + // @@protoc_insertion_point(field_add:tensorflow.eager.RunComponentFunctionRequest.output_num) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >& +RunComponentFunctionRequest::_internal_output_num() const { + return _impl_.output_num_; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >& +RunComponentFunctionRequest::output_num() const { + // @@protoc_insertion_point(field_list:tensorflow.eager.RunComponentFunctionRequest.output_num) + return _internal_output_num(); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >* +RunComponentFunctionRequest::_internal_mutable_output_num() { + return &_impl_.output_num_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >* +RunComponentFunctionRequest::mutable_output_num() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.eager.RunComponentFunctionRequest.output_num) + return _internal_mutable_output_num(); +} + +// ------------------------------------------------------------------- + +// RunComponentFunctionResponse + +// repeated .tensorflow.TensorShapeProto shape = 1; +inline int RunComponentFunctionResponse::_internal_shape_size() const { + return _impl_.shape_.size(); +} +inline int RunComponentFunctionResponse::shape_size() const { + return _internal_shape_size(); +} +inline ::tensorflow::TensorShapeProto* RunComponentFunctionResponse::mutable_shape(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.eager.RunComponentFunctionResponse.shape) + return _impl_.shape_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::TensorShapeProto >* +RunComponentFunctionResponse::mutable_shape() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.eager.RunComponentFunctionResponse.shape) + return &_impl_.shape_; +} +inline const ::tensorflow::TensorShapeProto& RunComponentFunctionResponse::_internal_shape(int index) const { + return _impl_.shape_.Get(index); +} +inline const ::tensorflow::TensorShapeProto& RunComponentFunctionResponse::shape(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.eager.RunComponentFunctionResponse.shape) + return _internal_shape(index); +} +inline ::tensorflow::TensorShapeProto* RunComponentFunctionResponse::_internal_add_shape() { + return _impl_.shape_.Add(); +} +inline ::tensorflow::TensorShapeProto* RunComponentFunctionResponse::add_shape() { + ::tensorflow::TensorShapeProto* _add = _internal_add_shape(); + // @@protoc_insertion_point(field_add:tensorflow.eager.RunComponentFunctionResponse.shape) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::TensorShapeProto >& +RunComponentFunctionResponse::shape() const { + // @@protoc_insertion_point(field_list:tensorflow.eager.RunComponentFunctionResponse.shape) + return _impl_.shape_; +} + +// repeated .tensorflow.TensorProto tensor = 2; +inline int RunComponentFunctionResponse::_internal_tensor_size() const { + return _impl_.tensor_.size(); +} +inline int RunComponentFunctionResponse::tensor_size() const { + return _internal_tensor_size(); +} +inline ::tensorflow::TensorProto* RunComponentFunctionResponse::mutable_tensor(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.eager.RunComponentFunctionResponse.tensor) + return _impl_.tensor_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::TensorProto >* +RunComponentFunctionResponse::mutable_tensor() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.eager.RunComponentFunctionResponse.tensor) + return &_impl_.tensor_; +} +inline const ::tensorflow::TensorProto& RunComponentFunctionResponse::_internal_tensor(int index) const { + return _impl_.tensor_.Get(index); +} +inline const ::tensorflow::TensorProto& RunComponentFunctionResponse::tensor(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.eager.RunComponentFunctionResponse.tensor) + return _internal_tensor(index); +} +inline ::tensorflow::TensorProto* RunComponentFunctionResponse::_internal_add_tensor() { + return _impl_.tensor_.Add(); +} +inline ::tensorflow::TensorProto* RunComponentFunctionResponse::add_tensor() { + ::tensorflow::TensorProto* _add = _internal_add_tensor(); + // @@protoc_insertion_point(field_add:tensorflow.eager.RunComponentFunctionResponse.tensor) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::TensorProto >& +RunComponentFunctionResponse::tensor() const { + // @@protoc_insertion_point(field_list:tensorflow.eager.RunComponentFunctionResponse.tensor) + return _impl_.tensor_; +} + +// ------------------------------------------------------------------- + +// KeepAliveRequest + +// fixed64 context_id = 1; +inline void KeepAliveRequest::clear_context_id() { + _impl_.context_id_ = uint64_t{0u}; +} +inline uint64_t KeepAliveRequest::_internal_context_id() const { + return _impl_.context_id_; +} +inline uint64_t KeepAliveRequest::context_id() const { + // @@protoc_insertion_point(field_get:tensorflow.eager.KeepAliveRequest.context_id) + return _internal_context_id(); +} +inline void KeepAliveRequest::_internal_set_context_id(uint64_t value) { + + _impl_.context_id_ = value; +} +inline void KeepAliveRequest::set_context_id(uint64_t value) { + _internal_set_context_id(value); + // @@protoc_insertion_point(field_set:tensorflow.eager.KeepAliveRequest.context_id) +} + +// ------------------------------------------------------------------- + +// KeepAliveResponse + +// fixed64 context_view_id = 1; +inline void KeepAliveResponse::clear_context_view_id() { + _impl_.context_view_id_ = uint64_t{0u}; +} +inline uint64_t KeepAliveResponse::_internal_context_view_id() const { + return _impl_.context_view_id_; +} +inline uint64_t KeepAliveResponse::context_view_id() const { + // @@protoc_insertion_point(field_get:tensorflow.eager.KeepAliveResponse.context_view_id) + return _internal_context_view_id(); +} +inline void KeepAliveResponse::_internal_set_context_view_id(uint64_t value) { + + _impl_.context_view_id_ = value; +} +inline void KeepAliveResponse::set_context_view_id(uint64_t value) { + _internal_set_context_view_id(value); + // @@protoc_insertion_point(field_set:tensorflow.eager.KeepAliveResponse.context_view_id) +} + +// ------------------------------------------------------------------- + +// CloseContextRequest + +// fixed64 context_id = 1; +inline void CloseContextRequest::clear_context_id() { + _impl_.context_id_ = uint64_t{0u}; +} +inline uint64_t CloseContextRequest::_internal_context_id() const { + return _impl_.context_id_; +} +inline uint64_t CloseContextRequest::context_id() const { + // @@protoc_insertion_point(field_get:tensorflow.eager.CloseContextRequest.context_id) + return _internal_context_id(); +} +inline void CloseContextRequest::_internal_set_context_id(uint64_t value) { + + _impl_.context_id_ = value; +} +inline void CloseContextRequest::set_context_id(uint64_t value) { + _internal_set_context_id(value); + // @@protoc_insertion_point(field_set:tensorflow.eager.CloseContextRequest.context_id) +} + +// fixed64 context_view_id = 2; +inline void CloseContextRequest::clear_context_view_id() { + _impl_.context_view_id_ = uint64_t{0u}; +} +inline uint64_t CloseContextRequest::_internal_context_view_id() const { + return _impl_.context_view_id_; +} +inline uint64_t CloseContextRequest::context_view_id() const { + // @@protoc_insertion_point(field_get:tensorflow.eager.CloseContextRequest.context_view_id) + return _internal_context_view_id(); +} +inline void CloseContextRequest::_internal_set_context_view_id(uint64_t value) { + + _impl_.context_view_id_ = value; +} +inline void CloseContextRequest::set_context_view_id(uint64_t value) { + _internal_set_context_view_id(value); + // @@protoc_insertion_point(field_set:tensorflow.eager.CloseContextRequest.context_view_id) +} + +// ------------------------------------------------------------------- + +// CloseContextResponse + +// ------------------------------------------------------------------- + +// RegisterFunctionOp + +// .tensorflow.FunctionDef function_def = 1; +inline bool RegisterFunctionOp::_internal_has_function_def() const { + return this != internal_default_instance() && _impl_.function_def_ != nullptr; +} +inline bool RegisterFunctionOp::has_function_def() const { + return _internal_has_function_def(); +} +inline const ::tensorflow::FunctionDef& RegisterFunctionOp::_internal_function_def() const { + const ::tensorflow::FunctionDef* p = _impl_.function_def_; + return p != nullptr ? *p : reinterpret_cast( + ::tensorflow::_FunctionDef_default_instance_); +} +inline const ::tensorflow::FunctionDef& RegisterFunctionOp::function_def() const { + // @@protoc_insertion_point(field_get:tensorflow.eager.RegisterFunctionOp.function_def) + return _internal_function_def(); +} +inline void RegisterFunctionOp::unsafe_arena_set_allocated_function_def( + ::tensorflow::FunctionDef* function_def) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.function_def_); + } + _impl_.function_def_ = function_def; + if (function_def) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.eager.RegisterFunctionOp.function_def) +} +inline ::tensorflow::FunctionDef* RegisterFunctionOp::release_function_def() { + + ::tensorflow::FunctionDef* temp = _impl_.function_def_; + _impl_.function_def_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tensorflow::FunctionDef* RegisterFunctionOp::unsafe_arena_release_function_def() { + // @@protoc_insertion_point(field_release:tensorflow.eager.RegisterFunctionOp.function_def) + + ::tensorflow::FunctionDef* temp = _impl_.function_def_; + _impl_.function_def_ = nullptr; + return temp; +} +inline ::tensorflow::FunctionDef* RegisterFunctionOp::_internal_mutable_function_def() { + + if (_impl_.function_def_ == nullptr) { + auto* p = CreateMaybeMessage<::tensorflow::FunctionDef>(GetArenaForAllocation()); + _impl_.function_def_ = p; + } + return _impl_.function_def_; +} +inline ::tensorflow::FunctionDef* RegisterFunctionOp::mutable_function_def() { + ::tensorflow::FunctionDef* _msg = _internal_mutable_function_def(); + // @@protoc_insertion_point(field_mutable:tensorflow.eager.RegisterFunctionOp.function_def) + return _msg; +} +inline void RegisterFunctionOp::set_allocated_function_def(::tensorflow::FunctionDef* function_def) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.function_def_); + } + if (function_def) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( + reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(function_def)); + if (message_arena != submessage_arena) { + function_def = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, function_def, submessage_arena); + } + + } else { + + } + _impl_.function_def_ = function_def; + // @@protoc_insertion_point(field_set_allocated:tensorflow.eager.RegisterFunctionOp.function_def) +} + +// bool is_component_function = 2; +inline void RegisterFunctionOp::clear_is_component_function() { + _impl_.is_component_function_ = false; +} +inline bool RegisterFunctionOp::_internal_is_component_function() const { + return _impl_.is_component_function_; +} +inline bool RegisterFunctionOp::is_component_function() const { + // @@protoc_insertion_point(field_get:tensorflow.eager.RegisterFunctionOp.is_component_function) + return _internal_is_component_function(); +} +inline void RegisterFunctionOp::_internal_set_is_component_function(bool value) { + + _impl_.is_component_function_ = value; +} +inline void RegisterFunctionOp::set_is_component_function(bool value) { + _internal_set_is_component_function(value); + // @@protoc_insertion_point(field_set:tensorflow.eager.RegisterFunctionOp.is_component_function) +} + +// .tensorflow.FunctionDefLibrary library = 3; +inline bool RegisterFunctionOp::_internal_has_library() const { + return this != internal_default_instance() && _impl_.library_ != nullptr; +} +inline bool RegisterFunctionOp::has_library() const { + return _internal_has_library(); +} +inline const ::tensorflow::FunctionDefLibrary& RegisterFunctionOp::_internal_library() const { + const ::tensorflow::FunctionDefLibrary* p = _impl_.library_; + return p != nullptr ? *p : reinterpret_cast( + ::tensorflow::_FunctionDefLibrary_default_instance_); +} +inline const ::tensorflow::FunctionDefLibrary& RegisterFunctionOp::library() const { + // @@protoc_insertion_point(field_get:tensorflow.eager.RegisterFunctionOp.library) + return _internal_library(); +} +inline void RegisterFunctionOp::unsafe_arena_set_allocated_library( + ::tensorflow::FunctionDefLibrary* library) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.library_); + } + _impl_.library_ = library; + if (library) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.eager.RegisterFunctionOp.library) +} +inline ::tensorflow::FunctionDefLibrary* RegisterFunctionOp::release_library() { + + ::tensorflow::FunctionDefLibrary* temp = _impl_.library_; + _impl_.library_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tensorflow::FunctionDefLibrary* RegisterFunctionOp::unsafe_arena_release_library() { + // @@protoc_insertion_point(field_release:tensorflow.eager.RegisterFunctionOp.library) + + ::tensorflow::FunctionDefLibrary* temp = _impl_.library_; + _impl_.library_ = nullptr; + return temp; +} +inline ::tensorflow::FunctionDefLibrary* RegisterFunctionOp::_internal_mutable_library() { + + if (_impl_.library_ == nullptr) { + auto* p = CreateMaybeMessage<::tensorflow::FunctionDefLibrary>(GetArenaForAllocation()); + _impl_.library_ = p; + } + return _impl_.library_; +} +inline ::tensorflow::FunctionDefLibrary* RegisterFunctionOp::mutable_library() { + ::tensorflow::FunctionDefLibrary* _msg = _internal_mutable_library(); + // @@protoc_insertion_point(field_mutable:tensorflow.eager.RegisterFunctionOp.library) + return _msg; +} +inline void RegisterFunctionOp::set_allocated_library(::tensorflow::FunctionDefLibrary* library) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.library_); + } + if (library) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( + reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(library)); + if (message_arena != submessage_arena) { + library = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, library, submessage_arena); + } + + } else { + + } + _impl_.library_ = library; + // @@protoc_insertion_point(field_set_allocated:tensorflow.eager.RegisterFunctionOp.library) +} + +// ------------------------------------------------------------------- + +// RemoveFunctionOp + +// string function_name = 1; +inline void RemoveFunctionOp::clear_function_name() { + _impl_.function_name_.ClearToEmpty(); +} +inline const std::string& RemoveFunctionOp::function_name() const { + // @@protoc_insertion_point(field_get:tensorflow.eager.RemoveFunctionOp.function_name) + return _internal_function_name(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void RemoveFunctionOp::set_function_name(ArgT0&& arg0, ArgT... args) { + + _impl_.function_name_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.eager.RemoveFunctionOp.function_name) +} +inline std::string* RemoveFunctionOp::mutable_function_name() { + std::string* _s = _internal_mutable_function_name(); + // @@protoc_insertion_point(field_mutable:tensorflow.eager.RemoveFunctionOp.function_name) + return _s; +} +inline const std::string& RemoveFunctionOp::_internal_function_name() const { + return _impl_.function_name_.Get(); +} +inline void RemoveFunctionOp::_internal_set_function_name(const std::string& value) { + + _impl_.function_name_.Set(value, GetArenaForAllocation()); +} +inline std::string* RemoveFunctionOp::_internal_mutable_function_name() { + + return _impl_.function_name_.Mutable(GetArenaForAllocation()); +} +inline std::string* RemoveFunctionOp::release_function_name() { + // @@protoc_insertion_point(field_release:tensorflow.eager.RemoveFunctionOp.function_name) + return _impl_.function_name_.Release(); +} +inline void RemoveFunctionOp::set_allocated_function_name(std::string* function_name) { + if (function_name != nullptr) { + + } else { + + } + _impl_.function_name_.SetAllocated(function_name, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.function_name_.IsDefault()) { + _impl_.function_name_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.eager.RemoveFunctionOp.function_name) +} + +// ------------------------------------------------------------------- + +// CleanupFunctionOp + +// int64 step_id = 1; +inline void CleanupFunctionOp::clear_step_id() { + _impl_.step_id_ = int64_t{0}; +} +inline int64_t CleanupFunctionOp::_internal_step_id() const { + return _impl_.step_id_; +} +inline int64_t CleanupFunctionOp::step_id() const { + // @@protoc_insertion_point(field_get:tensorflow.eager.CleanupFunctionOp.step_id) + return _internal_step_id(); +} +inline void CleanupFunctionOp::_internal_set_step_id(int64_t value) { + + _impl_.step_id_ = value; +} +inline void CleanupFunctionOp::set_step_id(int64_t value) { + _internal_set_step_id(value); + // @@protoc_insertion_point(field_set:tensorflow.eager.CleanupFunctionOp.step_id) +} + +// ------------------------------------------------------------------- + +// SyncRemoteExecutorForStream + +// ------------------------------------------------------------------- + +// SendTensorOp + +// int64 op_id = 1; +inline void SendTensorOp::clear_op_id() { + _impl_.op_id_ = int64_t{0}; +} +inline int64_t SendTensorOp::_internal_op_id() const { + return _impl_.op_id_; +} +inline int64_t SendTensorOp::op_id() const { + // @@protoc_insertion_point(field_get:tensorflow.eager.SendTensorOp.op_id) + return _internal_op_id(); +} +inline void SendTensorOp::_internal_set_op_id(int64_t value) { + + _impl_.op_id_ = value; +} +inline void SendTensorOp::set_op_id(int64_t value) { + _internal_set_op_id(value); + // @@protoc_insertion_point(field_set:tensorflow.eager.SendTensorOp.op_id) +} + +// repeated .tensorflow.TensorProto tensors = 2; +inline int SendTensorOp::_internal_tensors_size() const { + return _impl_.tensors_.size(); +} +inline int SendTensorOp::tensors_size() const { + return _internal_tensors_size(); +} +inline ::tensorflow::TensorProto* SendTensorOp::mutable_tensors(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.eager.SendTensorOp.tensors) + return _impl_.tensors_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::TensorProto >* +SendTensorOp::mutable_tensors() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.eager.SendTensorOp.tensors) + return &_impl_.tensors_; +} +inline const ::tensorflow::TensorProto& SendTensorOp::_internal_tensors(int index) const { + return _impl_.tensors_.Get(index); +} +inline const ::tensorflow::TensorProto& SendTensorOp::tensors(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.eager.SendTensorOp.tensors) + return _internal_tensors(index); +} +inline ::tensorflow::TensorProto* SendTensorOp::_internal_add_tensors() { + return _impl_.tensors_.Add(); +} +inline ::tensorflow::TensorProto* SendTensorOp::add_tensors() { + ::tensorflow::TensorProto* _add = _internal_add_tensors(); + // @@protoc_insertion_point(field_add:tensorflow.eager.SendTensorOp.tensors) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::TensorProto >& +SendTensorOp::tensors() const { + // @@protoc_insertion_point(field_list:tensorflow.eager.SendTensorOp.tensors) + return _impl_.tensors_; +} + +// string device_name = 3; +inline void SendTensorOp::clear_device_name() { + _impl_.device_name_.ClearToEmpty(); +} +inline const std::string& SendTensorOp::device_name() const { + // @@protoc_insertion_point(field_get:tensorflow.eager.SendTensorOp.device_name) + return _internal_device_name(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void SendTensorOp::set_device_name(ArgT0&& arg0, ArgT... args) { + + _impl_.device_name_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.eager.SendTensorOp.device_name) +} +inline std::string* SendTensorOp::mutable_device_name() { + std::string* _s = _internal_mutable_device_name(); + // @@protoc_insertion_point(field_mutable:tensorflow.eager.SendTensorOp.device_name) + return _s; +} +inline const std::string& SendTensorOp::_internal_device_name() const { + return _impl_.device_name_.Get(); +} +inline void SendTensorOp::_internal_set_device_name(const std::string& value) { + + _impl_.device_name_.Set(value, GetArenaForAllocation()); +} +inline std::string* SendTensorOp::_internal_mutable_device_name() { + + return _impl_.device_name_.Mutable(GetArenaForAllocation()); +} +inline std::string* SendTensorOp::release_device_name() { + // @@protoc_insertion_point(field_release:tensorflow.eager.SendTensorOp.device_name) + return _impl_.device_name_.Release(); +} +inline void SendTensorOp::set_allocated_device_name(std::string* device_name) { + if (device_name != nullptr) { + + } else { + + } + _impl_.device_name_.SetAllocated(device_name, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.device_name_.IsDefault()) { + _impl_.device_name_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.eager.SendTensorOp.device_name) +} + +// ------------------------------------------------------------------- + +// SendPackedHandleOp_LocalTensorHandle + +// .tensorflow.TensorProto tensor = 1; +inline bool SendPackedHandleOp_LocalTensorHandle::_internal_has_tensor() const { + return this != internal_default_instance() && _impl_.tensor_ != nullptr; +} +inline bool SendPackedHandleOp_LocalTensorHandle::has_tensor() const { + return _internal_has_tensor(); +} +inline const ::tensorflow::TensorProto& SendPackedHandleOp_LocalTensorHandle::_internal_tensor() const { + const ::tensorflow::TensorProto* p = _impl_.tensor_; + return p != nullptr ? *p : reinterpret_cast( + ::tensorflow::_TensorProto_default_instance_); +} +inline const ::tensorflow::TensorProto& SendPackedHandleOp_LocalTensorHandle::tensor() const { + // @@protoc_insertion_point(field_get:tensorflow.eager.SendPackedHandleOp.LocalTensorHandle.tensor) + return _internal_tensor(); +} +inline void SendPackedHandleOp_LocalTensorHandle::unsafe_arena_set_allocated_tensor( + ::tensorflow::TensorProto* tensor) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.tensor_); + } + _impl_.tensor_ = tensor; + if (tensor) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.eager.SendPackedHandleOp.LocalTensorHandle.tensor) +} +inline ::tensorflow::TensorProto* SendPackedHandleOp_LocalTensorHandle::release_tensor() { + + ::tensorflow::TensorProto* temp = _impl_.tensor_; + _impl_.tensor_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tensorflow::TensorProto* SendPackedHandleOp_LocalTensorHandle::unsafe_arena_release_tensor() { + // @@protoc_insertion_point(field_release:tensorflow.eager.SendPackedHandleOp.LocalTensorHandle.tensor) + + ::tensorflow::TensorProto* temp = _impl_.tensor_; + _impl_.tensor_ = nullptr; + return temp; +} +inline ::tensorflow::TensorProto* SendPackedHandleOp_LocalTensorHandle::_internal_mutable_tensor() { + + if (_impl_.tensor_ == nullptr) { + auto* p = CreateMaybeMessage<::tensorflow::TensorProto>(GetArenaForAllocation()); + _impl_.tensor_ = p; + } + return _impl_.tensor_; +} +inline ::tensorflow::TensorProto* SendPackedHandleOp_LocalTensorHandle::mutable_tensor() { + ::tensorflow::TensorProto* _msg = _internal_mutable_tensor(); + // @@protoc_insertion_point(field_mutable:tensorflow.eager.SendPackedHandleOp.LocalTensorHandle.tensor) + return _msg; +} +inline void SendPackedHandleOp_LocalTensorHandle::set_allocated_tensor(::tensorflow::TensorProto* tensor) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.tensor_); + } + if (tensor) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( + reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(tensor)); + if (message_arena != submessage_arena) { + tensor = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, tensor, submessage_arena); + } + + } else { + + } + _impl_.tensor_ = tensor; + // @@protoc_insertion_point(field_set_allocated:tensorflow.eager.SendPackedHandleOp.LocalTensorHandle.tensor) +} + +// string device = 2; +inline void SendPackedHandleOp_LocalTensorHandle::clear_device() { + _impl_.device_.ClearToEmpty(); +} +inline const std::string& SendPackedHandleOp_LocalTensorHandle::device() const { + // @@protoc_insertion_point(field_get:tensorflow.eager.SendPackedHandleOp.LocalTensorHandle.device) + return _internal_device(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void SendPackedHandleOp_LocalTensorHandle::set_device(ArgT0&& arg0, ArgT... args) { + + _impl_.device_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.eager.SendPackedHandleOp.LocalTensorHandle.device) +} +inline std::string* SendPackedHandleOp_LocalTensorHandle::mutable_device() { + std::string* _s = _internal_mutable_device(); + // @@protoc_insertion_point(field_mutable:tensorflow.eager.SendPackedHandleOp.LocalTensorHandle.device) + return _s; +} +inline const std::string& SendPackedHandleOp_LocalTensorHandle::_internal_device() const { + return _impl_.device_.Get(); +} +inline void SendPackedHandleOp_LocalTensorHandle::_internal_set_device(const std::string& value) { + + _impl_.device_.Set(value, GetArenaForAllocation()); +} +inline std::string* SendPackedHandleOp_LocalTensorHandle::_internal_mutable_device() { + + return _impl_.device_.Mutable(GetArenaForAllocation()); +} +inline std::string* SendPackedHandleOp_LocalTensorHandle::release_device() { + // @@protoc_insertion_point(field_release:tensorflow.eager.SendPackedHandleOp.LocalTensorHandle.device) + return _impl_.device_.Release(); +} +inline void SendPackedHandleOp_LocalTensorHandle::set_allocated_device(std::string* device) { + if (device != nullptr) { + + } else { + + } + _impl_.device_.SetAllocated(device, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.device_.IsDefault()) { + _impl_.device_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.eager.SendPackedHandleOp.LocalTensorHandle.device) +} + +// ------------------------------------------------------------------- + +// SendPackedHandleOp_Handle + +// .tensorflow.eager.SendPackedHandleOp.LocalTensorHandle local_handle = 1; +inline bool SendPackedHandleOp_Handle::_internal_has_local_handle() const { + return item_case() == kLocalHandle; +} +inline bool SendPackedHandleOp_Handle::has_local_handle() const { + return _internal_has_local_handle(); +} +inline void SendPackedHandleOp_Handle::set_has_local_handle() { + _impl_._oneof_case_[0] = kLocalHandle; +} +inline void SendPackedHandleOp_Handle::clear_local_handle() { + if (_internal_has_local_handle()) { + if (GetArenaForAllocation() == nullptr) { + delete _impl_.item_.local_handle_; + } + clear_has_item(); + } +} +inline ::tensorflow::eager::SendPackedHandleOp_LocalTensorHandle* SendPackedHandleOp_Handle::release_local_handle() { + // @@protoc_insertion_point(field_release:tensorflow.eager.SendPackedHandleOp.Handle.local_handle) + if (_internal_has_local_handle()) { + clear_has_item(); + ::tensorflow::eager::SendPackedHandleOp_LocalTensorHandle* temp = _impl_.item_.local_handle_; + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + _impl_.item_.local_handle_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::tensorflow::eager::SendPackedHandleOp_LocalTensorHandle& SendPackedHandleOp_Handle::_internal_local_handle() const { + return _internal_has_local_handle() + ? *_impl_.item_.local_handle_ + : reinterpret_cast< ::tensorflow::eager::SendPackedHandleOp_LocalTensorHandle&>(::tensorflow::eager::_SendPackedHandleOp_LocalTensorHandle_default_instance_); +} +inline const ::tensorflow::eager::SendPackedHandleOp_LocalTensorHandle& SendPackedHandleOp_Handle::local_handle() const { + // @@protoc_insertion_point(field_get:tensorflow.eager.SendPackedHandleOp.Handle.local_handle) + return _internal_local_handle(); +} +inline ::tensorflow::eager::SendPackedHandleOp_LocalTensorHandle* SendPackedHandleOp_Handle::unsafe_arena_release_local_handle() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.eager.SendPackedHandleOp.Handle.local_handle) + if (_internal_has_local_handle()) { + clear_has_item(); + ::tensorflow::eager::SendPackedHandleOp_LocalTensorHandle* temp = _impl_.item_.local_handle_; + _impl_.item_.local_handle_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void SendPackedHandleOp_Handle::unsafe_arena_set_allocated_local_handle(::tensorflow::eager::SendPackedHandleOp_LocalTensorHandle* local_handle) { + clear_item(); + if (local_handle) { + set_has_local_handle(); + _impl_.item_.local_handle_ = local_handle; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.eager.SendPackedHandleOp.Handle.local_handle) +} +inline ::tensorflow::eager::SendPackedHandleOp_LocalTensorHandle* SendPackedHandleOp_Handle::_internal_mutable_local_handle() { + if (!_internal_has_local_handle()) { + clear_item(); + set_has_local_handle(); + _impl_.item_.local_handle_ = CreateMaybeMessage< ::tensorflow::eager::SendPackedHandleOp_LocalTensorHandle >(GetArenaForAllocation()); + } + return _impl_.item_.local_handle_; +} +inline ::tensorflow::eager::SendPackedHandleOp_LocalTensorHandle* SendPackedHandleOp_Handle::mutable_local_handle() { + ::tensorflow::eager::SendPackedHandleOp_LocalTensorHandle* _msg = _internal_mutable_local_handle(); + // @@protoc_insertion_point(field_mutable:tensorflow.eager.SendPackedHandleOp.Handle.local_handle) + return _msg; +} + +// .tensorflow.eager.RemoteTensorHandle remote_handle = 2; +inline bool SendPackedHandleOp_Handle::_internal_has_remote_handle() const { + return item_case() == kRemoteHandle; +} +inline bool SendPackedHandleOp_Handle::has_remote_handle() const { + return _internal_has_remote_handle(); +} +inline void SendPackedHandleOp_Handle::set_has_remote_handle() { + _impl_._oneof_case_[0] = kRemoteHandle; +} +inline ::tensorflow::eager::RemoteTensorHandle* SendPackedHandleOp_Handle::release_remote_handle() { + // @@protoc_insertion_point(field_release:tensorflow.eager.SendPackedHandleOp.Handle.remote_handle) + if (_internal_has_remote_handle()) { + clear_has_item(); + ::tensorflow::eager::RemoteTensorHandle* temp = _impl_.item_.remote_handle_; + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + _impl_.item_.remote_handle_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::tensorflow::eager::RemoteTensorHandle& SendPackedHandleOp_Handle::_internal_remote_handle() const { + return _internal_has_remote_handle() + ? *_impl_.item_.remote_handle_ + : reinterpret_cast< ::tensorflow::eager::RemoteTensorHandle&>(::tensorflow::eager::_RemoteTensorHandle_default_instance_); +} +inline const ::tensorflow::eager::RemoteTensorHandle& SendPackedHandleOp_Handle::remote_handle() const { + // @@protoc_insertion_point(field_get:tensorflow.eager.SendPackedHandleOp.Handle.remote_handle) + return _internal_remote_handle(); +} +inline ::tensorflow::eager::RemoteTensorHandle* SendPackedHandleOp_Handle::unsafe_arena_release_remote_handle() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.eager.SendPackedHandleOp.Handle.remote_handle) + if (_internal_has_remote_handle()) { + clear_has_item(); + ::tensorflow::eager::RemoteTensorHandle* temp = _impl_.item_.remote_handle_; + _impl_.item_.remote_handle_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void SendPackedHandleOp_Handle::unsafe_arena_set_allocated_remote_handle(::tensorflow::eager::RemoteTensorHandle* remote_handle) { + clear_item(); + if (remote_handle) { + set_has_remote_handle(); + _impl_.item_.remote_handle_ = remote_handle; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.eager.SendPackedHandleOp.Handle.remote_handle) +} +inline ::tensorflow::eager::RemoteTensorHandle* SendPackedHandleOp_Handle::_internal_mutable_remote_handle() { + if (!_internal_has_remote_handle()) { + clear_item(); + set_has_remote_handle(); + _impl_.item_.remote_handle_ = CreateMaybeMessage< ::tensorflow::eager::RemoteTensorHandle >(GetArenaForAllocation()); + } + return _impl_.item_.remote_handle_; +} +inline ::tensorflow::eager::RemoteTensorHandle* SendPackedHandleOp_Handle::mutable_remote_handle() { + ::tensorflow::eager::RemoteTensorHandle* _msg = _internal_mutable_remote_handle(); + // @@protoc_insertion_point(field_mutable:tensorflow.eager.SendPackedHandleOp.Handle.remote_handle) + return _msg; +} + +inline bool SendPackedHandleOp_Handle::has_item() const { + return item_case() != ITEM_NOT_SET; +} +inline void SendPackedHandleOp_Handle::clear_has_item() { + _impl_._oneof_case_[0] = ITEM_NOT_SET; +} +inline SendPackedHandleOp_Handle::ItemCase SendPackedHandleOp_Handle::item_case() const { + return SendPackedHandleOp_Handle::ItemCase(_impl_._oneof_case_[0]); +} +// ------------------------------------------------------------------- + +// SendPackedHandleOp + +// int64 op_id = 1; +inline void SendPackedHandleOp::clear_op_id() { + _impl_.op_id_ = int64_t{0}; +} +inline int64_t SendPackedHandleOp::_internal_op_id() const { + return _impl_.op_id_; +} +inline int64_t SendPackedHandleOp::op_id() const { + // @@protoc_insertion_point(field_get:tensorflow.eager.SendPackedHandleOp.op_id) + return _internal_op_id(); +} +inline void SendPackedHandleOp::_internal_set_op_id(int64_t value) { + + _impl_.op_id_ = value; +} +inline void SendPackedHandleOp::set_op_id(int64_t value) { + _internal_set_op_id(value); + // @@protoc_insertion_point(field_set:tensorflow.eager.SendPackedHandleOp.op_id) +} + +// repeated .tensorflow.eager.SendPackedHandleOp.Handle handles = 2; +inline int SendPackedHandleOp::_internal_handles_size() const { + return _impl_.handles_.size(); +} +inline int SendPackedHandleOp::handles_size() const { + return _internal_handles_size(); +} +inline void SendPackedHandleOp::clear_handles() { + _impl_.handles_.Clear(); +} +inline ::tensorflow::eager::SendPackedHandleOp_Handle* SendPackedHandleOp::mutable_handles(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.eager.SendPackedHandleOp.handles) + return _impl_.handles_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::eager::SendPackedHandleOp_Handle >* +SendPackedHandleOp::mutable_handles() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.eager.SendPackedHandleOp.handles) + return &_impl_.handles_; +} +inline const ::tensorflow::eager::SendPackedHandleOp_Handle& SendPackedHandleOp::_internal_handles(int index) const { + return _impl_.handles_.Get(index); +} +inline const ::tensorflow::eager::SendPackedHandleOp_Handle& SendPackedHandleOp::handles(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.eager.SendPackedHandleOp.handles) + return _internal_handles(index); +} +inline ::tensorflow::eager::SendPackedHandleOp_Handle* SendPackedHandleOp::_internal_add_handles() { + return _impl_.handles_.Add(); +} +inline ::tensorflow::eager::SendPackedHandleOp_Handle* SendPackedHandleOp::add_handles() { + ::tensorflow::eager::SendPackedHandleOp_Handle* _add = _internal_add_handles(); + // @@protoc_insertion_point(field_add:tensorflow.eager.SendPackedHandleOp.handles) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::eager::SendPackedHandleOp_Handle >& +SendPackedHandleOp::handles() const { + // @@protoc_insertion_point(field_list:tensorflow.eager.SendPackedHandleOp.handles) + return _impl_.handles_; +} + +// string device_name = 3; +inline void SendPackedHandleOp::clear_device_name() { + _impl_.device_name_.ClearToEmpty(); +} +inline const std::string& SendPackedHandleOp::device_name() const { + // @@protoc_insertion_point(field_get:tensorflow.eager.SendPackedHandleOp.device_name) + return _internal_device_name(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void SendPackedHandleOp::set_device_name(ArgT0&& arg0, ArgT... args) { + + _impl_.device_name_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.eager.SendPackedHandleOp.device_name) +} +inline std::string* SendPackedHandleOp::mutable_device_name() { + std::string* _s = _internal_mutable_device_name(); + // @@protoc_insertion_point(field_mutable:tensorflow.eager.SendPackedHandleOp.device_name) + return _s; +} +inline const std::string& SendPackedHandleOp::_internal_device_name() const { + return _impl_.device_name_.Get(); +} +inline void SendPackedHandleOp::_internal_set_device_name(const std::string& value) { + + _impl_.device_name_.Set(value, GetArenaForAllocation()); +} +inline std::string* SendPackedHandleOp::_internal_mutable_device_name() { + + return _impl_.device_name_.Mutable(GetArenaForAllocation()); +} +inline std::string* SendPackedHandleOp::release_device_name() { + // @@protoc_insertion_point(field_release:tensorflow.eager.SendPackedHandleOp.device_name) + return _impl_.device_name_.Release(); +} +inline void SendPackedHandleOp::set_allocated_device_name(std::string* device_name) { + if (device_name != nullptr) { + + } else { + + } + _impl_.device_name_.SetAllocated(device_name, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.device_name_.IsDefault()) { + _impl_.device_name_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.eager.SendPackedHandleOp.device_name) +} + +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + + +// @@protoc_insertion_point(namespace_scope) + +} // namespace eager +} // namespace tensorflow + +// @@protoc_insertion_point(global_scope) + +#include +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprotobuf_2feager_5fservice_2eproto diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/eager_service_mock.grpc.pb.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/eager_service_mock.grpc.pb.h new file mode 100644 index 0000000000000000000000000000000000000000..f105897cf75229495ed6788ca17295d288aa67ce --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/eager_service_mock.grpc.pb.h @@ -0,0 +1,49 @@ +// Generated by the gRPC C++ plugin. +// If you make any local change, they will be lost. +// source: tensorflow/core/protobuf/eager_service.proto + +#include "tensorflow/core/protobuf/eager_service.pb.h" +#include "tensorflow/core/protobuf/eager_service.grpc.pb.h" + +#include +#include +#include +namespace tensorflow { +namespace eager { + + +namespace grpc { + +class MockEagerServiceStub : public EagerService::StubInterface { + public: + MOCK_METHOD3(CreateContext, ::grpc::Status(::grpc::ClientContext* context, const ::tensorflow::eager::CreateContextRequest& request, ::tensorflow::eager::CreateContextResponse* response)); + MOCK_METHOD3(AsyncCreateContextRaw, ::grpc::ClientAsyncResponseReaderInterface< ::tensorflow::eager::CreateContextResponse>*(::grpc::ClientContext* context, const ::tensorflow::eager::CreateContextRequest& request, ::grpc::CompletionQueue* cq)); + MOCK_METHOD3(PrepareAsyncCreateContextRaw, ::grpc::ClientAsyncResponseReaderInterface< ::tensorflow::eager::CreateContextResponse>*(::grpc::ClientContext* context, const ::tensorflow::eager::CreateContextRequest& request, ::grpc::CompletionQueue* cq)); + MOCK_METHOD3(UpdateContext, ::grpc::Status(::grpc::ClientContext* context, const ::tensorflow::eager::UpdateContextRequest& request, ::tensorflow::eager::UpdateContextResponse* response)); + MOCK_METHOD3(AsyncUpdateContextRaw, ::grpc::ClientAsyncResponseReaderInterface< ::tensorflow::eager::UpdateContextResponse>*(::grpc::ClientContext* context, const ::tensorflow::eager::UpdateContextRequest& request, ::grpc::CompletionQueue* cq)); + MOCK_METHOD3(PrepareAsyncUpdateContextRaw, ::grpc::ClientAsyncResponseReaderInterface< ::tensorflow::eager::UpdateContextResponse>*(::grpc::ClientContext* context, const ::tensorflow::eager::UpdateContextRequest& request, ::grpc::CompletionQueue* cq)); + MOCK_METHOD3(Enqueue, ::grpc::Status(::grpc::ClientContext* context, const ::tensorflow::eager::EnqueueRequest& request, ::tensorflow::eager::EnqueueResponse* response)); + MOCK_METHOD3(AsyncEnqueueRaw, ::grpc::ClientAsyncResponseReaderInterface< ::tensorflow::eager::EnqueueResponse>*(::grpc::ClientContext* context, const ::tensorflow::eager::EnqueueRequest& request, ::grpc::CompletionQueue* cq)); + MOCK_METHOD3(PrepareAsyncEnqueueRaw, ::grpc::ClientAsyncResponseReaderInterface< ::tensorflow::eager::EnqueueResponse>*(::grpc::ClientContext* context, const ::tensorflow::eager::EnqueueRequest& request, ::grpc::CompletionQueue* cq)); + MOCK_METHOD1(StreamingEnqueueRaw, ::grpc::ClientReaderWriterInterface< ::tensorflow::eager::EnqueueRequest, ::tensorflow::eager::EnqueueResponse>*(::grpc::ClientContext* context)); + MOCK_METHOD3(AsyncStreamingEnqueueRaw, ::grpc::ClientAsyncReaderWriterInterface<::tensorflow::eager::EnqueueRequest, ::tensorflow::eager::EnqueueResponse>*(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag)); + MOCK_METHOD2(PrepareAsyncStreamingEnqueueRaw, ::grpc::ClientAsyncReaderWriterInterface<::tensorflow::eager::EnqueueRequest, ::tensorflow::eager::EnqueueResponse>*(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq)); + MOCK_METHOD3(WaitQueueDone, ::grpc::Status(::grpc::ClientContext* context, const ::tensorflow::eager::WaitQueueDoneRequest& request, ::tensorflow::eager::WaitQueueDoneResponse* response)); + MOCK_METHOD3(AsyncWaitQueueDoneRaw, ::grpc::ClientAsyncResponseReaderInterface< ::tensorflow::eager::WaitQueueDoneResponse>*(::grpc::ClientContext* context, const ::tensorflow::eager::WaitQueueDoneRequest& request, ::grpc::CompletionQueue* cq)); + MOCK_METHOD3(PrepareAsyncWaitQueueDoneRaw, ::grpc::ClientAsyncResponseReaderInterface< ::tensorflow::eager::WaitQueueDoneResponse>*(::grpc::ClientContext* context, const ::tensorflow::eager::WaitQueueDoneRequest& request, ::grpc::CompletionQueue* cq)); + MOCK_METHOD3(RunComponentFunction, ::grpc::Status(::grpc::ClientContext* context, const ::tensorflow::eager::RunComponentFunctionRequest& request, ::tensorflow::eager::RunComponentFunctionResponse* response)); + MOCK_METHOD3(AsyncRunComponentFunctionRaw, ::grpc::ClientAsyncResponseReaderInterface< ::tensorflow::eager::RunComponentFunctionResponse>*(::grpc::ClientContext* context, const ::tensorflow::eager::RunComponentFunctionRequest& request, ::grpc::CompletionQueue* cq)); + MOCK_METHOD3(PrepareAsyncRunComponentFunctionRaw, ::grpc::ClientAsyncResponseReaderInterface< ::tensorflow::eager::RunComponentFunctionResponse>*(::grpc::ClientContext* context, const ::tensorflow::eager::RunComponentFunctionRequest& request, ::grpc::CompletionQueue* cq)); + MOCK_METHOD3(KeepAlive, ::grpc::Status(::grpc::ClientContext* context, const ::tensorflow::eager::KeepAliveRequest& request, ::tensorflow::eager::KeepAliveResponse* response)); + MOCK_METHOD3(AsyncKeepAliveRaw, ::grpc::ClientAsyncResponseReaderInterface< ::tensorflow::eager::KeepAliveResponse>*(::grpc::ClientContext* context, const ::tensorflow::eager::KeepAliveRequest& request, ::grpc::CompletionQueue* cq)); + MOCK_METHOD3(PrepareAsyncKeepAliveRaw, ::grpc::ClientAsyncResponseReaderInterface< ::tensorflow::eager::KeepAliveResponse>*(::grpc::ClientContext* context, const ::tensorflow::eager::KeepAliveRequest& request, ::grpc::CompletionQueue* cq)); + MOCK_METHOD3(CloseContext, ::grpc::Status(::grpc::ClientContext* context, const ::tensorflow::eager::CloseContextRequest& request, ::tensorflow::eager::CloseContextResponse* response)); + MOCK_METHOD3(AsyncCloseContextRaw, ::grpc::ClientAsyncResponseReaderInterface< ::tensorflow::eager::CloseContextResponse>*(::grpc::ClientContext* context, const ::tensorflow::eager::CloseContextRequest& request, ::grpc::CompletionQueue* cq)); + MOCK_METHOD3(PrepareAsyncCloseContextRaw, ::grpc::ClientAsyncResponseReaderInterface< ::tensorflow::eager::CloseContextResponse>*(::grpc::ClientContext* context, const ::tensorflow::eager::CloseContextRequest& request, ::grpc::CompletionQueue* cq)); +}; + +} // namespace grpc + +} // namespace tensorflow +} // namespace eager + diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/error_codes.pb.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/error_codes.pb.h new file mode 100644 index 0000000000000000000000000000000000000000..56e18e87233f90d6b19e8c2160125bcbaafd656d --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/error_codes.pb.h @@ -0,0 +1,77 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/error_codes.proto + +#ifndef GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprotobuf_2ferror_5fcodes_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprotobuf_2ferror_5fcodes_2eproto + +#include +#include + +#include +#if PROTOBUF_VERSION < 3021000 +#error This file was generated by a newer version of protoc which is +#error incompatible with your Protocol Buffer headers. Please update +#error your headers. +#endif +#if 3021009 < PROTOBUF_MIN_PROTOC_VERSION +#error This file was generated by an older version of protoc which is +#error incompatible with your Protocol Buffer headers. Please +#error regenerate this file with a newer version of protoc. +#endif + +#include +#include +#include +#include +#include +#include +#include +#include // IWYU pragma: export +#include // IWYU pragma: export +#include "tsl/protobuf/error_codes.pb.h" +// @@protoc_insertion_point(includes) +#include +#define PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2fprotobuf_2ferror_5fcodes_2eproto +PROTOBUF_NAMESPACE_OPEN +namespace internal { +class AnyMetadata; +} // namespace internal +PROTOBUF_NAMESPACE_CLOSE + +// Internal implementation detail -- do not use these members. +struct TableStruct_tensorflow_2fcore_2fprotobuf_2ferror_5fcodes_2eproto { + static const uint32_t offsets[]; +}; +extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_tensorflow_2fcore_2fprotobuf_2ferror_5fcodes_2eproto; +PROTOBUF_NAMESPACE_OPEN +PROTOBUF_NAMESPACE_CLOSE +namespace tensorflow { +namespace error { +namespace dummy { + +// =================================================================== + + +// =================================================================== + + +// =================================================================== + +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ + +// @@protoc_insertion_point(namespace_scope) + +} // namespace dummy +} // namespace error +} // namespace tensorflow + +// @@protoc_insertion_point(global_scope) + +#include +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprotobuf_2ferror_5fcodes_2eproto diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/error_codes.proto b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/error_codes.proto new file mode 100644 index 0000000000000000000000000000000000000000..2e61ab7fd45a3201d9a34ac5e26114776abb28a9 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/error_codes.proto @@ -0,0 +1,11 @@ +syntax = "proto3"; + +// Add a dummy package name. Having no package, like +// core/lib/core/error_codes.proto, or having tensorflow.error, like +// tsl/protobuf/error_codes.proto, results in name collision errors in generated +// code for some users that use JS through J2CL. +package tensorflow.error.dummy; + +import public "tsl/protobuf/error_codes.proto"; + +option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/protobuf/for_core_protos_go_proto"; diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/fingerprint.pb.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/fingerprint.pb.h new file mode 100644 index 0000000000000000000000000000000000000000..18a3288dbef1cc5a1c5a9d8b1de0ffcd552969f0 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/fingerprint.pb.h @@ -0,0 +1,477 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/fingerprint.proto + +#ifndef GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprotobuf_2ffingerprint_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprotobuf_2ffingerprint_2eproto + +#include +#include + +#include +#if PROTOBUF_VERSION < 3021000 +#error This file was generated by a newer version of protoc which is +#error incompatible with your Protocol Buffer headers. Please update +#error your headers. +#endif +#if 3021009 < PROTOBUF_MIN_PROTOC_VERSION +#error This file was generated by an older version of protoc which is +#error incompatible with your Protocol Buffer headers. Please +#error regenerate this file with a newer version of protoc. +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include // IWYU pragma: export +#include // IWYU pragma: export +#include +#include "tensorflow/core/framework/versions.pb.h" +// @@protoc_insertion_point(includes) +#include +#define PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2fprotobuf_2ffingerprint_2eproto +PROTOBUF_NAMESPACE_OPEN +namespace internal { +class AnyMetadata; +} // namespace internal +PROTOBUF_NAMESPACE_CLOSE + +// Internal implementation detail -- do not use these members. +struct TableStruct_tensorflow_2fcore_2fprotobuf_2ffingerprint_2eproto { + static const uint32_t offsets[]; +}; +extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_tensorflow_2fcore_2fprotobuf_2ffingerprint_2eproto; +namespace tensorflow { +class FingerprintDef; +struct FingerprintDefDefaultTypeInternal; +extern FingerprintDefDefaultTypeInternal _FingerprintDef_default_instance_; +} // namespace tensorflow +PROTOBUF_NAMESPACE_OPEN +template<> ::tensorflow::FingerprintDef* Arena::CreateMaybeMessage<::tensorflow::FingerprintDef>(Arena*); +PROTOBUF_NAMESPACE_CLOSE +namespace tensorflow { + +// =================================================================== + +class FingerprintDef final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.FingerprintDef) */ { + public: + inline FingerprintDef() : FingerprintDef(nullptr) {} + ~FingerprintDef() override; + explicit PROTOBUF_CONSTEXPR FingerprintDef(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + FingerprintDef(const FingerprintDef& from); + FingerprintDef(FingerprintDef&& from) noexcept + : FingerprintDef() { + *this = ::std::move(from); + } + + inline FingerprintDef& operator=(const FingerprintDef& from) { + CopyFrom(from); + return *this; + } + inline FingerprintDef& operator=(FingerprintDef&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const FingerprintDef& default_instance() { + return *internal_default_instance(); + } + static inline const FingerprintDef* internal_default_instance() { + return reinterpret_cast( + &_FingerprintDef_default_instance_); + } + static constexpr int kIndexInFileMessages = + 0; + + friend void swap(FingerprintDef& a, FingerprintDef& b) { + a.Swap(&b); + } + inline void Swap(FingerprintDef* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(FingerprintDef* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + FingerprintDef* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const FingerprintDef& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const FingerprintDef& from) { + FingerprintDef::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(FingerprintDef* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.FingerprintDef"; + } + protected: + explicit FingerprintDef(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kVersionFieldNumber = 6, + kSavedModelChecksumFieldNumber = 1, + kGraphDefProgramHashFieldNumber = 2, + kSignatureDefHashFieldNumber = 3, + kSavedObjectGraphHashFieldNumber = 4, + kCheckpointHashFieldNumber = 5, + }; + // .tensorflow.VersionDef version = 6; + bool has_version() const; + private: + bool _internal_has_version() const; + public: + void clear_version(); + const ::tensorflow::VersionDef& version() const; + PROTOBUF_NODISCARD ::tensorflow::VersionDef* release_version(); + ::tensorflow::VersionDef* mutable_version(); + void set_allocated_version(::tensorflow::VersionDef* version); + private: + const ::tensorflow::VersionDef& _internal_version() const; + ::tensorflow::VersionDef* _internal_mutable_version(); + public: + void unsafe_arena_set_allocated_version( + ::tensorflow::VersionDef* version); + ::tensorflow::VersionDef* unsafe_arena_release_version(); + + // uint64 saved_model_checksum = 1; + void clear_saved_model_checksum(); + uint64_t saved_model_checksum() const; + void set_saved_model_checksum(uint64_t value); + private: + uint64_t _internal_saved_model_checksum() const; + void _internal_set_saved_model_checksum(uint64_t value); + public: + + // uint64 graph_def_program_hash = 2; + void clear_graph_def_program_hash(); + uint64_t graph_def_program_hash() const; + void set_graph_def_program_hash(uint64_t value); + private: + uint64_t _internal_graph_def_program_hash() const; + void _internal_set_graph_def_program_hash(uint64_t value); + public: + + // uint64 signature_def_hash = 3; + void clear_signature_def_hash(); + uint64_t signature_def_hash() const; + void set_signature_def_hash(uint64_t value); + private: + uint64_t _internal_signature_def_hash() const; + void _internal_set_signature_def_hash(uint64_t value); + public: + + // uint64 saved_object_graph_hash = 4; + void clear_saved_object_graph_hash(); + uint64_t saved_object_graph_hash() const; + void set_saved_object_graph_hash(uint64_t value); + private: + uint64_t _internal_saved_object_graph_hash() const; + void _internal_set_saved_object_graph_hash(uint64_t value); + public: + + // uint64 checkpoint_hash = 5; + void clear_checkpoint_hash(); + uint64_t checkpoint_hash() const; + void set_checkpoint_hash(uint64_t value); + private: + uint64_t _internal_checkpoint_hash() const; + void _internal_set_checkpoint_hash(uint64_t value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.FingerprintDef) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::tensorflow::VersionDef* version_; + uint64_t saved_model_checksum_; + uint64_t graph_def_program_hash_; + uint64_t signature_def_hash_; + uint64_t saved_object_graph_hash_; + uint64_t checkpoint_hash_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2ffingerprint_2eproto; +}; +// =================================================================== + + +// =================================================================== + +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// FingerprintDef + +// uint64 saved_model_checksum = 1; +inline void FingerprintDef::clear_saved_model_checksum() { + _impl_.saved_model_checksum_ = uint64_t{0u}; +} +inline uint64_t FingerprintDef::_internal_saved_model_checksum() const { + return _impl_.saved_model_checksum_; +} +inline uint64_t FingerprintDef::saved_model_checksum() const { + // @@protoc_insertion_point(field_get:tensorflow.FingerprintDef.saved_model_checksum) + return _internal_saved_model_checksum(); +} +inline void FingerprintDef::_internal_set_saved_model_checksum(uint64_t value) { + + _impl_.saved_model_checksum_ = value; +} +inline void FingerprintDef::set_saved_model_checksum(uint64_t value) { + _internal_set_saved_model_checksum(value); + // @@protoc_insertion_point(field_set:tensorflow.FingerprintDef.saved_model_checksum) +} + +// uint64 graph_def_program_hash = 2; +inline void FingerprintDef::clear_graph_def_program_hash() { + _impl_.graph_def_program_hash_ = uint64_t{0u}; +} +inline uint64_t FingerprintDef::_internal_graph_def_program_hash() const { + return _impl_.graph_def_program_hash_; +} +inline uint64_t FingerprintDef::graph_def_program_hash() const { + // @@protoc_insertion_point(field_get:tensorflow.FingerprintDef.graph_def_program_hash) + return _internal_graph_def_program_hash(); +} +inline void FingerprintDef::_internal_set_graph_def_program_hash(uint64_t value) { + + _impl_.graph_def_program_hash_ = value; +} +inline void FingerprintDef::set_graph_def_program_hash(uint64_t value) { + _internal_set_graph_def_program_hash(value); + // @@protoc_insertion_point(field_set:tensorflow.FingerprintDef.graph_def_program_hash) +} + +// uint64 signature_def_hash = 3; +inline void FingerprintDef::clear_signature_def_hash() { + _impl_.signature_def_hash_ = uint64_t{0u}; +} +inline uint64_t FingerprintDef::_internal_signature_def_hash() const { + return _impl_.signature_def_hash_; +} +inline uint64_t FingerprintDef::signature_def_hash() const { + // @@protoc_insertion_point(field_get:tensorflow.FingerprintDef.signature_def_hash) + return _internal_signature_def_hash(); +} +inline void FingerprintDef::_internal_set_signature_def_hash(uint64_t value) { + + _impl_.signature_def_hash_ = value; +} +inline void FingerprintDef::set_signature_def_hash(uint64_t value) { + _internal_set_signature_def_hash(value); + // @@protoc_insertion_point(field_set:tensorflow.FingerprintDef.signature_def_hash) +} + +// uint64 saved_object_graph_hash = 4; +inline void FingerprintDef::clear_saved_object_graph_hash() { + _impl_.saved_object_graph_hash_ = uint64_t{0u}; +} +inline uint64_t FingerprintDef::_internal_saved_object_graph_hash() const { + return _impl_.saved_object_graph_hash_; +} +inline uint64_t FingerprintDef::saved_object_graph_hash() const { + // @@protoc_insertion_point(field_get:tensorflow.FingerprintDef.saved_object_graph_hash) + return _internal_saved_object_graph_hash(); +} +inline void FingerprintDef::_internal_set_saved_object_graph_hash(uint64_t value) { + + _impl_.saved_object_graph_hash_ = value; +} +inline void FingerprintDef::set_saved_object_graph_hash(uint64_t value) { + _internal_set_saved_object_graph_hash(value); + // @@protoc_insertion_point(field_set:tensorflow.FingerprintDef.saved_object_graph_hash) +} + +// uint64 checkpoint_hash = 5; +inline void FingerprintDef::clear_checkpoint_hash() { + _impl_.checkpoint_hash_ = uint64_t{0u}; +} +inline uint64_t FingerprintDef::_internal_checkpoint_hash() const { + return _impl_.checkpoint_hash_; +} +inline uint64_t FingerprintDef::checkpoint_hash() const { + // @@protoc_insertion_point(field_get:tensorflow.FingerprintDef.checkpoint_hash) + return _internal_checkpoint_hash(); +} +inline void FingerprintDef::_internal_set_checkpoint_hash(uint64_t value) { + + _impl_.checkpoint_hash_ = value; +} +inline void FingerprintDef::set_checkpoint_hash(uint64_t value) { + _internal_set_checkpoint_hash(value); + // @@protoc_insertion_point(field_set:tensorflow.FingerprintDef.checkpoint_hash) +} + +// .tensorflow.VersionDef version = 6; +inline bool FingerprintDef::_internal_has_version() const { + return this != internal_default_instance() && _impl_.version_ != nullptr; +} +inline bool FingerprintDef::has_version() const { + return _internal_has_version(); +} +inline const ::tensorflow::VersionDef& FingerprintDef::_internal_version() const { + const ::tensorflow::VersionDef* p = _impl_.version_; + return p != nullptr ? *p : reinterpret_cast( + ::tensorflow::_VersionDef_default_instance_); +} +inline const ::tensorflow::VersionDef& FingerprintDef::version() const { + // @@protoc_insertion_point(field_get:tensorflow.FingerprintDef.version) + return _internal_version(); +} +inline void FingerprintDef::unsafe_arena_set_allocated_version( + ::tensorflow::VersionDef* version) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.version_); + } + _impl_.version_ = version; + if (version) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.FingerprintDef.version) +} +inline ::tensorflow::VersionDef* FingerprintDef::release_version() { + + ::tensorflow::VersionDef* temp = _impl_.version_; + _impl_.version_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tensorflow::VersionDef* FingerprintDef::unsafe_arena_release_version() { + // @@protoc_insertion_point(field_release:tensorflow.FingerprintDef.version) + + ::tensorflow::VersionDef* temp = _impl_.version_; + _impl_.version_ = nullptr; + return temp; +} +inline ::tensorflow::VersionDef* FingerprintDef::_internal_mutable_version() { + + if (_impl_.version_ == nullptr) { + auto* p = CreateMaybeMessage<::tensorflow::VersionDef>(GetArenaForAllocation()); + _impl_.version_ = p; + } + return _impl_.version_; +} +inline ::tensorflow::VersionDef* FingerprintDef::mutable_version() { + ::tensorflow::VersionDef* _msg = _internal_mutable_version(); + // @@protoc_insertion_point(field_mutable:tensorflow.FingerprintDef.version) + return _msg; +} +inline void FingerprintDef::set_allocated_version(::tensorflow::VersionDef* version) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.version_); + } + if (version) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( + reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(version)); + if (message_arena != submessage_arena) { + version = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, version, submessage_arena); + } + + } else { + + } + _impl_.version_ = version; + // @@protoc_insertion_point(field_set_allocated:tensorflow.FingerprintDef.version) +} + +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ + +// @@protoc_insertion_point(namespace_scope) + +} // namespace tensorflow + +// @@protoc_insertion_point(global_scope) + +#include +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprotobuf_2ffingerprint_2eproto diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/fingerprint.proto b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/fingerprint.proto new file mode 100644 index 0000000000000000000000000000000000000000..6ac5307ebacab79eecc68a146fd9d589f71bf3e6 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/fingerprint.proto @@ -0,0 +1,31 @@ +syntax = "proto3"; + +package tensorflow; + +import "tensorflow/core/framework/versions.proto"; + +option cc_enable_arenas = true; +option java_outer_classname = "FingerprintProtos"; +option java_multiple_files = true; +option java_package = "org.tensorflow.framework"; +option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/protobuf/for_core_protos_go_proto"; + +// Protocol buffer representing a SavedModel Fingerprint. +// +// If there are multiple MetaGraphDefs in the SavedModel, the FingerprintDef +// corresponds to the first one. +message FingerprintDef { + // Hash of the saved_model.pb, referred to as a "checksum". + uint64 saved_model_checksum = 1; + // Hash of regularized graph_def. + uint64 graph_def_program_hash = 2; + // Hash of the regularized (sorted) SignatureDefs. + uint64 signature_def_hash = 3; + // Hash of the regularized SavedObjectGraph. + uint64 saved_object_graph_hash = 4; + // Hash of the checkpoint. + uint64 checkpoint_hash = 5; + // Version specification of the fingerprint. + VersionDef version = 6; + // TODO(b/290068219): add USM version when GA +} diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/master.pb.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/master.pb.h new file mode 100644 index 0000000000000000000000000000000000000000..8095f888ef7e2ff5dbb12d5d0178600303ba30f8 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/master.pb.h @@ -0,0 +1,5973 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/master.proto + +#ifndef GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto + +#include +#include + +#include +#if PROTOBUF_VERSION < 3021000 +#error This file was generated by a newer version of protoc which is +#error incompatible with your Protocol Buffer headers. Please update +#error your headers. +#endif +#if 3021009 < PROTOBUF_MIN_PROTOC_VERSION +#error This file was generated by an older version of protoc which is +#error incompatible with your Protocol Buffer headers. Please +#error regenerate this file with a newer version of protoc. +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include // IWYU pragma: export +#include // IWYU pragma: export +#include +#include "tensorflow/core/framework/device_attributes.pb.h" +#include "tensorflow/core/framework/graph.pb.h" +#include "tensorflow/core/framework/tensor.pb.h" +#include "tensorflow/core/protobuf/config.pb.h" +#include "tensorflow/core/protobuf/error_codes.pb.h" +#include "tensorflow/core/protobuf/named_tensor.pb.h" +// @@protoc_insertion_point(includes) +#include +#define PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto +PROTOBUF_NAMESPACE_OPEN +namespace internal { +class AnyMetadata; +} // namespace internal +PROTOBUF_NAMESPACE_CLOSE + +// Internal implementation detail -- do not use these members. +struct TableStruct_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto { + static const uint32_t offsets[]; +}; +extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto; +namespace tensorflow { +class CloseSessionRequest; +struct CloseSessionRequestDefaultTypeInternal; +extern CloseSessionRequestDefaultTypeInternal _CloseSessionRequest_default_instance_; +class CloseSessionResponse; +struct CloseSessionResponseDefaultTypeInternal; +extern CloseSessionResponseDefaultTypeInternal _CloseSessionResponse_default_instance_; +class CreateSessionRequest; +struct CreateSessionRequestDefaultTypeInternal; +extern CreateSessionRequestDefaultTypeInternal _CreateSessionRequest_default_instance_; +class CreateSessionResponse; +struct CreateSessionResponseDefaultTypeInternal; +extern CreateSessionResponseDefaultTypeInternal _CreateSessionResponse_default_instance_; +class ExtendSessionRequest; +struct ExtendSessionRequestDefaultTypeInternal; +extern ExtendSessionRequestDefaultTypeInternal _ExtendSessionRequest_default_instance_; +class ExtendSessionResponse; +struct ExtendSessionResponseDefaultTypeInternal; +extern ExtendSessionResponseDefaultTypeInternal _ExtendSessionResponse_default_instance_; +class ListDevicesRequest; +struct ListDevicesRequestDefaultTypeInternal; +extern ListDevicesRequestDefaultTypeInternal _ListDevicesRequest_default_instance_; +class ListDevicesResponse; +struct ListDevicesResponseDefaultTypeInternal; +extern ListDevicesResponseDefaultTypeInternal _ListDevicesResponse_default_instance_; +class MakeCallableRequest; +struct MakeCallableRequestDefaultTypeInternal; +extern MakeCallableRequestDefaultTypeInternal _MakeCallableRequest_default_instance_; +class MakeCallableResponse; +struct MakeCallableResponseDefaultTypeInternal; +extern MakeCallableResponseDefaultTypeInternal _MakeCallableResponse_default_instance_; +class PartialRunSetupRequest; +struct PartialRunSetupRequestDefaultTypeInternal; +extern PartialRunSetupRequestDefaultTypeInternal _PartialRunSetupRequest_default_instance_; +class PartialRunSetupResponse; +struct PartialRunSetupResponseDefaultTypeInternal; +extern PartialRunSetupResponseDefaultTypeInternal _PartialRunSetupResponse_default_instance_; +class ReleaseCallableRequest; +struct ReleaseCallableRequestDefaultTypeInternal; +extern ReleaseCallableRequestDefaultTypeInternal _ReleaseCallableRequest_default_instance_; +class ReleaseCallableResponse; +struct ReleaseCallableResponseDefaultTypeInternal; +extern ReleaseCallableResponseDefaultTypeInternal _ReleaseCallableResponse_default_instance_; +class ResetRequest; +struct ResetRequestDefaultTypeInternal; +extern ResetRequestDefaultTypeInternal _ResetRequest_default_instance_; +class ResetResponse; +struct ResetResponseDefaultTypeInternal; +extern ResetResponseDefaultTypeInternal _ResetResponse_default_instance_; +class RunCallableRequest; +struct RunCallableRequestDefaultTypeInternal; +extern RunCallableRequestDefaultTypeInternal _RunCallableRequest_default_instance_; +class RunCallableResponse; +struct RunCallableResponseDefaultTypeInternal; +extern RunCallableResponseDefaultTypeInternal _RunCallableResponse_default_instance_; +class RunStepRequest; +struct RunStepRequestDefaultTypeInternal; +extern RunStepRequestDefaultTypeInternal _RunStepRequest_default_instance_; +class RunStepResponse; +struct RunStepResponseDefaultTypeInternal; +extern RunStepResponseDefaultTypeInternal _RunStepResponse_default_instance_; +} // namespace tensorflow +PROTOBUF_NAMESPACE_OPEN +template<> ::tensorflow::CloseSessionRequest* Arena::CreateMaybeMessage<::tensorflow::CloseSessionRequest>(Arena*); +template<> ::tensorflow::CloseSessionResponse* Arena::CreateMaybeMessage<::tensorflow::CloseSessionResponse>(Arena*); +template<> ::tensorflow::CreateSessionRequest* Arena::CreateMaybeMessage<::tensorflow::CreateSessionRequest>(Arena*); +template<> ::tensorflow::CreateSessionResponse* Arena::CreateMaybeMessage<::tensorflow::CreateSessionResponse>(Arena*); +template<> ::tensorflow::ExtendSessionRequest* Arena::CreateMaybeMessage<::tensorflow::ExtendSessionRequest>(Arena*); +template<> ::tensorflow::ExtendSessionResponse* Arena::CreateMaybeMessage<::tensorflow::ExtendSessionResponse>(Arena*); +template<> ::tensorflow::ListDevicesRequest* Arena::CreateMaybeMessage<::tensorflow::ListDevicesRequest>(Arena*); +template<> ::tensorflow::ListDevicesResponse* Arena::CreateMaybeMessage<::tensorflow::ListDevicesResponse>(Arena*); +template<> ::tensorflow::MakeCallableRequest* Arena::CreateMaybeMessage<::tensorflow::MakeCallableRequest>(Arena*); +template<> ::tensorflow::MakeCallableResponse* Arena::CreateMaybeMessage<::tensorflow::MakeCallableResponse>(Arena*); +template<> ::tensorflow::PartialRunSetupRequest* Arena::CreateMaybeMessage<::tensorflow::PartialRunSetupRequest>(Arena*); +template<> ::tensorflow::PartialRunSetupResponse* Arena::CreateMaybeMessage<::tensorflow::PartialRunSetupResponse>(Arena*); +template<> ::tensorflow::ReleaseCallableRequest* Arena::CreateMaybeMessage<::tensorflow::ReleaseCallableRequest>(Arena*); +template<> ::tensorflow::ReleaseCallableResponse* Arena::CreateMaybeMessage<::tensorflow::ReleaseCallableResponse>(Arena*); +template<> ::tensorflow::ResetRequest* Arena::CreateMaybeMessage<::tensorflow::ResetRequest>(Arena*); +template<> ::tensorflow::ResetResponse* Arena::CreateMaybeMessage<::tensorflow::ResetResponse>(Arena*); +template<> ::tensorflow::RunCallableRequest* Arena::CreateMaybeMessage<::tensorflow::RunCallableRequest>(Arena*); +template<> ::tensorflow::RunCallableResponse* Arena::CreateMaybeMessage<::tensorflow::RunCallableResponse>(Arena*); +template<> ::tensorflow::RunStepRequest* Arena::CreateMaybeMessage<::tensorflow::RunStepRequest>(Arena*); +template<> ::tensorflow::RunStepResponse* Arena::CreateMaybeMessage<::tensorflow::RunStepResponse>(Arena*); +PROTOBUF_NAMESPACE_CLOSE +namespace tensorflow { + +// =================================================================== + +class CreateSessionRequest final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.CreateSessionRequest) */ { + public: + inline CreateSessionRequest() : CreateSessionRequest(nullptr) {} + ~CreateSessionRequest() override; + explicit PROTOBUF_CONSTEXPR CreateSessionRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + CreateSessionRequest(const CreateSessionRequest& from); + CreateSessionRequest(CreateSessionRequest&& from) noexcept + : CreateSessionRequest() { + *this = ::std::move(from); + } + + inline CreateSessionRequest& operator=(const CreateSessionRequest& from) { + CopyFrom(from); + return *this; + } + inline CreateSessionRequest& operator=(CreateSessionRequest&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const CreateSessionRequest& default_instance() { + return *internal_default_instance(); + } + static inline const CreateSessionRequest* internal_default_instance() { + return reinterpret_cast( + &_CreateSessionRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 0; + + friend void swap(CreateSessionRequest& a, CreateSessionRequest& b) { + a.Swap(&b); + } + inline void Swap(CreateSessionRequest* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(CreateSessionRequest* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + CreateSessionRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const CreateSessionRequest& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const CreateSessionRequest& from) { + CreateSessionRequest::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(CreateSessionRequest* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.CreateSessionRequest"; + } + protected: + explicit CreateSessionRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kTargetFieldNumber = 3, + kGraphDefFieldNumber = 1, + kConfigFieldNumber = 2, + }; + // string target = 3; + void clear_target(); + const std::string& target() const; + template + void set_target(ArgT0&& arg0, ArgT... args); + std::string* mutable_target(); + PROTOBUF_NODISCARD std::string* release_target(); + void set_allocated_target(std::string* target); + private: + const std::string& _internal_target() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_target(const std::string& value); + std::string* _internal_mutable_target(); + public: + + // .tensorflow.GraphDef graph_def = 1; + bool has_graph_def() const; + private: + bool _internal_has_graph_def() const; + public: + void clear_graph_def(); + const ::tensorflow::GraphDef& graph_def() const; + PROTOBUF_NODISCARD ::tensorflow::GraphDef* release_graph_def(); + ::tensorflow::GraphDef* mutable_graph_def(); + void set_allocated_graph_def(::tensorflow::GraphDef* graph_def); + private: + const ::tensorflow::GraphDef& _internal_graph_def() const; + ::tensorflow::GraphDef* _internal_mutable_graph_def(); + public: + void unsafe_arena_set_allocated_graph_def( + ::tensorflow::GraphDef* graph_def); + ::tensorflow::GraphDef* unsafe_arena_release_graph_def(); + + // .tensorflow.ConfigProto config = 2; + bool has_config() const; + private: + bool _internal_has_config() const; + public: + void clear_config(); + const ::tensorflow::ConfigProto& config() const; + PROTOBUF_NODISCARD ::tensorflow::ConfigProto* release_config(); + ::tensorflow::ConfigProto* mutable_config(); + void set_allocated_config(::tensorflow::ConfigProto* config); + private: + const ::tensorflow::ConfigProto& _internal_config() const; + ::tensorflow::ConfigProto* _internal_mutable_config(); + public: + void unsafe_arena_set_allocated_config( + ::tensorflow::ConfigProto* config); + ::tensorflow::ConfigProto* unsafe_arena_release_config(); + + // @@protoc_insertion_point(class_scope:tensorflow.CreateSessionRequest) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr target_; + ::tensorflow::GraphDef* graph_def_; + ::tensorflow::ConfigProto* config_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto; +}; +// ------------------------------------------------------------------- + +class CreateSessionResponse final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.CreateSessionResponse) */ { + public: + inline CreateSessionResponse() : CreateSessionResponse(nullptr) {} + ~CreateSessionResponse() override; + explicit PROTOBUF_CONSTEXPR CreateSessionResponse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + CreateSessionResponse(const CreateSessionResponse& from); + CreateSessionResponse(CreateSessionResponse&& from) noexcept + : CreateSessionResponse() { + *this = ::std::move(from); + } + + inline CreateSessionResponse& operator=(const CreateSessionResponse& from) { + CopyFrom(from); + return *this; + } + inline CreateSessionResponse& operator=(CreateSessionResponse&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const CreateSessionResponse& default_instance() { + return *internal_default_instance(); + } + static inline const CreateSessionResponse* internal_default_instance() { + return reinterpret_cast( + &_CreateSessionResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = + 1; + + friend void swap(CreateSessionResponse& a, CreateSessionResponse& b) { + a.Swap(&b); + } + inline void Swap(CreateSessionResponse* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(CreateSessionResponse* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + CreateSessionResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const CreateSessionResponse& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const CreateSessionResponse& from) { + CreateSessionResponse::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(CreateSessionResponse* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.CreateSessionResponse"; + } + protected: + explicit CreateSessionResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kSessionHandleFieldNumber = 1, + kGraphVersionFieldNumber = 2, + }; + // string session_handle = 1; + void clear_session_handle(); + const std::string& session_handle() const; + template + void set_session_handle(ArgT0&& arg0, ArgT... args); + std::string* mutable_session_handle(); + PROTOBUF_NODISCARD std::string* release_session_handle(); + void set_allocated_session_handle(std::string* session_handle); + private: + const std::string& _internal_session_handle() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_session_handle(const std::string& value); + std::string* _internal_mutable_session_handle(); + public: + + // int64 graph_version = 2; + void clear_graph_version(); + int64_t graph_version() const; + void set_graph_version(int64_t value); + private: + int64_t _internal_graph_version() const; + void _internal_set_graph_version(int64_t value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.CreateSessionResponse) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr session_handle_; + int64_t graph_version_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto; +}; +// ------------------------------------------------------------------- + +class ExtendSessionRequest final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.ExtendSessionRequest) */ { + public: + inline ExtendSessionRequest() : ExtendSessionRequest(nullptr) {} + ~ExtendSessionRequest() override; + explicit PROTOBUF_CONSTEXPR ExtendSessionRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + ExtendSessionRequest(const ExtendSessionRequest& from); + ExtendSessionRequest(ExtendSessionRequest&& from) noexcept + : ExtendSessionRequest() { + *this = ::std::move(from); + } + + inline ExtendSessionRequest& operator=(const ExtendSessionRequest& from) { + CopyFrom(from); + return *this; + } + inline ExtendSessionRequest& operator=(ExtendSessionRequest&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const ExtendSessionRequest& default_instance() { + return *internal_default_instance(); + } + static inline const ExtendSessionRequest* internal_default_instance() { + return reinterpret_cast( + &_ExtendSessionRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 2; + + friend void swap(ExtendSessionRequest& a, ExtendSessionRequest& b) { + a.Swap(&b); + } + inline void Swap(ExtendSessionRequest* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(ExtendSessionRequest* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + ExtendSessionRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const ExtendSessionRequest& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const ExtendSessionRequest& from) { + ExtendSessionRequest::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(ExtendSessionRequest* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.ExtendSessionRequest"; + } + protected: + explicit ExtendSessionRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kSessionHandleFieldNumber = 1, + kGraphDefFieldNumber = 2, + kCurrentGraphVersionFieldNumber = 3, + }; + // string session_handle = 1; + void clear_session_handle(); + const std::string& session_handle() const; + template + void set_session_handle(ArgT0&& arg0, ArgT... args); + std::string* mutable_session_handle(); + PROTOBUF_NODISCARD std::string* release_session_handle(); + void set_allocated_session_handle(std::string* session_handle); + private: + const std::string& _internal_session_handle() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_session_handle(const std::string& value); + std::string* _internal_mutable_session_handle(); + public: + + // .tensorflow.GraphDef graph_def = 2; + bool has_graph_def() const; + private: + bool _internal_has_graph_def() const; + public: + void clear_graph_def(); + const ::tensorflow::GraphDef& graph_def() const; + PROTOBUF_NODISCARD ::tensorflow::GraphDef* release_graph_def(); + ::tensorflow::GraphDef* mutable_graph_def(); + void set_allocated_graph_def(::tensorflow::GraphDef* graph_def); + private: + const ::tensorflow::GraphDef& _internal_graph_def() const; + ::tensorflow::GraphDef* _internal_mutable_graph_def(); + public: + void unsafe_arena_set_allocated_graph_def( + ::tensorflow::GraphDef* graph_def); + ::tensorflow::GraphDef* unsafe_arena_release_graph_def(); + + // int64 current_graph_version = 3; + void clear_current_graph_version(); + int64_t current_graph_version() const; + void set_current_graph_version(int64_t value); + private: + int64_t _internal_current_graph_version() const; + void _internal_set_current_graph_version(int64_t value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.ExtendSessionRequest) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr session_handle_; + ::tensorflow::GraphDef* graph_def_; + int64_t current_graph_version_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto; +}; +// ------------------------------------------------------------------- + +class ExtendSessionResponse final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.ExtendSessionResponse) */ { + public: + inline ExtendSessionResponse() : ExtendSessionResponse(nullptr) {} + ~ExtendSessionResponse() override; + explicit PROTOBUF_CONSTEXPR ExtendSessionResponse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + ExtendSessionResponse(const ExtendSessionResponse& from); + ExtendSessionResponse(ExtendSessionResponse&& from) noexcept + : ExtendSessionResponse() { + *this = ::std::move(from); + } + + inline ExtendSessionResponse& operator=(const ExtendSessionResponse& from) { + CopyFrom(from); + return *this; + } + inline ExtendSessionResponse& operator=(ExtendSessionResponse&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const ExtendSessionResponse& default_instance() { + return *internal_default_instance(); + } + static inline const ExtendSessionResponse* internal_default_instance() { + return reinterpret_cast( + &_ExtendSessionResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = + 3; + + friend void swap(ExtendSessionResponse& a, ExtendSessionResponse& b) { + a.Swap(&b); + } + inline void Swap(ExtendSessionResponse* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(ExtendSessionResponse* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + ExtendSessionResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const ExtendSessionResponse& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const ExtendSessionResponse& from) { + ExtendSessionResponse::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(ExtendSessionResponse* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.ExtendSessionResponse"; + } + protected: + explicit ExtendSessionResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kNewGraphVersionFieldNumber = 4, + }; + // int64 new_graph_version = 4; + void clear_new_graph_version(); + int64_t new_graph_version() const; + void set_new_graph_version(int64_t value); + private: + int64_t _internal_new_graph_version() const; + void _internal_set_new_graph_version(int64_t value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.ExtendSessionResponse) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + int64_t new_graph_version_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto; +}; +// ------------------------------------------------------------------- + +class RunStepRequest final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.RunStepRequest) */ { + public: + inline RunStepRequest() : RunStepRequest(nullptr) {} + ~RunStepRequest() override; + explicit PROTOBUF_CONSTEXPR RunStepRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + RunStepRequest(const RunStepRequest& from); + RunStepRequest(RunStepRequest&& from) noexcept + : RunStepRequest() { + *this = ::std::move(from); + } + + inline RunStepRequest& operator=(const RunStepRequest& from) { + CopyFrom(from); + return *this; + } + inline RunStepRequest& operator=(RunStepRequest&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const RunStepRequest& default_instance() { + return *internal_default_instance(); + } + static inline const RunStepRequest* internal_default_instance() { + return reinterpret_cast( + &_RunStepRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 4; + + friend void swap(RunStepRequest& a, RunStepRequest& b) { + a.Swap(&b); + } + inline void Swap(RunStepRequest* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(RunStepRequest* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + RunStepRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const RunStepRequest& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const RunStepRequest& from) { + RunStepRequest::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(RunStepRequest* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.RunStepRequest"; + } + protected: + explicit RunStepRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kFeedFieldNumber = 2, + kFetchFieldNumber = 3, + kTargetFieldNumber = 4, + kSessionHandleFieldNumber = 1, + kPartialRunHandleFieldNumber = 6, + kOptionsFieldNumber = 5, + kRequestIdFieldNumber = 8, + kStoreErrorsInResponseBodyFieldNumber = 7, + }; + // repeated .tensorflow.NamedTensorProto feed = 2; + int feed_size() const; + private: + int _internal_feed_size() const; + public: + void clear_feed(); + ::tensorflow::NamedTensorProto* mutable_feed(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::NamedTensorProto >* + mutable_feed(); + private: + const ::tensorflow::NamedTensorProto& _internal_feed(int index) const; + ::tensorflow::NamedTensorProto* _internal_add_feed(); + public: + const ::tensorflow::NamedTensorProto& feed(int index) const; + ::tensorflow::NamedTensorProto* add_feed(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::NamedTensorProto >& + feed() const; + + // repeated string fetch = 3; + int fetch_size() const; + private: + int _internal_fetch_size() const; + public: + void clear_fetch(); + const std::string& fetch(int index) const; + std::string* mutable_fetch(int index); + void set_fetch(int index, const std::string& value); + void set_fetch(int index, std::string&& value); + void set_fetch(int index, const char* value); + void set_fetch(int index, const char* value, size_t size); + std::string* add_fetch(); + void add_fetch(const std::string& value); + void add_fetch(std::string&& value); + void add_fetch(const char* value); + void add_fetch(const char* value, size_t size); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& fetch() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* mutable_fetch(); + private: + const std::string& _internal_fetch(int index) const; + std::string* _internal_add_fetch(); + public: + + // repeated string target = 4; + int target_size() const; + private: + int _internal_target_size() const; + public: + void clear_target(); + const std::string& target(int index) const; + std::string* mutable_target(int index); + void set_target(int index, const std::string& value); + void set_target(int index, std::string&& value); + void set_target(int index, const char* value); + void set_target(int index, const char* value, size_t size); + std::string* add_target(); + void add_target(const std::string& value); + void add_target(std::string&& value); + void add_target(const char* value); + void add_target(const char* value, size_t size); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& target() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* mutable_target(); + private: + const std::string& _internal_target(int index) const; + std::string* _internal_add_target(); + public: + + // string session_handle = 1; + void clear_session_handle(); + const std::string& session_handle() const; + template + void set_session_handle(ArgT0&& arg0, ArgT... args); + std::string* mutable_session_handle(); + PROTOBUF_NODISCARD std::string* release_session_handle(); + void set_allocated_session_handle(std::string* session_handle); + private: + const std::string& _internal_session_handle() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_session_handle(const std::string& value); + std::string* _internal_mutable_session_handle(); + public: + + // string partial_run_handle = 6; + void clear_partial_run_handle(); + const std::string& partial_run_handle() const; + template + void set_partial_run_handle(ArgT0&& arg0, ArgT... args); + std::string* mutable_partial_run_handle(); + PROTOBUF_NODISCARD std::string* release_partial_run_handle(); + void set_allocated_partial_run_handle(std::string* partial_run_handle); + private: + const std::string& _internal_partial_run_handle() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_partial_run_handle(const std::string& value); + std::string* _internal_mutable_partial_run_handle(); + public: + + // .tensorflow.RunOptions options = 5; + bool has_options() const; + private: + bool _internal_has_options() const; + public: + void clear_options(); + const ::tensorflow::RunOptions& options() const; + PROTOBUF_NODISCARD ::tensorflow::RunOptions* release_options(); + ::tensorflow::RunOptions* mutable_options(); + void set_allocated_options(::tensorflow::RunOptions* options); + private: + const ::tensorflow::RunOptions& _internal_options() const; + ::tensorflow::RunOptions* _internal_mutable_options(); + public: + void unsafe_arena_set_allocated_options( + ::tensorflow::RunOptions* options); + ::tensorflow::RunOptions* unsafe_arena_release_options(); + + // int64 request_id = 8; + void clear_request_id(); + int64_t request_id() const; + void set_request_id(int64_t value); + private: + int64_t _internal_request_id() const; + void _internal_set_request_id(int64_t value); + public: + + // bool store_errors_in_response_body = 7; + void clear_store_errors_in_response_body(); + bool store_errors_in_response_body() const; + void set_store_errors_in_response_body(bool value); + private: + bool _internal_store_errors_in_response_body() const; + void _internal_set_store_errors_in_response_body(bool value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.RunStepRequest) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::NamedTensorProto > feed_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField fetch_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField target_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr session_handle_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr partial_run_handle_; + ::tensorflow::RunOptions* options_; + int64_t request_id_; + bool store_errors_in_response_body_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto; +}; +// ------------------------------------------------------------------- + +class RunStepResponse final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.RunStepResponse) */ { + public: + inline RunStepResponse() : RunStepResponse(nullptr) {} + ~RunStepResponse() override; + explicit PROTOBUF_CONSTEXPR RunStepResponse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + RunStepResponse(const RunStepResponse& from); + RunStepResponse(RunStepResponse&& from) noexcept + : RunStepResponse() { + *this = ::std::move(from); + } + + inline RunStepResponse& operator=(const RunStepResponse& from) { + CopyFrom(from); + return *this; + } + inline RunStepResponse& operator=(RunStepResponse&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const RunStepResponse& default_instance() { + return *internal_default_instance(); + } + static inline const RunStepResponse* internal_default_instance() { + return reinterpret_cast( + &_RunStepResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = + 5; + + friend void swap(RunStepResponse& a, RunStepResponse& b) { + a.Swap(&b); + } + inline void Swap(RunStepResponse* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(RunStepResponse* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + RunStepResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const RunStepResponse& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const RunStepResponse& from) { + RunStepResponse::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(RunStepResponse* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.RunStepResponse"; + } + protected: + explicit RunStepResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kTensorFieldNumber = 1, + kStatusErrorMessageFieldNumber = 4, + kMetadataFieldNumber = 2, + kStatusCodeFieldNumber = 3, + }; + // repeated .tensorflow.NamedTensorProto tensor = 1; + int tensor_size() const; + private: + int _internal_tensor_size() const; + public: + void clear_tensor(); + ::tensorflow::NamedTensorProto* mutable_tensor(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::NamedTensorProto >* + mutable_tensor(); + private: + const ::tensorflow::NamedTensorProto& _internal_tensor(int index) const; + ::tensorflow::NamedTensorProto* _internal_add_tensor(); + public: + const ::tensorflow::NamedTensorProto& tensor(int index) const; + ::tensorflow::NamedTensorProto* add_tensor(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::NamedTensorProto >& + tensor() const; + + // string status_error_message = 4; + void clear_status_error_message(); + const std::string& status_error_message() const; + template + void set_status_error_message(ArgT0&& arg0, ArgT... args); + std::string* mutable_status_error_message(); + PROTOBUF_NODISCARD std::string* release_status_error_message(); + void set_allocated_status_error_message(std::string* status_error_message); + private: + const std::string& _internal_status_error_message() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_status_error_message(const std::string& value); + std::string* _internal_mutable_status_error_message(); + public: + + // .tensorflow.RunMetadata metadata = 2; + bool has_metadata() const; + private: + bool _internal_has_metadata() const; + public: + void clear_metadata(); + const ::tensorflow::RunMetadata& metadata() const; + PROTOBUF_NODISCARD ::tensorflow::RunMetadata* release_metadata(); + ::tensorflow::RunMetadata* mutable_metadata(); + void set_allocated_metadata(::tensorflow::RunMetadata* metadata); + private: + const ::tensorflow::RunMetadata& _internal_metadata() const; + ::tensorflow::RunMetadata* _internal_mutable_metadata(); + public: + void unsafe_arena_set_allocated_metadata( + ::tensorflow::RunMetadata* metadata); + ::tensorflow::RunMetadata* unsafe_arena_release_metadata(); + + // .tensorflow.error.Code status_code = 3; + void clear_status_code(); + ::tensorflow::error::Code status_code() const; + void set_status_code(::tensorflow::error::Code value); + private: + ::tensorflow::error::Code _internal_status_code() const; + void _internal_set_status_code(::tensorflow::error::Code value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.RunStepResponse) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::NamedTensorProto > tensor_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr status_error_message_; + ::tensorflow::RunMetadata* metadata_; + int status_code_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto; +}; +// ------------------------------------------------------------------- + +class PartialRunSetupRequest final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.PartialRunSetupRequest) */ { + public: + inline PartialRunSetupRequest() : PartialRunSetupRequest(nullptr) {} + ~PartialRunSetupRequest() override; + explicit PROTOBUF_CONSTEXPR PartialRunSetupRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + PartialRunSetupRequest(const PartialRunSetupRequest& from); + PartialRunSetupRequest(PartialRunSetupRequest&& from) noexcept + : PartialRunSetupRequest() { + *this = ::std::move(from); + } + + inline PartialRunSetupRequest& operator=(const PartialRunSetupRequest& from) { + CopyFrom(from); + return *this; + } + inline PartialRunSetupRequest& operator=(PartialRunSetupRequest&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const PartialRunSetupRequest& default_instance() { + return *internal_default_instance(); + } + static inline const PartialRunSetupRequest* internal_default_instance() { + return reinterpret_cast( + &_PartialRunSetupRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 6; + + friend void swap(PartialRunSetupRequest& a, PartialRunSetupRequest& b) { + a.Swap(&b); + } + inline void Swap(PartialRunSetupRequest* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(PartialRunSetupRequest* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + PartialRunSetupRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const PartialRunSetupRequest& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const PartialRunSetupRequest& from) { + PartialRunSetupRequest::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(PartialRunSetupRequest* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.PartialRunSetupRequest"; + } + protected: + explicit PartialRunSetupRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kFeedFieldNumber = 2, + kFetchFieldNumber = 3, + kTargetFieldNumber = 4, + kSessionHandleFieldNumber = 1, + kRequestIdFieldNumber = 5, + }; + // repeated string feed = 2; + int feed_size() const; + private: + int _internal_feed_size() const; + public: + void clear_feed(); + const std::string& feed(int index) const; + std::string* mutable_feed(int index); + void set_feed(int index, const std::string& value); + void set_feed(int index, std::string&& value); + void set_feed(int index, const char* value); + void set_feed(int index, const char* value, size_t size); + std::string* add_feed(); + void add_feed(const std::string& value); + void add_feed(std::string&& value); + void add_feed(const char* value); + void add_feed(const char* value, size_t size); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& feed() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* mutable_feed(); + private: + const std::string& _internal_feed(int index) const; + std::string* _internal_add_feed(); + public: + + // repeated string fetch = 3; + int fetch_size() const; + private: + int _internal_fetch_size() const; + public: + void clear_fetch(); + const std::string& fetch(int index) const; + std::string* mutable_fetch(int index); + void set_fetch(int index, const std::string& value); + void set_fetch(int index, std::string&& value); + void set_fetch(int index, const char* value); + void set_fetch(int index, const char* value, size_t size); + std::string* add_fetch(); + void add_fetch(const std::string& value); + void add_fetch(std::string&& value); + void add_fetch(const char* value); + void add_fetch(const char* value, size_t size); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& fetch() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* mutable_fetch(); + private: + const std::string& _internal_fetch(int index) const; + std::string* _internal_add_fetch(); + public: + + // repeated string target = 4; + int target_size() const; + private: + int _internal_target_size() const; + public: + void clear_target(); + const std::string& target(int index) const; + std::string* mutable_target(int index); + void set_target(int index, const std::string& value); + void set_target(int index, std::string&& value); + void set_target(int index, const char* value); + void set_target(int index, const char* value, size_t size); + std::string* add_target(); + void add_target(const std::string& value); + void add_target(std::string&& value); + void add_target(const char* value); + void add_target(const char* value, size_t size); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& target() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* mutable_target(); + private: + const std::string& _internal_target(int index) const; + std::string* _internal_add_target(); + public: + + // string session_handle = 1; + void clear_session_handle(); + const std::string& session_handle() const; + template + void set_session_handle(ArgT0&& arg0, ArgT... args); + std::string* mutable_session_handle(); + PROTOBUF_NODISCARD std::string* release_session_handle(); + void set_allocated_session_handle(std::string* session_handle); + private: + const std::string& _internal_session_handle() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_session_handle(const std::string& value); + std::string* _internal_mutable_session_handle(); + public: + + // int64 request_id = 5; + void clear_request_id(); + int64_t request_id() const; + void set_request_id(int64_t value); + private: + int64_t _internal_request_id() const; + void _internal_set_request_id(int64_t value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.PartialRunSetupRequest) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField feed_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField fetch_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField target_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr session_handle_; + int64_t request_id_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto; +}; +// ------------------------------------------------------------------- + +class PartialRunSetupResponse final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.PartialRunSetupResponse) */ { + public: + inline PartialRunSetupResponse() : PartialRunSetupResponse(nullptr) {} + ~PartialRunSetupResponse() override; + explicit PROTOBUF_CONSTEXPR PartialRunSetupResponse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + PartialRunSetupResponse(const PartialRunSetupResponse& from); + PartialRunSetupResponse(PartialRunSetupResponse&& from) noexcept + : PartialRunSetupResponse() { + *this = ::std::move(from); + } + + inline PartialRunSetupResponse& operator=(const PartialRunSetupResponse& from) { + CopyFrom(from); + return *this; + } + inline PartialRunSetupResponse& operator=(PartialRunSetupResponse&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const PartialRunSetupResponse& default_instance() { + return *internal_default_instance(); + } + static inline const PartialRunSetupResponse* internal_default_instance() { + return reinterpret_cast( + &_PartialRunSetupResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = + 7; + + friend void swap(PartialRunSetupResponse& a, PartialRunSetupResponse& b) { + a.Swap(&b); + } + inline void Swap(PartialRunSetupResponse* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(PartialRunSetupResponse* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + PartialRunSetupResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const PartialRunSetupResponse& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const PartialRunSetupResponse& from) { + PartialRunSetupResponse::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(PartialRunSetupResponse* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.PartialRunSetupResponse"; + } + protected: + explicit PartialRunSetupResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kPartialRunHandleFieldNumber = 1, + }; + // string partial_run_handle = 1; + void clear_partial_run_handle(); + const std::string& partial_run_handle() const; + template + void set_partial_run_handle(ArgT0&& arg0, ArgT... args); + std::string* mutable_partial_run_handle(); + PROTOBUF_NODISCARD std::string* release_partial_run_handle(); + void set_allocated_partial_run_handle(std::string* partial_run_handle); + private: + const std::string& _internal_partial_run_handle() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_partial_run_handle(const std::string& value); + std::string* _internal_mutable_partial_run_handle(); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.PartialRunSetupResponse) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr partial_run_handle_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto; +}; +// ------------------------------------------------------------------- + +class CloseSessionRequest final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.CloseSessionRequest) */ { + public: + inline CloseSessionRequest() : CloseSessionRequest(nullptr) {} + ~CloseSessionRequest() override; + explicit PROTOBUF_CONSTEXPR CloseSessionRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + CloseSessionRequest(const CloseSessionRequest& from); + CloseSessionRequest(CloseSessionRequest&& from) noexcept + : CloseSessionRequest() { + *this = ::std::move(from); + } + + inline CloseSessionRequest& operator=(const CloseSessionRequest& from) { + CopyFrom(from); + return *this; + } + inline CloseSessionRequest& operator=(CloseSessionRequest&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const CloseSessionRequest& default_instance() { + return *internal_default_instance(); + } + static inline const CloseSessionRequest* internal_default_instance() { + return reinterpret_cast( + &_CloseSessionRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 8; + + friend void swap(CloseSessionRequest& a, CloseSessionRequest& b) { + a.Swap(&b); + } + inline void Swap(CloseSessionRequest* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(CloseSessionRequest* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + CloseSessionRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const CloseSessionRequest& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const CloseSessionRequest& from) { + CloseSessionRequest::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(CloseSessionRequest* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.CloseSessionRequest"; + } + protected: + explicit CloseSessionRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kSessionHandleFieldNumber = 1, + }; + // string session_handle = 1; + void clear_session_handle(); + const std::string& session_handle() const; + template + void set_session_handle(ArgT0&& arg0, ArgT... args); + std::string* mutable_session_handle(); + PROTOBUF_NODISCARD std::string* release_session_handle(); + void set_allocated_session_handle(std::string* session_handle); + private: + const std::string& _internal_session_handle() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_session_handle(const std::string& value); + std::string* _internal_mutable_session_handle(); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.CloseSessionRequest) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr session_handle_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto; +}; +// ------------------------------------------------------------------- + +class CloseSessionResponse final : + public ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase /* @@protoc_insertion_point(class_definition:tensorflow.CloseSessionResponse) */ { + public: + inline CloseSessionResponse() : CloseSessionResponse(nullptr) {} + explicit PROTOBUF_CONSTEXPR CloseSessionResponse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + CloseSessionResponse(const CloseSessionResponse& from); + CloseSessionResponse(CloseSessionResponse&& from) noexcept + : CloseSessionResponse() { + *this = ::std::move(from); + } + + inline CloseSessionResponse& operator=(const CloseSessionResponse& from) { + CopyFrom(from); + return *this; + } + inline CloseSessionResponse& operator=(CloseSessionResponse&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const CloseSessionResponse& default_instance() { + return *internal_default_instance(); + } + static inline const CloseSessionResponse* internal_default_instance() { + return reinterpret_cast( + &_CloseSessionResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = + 9; + + friend void swap(CloseSessionResponse& a, CloseSessionResponse& b) { + a.Swap(&b); + } + inline void Swap(CloseSessionResponse* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(CloseSessionResponse* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + CloseSessionResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::CopyFrom; + inline void CopyFrom(const CloseSessionResponse& from) { + ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::CopyImpl(*this, from); + } + using ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::MergeFrom; + void MergeFrom(const CloseSessionResponse& from) { + ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::MergeImpl(*this, from); + } + public: + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.CloseSessionResponse"; + } + protected: + explicit CloseSessionResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // @@protoc_insertion_point(class_scope:tensorflow.CloseSessionResponse) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto; +}; +// ------------------------------------------------------------------- + +class ResetRequest final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.ResetRequest) */ { + public: + inline ResetRequest() : ResetRequest(nullptr) {} + ~ResetRequest() override; + explicit PROTOBUF_CONSTEXPR ResetRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + ResetRequest(const ResetRequest& from); + ResetRequest(ResetRequest&& from) noexcept + : ResetRequest() { + *this = ::std::move(from); + } + + inline ResetRequest& operator=(const ResetRequest& from) { + CopyFrom(from); + return *this; + } + inline ResetRequest& operator=(ResetRequest&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const ResetRequest& default_instance() { + return *internal_default_instance(); + } + static inline const ResetRequest* internal_default_instance() { + return reinterpret_cast( + &_ResetRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 10; + + friend void swap(ResetRequest& a, ResetRequest& b) { + a.Swap(&b); + } + inline void Swap(ResetRequest* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(ResetRequest* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + ResetRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const ResetRequest& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const ResetRequest& from) { + ResetRequest::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(ResetRequest* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.ResetRequest"; + } + protected: + explicit ResetRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kContainerFieldNumber = 1, + kDeviceFiltersFieldNumber = 2, + }; + // repeated string container = 1; + int container_size() const; + private: + int _internal_container_size() const; + public: + void clear_container(); + const std::string& container(int index) const; + std::string* mutable_container(int index); + void set_container(int index, const std::string& value); + void set_container(int index, std::string&& value); + void set_container(int index, const char* value); + void set_container(int index, const char* value, size_t size); + std::string* add_container(); + void add_container(const std::string& value); + void add_container(std::string&& value); + void add_container(const char* value); + void add_container(const char* value, size_t size); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& container() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* mutable_container(); + private: + const std::string& _internal_container(int index) const; + std::string* _internal_add_container(); + public: + + // repeated string device_filters = 2; + int device_filters_size() const; + private: + int _internal_device_filters_size() const; + public: + void clear_device_filters(); + const std::string& device_filters(int index) const; + std::string* mutable_device_filters(int index); + void set_device_filters(int index, const std::string& value); + void set_device_filters(int index, std::string&& value); + void set_device_filters(int index, const char* value); + void set_device_filters(int index, const char* value, size_t size); + std::string* add_device_filters(); + void add_device_filters(const std::string& value); + void add_device_filters(std::string&& value); + void add_device_filters(const char* value); + void add_device_filters(const char* value, size_t size); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& device_filters() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* mutable_device_filters(); + private: + const std::string& _internal_device_filters(int index) const; + std::string* _internal_add_device_filters(); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.ResetRequest) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField container_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField device_filters_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto; +}; +// ------------------------------------------------------------------- + +class ResetResponse final : + public ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase /* @@protoc_insertion_point(class_definition:tensorflow.ResetResponse) */ { + public: + inline ResetResponse() : ResetResponse(nullptr) {} + explicit PROTOBUF_CONSTEXPR ResetResponse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + ResetResponse(const ResetResponse& from); + ResetResponse(ResetResponse&& from) noexcept + : ResetResponse() { + *this = ::std::move(from); + } + + inline ResetResponse& operator=(const ResetResponse& from) { + CopyFrom(from); + return *this; + } + inline ResetResponse& operator=(ResetResponse&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const ResetResponse& default_instance() { + return *internal_default_instance(); + } + static inline const ResetResponse* internal_default_instance() { + return reinterpret_cast( + &_ResetResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = + 11; + + friend void swap(ResetResponse& a, ResetResponse& b) { + a.Swap(&b); + } + inline void Swap(ResetResponse* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(ResetResponse* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + ResetResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::CopyFrom; + inline void CopyFrom(const ResetResponse& from) { + ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::CopyImpl(*this, from); + } + using ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::MergeFrom; + void MergeFrom(const ResetResponse& from) { + ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::MergeImpl(*this, from); + } + public: + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.ResetResponse"; + } + protected: + explicit ResetResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // @@protoc_insertion_point(class_scope:tensorflow.ResetResponse) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto; +}; +// ------------------------------------------------------------------- + +class ListDevicesRequest final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.ListDevicesRequest) */ { + public: + inline ListDevicesRequest() : ListDevicesRequest(nullptr) {} + ~ListDevicesRequest() override; + explicit PROTOBUF_CONSTEXPR ListDevicesRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + ListDevicesRequest(const ListDevicesRequest& from); + ListDevicesRequest(ListDevicesRequest&& from) noexcept + : ListDevicesRequest() { + *this = ::std::move(from); + } + + inline ListDevicesRequest& operator=(const ListDevicesRequest& from) { + CopyFrom(from); + return *this; + } + inline ListDevicesRequest& operator=(ListDevicesRequest&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const ListDevicesRequest& default_instance() { + return *internal_default_instance(); + } + static inline const ListDevicesRequest* internal_default_instance() { + return reinterpret_cast( + &_ListDevicesRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 12; + + friend void swap(ListDevicesRequest& a, ListDevicesRequest& b) { + a.Swap(&b); + } + inline void Swap(ListDevicesRequest* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(ListDevicesRequest* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + ListDevicesRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const ListDevicesRequest& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const ListDevicesRequest& from) { + ListDevicesRequest::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(ListDevicesRequest* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.ListDevicesRequest"; + } + protected: + explicit ListDevicesRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kSessionHandleFieldNumber = 1, + }; + // string session_handle = 1; + void clear_session_handle(); + const std::string& session_handle() const; + template + void set_session_handle(ArgT0&& arg0, ArgT... args); + std::string* mutable_session_handle(); + PROTOBUF_NODISCARD std::string* release_session_handle(); + void set_allocated_session_handle(std::string* session_handle); + private: + const std::string& _internal_session_handle() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_session_handle(const std::string& value); + std::string* _internal_mutable_session_handle(); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.ListDevicesRequest) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr session_handle_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto; +}; +// ------------------------------------------------------------------- + +class ListDevicesResponse final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.ListDevicesResponse) */ { + public: + inline ListDevicesResponse() : ListDevicesResponse(nullptr) {} + ~ListDevicesResponse() override; + explicit PROTOBUF_CONSTEXPR ListDevicesResponse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + ListDevicesResponse(const ListDevicesResponse& from); + ListDevicesResponse(ListDevicesResponse&& from) noexcept + : ListDevicesResponse() { + *this = ::std::move(from); + } + + inline ListDevicesResponse& operator=(const ListDevicesResponse& from) { + CopyFrom(from); + return *this; + } + inline ListDevicesResponse& operator=(ListDevicesResponse&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const ListDevicesResponse& default_instance() { + return *internal_default_instance(); + } + static inline const ListDevicesResponse* internal_default_instance() { + return reinterpret_cast( + &_ListDevicesResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = + 13; + + friend void swap(ListDevicesResponse& a, ListDevicesResponse& b) { + a.Swap(&b); + } + inline void Swap(ListDevicesResponse* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(ListDevicesResponse* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + ListDevicesResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const ListDevicesResponse& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const ListDevicesResponse& from) { + ListDevicesResponse::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(ListDevicesResponse* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.ListDevicesResponse"; + } + protected: + explicit ListDevicesResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kLocalDeviceFieldNumber = 1, + kRemoteDeviceFieldNumber = 2, + }; + // repeated .tensorflow.DeviceAttributes local_device = 1; + int local_device_size() const; + private: + int _internal_local_device_size() const; + public: + void clear_local_device(); + ::tensorflow::DeviceAttributes* mutable_local_device(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::DeviceAttributes >* + mutable_local_device(); + private: + const ::tensorflow::DeviceAttributes& _internal_local_device(int index) const; + ::tensorflow::DeviceAttributes* _internal_add_local_device(); + public: + const ::tensorflow::DeviceAttributes& local_device(int index) const; + ::tensorflow::DeviceAttributes* add_local_device(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::DeviceAttributes >& + local_device() const; + + // repeated .tensorflow.DeviceAttributes remote_device = 2; + int remote_device_size() const; + private: + int _internal_remote_device_size() const; + public: + void clear_remote_device(); + ::tensorflow::DeviceAttributes* mutable_remote_device(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::DeviceAttributes >* + mutable_remote_device(); + private: + const ::tensorflow::DeviceAttributes& _internal_remote_device(int index) const; + ::tensorflow::DeviceAttributes* _internal_add_remote_device(); + public: + const ::tensorflow::DeviceAttributes& remote_device(int index) const; + ::tensorflow::DeviceAttributes* add_remote_device(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::DeviceAttributes >& + remote_device() const; + + // @@protoc_insertion_point(class_scope:tensorflow.ListDevicesResponse) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::DeviceAttributes > local_device_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::DeviceAttributes > remote_device_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto; +}; +// ------------------------------------------------------------------- + +class MakeCallableRequest final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.MakeCallableRequest) */ { + public: + inline MakeCallableRequest() : MakeCallableRequest(nullptr) {} + ~MakeCallableRequest() override; + explicit PROTOBUF_CONSTEXPR MakeCallableRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + MakeCallableRequest(const MakeCallableRequest& from); + MakeCallableRequest(MakeCallableRequest&& from) noexcept + : MakeCallableRequest() { + *this = ::std::move(from); + } + + inline MakeCallableRequest& operator=(const MakeCallableRequest& from) { + CopyFrom(from); + return *this; + } + inline MakeCallableRequest& operator=(MakeCallableRequest&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const MakeCallableRequest& default_instance() { + return *internal_default_instance(); + } + static inline const MakeCallableRequest* internal_default_instance() { + return reinterpret_cast( + &_MakeCallableRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 14; + + friend void swap(MakeCallableRequest& a, MakeCallableRequest& b) { + a.Swap(&b); + } + inline void Swap(MakeCallableRequest* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(MakeCallableRequest* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + MakeCallableRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const MakeCallableRequest& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const MakeCallableRequest& from) { + MakeCallableRequest::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(MakeCallableRequest* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.MakeCallableRequest"; + } + protected: + explicit MakeCallableRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kSessionHandleFieldNumber = 1, + kOptionsFieldNumber = 2, + kRequestIdFieldNumber = 3, + }; + // string session_handle = 1; + void clear_session_handle(); + const std::string& session_handle() const; + template + void set_session_handle(ArgT0&& arg0, ArgT... args); + std::string* mutable_session_handle(); + PROTOBUF_NODISCARD std::string* release_session_handle(); + void set_allocated_session_handle(std::string* session_handle); + private: + const std::string& _internal_session_handle() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_session_handle(const std::string& value); + std::string* _internal_mutable_session_handle(); + public: + + // .tensorflow.CallableOptions options = 2; + bool has_options() const; + private: + bool _internal_has_options() const; + public: + void clear_options(); + const ::tensorflow::CallableOptions& options() const; + PROTOBUF_NODISCARD ::tensorflow::CallableOptions* release_options(); + ::tensorflow::CallableOptions* mutable_options(); + void set_allocated_options(::tensorflow::CallableOptions* options); + private: + const ::tensorflow::CallableOptions& _internal_options() const; + ::tensorflow::CallableOptions* _internal_mutable_options(); + public: + void unsafe_arena_set_allocated_options( + ::tensorflow::CallableOptions* options); + ::tensorflow::CallableOptions* unsafe_arena_release_options(); + + // int64 request_id = 3; + void clear_request_id(); + int64_t request_id() const; + void set_request_id(int64_t value); + private: + int64_t _internal_request_id() const; + void _internal_set_request_id(int64_t value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.MakeCallableRequest) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr session_handle_; + ::tensorflow::CallableOptions* options_; + int64_t request_id_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto; +}; +// ------------------------------------------------------------------- + +class MakeCallableResponse final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.MakeCallableResponse) */ { + public: + inline MakeCallableResponse() : MakeCallableResponse(nullptr) {} + ~MakeCallableResponse() override; + explicit PROTOBUF_CONSTEXPR MakeCallableResponse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + MakeCallableResponse(const MakeCallableResponse& from); + MakeCallableResponse(MakeCallableResponse&& from) noexcept + : MakeCallableResponse() { + *this = ::std::move(from); + } + + inline MakeCallableResponse& operator=(const MakeCallableResponse& from) { + CopyFrom(from); + return *this; + } + inline MakeCallableResponse& operator=(MakeCallableResponse&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const MakeCallableResponse& default_instance() { + return *internal_default_instance(); + } + static inline const MakeCallableResponse* internal_default_instance() { + return reinterpret_cast( + &_MakeCallableResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = + 15; + + friend void swap(MakeCallableResponse& a, MakeCallableResponse& b) { + a.Swap(&b); + } + inline void Swap(MakeCallableResponse* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(MakeCallableResponse* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + MakeCallableResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const MakeCallableResponse& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const MakeCallableResponse& from) { + MakeCallableResponse::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(MakeCallableResponse* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.MakeCallableResponse"; + } + protected: + explicit MakeCallableResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kHandleFieldNumber = 1, + }; + // int64 handle = 1; + void clear_handle(); + int64_t handle() const; + void set_handle(int64_t value); + private: + int64_t _internal_handle() const; + void _internal_set_handle(int64_t value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.MakeCallableResponse) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + int64_t handle_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto; +}; +// ------------------------------------------------------------------- + +class RunCallableRequest final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.RunCallableRequest) */ { + public: + inline RunCallableRequest() : RunCallableRequest(nullptr) {} + ~RunCallableRequest() override; + explicit PROTOBUF_CONSTEXPR RunCallableRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + RunCallableRequest(const RunCallableRequest& from); + RunCallableRequest(RunCallableRequest&& from) noexcept + : RunCallableRequest() { + *this = ::std::move(from); + } + + inline RunCallableRequest& operator=(const RunCallableRequest& from) { + CopyFrom(from); + return *this; + } + inline RunCallableRequest& operator=(RunCallableRequest&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const RunCallableRequest& default_instance() { + return *internal_default_instance(); + } + static inline const RunCallableRequest* internal_default_instance() { + return reinterpret_cast( + &_RunCallableRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 16; + + friend void swap(RunCallableRequest& a, RunCallableRequest& b) { + a.Swap(&b); + } + inline void Swap(RunCallableRequest* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(RunCallableRequest* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + RunCallableRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const RunCallableRequest& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const RunCallableRequest& from) { + RunCallableRequest::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(RunCallableRequest* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.RunCallableRequest"; + } + protected: + explicit RunCallableRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kFeedFieldNumber = 3, + kSessionHandleFieldNumber = 1, + kHandleFieldNumber = 2, + kRequestIdFieldNumber = 4, + }; + // repeated .tensorflow.TensorProto feed = 3; + int feed_size() const; + private: + int _internal_feed_size() const; + public: + void clear_feed(); + ::tensorflow::TensorProto* mutable_feed(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::TensorProto >* + mutable_feed(); + private: + const ::tensorflow::TensorProto& _internal_feed(int index) const; + ::tensorflow::TensorProto* _internal_add_feed(); + public: + const ::tensorflow::TensorProto& feed(int index) const; + ::tensorflow::TensorProto* add_feed(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::TensorProto >& + feed() const; + + // string session_handle = 1; + void clear_session_handle(); + const std::string& session_handle() const; + template + void set_session_handle(ArgT0&& arg0, ArgT... args); + std::string* mutable_session_handle(); + PROTOBUF_NODISCARD std::string* release_session_handle(); + void set_allocated_session_handle(std::string* session_handle); + private: + const std::string& _internal_session_handle() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_session_handle(const std::string& value); + std::string* _internal_mutable_session_handle(); + public: + + // int64 handle = 2; + void clear_handle(); + int64_t handle() const; + void set_handle(int64_t value); + private: + int64_t _internal_handle() const; + void _internal_set_handle(int64_t value); + public: + + // int64 request_id = 4; + void clear_request_id(); + int64_t request_id() const; + void set_request_id(int64_t value); + private: + int64_t _internal_request_id() const; + void _internal_set_request_id(int64_t value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.RunCallableRequest) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::TensorProto > feed_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr session_handle_; + int64_t handle_; + int64_t request_id_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto; +}; +// ------------------------------------------------------------------- + +class RunCallableResponse final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.RunCallableResponse) */ { + public: + inline RunCallableResponse() : RunCallableResponse(nullptr) {} + ~RunCallableResponse() override; + explicit PROTOBUF_CONSTEXPR RunCallableResponse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + RunCallableResponse(const RunCallableResponse& from); + RunCallableResponse(RunCallableResponse&& from) noexcept + : RunCallableResponse() { + *this = ::std::move(from); + } + + inline RunCallableResponse& operator=(const RunCallableResponse& from) { + CopyFrom(from); + return *this; + } + inline RunCallableResponse& operator=(RunCallableResponse&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const RunCallableResponse& default_instance() { + return *internal_default_instance(); + } + static inline const RunCallableResponse* internal_default_instance() { + return reinterpret_cast( + &_RunCallableResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = + 17; + + friend void swap(RunCallableResponse& a, RunCallableResponse& b) { + a.Swap(&b); + } + inline void Swap(RunCallableResponse* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(RunCallableResponse* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + RunCallableResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const RunCallableResponse& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const RunCallableResponse& from) { + RunCallableResponse::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(RunCallableResponse* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.RunCallableResponse"; + } + protected: + explicit RunCallableResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kFetchFieldNumber = 1, + kMetadataFieldNumber = 2, + }; + // repeated .tensorflow.TensorProto fetch = 1; + int fetch_size() const; + private: + int _internal_fetch_size() const; + public: + void clear_fetch(); + ::tensorflow::TensorProto* mutable_fetch(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::TensorProto >* + mutable_fetch(); + private: + const ::tensorflow::TensorProto& _internal_fetch(int index) const; + ::tensorflow::TensorProto* _internal_add_fetch(); + public: + const ::tensorflow::TensorProto& fetch(int index) const; + ::tensorflow::TensorProto* add_fetch(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::TensorProto >& + fetch() const; + + // .tensorflow.RunMetadata metadata = 2; + bool has_metadata() const; + private: + bool _internal_has_metadata() const; + public: + void clear_metadata(); + const ::tensorflow::RunMetadata& metadata() const; + PROTOBUF_NODISCARD ::tensorflow::RunMetadata* release_metadata(); + ::tensorflow::RunMetadata* mutable_metadata(); + void set_allocated_metadata(::tensorflow::RunMetadata* metadata); + private: + const ::tensorflow::RunMetadata& _internal_metadata() const; + ::tensorflow::RunMetadata* _internal_mutable_metadata(); + public: + void unsafe_arena_set_allocated_metadata( + ::tensorflow::RunMetadata* metadata); + ::tensorflow::RunMetadata* unsafe_arena_release_metadata(); + + // @@protoc_insertion_point(class_scope:tensorflow.RunCallableResponse) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::TensorProto > fetch_; + ::tensorflow::RunMetadata* metadata_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto; +}; +// ------------------------------------------------------------------- + +class ReleaseCallableRequest final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.ReleaseCallableRequest) */ { + public: + inline ReleaseCallableRequest() : ReleaseCallableRequest(nullptr) {} + ~ReleaseCallableRequest() override; + explicit PROTOBUF_CONSTEXPR ReleaseCallableRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + ReleaseCallableRequest(const ReleaseCallableRequest& from); + ReleaseCallableRequest(ReleaseCallableRequest&& from) noexcept + : ReleaseCallableRequest() { + *this = ::std::move(from); + } + + inline ReleaseCallableRequest& operator=(const ReleaseCallableRequest& from) { + CopyFrom(from); + return *this; + } + inline ReleaseCallableRequest& operator=(ReleaseCallableRequest&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const ReleaseCallableRequest& default_instance() { + return *internal_default_instance(); + } + static inline const ReleaseCallableRequest* internal_default_instance() { + return reinterpret_cast( + &_ReleaseCallableRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 18; + + friend void swap(ReleaseCallableRequest& a, ReleaseCallableRequest& b) { + a.Swap(&b); + } + inline void Swap(ReleaseCallableRequest* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(ReleaseCallableRequest* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + ReleaseCallableRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const ReleaseCallableRequest& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const ReleaseCallableRequest& from) { + ReleaseCallableRequest::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(ReleaseCallableRequest* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.ReleaseCallableRequest"; + } + protected: + explicit ReleaseCallableRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kSessionHandleFieldNumber = 1, + kHandleFieldNumber = 2, + }; + // string session_handle = 1; + void clear_session_handle(); + const std::string& session_handle() const; + template + void set_session_handle(ArgT0&& arg0, ArgT... args); + std::string* mutable_session_handle(); + PROTOBUF_NODISCARD std::string* release_session_handle(); + void set_allocated_session_handle(std::string* session_handle); + private: + const std::string& _internal_session_handle() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_session_handle(const std::string& value); + std::string* _internal_mutable_session_handle(); + public: + + // int64 handle = 2; + void clear_handle(); + int64_t handle() const; + void set_handle(int64_t value); + private: + int64_t _internal_handle() const; + void _internal_set_handle(int64_t value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.ReleaseCallableRequest) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr session_handle_; + int64_t handle_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto; +}; +// ------------------------------------------------------------------- + +class ReleaseCallableResponse final : + public ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase /* @@protoc_insertion_point(class_definition:tensorflow.ReleaseCallableResponse) */ { + public: + inline ReleaseCallableResponse() : ReleaseCallableResponse(nullptr) {} + explicit PROTOBUF_CONSTEXPR ReleaseCallableResponse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + ReleaseCallableResponse(const ReleaseCallableResponse& from); + ReleaseCallableResponse(ReleaseCallableResponse&& from) noexcept + : ReleaseCallableResponse() { + *this = ::std::move(from); + } + + inline ReleaseCallableResponse& operator=(const ReleaseCallableResponse& from) { + CopyFrom(from); + return *this; + } + inline ReleaseCallableResponse& operator=(ReleaseCallableResponse&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const ReleaseCallableResponse& default_instance() { + return *internal_default_instance(); + } + static inline const ReleaseCallableResponse* internal_default_instance() { + return reinterpret_cast( + &_ReleaseCallableResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = + 19; + + friend void swap(ReleaseCallableResponse& a, ReleaseCallableResponse& b) { + a.Swap(&b); + } + inline void Swap(ReleaseCallableResponse* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(ReleaseCallableResponse* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + ReleaseCallableResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::CopyFrom; + inline void CopyFrom(const ReleaseCallableResponse& from) { + ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::CopyImpl(*this, from); + } + using ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::MergeFrom; + void MergeFrom(const ReleaseCallableResponse& from) { + ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::MergeImpl(*this, from); + } + public: + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.ReleaseCallableResponse"; + } + protected: + explicit ReleaseCallableResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // @@protoc_insertion_point(class_scope:tensorflow.ReleaseCallableResponse) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto; +}; +// =================================================================== + + +// =================================================================== + +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// CreateSessionRequest + +// .tensorflow.GraphDef graph_def = 1; +inline bool CreateSessionRequest::_internal_has_graph_def() const { + return this != internal_default_instance() && _impl_.graph_def_ != nullptr; +} +inline bool CreateSessionRequest::has_graph_def() const { + return _internal_has_graph_def(); +} +inline const ::tensorflow::GraphDef& CreateSessionRequest::_internal_graph_def() const { + const ::tensorflow::GraphDef* p = _impl_.graph_def_; + return p != nullptr ? *p : reinterpret_cast( + ::tensorflow::_GraphDef_default_instance_); +} +inline const ::tensorflow::GraphDef& CreateSessionRequest::graph_def() const { + // @@protoc_insertion_point(field_get:tensorflow.CreateSessionRequest.graph_def) + return _internal_graph_def(); +} +inline void CreateSessionRequest::unsafe_arena_set_allocated_graph_def( + ::tensorflow::GraphDef* graph_def) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.graph_def_); + } + _impl_.graph_def_ = graph_def; + if (graph_def) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.CreateSessionRequest.graph_def) +} +inline ::tensorflow::GraphDef* CreateSessionRequest::release_graph_def() { + + ::tensorflow::GraphDef* temp = _impl_.graph_def_; + _impl_.graph_def_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tensorflow::GraphDef* CreateSessionRequest::unsafe_arena_release_graph_def() { + // @@protoc_insertion_point(field_release:tensorflow.CreateSessionRequest.graph_def) + + ::tensorflow::GraphDef* temp = _impl_.graph_def_; + _impl_.graph_def_ = nullptr; + return temp; +} +inline ::tensorflow::GraphDef* CreateSessionRequest::_internal_mutable_graph_def() { + + if (_impl_.graph_def_ == nullptr) { + auto* p = CreateMaybeMessage<::tensorflow::GraphDef>(GetArenaForAllocation()); + _impl_.graph_def_ = p; + } + return _impl_.graph_def_; +} +inline ::tensorflow::GraphDef* CreateSessionRequest::mutable_graph_def() { + ::tensorflow::GraphDef* _msg = _internal_mutable_graph_def(); + // @@protoc_insertion_point(field_mutable:tensorflow.CreateSessionRequest.graph_def) + return _msg; +} +inline void CreateSessionRequest::set_allocated_graph_def(::tensorflow::GraphDef* graph_def) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.graph_def_); + } + if (graph_def) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( + reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(graph_def)); + if (message_arena != submessage_arena) { + graph_def = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, graph_def, submessage_arena); + } + + } else { + + } + _impl_.graph_def_ = graph_def; + // @@protoc_insertion_point(field_set_allocated:tensorflow.CreateSessionRequest.graph_def) +} + +// .tensorflow.ConfigProto config = 2; +inline bool CreateSessionRequest::_internal_has_config() const { + return this != internal_default_instance() && _impl_.config_ != nullptr; +} +inline bool CreateSessionRequest::has_config() const { + return _internal_has_config(); +} +inline const ::tensorflow::ConfigProto& CreateSessionRequest::_internal_config() const { + const ::tensorflow::ConfigProto* p = _impl_.config_; + return p != nullptr ? *p : reinterpret_cast( + ::tensorflow::_ConfigProto_default_instance_); +} +inline const ::tensorflow::ConfigProto& CreateSessionRequest::config() const { + // @@protoc_insertion_point(field_get:tensorflow.CreateSessionRequest.config) + return _internal_config(); +} +inline void CreateSessionRequest::unsafe_arena_set_allocated_config( + ::tensorflow::ConfigProto* config) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.config_); + } + _impl_.config_ = config; + if (config) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.CreateSessionRequest.config) +} +inline ::tensorflow::ConfigProto* CreateSessionRequest::release_config() { + + ::tensorflow::ConfigProto* temp = _impl_.config_; + _impl_.config_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tensorflow::ConfigProto* CreateSessionRequest::unsafe_arena_release_config() { + // @@protoc_insertion_point(field_release:tensorflow.CreateSessionRequest.config) + + ::tensorflow::ConfigProto* temp = _impl_.config_; + _impl_.config_ = nullptr; + return temp; +} +inline ::tensorflow::ConfigProto* CreateSessionRequest::_internal_mutable_config() { + + if (_impl_.config_ == nullptr) { + auto* p = CreateMaybeMessage<::tensorflow::ConfigProto>(GetArenaForAllocation()); + _impl_.config_ = p; + } + return _impl_.config_; +} +inline ::tensorflow::ConfigProto* CreateSessionRequest::mutable_config() { + ::tensorflow::ConfigProto* _msg = _internal_mutable_config(); + // @@protoc_insertion_point(field_mutable:tensorflow.CreateSessionRequest.config) + return _msg; +} +inline void CreateSessionRequest::set_allocated_config(::tensorflow::ConfigProto* config) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.config_); + } + if (config) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( + reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(config)); + if (message_arena != submessage_arena) { + config = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, config, submessage_arena); + } + + } else { + + } + _impl_.config_ = config; + // @@protoc_insertion_point(field_set_allocated:tensorflow.CreateSessionRequest.config) +} + +// string target = 3; +inline void CreateSessionRequest::clear_target() { + _impl_.target_.ClearToEmpty(); +} +inline const std::string& CreateSessionRequest::target() const { + // @@protoc_insertion_point(field_get:tensorflow.CreateSessionRequest.target) + return _internal_target(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void CreateSessionRequest::set_target(ArgT0&& arg0, ArgT... args) { + + _impl_.target_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.CreateSessionRequest.target) +} +inline std::string* CreateSessionRequest::mutable_target() { + std::string* _s = _internal_mutable_target(); + // @@protoc_insertion_point(field_mutable:tensorflow.CreateSessionRequest.target) + return _s; +} +inline const std::string& CreateSessionRequest::_internal_target() const { + return _impl_.target_.Get(); +} +inline void CreateSessionRequest::_internal_set_target(const std::string& value) { + + _impl_.target_.Set(value, GetArenaForAllocation()); +} +inline std::string* CreateSessionRequest::_internal_mutable_target() { + + return _impl_.target_.Mutable(GetArenaForAllocation()); +} +inline std::string* CreateSessionRequest::release_target() { + // @@protoc_insertion_point(field_release:tensorflow.CreateSessionRequest.target) + return _impl_.target_.Release(); +} +inline void CreateSessionRequest::set_allocated_target(std::string* target) { + if (target != nullptr) { + + } else { + + } + _impl_.target_.SetAllocated(target, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.target_.IsDefault()) { + _impl_.target_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.CreateSessionRequest.target) +} + +// ------------------------------------------------------------------- + +// CreateSessionResponse + +// string session_handle = 1; +inline void CreateSessionResponse::clear_session_handle() { + _impl_.session_handle_.ClearToEmpty(); +} +inline const std::string& CreateSessionResponse::session_handle() const { + // @@protoc_insertion_point(field_get:tensorflow.CreateSessionResponse.session_handle) + return _internal_session_handle(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void CreateSessionResponse::set_session_handle(ArgT0&& arg0, ArgT... args) { + + _impl_.session_handle_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.CreateSessionResponse.session_handle) +} +inline std::string* CreateSessionResponse::mutable_session_handle() { + std::string* _s = _internal_mutable_session_handle(); + // @@protoc_insertion_point(field_mutable:tensorflow.CreateSessionResponse.session_handle) + return _s; +} +inline const std::string& CreateSessionResponse::_internal_session_handle() const { + return _impl_.session_handle_.Get(); +} +inline void CreateSessionResponse::_internal_set_session_handle(const std::string& value) { + + _impl_.session_handle_.Set(value, GetArenaForAllocation()); +} +inline std::string* CreateSessionResponse::_internal_mutable_session_handle() { + + return _impl_.session_handle_.Mutable(GetArenaForAllocation()); +} +inline std::string* CreateSessionResponse::release_session_handle() { + // @@protoc_insertion_point(field_release:tensorflow.CreateSessionResponse.session_handle) + return _impl_.session_handle_.Release(); +} +inline void CreateSessionResponse::set_allocated_session_handle(std::string* session_handle) { + if (session_handle != nullptr) { + + } else { + + } + _impl_.session_handle_.SetAllocated(session_handle, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.session_handle_.IsDefault()) { + _impl_.session_handle_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.CreateSessionResponse.session_handle) +} + +// int64 graph_version = 2; +inline void CreateSessionResponse::clear_graph_version() { + _impl_.graph_version_ = int64_t{0}; +} +inline int64_t CreateSessionResponse::_internal_graph_version() const { + return _impl_.graph_version_; +} +inline int64_t CreateSessionResponse::graph_version() const { + // @@protoc_insertion_point(field_get:tensorflow.CreateSessionResponse.graph_version) + return _internal_graph_version(); +} +inline void CreateSessionResponse::_internal_set_graph_version(int64_t value) { + + _impl_.graph_version_ = value; +} +inline void CreateSessionResponse::set_graph_version(int64_t value) { + _internal_set_graph_version(value); + // @@protoc_insertion_point(field_set:tensorflow.CreateSessionResponse.graph_version) +} + +// ------------------------------------------------------------------- + +// ExtendSessionRequest + +// string session_handle = 1; +inline void ExtendSessionRequest::clear_session_handle() { + _impl_.session_handle_.ClearToEmpty(); +} +inline const std::string& ExtendSessionRequest::session_handle() const { + // @@protoc_insertion_point(field_get:tensorflow.ExtendSessionRequest.session_handle) + return _internal_session_handle(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void ExtendSessionRequest::set_session_handle(ArgT0&& arg0, ArgT... args) { + + _impl_.session_handle_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.ExtendSessionRequest.session_handle) +} +inline std::string* ExtendSessionRequest::mutable_session_handle() { + std::string* _s = _internal_mutable_session_handle(); + // @@protoc_insertion_point(field_mutable:tensorflow.ExtendSessionRequest.session_handle) + return _s; +} +inline const std::string& ExtendSessionRequest::_internal_session_handle() const { + return _impl_.session_handle_.Get(); +} +inline void ExtendSessionRequest::_internal_set_session_handle(const std::string& value) { + + _impl_.session_handle_.Set(value, GetArenaForAllocation()); +} +inline std::string* ExtendSessionRequest::_internal_mutable_session_handle() { + + return _impl_.session_handle_.Mutable(GetArenaForAllocation()); +} +inline std::string* ExtendSessionRequest::release_session_handle() { + // @@protoc_insertion_point(field_release:tensorflow.ExtendSessionRequest.session_handle) + return _impl_.session_handle_.Release(); +} +inline void ExtendSessionRequest::set_allocated_session_handle(std::string* session_handle) { + if (session_handle != nullptr) { + + } else { + + } + _impl_.session_handle_.SetAllocated(session_handle, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.session_handle_.IsDefault()) { + _impl_.session_handle_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.ExtendSessionRequest.session_handle) +} + +// .tensorflow.GraphDef graph_def = 2; +inline bool ExtendSessionRequest::_internal_has_graph_def() const { + return this != internal_default_instance() && _impl_.graph_def_ != nullptr; +} +inline bool ExtendSessionRequest::has_graph_def() const { + return _internal_has_graph_def(); +} +inline const ::tensorflow::GraphDef& ExtendSessionRequest::_internal_graph_def() const { + const ::tensorflow::GraphDef* p = _impl_.graph_def_; + return p != nullptr ? *p : reinterpret_cast( + ::tensorflow::_GraphDef_default_instance_); +} +inline const ::tensorflow::GraphDef& ExtendSessionRequest::graph_def() const { + // @@protoc_insertion_point(field_get:tensorflow.ExtendSessionRequest.graph_def) + return _internal_graph_def(); +} +inline void ExtendSessionRequest::unsafe_arena_set_allocated_graph_def( + ::tensorflow::GraphDef* graph_def) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.graph_def_); + } + _impl_.graph_def_ = graph_def; + if (graph_def) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.ExtendSessionRequest.graph_def) +} +inline ::tensorflow::GraphDef* ExtendSessionRequest::release_graph_def() { + + ::tensorflow::GraphDef* temp = _impl_.graph_def_; + _impl_.graph_def_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tensorflow::GraphDef* ExtendSessionRequest::unsafe_arena_release_graph_def() { + // @@protoc_insertion_point(field_release:tensorflow.ExtendSessionRequest.graph_def) + + ::tensorflow::GraphDef* temp = _impl_.graph_def_; + _impl_.graph_def_ = nullptr; + return temp; +} +inline ::tensorflow::GraphDef* ExtendSessionRequest::_internal_mutable_graph_def() { + + if (_impl_.graph_def_ == nullptr) { + auto* p = CreateMaybeMessage<::tensorflow::GraphDef>(GetArenaForAllocation()); + _impl_.graph_def_ = p; + } + return _impl_.graph_def_; +} +inline ::tensorflow::GraphDef* ExtendSessionRequest::mutable_graph_def() { + ::tensorflow::GraphDef* _msg = _internal_mutable_graph_def(); + // @@protoc_insertion_point(field_mutable:tensorflow.ExtendSessionRequest.graph_def) + return _msg; +} +inline void ExtendSessionRequest::set_allocated_graph_def(::tensorflow::GraphDef* graph_def) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.graph_def_); + } + if (graph_def) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( + reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(graph_def)); + if (message_arena != submessage_arena) { + graph_def = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, graph_def, submessage_arena); + } + + } else { + + } + _impl_.graph_def_ = graph_def; + // @@protoc_insertion_point(field_set_allocated:tensorflow.ExtendSessionRequest.graph_def) +} + +// int64 current_graph_version = 3; +inline void ExtendSessionRequest::clear_current_graph_version() { + _impl_.current_graph_version_ = int64_t{0}; +} +inline int64_t ExtendSessionRequest::_internal_current_graph_version() const { + return _impl_.current_graph_version_; +} +inline int64_t ExtendSessionRequest::current_graph_version() const { + // @@protoc_insertion_point(field_get:tensorflow.ExtendSessionRequest.current_graph_version) + return _internal_current_graph_version(); +} +inline void ExtendSessionRequest::_internal_set_current_graph_version(int64_t value) { + + _impl_.current_graph_version_ = value; +} +inline void ExtendSessionRequest::set_current_graph_version(int64_t value) { + _internal_set_current_graph_version(value); + // @@protoc_insertion_point(field_set:tensorflow.ExtendSessionRequest.current_graph_version) +} + +// ------------------------------------------------------------------- + +// ExtendSessionResponse + +// int64 new_graph_version = 4; +inline void ExtendSessionResponse::clear_new_graph_version() { + _impl_.new_graph_version_ = int64_t{0}; +} +inline int64_t ExtendSessionResponse::_internal_new_graph_version() const { + return _impl_.new_graph_version_; +} +inline int64_t ExtendSessionResponse::new_graph_version() const { + // @@protoc_insertion_point(field_get:tensorflow.ExtendSessionResponse.new_graph_version) + return _internal_new_graph_version(); +} +inline void ExtendSessionResponse::_internal_set_new_graph_version(int64_t value) { + + _impl_.new_graph_version_ = value; +} +inline void ExtendSessionResponse::set_new_graph_version(int64_t value) { + _internal_set_new_graph_version(value); + // @@protoc_insertion_point(field_set:tensorflow.ExtendSessionResponse.new_graph_version) +} + +// ------------------------------------------------------------------- + +// RunStepRequest + +// string session_handle = 1; +inline void RunStepRequest::clear_session_handle() { + _impl_.session_handle_.ClearToEmpty(); +} +inline const std::string& RunStepRequest::session_handle() const { + // @@protoc_insertion_point(field_get:tensorflow.RunStepRequest.session_handle) + return _internal_session_handle(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void RunStepRequest::set_session_handle(ArgT0&& arg0, ArgT... args) { + + _impl_.session_handle_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.RunStepRequest.session_handle) +} +inline std::string* RunStepRequest::mutable_session_handle() { + std::string* _s = _internal_mutable_session_handle(); + // @@protoc_insertion_point(field_mutable:tensorflow.RunStepRequest.session_handle) + return _s; +} +inline const std::string& RunStepRequest::_internal_session_handle() const { + return _impl_.session_handle_.Get(); +} +inline void RunStepRequest::_internal_set_session_handle(const std::string& value) { + + _impl_.session_handle_.Set(value, GetArenaForAllocation()); +} +inline std::string* RunStepRequest::_internal_mutable_session_handle() { + + return _impl_.session_handle_.Mutable(GetArenaForAllocation()); +} +inline std::string* RunStepRequest::release_session_handle() { + // @@protoc_insertion_point(field_release:tensorflow.RunStepRequest.session_handle) + return _impl_.session_handle_.Release(); +} +inline void RunStepRequest::set_allocated_session_handle(std::string* session_handle) { + if (session_handle != nullptr) { + + } else { + + } + _impl_.session_handle_.SetAllocated(session_handle, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.session_handle_.IsDefault()) { + _impl_.session_handle_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.RunStepRequest.session_handle) +} + +// repeated .tensorflow.NamedTensorProto feed = 2; +inline int RunStepRequest::_internal_feed_size() const { + return _impl_.feed_.size(); +} +inline int RunStepRequest::feed_size() const { + return _internal_feed_size(); +} +inline ::tensorflow::NamedTensorProto* RunStepRequest::mutable_feed(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.RunStepRequest.feed) + return _impl_.feed_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::NamedTensorProto >* +RunStepRequest::mutable_feed() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.RunStepRequest.feed) + return &_impl_.feed_; +} +inline const ::tensorflow::NamedTensorProto& RunStepRequest::_internal_feed(int index) const { + return _impl_.feed_.Get(index); +} +inline const ::tensorflow::NamedTensorProto& RunStepRequest::feed(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.RunStepRequest.feed) + return _internal_feed(index); +} +inline ::tensorflow::NamedTensorProto* RunStepRequest::_internal_add_feed() { + return _impl_.feed_.Add(); +} +inline ::tensorflow::NamedTensorProto* RunStepRequest::add_feed() { + ::tensorflow::NamedTensorProto* _add = _internal_add_feed(); + // @@protoc_insertion_point(field_add:tensorflow.RunStepRequest.feed) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::NamedTensorProto >& +RunStepRequest::feed() const { + // @@protoc_insertion_point(field_list:tensorflow.RunStepRequest.feed) + return _impl_.feed_; +} + +// repeated string fetch = 3; +inline int RunStepRequest::_internal_fetch_size() const { + return _impl_.fetch_.size(); +} +inline int RunStepRequest::fetch_size() const { + return _internal_fetch_size(); +} +inline void RunStepRequest::clear_fetch() { + _impl_.fetch_.Clear(); +} +inline std::string* RunStepRequest::add_fetch() { + std::string* _s = _internal_add_fetch(); + // @@protoc_insertion_point(field_add_mutable:tensorflow.RunStepRequest.fetch) + return _s; +} +inline const std::string& RunStepRequest::_internal_fetch(int index) const { + return _impl_.fetch_.Get(index); +} +inline const std::string& RunStepRequest::fetch(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.RunStepRequest.fetch) + return _internal_fetch(index); +} +inline std::string* RunStepRequest::mutable_fetch(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.RunStepRequest.fetch) + return _impl_.fetch_.Mutable(index); +} +inline void RunStepRequest::set_fetch(int index, const std::string& value) { + _impl_.fetch_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set:tensorflow.RunStepRequest.fetch) +} +inline void RunStepRequest::set_fetch(int index, std::string&& value) { + _impl_.fetch_.Mutable(index)->assign(std::move(value)); + // @@protoc_insertion_point(field_set:tensorflow.RunStepRequest.fetch) +} +inline void RunStepRequest::set_fetch(int index, const char* value) { + GOOGLE_DCHECK(value != nullptr); + _impl_.fetch_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set_char:tensorflow.RunStepRequest.fetch) +} +inline void RunStepRequest::set_fetch(int index, const char* value, size_t size) { + _impl_.fetch_.Mutable(index)->assign( + reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:tensorflow.RunStepRequest.fetch) +} +inline std::string* RunStepRequest::_internal_add_fetch() { + return _impl_.fetch_.Add(); +} +inline void RunStepRequest::add_fetch(const std::string& value) { + _impl_.fetch_.Add()->assign(value); + // @@protoc_insertion_point(field_add:tensorflow.RunStepRequest.fetch) +} +inline void RunStepRequest::add_fetch(std::string&& value) { + _impl_.fetch_.Add(std::move(value)); + // @@protoc_insertion_point(field_add:tensorflow.RunStepRequest.fetch) +} +inline void RunStepRequest::add_fetch(const char* value) { + GOOGLE_DCHECK(value != nullptr); + _impl_.fetch_.Add()->assign(value); + // @@protoc_insertion_point(field_add_char:tensorflow.RunStepRequest.fetch) +} +inline void RunStepRequest::add_fetch(const char* value, size_t size) { + _impl_.fetch_.Add()->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_add_pointer:tensorflow.RunStepRequest.fetch) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& +RunStepRequest::fetch() const { + // @@protoc_insertion_point(field_list:tensorflow.RunStepRequest.fetch) + return _impl_.fetch_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* +RunStepRequest::mutable_fetch() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.RunStepRequest.fetch) + return &_impl_.fetch_; +} + +// repeated string target = 4; +inline int RunStepRequest::_internal_target_size() const { + return _impl_.target_.size(); +} +inline int RunStepRequest::target_size() const { + return _internal_target_size(); +} +inline void RunStepRequest::clear_target() { + _impl_.target_.Clear(); +} +inline std::string* RunStepRequest::add_target() { + std::string* _s = _internal_add_target(); + // @@protoc_insertion_point(field_add_mutable:tensorflow.RunStepRequest.target) + return _s; +} +inline const std::string& RunStepRequest::_internal_target(int index) const { + return _impl_.target_.Get(index); +} +inline const std::string& RunStepRequest::target(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.RunStepRequest.target) + return _internal_target(index); +} +inline std::string* RunStepRequest::mutable_target(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.RunStepRequest.target) + return _impl_.target_.Mutable(index); +} +inline void RunStepRequest::set_target(int index, const std::string& value) { + _impl_.target_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set:tensorflow.RunStepRequest.target) +} +inline void RunStepRequest::set_target(int index, std::string&& value) { + _impl_.target_.Mutable(index)->assign(std::move(value)); + // @@protoc_insertion_point(field_set:tensorflow.RunStepRequest.target) +} +inline void RunStepRequest::set_target(int index, const char* value) { + GOOGLE_DCHECK(value != nullptr); + _impl_.target_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set_char:tensorflow.RunStepRequest.target) +} +inline void RunStepRequest::set_target(int index, const char* value, size_t size) { + _impl_.target_.Mutable(index)->assign( + reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:tensorflow.RunStepRequest.target) +} +inline std::string* RunStepRequest::_internal_add_target() { + return _impl_.target_.Add(); +} +inline void RunStepRequest::add_target(const std::string& value) { + _impl_.target_.Add()->assign(value); + // @@protoc_insertion_point(field_add:tensorflow.RunStepRequest.target) +} +inline void RunStepRequest::add_target(std::string&& value) { + _impl_.target_.Add(std::move(value)); + // @@protoc_insertion_point(field_add:tensorflow.RunStepRequest.target) +} +inline void RunStepRequest::add_target(const char* value) { + GOOGLE_DCHECK(value != nullptr); + _impl_.target_.Add()->assign(value); + // @@protoc_insertion_point(field_add_char:tensorflow.RunStepRequest.target) +} +inline void RunStepRequest::add_target(const char* value, size_t size) { + _impl_.target_.Add()->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_add_pointer:tensorflow.RunStepRequest.target) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& +RunStepRequest::target() const { + // @@protoc_insertion_point(field_list:tensorflow.RunStepRequest.target) + return _impl_.target_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* +RunStepRequest::mutable_target() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.RunStepRequest.target) + return &_impl_.target_; +} + +// .tensorflow.RunOptions options = 5; +inline bool RunStepRequest::_internal_has_options() const { + return this != internal_default_instance() && _impl_.options_ != nullptr; +} +inline bool RunStepRequest::has_options() const { + return _internal_has_options(); +} +inline const ::tensorflow::RunOptions& RunStepRequest::_internal_options() const { + const ::tensorflow::RunOptions* p = _impl_.options_; + return p != nullptr ? *p : reinterpret_cast( + ::tensorflow::_RunOptions_default_instance_); +} +inline const ::tensorflow::RunOptions& RunStepRequest::options() const { + // @@protoc_insertion_point(field_get:tensorflow.RunStepRequest.options) + return _internal_options(); +} +inline void RunStepRequest::unsafe_arena_set_allocated_options( + ::tensorflow::RunOptions* options) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.options_); + } + _impl_.options_ = options; + if (options) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.RunStepRequest.options) +} +inline ::tensorflow::RunOptions* RunStepRequest::release_options() { + + ::tensorflow::RunOptions* temp = _impl_.options_; + _impl_.options_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tensorflow::RunOptions* RunStepRequest::unsafe_arena_release_options() { + // @@protoc_insertion_point(field_release:tensorflow.RunStepRequest.options) + + ::tensorflow::RunOptions* temp = _impl_.options_; + _impl_.options_ = nullptr; + return temp; +} +inline ::tensorflow::RunOptions* RunStepRequest::_internal_mutable_options() { + + if (_impl_.options_ == nullptr) { + auto* p = CreateMaybeMessage<::tensorflow::RunOptions>(GetArenaForAllocation()); + _impl_.options_ = p; + } + return _impl_.options_; +} +inline ::tensorflow::RunOptions* RunStepRequest::mutable_options() { + ::tensorflow::RunOptions* _msg = _internal_mutable_options(); + // @@protoc_insertion_point(field_mutable:tensorflow.RunStepRequest.options) + return _msg; +} +inline void RunStepRequest::set_allocated_options(::tensorflow::RunOptions* options) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.options_); + } + if (options) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( + reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(options)); + if (message_arena != submessage_arena) { + options = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, options, submessage_arena); + } + + } else { + + } + _impl_.options_ = options; + // @@protoc_insertion_point(field_set_allocated:tensorflow.RunStepRequest.options) +} + +// string partial_run_handle = 6; +inline void RunStepRequest::clear_partial_run_handle() { + _impl_.partial_run_handle_.ClearToEmpty(); +} +inline const std::string& RunStepRequest::partial_run_handle() const { + // @@protoc_insertion_point(field_get:tensorflow.RunStepRequest.partial_run_handle) + return _internal_partial_run_handle(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void RunStepRequest::set_partial_run_handle(ArgT0&& arg0, ArgT... args) { + + _impl_.partial_run_handle_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.RunStepRequest.partial_run_handle) +} +inline std::string* RunStepRequest::mutable_partial_run_handle() { + std::string* _s = _internal_mutable_partial_run_handle(); + // @@protoc_insertion_point(field_mutable:tensorflow.RunStepRequest.partial_run_handle) + return _s; +} +inline const std::string& RunStepRequest::_internal_partial_run_handle() const { + return _impl_.partial_run_handle_.Get(); +} +inline void RunStepRequest::_internal_set_partial_run_handle(const std::string& value) { + + _impl_.partial_run_handle_.Set(value, GetArenaForAllocation()); +} +inline std::string* RunStepRequest::_internal_mutable_partial_run_handle() { + + return _impl_.partial_run_handle_.Mutable(GetArenaForAllocation()); +} +inline std::string* RunStepRequest::release_partial_run_handle() { + // @@protoc_insertion_point(field_release:tensorflow.RunStepRequest.partial_run_handle) + return _impl_.partial_run_handle_.Release(); +} +inline void RunStepRequest::set_allocated_partial_run_handle(std::string* partial_run_handle) { + if (partial_run_handle != nullptr) { + + } else { + + } + _impl_.partial_run_handle_.SetAllocated(partial_run_handle, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.partial_run_handle_.IsDefault()) { + _impl_.partial_run_handle_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.RunStepRequest.partial_run_handle) +} + +// bool store_errors_in_response_body = 7; +inline void RunStepRequest::clear_store_errors_in_response_body() { + _impl_.store_errors_in_response_body_ = false; +} +inline bool RunStepRequest::_internal_store_errors_in_response_body() const { + return _impl_.store_errors_in_response_body_; +} +inline bool RunStepRequest::store_errors_in_response_body() const { + // @@protoc_insertion_point(field_get:tensorflow.RunStepRequest.store_errors_in_response_body) + return _internal_store_errors_in_response_body(); +} +inline void RunStepRequest::_internal_set_store_errors_in_response_body(bool value) { + + _impl_.store_errors_in_response_body_ = value; +} +inline void RunStepRequest::set_store_errors_in_response_body(bool value) { + _internal_set_store_errors_in_response_body(value); + // @@protoc_insertion_point(field_set:tensorflow.RunStepRequest.store_errors_in_response_body) +} + +// int64 request_id = 8; +inline void RunStepRequest::clear_request_id() { + _impl_.request_id_ = int64_t{0}; +} +inline int64_t RunStepRequest::_internal_request_id() const { + return _impl_.request_id_; +} +inline int64_t RunStepRequest::request_id() const { + // @@protoc_insertion_point(field_get:tensorflow.RunStepRequest.request_id) + return _internal_request_id(); +} +inline void RunStepRequest::_internal_set_request_id(int64_t value) { + + _impl_.request_id_ = value; +} +inline void RunStepRequest::set_request_id(int64_t value) { + _internal_set_request_id(value); + // @@protoc_insertion_point(field_set:tensorflow.RunStepRequest.request_id) +} + +// ------------------------------------------------------------------- + +// RunStepResponse + +// repeated .tensorflow.NamedTensorProto tensor = 1; +inline int RunStepResponse::_internal_tensor_size() const { + return _impl_.tensor_.size(); +} +inline int RunStepResponse::tensor_size() const { + return _internal_tensor_size(); +} +inline ::tensorflow::NamedTensorProto* RunStepResponse::mutable_tensor(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.RunStepResponse.tensor) + return _impl_.tensor_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::NamedTensorProto >* +RunStepResponse::mutable_tensor() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.RunStepResponse.tensor) + return &_impl_.tensor_; +} +inline const ::tensorflow::NamedTensorProto& RunStepResponse::_internal_tensor(int index) const { + return _impl_.tensor_.Get(index); +} +inline const ::tensorflow::NamedTensorProto& RunStepResponse::tensor(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.RunStepResponse.tensor) + return _internal_tensor(index); +} +inline ::tensorflow::NamedTensorProto* RunStepResponse::_internal_add_tensor() { + return _impl_.tensor_.Add(); +} +inline ::tensorflow::NamedTensorProto* RunStepResponse::add_tensor() { + ::tensorflow::NamedTensorProto* _add = _internal_add_tensor(); + // @@protoc_insertion_point(field_add:tensorflow.RunStepResponse.tensor) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::NamedTensorProto >& +RunStepResponse::tensor() const { + // @@protoc_insertion_point(field_list:tensorflow.RunStepResponse.tensor) + return _impl_.tensor_; +} + +// .tensorflow.RunMetadata metadata = 2; +inline bool RunStepResponse::_internal_has_metadata() const { + return this != internal_default_instance() && _impl_.metadata_ != nullptr; +} +inline bool RunStepResponse::has_metadata() const { + return _internal_has_metadata(); +} +inline const ::tensorflow::RunMetadata& RunStepResponse::_internal_metadata() const { + const ::tensorflow::RunMetadata* p = _impl_.metadata_; + return p != nullptr ? *p : reinterpret_cast( + ::tensorflow::_RunMetadata_default_instance_); +} +inline const ::tensorflow::RunMetadata& RunStepResponse::metadata() const { + // @@protoc_insertion_point(field_get:tensorflow.RunStepResponse.metadata) + return _internal_metadata(); +} +inline void RunStepResponse::unsafe_arena_set_allocated_metadata( + ::tensorflow::RunMetadata* metadata) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.metadata_); + } + _impl_.metadata_ = metadata; + if (metadata) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.RunStepResponse.metadata) +} +inline ::tensorflow::RunMetadata* RunStepResponse::release_metadata() { + + ::tensorflow::RunMetadata* temp = _impl_.metadata_; + _impl_.metadata_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tensorflow::RunMetadata* RunStepResponse::unsafe_arena_release_metadata() { + // @@protoc_insertion_point(field_release:tensorflow.RunStepResponse.metadata) + + ::tensorflow::RunMetadata* temp = _impl_.metadata_; + _impl_.metadata_ = nullptr; + return temp; +} +inline ::tensorflow::RunMetadata* RunStepResponse::_internal_mutable_metadata() { + + if (_impl_.metadata_ == nullptr) { + auto* p = CreateMaybeMessage<::tensorflow::RunMetadata>(GetArenaForAllocation()); + _impl_.metadata_ = p; + } + return _impl_.metadata_; +} +inline ::tensorflow::RunMetadata* RunStepResponse::mutable_metadata() { + ::tensorflow::RunMetadata* _msg = _internal_mutable_metadata(); + // @@protoc_insertion_point(field_mutable:tensorflow.RunStepResponse.metadata) + return _msg; +} +inline void RunStepResponse::set_allocated_metadata(::tensorflow::RunMetadata* metadata) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.metadata_); + } + if (metadata) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( + reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(metadata)); + if (message_arena != submessage_arena) { + metadata = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, metadata, submessage_arena); + } + + } else { + + } + _impl_.metadata_ = metadata; + // @@protoc_insertion_point(field_set_allocated:tensorflow.RunStepResponse.metadata) +} + +// .tensorflow.error.Code status_code = 3; +inline void RunStepResponse::clear_status_code() { + _impl_.status_code_ = 0; +} +inline ::tensorflow::error::Code RunStepResponse::_internal_status_code() const { + return static_cast< ::tensorflow::error::Code >(_impl_.status_code_); +} +inline ::tensorflow::error::Code RunStepResponse::status_code() const { + // @@protoc_insertion_point(field_get:tensorflow.RunStepResponse.status_code) + return _internal_status_code(); +} +inline void RunStepResponse::_internal_set_status_code(::tensorflow::error::Code value) { + + _impl_.status_code_ = value; +} +inline void RunStepResponse::set_status_code(::tensorflow::error::Code value) { + _internal_set_status_code(value); + // @@protoc_insertion_point(field_set:tensorflow.RunStepResponse.status_code) +} + +// string status_error_message = 4; +inline void RunStepResponse::clear_status_error_message() { + _impl_.status_error_message_.ClearToEmpty(); +} +inline const std::string& RunStepResponse::status_error_message() const { + // @@protoc_insertion_point(field_get:tensorflow.RunStepResponse.status_error_message) + return _internal_status_error_message(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void RunStepResponse::set_status_error_message(ArgT0&& arg0, ArgT... args) { + + _impl_.status_error_message_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.RunStepResponse.status_error_message) +} +inline std::string* RunStepResponse::mutable_status_error_message() { + std::string* _s = _internal_mutable_status_error_message(); + // @@protoc_insertion_point(field_mutable:tensorflow.RunStepResponse.status_error_message) + return _s; +} +inline const std::string& RunStepResponse::_internal_status_error_message() const { + return _impl_.status_error_message_.Get(); +} +inline void RunStepResponse::_internal_set_status_error_message(const std::string& value) { + + _impl_.status_error_message_.Set(value, GetArenaForAllocation()); +} +inline std::string* RunStepResponse::_internal_mutable_status_error_message() { + + return _impl_.status_error_message_.Mutable(GetArenaForAllocation()); +} +inline std::string* RunStepResponse::release_status_error_message() { + // @@protoc_insertion_point(field_release:tensorflow.RunStepResponse.status_error_message) + return _impl_.status_error_message_.Release(); +} +inline void RunStepResponse::set_allocated_status_error_message(std::string* status_error_message) { + if (status_error_message != nullptr) { + + } else { + + } + _impl_.status_error_message_.SetAllocated(status_error_message, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.status_error_message_.IsDefault()) { + _impl_.status_error_message_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.RunStepResponse.status_error_message) +} + +// ------------------------------------------------------------------- + +// PartialRunSetupRequest + +// string session_handle = 1; +inline void PartialRunSetupRequest::clear_session_handle() { + _impl_.session_handle_.ClearToEmpty(); +} +inline const std::string& PartialRunSetupRequest::session_handle() const { + // @@protoc_insertion_point(field_get:tensorflow.PartialRunSetupRequest.session_handle) + return _internal_session_handle(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void PartialRunSetupRequest::set_session_handle(ArgT0&& arg0, ArgT... args) { + + _impl_.session_handle_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.PartialRunSetupRequest.session_handle) +} +inline std::string* PartialRunSetupRequest::mutable_session_handle() { + std::string* _s = _internal_mutable_session_handle(); + // @@protoc_insertion_point(field_mutable:tensorflow.PartialRunSetupRequest.session_handle) + return _s; +} +inline const std::string& PartialRunSetupRequest::_internal_session_handle() const { + return _impl_.session_handle_.Get(); +} +inline void PartialRunSetupRequest::_internal_set_session_handle(const std::string& value) { + + _impl_.session_handle_.Set(value, GetArenaForAllocation()); +} +inline std::string* PartialRunSetupRequest::_internal_mutable_session_handle() { + + return _impl_.session_handle_.Mutable(GetArenaForAllocation()); +} +inline std::string* PartialRunSetupRequest::release_session_handle() { + // @@protoc_insertion_point(field_release:tensorflow.PartialRunSetupRequest.session_handle) + return _impl_.session_handle_.Release(); +} +inline void PartialRunSetupRequest::set_allocated_session_handle(std::string* session_handle) { + if (session_handle != nullptr) { + + } else { + + } + _impl_.session_handle_.SetAllocated(session_handle, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.session_handle_.IsDefault()) { + _impl_.session_handle_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.PartialRunSetupRequest.session_handle) +} + +// repeated string feed = 2; +inline int PartialRunSetupRequest::_internal_feed_size() const { + return _impl_.feed_.size(); +} +inline int PartialRunSetupRequest::feed_size() const { + return _internal_feed_size(); +} +inline void PartialRunSetupRequest::clear_feed() { + _impl_.feed_.Clear(); +} +inline std::string* PartialRunSetupRequest::add_feed() { + std::string* _s = _internal_add_feed(); + // @@protoc_insertion_point(field_add_mutable:tensorflow.PartialRunSetupRequest.feed) + return _s; +} +inline const std::string& PartialRunSetupRequest::_internal_feed(int index) const { + return _impl_.feed_.Get(index); +} +inline const std::string& PartialRunSetupRequest::feed(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.PartialRunSetupRequest.feed) + return _internal_feed(index); +} +inline std::string* PartialRunSetupRequest::mutable_feed(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.PartialRunSetupRequest.feed) + return _impl_.feed_.Mutable(index); +} +inline void PartialRunSetupRequest::set_feed(int index, const std::string& value) { + _impl_.feed_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set:tensorflow.PartialRunSetupRequest.feed) +} +inline void PartialRunSetupRequest::set_feed(int index, std::string&& value) { + _impl_.feed_.Mutable(index)->assign(std::move(value)); + // @@protoc_insertion_point(field_set:tensorflow.PartialRunSetupRequest.feed) +} +inline void PartialRunSetupRequest::set_feed(int index, const char* value) { + GOOGLE_DCHECK(value != nullptr); + _impl_.feed_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set_char:tensorflow.PartialRunSetupRequest.feed) +} +inline void PartialRunSetupRequest::set_feed(int index, const char* value, size_t size) { + _impl_.feed_.Mutable(index)->assign( + reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:tensorflow.PartialRunSetupRequest.feed) +} +inline std::string* PartialRunSetupRequest::_internal_add_feed() { + return _impl_.feed_.Add(); +} +inline void PartialRunSetupRequest::add_feed(const std::string& value) { + _impl_.feed_.Add()->assign(value); + // @@protoc_insertion_point(field_add:tensorflow.PartialRunSetupRequest.feed) +} +inline void PartialRunSetupRequest::add_feed(std::string&& value) { + _impl_.feed_.Add(std::move(value)); + // @@protoc_insertion_point(field_add:tensorflow.PartialRunSetupRequest.feed) +} +inline void PartialRunSetupRequest::add_feed(const char* value) { + GOOGLE_DCHECK(value != nullptr); + _impl_.feed_.Add()->assign(value); + // @@protoc_insertion_point(field_add_char:tensorflow.PartialRunSetupRequest.feed) +} +inline void PartialRunSetupRequest::add_feed(const char* value, size_t size) { + _impl_.feed_.Add()->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_add_pointer:tensorflow.PartialRunSetupRequest.feed) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& +PartialRunSetupRequest::feed() const { + // @@protoc_insertion_point(field_list:tensorflow.PartialRunSetupRequest.feed) + return _impl_.feed_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* +PartialRunSetupRequest::mutable_feed() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.PartialRunSetupRequest.feed) + return &_impl_.feed_; +} + +// repeated string fetch = 3; +inline int PartialRunSetupRequest::_internal_fetch_size() const { + return _impl_.fetch_.size(); +} +inline int PartialRunSetupRequest::fetch_size() const { + return _internal_fetch_size(); +} +inline void PartialRunSetupRequest::clear_fetch() { + _impl_.fetch_.Clear(); +} +inline std::string* PartialRunSetupRequest::add_fetch() { + std::string* _s = _internal_add_fetch(); + // @@protoc_insertion_point(field_add_mutable:tensorflow.PartialRunSetupRequest.fetch) + return _s; +} +inline const std::string& PartialRunSetupRequest::_internal_fetch(int index) const { + return _impl_.fetch_.Get(index); +} +inline const std::string& PartialRunSetupRequest::fetch(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.PartialRunSetupRequest.fetch) + return _internal_fetch(index); +} +inline std::string* PartialRunSetupRequest::mutable_fetch(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.PartialRunSetupRequest.fetch) + return _impl_.fetch_.Mutable(index); +} +inline void PartialRunSetupRequest::set_fetch(int index, const std::string& value) { + _impl_.fetch_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set:tensorflow.PartialRunSetupRequest.fetch) +} +inline void PartialRunSetupRequest::set_fetch(int index, std::string&& value) { + _impl_.fetch_.Mutable(index)->assign(std::move(value)); + // @@protoc_insertion_point(field_set:tensorflow.PartialRunSetupRequest.fetch) +} +inline void PartialRunSetupRequest::set_fetch(int index, const char* value) { + GOOGLE_DCHECK(value != nullptr); + _impl_.fetch_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set_char:tensorflow.PartialRunSetupRequest.fetch) +} +inline void PartialRunSetupRequest::set_fetch(int index, const char* value, size_t size) { + _impl_.fetch_.Mutable(index)->assign( + reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:tensorflow.PartialRunSetupRequest.fetch) +} +inline std::string* PartialRunSetupRequest::_internal_add_fetch() { + return _impl_.fetch_.Add(); +} +inline void PartialRunSetupRequest::add_fetch(const std::string& value) { + _impl_.fetch_.Add()->assign(value); + // @@protoc_insertion_point(field_add:tensorflow.PartialRunSetupRequest.fetch) +} +inline void PartialRunSetupRequest::add_fetch(std::string&& value) { + _impl_.fetch_.Add(std::move(value)); + // @@protoc_insertion_point(field_add:tensorflow.PartialRunSetupRequest.fetch) +} +inline void PartialRunSetupRequest::add_fetch(const char* value) { + GOOGLE_DCHECK(value != nullptr); + _impl_.fetch_.Add()->assign(value); + // @@protoc_insertion_point(field_add_char:tensorflow.PartialRunSetupRequest.fetch) +} +inline void PartialRunSetupRequest::add_fetch(const char* value, size_t size) { + _impl_.fetch_.Add()->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_add_pointer:tensorflow.PartialRunSetupRequest.fetch) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& +PartialRunSetupRequest::fetch() const { + // @@protoc_insertion_point(field_list:tensorflow.PartialRunSetupRequest.fetch) + return _impl_.fetch_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* +PartialRunSetupRequest::mutable_fetch() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.PartialRunSetupRequest.fetch) + return &_impl_.fetch_; +} + +// repeated string target = 4; +inline int PartialRunSetupRequest::_internal_target_size() const { + return _impl_.target_.size(); +} +inline int PartialRunSetupRequest::target_size() const { + return _internal_target_size(); +} +inline void PartialRunSetupRequest::clear_target() { + _impl_.target_.Clear(); +} +inline std::string* PartialRunSetupRequest::add_target() { + std::string* _s = _internal_add_target(); + // @@protoc_insertion_point(field_add_mutable:tensorflow.PartialRunSetupRequest.target) + return _s; +} +inline const std::string& PartialRunSetupRequest::_internal_target(int index) const { + return _impl_.target_.Get(index); +} +inline const std::string& PartialRunSetupRequest::target(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.PartialRunSetupRequest.target) + return _internal_target(index); +} +inline std::string* PartialRunSetupRequest::mutable_target(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.PartialRunSetupRequest.target) + return _impl_.target_.Mutable(index); +} +inline void PartialRunSetupRequest::set_target(int index, const std::string& value) { + _impl_.target_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set:tensorflow.PartialRunSetupRequest.target) +} +inline void PartialRunSetupRequest::set_target(int index, std::string&& value) { + _impl_.target_.Mutable(index)->assign(std::move(value)); + // @@protoc_insertion_point(field_set:tensorflow.PartialRunSetupRequest.target) +} +inline void PartialRunSetupRequest::set_target(int index, const char* value) { + GOOGLE_DCHECK(value != nullptr); + _impl_.target_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set_char:tensorflow.PartialRunSetupRequest.target) +} +inline void PartialRunSetupRequest::set_target(int index, const char* value, size_t size) { + _impl_.target_.Mutable(index)->assign( + reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:tensorflow.PartialRunSetupRequest.target) +} +inline std::string* PartialRunSetupRequest::_internal_add_target() { + return _impl_.target_.Add(); +} +inline void PartialRunSetupRequest::add_target(const std::string& value) { + _impl_.target_.Add()->assign(value); + // @@protoc_insertion_point(field_add:tensorflow.PartialRunSetupRequest.target) +} +inline void PartialRunSetupRequest::add_target(std::string&& value) { + _impl_.target_.Add(std::move(value)); + // @@protoc_insertion_point(field_add:tensorflow.PartialRunSetupRequest.target) +} +inline void PartialRunSetupRequest::add_target(const char* value) { + GOOGLE_DCHECK(value != nullptr); + _impl_.target_.Add()->assign(value); + // @@protoc_insertion_point(field_add_char:tensorflow.PartialRunSetupRequest.target) +} +inline void PartialRunSetupRequest::add_target(const char* value, size_t size) { + _impl_.target_.Add()->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_add_pointer:tensorflow.PartialRunSetupRequest.target) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& +PartialRunSetupRequest::target() const { + // @@protoc_insertion_point(field_list:tensorflow.PartialRunSetupRequest.target) + return _impl_.target_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* +PartialRunSetupRequest::mutable_target() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.PartialRunSetupRequest.target) + return &_impl_.target_; +} + +// int64 request_id = 5; +inline void PartialRunSetupRequest::clear_request_id() { + _impl_.request_id_ = int64_t{0}; +} +inline int64_t PartialRunSetupRequest::_internal_request_id() const { + return _impl_.request_id_; +} +inline int64_t PartialRunSetupRequest::request_id() const { + // @@protoc_insertion_point(field_get:tensorflow.PartialRunSetupRequest.request_id) + return _internal_request_id(); +} +inline void PartialRunSetupRequest::_internal_set_request_id(int64_t value) { + + _impl_.request_id_ = value; +} +inline void PartialRunSetupRequest::set_request_id(int64_t value) { + _internal_set_request_id(value); + // @@protoc_insertion_point(field_set:tensorflow.PartialRunSetupRequest.request_id) +} + +// ------------------------------------------------------------------- + +// PartialRunSetupResponse + +// string partial_run_handle = 1; +inline void PartialRunSetupResponse::clear_partial_run_handle() { + _impl_.partial_run_handle_.ClearToEmpty(); +} +inline const std::string& PartialRunSetupResponse::partial_run_handle() const { + // @@protoc_insertion_point(field_get:tensorflow.PartialRunSetupResponse.partial_run_handle) + return _internal_partial_run_handle(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void PartialRunSetupResponse::set_partial_run_handle(ArgT0&& arg0, ArgT... args) { + + _impl_.partial_run_handle_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.PartialRunSetupResponse.partial_run_handle) +} +inline std::string* PartialRunSetupResponse::mutable_partial_run_handle() { + std::string* _s = _internal_mutable_partial_run_handle(); + // @@protoc_insertion_point(field_mutable:tensorflow.PartialRunSetupResponse.partial_run_handle) + return _s; +} +inline const std::string& PartialRunSetupResponse::_internal_partial_run_handle() const { + return _impl_.partial_run_handle_.Get(); +} +inline void PartialRunSetupResponse::_internal_set_partial_run_handle(const std::string& value) { + + _impl_.partial_run_handle_.Set(value, GetArenaForAllocation()); +} +inline std::string* PartialRunSetupResponse::_internal_mutable_partial_run_handle() { + + return _impl_.partial_run_handle_.Mutable(GetArenaForAllocation()); +} +inline std::string* PartialRunSetupResponse::release_partial_run_handle() { + // @@protoc_insertion_point(field_release:tensorflow.PartialRunSetupResponse.partial_run_handle) + return _impl_.partial_run_handle_.Release(); +} +inline void PartialRunSetupResponse::set_allocated_partial_run_handle(std::string* partial_run_handle) { + if (partial_run_handle != nullptr) { + + } else { + + } + _impl_.partial_run_handle_.SetAllocated(partial_run_handle, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.partial_run_handle_.IsDefault()) { + _impl_.partial_run_handle_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.PartialRunSetupResponse.partial_run_handle) +} + +// ------------------------------------------------------------------- + +// CloseSessionRequest + +// string session_handle = 1; +inline void CloseSessionRequest::clear_session_handle() { + _impl_.session_handle_.ClearToEmpty(); +} +inline const std::string& CloseSessionRequest::session_handle() const { + // @@protoc_insertion_point(field_get:tensorflow.CloseSessionRequest.session_handle) + return _internal_session_handle(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void CloseSessionRequest::set_session_handle(ArgT0&& arg0, ArgT... args) { + + _impl_.session_handle_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.CloseSessionRequest.session_handle) +} +inline std::string* CloseSessionRequest::mutable_session_handle() { + std::string* _s = _internal_mutable_session_handle(); + // @@protoc_insertion_point(field_mutable:tensorflow.CloseSessionRequest.session_handle) + return _s; +} +inline const std::string& CloseSessionRequest::_internal_session_handle() const { + return _impl_.session_handle_.Get(); +} +inline void CloseSessionRequest::_internal_set_session_handle(const std::string& value) { + + _impl_.session_handle_.Set(value, GetArenaForAllocation()); +} +inline std::string* CloseSessionRequest::_internal_mutable_session_handle() { + + return _impl_.session_handle_.Mutable(GetArenaForAllocation()); +} +inline std::string* CloseSessionRequest::release_session_handle() { + // @@protoc_insertion_point(field_release:tensorflow.CloseSessionRequest.session_handle) + return _impl_.session_handle_.Release(); +} +inline void CloseSessionRequest::set_allocated_session_handle(std::string* session_handle) { + if (session_handle != nullptr) { + + } else { + + } + _impl_.session_handle_.SetAllocated(session_handle, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.session_handle_.IsDefault()) { + _impl_.session_handle_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.CloseSessionRequest.session_handle) +} + +// ------------------------------------------------------------------- + +// CloseSessionResponse + +// ------------------------------------------------------------------- + +// ResetRequest + +// repeated string container = 1; +inline int ResetRequest::_internal_container_size() const { + return _impl_.container_.size(); +} +inline int ResetRequest::container_size() const { + return _internal_container_size(); +} +inline void ResetRequest::clear_container() { + _impl_.container_.Clear(); +} +inline std::string* ResetRequest::add_container() { + std::string* _s = _internal_add_container(); + // @@protoc_insertion_point(field_add_mutable:tensorflow.ResetRequest.container) + return _s; +} +inline const std::string& ResetRequest::_internal_container(int index) const { + return _impl_.container_.Get(index); +} +inline const std::string& ResetRequest::container(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.ResetRequest.container) + return _internal_container(index); +} +inline std::string* ResetRequest::mutable_container(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.ResetRequest.container) + return _impl_.container_.Mutable(index); +} +inline void ResetRequest::set_container(int index, const std::string& value) { + _impl_.container_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set:tensorflow.ResetRequest.container) +} +inline void ResetRequest::set_container(int index, std::string&& value) { + _impl_.container_.Mutable(index)->assign(std::move(value)); + // @@protoc_insertion_point(field_set:tensorflow.ResetRequest.container) +} +inline void ResetRequest::set_container(int index, const char* value) { + GOOGLE_DCHECK(value != nullptr); + _impl_.container_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set_char:tensorflow.ResetRequest.container) +} +inline void ResetRequest::set_container(int index, const char* value, size_t size) { + _impl_.container_.Mutable(index)->assign( + reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:tensorflow.ResetRequest.container) +} +inline std::string* ResetRequest::_internal_add_container() { + return _impl_.container_.Add(); +} +inline void ResetRequest::add_container(const std::string& value) { + _impl_.container_.Add()->assign(value); + // @@protoc_insertion_point(field_add:tensorflow.ResetRequest.container) +} +inline void ResetRequest::add_container(std::string&& value) { + _impl_.container_.Add(std::move(value)); + // @@protoc_insertion_point(field_add:tensorflow.ResetRequest.container) +} +inline void ResetRequest::add_container(const char* value) { + GOOGLE_DCHECK(value != nullptr); + _impl_.container_.Add()->assign(value); + // @@protoc_insertion_point(field_add_char:tensorflow.ResetRequest.container) +} +inline void ResetRequest::add_container(const char* value, size_t size) { + _impl_.container_.Add()->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_add_pointer:tensorflow.ResetRequest.container) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& +ResetRequest::container() const { + // @@protoc_insertion_point(field_list:tensorflow.ResetRequest.container) + return _impl_.container_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* +ResetRequest::mutable_container() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.ResetRequest.container) + return &_impl_.container_; +} + +// repeated string device_filters = 2; +inline int ResetRequest::_internal_device_filters_size() const { + return _impl_.device_filters_.size(); +} +inline int ResetRequest::device_filters_size() const { + return _internal_device_filters_size(); +} +inline void ResetRequest::clear_device_filters() { + _impl_.device_filters_.Clear(); +} +inline std::string* ResetRequest::add_device_filters() { + std::string* _s = _internal_add_device_filters(); + // @@protoc_insertion_point(field_add_mutable:tensorflow.ResetRequest.device_filters) + return _s; +} +inline const std::string& ResetRequest::_internal_device_filters(int index) const { + return _impl_.device_filters_.Get(index); +} +inline const std::string& ResetRequest::device_filters(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.ResetRequest.device_filters) + return _internal_device_filters(index); +} +inline std::string* ResetRequest::mutable_device_filters(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.ResetRequest.device_filters) + return _impl_.device_filters_.Mutable(index); +} +inline void ResetRequest::set_device_filters(int index, const std::string& value) { + _impl_.device_filters_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set:tensorflow.ResetRequest.device_filters) +} +inline void ResetRequest::set_device_filters(int index, std::string&& value) { + _impl_.device_filters_.Mutable(index)->assign(std::move(value)); + // @@protoc_insertion_point(field_set:tensorflow.ResetRequest.device_filters) +} +inline void ResetRequest::set_device_filters(int index, const char* value) { + GOOGLE_DCHECK(value != nullptr); + _impl_.device_filters_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set_char:tensorflow.ResetRequest.device_filters) +} +inline void ResetRequest::set_device_filters(int index, const char* value, size_t size) { + _impl_.device_filters_.Mutable(index)->assign( + reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:tensorflow.ResetRequest.device_filters) +} +inline std::string* ResetRequest::_internal_add_device_filters() { + return _impl_.device_filters_.Add(); +} +inline void ResetRequest::add_device_filters(const std::string& value) { + _impl_.device_filters_.Add()->assign(value); + // @@protoc_insertion_point(field_add:tensorflow.ResetRequest.device_filters) +} +inline void ResetRequest::add_device_filters(std::string&& value) { + _impl_.device_filters_.Add(std::move(value)); + // @@protoc_insertion_point(field_add:tensorflow.ResetRequest.device_filters) +} +inline void ResetRequest::add_device_filters(const char* value) { + GOOGLE_DCHECK(value != nullptr); + _impl_.device_filters_.Add()->assign(value); + // @@protoc_insertion_point(field_add_char:tensorflow.ResetRequest.device_filters) +} +inline void ResetRequest::add_device_filters(const char* value, size_t size) { + _impl_.device_filters_.Add()->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_add_pointer:tensorflow.ResetRequest.device_filters) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& +ResetRequest::device_filters() const { + // @@protoc_insertion_point(field_list:tensorflow.ResetRequest.device_filters) + return _impl_.device_filters_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* +ResetRequest::mutable_device_filters() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.ResetRequest.device_filters) + return &_impl_.device_filters_; +} + +// ------------------------------------------------------------------- + +// ResetResponse + +// ------------------------------------------------------------------- + +// ListDevicesRequest + +// string session_handle = 1; +inline void ListDevicesRequest::clear_session_handle() { + _impl_.session_handle_.ClearToEmpty(); +} +inline const std::string& ListDevicesRequest::session_handle() const { + // @@protoc_insertion_point(field_get:tensorflow.ListDevicesRequest.session_handle) + return _internal_session_handle(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void ListDevicesRequest::set_session_handle(ArgT0&& arg0, ArgT... args) { + + _impl_.session_handle_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.ListDevicesRequest.session_handle) +} +inline std::string* ListDevicesRequest::mutable_session_handle() { + std::string* _s = _internal_mutable_session_handle(); + // @@protoc_insertion_point(field_mutable:tensorflow.ListDevicesRequest.session_handle) + return _s; +} +inline const std::string& ListDevicesRequest::_internal_session_handle() const { + return _impl_.session_handle_.Get(); +} +inline void ListDevicesRequest::_internal_set_session_handle(const std::string& value) { + + _impl_.session_handle_.Set(value, GetArenaForAllocation()); +} +inline std::string* ListDevicesRequest::_internal_mutable_session_handle() { + + return _impl_.session_handle_.Mutable(GetArenaForAllocation()); +} +inline std::string* ListDevicesRequest::release_session_handle() { + // @@protoc_insertion_point(field_release:tensorflow.ListDevicesRequest.session_handle) + return _impl_.session_handle_.Release(); +} +inline void ListDevicesRequest::set_allocated_session_handle(std::string* session_handle) { + if (session_handle != nullptr) { + + } else { + + } + _impl_.session_handle_.SetAllocated(session_handle, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.session_handle_.IsDefault()) { + _impl_.session_handle_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.ListDevicesRequest.session_handle) +} + +// ------------------------------------------------------------------- + +// ListDevicesResponse + +// repeated .tensorflow.DeviceAttributes local_device = 1; +inline int ListDevicesResponse::_internal_local_device_size() const { + return _impl_.local_device_.size(); +} +inline int ListDevicesResponse::local_device_size() const { + return _internal_local_device_size(); +} +inline ::tensorflow::DeviceAttributes* ListDevicesResponse::mutable_local_device(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.ListDevicesResponse.local_device) + return _impl_.local_device_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::DeviceAttributes >* +ListDevicesResponse::mutable_local_device() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.ListDevicesResponse.local_device) + return &_impl_.local_device_; +} +inline const ::tensorflow::DeviceAttributes& ListDevicesResponse::_internal_local_device(int index) const { + return _impl_.local_device_.Get(index); +} +inline const ::tensorflow::DeviceAttributes& ListDevicesResponse::local_device(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.ListDevicesResponse.local_device) + return _internal_local_device(index); +} +inline ::tensorflow::DeviceAttributes* ListDevicesResponse::_internal_add_local_device() { + return _impl_.local_device_.Add(); +} +inline ::tensorflow::DeviceAttributes* ListDevicesResponse::add_local_device() { + ::tensorflow::DeviceAttributes* _add = _internal_add_local_device(); + // @@protoc_insertion_point(field_add:tensorflow.ListDevicesResponse.local_device) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::DeviceAttributes >& +ListDevicesResponse::local_device() const { + // @@protoc_insertion_point(field_list:tensorflow.ListDevicesResponse.local_device) + return _impl_.local_device_; +} + +// repeated .tensorflow.DeviceAttributes remote_device = 2; +inline int ListDevicesResponse::_internal_remote_device_size() const { + return _impl_.remote_device_.size(); +} +inline int ListDevicesResponse::remote_device_size() const { + return _internal_remote_device_size(); +} +inline ::tensorflow::DeviceAttributes* ListDevicesResponse::mutable_remote_device(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.ListDevicesResponse.remote_device) + return _impl_.remote_device_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::DeviceAttributes >* +ListDevicesResponse::mutable_remote_device() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.ListDevicesResponse.remote_device) + return &_impl_.remote_device_; +} +inline const ::tensorflow::DeviceAttributes& ListDevicesResponse::_internal_remote_device(int index) const { + return _impl_.remote_device_.Get(index); +} +inline const ::tensorflow::DeviceAttributes& ListDevicesResponse::remote_device(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.ListDevicesResponse.remote_device) + return _internal_remote_device(index); +} +inline ::tensorflow::DeviceAttributes* ListDevicesResponse::_internal_add_remote_device() { + return _impl_.remote_device_.Add(); +} +inline ::tensorflow::DeviceAttributes* ListDevicesResponse::add_remote_device() { + ::tensorflow::DeviceAttributes* _add = _internal_add_remote_device(); + // @@protoc_insertion_point(field_add:tensorflow.ListDevicesResponse.remote_device) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::DeviceAttributes >& +ListDevicesResponse::remote_device() const { + // @@protoc_insertion_point(field_list:tensorflow.ListDevicesResponse.remote_device) + return _impl_.remote_device_; +} + +// ------------------------------------------------------------------- + +// MakeCallableRequest + +// string session_handle = 1; +inline void MakeCallableRequest::clear_session_handle() { + _impl_.session_handle_.ClearToEmpty(); +} +inline const std::string& MakeCallableRequest::session_handle() const { + // @@protoc_insertion_point(field_get:tensorflow.MakeCallableRequest.session_handle) + return _internal_session_handle(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void MakeCallableRequest::set_session_handle(ArgT0&& arg0, ArgT... args) { + + _impl_.session_handle_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.MakeCallableRequest.session_handle) +} +inline std::string* MakeCallableRequest::mutable_session_handle() { + std::string* _s = _internal_mutable_session_handle(); + // @@protoc_insertion_point(field_mutable:tensorflow.MakeCallableRequest.session_handle) + return _s; +} +inline const std::string& MakeCallableRequest::_internal_session_handle() const { + return _impl_.session_handle_.Get(); +} +inline void MakeCallableRequest::_internal_set_session_handle(const std::string& value) { + + _impl_.session_handle_.Set(value, GetArenaForAllocation()); +} +inline std::string* MakeCallableRequest::_internal_mutable_session_handle() { + + return _impl_.session_handle_.Mutable(GetArenaForAllocation()); +} +inline std::string* MakeCallableRequest::release_session_handle() { + // @@protoc_insertion_point(field_release:tensorflow.MakeCallableRequest.session_handle) + return _impl_.session_handle_.Release(); +} +inline void MakeCallableRequest::set_allocated_session_handle(std::string* session_handle) { + if (session_handle != nullptr) { + + } else { + + } + _impl_.session_handle_.SetAllocated(session_handle, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.session_handle_.IsDefault()) { + _impl_.session_handle_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.MakeCallableRequest.session_handle) +} + +// .tensorflow.CallableOptions options = 2; +inline bool MakeCallableRequest::_internal_has_options() const { + return this != internal_default_instance() && _impl_.options_ != nullptr; +} +inline bool MakeCallableRequest::has_options() const { + return _internal_has_options(); +} +inline const ::tensorflow::CallableOptions& MakeCallableRequest::_internal_options() const { + const ::tensorflow::CallableOptions* p = _impl_.options_; + return p != nullptr ? *p : reinterpret_cast( + ::tensorflow::_CallableOptions_default_instance_); +} +inline const ::tensorflow::CallableOptions& MakeCallableRequest::options() const { + // @@protoc_insertion_point(field_get:tensorflow.MakeCallableRequest.options) + return _internal_options(); +} +inline void MakeCallableRequest::unsafe_arena_set_allocated_options( + ::tensorflow::CallableOptions* options) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.options_); + } + _impl_.options_ = options; + if (options) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.MakeCallableRequest.options) +} +inline ::tensorflow::CallableOptions* MakeCallableRequest::release_options() { + + ::tensorflow::CallableOptions* temp = _impl_.options_; + _impl_.options_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tensorflow::CallableOptions* MakeCallableRequest::unsafe_arena_release_options() { + // @@protoc_insertion_point(field_release:tensorflow.MakeCallableRequest.options) + + ::tensorflow::CallableOptions* temp = _impl_.options_; + _impl_.options_ = nullptr; + return temp; +} +inline ::tensorflow::CallableOptions* MakeCallableRequest::_internal_mutable_options() { + + if (_impl_.options_ == nullptr) { + auto* p = CreateMaybeMessage<::tensorflow::CallableOptions>(GetArenaForAllocation()); + _impl_.options_ = p; + } + return _impl_.options_; +} +inline ::tensorflow::CallableOptions* MakeCallableRequest::mutable_options() { + ::tensorflow::CallableOptions* _msg = _internal_mutable_options(); + // @@protoc_insertion_point(field_mutable:tensorflow.MakeCallableRequest.options) + return _msg; +} +inline void MakeCallableRequest::set_allocated_options(::tensorflow::CallableOptions* options) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.options_); + } + if (options) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( + reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(options)); + if (message_arena != submessage_arena) { + options = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, options, submessage_arena); + } + + } else { + + } + _impl_.options_ = options; + // @@protoc_insertion_point(field_set_allocated:tensorflow.MakeCallableRequest.options) +} + +// int64 request_id = 3; +inline void MakeCallableRequest::clear_request_id() { + _impl_.request_id_ = int64_t{0}; +} +inline int64_t MakeCallableRequest::_internal_request_id() const { + return _impl_.request_id_; +} +inline int64_t MakeCallableRequest::request_id() const { + // @@protoc_insertion_point(field_get:tensorflow.MakeCallableRequest.request_id) + return _internal_request_id(); +} +inline void MakeCallableRequest::_internal_set_request_id(int64_t value) { + + _impl_.request_id_ = value; +} +inline void MakeCallableRequest::set_request_id(int64_t value) { + _internal_set_request_id(value); + // @@protoc_insertion_point(field_set:tensorflow.MakeCallableRequest.request_id) +} + +// ------------------------------------------------------------------- + +// MakeCallableResponse + +// int64 handle = 1; +inline void MakeCallableResponse::clear_handle() { + _impl_.handle_ = int64_t{0}; +} +inline int64_t MakeCallableResponse::_internal_handle() const { + return _impl_.handle_; +} +inline int64_t MakeCallableResponse::handle() const { + // @@protoc_insertion_point(field_get:tensorflow.MakeCallableResponse.handle) + return _internal_handle(); +} +inline void MakeCallableResponse::_internal_set_handle(int64_t value) { + + _impl_.handle_ = value; +} +inline void MakeCallableResponse::set_handle(int64_t value) { + _internal_set_handle(value); + // @@protoc_insertion_point(field_set:tensorflow.MakeCallableResponse.handle) +} + +// ------------------------------------------------------------------- + +// RunCallableRequest + +// string session_handle = 1; +inline void RunCallableRequest::clear_session_handle() { + _impl_.session_handle_.ClearToEmpty(); +} +inline const std::string& RunCallableRequest::session_handle() const { + // @@protoc_insertion_point(field_get:tensorflow.RunCallableRequest.session_handle) + return _internal_session_handle(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void RunCallableRequest::set_session_handle(ArgT0&& arg0, ArgT... args) { + + _impl_.session_handle_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.RunCallableRequest.session_handle) +} +inline std::string* RunCallableRequest::mutable_session_handle() { + std::string* _s = _internal_mutable_session_handle(); + // @@protoc_insertion_point(field_mutable:tensorflow.RunCallableRequest.session_handle) + return _s; +} +inline const std::string& RunCallableRequest::_internal_session_handle() const { + return _impl_.session_handle_.Get(); +} +inline void RunCallableRequest::_internal_set_session_handle(const std::string& value) { + + _impl_.session_handle_.Set(value, GetArenaForAllocation()); +} +inline std::string* RunCallableRequest::_internal_mutable_session_handle() { + + return _impl_.session_handle_.Mutable(GetArenaForAllocation()); +} +inline std::string* RunCallableRequest::release_session_handle() { + // @@protoc_insertion_point(field_release:tensorflow.RunCallableRequest.session_handle) + return _impl_.session_handle_.Release(); +} +inline void RunCallableRequest::set_allocated_session_handle(std::string* session_handle) { + if (session_handle != nullptr) { + + } else { + + } + _impl_.session_handle_.SetAllocated(session_handle, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.session_handle_.IsDefault()) { + _impl_.session_handle_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.RunCallableRequest.session_handle) +} + +// int64 handle = 2; +inline void RunCallableRequest::clear_handle() { + _impl_.handle_ = int64_t{0}; +} +inline int64_t RunCallableRequest::_internal_handle() const { + return _impl_.handle_; +} +inline int64_t RunCallableRequest::handle() const { + // @@protoc_insertion_point(field_get:tensorflow.RunCallableRequest.handle) + return _internal_handle(); +} +inline void RunCallableRequest::_internal_set_handle(int64_t value) { + + _impl_.handle_ = value; +} +inline void RunCallableRequest::set_handle(int64_t value) { + _internal_set_handle(value); + // @@protoc_insertion_point(field_set:tensorflow.RunCallableRequest.handle) +} + +// repeated .tensorflow.TensorProto feed = 3; +inline int RunCallableRequest::_internal_feed_size() const { + return _impl_.feed_.size(); +} +inline int RunCallableRequest::feed_size() const { + return _internal_feed_size(); +} +inline ::tensorflow::TensorProto* RunCallableRequest::mutable_feed(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.RunCallableRequest.feed) + return _impl_.feed_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::TensorProto >* +RunCallableRequest::mutable_feed() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.RunCallableRequest.feed) + return &_impl_.feed_; +} +inline const ::tensorflow::TensorProto& RunCallableRequest::_internal_feed(int index) const { + return _impl_.feed_.Get(index); +} +inline const ::tensorflow::TensorProto& RunCallableRequest::feed(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.RunCallableRequest.feed) + return _internal_feed(index); +} +inline ::tensorflow::TensorProto* RunCallableRequest::_internal_add_feed() { + return _impl_.feed_.Add(); +} +inline ::tensorflow::TensorProto* RunCallableRequest::add_feed() { + ::tensorflow::TensorProto* _add = _internal_add_feed(); + // @@protoc_insertion_point(field_add:tensorflow.RunCallableRequest.feed) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::TensorProto >& +RunCallableRequest::feed() const { + // @@protoc_insertion_point(field_list:tensorflow.RunCallableRequest.feed) + return _impl_.feed_; +} + +// int64 request_id = 4; +inline void RunCallableRequest::clear_request_id() { + _impl_.request_id_ = int64_t{0}; +} +inline int64_t RunCallableRequest::_internal_request_id() const { + return _impl_.request_id_; +} +inline int64_t RunCallableRequest::request_id() const { + // @@protoc_insertion_point(field_get:tensorflow.RunCallableRequest.request_id) + return _internal_request_id(); +} +inline void RunCallableRequest::_internal_set_request_id(int64_t value) { + + _impl_.request_id_ = value; +} +inline void RunCallableRequest::set_request_id(int64_t value) { + _internal_set_request_id(value); + // @@protoc_insertion_point(field_set:tensorflow.RunCallableRequest.request_id) +} + +// ------------------------------------------------------------------- + +// RunCallableResponse + +// repeated .tensorflow.TensorProto fetch = 1; +inline int RunCallableResponse::_internal_fetch_size() const { + return _impl_.fetch_.size(); +} +inline int RunCallableResponse::fetch_size() const { + return _internal_fetch_size(); +} +inline ::tensorflow::TensorProto* RunCallableResponse::mutable_fetch(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.RunCallableResponse.fetch) + return _impl_.fetch_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::TensorProto >* +RunCallableResponse::mutable_fetch() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.RunCallableResponse.fetch) + return &_impl_.fetch_; +} +inline const ::tensorflow::TensorProto& RunCallableResponse::_internal_fetch(int index) const { + return _impl_.fetch_.Get(index); +} +inline const ::tensorflow::TensorProto& RunCallableResponse::fetch(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.RunCallableResponse.fetch) + return _internal_fetch(index); +} +inline ::tensorflow::TensorProto* RunCallableResponse::_internal_add_fetch() { + return _impl_.fetch_.Add(); +} +inline ::tensorflow::TensorProto* RunCallableResponse::add_fetch() { + ::tensorflow::TensorProto* _add = _internal_add_fetch(); + // @@protoc_insertion_point(field_add:tensorflow.RunCallableResponse.fetch) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::TensorProto >& +RunCallableResponse::fetch() const { + // @@protoc_insertion_point(field_list:tensorflow.RunCallableResponse.fetch) + return _impl_.fetch_; +} + +// .tensorflow.RunMetadata metadata = 2; +inline bool RunCallableResponse::_internal_has_metadata() const { + return this != internal_default_instance() && _impl_.metadata_ != nullptr; +} +inline bool RunCallableResponse::has_metadata() const { + return _internal_has_metadata(); +} +inline const ::tensorflow::RunMetadata& RunCallableResponse::_internal_metadata() const { + const ::tensorflow::RunMetadata* p = _impl_.metadata_; + return p != nullptr ? *p : reinterpret_cast( + ::tensorflow::_RunMetadata_default_instance_); +} +inline const ::tensorflow::RunMetadata& RunCallableResponse::metadata() const { + // @@protoc_insertion_point(field_get:tensorflow.RunCallableResponse.metadata) + return _internal_metadata(); +} +inline void RunCallableResponse::unsafe_arena_set_allocated_metadata( + ::tensorflow::RunMetadata* metadata) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.metadata_); + } + _impl_.metadata_ = metadata; + if (metadata) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.RunCallableResponse.metadata) +} +inline ::tensorflow::RunMetadata* RunCallableResponse::release_metadata() { + + ::tensorflow::RunMetadata* temp = _impl_.metadata_; + _impl_.metadata_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tensorflow::RunMetadata* RunCallableResponse::unsafe_arena_release_metadata() { + // @@protoc_insertion_point(field_release:tensorflow.RunCallableResponse.metadata) + + ::tensorflow::RunMetadata* temp = _impl_.metadata_; + _impl_.metadata_ = nullptr; + return temp; +} +inline ::tensorflow::RunMetadata* RunCallableResponse::_internal_mutable_metadata() { + + if (_impl_.metadata_ == nullptr) { + auto* p = CreateMaybeMessage<::tensorflow::RunMetadata>(GetArenaForAllocation()); + _impl_.metadata_ = p; + } + return _impl_.metadata_; +} +inline ::tensorflow::RunMetadata* RunCallableResponse::mutable_metadata() { + ::tensorflow::RunMetadata* _msg = _internal_mutable_metadata(); + // @@protoc_insertion_point(field_mutable:tensorflow.RunCallableResponse.metadata) + return _msg; +} +inline void RunCallableResponse::set_allocated_metadata(::tensorflow::RunMetadata* metadata) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.metadata_); + } + if (metadata) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( + reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(metadata)); + if (message_arena != submessage_arena) { + metadata = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, metadata, submessage_arena); + } + + } else { + + } + _impl_.metadata_ = metadata; + // @@protoc_insertion_point(field_set_allocated:tensorflow.RunCallableResponse.metadata) +} + +// ------------------------------------------------------------------- + +// ReleaseCallableRequest + +// string session_handle = 1; +inline void ReleaseCallableRequest::clear_session_handle() { + _impl_.session_handle_.ClearToEmpty(); +} +inline const std::string& ReleaseCallableRequest::session_handle() const { + // @@protoc_insertion_point(field_get:tensorflow.ReleaseCallableRequest.session_handle) + return _internal_session_handle(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void ReleaseCallableRequest::set_session_handle(ArgT0&& arg0, ArgT... args) { + + _impl_.session_handle_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.ReleaseCallableRequest.session_handle) +} +inline std::string* ReleaseCallableRequest::mutable_session_handle() { + std::string* _s = _internal_mutable_session_handle(); + // @@protoc_insertion_point(field_mutable:tensorflow.ReleaseCallableRequest.session_handle) + return _s; +} +inline const std::string& ReleaseCallableRequest::_internal_session_handle() const { + return _impl_.session_handle_.Get(); +} +inline void ReleaseCallableRequest::_internal_set_session_handle(const std::string& value) { + + _impl_.session_handle_.Set(value, GetArenaForAllocation()); +} +inline std::string* ReleaseCallableRequest::_internal_mutable_session_handle() { + + return _impl_.session_handle_.Mutable(GetArenaForAllocation()); +} +inline std::string* ReleaseCallableRequest::release_session_handle() { + // @@protoc_insertion_point(field_release:tensorflow.ReleaseCallableRequest.session_handle) + return _impl_.session_handle_.Release(); +} +inline void ReleaseCallableRequest::set_allocated_session_handle(std::string* session_handle) { + if (session_handle != nullptr) { + + } else { + + } + _impl_.session_handle_.SetAllocated(session_handle, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.session_handle_.IsDefault()) { + _impl_.session_handle_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.ReleaseCallableRequest.session_handle) +} + +// int64 handle = 2; +inline void ReleaseCallableRequest::clear_handle() { + _impl_.handle_ = int64_t{0}; +} +inline int64_t ReleaseCallableRequest::_internal_handle() const { + return _impl_.handle_; +} +inline int64_t ReleaseCallableRequest::handle() const { + // @@protoc_insertion_point(field_get:tensorflow.ReleaseCallableRequest.handle) + return _internal_handle(); +} +inline void ReleaseCallableRequest::_internal_set_handle(int64_t value) { + + _impl_.handle_ = value; +} +inline void ReleaseCallableRequest::set_handle(int64_t value) { + _internal_set_handle(value); + // @@protoc_insertion_point(field_set:tensorflow.ReleaseCallableRequest.handle) +} + +// ------------------------------------------------------------------- + +// ReleaseCallableResponse + +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + + +// @@protoc_insertion_point(namespace_scope) + +} // namespace tensorflow + +// @@protoc_insertion_point(global_scope) + +#include +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/meta_graph.pb.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/meta_graph.pb.h new file mode 100644 index 0000000000000000000000000000000000000000..08dab33e74d58e67c892ba8187ef6ad15dd44676 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/meta_graph.pb.h @@ -0,0 +1,5513 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/meta_graph.proto + +#ifndef GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprotobuf_2fmeta_5fgraph_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprotobuf_2fmeta_5fgraph_2eproto + +#include +#include + +#include +#if PROTOBUF_VERSION < 3021000 +#error This file was generated by a newer version of protoc which is +#error incompatible with your Protocol Buffer headers. Please update +#error your headers. +#endif +#if 3021009 < PROTOBUF_MIN_PROTOC_VERSION +#error This file was generated by an older version of protoc which is +#error incompatible with your Protocol Buffer headers. Please +#error regenerate this file with a newer version of protoc. +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include // IWYU pragma: export +#include // IWYU pragma: export +#include // IWYU pragma: export +#include +#include +#include +#include +#include "tensorflow/core/framework/graph.pb.h" +#include "tensorflow/core/framework/op_def.pb.h" +#include "tensorflow/core/framework/tensor.pb.h" +#include "tensorflow/core/framework/tensor_shape.pb.h" +#include "tensorflow/core/framework/types.pb.h" +#include "tensorflow/core/protobuf/saved_object_graph.pb.h" +#include "tensorflow/core/protobuf/saver.pb.h" +#include "tensorflow/core/protobuf/struct.pb.h" +// @@protoc_insertion_point(includes) +#include +#define PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2fprotobuf_2fmeta_5fgraph_2eproto +PROTOBUF_NAMESPACE_OPEN +namespace internal { +class AnyMetadata; +} // namespace internal +PROTOBUF_NAMESPACE_CLOSE + +// Internal implementation detail -- do not use these members. +struct TableStruct_tensorflow_2fcore_2fprotobuf_2fmeta_5fgraph_2eproto { + static const uint32_t offsets[]; +}; +extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_tensorflow_2fcore_2fprotobuf_2fmeta_5fgraph_2eproto; +namespace tensorflow { +class AssetFileDef; +struct AssetFileDefDefaultTypeInternal; +extern AssetFileDefDefaultTypeInternal _AssetFileDef_default_instance_; +class CollectionDef; +struct CollectionDefDefaultTypeInternal; +extern CollectionDefDefaultTypeInternal _CollectionDef_default_instance_; +class CollectionDef_AnyList; +struct CollectionDef_AnyListDefaultTypeInternal; +extern CollectionDef_AnyListDefaultTypeInternal _CollectionDef_AnyList_default_instance_; +class CollectionDef_BytesList; +struct CollectionDef_BytesListDefaultTypeInternal; +extern CollectionDef_BytesListDefaultTypeInternal _CollectionDef_BytesList_default_instance_; +class CollectionDef_FloatList; +struct CollectionDef_FloatListDefaultTypeInternal; +extern CollectionDef_FloatListDefaultTypeInternal _CollectionDef_FloatList_default_instance_; +class CollectionDef_Int64List; +struct CollectionDef_Int64ListDefaultTypeInternal; +extern CollectionDef_Int64ListDefaultTypeInternal _CollectionDef_Int64List_default_instance_; +class CollectionDef_NodeList; +struct CollectionDef_NodeListDefaultTypeInternal; +extern CollectionDef_NodeListDefaultTypeInternal _CollectionDef_NodeList_default_instance_; +class MetaGraphDef; +struct MetaGraphDefDefaultTypeInternal; +extern MetaGraphDefDefaultTypeInternal _MetaGraphDef_default_instance_; +class MetaGraphDef_CollectionDefEntry_DoNotUse; +struct MetaGraphDef_CollectionDefEntry_DoNotUseDefaultTypeInternal; +extern MetaGraphDef_CollectionDefEntry_DoNotUseDefaultTypeInternal _MetaGraphDef_CollectionDefEntry_DoNotUse_default_instance_; +class MetaGraphDef_MetaInfoDef; +struct MetaGraphDef_MetaInfoDefDefaultTypeInternal; +extern MetaGraphDef_MetaInfoDefDefaultTypeInternal _MetaGraphDef_MetaInfoDef_default_instance_; +class MetaGraphDef_MetaInfoDef_FunctionAliasesEntry_DoNotUse; +struct MetaGraphDef_MetaInfoDef_FunctionAliasesEntry_DoNotUseDefaultTypeInternal; +extern MetaGraphDef_MetaInfoDef_FunctionAliasesEntry_DoNotUseDefaultTypeInternal _MetaGraphDef_MetaInfoDef_FunctionAliasesEntry_DoNotUse_default_instance_; +class MetaGraphDef_SignatureDefEntry_DoNotUse; +struct MetaGraphDef_SignatureDefEntry_DoNotUseDefaultTypeInternal; +extern MetaGraphDef_SignatureDefEntry_DoNotUseDefaultTypeInternal _MetaGraphDef_SignatureDefEntry_DoNotUse_default_instance_; +class SignatureDef; +struct SignatureDefDefaultTypeInternal; +extern SignatureDefDefaultTypeInternal _SignatureDef_default_instance_; +class SignatureDef_DefaultsEntry_DoNotUse; +struct SignatureDef_DefaultsEntry_DoNotUseDefaultTypeInternal; +extern SignatureDef_DefaultsEntry_DoNotUseDefaultTypeInternal _SignatureDef_DefaultsEntry_DoNotUse_default_instance_; +class SignatureDef_InputsEntry_DoNotUse; +struct SignatureDef_InputsEntry_DoNotUseDefaultTypeInternal; +extern SignatureDef_InputsEntry_DoNotUseDefaultTypeInternal _SignatureDef_InputsEntry_DoNotUse_default_instance_; +class SignatureDef_OutputsEntry_DoNotUse; +struct SignatureDef_OutputsEntry_DoNotUseDefaultTypeInternal; +extern SignatureDef_OutputsEntry_DoNotUseDefaultTypeInternal _SignatureDef_OutputsEntry_DoNotUse_default_instance_; +class TensorInfo; +struct TensorInfoDefaultTypeInternal; +extern TensorInfoDefaultTypeInternal _TensorInfo_default_instance_; +class TensorInfo_CompositeTensor; +struct TensorInfo_CompositeTensorDefaultTypeInternal; +extern TensorInfo_CompositeTensorDefaultTypeInternal _TensorInfo_CompositeTensor_default_instance_; +class TensorInfo_CooSparse; +struct TensorInfo_CooSparseDefaultTypeInternal; +extern TensorInfo_CooSparseDefaultTypeInternal _TensorInfo_CooSparse_default_instance_; +} // namespace tensorflow +PROTOBUF_NAMESPACE_OPEN +template<> ::tensorflow::AssetFileDef* Arena::CreateMaybeMessage<::tensorflow::AssetFileDef>(Arena*); +template<> ::tensorflow::CollectionDef* Arena::CreateMaybeMessage<::tensorflow::CollectionDef>(Arena*); +template<> ::tensorflow::CollectionDef_AnyList* Arena::CreateMaybeMessage<::tensorflow::CollectionDef_AnyList>(Arena*); +template<> ::tensorflow::CollectionDef_BytesList* Arena::CreateMaybeMessage<::tensorflow::CollectionDef_BytesList>(Arena*); +template<> ::tensorflow::CollectionDef_FloatList* Arena::CreateMaybeMessage<::tensorflow::CollectionDef_FloatList>(Arena*); +template<> ::tensorflow::CollectionDef_Int64List* Arena::CreateMaybeMessage<::tensorflow::CollectionDef_Int64List>(Arena*); +template<> ::tensorflow::CollectionDef_NodeList* Arena::CreateMaybeMessage<::tensorflow::CollectionDef_NodeList>(Arena*); +template<> ::tensorflow::MetaGraphDef* Arena::CreateMaybeMessage<::tensorflow::MetaGraphDef>(Arena*); +template<> ::tensorflow::MetaGraphDef_CollectionDefEntry_DoNotUse* Arena::CreateMaybeMessage<::tensorflow::MetaGraphDef_CollectionDefEntry_DoNotUse>(Arena*); +template<> ::tensorflow::MetaGraphDef_MetaInfoDef* Arena::CreateMaybeMessage<::tensorflow::MetaGraphDef_MetaInfoDef>(Arena*); +template<> ::tensorflow::MetaGraphDef_MetaInfoDef_FunctionAliasesEntry_DoNotUse* Arena::CreateMaybeMessage<::tensorflow::MetaGraphDef_MetaInfoDef_FunctionAliasesEntry_DoNotUse>(Arena*); +template<> ::tensorflow::MetaGraphDef_SignatureDefEntry_DoNotUse* Arena::CreateMaybeMessage<::tensorflow::MetaGraphDef_SignatureDefEntry_DoNotUse>(Arena*); +template<> ::tensorflow::SignatureDef* Arena::CreateMaybeMessage<::tensorflow::SignatureDef>(Arena*); +template<> ::tensorflow::SignatureDef_DefaultsEntry_DoNotUse* Arena::CreateMaybeMessage<::tensorflow::SignatureDef_DefaultsEntry_DoNotUse>(Arena*); +template<> ::tensorflow::SignatureDef_InputsEntry_DoNotUse* Arena::CreateMaybeMessage<::tensorflow::SignatureDef_InputsEntry_DoNotUse>(Arena*); +template<> ::tensorflow::SignatureDef_OutputsEntry_DoNotUse* Arena::CreateMaybeMessage<::tensorflow::SignatureDef_OutputsEntry_DoNotUse>(Arena*); +template<> ::tensorflow::TensorInfo* Arena::CreateMaybeMessage<::tensorflow::TensorInfo>(Arena*); +template<> ::tensorflow::TensorInfo_CompositeTensor* Arena::CreateMaybeMessage<::tensorflow::TensorInfo_CompositeTensor>(Arena*); +template<> ::tensorflow::TensorInfo_CooSparse* Arena::CreateMaybeMessage<::tensorflow::TensorInfo_CooSparse>(Arena*); +PROTOBUF_NAMESPACE_CLOSE +namespace tensorflow { + +// =================================================================== + +class MetaGraphDef_MetaInfoDef_FunctionAliasesEntry_DoNotUse : public ::PROTOBUF_NAMESPACE_ID::internal::MapEntry { +public: + typedef ::PROTOBUF_NAMESPACE_ID::internal::MapEntry SuperType; + MetaGraphDef_MetaInfoDef_FunctionAliasesEntry_DoNotUse(); + explicit PROTOBUF_CONSTEXPR MetaGraphDef_MetaInfoDef_FunctionAliasesEntry_DoNotUse( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + explicit MetaGraphDef_MetaInfoDef_FunctionAliasesEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena); + void MergeFrom(const MetaGraphDef_MetaInfoDef_FunctionAliasesEntry_DoNotUse& other); + static const MetaGraphDef_MetaInfoDef_FunctionAliasesEntry_DoNotUse* internal_default_instance() { return reinterpret_cast(&_MetaGraphDef_MetaInfoDef_FunctionAliasesEntry_DoNotUse_default_instance_); } + static bool ValidateKey(std::string* s) { + return ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(s->data(), static_cast(s->size()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, "tensorflow.MetaGraphDef.MetaInfoDef.FunctionAliasesEntry.key"); + } + static bool ValidateValue(std::string* s) { + return ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(s->data(), static_cast(s->size()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, "tensorflow.MetaGraphDef.MetaInfoDef.FunctionAliasesEntry.value"); + } + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fmeta_5fgraph_2eproto; +}; + +// ------------------------------------------------------------------- + +class MetaGraphDef_MetaInfoDef final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.MetaGraphDef.MetaInfoDef) */ { + public: + inline MetaGraphDef_MetaInfoDef() : MetaGraphDef_MetaInfoDef(nullptr) {} + ~MetaGraphDef_MetaInfoDef() override; + explicit PROTOBUF_CONSTEXPR MetaGraphDef_MetaInfoDef(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + MetaGraphDef_MetaInfoDef(const MetaGraphDef_MetaInfoDef& from); + MetaGraphDef_MetaInfoDef(MetaGraphDef_MetaInfoDef&& from) noexcept + : MetaGraphDef_MetaInfoDef() { + *this = ::std::move(from); + } + + inline MetaGraphDef_MetaInfoDef& operator=(const MetaGraphDef_MetaInfoDef& from) { + CopyFrom(from); + return *this; + } + inline MetaGraphDef_MetaInfoDef& operator=(MetaGraphDef_MetaInfoDef&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const MetaGraphDef_MetaInfoDef& default_instance() { + return *internal_default_instance(); + } + static inline const MetaGraphDef_MetaInfoDef* internal_default_instance() { + return reinterpret_cast( + &_MetaGraphDef_MetaInfoDef_default_instance_); + } + static constexpr int kIndexInFileMessages = + 1; + + friend void swap(MetaGraphDef_MetaInfoDef& a, MetaGraphDef_MetaInfoDef& b) { + a.Swap(&b); + } + inline void Swap(MetaGraphDef_MetaInfoDef* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(MetaGraphDef_MetaInfoDef* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + MetaGraphDef_MetaInfoDef* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const MetaGraphDef_MetaInfoDef& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const MetaGraphDef_MetaInfoDef& from) { + MetaGraphDef_MetaInfoDef::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(MetaGraphDef_MetaInfoDef* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.MetaGraphDef.MetaInfoDef"; + } + protected: + explicit MetaGraphDef_MetaInfoDef(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + + // accessors ------------------------------------------------------- + + enum : int { + kTagsFieldNumber = 4, + kFunctionAliasesFieldNumber = 8, + kMetaGraphVersionFieldNumber = 1, + kTensorflowVersionFieldNumber = 5, + kTensorflowGitVersionFieldNumber = 6, + kStrippedOpListFieldNumber = 2, + kAnyInfoFieldNumber = 3, + kStrippedDefaultAttrsFieldNumber = 7, + }; + // repeated string tags = 4; + int tags_size() const; + private: + int _internal_tags_size() const; + public: + void clear_tags(); + const std::string& tags(int index) const; + std::string* mutable_tags(int index); + void set_tags(int index, const std::string& value); + void set_tags(int index, std::string&& value); + void set_tags(int index, const char* value); + void set_tags(int index, const char* value, size_t size); + std::string* add_tags(); + void add_tags(const std::string& value); + void add_tags(std::string&& value); + void add_tags(const char* value); + void add_tags(const char* value, size_t size); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& tags() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* mutable_tags(); + private: + const std::string& _internal_tags(int index) const; + std::string* _internal_add_tags(); + public: + + // map function_aliases = 8; + int function_aliases_size() const; + private: + int _internal_function_aliases_size() const; + public: + void clear_function_aliases(); + private: + const ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >& + _internal_function_aliases() const; + ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >* + _internal_mutable_function_aliases(); + public: + const ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >& + function_aliases() const; + ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >* + mutable_function_aliases(); + + // string meta_graph_version = 1; + void clear_meta_graph_version(); + const std::string& meta_graph_version() const; + template + void set_meta_graph_version(ArgT0&& arg0, ArgT... args); + std::string* mutable_meta_graph_version(); + PROTOBUF_NODISCARD std::string* release_meta_graph_version(); + void set_allocated_meta_graph_version(std::string* meta_graph_version); + private: + const std::string& _internal_meta_graph_version() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_meta_graph_version(const std::string& value); + std::string* _internal_mutable_meta_graph_version(); + public: + + // string tensorflow_version = 5; + void clear_tensorflow_version(); + const std::string& tensorflow_version() const; + template + void set_tensorflow_version(ArgT0&& arg0, ArgT... args); + std::string* mutable_tensorflow_version(); + PROTOBUF_NODISCARD std::string* release_tensorflow_version(); + void set_allocated_tensorflow_version(std::string* tensorflow_version); + private: + const std::string& _internal_tensorflow_version() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_tensorflow_version(const std::string& value); + std::string* _internal_mutable_tensorflow_version(); + public: + + // string tensorflow_git_version = 6; + void clear_tensorflow_git_version(); + const std::string& tensorflow_git_version() const; + template + void set_tensorflow_git_version(ArgT0&& arg0, ArgT... args); + std::string* mutable_tensorflow_git_version(); + PROTOBUF_NODISCARD std::string* release_tensorflow_git_version(); + void set_allocated_tensorflow_git_version(std::string* tensorflow_git_version); + private: + const std::string& _internal_tensorflow_git_version() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_tensorflow_git_version(const std::string& value); + std::string* _internal_mutable_tensorflow_git_version(); + public: + + // .tensorflow.OpList stripped_op_list = 2; + bool has_stripped_op_list() const; + private: + bool _internal_has_stripped_op_list() const; + public: + void clear_stripped_op_list(); + const ::tensorflow::OpList& stripped_op_list() const; + PROTOBUF_NODISCARD ::tensorflow::OpList* release_stripped_op_list(); + ::tensorflow::OpList* mutable_stripped_op_list(); + void set_allocated_stripped_op_list(::tensorflow::OpList* stripped_op_list); + private: + const ::tensorflow::OpList& _internal_stripped_op_list() const; + ::tensorflow::OpList* _internal_mutable_stripped_op_list(); + public: + void unsafe_arena_set_allocated_stripped_op_list( + ::tensorflow::OpList* stripped_op_list); + ::tensorflow::OpList* unsafe_arena_release_stripped_op_list(); + + // .google.protobuf.Any any_info = 3; + bool has_any_info() const; + private: + bool _internal_has_any_info() const; + public: + void clear_any_info(); + const ::PROTOBUF_NAMESPACE_ID::Any& any_info() const; + PROTOBUF_NODISCARD ::PROTOBUF_NAMESPACE_ID::Any* release_any_info(); + ::PROTOBUF_NAMESPACE_ID::Any* mutable_any_info(); + void set_allocated_any_info(::PROTOBUF_NAMESPACE_ID::Any* any_info); + private: + const ::PROTOBUF_NAMESPACE_ID::Any& _internal_any_info() const; + ::PROTOBUF_NAMESPACE_ID::Any* _internal_mutable_any_info(); + public: + void unsafe_arena_set_allocated_any_info( + ::PROTOBUF_NAMESPACE_ID::Any* any_info); + ::PROTOBUF_NAMESPACE_ID::Any* unsafe_arena_release_any_info(); + + // bool stripped_default_attrs = 7; + void clear_stripped_default_attrs(); + bool stripped_default_attrs() const; + void set_stripped_default_attrs(bool value); + private: + bool _internal_stripped_default_attrs() const; + void _internal_set_stripped_default_attrs(bool value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.MetaGraphDef.MetaInfoDef) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField tags_; + ::PROTOBUF_NAMESPACE_ID::internal::MapField< + MetaGraphDef_MetaInfoDef_FunctionAliasesEntry_DoNotUse, + std::string, std::string, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING> function_aliases_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr meta_graph_version_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr tensorflow_version_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr tensorflow_git_version_; + ::tensorflow::OpList* stripped_op_list_; + ::PROTOBUF_NAMESPACE_ID::Any* any_info_; + bool stripped_default_attrs_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fmeta_5fgraph_2eproto; +}; +// ------------------------------------------------------------------- + +class MetaGraphDef_CollectionDefEntry_DoNotUse : public ::PROTOBUF_NAMESPACE_ID::internal::MapEntry { +public: + typedef ::PROTOBUF_NAMESPACE_ID::internal::MapEntry SuperType; + MetaGraphDef_CollectionDefEntry_DoNotUse(); + explicit PROTOBUF_CONSTEXPR MetaGraphDef_CollectionDefEntry_DoNotUse( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + explicit MetaGraphDef_CollectionDefEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena); + void MergeFrom(const MetaGraphDef_CollectionDefEntry_DoNotUse& other); + static const MetaGraphDef_CollectionDefEntry_DoNotUse* internal_default_instance() { return reinterpret_cast(&_MetaGraphDef_CollectionDefEntry_DoNotUse_default_instance_); } + static bool ValidateKey(std::string* s) { + return ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(s->data(), static_cast(s->size()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, "tensorflow.MetaGraphDef.CollectionDefEntry.key"); + } + static bool ValidateValue(void*) { return true; } + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fmeta_5fgraph_2eproto; +}; + +// ------------------------------------------------------------------- + +class MetaGraphDef_SignatureDefEntry_DoNotUse : public ::PROTOBUF_NAMESPACE_ID::internal::MapEntry { +public: + typedef ::PROTOBUF_NAMESPACE_ID::internal::MapEntry SuperType; + MetaGraphDef_SignatureDefEntry_DoNotUse(); + explicit PROTOBUF_CONSTEXPR MetaGraphDef_SignatureDefEntry_DoNotUse( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + explicit MetaGraphDef_SignatureDefEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena); + void MergeFrom(const MetaGraphDef_SignatureDefEntry_DoNotUse& other); + static const MetaGraphDef_SignatureDefEntry_DoNotUse* internal_default_instance() { return reinterpret_cast(&_MetaGraphDef_SignatureDefEntry_DoNotUse_default_instance_); } + static bool ValidateKey(std::string* s) { + return ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(s->data(), static_cast(s->size()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, "tensorflow.MetaGraphDef.SignatureDefEntry.key"); + } + static bool ValidateValue(void*) { return true; } + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fmeta_5fgraph_2eproto; +}; + +// ------------------------------------------------------------------- + +class MetaGraphDef final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.MetaGraphDef) */ { + public: + inline MetaGraphDef() : MetaGraphDef(nullptr) {} + ~MetaGraphDef() override; + explicit PROTOBUF_CONSTEXPR MetaGraphDef(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + MetaGraphDef(const MetaGraphDef& from); + MetaGraphDef(MetaGraphDef&& from) noexcept + : MetaGraphDef() { + *this = ::std::move(from); + } + + inline MetaGraphDef& operator=(const MetaGraphDef& from) { + CopyFrom(from); + return *this; + } + inline MetaGraphDef& operator=(MetaGraphDef&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const MetaGraphDef& default_instance() { + return *internal_default_instance(); + } + static inline const MetaGraphDef* internal_default_instance() { + return reinterpret_cast( + &_MetaGraphDef_default_instance_); + } + static constexpr int kIndexInFileMessages = + 4; + + friend void swap(MetaGraphDef& a, MetaGraphDef& b) { + a.Swap(&b); + } + inline void Swap(MetaGraphDef* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(MetaGraphDef* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + MetaGraphDef* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const MetaGraphDef& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const MetaGraphDef& from) { + MetaGraphDef::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(MetaGraphDef* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.MetaGraphDef"; + } + protected: + explicit MetaGraphDef(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + typedef MetaGraphDef_MetaInfoDef MetaInfoDef; + + // accessors ------------------------------------------------------- + + enum : int { + kCollectionDefFieldNumber = 4, + kSignatureDefFieldNumber = 5, + kAssetFileDefFieldNumber = 6, + kMetaInfoDefFieldNumber = 1, + kGraphDefFieldNumber = 2, + kSaverDefFieldNumber = 3, + kObjectGraphDefFieldNumber = 7, + }; + // map collection_def = 4; + int collection_def_size() const; + private: + int _internal_collection_def_size() const; + public: + void clear_collection_def(); + private: + const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::CollectionDef >& + _internal_collection_def() const; + ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::CollectionDef >* + _internal_mutable_collection_def(); + public: + const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::CollectionDef >& + collection_def() const; + ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::CollectionDef >* + mutable_collection_def(); + + // map signature_def = 5; + int signature_def_size() const; + private: + int _internal_signature_def_size() const; + public: + void clear_signature_def(); + private: + const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::SignatureDef >& + _internal_signature_def() const; + ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::SignatureDef >* + _internal_mutable_signature_def(); + public: + const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::SignatureDef >& + signature_def() const; + ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::SignatureDef >* + mutable_signature_def(); + + // repeated .tensorflow.AssetFileDef asset_file_def = 6; + int asset_file_def_size() const; + private: + int _internal_asset_file_def_size() const; + public: + void clear_asset_file_def(); + ::tensorflow::AssetFileDef* mutable_asset_file_def(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::AssetFileDef >* + mutable_asset_file_def(); + private: + const ::tensorflow::AssetFileDef& _internal_asset_file_def(int index) const; + ::tensorflow::AssetFileDef* _internal_add_asset_file_def(); + public: + const ::tensorflow::AssetFileDef& asset_file_def(int index) const; + ::tensorflow::AssetFileDef* add_asset_file_def(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::AssetFileDef >& + asset_file_def() const; + + // .tensorflow.MetaGraphDef.MetaInfoDef meta_info_def = 1; + bool has_meta_info_def() const; + private: + bool _internal_has_meta_info_def() const; + public: + void clear_meta_info_def(); + const ::tensorflow::MetaGraphDef_MetaInfoDef& meta_info_def() const; + PROTOBUF_NODISCARD ::tensorflow::MetaGraphDef_MetaInfoDef* release_meta_info_def(); + ::tensorflow::MetaGraphDef_MetaInfoDef* mutable_meta_info_def(); + void set_allocated_meta_info_def(::tensorflow::MetaGraphDef_MetaInfoDef* meta_info_def); + private: + const ::tensorflow::MetaGraphDef_MetaInfoDef& _internal_meta_info_def() const; + ::tensorflow::MetaGraphDef_MetaInfoDef* _internal_mutable_meta_info_def(); + public: + void unsafe_arena_set_allocated_meta_info_def( + ::tensorflow::MetaGraphDef_MetaInfoDef* meta_info_def); + ::tensorflow::MetaGraphDef_MetaInfoDef* unsafe_arena_release_meta_info_def(); + + // .tensorflow.GraphDef graph_def = 2; + bool has_graph_def() const; + private: + bool _internal_has_graph_def() const; + public: + void clear_graph_def(); + const ::tensorflow::GraphDef& graph_def() const; + PROTOBUF_NODISCARD ::tensorflow::GraphDef* release_graph_def(); + ::tensorflow::GraphDef* mutable_graph_def(); + void set_allocated_graph_def(::tensorflow::GraphDef* graph_def); + private: + const ::tensorflow::GraphDef& _internal_graph_def() const; + ::tensorflow::GraphDef* _internal_mutable_graph_def(); + public: + void unsafe_arena_set_allocated_graph_def( + ::tensorflow::GraphDef* graph_def); + ::tensorflow::GraphDef* unsafe_arena_release_graph_def(); + + // .tensorflow.SaverDef saver_def = 3; + bool has_saver_def() const; + private: + bool _internal_has_saver_def() const; + public: + void clear_saver_def(); + const ::tensorflow::SaverDef& saver_def() const; + PROTOBUF_NODISCARD ::tensorflow::SaverDef* release_saver_def(); + ::tensorflow::SaverDef* mutable_saver_def(); + void set_allocated_saver_def(::tensorflow::SaverDef* saver_def); + private: + const ::tensorflow::SaverDef& _internal_saver_def() const; + ::tensorflow::SaverDef* _internal_mutable_saver_def(); + public: + void unsafe_arena_set_allocated_saver_def( + ::tensorflow::SaverDef* saver_def); + ::tensorflow::SaverDef* unsafe_arena_release_saver_def(); + + // .tensorflow.SavedObjectGraph object_graph_def = 7; + bool has_object_graph_def() const; + private: + bool _internal_has_object_graph_def() const; + public: + void clear_object_graph_def(); + const ::tensorflow::SavedObjectGraph& object_graph_def() const; + PROTOBUF_NODISCARD ::tensorflow::SavedObjectGraph* release_object_graph_def(); + ::tensorflow::SavedObjectGraph* mutable_object_graph_def(); + void set_allocated_object_graph_def(::tensorflow::SavedObjectGraph* object_graph_def); + private: + const ::tensorflow::SavedObjectGraph& _internal_object_graph_def() const; + ::tensorflow::SavedObjectGraph* _internal_mutable_object_graph_def(); + public: + void unsafe_arena_set_allocated_object_graph_def( + ::tensorflow::SavedObjectGraph* object_graph_def); + ::tensorflow::SavedObjectGraph* unsafe_arena_release_object_graph_def(); + + // @@protoc_insertion_point(class_scope:tensorflow.MetaGraphDef) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::MapField< + MetaGraphDef_CollectionDefEntry_DoNotUse, + std::string, ::tensorflow::CollectionDef, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_MESSAGE> collection_def_; + ::PROTOBUF_NAMESPACE_ID::internal::MapField< + MetaGraphDef_SignatureDefEntry_DoNotUse, + std::string, ::tensorflow::SignatureDef, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_MESSAGE> signature_def_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::AssetFileDef > asset_file_def_; + ::tensorflow::MetaGraphDef_MetaInfoDef* meta_info_def_; + ::tensorflow::GraphDef* graph_def_; + ::tensorflow::SaverDef* saver_def_; + ::tensorflow::SavedObjectGraph* object_graph_def_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fmeta_5fgraph_2eproto; +}; +// ------------------------------------------------------------------- + +class CollectionDef_NodeList final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.CollectionDef.NodeList) */ { + public: + inline CollectionDef_NodeList() : CollectionDef_NodeList(nullptr) {} + ~CollectionDef_NodeList() override; + explicit PROTOBUF_CONSTEXPR CollectionDef_NodeList(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + CollectionDef_NodeList(const CollectionDef_NodeList& from); + CollectionDef_NodeList(CollectionDef_NodeList&& from) noexcept + : CollectionDef_NodeList() { + *this = ::std::move(from); + } + + inline CollectionDef_NodeList& operator=(const CollectionDef_NodeList& from) { + CopyFrom(from); + return *this; + } + inline CollectionDef_NodeList& operator=(CollectionDef_NodeList&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const CollectionDef_NodeList& default_instance() { + return *internal_default_instance(); + } + static inline const CollectionDef_NodeList* internal_default_instance() { + return reinterpret_cast( + &_CollectionDef_NodeList_default_instance_); + } + static constexpr int kIndexInFileMessages = + 5; + + friend void swap(CollectionDef_NodeList& a, CollectionDef_NodeList& b) { + a.Swap(&b); + } + inline void Swap(CollectionDef_NodeList* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(CollectionDef_NodeList* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + CollectionDef_NodeList* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const CollectionDef_NodeList& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const CollectionDef_NodeList& from) { + CollectionDef_NodeList::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(CollectionDef_NodeList* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.CollectionDef.NodeList"; + } + protected: + explicit CollectionDef_NodeList(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kValueFieldNumber = 1, + }; + // repeated string value = 1; + int value_size() const; + private: + int _internal_value_size() const; + public: + void clear_value(); + const std::string& value(int index) const; + std::string* mutable_value(int index); + void set_value(int index, const std::string& value); + void set_value(int index, std::string&& value); + void set_value(int index, const char* value); + void set_value(int index, const char* value, size_t size); + std::string* add_value(); + void add_value(const std::string& value); + void add_value(std::string&& value); + void add_value(const char* value); + void add_value(const char* value, size_t size); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& value() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* mutable_value(); + private: + const std::string& _internal_value(int index) const; + std::string* _internal_add_value(); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.CollectionDef.NodeList) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField value_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fmeta_5fgraph_2eproto; +}; +// ------------------------------------------------------------------- + +class CollectionDef_BytesList final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.CollectionDef.BytesList) */ { + public: + inline CollectionDef_BytesList() : CollectionDef_BytesList(nullptr) {} + ~CollectionDef_BytesList() override; + explicit PROTOBUF_CONSTEXPR CollectionDef_BytesList(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + CollectionDef_BytesList(const CollectionDef_BytesList& from); + CollectionDef_BytesList(CollectionDef_BytesList&& from) noexcept + : CollectionDef_BytesList() { + *this = ::std::move(from); + } + + inline CollectionDef_BytesList& operator=(const CollectionDef_BytesList& from) { + CopyFrom(from); + return *this; + } + inline CollectionDef_BytesList& operator=(CollectionDef_BytesList&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const CollectionDef_BytesList& default_instance() { + return *internal_default_instance(); + } + static inline const CollectionDef_BytesList* internal_default_instance() { + return reinterpret_cast( + &_CollectionDef_BytesList_default_instance_); + } + static constexpr int kIndexInFileMessages = + 6; + + friend void swap(CollectionDef_BytesList& a, CollectionDef_BytesList& b) { + a.Swap(&b); + } + inline void Swap(CollectionDef_BytesList* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(CollectionDef_BytesList* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + CollectionDef_BytesList* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const CollectionDef_BytesList& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const CollectionDef_BytesList& from) { + CollectionDef_BytesList::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(CollectionDef_BytesList* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.CollectionDef.BytesList"; + } + protected: + explicit CollectionDef_BytesList(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kValueFieldNumber = 1, + }; + // repeated bytes value = 1; + int value_size() const; + private: + int _internal_value_size() const; + public: + void clear_value(); + const std::string& value(int index) const; + std::string* mutable_value(int index); + void set_value(int index, const std::string& value); + void set_value(int index, std::string&& value); + void set_value(int index, const char* value); + void set_value(int index, const void* value, size_t size); + std::string* add_value(); + void add_value(const std::string& value); + void add_value(std::string&& value); + void add_value(const char* value); + void add_value(const void* value, size_t size); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& value() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* mutable_value(); + private: + const std::string& _internal_value(int index) const; + std::string* _internal_add_value(); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.CollectionDef.BytesList) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField value_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fmeta_5fgraph_2eproto; +}; +// ------------------------------------------------------------------- + +class CollectionDef_Int64List final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.CollectionDef.Int64List) */ { + public: + inline CollectionDef_Int64List() : CollectionDef_Int64List(nullptr) {} + ~CollectionDef_Int64List() override; + explicit PROTOBUF_CONSTEXPR CollectionDef_Int64List(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + CollectionDef_Int64List(const CollectionDef_Int64List& from); + CollectionDef_Int64List(CollectionDef_Int64List&& from) noexcept + : CollectionDef_Int64List() { + *this = ::std::move(from); + } + + inline CollectionDef_Int64List& operator=(const CollectionDef_Int64List& from) { + CopyFrom(from); + return *this; + } + inline CollectionDef_Int64List& operator=(CollectionDef_Int64List&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const CollectionDef_Int64List& default_instance() { + return *internal_default_instance(); + } + static inline const CollectionDef_Int64List* internal_default_instance() { + return reinterpret_cast( + &_CollectionDef_Int64List_default_instance_); + } + static constexpr int kIndexInFileMessages = + 7; + + friend void swap(CollectionDef_Int64List& a, CollectionDef_Int64List& b) { + a.Swap(&b); + } + inline void Swap(CollectionDef_Int64List* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(CollectionDef_Int64List* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + CollectionDef_Int64List* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const CollectionDef_Int64List& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const CollectionDef_Int64List& from) { + CollectionDef_Int64List::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(CollectionDef_Int64List* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.CollectionDef.Int64List"; + } + protected: + explicit CollectionDef_Int64List(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kValueFieldNumber = 1, + }; + // repeated int64 value = 1 [packed = true]; + int value_size() const; + private: + int _internal_value_size() const; + public: + void clear_value(); + private: + int64_t _internal_value(int index) const; + const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >& + _internal_value() const; + void _internal_add_value(int64_t value); + ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >* + _internal_mutable_value(); + public: + int64_t value(int index) const; + void set_value(int index, int64_t value); + void add_value(int64_t value); + const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >& + value() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >* + mutable_value(); + + // @@protoc_insertion_point(class_scope:tensorflow.CollectionDef.Int64List) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t > value_; + mutable std::atomic _value_cached_byte_size_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fmeta_5fgraph_2eproto; +}; +// ------------------------------------------------------------------- + +class CollectionDef_FloatList final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.CollectionDef.FloatList) */ { + public: + inline CollectionDef_FloatList() : CollectionDef_FloatList(nullptr) {} + ~CollectionDef_FloatList() override; + explicit PROTOBUF_CONSTEXPR CollectionDef_FloatList(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + CollectionDef_FloatList(const CollectionDef_FloatList& from); + CollectionDef_FloatList(CollectionDef_FloatList&& from) noexcept + : CollectionDef_FloatList() { + *this = ::std::move(from); + } + + inline CollectionDef_FloatList& operator=(const CollectionDef_FloatList& from) { + CopyFrom(from); + return *this; + } + inline CollectionDef_FloatList& operator=(CollectionDef_FloatList&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const CollectionDef_FloatList& default_instance() { + return *internal_default_instance(); + } + static inline const CollectionDef_FloatList* internal_default_instance() { + return reinterpret_cast( + &_CollectionDef_FloatList_default_instance_); + } + static constexpr int kIndexInFileMessages = + 8; + + friend void swap(CollectionDef_FloatList& a, CollectionDef_FloatList& b) { + a.Swap(&b); + } + inline void Swap(CollectionDef_FloatList* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(CollectionDef_FloatList* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + CollectionDef_FloatList* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const CollectionDef_FloatList& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const CollectionDef_FloatList& from) { + CollectionDef_FloatList::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(CollectionDef_FloatList* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.CollectionDef.FloatList"; + } + protected: + explicit CollectionDef_FloatList(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kValueFieldNumber = 1, + }; + // repeated float value = 1 [packed = true]; + int value_size() const; + private: + int _internal_value_size() const; + public: + void clear_value(); + private: + float _internal_value(int index) const; + const ::PROTOBUF_NAMESPACE_ID::RepeatedField< float >& + _internal_value() const; + void _internal_add_value(float value); + ::PROTOBUF_NAMESPACE_ID::RepeatedField< float >* + _internal_mutable_value(); + public: + float value(int index) const; + void set_value(int index, float value); + void add_value(float value); + const ::PROTOBUF_NAMESPACE_ID::RepeatedField< float >& + value() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedField< float >* + mutable_value(); + + // @@protoc_insertion_point(class_scope:tensorflow.CollectionDef.FloatList) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedField< float > value_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fmeta_5fgraph_2eproto; +}; +// ------------------------------------------------------------------- + +class CollectionDef_AnyList final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.CollectionDef.AnyList) */ { + public: + inline CollectionDef_AnyList() : CollectionDef_AnyList(nullptr) {} + ~CollectionDef_AnyList() override; + explicit PROTOBUF_CONSTEXPR CollectionDef_AnyList(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + CollectionDef_AnyList(const CollectionDef_AnyList& from); + CollectionDef_AnyList(CollectionDef_AnyList&& from) noexcept + : CollectionDef_AnyList() { + *this = ::std::move(from); + } + + inline CollectionDef_AnyList& operator=(const CollectionDef_AnyList& from) { + CopyFrom(from); + return *this; + } + inline CollectionDef_AnyList& operator=(CollectionDef_AnyList&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const CollectionDef_AnyList& default_instance() { + return *internal_default_instance(); + } + static inline const CollectionDef_AnyList* internal_default_instance() { + return reinterpret_cast( + &_CollectionDef_AnyList_default_instance_); + } + static constexpr int kIndexInFileMessages = + 9; + + friend void swap(CollectionDef_AnyList& a, CollectionDef_AnyList& b) { + a.Swap(&b); + } + inline void Swap(CollectionDef_AnyList* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(CollectionDef_AnyList* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + CollectionDef_AnyList* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const CollectionDef_AnyList& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const CollectionDef_AnyList& from) { + CollectionDef_AnyList::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(CollectionDef_AnyList* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.CollectionDef.AnyList"; + } + protected: + explicit CollectionDef_AnyList(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kValueFieldNumber = 1, + }; + // repeated .google.protobuf.Any value = 1; + int value_size() const; + private: + int _internal_value_size() const; + public: + void clear_value(); + ::PROTOBUF_NAMESPACE_ID::Any* mutable_value(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::Any >* + mutable_value(); + private: + const ::PROTOBUF_NAMESPACE_ID::Any& _internal_value(int index) const; + ::PROTOBUF_NAMESPACE_ID::Any* _internal_add_value(); + public: + const ::PROTOBUF_NAMESPACE_ID::Any& value(int index) const; + ::PROTOBUF_NAMESPACE_ID::Any* add_value(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::Any >& + value() const; + + // @@protoc_insertion_point(class_scope:tensorflow.CollectionDef.AnyList) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::Any > value_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fmeta_5fgraph_2eproto; +}; +// ------------------------------------------------------------------- + +class CollectionDef final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.CollectionDef) */ { + public: + inline CollectionDef() : CollectionDef(nullptr) {} + ~CollectionDef() override; + explicit PROTOBUF_CONSTEXPR CollectionDef(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + CollectionDef(const CollectionDef& from); + CollectionDef(CollectionDef&& from) noexcept + : CollectionDef() { + *this = ::std::move(from); + } + + inline CollectionDef& operator=(const CollectionDef& from) { + CopyFrom(from); + return *this; + } + inline CollectionDef& operator=(CollectionDef&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const CollectionDef& default_instance() { + return *internal_default_instance(); + } + enum KindCase { + kNodeList = 1, + kBytesList = 2, + kInt64List = 3, + kFloatList = 4, + kAnyList = 5, + KIND_NOT_SET = 0, + }; + + static inline const CollectionDef* internal_default_instance() { + return reinterpret_cast( + &_CollectionDef_default_instance_); + } + static constexpr int kIndexInFileMessages = + 10; + + friend void swap(CollectionDef& a, CollectionDef& b) { + a.Swap(&b); + } + inline void Swap(CollectionDef* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(CollectionDef* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + CollectionDef* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const CollectionDef& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const CollectionDef& from) { + CollectionDef::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(CollectionDef* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.CollectionDef"; + } + protected: + explicit CollectionDef(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + typedef CollectionDef_NodeList NodeList; + typedef CollectionDef_BytesList BytesList; + typedef CollectionDef_Int64List Int64List; + typedef CollectionDef_FloatList FloatList; + typedef CollectionDef_AnyList AnyList; + + // accessors ------------------------------------------------------- + + enum : int { + kNodeListFieldNumber = 1, + kBytesListFieldNumber = 2, + kInt64ListFieldNumber = 3, + kFloatListFieldNumber = 4, + kAnyListFieldNumber = 5, + }; + // .tensorflow.CollectionDef.NodeList node_list = 1; + bool has_node_list() const; + private: + bool _internal_has_node_list() const; + public: + void clear_node_list(); + const ::tensorflow::CollectionDef_NodeList& node_list() const; + PROTOBUF_NODISCARD ::tensorflow::CollectionDef_NodeList* release_node_list(); + ::tensorflow::CollectionDef_NodeList* mutable_node_list(); + void set_allocated_node_list(::tensorflow::CollectionDef_NodeList* node_list); + private: + const ::tensorflow::CollectionDef_NodeList& _internal_node_list() const; + ::tensorflow::CollectionDef_NodeList* _internal_mutable_node_list(); + public: + void unsafe_arena_set_allocated_node_list( + ::tensorflow::CollectionDef_NodeList* node_list); + ::tensorflow::CollectionDef_NodeList* unsafe_arena_release_node_list(); + + // .tensorflow.CollectionDef.BytesList bytes_list = 2; + bool has_bytes_list() const; + private: + bool _internal_has_bytes_list() const; + public: + void clear_bytes_list(); + const ::tensorflow::CollectionDef_BytesList& bytes_list() const; + PROTOBUF_NODISCARD ::tensorflow::CollectionDef_BytesList* release_bytes_list(); + ::tensorflow::CollectionDef_BytesList* mutable_bytes_list(); + void set_allocated_bytes_list(::tensorflow::CollectionDef_BytesList* bytes_list); + private: + const ::tensorflow::CollectionDef_BytesList& _internal_bytes_list() const; + ::tensorflow::CollectionDef_BytesList* _internal_mutable_bytes_list(); + public: + void unsafe_arena_set_allocated_bytes_list( + ::tensorflow::CollectionDef_BytesList* bytes_list); + ::tensorflow::CollectionDef_BytesList* unsafe_arena_release_bytes_list(); + + // .tensorflow.CollectionDef.Int64List int64_list = 3; + bool has_int64_list() const; + private: + bool _internal_has_int64_list() const; + public: + void clear_int64_list(); + const ::tensorflow::CollectionDef_Int64List& int64_list() const; + PROTOBUF_NODISCARD ::tensorflow::CollectionDef_Int64List* release_int64_list(); + ::tensorflow::CollectionDef_Int64List* mutable_int64_list(); + void set_allocated_int64_list(::tensorflow::CollectionDef_Int64List* int64_list); + private: + const ::tensorflow::CollectionDef_Int64List& _internal_int64_list() const; + ::tensorflow::CollectionDef_Int64List* _internal_mutable_int64_list(); + public: + void unsafe_arena_set_allocated_int64_list( + ::tensorflow::CollectionDef_Int64List* int64_list); + ::tensorflow::CollectionDef_Int64List* unsafe_arena_release_int64_list(); + + // .tensorflow.CollectionDef.FloatList float_list = 4; + bool has_float_list() const; + private: + bool _internal_has_float_list() const; + public: + void clear_float_list(); + const ::tensorflow::CollectionDef_FloatList& float_list() const; + PROTOBUF_NODISCARD ::tensorflow::CollectionDef_FloatList* release_float_list(); + ::tensorflow::CollectionDef_FloatList* mutable_float_list(); + void set_allocated_float_list(::tensorflow::CollectionDef_FloatList* float_list); + private: + const ::tensorflow::CollectionDef_FloatList& _internal_float_list() const; + ::tensorflow::CollectionDef_FloatList* _internal_mutable_float_list(); + public: + void unsafe_arena_set_allocated_float_list( + ::tensorflow::CollectionDef_FloatList* float_list); + ::tensorflow::CollectionDef_FloatList* unsafe_arena_release_float_list(); + + // .tensorflow.CollectionDef.AnyList any_list = 5; + bool has_any_list() const; + private: + bool _internal_has_any_list() const; + public: + void clear_any_list(); + const ::tensorflow::CollectionDef_AnyList& any_list() const; + PROTOBUF_NODISCARD ::tensorflow::CollectionDef_AnyList* release_any_list(); + ::tensorflow::CollectionDef_AnyList* mutable_any_list(); + void set_allocated_any_list(::tensorflow::CollectionDef_AnyList* any_list); + private: + const ::tensorflow::CollectionDef_AnyList& _internal_any_list() const; + ::tensorflow::CollectionDef_AnyList* _internal_mutable_any_list(); + public: + void unsafe_arena_set_allocated_any_list( + ::tensorflow::CollectionDef_AnyList* any_list); + ::tensorflow::CollectionDef_AnyList* unsafe_arena_release_any_list(); + + void clear_kind(); + KindCase kind_case() const; + // @@protoc_insertion_point(class_scope:tensorflow.CollectionDef) + private: + class _Internal; + void set_has_node_list(); + void set_has_bytes_list(); + void set_has_int64_list(); + void set_has_float_list(); + void set_has_any_list(); + + inline bool has_kind() const; + inline void clear_has_kind(); + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + union KindUnion { + constexpr KindUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + ::tensorflow::CollectionDef_NodeList* node_list_; + ::tensorflow::CollectionDef_BytesList* bytes_list_; + ::tensorflow::CollectionDef_Int64List* int64_list_; + ::tensorflow::CollectionDef_FloatList* float_list_; + ::tensorflow::CollectionDef_AnyList* any_list_; + } kind_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + uint32_t _oneof_case_[1]; + + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fmeta_5fgraph_2eproto; +}; +// ------------------------------------------------------------------- + +class TensorInfo_CooSparse final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.TensorInfo.CooSparse) */ { + public: + inline TensorInfo_CooSparse() : TensorInfo_CooSparse(nullptr) {} + ~TensorInfo_CooSparse() override; + explicit PROTOBUF_CONSTEXPR TensorInfo_CooSparse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + TensorInfo_CooSparse(const TensorInfo_CooSparse& from); + TensorInfo_CooSparse(TensorInfo_CooSparse&& from) noexcept + : TensorInfo_CooSparse() { + *this = ::std::move(from); + } + + inline TensorInfo_CooSparse& operator=(const TensorInfo_CooSparse& from) { + CopyFrom(from); + return *this; + } + inline TensorInfo_CooSparse& operator=(TensorInfo_CooSparse&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const TensorInfo_CooSparse& default_instance() { + return *internal_default_instance(); + } + static inline const TensorInfo_CooSparse* internal_default_instance() { + return reinterpret_cast( + &_TensorInfo_CooSparse_default_instance_); + } + static constexpr int kIndexInFileMessages = + 11; + + friend void swap(TensorInfo_CooSparse& a, TensorInfo_CooSparse& b) { + a.Swap(&b); + } + inline void Swap(TensorInfo_CooSparse* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(TensorInfo_CooSparse* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + TensorInfo_CooSparse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const TensorInfo_CooSparse& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const TensorInfo_CooSparse& from) { + TensorInfo_CooSparse::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(TensorInfo_CooSparse* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.TensorInfo.CooSparse"; + } + protected: + explicit TensorInfo_CooSparse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kValuesTensorNameFieldNumber = 1, + kIndicesTensorNameFieldNumber = 2, + kDenseShapeTensorNameFieldNumber = 3, + }; + // string values_tensor_name = 1; + void clear_values_tensor_name(); + const std::string& values_tensor_name() const; + template + void set_values_tensor_name(ArgT0&& arg0, ArgT... args); + std::string* mutable_values_tensor_name(); + PROTOBUF_NODISCARD std::string* release_values_tensor_name(); + void set_allocated_values_tensor_name(std::string* values_tensor_name); + private: + const std::string& _internal_values_tensor_name() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_values_tensor_name(const std::string& value); + std::string* _internal_mutable_values_tensor_name(); + public: + + // string indices_tensor_name = 2; + void clear_indices_tensor_name(); + const std::string& indices_tensor_name() const; + template + void set_indices_tensor_name(ArgT0&& arg0, ArgT... args); + std::string* mutable_indices_tensor_name(); + PROTOBUF_NODISCARD std::string* release_indices_tensor_name(); + void set_allocated_indices_tensor_name(std::string* indices_tensor_name); + private: + const std::string& _internal_indices_tensor_name() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_indices_tensor_name(const std::string& value); + std::string* _internal_mutable_indices_tensor_name(); + public: + + // string dense_shape_tensor_name = 3; + void clear_dense_shape_tensor_name(); + const std::string& dense_shape_tensor_name() const; + template + void set_dense_shape_tensor_name(ArgT0&& arg0, ArgT... args); + std::string* mutable_dense_shape_tensor_name(); + PROTOBUF_NODISCARD std::string* release_dense_shape_tensor_name(); + void set_allocated_dense_shape_tensor_name(std::string* dense_shape_tensor_name); + private: + const std::string& _internal_dense_shape_tensor_name() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_dense_shape_tensor_name(const std::string& value); + std::string* _internal_mutable_dense_shape_tensor_name(); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.TensorInfo.CooSparse) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr values_tensor_name_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr indices_tensor_name_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr dense_shape_tensor_name_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fmeta_5fgraph_2eproto; +}; +// ------------------------------------------------------------------- + +class TensorInfo_CompositeTensor final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.TensorInfo.CompositeTensor) */ { + public: + inline TensorInfo_CompositeTensor() : TensorInfo_CompositeTensor(nullptr) {} + ~TensorInfo_CompositeTensor() override; + explicit PROTOBUF_CONSTEXPR TensorInfo_CompositeTensor(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + TensorInfo_CompositeTensor(const TensorInfo_CompositeTensor& from); + TensorInfo_CompositeTensor(TensorInfo_CompositeTensor&& from) noexcept + : TensorInfo_CompositeTensor() { + *this = ::std::move(from); + } + + inline TensorInfo_CompositeTensor& operator=(const TensorInfo_CompositeTensor& from) { + CopyFrom(from); + return *this; + } + inline TensorInfo_CompositeTensor& operator=(TensorInfo_CompositeTensor&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const TensorInfo_CompositeTensor& default_instance() { + return *internal_default_instance(); + } + static inline const TensorInfo_CompositeTensor* internal_default_instance() { + return reinterpret_cast( + &_TensorInfo_CompositeTensor_default_instance_); + } + static constexpr int kIndexInFileMessages = + 12; + + friend void swap(TensorInfo_CompositeTensor& a, TensorInfo_CompositeTensor& b) { + a.Swap(&b); + } + inline void Swap(TensorInfo_CompositeTensor* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(TensorInfo_CompositeTensor* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + TensorInfo_CompositeTensor* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const TensorInfo_CompositeTensor& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const TensorInfo_CompositeTensor& from) { + TensorInfo_CompositeTensor::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(TensorInfo_CompositeTensor* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.TensorInfo.CompositeTensor"; + } + protected: + explicit TensorInfo_CompositeTensor(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kComponentsFieldNumber = 2, + kTypeSpecFieldNumber = 1, + }; + // repeated .tensorflow.TensorInfo components = 2; + int components_size() const; + private: + int _internal_components_size() const; + public: + void clear_components(); + ::tensorflow::TensorInfo* mutable_components(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::TensorInfo >* + mutable_components(); + private: + const ::tensorflow::TensorInfo& _internal_components(int index) const; + ::tensorflow::TensorInfo* _internal_add_components(); + public: + const ::tensorflow::TensorInfo& components(int index) const; + ::tensorflow::TensorInfo* add_components(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::TensorInfo >& + components() const; + + // .tensorflow.TypeSpecProto type_spec = 1; + bool has_type_spec() const; + private: + bool _internal_has_type_spec() const; + public: + void clear_type_spec(); + const ::tensorflow::TypeSpecProto& type_spec() const; + PROTOBUF_NODISCARD ::tensorflow::TypeSpecProto* release_type_spec(); + ::tensorflow::TypeSpecProto* mutable_type_spec(); + void set_allocated_type_spec(::tensorflow::TypeSpecProto* type_spec); + private: + const ::tensorflow::TypeSpecProto& _internal_type_spec() const; + ::tensorflow::TypeSpecProto* _internal_mutable_type_spec(); + public: + void unsafe_arena_set_allocated_type_spec( + ::tensorflow::TypeSpecProto* type_spec); + ::tensorflow::TypeSpecProto* unsafe_arena_release_type_spec(); + + // @@protoc_insertion_point(class_scope:tensorflow.TensorInfo.CompositeTensor) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::TensorInfo > components_; + ::tensorflow::TypeSpecProto* type_spec_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fmeta_5fgraph_2eproto; +}; +// ------------------------------------------------------------------- + +class TensorInfo final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.TensorInfo) */ { + public: + inline TensorInfo() : TensorInfo(nullptr) {} + ~TensorInfo() override; + explicit PROTOBUF_CONSTEXPR TensorInfo(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + TensorInfo(const TensorInfo& from); + TensorInfo(TensorInfo&& from) noexcept + : TensorInfo() { + *this = ::std::move(from); + } + + inline TensorInfo& operator=(const TensorInfo& from) { + CopyFrom(from); + return *this; + } + inline TensorInfo& operator=(TensorInfo&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const TensorInfo& default_instance() { + return *internal_default_instance(); + } + enum EncodingCase { + kName = 1, + kCooSparse = 4, + kCompositeTensor = 5, + ENCODING_NOT_SET = 0, + }; + + static inline const TensorInfo* internal_default_instance() { + return reinterpret_cast( + &_TensorInfo_default_instance_); + } + static constexpr int kIndexInFileMessages = + 13; + + friend void swap(TensorInfo& a, TensorInfo& b) { + a.Swap(&b); + } + inline void Swap(TensorInfo* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(TensorInfo* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + TensorInfo* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const TensorInfo& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const TensorInfo& from) { + TensorInfo::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(TensorInfo* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.TensorInfo"; + } + protected: + explicit TensorInfo(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + typedef TensorInfo_CooSparse CooSparse; + typedef TensorInfo_CompositeTensor CompositeTensor; + + // accessors ------------------------------------------------------- + + enum : int { + kTensorShapeFieldNumber = 3, + kDtypeFieldNumber = 2, + kNameFieldNumber = 1, + kCooSparseFieldNumber = 4, + kCompositeTensorFieldNumber = 5, + }; + // .tensorflow.TensorShapeProto tensor_shape = 3; + bool has_tensor_shape() const; + private: + bool _internal_has_tensor_shape() const; + public: + void clear_tensor_shape(); + const ::tensorflow::TensorShapeProto& tensor_shape() const; + PROTOBUF_NODISCARD ::tensorflow::TensorShapeProto* release_tensor_shape(); + ::tensorflow::TensorShapeProto* mutable_tensor_shape(); + void set_allocated_tensor_shape(::tensorflow::TensorShapeProto* tensor_shape); + private: + const ::tensorflow::TensorShapeProto& _internal_tensor_shape() const; + ::tensorflow::TensorShapeProto* _internal_mutable_tensor_shape(); + public: + void unsafe_arena_set_allocated_tensor_shape( + ::tensorflow::TensorShapeProto* tensor_shape); + ::tensorflow::TensorShapeProto* unsafe_arena_release_tensor_shape(); + + // .tensorflow.DataType dtype = 2; + void clear_dtype(); + ::tensorflow::DataType dtype() const; + void set_dtype(::tensorflow::DataType value); + private: + ::tensorflow::DataType _internal_dtype() const; + void _internal_set_dtype(::tensorflow::DataType value); + public: + + // string name = 1; + bool has_name() const; + private: + bool _internal_has_name() const; + public: + void clear_name(); + const std::string& name() const; + template + void set_name(ArgT0&& arg0, ArgT... args); + std::string* mutable_name(); + PROTOBUF_NODISCARD std::string* release_name(); + void set_allocated_name(std::string* name); + private: + const std::string& _internal_name() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_name(const std::string& value); + std::string* _internal_mutable_name(); + public: + + // .tensorflow.TensorInfo.CooSparse coo_sparse = 4; + bool has_coo_sparse() const; + private: + bool _internal_has_coo_sparse() const; + public: + void clear_coo_sparse(); + const ::tensorflow::TensorInfo_CooSparse& coo_sparse() const; + PROTOBUF_NODISCARD ::tensorflow::TensorInfo_CooSparse* release_coo_sparse(); + ::tensorflow::TensorInfo_CooSparse* mutable_coo_sparse(); + void set_allocated_coo_sparse(::tensorflow::TensorInfo_CooSparse* coo_sparse); + private: + const ::tensorflow::TensorInfo_CooSparse& _internal_coo_sparse() const; + ::tensorflow::TensorInfo_CooSparse* _internal_mutable_coo_sparse(); + public: + void unsafe_arena_set_allocated_coo_sparse( + ::tensorflow::TensorInfo_CooSparse* coo_sparse); + ::tensorflow::TensorInfo_CooSparse* unsafe_arena_release_coo_sparse(); + + // .tensorflow.TensorInfo.CompositeTensor composite_tensor = 5; + bool has_composite_tensor() const; + private: + bool _internal_has_composite_tensor() const; + public: + void clear_composite_tensor(); + const ::tensorflow::TensorInfo_CompositeTensor& composite_tensor() const; + PROTOBUF_NODISCARD ::tensorflow::TensorInfo_CompositeTensor* release_composite_tensor(); + ::tensorflow::TensorInfo_CompositeTensor* mutable_composite_tensor(); + void set_allocated_composite_tensor(::tensorflow::TensorInfo_CompositeTensor* composite_tensor); + private: + const ::tensorflow::TensorInfo_CompositeTensor& _internal_composite_tensor() const; + ::tensorflow::TensorInfo_CompositeTensor* _internal_mutable_composite_tensor(); + public: + void unsafe_arena_set_allocated_composite_tensor( + ::tensorflow::TensorInfo_CompositeTensor* composite_tensor); + ::tensorflow::TensorInfo_CompositeTensor* unsafe_arena_release_composite_tensor(); + + void clear_encoding(); + EncodingCase encoding_case() const; + // @@protoc_insertion_point(class_scope:tensorflow.TensorInfo) + private: + class _Internal; + void set_has_name(); + void set_has_coo_sparse(); + void set_has_composite_tensor(); + + inline bool has_encoding() const; + inline void clear_has_encoding(); + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::tensorflow::TensorShapeProto* tensor_shape_; + int dtype_; + union EncodingUnion { + constexpr EncodingUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_; + ::tensorflow::TensorInfo_CooSparse* coo_sparse_; + ::tensorflow::TensorInfo_CompositeTensor* composite_tensor_; + } encoding_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + uint32_t _oneof_case_[1]; + + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fmeta_5fgraph_2eproto; +}; +// ------------------------------------------------------------------- + +class SignatureDef_InputsEntry_DoNotUse : public ::PROTOBUF_NAMESPACE_ID::internal::MapEntry { +public: + typedef ::PROTOBUF_NAMESPACE_ID::internal::MapEntry SuperType; + SignatureDef_InputsEntry_DoNotUse(); + explicit PROTOBUF_CONSTEXPR SignatureDef_InputsEntry_DoNotUse( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + explicit SignatureDef_InputsEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena); + void MergeFrom(const SignatureDef_InputsEntry_DoNotUse& other); + static const SignatureDef_InputsEntry_DoNotUse* internal_default_instance() { return reinterpret_cast(&_SignatureDef_InputsEntry_DoNotUse_default_instance_); } + static bool ValidateKey(std::string* s) { + return ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(s->data(), static_cast(s->size()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, "tensorflow.SignatureDef.InputsEntry.key"); + } + static bool ValidateValue(void*) { return true; } + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fmeta_5fgraph_2eproto; +}; + +// ------------------------------------------------------------------- + +class SignatureDef_OutputsEntry_DoNotUse : public ::PROTOBUF_NAMESPACE_ID::internal::MapEntry { +public: + typedef ::PROTOBUF_NAMESPACE_ID::internal::MapEntry SuperType; + SignatureDef_OutputsEntry_DoNotUse(); + explicit PROTOBUF_CONSTEXPR SignatureDef_OutputsEntry_DoNotUse( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + explicit SignatureDef_OutputsEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena); + void MergeFrom(const SignatureDef_OutputsEntry_DoNotUse& other); + static const SignatureDef_OutputsEntry_DoNotUse* internal_default_instance() { return reinterpret_cast(&_SignatureDef_OutputsEntry_DoNotUse_default_instance_); } + static bool ValidateKey(std::string* s) { + return ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(s->data(), static_cast(s->size()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, "tensorflow.SignatureDef.OutputsEntry.key"); + } + static bool ValidateValue(void*) { return true; } + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fmeta_5fgraph_2eproto; +}; + +// ------------------------------------------------------------------- + +class SignatureDef_DefaultsEntry_DoNotUse : public ::PROTOBUF_NAMESPACE_ID::internal::MapEntry { +public: + typedef ::PROTOBUF_NAMESPACE_ID::internal::MapEntry SuperType; + SignatureDef_DefaultsEntry_DoNotUse(); + explicit PROTOBUF_CONSTEXPR SignatureDef_DefaultsEntry_DoNotUse( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + explicit SignatureDef_DefaultsEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena); + void MergeFrom(const SignatureDef_DefaultsEntry_DoNotUse& other); + static const SignatureDef_DefaultsEntry_DoNotUse* internal_default_instance() { return reinterpret_cast(&_SignatureDef_DefaultsEntry_DoNotUse_default_instance_); } + static bool ValidateKey(std::string* s) { + return ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(s->data(), static_cast(s->size()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, "tensorflow.SignatureDef.DefaultsEntry.key"); + } + static bool ValidateValue(void*) { return true; } + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fmeta_5fgraph_2eproto; +}; + +// ------------------------------------------------------------------- + +class SignatureDef final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.SignatureDef) */ { + public: + inline SignatureDef() : SignatureDef(nullptr) {} + ~SignatureDef() override; + explicit PROTOBUF_CONSTEXPR SignatureDef(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + SignatureDef(const SignatureDef& from); + SignatureDef(SignatureDef&& from) noexcept + : SignatureDef() { + *this = ::std::move(from); + } + + inline SignatureDef& operator=(const SignatureDef& from) { + CopyFrom(from); + return *this; + } + inline SignatureDef& operator=(SignatureDef&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const SignatureDef& default_instance() { + return *internal_default_instance(); + } + static inline const SignatureDef* internal_default_instance() { + return reinterpret_cast( + &_SignatureDef_default_instance_); + } + static constexpr int kIndexInFileMessages = + 17; + + friend void swap(SignatureDef& a, SignatureDef& b) { + a.Swap(&b); + } + inline void Swap(SignatureDef* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(SignatureDef* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + SignatureDef* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const SignatureDef& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const SignatureDef& from) { + SignatureDef::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(SignatureDef* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.SignatureDef"; + } + protected: + explicit SignatureDef(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + + // accessors ------------------------------------------------------- + + enum : int { + kInputsFieldNumber = 1, + kOutputsFieldNumber = 2, + kDefaultsFieldNumber = 4, + kMethodNameFieldNumber = 3, + }; + // map inputs = 1; + int inputs_size() const; + private: + int _internal_inputs_size() const; + public: + void clear_inputs(); + private: + const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::TensorInfo >& + _internal_inputs() const; + ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::TensorInfo >* + _internal_mutable_inputs(); + public: + const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::TensorInfo >& + inputs() const; + ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::TensorInfo >* + mutable_inputs(); + + // map outputs = 2; + int outputs_size() const; + private: + int _internal_outputs_size() const; + public: + void clear_outputs(); + private: + const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::TensorInfo >& + _internal_outputs() const; + ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::TensorInfo >* + _internal_mutable_outputs(); + public: + const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::TensorInfo >& + outputs() const; + ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::TensorInfo >* + mutable_outputs(); + + // map defaults = 4; + int defaults_size() const; + private: + int _internal_defaults_size() const; + public: + void clear_defaults(); + private: + const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::TensorProto >& + _internal_defaults() const; + ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::TensorProto >* + _internal_mutable_defaults(); + public: + const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::TensorProto >& + defaults() const; + ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::TensorProto >* + mutable_defaults(); + + // string method_name = 3; + void clear_method_name(); + const std::string& method_name() const; + template + void set_method_name(ArgT0&& arg0, ArgT... args); + std::string* mutable_method_name(); + PROTOBUF_NODISCARD std::string* release_method_name(); + void set_allocated_method_name(std::string* method_name); + private: + const std::string& _internal_method_name() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_method_name(const std::string& value); + std::string* _internal_mutable_method_name(); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.SignatureDef) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::MapField< + SignatureDef_InputsEntry_DoNotUse, + std::string, ::tensorflow::TensorInfo, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_MESSAGE> inputs_; + ::PROTOBUF_NAMESPACE_ID::internal::MapField< + SignatureDef_OutputsEntry_DoNotUse, + std::string, ::tensorflow::TensorInfo, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_MESSAGE> outputs_; + ::PROTOBUF_NAMESPACE_ID::internal::MapField< + SignatureDef_DefaultsEntry_DoNotUse, + std::string, ::tensorflow::TensorProto, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_MESSAGE> defaults_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr method_name_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fmeta_5fgraph_2eproto; +}; +// ------------------------------------------------------------------- + +class AssetFileDef final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.AssetFileDef) */ { + public: + inline AssetFileDef() : AssetFileDef(nullptr) {} + ~AssetFileDef() override; + explicit PROTOBUF_CONSTEXPR AssetFileDef(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + AssetFileDef(const AssetFileDef& from); + AssetFileDef(AssetFileDef&& from) noexcept + : AssetFileDef() { + *this = ::std::move(from); + } + + inline AssetFileDef& operator=(const AssetFileDef& from) { + CopyFrom(from); + return *this; + } + inline AssetFileDef& operator=(AssetFileDef&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const AssetFileDef& default_instance() { + return *internal_default_instance(); + } + static inline const AssetFileDef* internal_default_instance() { + return reinterpret_cast( + &_AssetFileDef_default_instance_); + } + static constexpr int kIndexInFileMessages = + 18; + + friend void swap(AssetFileDef& a, AssetFileDef& b) { + a.Swap(&b); + } + inline void Swap(AssetFileDef* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(AssetFileDef* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + AssetFileDef* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const AssetFileDef& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const AssetFileDef& from) { + AssetFileDef::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(AssetFileDef* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.AssetFileDef"; + } + protected: + explicit AssetFileDef(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kFilenameFieldNumber = 2, + kTensorInfoFieldNumber = 1, + }; + // string filename = 2; + void clear_filename(); + const std::string& filename() const; + template + void set_filename(ArgT0&& arg0, ArgT... args); + std::string* mutable_filename(); + PROTOBUF_NODISCARD std::string* release_filename(); + void set_allocated_filename(std::string* filename); + private: + const std::string& _internal_filename() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_filename(const std::string& value); + std::string* _internal_mutable_filename(); + public: + + // .tensorflow.TensorInfo tensor_info = 1; + bool has_tensor_info() const; + private: + bool _internal_has_tensor_info() const; + public: + void clear_tensor_info(); + const ::tensorflow::TensorInfo& tensor_info() const; + PROTOBUF_NODISCARD ::tensorflow::TensorInfo* release_tensor_info(); + ::tensorflow::TensorInfo* mutable_tensor_info(); + void set_allocated_tensor_info(::tensorflow::TensorInfo* tensor_info); + private: + const ::tensorflow::TensorInfo& _internal_tensor_info() const; + ::tensorflow::TensorInfo* _internal_mutable_tensor_info(); + public: + void unsafe_arena_set_allocated_tensor_info( + ::tensorflow::TensorInfo* tensor_info); + ::tensorflow::TensorInfo* unsafe_arena_release_tensor_info(); + + // @@protoc_insertion_point(class_scope:tensorflow.AssetFileDef) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr filename_; + ::tensorflow::TensorInfo* tensor_info_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fmeta_5fgraph_2eproto; +}; +// =================================================================== + + +// =================================================================== + +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// ------------------------------------------------------------------- + +// MetaGraphDef_MetaInfoDef + +// string meta_graph_version = 1; +inline void MetaGraphDef_MetaInfoDef::clear_meta_graph_version() { + _impl_.meta_graph_version_.ClearToEmpty(); +} +inline const std::string& MetaGraphDef_MetaInfoDef::meta_graph_version() const { + // @@protoc_insertion_point(field_get:tensorflow.MetaGraphDef.MetaInfoDef.meta_graph_version) + return _internal_meta_graph_version(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void MetaGraphDef_MetaInfoDef::set_meta_graph_version(ArgT0&& arg0, ArgT... args) { + + _impl_.meta_graph_version_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.MetaGraphDef.MetaInfoDef.meta_graph_version) +} +inline std::string* MetaGraphDef_MetaInfoDef::mutable_meta_graph_version() { + std::string* _s = _internal_mutable_meta_graph_version(); + // @@protoc_insertion_point(field_mutable:tensorflow.MetaGraphDef.MetaInfoDef.meta_graph_version) + return _s; +} +inline const std::string& MetaGraphDef_MetaInfoDef::_internal_meta_graph_version() const { + return _impl_.meta_graph_version_.Get(); +} +inline void MetaGraphDef_MetaInfoDef::_internal_set_meta_graph_version(const std::string& value) { + + _impl_.meta_graph_version_.Set(value, GetArenaForAllocation()); +} +inline std::string* MetaGraphDef_MetaInfoDef::_internal_mutable_meta_graph_version() { + + return _impl_.meta_graph_version_.Mutable(GetArenaForAllocation()); +} +inline std::string* MetaGraphDef_MetaInfoDef::release_meta_graph_version() { + // @@protoc_insertion_point(field_release:tensorflow.MetaGraphDef.MetaInfoDef.meta_graph_version) + return _impl_.meta_graph_version_.Release(); +} +inline void MetaGraphDef_MetaInfoDef::set_allocated_meta_graph_version(std::string* meta_graph_version) { + if (meta_graph_version != nullptr) { + + } else { + + } + _impl_.meta_graph_version_.SetAllocated(meta_graph_version, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.meta_graph_version_.IsDefault()) { + _impl_.meta_graph_version_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.MetaGraphDef.MetaInfoDef.meta_graph_version) +} + +// .tensorflow.OpList stripped_op_list = 2; +inline bool MetaGraphDef_MetaInfoDef::_internal_has_stripped_op_list() const { + return this != internal_default_instance() && _impl_.stripped_op_list_ != nullptr; +} +inline bool MetaGraphDef_MetaInfoDef::has_stripped_op_list() const { + return _internal_has_stripped_op_list(); +} +inline const ::tensorflow::OpList& MetaGraphDef_MetaInfoDef::_internal_stripped_op_list() const { + const ::tensorflow::OpList* p = _impl_.stripped_op_list_; + return p != nullptr ? *p : reinterpret_cast( + ::tensorflow::_OpList_default_instance_); +} +inline const ::tensorflow::OpList& MetaGraphDef_MetaInfoDef::stripped_op_list() const { + // @@protoc_insertion_point(field_get:tensorflow.MetaGraphDef.MetaInfoDef.stripped_op_list) + return _internal_stripped_op_list(); +} +inline void MetaGraphDef_MetaInfoDef::unsafe_arena_set_allocated_stripped_op_list( + ::tensorflow::OpList* stripped_op_list) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.stripped_op_list_); + } + _impl_.stripped_op_list_ = stripped_op_list; + if (stripped_op_list) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.MetaGraphDef.MetaInfoDef.stripped_op_list) +} +inline ::tensorflow::OpList* MetaGraphDef_MetaInfoDef::release_stripped_op_list() { + + ::tensorflow::OpList* temp = _impl_.stripped_op_list_; + _impl_.stripped_op_list_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tensorflow::OpList* MetaGraphDef_MetaInfoDef::unsafe_arena_release_stripped_op_list() { + // @@protoc_insertion_point(field_release:tensorflow.MetaGraphDef.MetaInfoDef.stripped_op_list) + + ::tensorflow::OpList* temp = _impl_.stripped_op_list_; + _impl_.stripped_op_list_ = nullptr; + return temp; +} +inline ::tensorflow::OpList* MetaGraphDef_MetaInfoDef::_internal_mutable_stripped_op_list() { + + if (_impl_.stripped_op_list_ == nullptr) { + auto* p = CreateMaybeMessage<::tensorflow::OpList>(GetArenaForAllocation()); + _impl_.stripped_op_list_ = p; + } + return _impl_.stripped_op_list_; +} +inline ::tensorflow::OpList* MetaGraphDef_MetaInfoDef::mutable_stripped_op_list() { + ::tensorflow::OpList* _msg = _internal_mutable_stripped_op_list(); + // @@protoc_insertion_point(field_mutable:tensorflow.MetaGraphDef.MetaInfoDef.stripped_op_list) + return _msg; +} +inline void MetaGraphDef_MetaInfoDef::set_allocated_stripped_op_list(::tensorflow::OpList* stripped_op_list) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.stripped_op_list_); + } + if (stripped_op_list) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( + reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(stripped_op_list)); + if (message_arena != submessage_arena) { + stripped_op_list = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, stripped_op_list, submessage_arena); + } + + } else { + + } + _impl_.stripped_op_list_ = stripped_op_list; + // @@protoc_insertion_point(field_set_allocated:tensorflow.MetaGraphDef.MetaInfoDef.stripped_op_list) +} + +// .google.protobuf.Any any_info = 3; +inline bool MetaGraphDef_MetaInfoDef::_internal_has_any_info() const { + return this != internal_default_instance() && _impl_.any_info_ != nullptr; +} +inline bool MetaGraphDef_MetaInfoDef::has_any_info() const { + return _internal_has_any_info(); +} +inline const ::PROTOBUF_NAMESPACE_ID::Any& MetaGraphDef_MetaInfoDef::_internal_any_info() const { + const ::PROTOBUF_NAMESPACE_ID::Any* p = _impl_.any_info_; + return p != nullptr ? *p : reinterpret_cast( + ::PROTOBUF_NAMESPACE_ID::_Any_default_instance_); +} +inline const ::PROTOBUF_NAMESPACE_ID::Any& MetaGraphDef_MetaInfoDef::any_info() const { + // @@protoc_insertion_point(field_get:tensorflow.MetaGraphDef.MetaInfoDef.any_info) + return _internal_any_info(); +} +inline void MetaGraphDef_MetaInfoDef::unsafe_arena_set_allocated_any_info( + ::PROTOBUF_NAMESPACE_ID::Any* any_info) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.any_info_); + } + _impl_.any_info_ = any_info; + if (any_info) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.MetaGraphDef.MetaInfoDef.any_info) +} +inline ::PROTOBUF_NAMESPACE_ID::Any* MetaGraphDef_MetaInfoDef::release_any_info() { + + ::PROTOBUF_NAMESPACE_ID::Any* temp = _impl_.any_info_; + _impl_.any_info_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::PROTOBUF_NAMESPACE_ID::Any* MetaGraphDef_MetaInfoDef::unsafe_arena_release_any_info() { + // @@protoc_insertion_point(field_release:tensorflow.MetaGraphDef.MetaInfoDef.any_info) + + ::PROTOBUF_NAMESPACE_ID::Any* temp = _impl_.any_info_; + _impl_.any_info_ = nullptr; + return temp; +} +inline ::PROTOBUF_NAMESPACE_ID::Any* MetaGraphDef_MetaInfoDef::_internal_mutable_any_info() { + + if (_impl_.any_info_ == nullptr) { + auto* p = CreateMaybeMessage<::PROTOBUF_NAMESPACE_ID::Any>(GetArenaForAllocation()); + _impl_.any_info_ = p; + } + return _impl_.any_info_; +} +inline ::PROTOBUF_NAMESPACE_ID::Any* MetaGraphDef_MetaInfoDef::mutable_any_info() { + ::PROTOBUF_NAMESPACE_ID::Any* _msg = _internal_mutable_any_info(); + // @@protoc_insertion_point(field_mutable:tensorflow.MetaGraphDef.MetaInfoDef.any_info) + return _msg; +} +inline void MetaGraphDef_MetaInfoDef::set_allocated_any_info(::PROTOBUF_NAMESPACE_ID::Any* any_info) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.any_info_); + } + if (any_info) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( + reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(any_info)); + if (message_arena != submessage_arena) { + any_info = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, any_info, submessage_arena); + } + + } else { + + } + _impl_.any_info_ = any_info; + // @@protoc_insertion_point(field_set_allocated:tensorflow.MetaGraphDef.MetaInfoDef.any_info) +} + +// repeated string tags = 4; +inline int MetaGraphDef_MetaInfoDef::_internal_tags_size() const { + return _impl_.tags_.size(); +} +inline int MetaGraphDef_MetaInfoDef::tags_size() const { + return _internal_tags_size(); +} +inline void MetaGraphDef_MetaInfoDef::clear_tags() { + _impl_.tags_.Clear(); +} +inline std::string* MetaGraphDef_MetaInfoDef::add_tags() { + std::string* _s = _internal_add_tags(); + // @@protoc_insertion_point(field_add_mutable:tensorflow.MetaGraphDef.MetaInfoDef.tags) + return _s; +} +inline const std::string& MetaGraphDef_MetaInfoDef::_internal_tags(int index) const { + return _impl_.tags_.Get(index); +} +inline const std::string& MetaGraphDef_MetaInfoDef::tags(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.MetaGraphDef.MetaInfoDef.tags) + return _internal_tags(index); +} +inline std::string* MetaGraphDef_MetaInfoDef::mutable_tags(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.MetaGraphDef.MetaInfoDef.tags) + return _impl_.tags_.Mutable(index); +} +inline void MetaGraphDef_MetaInfoDef::set_tags(int index, const std::string& value) { + _impl_.tags_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set:tensorflow.MetaGraphDef.MetaInfoDef.tags) +} +inline void MetaGraphDef_MetaInfoDef::set_tags(int index, std::string&& value) { + _impl_.tags_.Mutable(index)->assign(std::move(value)); + // @@protoc_insertion_point(field_set:tensorflow.MetaGraphDef.MetaInfoDef.tags) +} +inline void MetaGraphDef_MetaInfoDef::set_tags(int index, const char* value) { + GOOGLE_DCHECK(value != nullptr); + _impl_.tags_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set_char:tensorflow.MetaGraphDef.MetaInfoDef.tags) +} +inline void MetaGraphDef_MetaInfoDef::set_tags(int index, const char* value, size_t size) { + _impl_.tags_.Mutable(index)->assign( + reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:tensorflow.MetaGraphDef.MetaInfoDef.tags) +} +inline std::string* MetaGraphDef_MetaInfoDef::_internal_add_tags() { + return _impl_.tags_.Add(); +} +inline void MetaGraphDef_MetaInfoDef::add_tags(const std::string& value) { + _impl_.tags_.Add()->assign(value); + // @@protoc_insertion_point(field_add:tensorflow.MetaGraphDef.MetaInfoDef.tags) +} +inline void MetaGraphDef_MetaInfoDef::add_tags(std::string&& value) { + _impl_.tags_.Add(std::move(value)); + // @@protoc_insertion_point(field_add:tensorflow.MetaGraphDef.MetaInfoDef.tags) +} +inline void MetaGraphDef_MetaInfoDef::add_tags(const char* value) { + GOOGLE_DCHECK(value != nullptr); + _impl_.tags_.Add()->assign(value); + // @@protoc_insertion_point(field_add_char:tensorflow.MetaGraphDef.MetaInfoDef.tags) +} +inline void MetaGraphDef_MetaInfoDef::add_tags(const char* value, size_t size) { + _impl_.tags_.Add()->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_add_pointer:tensorflow.MetaGraphDef.MetaInfoDef.tags) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& +MetaGraphDef_MetaInfoDef::tags() const { + // @@protoc_insertion_point(field_list:tensorflow.MetaGraphDef.MetaInfoDef.tags) + return _impl_.tags_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* +MetaGraphDef_MetaInfoDef::mutable_tags() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.MetaGraphDef.MetaInfoDef.tags) + return &_impl_.tags_; +} + +// string tensorflow_version = 5; +inline void MetaGraphDef_MetaInfoDef::clear_tensorflow_version() { + _impl_.tensorflow_version_.ClearToEmpty(); +} +inline const std::string& MetaGraphDef_MetaInfoDef::tensorflow_version() const { + // @@protoc_insertion_point(field_get:tensorflow.MetaGraphDef.MetaInfoDef.tensorflow_version) + return _internal_tensorflow_version(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void MetaGraphDef_MetaInfoDef::set_tensorflow_version(ArgT0&& arg0, ArgT... args) { + + _impl_.tensorflow_version_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.MetaGraphDef.MetaInfoDef.tensorflow_version) +} +inline std::string* MetaGraphDef_MetaInfoDef::mutable_tensorflow_version() { + std::string* _s = _internal_mutable_tensorflow_version(); + // @@protoc_insertion_point(field_mutable:tensorflow.MetaGraphDef.MetaInfoDef.tensorflow_version) + return _s; +} +inline const std::string& MetaGraphDef_MetaInfoDef::_internal_tensorflow_version() const { + return _impl_.tensorflow_version_.Get(); +} +inline void MetaGraphDef_MetaInfoDef::_internal_set_tensorflow_version(const std::string& value) { + + _impl_.tensorflow_version_.Set(value, GetArenaForAllocation()); +} +inline std::string* MetaGraphDef_MetaInfoDef::_internal_mutable_tensorflow_version() { + + return _impl_.tensorflow_version_.Mutable(GetArenaForAllocation()); +} +inline std::string* MetaGraphDef_MetaInfoDef::release_tensorflow_version() { + // @@protoc_insertion_point(field_release:tensorflow.MetaGraphDef.MetaInfoDef.tensorflow_version) + return _impl_.tensorflow_version_.Release(); +} +inline void MetaGraphDef_MetaInfoDef::set_allocated_tensorflow_version(std::string* tensorflow_version) { + if (tensorflow_version != nullptr) { + + } else { + + } + _impl_.tensorflow_version_.SetAllocated(tensorflow_version, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.tensorflow_version_.IsDefault()) { + _impl_.tensorflow_version_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.MetaGraphDef.MetaInfoDef.tensorflow_version) +} + +// string tensorflow_git_version = 6; +inline void MetaGraphDef_MetaInfoDef::clear_tensorflow_git_version() { + _impl_.tensorflow_git_version_.ClearToEmpty(); +} +inline const std::string& MetaGraphDef_MetaInfoDef::tensorflow_git_version() const { + // @@protoc_insertion_point(field_get:tensorflow.MetaGraphDef.MetaInfoDef.tensorflow_git_version) + return _internal_tensorflow_git_version(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void MetaGraphDef_MetaInfoDef::set_tensorflow_git_version(ArgT0&& arg0, ArgT... args) { + + _impl_.tensorflow_git_version_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.MetaGraphDef.MetaInfoDef.tensorflow_git_version) +} +inline std::string* MetaGraphDef_MetaInfoDef::mutable_tensorflow_git_version() { + std::string* _s = _internal_mutable_tensorflow_git_version(); + // @@protoc_insertion_point(field_mutable:tensorflow.MetaGraphDef.MetaInfoDef.tensorflow_git_version) + return _s; +} +inline const std::string& MetaGraphDef_MetaInfoDef::_internal_tensorflow_git_version() const { + return _impl_.tensorflow_git_version_.Get(); +} +inline void MetaGraphDef_MetaInfoDef::_internal_set_tensorflow_git_version(const std::string& value) { + + _impl_.tensorflow_git_version_.Set(value, GetArenaForAllocation()); +} +inline std::string* MetaGraphDef_MetaInfoDef::_internal_mutable_tensorflow_git_version() { + + return _impl_.tensorflow_git_version_.Mutable(GetArenaForAllocation()); +} +inline std::string* MetaGraphDef_MetaInfoDef::release_tensorflow_git_version() { + // @@protoc_insertion_point(field_release:tensorflow.MetaGraphDef.MetaInfoDef.tensorflow_git_version) + return _impl_.tensorflow_git_version_.Release(); +} +inline void MetaGraphDef_MetaInfoDef::set_allocated_tensorflow_git_version(std::string* tensorflow_git_version) { + if (tensorflow_git_version != nullptr) { + + } else { + + } + _impl_.tensorflow_git_version_.SetAllocated(tensorflow_git_version, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.tensorflow_git_version_.IsDefault()) { + _impl_.tensorflow_git_version_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.MetaGraphDef.MetaInfoDef.tensorflow_git_version) +} + +// bool stripped_default_attrs = 7; +inline void MetaGraphDef_MetaInfoDef::clear_stripped_default_attrs() { + _impl_.stripped_default_attrs_ = false; +} +inline bool MetaGraphDef_MetaInfoDef::_internal_stripped_default_attrs() const { + return _impl_.stripped_default_attrs_; +} +inline bool MetaGraphDef_MetaInfoDef::stripped_default_attrs() const { + // @@protoc_insertion_point(field_get:tensorflow.MetaGraphDef.MetaInfoDef.stripped_default_attrs) + return _internal_stripped_default_attrs(); +} +inline void MetaGraphDef_MetaInfoDef::_internal_set_stripped_default_attrs(bool value) { + + _impl_.stripped_default_attrs_ = value; +} +inline void MetaGraphDef_MetaInfoDef::set_stripped_default_attrs(bool value) { + _internal_set_stripped_default_attrs(value); + // @@protoc_insertion_point(field_set:tensorflow.MetaGraphDef.MetaInfoDef.stripped_default_attrs) +} + +// map function_aliases = 8; +inline int MetaGraphDef_MetaInfoDef::_internal_function_aliases_size() const { + return _impl_.function_aliases_.size(); +} +inline int MetaGraphDef_MetaInfoDef::function_aliases_size() const { + return _internal_function_aliases_size(); +} +inline void MetaGraphDef_MetaInfoDef::clear_function_aliases() { + _impl_.function_aliases_.Clear(); +} +inline const ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >& +MetaGraphDef_MetaInfoDef::_internal_function_aliases() const { + return _impl_.function_aliases_.GetMap(); +} +inline const ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >& +MetaGraphDef_MetaInfoDef::function_aliases() const { + // @@protoc_insertion_point(field_map:tensorflow.MetaGraphDef.MetaInfoDef.function_aliases) + return _internal_function_aliases(); +} +inline ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >* +MetaGraphDef_MetaInfoDef::_internal_mutable_function_aliases() { + return _impl_.function_aliases_.MutableMap(); +} +inline ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >* +MetaGraphDef_MetaInfoDef::mutable_function_aliases() { + // @@protoc_insertion_point(field_mutable_map:tensorflow.MetaGraphDef.MetaInfoDef.function_aliases) + return _internal_mutable_function_aliases(); +} + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// MetaGraphDef + +// .tensorflow.MetaGraphDef.MetaInfoDef meta_info_def = 1; +inline bool MetaGraphDef::_internal_has_meta_info_def() const { + return this != internal_default_instance() && _impl_.meta_info_def_ != nullptr; +} +inline bool MetaGraphDef::has_meta_info_def() const { + return _internal_has_meta_info_def(); +} +inline void MetaGraphDef::clear_meta_info_def() { + if (GetArenaForAllocation() == nullptr && _impl_.meta_info_def_ != nullptr) { + delete _impl_.meta_info_def_; + } + _impl_.meta_info_def_ = nullptr; +} +inline const ::tensorflow::MetaGraphDef_MetaInfoDef& MetaGraphDef::_internal_meta_info_def() const { + const ::tensorflow::MetaGraphDef_MetaInfoDef* p = _impl_.meta_info_def_; + return p != nullptr ? *p : reinterpret_cast( + ::tensorflow::_MetaGraphDef_MetaInfoDef_default_instance_); +} +inline const ::tensorflow::MetaGraphDef_MetaInfoDef& MetaGraphDef::meta_info_def() const { + // @@protoc_insertion_point(field_get:tensorflow.MetaGraphDef.meta_info_def) + return _internal_meta_info_def(); +} +inline void MetaGraphDef::unsafe_arena_set_allocated_meta_info_def( + ::tensorflow::MetaGraphDef_MetaInfoDef* meta_info_def) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.meta_info_def_); + } + _impl_.meta_info_def_ = meta_info_def; + if (meta_info_def) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.MetaGraphDef.meta_info_def) +} +inline ::tensorflow::MetaGraphDef_MetaInfoDef* MetaGraphDef::release_meta_info_def() { + + ::tensorflow::MetaGraphDef_MetaInfoDef* temp = _impl_.meta_info_def_; + _impl_.meta_info_def_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tensorflow::MetaGraphDef_MetaInfoDef* MetaGraphDef::unsafe_arena_release_meta_info_def() { + // @@protoc_insertion_point(field_release:tensorflow.MetaGraphDef.meta_info_def) + + ::tensorflow::MetaGraphDef_MetaInfoDef* temp = _impl_.meta_info_def_; + _impl_.meta_info_def_ = nullptr; + return temp; +} +inline ::tensorflow::MetaGraphDef_MetaInfoDef* MetaGraphDef::_internal_mutable_meta_info_def() { + + if (_impl_.meta_info_def_ == nullptr) { + auto* p = CreateMaybeMessage<::tensorflow::MetaGraphDef_MetaInfoDef>(GetArenaForAllocation()); + _impl_.meta_info_def_ = p; + } + return _impl_.meta_info_def_; +} +inline ::tensorflow::MetaGraphDef_MetaInfoDef* MetaGraphDef::mutable_meta_info_def() { + ::tensorflow::MetaGraphDef_MetaInfoDef* _msg = _internal_mutable_meta_info_def(); + // @@protoc_insertion_point(field_mutable:tensorflow.MetaGraphDef.meta_info_def) + return _msg; +} +inline void MetaGraphDef::set_allocated_meta_info_def(::tensorflow::MetaGraphDef_MetaInfoDef* meta_info_def) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete _impl_.meta_info_def_; + } + if (meta_info_def) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(meta_info_def); + if (message_arena != submessage_arena) { + meta_info_def = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, meta_info_def, submessage_arena); + } + + } else { + + } + _impl_.meta_info_def_ = meta_info_def; + // @@protoc_insertion_point(field_set_allocated:tensorflow.MetaGraphDef.meta_info_def) +} + +// .tensorflow.GraphDef graph_def = 2; +inline bool MetaGraphDef::_internal_has_graph_def() const { + return this != internal_default_instance() && _impl_.graph_def_ != nullptr; +} +inline bool MetaGraphDef::has_graph_def() const { + return _internal_has_graph_def(); +} +inline const ::tensorflow::GraphDef& MetaGraphDef::_internal_graph_def() const { + const ::tensorflow::GraphDef* p = _impl_.graph_def_; + return p != nullptr ? *p : reinterpret_cast( + ::tensorflow::_GraphDef_default_instance_); +} +inline const ::tensorflow::GraphDef& MetaGraphDef::graph_def() const { + // @@protoc_insertion_point(field_get:tensorflow.MetaGraphDef.graph_def) + return _internal_graph_def(); +} +inline void MetaGraphDef::unsafe_arena_set_allocated_graph_def( + ::tensorflow::GraphDef* graph_def) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.graph_def_); + } + _impl_.graph_def_ = graph_def; + if (graph_def) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.MetaGraphDef.graph_def) +} +inline ::tensorflow::GraphDef* MetaGraphDef::release_graph_def() { + + ::tensorflow::GraphDef* temp = _impl_.graph_def_; + _impl_.graph_def_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tensorflow::GraphDef* MetaGraphDef::unsafe_arena_release_graph_def() { + // @@protoc_insertion_point(field_release:tensorflow.MetaGraphDef.graph_def) + + ::tensorflow::GraphDef* temp = _impl_.graph_def_; + _impl_.graph_def_ = nullptr; + return temp; +} +inline ::tensorflow::GraphDef* MetaGraphDef::_internal_mutable_graph_def() { + + if (_impl_.graph_def_ == nullptr) { + auto* p = CreateMaybeMessage<::tensorflow::GraphDef>(GetArenaForAllocation()); + _impl_.graph_def_ = p; + } + return _impl_.graph_def_; +} +inline ::tensorflow::GraphDef* MetaGraphDef::mutable_graph_def() { + ::tensorflow::GraphDef* _msg = _internal_mutable_graph_def(); + // @@protoc_insertion_point(field_mutable:tensorflow.MetaGraphDef.graph_def) + return _msg; +} +inline void MetaGraphDef::set_allocated_graph_def(::tensorflow::GraphDef* graph_def) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.graph_def_); + } + if (graph_def) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( + reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(graph_def)); + if (message_arena != submessage_arena) { + graph_def = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, graph_def, submessage_arena); + } + + } else { + + } + _impl_.graph_def_ = graph_def; + // @@protoc_insertion_point(field_set_allocated:tensorflow.MetaGraphDef.graph_def) +} + +// .tensorflow.SaverDef saver_def = 3; +inline bool MetaGraphDef::_internal_has_saver_def() const { + return this != internal_default_instance() && _impl_.saver_def_ != nullptr; +} +inline bool MetaGraphDef::has_saver_def() const { + return _internal_has_saver_def(); +} +inline const ::tensorflow::SaverDef& MetaGraphDef::_internal_saver_def() const { + const ::tensorflow::SaverDef* p = _impl_.saver_def_; + return p != nullptr ? *p : reinterpret_cast( + ::tensorflow::_SaverDef_default_instance_); +} +inline const ::tensorflow::SaverDef& MetaGraphDef::saver_def() const { + // @@protoc_insertion_point(field_get:tensorflow.MetaGraphDef.saver_def) + return _internal_saver_def(); +} +inline void MetaGraphDef::unsafe_arena_set_allocated_saver_def( + ::tensorflow::SaverDef* saver_def) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.saver_def_); + } + _impl_.saver_def_ = saver_def; + if (saver_def) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.MetaGraphDef.saver_def) +} +inline ::tensorflow::SaverDef* MetaGraphDef::release_saver_def() { + + ::tensorflow::SaverDef* temp = _impl_.saver_def_; + _impl_.saver_def_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tensorflow::SaverDef* MetaGraphDef::unsafe_arena_release_saver_def() { + // @@protoc_insertion_point(field_release:tensorflow.MetaGraphDef.saver_def) + + ::tensorflow::SaverDef* temp = _impl_.saver_def_; + _impl_.saver_def_ = nullptr; + return temp; +} +inline ::tensorflow::SaverDef* MetaGraphDef::_internal_mutable_saver_def() { + + if (_impl_.saver_def_ == nullptr) { + auto* p = CreateMaybeMessage<::tensorflow::SaverDef>(GetArenaForAllocation()); + _impl_.saver_def_ = p; + } + return _impl_.saver_def_; +} +inline ::tensorflow::SaverDef* MetaGraphDef::mutable_saver_def() { + ::tensorflow::SaverDef* _msg = _internal_mutable_saver_def(); + // @@protoc_insertion_point(field_mutable:tensorflow.MetaGraphDef.saver_def) + return _msg; +} +inline void MetaGraphDef::set_allocated_saver_def(::tensorflow::SaverDef* saver_def) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.saver_def_); + } + if (saver_def) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( + reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(saver_def)); + if (message_arena != submessage_arena) { + saver_def = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, saver_def, submessage_arena); + } + + } else { + + } + _impl_.saver_def_ = saver_def; + // @@protoc_insertion_point(field_set_allocated:tensorflow.MetaGraphDef.saver_def) +} + +// map collection_def = 4; +inline int MetaGraphDef::_internal_collection_def_size() const { + return _impl_.collection_def_.size(); +} +inline int MetaGraphDef::collection_def_size() const { + return _internal_collection_def_size(); +} +inline void MetaGraphDef::clear_collection_def() { + _impl_.collection_def_.Clear(); +} +inline const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::CollectionDef >& +MetaGraphDef::_internal_collection_def() const { + return _impl_.collection_def_.GetMap(); +} +inline const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::CollectionDef >& +MetaGraphDef::collection_def() const { + // @@protoc_insertion_point(field_map:tensorflow.MetaGraphDef.collection_def) + return _internal_collection_def(); +} +inline ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::CollectionDef >* +MetaGraphDef::_internal_mutable_collection_def() { + return _impl_.collection_def_.MutableMap(); +} +inline ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::CollectionDef >* +MetaGraphDef::mutable_collection_def() { + // @@protoc_insertion_point(field_mutable_map:tensorflow.MetaGraphDef.collection_def) + return _internal_mutable_collection_def(); +} + +// map signature_def = 5; +inline int MetaGraphDef::_internal_signature_def_size() const { + return _impl_.signature_def_.size(); +} +inline int MetaGraphDef::signature_def_size() const { + return _internal_signature_def_size(); +} +inline void MetaGraphDef::clear_signature_def() { + _impl_.signature_def_.Clear(); +} +inline const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::SignatureDef >& +MetaGraphDef::_internal_signature_def() const { + return _impl_.signature_def_.GetMap(); +} +inline const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::SignatureDef >& +MetaGraphDef::signature_def() const { + // @@protoc_insertion_point(field_map:tensorflow.MetaGraphDef.signature_def) + return _internal_signature_def(); +} +inline ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::SignatureDef >* +MetaGraphDef::_internal_mutable_signature_def() { + return _impl_.signature_def_.MutableMap(); +} +inline ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::SignatureDef >* +MetaGraphDef::mutable_signature_def() { + // @@protoc_insertion_point(field_mutable_map:tensorflow.MetaGraphDef.signature_def) + return _internal_mutable_signature_def(); +} + +// repeated .tensorflow.AssetFileDef asset_file_def = 6; +inline int MetaGraphDef::_internal_asset_file_def_size() const { + return _impl_.asset_file_def_.size(); +} +inline int MetaGraphDef::asset_file_def_size() const { + return _internal_asset_file_def_size(); +} +inline void MetaGraphDef::clear_asset_file_def() { + _impl_.asset_file_def_.Clear(); +} +inline ::tensorflow::AssetFileDef* MetaGraphDef::mutable_asset_file_def(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.MetaGraphDef.asset_file_def) + return _impl_.asset_file_def_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::AssetFileDef >* +MetaGraphDef::mutable_asset_file_def() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.MetaGraphDef.asset_file_def) + return &_impl_.asset_file_def_; +} +inline const ::tensorflow::AssetFileDef& MetaGraphDef::_internal_asset_file_def(int index) const { + return _impl_.asset_file_def_.Get(index); +} +inline const ::tensorflow::AssetFileDef& MetaGraphDef::asset_file_def(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.MetaGraphDef.asset_file_def) + return _internal_asset_file_def(index); +} +inline ::tensorflow::AssetFileDef* MetaGraphDef::_internal_add_asset_file_def() { + return _impl_.asset_file_def_.Add(); +} +inline ::tensorflow::AssetFileDef* MetaGraphDef::add_asset_file_def() { + ::tensorflow::AssetFileDef* _add = _internal_add_asset_file_def(); + // @@protoc_insertion_point(field_add:tensorflow.MetaGraphDef.asset_file_def) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::AssetFileDef >& +MetaGraphDef::asset_file_def() const { + // @@protoc_insertion_point(field_list:tensorflow.MetaGraphDef.asset_file_def) + return _impl_.asset_file_def_; +} + +// .tensorflow.SavedObjectGraph object_graph_def = 7; +inline bool MetaGraphDef::_internal_has_object_graph_def() const { + return this != internal_default_instance() && _impl_.object_graph_def_ != nullptr; +} +inline bool MetaGraphDef::has_object_graph_def() const { + return _internal_has_object_graph_def(); +} +inline const ::tensorflow::SavedObjectGraph& MetaGraphDef::_internal_object_graph_def() const { + const ::tensorflow::SavedObjectGraph* p = _impl_.object_graph_def_; + return p != nullptr ? *p : reinterpret_cast( + ::tensorflow::_SavedObjectGraph_default_instance_); +} +inline const ::tensorflow::SavedObjectGraph& MetaGraphDef::object_graph_def() const { + // @@protoc_insertion_point(field_get:tensorflow.MetaGraphDef.object_graph_def) + return _internal_object_graph_def(); +} +inline void MetaGraphDef::unsafe_arena_set_allocated_object_graph_def( + ::tensorflow::SavedObjectGraph* object_graph_def) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.object_graph_def_); + } + _impl_.object_graph_def_ = object_graph_def; + if (object_graph_def) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.MetaGraphDef.object_graph_def) +} +inline ::tensorflow::SavedObjectGraph* MetaGraphDef::release_object_graph_def() { + + ::tensorflow::SavedObjectGraph* temp = _impl_.object_graph_def_; + _impl_.object_graph_def_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tensorflow::SavedObjectGraph* MetaGraphDef::unsafe_arena_release_object_graph_def() { + // @@protoc_insertion_point(field_release:tensorflow.MetaGraphDef.object_graph_def) + + ::tensorflow::SavedObjectGraph* temp = _impl_.object_graph_def_; + _impl_.object_graph_def_ = nullptr; + return temp; +} +inline ::tensorflow::SavedObjectGraph* MetaGraphDef::_internal_mutable_object_graph_def() { + + if (_impl_.object_graph_def_ == nullptr) { + auto* p = CreateMaybeMessage<::tensorflow::SavedObjectGraph>(GetArenaForAllocation()); + _impl_.object_graph_def_ = p; + } + return _impl_.object_graph_def_; +} +inline ::tensorflow::SavedObjectGraph* MetaGraphDef::mutable_object_graph_def() { + ::tensorflow::SavedObjectGraph* _msg = _internal_mutable_object_graph_def(); + // @@protoc_insertion_point(field_mutable:tensorflow.MetaGraphDef.object_graph_def) + return _msg; +} +inline void MetaGraphDef::set_allocated_object_graph_def(::tensorflow::SavedObjectGraph* object_graph_def) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.object_graph_def_); + } + if (object_graph_def) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( + reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(object_graph_def)); + if (message_arena != submessage_arena) { + object_graph_def = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, object_graph_def, submessage_arena); + } + + } else { + + } + _impl_.object_graph_def_ = object_graph_def; + // @@protoc_insertion_point(field_set_allocated:tensorflow.MetaGraphDef.object_graph_def) +} + +// ------------------------------------------------------------------- + +// CollectionDef_NodeList + +// repeated string value = 1; +inline int CollectionDef_NodeList::_internal_value_size() const { + return _impl_.value_.size(); +} +inline int CollectionDef_NodeList::value_size() const { + return _internal_value_size(); +} +inline void CollectionDef_NodeList::clear_value() { + _impl_.value_.Clear(); +} +inline std::string* CollectionDef_NodeList::add_value() { + std::string* _s = _internal_add_value(); + // @@protoc_insertion_point(field_add_mutable:tensorflow.CollectionDef.NodeList.value) + return _s; +} +inline const std::string& CollectionDef_NodeList::_internal_value(int index) const { + return _impl_.value_.Get(index); +} +inline const std::string& CollectionDef_NodeList::value(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.CollectionDef.NodeList.value) + return _internal_value(index); +} +inline std::string* CollectionDef_NodeList::mutable_value(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.CollectionDef.NodeList.value) + return _impl_.value_.Mutable(index); +} +inline void CollectionDef_NodeList::set_value(int index, const std::string& value) { + _impl_.value_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set:tensorflow.CollectionDef.NodeList.value) +} +inline void CollectionDef_NodeList::set_value(int index, std::string&& value) { + _impl_.value_.Mutable(index)->assign(std::move(value)); + // @@protoc_insertion_point(field_set:tensorflow.CollectionDef.NodeList.value) +} +inline void CollectionDef_NodeList::set_value(int index, const char* value) { + GOOGLE_DCHECK(value != nullptr); + _impl_.value_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set_char:tensorflow.CollectionDef.NodeList.value) +} +inline void CollectionDef_NodeList::set_value(int index, const char* value, size_t size) { + _impl_.value_.Mutable(index)->assign( + reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:tensorflow.CollectionDef.NodeList.value) +} +inline std::string* CollectionDef_NodeList::_internal_add_value() { + return _impl_.value_.Add(); +} +inline void CollectionDef_NodeList::add_value(const std::string& value) { + _impl_.value_.Add()->assign(value); + // @@protoc_insertion_point(field_add:tensorflow.CollectionDef.NodeList.value) +} +inline void CollectionDef_NodeList::add_value(std::string&& value) { + _impl_.value_.Add(std::move(value)); + // @@protoc_insertion_point(field_add:tensorflow.CollectionDef.NodeList.value) +} +inline void CollectionDef_NodeList::add_value(const char* value) { + GOOGLE_DCHECK(value != nullptr); + _impl_.value_.Add()->assign(value); + // @@protoc_insertion_point(field_add_char:tensorflow.CollectionDef.NodeList.value) +} +inline void CollectionDef_NodeList::add_value(const char* value, size_t size) { + _impl_.value_.Add()->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_add_pointer:tensorflow.CollectionDef.NodeList.value) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& +CollectionDef_NodeList::value() const { + // @@protoc_insertion_point(field_list:tensorflow.CollectionDef.NodeList.value) + return _impl_.value_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* +CollectionDef_NodeList::mutable_value() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.CollectionDef.NodeList.value) + return &_impl_.value_; +} + +// ------------------------------------------------------------------- + +// CollectionDef_BytesList + +// repeated bytes value = 1; +inline int CollectionDef_BytesList::_internal_value_size() const { + return _impl_.value_.size(); +} +inline int CollectionDef_BytesList::value_size() const { + return _internal_value_size(); +} +inline void CollectionDef_BytesList::clear_value() { + _impl_.value_.Clear(); +} +inline std::string* CollectionDef_BytesList::add_value() { + std::string* _s = _internal_add_value(); + // @@protoc_insertion_point(field_add_mutable:tensorflow.CollectionDef.BytesList.value) + return _s; +} +inline const std::string& CollectionDef_BytesList::_internal_value(int index) const { + return _impl_.value_.Get(index); +} +inline const std::string& CollectionDef_BytesList::value(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.CollectionDef.BytesList.value) + return _internal_value(index); +} +inline std::string* CollectionDef_BytesList::mutable_value(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.CollectionDef.BytesList.value) + return _impl_.value_.Mutable(index); +} +inline void CollectionDef_BytesList::set_value(int index, const std::string& value) { + _impl_.value_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set:tensorflow.CollectionDef.BytesList.value) +} +inline void CollectionDef_BytesList::set_value(int index, std::string&& value) { + _impl_.value_.Mutable(index)->assign(std::move(value)); + // @@protoc_insertion_point(field_set:tensorflow.CollectionDef.BytesList.value) +} +inline void CollectionDef_BytesList::set_value(int index, const char* value) { + GOOGLE_DCHECK(value != nullptr); + _impl_.value_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set_char:tensorflow.CollectionDef.BytesList.value) +} +inline void CollectionDef_BytesList::set_value(int index, const void* value, size_t size) { + _impl_.value_.Mutable(index)->assign( + reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:tensorflow.CollectionDef.BytesList.value) +} +inline std::string* CollectionDef_BytesList::_internal_add_value() { + return _impl_.value_.Add(); +} +inline void CollectionDef_BytesList::add_value(const std::string& value) { + _impl_.value_.Add()->assign(value); + // @@protoc_insertion_point(field_add:tensorflow.CollectionDef.BytesList.value) +} +inline void CollectionDef_BytesList::add_value(std::string&& value) { + _impl_.value_.Add(std::move(value)); + // @@protoc_insertion_point(field_add:tensorflow.CollectionDef.BytesList.value) +} +inline void CollectionDef_BytesList::add_value(const char* value) { + GOOGLE_DCHECK(value != nullptr); + _impl_.value_.Add()->assign(value); + // @@protoc_insertion_point(field_add_char:tensorflow.CollectionDef.BytesList.value) +} +inline void CollectionDef_BytesList::add_value(const void* value, size_t size) { + _impl_.value_.Add()->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_add_pointer:tensorflow.CollectionDef.BytesList.value) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& +CollectionDef_BytesList::value() const { + // @@protoc_insertion_point(field_list:tensorflow.CollectionDef.BytesList.value) + return _impl_.value_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* +CollectionDef_BytesList::mutable_value() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.CollectionDef.BytesList.value) + return &_impl_.value_; +} + +// ------------------------------------------------------------------- + +// CollectionDef_Int64List + +// repeated int64 value = 1 [packed = true]; +inline int CollectionDef_Int64List::_internal_value_size() const { + return _impl_.value_.size(); +} +inline int CollectionDef_Int64List::value_size() const { + return _internal_value_size(); +} +inline void CollectionDef_Int64List::clear_value() { + _impl_.value_.Clear(); +} +inline int64_t CollectionDef_Int64List::_internal_value(int index) const { + return _impl_.value_.Get(index); +} +inline int64_t CollectionDef_Int64List::value(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.CollectionDef.Int64List.value) + return _internal_value(index); +} +inline void CollectionDef_Int64List::set_value(int index, int64_t value) { + _impl_.value_.Set(index, value); + // @@protoc_insertion_point(field_set:tensorflow.CollectionDef.Int64List.value) +} +inline void CollectionDef_Int64List::_internal_add_value(int64_t value) { + _impl_.value_.Add(value); +} +inline void CollectionDef_Int64List::add_value(int64_t value) { + _internal_add_value(value); + // @@protoc_insertion_point(field_add:tensorflow.CollectionDef.Int64List.value) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >& +CollectionDef_Int64List::_internal_value() const { + return _impl_.value_; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >& +CollectionDef_Int64List::value() const { + // @@protoc_insertion_point(field_list:tensorflow.CollectionDef.Int64List.value) + return _internal_value(); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >* +CollectionDef_Int64List::_internal_mutable_value() { + return &_impl_.value_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >* +CollectionDef_Int64List::mutable_value() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.CollectionDef.Int64List.value) + return _internal_mutable_value(); +} + +// ------------------------------------------------------------------- + +// CollectionDef_FloatList + +// repeated float value = 1 [packed = true]; +inline int CollectionDef_FloatList::_internal_value_size() const { + return _impl_.value_.size(); +} +inline int CollectionDef_FloatList::value_size() const { + return _internal_value_size(); +} +inline void CollectionDef_FloatList::clear_value() { + _impl_.value_.Clear(); +} +inline float CollectionDef_FloatList::_internal_value(int index) const { + return _impl_.value_.Get(index); +} +inline float CollectionDef_FloatList::value(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.CollectionDef.FloatList.value) + return _internal_value(index); +} +inline void CollectionDef_FloatList::set_value(int index, float value) { + _impl_.value_.Set(index, value); + // @@protoc_insertion_point(field_set:tensorflow.CollectionDef.FloatList.value) +} +inline void CollectionDef_FloatList::_internal_add_value(float value) { + _impl_.value_.Add(value); +} +inline void CollectionDef_FloatList::add_value(float value) { + _internal_add_value(value); + // @@protoc_insertion_point(field_add:tensorflow.CollectionDef.FloatList.value) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< float >& +CollectionDef_FloatList::_internal_value() const { + return _impl_.value_; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< float >& +CollectionDef_FloatList::value() const { + // @@protoc_insertion_point(field_list:tensorflow.CollectionDef.FloatList.value) + return _internal_value(); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< float >* +CollectionDef_FloatList::_internal_mutable_value() { + return &_impl_.value_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< float >* +CollectionDef_FloatList::mutable_value() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.CollectionDef.FloatList.value) + return _internal_mutable_value(); +} + +// ------------------------------------------------------------------- + +// CollectionDef_AnyList + +// repeated .google.protobuf.Any value = 1; +inline int CollectionDef_AnyList::_internal_value_size() const { + return _impl_.value_.size(); +} +inline int CollectionDef_AnyList::value_size() const { + return _internal_value_size(); +} +inline ::PROTOBUF_NAMESPACE_ID::Any* CollectionDef_AnyList::mutable_value(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.CollectionDef.AnyList.value) + return _impl_.value_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::Any >* +CollectionDef_AnyList::mutable_value() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.CollectionDef.AnyList.value) + return &_impl_.value_; +} +inline const ::PROTOBUF_NAMESPACE_ID::Any& CollectionDef_AnyList::_internal_value(int index) const { + return _impl_.value_.Get(index); +} +inline const ::PROTOBUF_NAMESPACE_ID::Any& CollectionDef_AnyList::value(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.CollectionDef.AnyList.value) + return _internal_value(index); +} +inline ::PROTOBUF_NAMESPACE_ID::Any* CollectionDef_AnyList::_internal_add_value() { + return _impl_.value_.Add(); +} +inline ::PROTOBUF_NAMESPACE_ID::Any* CollectionDef_AnyList::add_value() { + ::PROTOBUF_NAMESPACE_ID::Any* _add = _internal_add_value(); + // @@protoc_insertion_point(field_add:tensorflow.CollectionDef.AnyList.value) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::Any >& +CollectionDef_AnyList::value() const { + // @@protoc_insertion_point(field_list:tensorflow.CollectionDef.AnyList.value) + return _impl_.value_; +} + +// ------------------------------------------------------------------- + +// CollectionDef + +// .tensorflow.CollectionDef.NodeList node_list = 1; +inline bool CollectionDef::_internal_has_node_list() const { + return kind_case() == kNodeList; +} +inline bool CollectionDef::has_node_list() const { + return _internal_has_node_list(); +} +inline void CollectionDef::set_has_node_list() { + _impl_._oneof_case_[0] = kNodeList; +} +inline void CollectionDef::clear_node_list() { + if (_internal_has_node_list()) { + if (GetArenaForAllocation() == nullptr) { + delete _impl_.kind_.node_list_; + } + clear_has_kind(); + } +} +inline ::tensorflow::CollectionDef_NodeList* CollectionDef::release_node_list() { + // @@protoc_insertion_point(field_release:tensorflow.CollectionDef.node_list) + if (_internal_has_node_list()) { + clear_has_kind(); + ::tensorflow::CollectionDef_NodeList* temp = _impl_.kind_.node_list_; + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + _impl_.kind_.node_list_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::tensorflow::CollectionDef_NodeList& CollectionDef::_internal_node_list() const { + return _internal_has_node_list() + ? *_impl_.kind_.node_list_ + : reinterpret_cast< ::tensorflow::CollectionDef_NodeList&>(::tensorflow::_CollectionDef_NodeList_default_instance_); +} +inline const ::tensorflow::CollectionDef_NodeList& CollectionDef::node_list() const { + // @@protoc_insertion_point(field_get:tensorflow.CollectionDef.node_list) + return _internal_node_list(); +} +inline ::tensorflow::CollectionDef_NodeList* CollectionDef::unsafe_arena_release_node_list() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.CollectionDef.node_list) + if (_internal_has_node_list()) { + clear_has_kind(); + ::tensorflow::CollectionDef_NodeList* temp = _impl_.kind_.node_list_; + _impl_.kind_.node_list_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void CollectionDef::unsafe_arena_set_allocated_node_list(::tensorflow::CollectionDef_NodeList* node_list) { + clear_kind(); + if (node_list) { + set_has_node_list(); + _impl_.kind_.node_list_ = node_list; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.CollectionDef.node_list) +} +inline ::tensorflow::CollectionDef_NodeList* CollectionDef::_internal_mutable_node_list() { + if (!_internal_has_node_list()) { + clear_kind(); + set_has_node_list(); + _impl_.kind_.node_list_ = CreateMaybeMessage< ::tensorflow::CollectionDef_NodeList >(GetArenaForAllocation()); + } + return _impl_.kind_.node_list_; +} +inline ::tensorflow::CollectionDef_NodeList* CollectionDef::mutable_node_list() { + ::tensorflow::CollectionDef_NodeList* _msg = _internal_mutable_node_list(); + // @@protoc_insertion_point(field_mutable:tensorflow.CollectionDef.node_list) + return _msg; +} + +// .tensorflow.CollectionDef.BytesList bytes_list = 2; +inline bool CollectionDef::_internal_has_bytes_list() const { + return kind_case() == kBytesList; +} +inline bool CollectionDef::has_bytes_list() const { + return _internal_has_bytes_list(); +} +inline void CollectionDef::set_has_bytes_list() { + _impl_._oneof_case_[0] = kBytesList; +} +inline void CollectionDef::clear_bytes_list() { + if (_internal_has_bytes_list()) { + if (GetArenaForAllocation() == nullptr) { + delete _impl_.kind_.bytes_list_; + } + clear_has_kind(); + } +} +inline ::tensorflow::CollectionDef_BytesList* CollectionDef::release_bytes_list() { + // @@protoc_insertion_point(field_release:tensorflow.CollectionDef.bytes_list) + if (_internal_has_bytes_list()) { + clear_has_kind(); + ::tensorflow::CollectionDef_BytesList* temp = _impl_.kind_.bytes_list_; + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + _impl_.kind_.bytes_list_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::tensorflow::CollectionDef_BytesList& CollectionDef::_internal_bytes_list() const { + return _internal_has_bytes_list() + ? *_impl_.kind_.bytes_list_ + : reinterpret_cast< ::tensorflow::CollectionDef_BytesList&>(::tensorflow::_CollectionDef_BytesList_default_instance_); +} +inline const ::tensorflow::CollectionDef_BytesList& CollectionDef::bytes_list() const { + // @@protoc_insertion_point(field_get:tensorflow.CollectionDef.bytes_list) + return _internal_bytes_list(); +} +inline ::tensorflow::CollectionDef_BytesList* CollectionDef::unsafe_arena_release_bytes_list() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.CollectionDef.bytes_list) + if (_internal_has_bytes_list()) { + clear_has_kind(); + ::tensorflow::CollectionDef_BytesList* temp = _impl_.kind_.bytes_list_; + _impl_.kind_.bytes_list_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void CollectionDef::unsafe_arena_set_allocated_bytes_list(::tensorflow::CollectionDef_BytesList* bytes_list) { + clear_kind(); + if (bytes_list) { + set_has_bytes_list(); + _impl_.kind_.bytes_list_ = bytes_list; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.CollectionDef.bytes_list) +} +inline ::tensorflow::CollectionDef_BytesList* CollectionDef::_internal_mutable_bytes_list() { + if (!_internal_has_bytes_list()) { + clear_kind(); + set_has_bytes_list(); + _impl_.kind_.bytes_list_ = CreateMaybeMessage< ::tensorflow::CollectionDef_BytesList >(GetArenaForAllocation()); + } + return _impl_.kind_.bytes_list_; +} +inline ::tensorflow::CollectionDef_BytesList* CollectionDef::mutable_bytes_list() { + ::tensorflow::CollectionDef_BytesList* _msg = _internal_mutable_bytes_list(); + // @@protoc_insertion_point(field_mutable:tensorflow.CollectionDef.bytes_list) + return _msg; +} + +// .tensorflow.CollectionDef.Int64List int64_list = 3; +inline bool CollectionDef::_internal_has_int64_list() const { + return kind_case() == kInt64List; +} +inline bool CollectionDef::has_int64_list() const { + return _internal_has_int64_list(); +} +inline void CollectionDef::set_has_int64_list() { + _impl_._oneof_case_[0] = kInt64List; +} +inline void CollectionDef::clear_int64_list() { + if (_internal_has_int64_list()) { + if (GetArenaForAllocation() == nullptr) { + delete _impl_.kind_.int64_list_; + } + clear_has_kind(); + } +} +inline ::tensorflow::CollectionDef_Int64List* CollectionDef::release_int64_list() { + // @@protoc_insertion_point(field_release:tensorflow.CollectionDef.int64_list) + if (_internal_has_int64_list()) { + clear_has_kind(); + ::tensorflow::CollectionDef_Int64List* temp = _impl_.kind_.int64_list_; + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + _impl_.kind_.int64_list_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::tensorflow::CollectionDef_Int64List& CollectionDef::_internal_int64_list() const { + return _internal_has_int64_list() + ? *_impl_.kind_.int64_list_ + : reinterpret_cast< ::tensorflow::CollectionDef_Int64List&>(::tensorflow::_CollectionDef_Int64List_default_instance_); +} +inline const ::tensorflow::CollectionDef_Int64List& CollectionDef::int64_list() const { + // @@protoc_insertion_point(field_get:tensorflow.CollectionDef.int64_list) + return _internal_int64_list(); +} +inline ::tensorflow::CollectionDef_Int64List* CollectionDef::unsafe_arena_release_int64_list() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.CollectionDef.int64_list) + if (_internal_has_int64_list()) { + clear_has_kind(); + ::tensorflow::CollectionDef_Int64List* temp = _impl_.kind_.int64_list_; + _impl_.kind_.int64_list_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void CollectionDef::unsafe_arena_set_allocated_int64_list(::tensorflow::CollectionDef_Int64List* int64_list) { + clear_kind(); + if (int64_list) { + set_has_int64_list(); + _impl_.kind_.int64_list_ = int64_list; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.CollectionDef.int64_list) +} +inline ::tensorflow::CollectionDef_Int64List* CollectionDef::_internal_mutable_int64_list() { + if (!_internal_has_int64_list()) { + clear_kind(); + set_has_int64_list(); + _impl_.kind_.int64_list_ = CreateMaybeMessage< ::tensorflow::CollectionDef_Int64List >(GetArenaForAllocation()); + } + return _impl_.kind_.int64_list_; +} +inline ::tensorflow::CollectionDef_Int64List* CollectionDef::mutable_int64_list() { + ::tensorflow::CollectionDef_Int64List* _msg = _internal_mutable_int64_list(); + // @@protoc_insertion_point(field_mutable:tensorflow.CollectionDef.int64_list) + return _msg; +} + +// .tensorflow.CollectionDef.FloatList float_list = 4; +inline bool CollectionDef::_internal_has_float_list() const { + return kind_case() == kFloatList; +} +inline bool CollectionDef::has_float_list() const { + return _internal_has_float_list(); +} +inline void CollectionDef::set_has_float_list() { + _impl_._oneof_case_[0] = kFloatList; +} +inline void CollectionDef::clear_float_list() { + if (_internal_has_float_list()) { + if (GetArenaForAllocation() == nullptr) { + delete _impl_.kind_.float_list_; + } + clear_has_kind(); + } +} +inline ::tensorflow::CollectionDef_FloatList* CollectionDef::release_float_list() { + // @@protoc_insertion_point(field_release:tensorflow.CollectionDef.float_list) + if (_internal_has_float_list()) { + clear_has_kind(); + ::tensorflow::CollectionDef_FloatList* temp = _impl_.kind_.float_list_; + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + _impl_.kind_.float_list_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::tensorflow::CollectionDef_FloatList& CollectionDef::_internal_float_list() const { + return _internal_has_float_list() + ? *_impl_.kind_.float_list_ + : reinterpret_cast< ::tensorflow::CollectionDef_FloatList&>(::tensorflow::_CollectionDef_FloatList_default_instance_); +} +inline const ::tensorflow::CollectionDef_FloatList& CollectionDef::float_list() const { + // @@protoc_insertion_point(field_get:tensorflow.CollectionDef.float_list) + return _internal_float_list(); +} +inline ::tensorflow::CollectionDef_FloatList* CollectionDef::unsafe_arena_release_float_list() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.CollectionDef.float_list) + if (_internal_has_float_list()) { + clear_has_kind(); + ::tensorflow::CollectionDef_FloatList* temp = _impl_.kind_.float_list_; + _impl_.kind_.float_list_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void CollectionDef::unsafe_arena_set_allocated_float_list(::tensorflow::CollectionDef_FloatList* float_list) { + clear_kind(); + if (float_list) { + set_has_float_list(); + _impl_.kind_.float_list_ = float_list; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.CollectionDef.float_list) +} +inline ::tensorflow::CollectionDef_FloatList* CollectionDef::_internal_mutable_float_list() { + if (!_internal_has_float_list()) { + clear_kind(); + set_has_float_list(); + _impl_.kind_.float_list_ = CreateMaybeMessage< ::tensorflow::CollectionDef_FloatList >(GetArenaForAllocation()); + } + return _impl_.kind_.float_list_; +} +inline ::tensorflow::CollectionDef_FloatList* CollectionDef::mutable_float_list() { + ::tensorflow::CollectionDef_FloatList* _msg = _internal_mutable_float_list(); + // @@protoc_insertion_point(field_mutable:tensorflow.CollectionDef.float_list) + return _msg; +} + +// .tensorflow.CollectionDef.AnyList any_list = 5; +inline bool CollectionDef::_internal_has_any_list() const { + return kind_case() == kAnyList; +} +inline bool CollectionDef::has_any_list() const { + return _internal_has_any_list(); +} +inline void CollectionDef::set_has_any_list() { + _impl_._oneof_case_[0] = kAnyList; +} +inline void CollectionDef::clear_any_list() { + if (_internal_has_any_list()) { + if (GetArenaForAllocation() == nullptr) { + delete _impl_.kind_.any_list_; + } + clear_has_kind(); + } +} +inline ::tensorflow::CollectionDef_AnyList* CollectionDef::release_any_list() { + // @@protoc_insertion_point(field_release:tensorflow.CollectionDef.any_list) + if (_internal_has_any_list()) { + clear_has_kind(); + ::tensorflow::CollectionDef_AnyList* temp = _impl_.kind_.any_list_; + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + _impl_.kind_.any_list_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::tensorflow::CollectionDef_AnyList& CollectionDef::_internal_any_list() const { + return _internal_has_any_list() + ? *_impl_.kind_.any_list_ + : reinterpret_cast< ::tensorflow::CollectionDef_AnyList&>(::tensorflow::_CollectionDef_AnyList_default_instance_); +} +inline const ::tensorflow::CollectionDef_AnyList& CollectionDef::any_list() const { + // @@protoc_insertion_point(field_get:tensorflow.CollectionDef.any_list) + return _internal_any_list(); +} +inline ::tensorflow::CollectionDef_AnyList* CollectionDef::unsafe_arena_release_any_list() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.CollectionDef.any_list) + if (_internal_has_any_list()) { + clear_has_kind(); + ::tensorflow::CollectionDef_AnyList* temp = _impl_.kind_.any_list_; + _impl_.kind_.any_list_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void CollectionDef::unsafe_arena_set_allocated_any_list(::tensorflow::CollectionDef_AnyList* any_list) { + clear_kind(); + if (any_list) { + set_has_any_list(); + _impl_.kind_.any_list_ = any_list; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.CollectionDef.any_list) +} +inline ::tensorflow::CollectionDef_AnyList* CollectionDef::_internal_mutable_any_list() { + if (!_internal_has_any_list()) { + clear_kind(); + set_has_any_list(); + _impl_.kind_.any_list_ = CreateMaybeMessage< ::tensorflow::CollectionDef_AnyList >(GetArenaForAllocation()); + } + return _impl_.kind_.any_list_; +} +inline ::tensorflow::CollectionDef_AnyList* CollectionDef::mutable_any_list() { + ::tensorflow::CollectionDef_AnyList* _msg = _internal_mutable_any_list(); + // @@protoc_insertion_point(field_mutable:tensorflow.CollectionDef.any_list) + return _msg; +} + +inline bool CollectionDef::has_kind() const { + return kind_case() != KIND_NOT_SET; +} +inline void CollectionDef::clear_has_kind() { + _impl_._oneof_case_[0] = KIND_NOT_SET; +} +inline CollectionDef::KindCase CollectionDef::kind_case() const { + return CollectionDef::KindCase(_impl_._oneof_case_[0]); +} +// ------------------------------------------------------------------- + +// TensorInfo_CooSparse + +// string values_tensor_name = 1; +inline void TensorInfo_CooSparse::clear_values_tensor_name() { + _impl_.values_tensor_name_.ClearToEmpty(); +} +inline const std::string& TensorInfo_CooSparse::values_tensor_name() const { + // @@protoc_insertion_point(field_get:tensorflow.TensorInfo.CooSparse.values_tensor_name) + return _internal_values_tensor_name(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void TensorInfo_CooSparse::set_values_tensor_name(ArgT0&& arg0, ArgT... args) { + + _impl_.values_tensor_name_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.TensorInfo.CooSparse.values_tensor_name) +} +inline std::string* TensorInfo_CooSparse::mutable_values_tensor_name() { + std::string* _s = _internal_mutable_values_tensor_name(); + // @@protoc_insertion_point(field_mutable:tensorflow.TensorInfo.CooSparse.values_tensor_name) + return _s; +} +inline const std::string& TensorInfo_CooSparse::_internal_values_tensor_name() const { + return _impl_.values_tensor_name_.Get(); +} +inline void TensorInfo_CooSparse::_internal_set_values_tensor_name(const std::string& value) { + + _impl_.values_tensor_name_.Set(value, GetArenaForAllocation()); +} +inline std::string* TensorInfo_CooSparse::_internal_mutable_values_tensor_name() { + + return _impl_.values_tensor_name_.Mutable(GetArenaForAllocation()); +} +inline std::string* TensorInfo_CooSparse::release_values_tensor_name() { + // @@protoc_insertion_point(field_release:tensorflow.TensorInfo.CooSparse.values_tensor_name) + return _impl_.values_tensor_name_.Release(); +} +inline void TensorInfo_CooSparse::set_allocated_values_tensor_name(std::string* values_tensor_name) { + if (values_tensor_name != nullptr) { + + } else { + + } + _impl_.values_tensor_name_.SetAllocated(values_tensor_name, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.values_tensor_name_.IsDefault()) { + _impl_.values_tensor_name_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.TensorInfo.CooSparse.values_tensor_name) +} + +// string indices_tensor_name = 2; +inline void TensorInfo_CooSparse::clear_indices_tensor_name() { + _impl_.indices_tensor_name_.ClearToEmpty(); +} +inline const std::string& TensorInfo_CooSparse::indices_tensor_name() const { + // @@protoc_insertion_point(field_get:tensorflow.TensorInfo.CooSparse.indices_tensor_name) + return _internal_indices_tensor_name(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void TensorInfo_CooSparse::set_indices_tensor_name(ArgT0&& arg0, ArgT... args) { + + _impl_.indices_tensor_name_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.TensorInfo.CooSparse.indices_tensor_name) +} +inline std::string* TensorInfo_CooSparse::mutable_indices_tensor_name() { + std::string* _s = _internal_mutable_indices_tensor_name(); + // @@protoc_insertion_point(field_mutable:tensorflow.TensorInfo.CooSparse.indices_tensor_name) + return _s; +} +inline const std::string& TensorInfo_CooSparse::_internal_indices_tensor_name() const { + return _impl_.indices_tensor_name_.Get(); +} +inline void TensorInfo_CooSparse::_internal_set_indices_tensor_name(const std::string& value) { + + _impl_.indices_tensor_name_.Set(value, GetArenaForAllocation()); +} +inline std::string* TensorInfo_CooSparse::_internal_mutable_indices_tensor_name() { + + return _impl_.indices_tensor_name_.Mutable(GetArenaForAllocation()); +} +inline std::string* TensorInfo_CooSparse::release_indices_tensor_name() { + // @@protoc_insertion_point(field_release:tensorflow.TensorInfo.CooSparse.indices_tensor_name) + return _impl_.indices_tensor_name_.Release(); +} +inline void TensorInfo_CooSparse::set_allocated_indices_tensor_name(std::string* indices_tensor_name) { + if (indices_tensor_name != nullptr) { + + } else { + + } + _impl_.indices_tensor_name_.SetAllocated(indices_tensor_name, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.indices_tensor_name_.IsDefault()) { + _impl_.indices_tensor_name_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.TensorInfo.CooSparse.indices_tensor_name) +} + +// string dense_shape_tensor_name = 3; +inline void TensorInfo_CooSparse::clear_dense_shape_tensor_name() { + _impl_.dense_shape_tensor_name_.ClearToEmpty(); +} +inline const std::string& TensorInfo_CooSparse::dense_shape_tensor_name() const { + // @@protoc_insertion_point(field_get:tensorflow.TensorInfo.CooSparse.dense_shape_tensor_name) + return _internal_dense_shape_tensor_name(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void TensorInfo_CooSparse::set_dense_shape_tensor_name(ArgT0&& arg0, ArgT... args) { + + _impl_.dense_shape_tensor_name_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.TensorInfo.CooSparse.dense_shape_tensor_name) +} +inline std::string* TensorInfo_CooSparse::mutable_dense_shape_tensor_name() { + std::string* _s = _internal_mutable_dense_shape_tensor_name(); + // @@protoc_insertion_point(field_mutable:tensorflow.TensorInfo.CooSparse.dense_shape_tensor_name) + return _s; +} +inline const std::string& TensorInfo_CooSparse::_internal_dense_shape_tensor_name() const { + return _impl_.dense_shape_tensor_name_.Get(); +} +inline void TensorInfo_CooSparse::_internal_set_dense_shape_tensor_name(const std::string& value) { + + _impl_.dense_shape_tensor_name_.Set(value, GetArenaForAllocation()); +} +inline std::string* TensorInfo_CooSparse::_internal_mutable_dense_shape_tensor_name() { + + return _impl_.dense_shape_tensor_name_.Mutable(GetArenaForAllocation()); +} +inline std::string* TensorInfo_CooSparse::release_dense_shape_tensor_name() { + // @@protoc_insertion_point(field_release:tensorflow.TensorInfo.CooSparse.dense_shape_tensor_name) + return _impl_.dense_shape_tensor_name_.Release(); +} +inline void TensorInfo_CooSparse::set_allocated_dense_shape_tensor_name(std::string* dense_shape_tensor_name) { + if (dense_shape_tensor_name != nullptr) { + + } else { + + } + _impl_.dense_shape_tensor_name_.SetAllocated(dense_shape_tensor_name, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.dense_shape_tensor_name_.IsDefault()) { + _impl_.dense_shape_tensor_name_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.TensorInfo.CooSparse.dense_shape_tensor_name) +} + +// ------------------------------------------------------------------- + +// TensorInfo_CompositeTensor + +// .tensorflow.TypeSpecProto type_spec = 1; +inline bool TensorInfo_CompositeTensor::_internal_has_type_spec() const { + return this != internal_default_instance() && _impl_.type_spec_ != nullptr; +} +inline bool TensorInfo_CompositeTensor::has_type_spec() const { + return _internal_has_type_spec(); +} +inline const ::tensorflow::TypeSpecProto& TensorInfo_CompositeTensor::_internal_type_spec() const { + const ::tensorflow::TypeSpecProto* p = _impl_.type_spec_; + return p != nullptr ? *p : reinterpret_cast( + ::tensorflow::_TypeSpecProto_default_instance_); +} +inline const ::tensorflow::TypeSpecProto& TensorInfo_CompositeTensor::type_spec() const { + // @@protoc_insertion_point(field_get:tensorflow.TensorInfo.CompositeTensor.type_spec) + return _internal_type_spec(); +} +inline void TensorInfo_CompositeTensor::unsafe_arena_set_allocated_type_spec( + ::tensorflow::TypeSpecProto* type_spec) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.type_spec_); + } + _impl_.type_spec_ = type_spec; + if (type_spec) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.TensorInfo.CompositeTensor.type_spec) +} +inline ::tensorflow::TypeSpecProto* TensorInfo_CompositeTensor::release_type_spec() { + + ::tensorflow::TypeSpecProto* temp = _impl_.type_spec_; + _impl_.type_spec_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tensorflow::TypeSpecProto* TensorInfo_CompositeTensor::unsafe_arena_release_type_spec() { + // @@protoc_insertion_point(field_release:tensorflow.TensorInfo.CompositeTensor.type_spec) + + ::tensorflow::TypeSpecProto* temp = _impl_.type_spec_; + _impl_.type_spec_ = nullptr; + return temp; +} +inline ::tensorflow::TypeSpecProto* TensorInfo_CompositeTensor::_internal_mutable_type_spec() { + + if (_impl_.type_spec_ == nullptr) { + auto* p = CreateMaybeMessage<::tensorflow::TypeSpecProto>(GetArenaForAllocation()); + _impl_.type_spec_ = p; + } + return _impl_.type_spec_; +} +inline ::tensorflow::TypeSpecProto* TensorInfo_CompositeTensor::mutable_type_spec() { + ::tensorflow::TypeSpecProto* _msg = _internal_mutable_type_spec(); + // @@protoc_insertion_point(field_mutable:tensorflow.TensorInfo.CompositeTensor.type_spec) + return _msg; +} +inline void TensorInfo_CompositeTensor::set_allocated_type_spec(::tensorflow::TypeSpecProto* type_spec) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.type_spec_); + } + if (type_spec) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( + reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(type_spec)); + if (message_arena != submessage_arena) { + type_spec = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, type_spec, submessage_arena); + } + + } else { + + } + _impl_.type_spec_ = type_spec; + // @@protoc_insertion_point(field_set_allocated:tensorflow.TensorInfo.CompositeTensor.type_spec) +} + +// repeated .tensorflow.TensorInfo components = 2; +inline int TensorInfo_CompositeTensor::_internal_components_size() const { + return _impl_.components_.size(); +} +inline int TensorInfo_CompositeTensor::components_size() const { + return _internal_components_size(); +} +inline void TensorInfo_CompositeTensor::clear_components() { + _impl_.components_.Clear(); +} +inline ::tensorflow::TensorInfo* TensorInfo_CompositeTensor::mutable_components(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.TensorInfo.CompositeTensor.components) + return _impl_.components_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::TensorInfo >* +TensorInfo_CompositeTensor::mutable_components() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.TensorInfo.CompositeTensor.components) + return &_impl_.components_; +} +inline const ::tensorflow::TensorInfo& TensorInfo_CompositeTensor::_internal_components(int index) const { + return _impl_.components_.Get(index); +} +inline const ::tensorflow::TensorInfo& TensorInfo_CompositeTensor::components(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.TensorInfo.CompositeTensor.components) + return _internal_components(index); +} +inline ::tensorflow::TensorInfo* TensorInfo_CompositeTensor::_internal_add_components() { + return _impl_.components_.Add(); +} +inline ::tensorflow::TensorInfo* TensorInfo_CompositeTensor::add_components() { + ::tensorflow::TensorInfo* _add = _internal_add_components(); + // @@protoc_insertion_point(field_add:tensorflow.TensorInfo.CompositeTensor.components) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::TensorInfo >& +TensorInfo_CompositeTensor::components() const { + // @@protoc_insertion_point(field_list:tensorflow.TensorInfo.CompositeTensor.components) + return _impl_.components_; +} + +// ------------------------------------------------------------------- + +// TensorInfo + +// string name = 1; +inline bool TensorInfo::_internal_has_name() const { + return encoding_case() == kName; +} +inline bool TensorInfo::has_name() const { + return _internal_has_name(); +} +inline void TensorInfo::set_has_name() { + _impl_._oneof_case_[0] = kName; +} +inline void TensorInfo::clear_name() { + if (_internal_has_name()) { + _impl_.encoding_.name_.Destroy(); + clear_has_encoding(); + } +} +inline const std::string& TensorInfo::name() const { + // @@protoc_insertion_point(field_get:tensorflow.TensorInfo.name) + return _internal_name(); +} +template +inline void TensorInfo::set_name(ArgT0&& arg0, ArgT... args) { + if (!_internal_has_name()) { + clear_encoding(); + set_has_name(); + _impl_.encoding_.name_.InitDefault(); + } + _impl_.encoding_.name_.Set( static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.TensorInfo.name) +} +inline std::string* TensorInfo::mutable_name() { + std::string* _s = _internal_mutable_name(); + // @@protoc_insertion_point(field_mutable:tensorflow.TensorInfo.name) + return _s; +} +inline const std::string& TensorInfo::_internal_name() const { + if (_internal_has_name()) { + return _impl_.encoding_.name_.Get(); + } + return ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(); +} +inline void TensorInfo::_internal_set_name(const std::string& value) { + if (!_internal_has_name()) { + clear_encoding(); + set_has_name(); + _impl_.encoding_.name_.InitDefault(); + } + _impl_.encoding_.name_.Set(value, GetArenaForAllocation()); +} +inline std::string* TensorInfo::_internal_mutable_name() { + if (!_internal_has_name()) { + clear_encoding(); + set_has_name(); + _impl_.encoding_.name_.InitDefault(); + } + return _impl_.encoding_.name_.Mutable( GetArenaForAllocation()); +} +inline std::string* TensorInfo::release_name() { + // @@protoc_insertion_point(field_release:tensorflow.TensorInfo.name) + if (_internal_has_name()) { + clear_has_encoding(); + return _impl_.encoding_.name_.Release(); + } else { + return nullptr; + } +} +inline void TensorInfo::set_allocated_name(std::string* name) { + if (has_encoding()) { + clear_encoding(); + } + if (name != nullptr) { + set_has_name(); + _impl_.encoding_.name_.InitAllocated(name, GetArenaForAllocation()); + } + // @@protoc_insertion_point(field_set_allocated:tensorflow.TensorInfo.name) +} + +// .tensorflow.TensorInfo.CooSparse coo_sparse = 4; +inline bool TensorInfo::_internal_has_coo_sparse() const { + return encoding_case() == kCooSparse; +} +inline bool TensorInfo::has_coo_sparse() const { + return _internal_has_coo_sparse(); +} +inline void TensorInfo::set_has_coo_sparse() { + _impl_._oneof_case_[0] = kCooSparse; +} +inline void TensorInfo::clear_coo_sparse() { + if (_internal_has_coo_sparse()) { + if (GetArenaForAllocation() == nullptr) { + delete _impl_.encoding_.coo_sparse_; + } + clear_has_encoding(); + } +} +inline ::tensorflow::TensorInfo_CooSparse* TensorInfo::release_coo_sparse() { + // @@protoc_insertion_point(field_release:tensorflow.TensorInfo.coo_sparse) + if (_internal_has_coo_sparse()) { + clear_has_encoding(); + ::tensorflow::TensorInfo_CooSparse* temp = _impl_.encoding_.coo_sparse_; + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + _impl_.encoding_.coo_sparse_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::tensorflow::TensorInfo_CooSparse& TensorInfo::_internal_coo_sparse() const { + return _internal_has_coo_sparse() + ? *_impl_.encoding_.coo_sparse_ + : reinterpret_cast< ::tensorflow::TensorInfo_CooSparse&>(::tensorflow::_TensorInfo_CooSparse_default_instance_); +} +inline const ::tensorflow::TensorInfo_CooSparse& TensorInfo::coo_sparse() const { + // @@protoc_insertion_point(field_get:tensorflow.TensorInfo.coo_sparse) + return _internal_coo_sparse(); +} +inline ::tensorflow::TensorInfo_CooSparse* TensorInfo::unsafe_arena_release_coo_sparse() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.TensorInfo.coo_sparse) + if (_internal_has_coo_sparse()) { + clear_has_encoding(); + ::tensorflow::TensorInfo_CooSparse* temp = _impl_.encoding_.coo_sparse_; + _impl_.encoding_.coo_sparse_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void TensorInfo::unsafe_arena_set_allocated_coo_sparse(::tensorflow::TensorInfo_CooSparse* coo_sparse) { + clear_encoding(); + if (coo_sparse) { + set_has_coo_sparse(); + _impl_.encoding_.coo_sparse_ = coo_sparse; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.TensorInfo.coo_sparse) +} +inline ::tensorflow::TensorInfo_CooSparse* TensorInfo::_internal_mutable_coo_sparse() { + if (!_internal_has_coo_sparse()) { + clear_encoding(); + set_has_coo_sparse(); + _impl_.encoding_.coo_sparse_ = CreateMaybeMessage< ::tensorflow::TensorInfo_CooSparse >(GetArenaForAllocation()); + } + return _impl_.encoding_.coo_sparse_; +} +inline ::tensorflow::TensorInfo_CooSparse* TensorInfo::mutable_coo_sparse() { + ::tensorflow::TensorInfo_CooSparse* _msg = _internal_mutable_coo_sparse(); + // @@protoc_insertion_point(field_mutable:tensorflow.TensorInfo.coo_sparse) + return _msg; +} + +// .tensorflow.TensorInfo.CompositeTensor composite_tensor = 5; +inline bool TensorInfo::_internal_has_composite_tensor() const { + return encoding_case() == kCompositeTensor; +} +inline bool TensorInfo::has_composite_tensor() const { + return _internal_has_composite_tensor(); +} +inline void TensorInfo::set_has_composite_tensor() { + _impl_._oneof_case_[0] = kCompositeTensor; +} +inline void TensorInfo::clear_composite_tensor() { + if (_internal_has_composite_tensor()) { + if (GetArenaForAllocation() == nullptr) { + delete _impl_.encoding_.composite_tensor_; + } + clear_has_encoding(); + } +} +inline ::tensorflow::TensorInfo_CompositeTensor* TensorInfo::release_composite_tensor() { + // @@protoc_insertion_point(field_release:tensorflow.TensorInfo.composite_tensor) + if (_internal_has_composite_tensor()) { + clear_has_encoding(); + ::tensorflow::TensorInfo_CompositeTensor* temp = _impl_.encoding_.composite_tensor_; + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + _impl_.encoding_.composite_tensor_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::tensorflow::TensorInfo_CompositeTensor& TensorInfo::_internal_composite_tensor() const { + return _internal_has_composite_tensor() + ? *_impl_.encoding_.composite_tensor_ + : reinterpret_cast< ::tensorflow::TensorInfo_CompositeTensor&>(::tensorflow::_TensorInfo_CompositeTensor_default_instance_); +} +inline const ::tensorflow::TensorInfo_CompositeTensor& TensorInfo::composite_tensor() const { + // @@protoc_insertion_point(field_get:tensorflow.TensorInfo.composite_tensor) + return _internal_composite_tensor(); +} +inline ::tensorflow::TensorInfo_CompositeTensor* TensorInfo::unsafe_arena_release_composite_tensor() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.TensorInfo.composite_tensor) + if (_internal_has_composite_tensor()) { + clear_has_encoding(); + ::tensorflow::TensorInfo_CompositeTensor* temp = _impl_.encoding_.composite_tensor_; + _impl_.encoding_.composite_tensor_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void TensorInfo::unsafe_arena_set_allocated_composite_tensor(::tensorflow::TensorInfo_CompositeTensor* composite_tensor) { + clear_encoding(); + if (composite_tensor) { + set_has_composite_tensor(); + _impl_.encoding_.composite_tensor_ = composite_tensor; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.TensorInfo.composite_tensor) +} +inline ::tensorflow::TensorInfo_CompositeTensor* TensorInfo::_internal_mutable_composite_tensor() { + if (!_internal_has_composite_tensor()) { + clear_encoding(); + set_has_composite_tensor(); + _impl_.encoding_.composite_tensor_ = CreateMaybeMessage< ::tensorflow::TensorInfo_CompositeTensor >(GetArenaForAllocation()); + } + return _impl_.encoding_.composite_tensor_; +} +inline ::tensorflow::TensorInfo_CompositeTensor* TensorInfo::mutable_composite_tensor() { + ::tensorflow::TensorInfo_CompositeTensor* _msg = _internal_mutable_composite_tensor(); + // @@protoc_insertion_point(field_mutable:tensorflow.TensorInfo.composite_tensor) + return _msg; +} + +// .tensorflow.DataType dtype = 2; +inline void TensorInfo::clear_dtype() { + _impl_.dtype_ = 0; +} +inline ::tensorflow::DataType TensorInfo::_internal_dtype() const { + return static_cast< ::tensorflow::DataType >(_impl_.dtype_); +} +inline ::tensorflow::DataType TensorInfo::dtype() const { + // @@protoc_insertion_point(field_get:tensorflow.TensorInfo.dtype) + return _internal_dtype(); +} +inline void TensorInfo::_internal_set_dtype(::tensorflow::DataType value) { + + _impl_.dtype_ = value; +} +inline void TensorInfo::set_dtype(::tensorflow::DataType value) { + _internal_set_dtype(value); + // @@protoc_insertion_point(field_set:tensorflow.TensorInfo.dtype) +} + +// .tensorflow.TensorShapeProto tensor_shape = 3; +inline bool TensorInfo::_internal_has_tensor_shape() const { + return this != internal_default_instance() && _impl_.tensor_shape_ != nullptr; +} +inline bool TensorInfo::has_tensor_shape() const { + return _internal_has_tensor_shape(); +} +inline const ::tensorflow::TensorShapeProto& TensorInfo::_internal_tensor_shape() const { + const ::tensorflow::TensorShapeProto* p = _impl_.tensor_shape_; + return p != nullptr ? *p : reinterpret_cast( + ::tensorflow::_TensorShapeProto_default_instance_); +} +inline const ::tensorflow::TensorShapeProto& TensorInfo::tensor_shape() const { + // @@protoc_insertion_point(field_get:tensorflow.TensorInfo.tensor_shape) + return _internal_tensor_shape(); +} +inline void TensorInfo::unsafe_arena_set_allocated_tensor_shape( + ::tensorflow::TensorShapeProto* tensor_shape) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.tensor_shape_); + } + _impl_.tensor_shape_ = tensor_shape; + if (tensor_shape) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.TensorInfo.tensor_shape) +} +inline ::tensorflow::TensorShapeProto* TensorInfo::release_tensor_shape() { + + ::tensorflow::TensorShapeProto* temp = _impl_.tensor_shape_; + _impl_.tensor_shape_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tensorflow::TensorShapeProto* TensorInfo::unsafe_arena_release_tensor_shape() { + // @@protoc_insertion_point(field_release:tensorflow.TensorInfo.tensor_shape) + + ::tensorflow::TensorShapeProto* temp = _impl_.tensor_shape_; + _impl_.tensor_shape_ = nullptr; + return temp; +} +inline ::tensorflow::TensorShapeProto* TensorInfo::_internal_mutable_tensor_shape() { + + if (_impl_.tensor_shape_ == nullptr) { + auto* p = CreateMaybeMessage<::tensorflow::TensorShapeProto>(GetArenaForAllocation()); + _impl_.tensor_shape_ = p; + } + return _impl_.tensor_shape_; +} +inline ::tensorflow::TensorShapeProto* TensorInfo::mutable_tensor_shape() { + ::tensorflow::TensorShapeProto* _msg = _internal_mutable_tensor_shape(); + // @@protoc_insertion_point(field_mutable:tensorflow.TensorInfo.tensor_shape) + return _msg; +} +inline void TensorInfo::set_allocated_tensor_shape(::tensorflow::TensorShapeProto* tensor_shape) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.tensor_shape_); + } + if (tensor_shape) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( + reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(tensor_shape)); + if (message_arena != submessage_arena) { + tensor_shape = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, tensor_shape, submessage_arena); + } + + } else { + + } + _impl_.tensor_shape_ = tensor_shape; + // @@protoc_insertion_point(field_set_allocated:tensorflow.TensorInfo.tensor_shape) +} + +inline bool TensorInfo::has_encoding() const { + return encoding_case() != ENCODING_NOT_SET; +} +inline void TensorInfo::clear_has_encoding() { + _impl_._oneof_case_[0] = ENCODING_NOT_SET; +} +inline TensorInfo::EncodingCase TensorInfo::encoding_case() const { + return TensorInfo::EncodingCase(_impl_._oneof_case_[0]); +} +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// SignatureDef + +// map inputs = 1; +inline int SignatureDef::_internal_inputs_size() const { + return _impl_.inputs_.size(); +} +inline int SignatureDef::inputs_size() const { + return _internal_inputs_size(); +} +inline void SignatureDef::clear_inputs() { + _impl_.inputs_.Clear(); +} +inline const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::TensorInfo >& +SignatureDef::_internal_inputs() const { + return _impl_.inputs_.GetMap(); +} +inline const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::TensorInfo >& +SignatureDef::inputs() const { + // @@protoc_insertion_point(field_map:tensorflow.SignatureDef.inputs) + return _internal_inputs(); +} +inline ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::TensorInfo >* +SignatureDef::_internal_mutable_inputs() { + return _impl_.inputs_.MutableMap(); +} +inline ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::TensorInfo >* +SignatureDef::mutable_inputs() { + // @@protoc_insertion_point(field_mutable_map:tensorflow.SignatureDef.inputs) + return _internal_mutable_inputs(); +} + +// map outputs = 2; +inline int SignatureDef::_internal_outputs_size() const { + return _impl_.outputs_.size(); +} +inline int SignatureDef::outputs_size() const { + return _internal_outputs_size(); +} +inline void SignatureDef::clear_outputs() { + _impl_.outputs_.Clear(); +} +inline const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::TensorInfo >& +SignatureDef::_internal_outputs() const { + return _impl_.outputs_.GetMap(); +} +inline const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::TensorInfo >& +SignatureDef::outputs() const { + // @@protoc_insertion_point(field_map:tensorflow.SignatureDef.outputs) + return _internal_outputs(); +} +inline ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::TensorInfo >* +SignatureDef::_internal_mutable_outputs() { + return _impl_.outputs_.MutableMap(); +} +inline ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::TensorInfo >* +SignatureDef::mutable_outputs() { + // @@protoc_insertion_point(field_mutable_map:tensorflow.SignatureDef.outputs) + return _internal_mutable_outputs(); +} + +// string method_name = 3; +inline void SignatureDef::clear_method_name() { + _impl_.method_name_.ClearToEmpty(); +} +inline const std::string& SignatureDef::method_name() const { + // @@protoc_insertion_point(field_get:tensorflow.SignatureDef.method_name) + return _internal_method_name(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void SignatureDef::set_method_name(ArgT0&& arg0, ArgT... args) { + + _impl_.method_name_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.SignatureDef.method_name) +} +inline std::string* SignatureDef::mutable_method_name() { + std::string* _s = _internal_mutable_method_name(); + // @@protoc_insertion_point(field_mutable:tensorflow.SignatureDef.method_name) + return _s; +} +inline const std::string& SignatureDef::_internal_method_name() const { + return _impl_.method_name_.Get(); +} +inline void SignatureDef::_internal_set_method_name(const std::string& value) { + + _impl_.method_name_.Set(value, GetArenaForAllocation()); +} +inline std::string* SignatureDef::_internal_mutable_method_name() { + + return _impl_.method_name_.Mutable(GetArenaForAllocation()); +} +inline std::string* SignatureDef::release_method_name() { + // @@protoc_insertion_point(field_release:tensorflow.SignatureDef.method_name) + return _impl_.method_name_.Release(); +} +inline void SignatureDef::set_allocated_method_name(std::string* method_name) { + if (method_name != nullptr) { + + } else { + + } + _impl_.method_name_.SetAllocated(method_name, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.method_name_.IsDefault()) { + _impl_.method_name_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.SignatureDef.method_name) +} + +// map defaults = 4; +inline int SignatureDef::_internal_defaults_size() const { + return _impl_.defaults_.size(); +} +inline int SignatureDef::defaults_size() const { + return _internal_defaults_size(); +} +inline const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::TensorProto >& +SignatureDef::_internal_defaults() const { + return _impl_.defaults_.GetMap(); +} +inline const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::TensorProto >& +SignatureDef::defaults() const { + // @@protoc_insertion_point(field_map:tensorflow.SignatureDef.defaults) + return _internal_defaults(); +} +inline ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::TensorProto >* +SignatureDef::_internal_mutable_defaults() { + return _impl_.defaults_.MutableMap(); +} +inline ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::TensorProto >* +SignatureDef::mutable_defaults() { + // @@protoc_insertion_point(field_mutable_map:tensorflow.SignatureDef.defaults) + return _internal_mutable_defaults(); +} + +// ------------------------------------------------------------------- + +// AssetFileDef + +// .tensorflow.TensorInfo tensor_info = 1; +inline bool AssetFileDef::_internal_has_tensor_info() const { + return this != internal_default_instance() && _impl_.tensor_info_ != nullptr; +} +inline bool AssetFileDef::has_tensor_info() const { + return _internal_has_tensor_info(); +} +inline void AssetFileDef::clear_tensor_info() { + if (GetArenaForAllocation() == nullptr && _impl_.tensor_info_ != nullptr) { + delete _impl_.tensor_info_; + } + _impl_.tensor_info_ = nullptr; +} +inline const ::tensorflow::TensorInfo& AssetFileDef::_internal_tensor_info() const { + const ::tensorflow::TensorInfo* p = _impl_.tensor_info_; + return p != nullptr ? *p : reinterpret_cast( + ::tensorflow::_TensorInfo_default_instance_); +} +inline const ::tensorflow::TensorInfo& AssetFileDef::tensor_info() const { + // @@protoc_insertion_point(field_get:tensorflow.AssetFileDef.tensor_info) + return _internal_tensor_info(); +} +inline void AssetFileDef::unsafe_arena_set_allocated_tensor_info( + ::tensorflow::TensorInfo* tensor_info) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.tensor_info_); + } + _impl_.tensor_info_ = tensor_info; + if (tensor_info) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.AssetFileDef.tensor_info) +} +inline ::tensorflow::TensorInfo* AssetFileDef::release_tensor_info() { + + ::tensorflow::TensorInfo* temp = _impl_.tensor_info_; + _impl_.tensor_info_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tensorflow::TensorInfo* AssetFileDef::unsafe_arena_release_tensor_info() { + // @@protoc_insertion_point(field_release:tensorflow.AssetFileDef.tensor_info) + + ::tensorflow::TensorInfo* temp = _impl_.tensor_info_; + _impl_.tensor_info_ = nullptr; + return temp; +} +inline ::tensorflow::TensorInfo* AssetFileDef::_internal_mutable_tensor_info() { + + if (_impl_.tensor_info_ == nullptr) { + auto* p = CreateMaybeMessage<::tensorflow::TensorInfo>(GetArenaForAllocation()); + _impl_.tensor_info_ = p; + } + return _impl_.tensor_info_; +} +inline ::tensorflow::TensorInfo* AssetFileDef::mutable_tensor_info() { + ::tensorflow::TensorInfo* _msg = _internal_mutable_tensor_info(); + // @@protoc_insertion_point(field_mutable:tensorflow.AssetFileDef.tensor_info) + return _msg; +} +inline void AssetFileDef::set_allocated_tensor_info(::tensorflow::TensorInfo* tensor_info) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete _impl_.tensor_info_; + } + if (tensor_info) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(tensor_info); + if (message_arena != submessage_arena) { + tensor_info = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, tensor_info, submessage_arena); + } + + } else { + + } + _impl_.tensor_info_ = tensor_info; + // @@protoc_insertion_point(field_set_allocated:tensorflow.AssetFileDef.tensor_info) +} + +// string filename = 2; +inline void AssetFileDef::clear_filename() { + _impl_.filename_.ClearToEmpty(); +} +inline const std::string& AssetFileDef::filename() const { + // @@protoc_insertion_point(field_get:tensorflow.AssetFileDef.filename) + return _internal_filename(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void AssetFileDef::set_filename(ArgT0&& arg0, ArgT... args) { + + _impl_.filename_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.AssetFileDef.filename) +} +inline std::string* AssetFileDef::mutable_filename() { + std::string* _s = _internal_mutable_filename(); + // @@protoc_insertion_point(field_mutable:tensorflow.AssetFileDef.filename) + return _s; +} +inline const std::string& AssetFileDef::_internal_filename() const { + return _impl_.filename_.Get(); +} +inline void AssetFileDef::_internal_set_filename(const std::string& value) { + + _impl_.filename_.Set(value, GetArenaForAllocation()); +} +inline std::string* AssetFileDef::_internal_mutable_filename() { + + return _impl_.filename_.Mutable(GetArenaForAllocation()); +} +inline std::string* AssetFileDef::release_filename() { + // @@protoc_insertion_point(field_release:tensorflow.AssetFileDef.filename) + return _impl_.filename_.Release(); +} +inline void AssetFileDef::set_allocated_filename(std::string* filename) { + if (filename != nullptr) { + + } else { + + } + _impl_.filename_.SetAllocated(filename, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.filename_.IsDefault()) { + _impl_.filename_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.AssetFileDef.filename) +} + +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + + +// @@protoc_insertion_point(namespace_scope) + +} // namespace tensorflow + +// @@protoc_insertion_point(global_scope) + +#include +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprotobuf_2fmeta_5fgraph_2eproto diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/meta_graph.proto b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/meta_graph.proto new file mode 100644 index 0000000000000000000000000000000000000000..89ef79ca186a32d72f213e734fded112ff5c2038 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/meta_graph.proto @@ -0,0 +1,342 @@ +syntax = "proto3"; + +package tensorflow; + +import "google/protobuf/any.proto"; +import "tensorflow/core/framework/graph.proto"; +import "tensorflow/core/framework/op_def.proto"; +import "tensorflow/core/framework/tensor.proto"; +import "tensorflow/core/framework/tensor_shape.proto"; +import "tensorflow/core/framework/types.proto"; +import "tensorflow/core/protobuf/saved_object_graph.proto"; +import "tensorflow/core/protobuf/saver.proto"; +import "tensorflow/core/protobuf/struct.proto"; + +option cc_enable_arenas = true; +option java_outer_classname = "MetaGraphProtos"; +option java_multiple_files = true; +option java_package = "org.tensorflow.framework"; +option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/protobuf/for_core_protos_go_proto"; + +// Protocol buffer containing the following which are necessary to restart +// training, run inference. It can be used to serialize/de-serialize memory +// objects necessary for running computation in a graph when crossing the +// process boundary. It can be used for long term storage of graphs, +// cross-language execution of graphs, etc. +// MetaInfoDef +// GraphDef +// SaverDef +// CollectionDef +// TensorInfo +// SignatureDef +message MetaGraphDef { + // Meta information regarding the graph to be exported. To be used by users + // of this protocol buffer to encode information regarding their meta graph. + message MetaInfoDef { + // User specified Version string. Can be the name of the model and revision, + // steps this model has been trained to, etc. + string meta_graph_version = 1; + + // A copy of the OpDefs used by the producer of this graph_def. + // Descriptions and Ops not used in graph_def are stripped out. + OpList stripped_op_list = 2; + + // A serialized protobuf. Can be the time this meta graph is created, or + // modified, or name of the model. + google.protobuf.Any any_info = 3; + + // User supplied tag(s) on the meta_graph and included graph_def. + // + // MetaGraphDefs should be tagged with their capabilities or use-cases. + // Examples: "train", "serve", "gpu", "tpu", etc. + // These tags enable loaders to access the MetaGraph(s) appropriate for a + // specific use-case or runtime environment. + repeated string tags = 4; + + // The __version__ string of the tensorflow build used to write this graph. + // This will be populated by the framework, which will overwrite any user + // supplied value. + string tensorflow_version = 5; + + // The __git_version__ string of the tensorflow build used to write this + // graph. This will be populated by the framework, which will overwrite any + // user supplied value. + string tensorflow_git_version = 6; + + // A flag to denote whether default-valued attrs have been stripped from + // the nodes in this graph_def. + bool stripped_default_attrs = 7; + + // FunctionDef name to aliases mapping. + map function_aliases = 8; + } + MetaInfoDef meta_info_def = 1; + + // GraphDef. + GraphDef graph_def = 2; + + // SaverDef. + SaverDef saver_def = 3; + + // collection_def: Map from collection name to collections. + // See CollectionDef section for details. + map collection_def = 4; + + // signature_def: Map from user supplied key for a signature to a single + // SignatureDef. + map signature_def = 5; + + // Asset file def to be used with the defined graph. + repeated AssetFileDef asset_file_def = 6; + + // Extra information about the structure of functions and stateful objects. + SavedObjectGraph object_graph_def = 7; +} + +// CollectionDef should cover most collections. +// To add a user-defined collection, do one of the following: +// 1. For simple data types, such as string, int, float: +// tf.add_to_collection("your_collection_name", your_simple_value) +// strings will be stored as bytes_list. +// +// 2. For Protobuf types, there are three ways to add them: +// 1) tf.add_to_collection("your_collection_name", +// your_proto.SerializeToString()) +// +// collection_def { +// key: "user_defined_bytes_collection" +// value { +// bytes_list { +// value: "queue_name: \"test_queue\"\n" +// } +// } +// } +// +// or +// +// 2) tf.add_to_collection("your_collection_name", str(your_proto)) +// +// collection_def { +// key: "user_defined_string_collection" +// value { +// bytes_list { +// value: "\n\ntest_queue" +// } +// } +// } +// +// or +// +// 3) any_buf = any_pb2.Any() +// tf.add_to_collection("your_collection_name", +// any_buf.Pack(your_proto)) +// +// collection_def { +// key: "user_defined_any_collection" +// value { +// any_list { +// value { +// type_url: "type.googleapis.com/tensorflow.QueueRunnerDef" +// value: "\n\ntest_queue" +// } +// } +// } +// } +// +// 3. For Python objects, implement to_proto() and from_proto(), and register +// them in the following manner: +// ops.register_proto_function("your_collection_name", +// proto_type, +// to_proto=YourPythonObject.to_proto, +// from_proto=YourPythonObject.from_proto) +// These functions will be invoked to serialize and de-serialize the +// collection. For example, +// ops.register_proto_function(ops.GraphKeys.GLOBAL_VARIABLES, +// proto_type=variable_pb2.VariableDef, +// to_proto=Variable.to_proto, +// from_proto=Variable.from_proto) +message CollectionDef { + // NodeList is used for collecting nodes in graph. For example + // collection_def { + // key: "summaries" + // value { + // node_list { + // value: "input_producer/ScalarSummary:0" + // value: "shuffle_batch/ScalarSummary:0" + // value: "ImageSummary:0" + // } + // } + message NodeList { + repeated string value = 1; + } + + // BytesList is used for collecting strings and serialized protobufs. For + // example: + // collection_def { + // key: "trainable_variables" + // value { + // bytes_list { + // value: "\n\017conv1/weights:0\022\024conv1/weights/Assign + // \032\024conv1/weights/read:0" + // value: "\n\016conv1/biases:0\022\023conv1/biases/Assign\032 + // \023conv1/biases/read:0" + // } + // } + // } + message BytesList { + repeated bytes value = 1; + } + + // Int64List is used for collecting int, int64 and long values. + message Int64List { + repeated int64 value = 1 [packed = true]; + } + + // FloatList is used for collecting float values. + message FloatList { + repeated float value = 1 [packed = true]; + } + + // AnyList is used for collecting Any protos. + message AnyList { + repeated google.protobuf.Any value = 1; + } + + oneof kind { + NodeList node_list = 1; + BytesList bytes_list = 2; + Int64List int64_list = 3; + FloatList float_list = 4; + AnyList any_list = 5; + } +} + +// Information about a Tensor necessary for feeding or retrieval. +message TensorInfo { + // For sparse tensors, The COO encoding stores a triple of values, indices, + // and shape. + message CooSparse { + // The shape of the values Tensor is [?]. Its dtype must be the dtype of + // the SparseTensor as a whole, given in the enclosing TensorInfo. + string values_tensor_name = 1; + + // The indices Tensor must have dtype int64 and shape [?, ?]. + string indices_tensor_name = 2; + + // The dynamic logical shape represented by the SparseTensor is recorded in + // the Tensor referenced here. It must have dtype int64 and shape [?]. + string dense_shape_tensor_name = 3; + } + + // Generic encoding for composite tensors. + message CompositeTensor { + // The serialized TypeSpec for the composite tensor. + TypeSpecProto type_spec = 1; + + // A TensorInfo for each flattened component tensor. + repeated TensorInfo components = 2; + } + + oneof encoding { + // For dense `Tensor`s, the name of the tensor in the graph. + string name = 1; + // There are many possible encodings of sparse matrices + // (https://en.wikipedia.org/wiki/Sparse_matrix). Currently, TensorFlow + // uses only the COO encoding. This is supported and documented in the + // SparseTensor Python class. + CooSparse coo_sparse = 4; + // Generic encoding for CompositeTensors. + CompositeTensor composite_tensor = 5; + } + DataType dtype = 2; + // The static shape should be recorded here, to the extent that it can + // be known in advance. In the case of a SparseTensor, this field describes + // the logical shape of the represented tensor (aka dense_shape). + TensorShapeProto tensor_shape = 3; +} + +// SignatureDef defines the signature of a computation supported by a TensorFlow +// graph. +// +// For example, a model with two loss computations, sharing a single input, +// might have the following signature_def map, in a MetaGraphDef message. +// +// Note that across the two SignatureDefs "loss_A" and "loss_B", the input key, +// output key, and method_name are identical, and will be used by system(s) that +// implement or rely upon this particular loss method. The output tensor names +// differ, demonstrating how different outputs can exist for the same method. +// +// signature_def { +// key: "loss_A" +// value { +// inputs { +// key: "input" +// value { +// name: "input:0" +// dtype: DT_STRING +// tensor_shape: ... +// } +// } +// outputs { +// key: "loss_output" +// value { +// name: "loss_output_A:0" +// dtype: DT_FLOAT +// tensor_shape: ... +// } +// } +// method_name: "some/package/compute_loss" +// } +// ... +// } +// signature_def { +// key: "loss_B" +// value { +// inputs { +// key: "input" +// value { +// name: "input:0" +// dtype: DT_STRING +// tensor_shape: ... +// } +// } +// outputs { +// key: "loss_output" +// value { +// name: "loss_output_B:0" +// dtype: DT_FLOAT +// tensor_shape: ... +// } +// } +// method_name: "some/package/compute_loss" +// } +// ... +// } +message SignatureDef { + // Named input parameters. + map inputs = 1; + // Named output parameters. + map outputs = 2; + // Extensible method_name information enabling third-party users to mark a + // SignatureDef as supporting a particular method. This enables producers and + // consumers of SignatureDefs, e.g. a model definition library and a serving + // library to have a clear hand-off regarding the semantics of a computation. + // + // Note that multiple SignatureDefs in a single MetaGraphDef may have the same + // method_name. This is commonly used to support multi-headed computation, + // where a single graph computation may return multiple results. + string method_name = 3; + // Named input to corresponding default values if any. + map defaults = 4; +} + +// An asset file def for a single file or a set of sharded files with the same +// name. +message AssetFileDef { + // The tensor to bind the asset filename to. + TensorInfo tensor_info = 1; + // The filename within an assets directory. Note: does not include the path + // prefix, i.e. directories. For an asset at /tmp/path/vocab.txt, the filename + // would be "vocab.txt". + string filename = 2; +} diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/named_tensor.pb.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/named_tensor.pb.h new file mode 100644 index 0000000000000000000000000000000000000000..044bac02cb0a06128b7a48f0dc9a5dd4043dc713 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/named_tensor.pb.h @@ -0,0 +1,388 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/named_tensor.proto + +#ifndef GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprotobuf_2fnamed_5ftensor_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprotobuf_2fnamed_5ftensor_2eproto + +#include +#include + +#include +#if PROTOBUF_VERSION < 3021000 +#error This file was generated by a newer version of protoc which is +#error incompatible with your Protocol Buffer headers. Please update +#error your headers. +#endif +#if 3021009 < PROTOBUF_MIN_PROTOC_VERSION +#error This file was generated by an older version of protoc which is +#error incompatible with your Protocol Buffer headers. Please +#error regenerate this file with a newer version of protoc. +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include // IWYU pragma: export +#include // IWYU pragma: export +#include +#include "tensorflow/core/framework/tensor.pb.h" +// @@protoc_insertion_point(includes) +#include +#define PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2fprotobuf_2fnamed_5ftensor_2eproto +PROTOBUF_NAMESPACE_OPEN +namespace internal { +class AnyMetadata; +} // namespace internal +PROTOBUF_NAMESPACE_CLOSE + +// Internal implementation detail -- do not use these members. +struct TableStruct_tensorflow_2fcore_2fprotobuf_2fnamed_5ftensor_2eproto { + static const uint32_t offsets[]; +}; +extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_tensorflow_2fcore_2fprotobuf_2fnamed_5ftensor_2eproto; +namespace tensorflow { +class NamedTensorProto; +struct NamedTensorProtoDefaultTypeInternal; +extern NamedTensorProtoDefaultTypeInternal _NamedTensorProto_default_instance_; +} // namespace tensorflow +PROTOBUF_NAMESPACE_OPEN +template<> ::tensorflow::NamedTensorProto* Arena::CreateMaybeMessage<::tensorflow::NamedTensorProto>(Arena*); +PROTOBUF_NAMESPACE_CLOSE +namespace tensorflow { + +// =================================================================== + +class NamedTensorProto final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.NamedTensorProto) */ { + public: + inline NamedTensorProto() : NamedTensorProto(nullptr) {} + ~NamedTensorProto() override; + explicit PROTOBUF_CONSTEXPR NamedTensorProto(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + NamedTensorProto(const NamedTensorProto& from); + NamedTensorProto(NamedTensorProto&& from) noexcept + : NamedTensorProto() { + *this = ::std::move(from); + } + + inline NamedTensorProto& operator=(const NamedTensorProto& from) { + CopyFrom(from); + return *this; + } + inline NamedTensorProto& operator=(NamedTensorProto&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const NamedTensorProto& default_instance() { + return *internal_default_instance(); + } + static inline const NamedTensorProto* internal_default_instance() { + return reinterpret_cast( + &_NamedTensorProto_default_instance_); + } + static constexpr int kIndexInFileMessages = + 0; + + friend void swap(NamedTensorProto& a, NamedTensorProto& b) { + a.Swap(&b); + } + inline void Swap(NamedTensorProto* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(NamedTensorProto* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + NamedTensorProto* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const NamedTensorProto& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const NamedTensorProto& from) { + NamedTensorProto::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(NamedTensorProto* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.NamedTensorProto"; + } + protected: + explicit NamedTensorProto(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kNameFieldNumber = 1, + kTensorFieldNumber = 2, + }; + // string name = 1; + void clear_name(); + const std::string& name() const; + template + void set_name(ArgT0&& arg0, ArgT... args); + std::string* mutable_name(); + PROTOBUF_NODISCARD std::string* release_name(); + void set_allocated_name(std::string* name); + private: + const std::string& _internal_name() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_name(const std::string& value); + std::string* _internal_mutable_name(); + public: + + // .tensorflow.TensorProto tensor = 2; + bool has_tensor() const; + private: + bool _internal_has_tensor() const; + public: + void clear_tensor(); + const ::tensorflow::TensorProto& tensor() const; + PROTOBUF_NODISCARD ::tensorflow::TensorProto* release_tensor(); + ::tensorflow::TensorProto* mutable_tensor(); + void set_allocated_tensor(::tensorflow::TensorProto* tensor); + private: + const ::tensorflow::TensorProto& _internal_tensor() const; + ::tensorflow::TensorProto* _internal_mutable_tensor(); + public: + void unsafe_arena_set_allocated_tensor( + ::tensorflow::TensorProto* tensor); + ::tensorflow::TensorProto* unsafe_arena_release_tensor(); + + // @@protoc_insertion_point(class_scope:tensorflow.NamedTensorProto) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_; + ::tensorflow::TensorProto* tensor_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fnamed_5ftensor_2eproto; +}; +// =================================================================== + + +// =================================================================== + +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// NamedTensorProto + +// string name = 1; +inline void NamedTensorProto::clear_name() { + _impl_.name_.ClearToEmpty(); +} +inline const std::string& NamedTensorProto::name() const { + // @@protoc_insertion_point(field_get:tensorflow.NamedTensorProto.name) + return _internal_name(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void NamedTensorProto::set_name(ArgT0&& arg0, ArgT... args) { + + _impl_.name_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.NamedTensorProto.name) +} +inline std::string* NamedTensorProto::mutable_name() { + std::string* _s = _internal_mutable_name(); + // @@protoc_insertion_point(field_mutable:tensorflow.NamedTensorProto.name) + return _s; +} +inline const std::string& NamedTensorProto::_internal_name() const { + return _impl_.name_.Get(); +} +inline void NamedTensorProto::_internal_set_name(const std::string& value) { + + _impl_.name_.Set(value, GetArenaForAllocation()); +} +inline std::string* NamedTensorProto::_internal_mutable_name() { + + return _impl_.name_.Mutable(GetArenaForAllocation()); +} +inline std::string* NamedTensorProto::release_name() { + // @@protoc_insertion_point(field_release:tensorflow.NamedTensorProto.name) + return _impl_.name_.Release(); +} +inline void NamedTensorProto::set_allocated_name(std::string* name) { + if (name != nullptr) { + + } else { + + } + _impl_.name_.SetAllocated(name, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.name_.IsDefault()) { + _impl_.name_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.NamedTensorProto.name) +} + +// .tensorflow.TensorProto tensor = 2; +inline bool NamedTensorProto::_internal_has_tensor() const { + return this != internal_default_instance() && _impl_.tensor_ != nullptr; +} +inline bool NamedTensorProto::has_tensor() const { + return _internal_has_tensor(); +} +inline const ::tensorflow::TensorProto& NamedTensorProto::_internal_tensor() const { + const ::tensorflow::TensorProto* p = _impl_.tensor_; + return p != nullptr ? *p : reinterpret_cast( + ::tensorflow::_TensorProto_default_instance_); +} +inline const ::tensorflow::TensorProto& NamedTensorProto::tensor() const { + // @@protoc_insertion_point(field_get:tensorflow.NamedTensorProto.tensor) + return _internal_tensor(); +} +inline void NamedTensorProto::unsafe_arena_set_allocated_tensor( + ::tensorflow::TensorProto* tensor) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.tensor_); + } + _impl_.tensor_ = tensor; + if (tensor) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.NamedTensorProto.tensor) +} +inline ::tensorflow::TensorProto* NamedTensorProto::release_tensor() { + + ::tensorflow::TensorProto* temp = _impl_.tensor_; + _impl_.tensor_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tensorflow::TensorProto* NamedTensorProto::unsafe_arena_release_tensor() { + // @@protoc_insertion_point(field_release:tensorflow.NamedTensorProto.tensor) + + ::tensorflow::TensorProto* temp = _impl_.tensor_; + _impl_.tensor_ = nullptr; + return temp; +} +inline ::tensorflow::TensorProto* NamedTensorProto::_internal_mutable_tensor() { + + if (_impl_.tensor_ == nullptr) { + auto* p = CreateMaybeMessage<::tensorflow::TensorProto>(GetArenaForAllocation()); + _impl_.tensor_ = p; + } + return _impl_.tensor_; +} +inline ::tensorflow::TensorProto* NamedTensorProto::mutable_tensor() { + ::tensorflow::TensorProto* _msg = _internal_mutable_tensor(); + // @@protoc_insertion_point(field_mutable:tensorflow.NamedTensorProto.tensor) + return _msg; +} +inline void NamedTensorProto::set_allocated_tensor(::tensorflow::TensorProto* tensor) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.tensor_); + } + if (tensor) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( + reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(tensor)); + if (message_arena != submessage_arena) { + tensor = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, tensor, submessage_arena); + } + + } else { + + } + _impl_.tensor_ = tensor; + // @@protoc_insertion_point(field_set_allocated:tensorflow.NamedTensorProto.tensor) +} + +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ + +// @@protoc_insertion_point(namespace_scope) + +} // namespace tensorflow + +// @@protoc_insertion_point(global_scope) + +#include +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprotobuf_2fnamed_5ftensor_2eproto diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/named_tensor.proto b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/named_tensor.proto new file mode 100644 index 0000000000000000000000000000000000000000..8d401a0c4813b7afa4311e13d467dddc22fff5e1 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/named_tensor.proto @@ -0,0 +1,25 @@ +syntax = "proto3"; + +package tensorflow; + +import "tensorflow/core/framework/tensor.proto"; + +option cc_enable_arenas = true; +option java_outer_classname = "NamedTensorProtos"; +option java_multiple_files = true; +option java_package = "org.tensorflow.framework"; +option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/protobuf/for_core_protos_go_proto"; + +// A pair of tensor name and tensor values. +message NamedTensorProto { + // Name of the tensor. + string name = 1; + + // The client can populate a TensorProto using a tensorflow::Tensor`, or + // directly using the protobuf field accessors. + // + // The client specifies whether the returned tensor values should be + // filled tensor fields (float_val, int_val, etc.) or encoded in a + // compact form in tensor.tensor_content. + TensorProto tensor = 2; +} diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/queue_runner.pb.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/queue_runner.pb.h new file mode 100644 index 0000000000000000000000000000000000000000..ebd80d4ff1e39537e508a38c850787874ac1533c --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/queue_runner.pb.h @@ -0,0 +1,579 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/queue_runner.proto + +#ifndef GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprotobuf_2fqueue_5frunner_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprotobuf_2fqueue_5frunner_2eproto + +#include +#include + +#include +#if PROTOBUF_VERSION < 3021000 +#error This file was generated by a newer version of protoc which is +#error incompatible with your Protocol Buffer headers. Please update +#error your headers. +#endif +#if 3021009 < PROTOBUF_MIN_PROTOC_VERSION +#error This file was generated by an older version of protoc which is +#error incompatible with your Protocol Buffer headers. Please +#error regenerate this file with a newer version of protoc. +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include // IWYU pragma: export +#include // IWYU pragma: export +#include +#include "tensorflow/core/protobuf/error_codes.pb.h" +// @@protoc_insertion_point(includes) +#include +#define PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2fprotobuf_2fqueue_5frunner_2eproto +PROTOBUF_NAMESPACE_OPEN +namespace internal { +class AnyMetadata; +} // namespace internal +PROTOBUF_NAMESPACE_CLOSE + +// Internal implementation detail -- do not use these members. +struct TableStruct_tensorflow_2fcore_2fprotobuf_2fqueue_5frunner_2eproto { + static const uint32_t offsets[]; +}; +extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_tensorflow_2fcore_2fprotobuf_2fqueue_5frunner_2eproto; +namespace tensorflow { +class QueueRunnerDef; +struct QueueRunnerDefDefaultTypeInternal; +extern QueueRunnerDefDefaultTypeInternal _QueueRunnerDef_default_instance_; +} // namespace tensorflow +PROTOBUF_NAMESPACE_OPEN +template<> ::tensorflow::QueueRunnerDef* Arena::CreateMaybeMessage<::tensorflow::QueueRunnerDef>(Arena*); +PROTOBUF_NAMESPACE_CLOSE +namespace tensorflow { + +// =================================================================== + +class QueueRunnerDef final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.QueueRunnerDef) */ { + public: + inline QueueRunnerDef() : QueueRunnerDef(nullptr) {} + ~QueueRunnerDef() override; + explicit PROTOBUF_CONSTEXPR QueueRunnerDef(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + QueueRunnerDef(const QueueRunnerDef& from); + QueueRunnerDef(QueueRunnerDef&& from) noexcept + : QueueRunnerDef() { + *this = ::std::move(from); + } + + inline QueueRunnerDef& operator=(const QueueRunnerDef& from) { + CopyFrom(from); + return *this; + } + inline QueueRunnerDef& operator=(QueueRunnerDef&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const QueueRunnerDef& default_instance() { + return *internal_default_instance(); + } + static inline const QueueRunnerDef* internal_default_instance() { + return reinterpret_cast( + &_QueueRunnerDef_default_instance_); + } + static constexpr int kIndexInFileMessages = + 0; + + friend void swap(QueueRunnerDef& a, QueueRunnerDef& b) { + a.Swap(&b); + } + inline void Swap(QueueRunnerDef* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(QueueRunnerDef* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + QueueRunnerDef* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const QueueRunnerDef& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const QueueRunnerDef& from) { + QueueRunnerDef::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(QueueRunnerDef* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.QueueRunnerDef"; + } + protected: + explicit QueueRunnerDef(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kEnqueueOpNameFieldNumber = 2, + kQueueClosedExceptionTypesFieldNumber = 5, + kQueueNameFieldNumber = 1, + kCloseOpNameFieldNumber = 3, + kCancelOpNameFieldNumber = 4, + }; + // repeated string enqueue_op_name = 2; + int enqueue_op_name_size() const; + private: + int _internal_enqueue_op_name_size() const; + public: + void clear_enqueue_op_name(); + const std::string& enqueue_op_name(int index) const; + std::string* mutable_enqueue_op_name(int index); + void set_enqueue_op_name(int index, const std::string& value); + void set_enqueue_op_name(int index, std::string&& value); + void set_enqueue_op_name(int index, const char* value); + void set_enqueue_op_name(int index, const char* value, size_t size); + std::string* add_enqueue_op_name(); + void add_enqueue_op_name(const std::string& value); + void add_enqueue_op_name(std::string&& value); + void add_enqueue_op_name(const char* value); + void add_enqueue_op_name(const char* value, size_t size); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& enqueue_op_name() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* mutable_enqueue_op_name(); + private: + const std::string& _internal_enqueue_op_name(int index) const; + std::string* _internal_add_enqueue_op_name(); + public: + + // repeated .tensorflow.error.Code queue_closed_exception_types = 5; + int queue_closed_exception_types_size() const; + private: + int _internal_queue_closed_exception_types_size() const; + public: + void clear_queue_closed_exception_types(); + private: + ::tensorflow::error::Code _internal_queue_closed_exception_types(int index) const; + void _internal_add_queue_closed_exception_types(::tensorflow::error::Code value); + ::PROTOBUF_NAMESPACE_ID::RepeatedField* _internal_mutable_queue_closed_exception_types(); + public: + ::tensorflow::error::Code queue_closed_exception_types(int index) const; + void set_queue_closed_exception_types(int index, ::tensorflow::error::Code value); + void add_queue_closed_exception_types(::tensorflow::error::Code value); + const ::PROTOBUF_NAMESPACE_ID::RepeatedField& queue_closed_exception_types() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedField* mutable_queue_closed_exception_types(); + + // string queue_name = 1; + void clear_queue_name(); + const std::string& queue_name() const; + template + void set_queue_name(ArgT0&& arg0, ArgT... args); + std::string* mutable_queue_name(); + PROTOBUF_NODISCARD std::string* release_queue_name(); + void set_allocated_queue_name(std::string* queue_name); + private: + const std::string& _internal_queue_name() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_queue_name(const std::string& value); + std::string* _internal_mutable_queue_name(); + public: + + // string close_op_name = 3; + void clear_close_op_name(); + const std::string& close_op_name() const; + template + void set_close_op_name(ArgT0&& arg0, ArgT... args); + std::string* mutable_close_op_name(); + PROTOBUF_NODISCARD std::string* release_close_op_name(); + void set_allocated_close_op_name(std::string* close_op_name); + private: + const std::string& _internal_close_op_name() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_close_op_name(const std::string& value); + std::string* _internal_mutable_close_op_name(); + public: + + // string cancel_op_name = 4; + void clear_cancel_op_name(); + const std::string& cancel_op_name() const; + template + void set_cancel_op_name(ArgT0&& arg0, ArgT... args); + std::string* mutable_cancel_op_name(); + PROTOBUF_NODISCARD std::string* release_cancel_op_name(); + void set_allocated_cancel_op_name(std::string* cancel_op_name); + private: + const std::string& _internal_cancel_op_name() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_cancel_op_name(const std::string& value); + std::string* _internal_mutable_cancel_op_name(); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.QueueRunnerDef) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField enqueue_op_name_; + ::PROTOBUF_NAMESPACE_ID::RepeatedField queue_closed_exception_types_; + mutable std::atomic _queue_closed_exception_types_cached_byte_size_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr queue_name_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr close_op_name_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr cancel_op_name_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fqueue_5frunner_2eproto; +}; +// =================================================================== + + +// =================================================================== + +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// QueueRunnerDef + +// string queue_name = 1; +inline void QueueRunnerDef::clear_queue_name() { + _impl_.queue_name_.ClearToEmpty(); +} +inline const std::string& QueueRunnerDef::queue_name() const { + // @@protoc_insertion_point(field_get:tensorflow.QueueRunnerDef.queue_name) + return _internal_queue_name(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void QueueRunnerDef::set_queue_name(ArgT0&& arg0, ArgT... args) { + + _impl_.queue_name_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.QueueRunnerDef.queue_name) +} +inline std::string* QueueRunnerDef::mutable_queue_name() { + std::string* _s = _internal_mutable_queue_name(); + // @@protoc_insertion_point(field_mutable:tensorflow.QueueRunnerDef.queue_name) + return _s; +} +inline const std::string& QueueRunnerDef::_internal_queue_name() const { + return _impl_.queue_name_.Get(); +} +inline void QueueRunnerDef::_internal_set_queue_name(const std::string& value) { + + _impl_.queue_name_.Set(value, GetArenaForAllocation()); +} +inline std::string* QueueRunnerDef::_internal_mutable_queue_name() { + + return _impl_.queue_name_.Mutable(GetArenaForAllocation()); +} +inline std::string* QueueRunnerDef::release_queue_name() { + // @@protoc_insertion_point(field_release:tensorflow.QueueRunnerDef.queue_name) + return _impl_.queue_name_.Release(); +} +inline void QueueRunnerDef::set_allocated_queue_name(std::string* queue_name) { + if (queue_name != nullptr) { + + } else { + + } + _impl_.queue_name_.SetAllocated(queue_name, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.queue_name_.IsDefault()) { + _impl_.queue_name_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.QueueRunnerDef.queue_name) +} + +// repeated string enqueue_op_name = 2; +inline int QueueRunnerDef::_internal_enqueue_op_name_size() const { + return _impl_.enqueue_op_name_.size(); +} +inline int QueueRunnerDef::enqueue_op_name_size() const { + return _internal_enqueue_op_name_size(); +} +inline void QueueRunnerDef::clear_enqueue_op_name() { + _impl_.enqueue_op_name_.Clear(); +} +inline std::string* QueueRunnerDef::add_enqueue_op_name() { + std::string* _s = _internal_add_enqueue_op_name(); + // @@protoc_insertion_point(field_add_mutable:tensorflow.QueueRunnerDef.enqueue_op_name) + return _s; +} +inline const std::string& QueueRunnerDef::_internal_enqueue_op_name(int index) const { + return _impl_.enqueue_op_name_.Get(index); +} +inline const std::string& QueueRunnerDef::enqueue_op_name(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.QueueRunnerDef.enqueue_op_name) + return _internal_enqueue_op_name(index); +} +inline std::string* QueueRunnerDef::mutable_enqueue_op_name(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.QueueRunnerDef.enqueue_op_name) + return _impl_.enqueue_op_name_.Mutable(index); +} +inline void QueueRunnerDef::set_enqueue_op_name(int index, const std::string& value) { + _impl_.enqueue_op_name_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set:tensorflow.QueueRunnerDef.enqueue_op_name) +} +inline void QueueRunnerDef::set_enqueue_op_name(int index, std::string&& value) { + _impl_.enqueue_op_name_.Mutable(index)->assign(std::move(value)); + // @@protoc_insertion_point(field_set:tensorflow.QueueRunnerDef.enqueue_op_name) +} +inline void QueueRunnerDef::set_enqueue_op_name(int index, const char* value) { + GOOGLE_DCHECK(value != nullptr); + _impl_.enqueue_op_name_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set_char:tensorflow.QueueRunnerDef.enqueue_op_name) +} +inline void QueueRunnerDef::set_enqueue_op_name(int index, const char* value, size_t size) { + _impl_.enqueue_op_name_.Mutable(index)->assign( + reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:tensorflow.QueueRunnerDef.enqueue_op_name) +} +inline std::string* QueueRunnerDef::_internal_add_enqueue_op_name() { + return _impl_.enqueue_op_name_.Add(); +} +inline void QueueRunnerDef::add_enqueue_op_name(const std::string& value) { + _impl_.enqueue_op_name_.Add()->assign(value); + // @@protoc_insertion_point(field_add:tensorflow.QueueRunnerDef.enqueue_op_name) +} +inline void QueueRunnerDef::add_enqueue_op_name(std::string&& value) { + _impl_.enqueue_op_name_.Add(std::move(value)); + // @@protoc_insertion_point(field_add:tensorflow.QueueRunnerDef.enqueue_op_name) +} +inline void QueueRunnerDef::add_enqueue_op_name(const char* value) { + GOOGLE_DCHECK(value != nullptr); + _impl_.enqueue_op_name_.Add()->assign(value); + // @@protoc_insertion_point(field_add_char:tensorflow.QueueRunnerDef.enqueue_op_name) +} +inline void QueueRunnerDef::add_enqueue_op_name(const char* value, size_t size) { + _impl_.enqueue_op_name_.Add()->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_add_pointer:tensorflow.QueueRunnerDef.enqueue_op_name) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& +QueueRunnerDef::enqueue_op_name() const { + // @@protoc_insertion_point(field_list:tensorflow.QueueRunnerDef.enqueue_op_name) + return _impl_.enqueue_op_name_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* +QueueRunnerDef::mutable_enqueue_op_name() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.QueueRunnerDef.enqueue_op_name) + return &_impl_.enqueue_op_name_; +} + +// string close_op_name = 3; +inline void QueueRunnerDef::clear_close_op_name() { + _impl_.close_op_name_.ClearToEmpty(); +} +inline const std::string& QueueRunnerDef::close_op_name() const { + // @@protoc_insertion_point(field_get:tensorflow.QueueRunnerDef.close_op_name) + return _internal_close_op_name(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void QueueRunnerDef::set_close_op_name(ArgT0&& arg0, ArgT... args) { + + _impl_.close_op_name_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.QueueRunnerDef.close_op_name) +} +inline std::string* QueueRunnerDef::mutable_close_op_name() { + std::string* _s = _internal_mutable_close_op_name(); + // @@protoc_insertion_point(field_mutable:tensorflow.QueueRunnerDef.close_op_name) + return _s; +} +inline const std::string& QueueRunnerDef::_internal_close_op_name() const { + return _impl_.close_op_name_.Get(); +} +inline void QueueRunnerDef::_internal_set_close_op_name(const std::string& value) { + + _impl_.close_op_name_.Set(value, GetArenaForAllocation()); +} +inline std::string* QueueRunnerDef::_internal_mutable_close_op_name() { + + return _impl_.close_op_name_.Mutable(GetArenaForAllocation()); +} +inline std::string* QueueRunnerDef::release_close_op_name() { + // @@protoc_insertion_point(field_release:tensorflow.QueueRunnerDef.close_op_name) + return _impl_.close_op_name_.Release(); +} +inline void QueueRunnerDef::set_allocated_close_op_name(std::string* close_op_name) { + if (close_op_name != nullptr) { + + } else { + + } + _impl_.close_op_name_.SetAllocated(close_op_name, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.close_op_name_.IsDefault()) { + _impl_.close_op_name_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.QueueRunnerDef.close_op_name) +} + +// string cancel_op_name = 4; +inline void QueueRunnerDef::clear_cancel_op_name() { + _impl_.cancel_op_name_.ClearToEmpty(); +} +inline const std::string& QueueRunnerDef::cancel_op_name() const { + // @@protoc_insertion_point(field_get:tensorflow.QueueRunnerDef.cancel_op_name) + return _internal_cancel_op_name(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void QueueRunnerDef::set_cancel_op_name(ArgT0&& arg0, ArgT... args) { + + _impl_.cancel_op_name_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.QueueRunnerDef.cancel_op_name) +} +inline std::string* QueueRunnerDef::mutable_cancel_op_name() { + std::string* _s = _internal_mutable_cancel_op_name(); + // @@protoc_insertion_point(field_mutable:tensorflow.QueueRunnerDef.cancel_op_name) + return _s; +} +inline const std::string& QueueRunnerDef::_internal_cancel_op_name() const { + return _impl_.cancel_op_name_.Get(); +} +inline void QueueRunnerDef::_internal_set_cancel_op_name(const std::string& value) { + + _impl_.cancel_op_name_.Set(value, GetArenaForAllocation()); +} +inline std::string* QueueRunnerDef::_internal_mutable_cancel_op_name() { + + return _impl_.cancel_op_name_.Mutable(GetArenaForAllocation()); +} +inline std::string* QueueRunnerDef::release_cancel_op_name() { + // @@protoc_insertion_point(field_release:tensorflow.QueueRunnerDef.cancel_op_name) + return _impl_.cancel_op_name_.Release(); +} +inline void QueueRunnerDef::set_allocated_cancel_op_name(std::string* cancel_op_name) { + if (cancel_op_name != nullptr) { + + } else { + + } + _impl_.cancel_op_name_.SetAllocated(cancel_op_name, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.cancel_op_name_.IsDefault()) { + _impl_.cancel_op_name_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.QueueRunnerDef.cancel_op_name) +} + +// repeated .tensorflow.error.Code queue_closed_exception_types = 5; +inline int QueueRunnerDef::_internal_queue_closed_exception_types_size() const { + return _impl_.queue_closed_exception_types_.size(); +} +inline int QueueRunnerDef::queue_closed_exception_types_size() const { + return _internal_queue_closed_exception_types_size(); +} +inline void QueueRunnerDef::clear_queue_closed_exception_types() { + _impl_.queue_closed_exception_types_.Clear(); +} +inline ::tensorflow::error::Code QueueRunnerDef::_internal_queue_closed_exception_types(int index) const { + return static_cast< ::tensorflow::error::Code >(_impl_.queue_closed_exception_types_.Get(index)); +} +inline ::tensorflow::error::Code QueueRunnerDef::queue_closed_exception_types(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.QueueRunnerDef.queue_closed_exception_types) + return _internal_queue_closed_exception_types(index); +} +inline void QueueRunnerDef::set_queue_closed_exception_types(int index, ::tensorflow::error::Code value) { + _impl_.queue_closed_exception_types_.Set(index, value); + // @@protoc_insertion_point(field_set:tensorflow.QueueRunnerDef.queue_closed_exception_types) +} +inline void QueueRunnerDef::_internal_add_queue_closed_exception_types(::tensorflow::error::Code value) { + _impl_.queue_closed_exception_types_.Add(value); +} +inline void QueueRunnerDef::add_queue_closed_exception_types(::tensorflow::error::Code value) { + _internal_add_queue_closed_exception_types(value); + // @@protoc_insertion_point(field_add:tensorflow.QueueRunnerDef.queue_closed_exception_types) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField& +QueueRunnerDef::queue_closed_exception_types() const { + // @@protoc_insertion_point(field_list:tensorflow.QueueRunnerDef.queue_closed_exception_types) + return _impl_.queue_closed_exception_types_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField* +QueueRunnerDef::_internal_mutable_queue_closed_exception_types() { + return &_impl_.queue_closed_exception_types_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField* +QueueRunnerDef::mutable_queue_closed_exception_types() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.QueueRunnerDef.queue_closed_exception_types) + return _internal_mutable_queue_closed_exception_types(); +} + +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ + +// @@protoc_insertion_point(namespace_scope) + +} // namespace tensorflow + +// @@protoc_insertion_point(global_scope) + +#include +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprotobuf_2fqueue_5frunner_2eproto diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/queue_runner.proto b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/queue_runner.proto new file mode 100644 index 0000000000000000000000000000000000000000..c3225d42fd285dbe6d34ce5c9b36605ca6ec27cf --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/queue_runner.proto @@ -0,0 +1,30 @@ +syntax = "proto3"; + +package tensorflow; + +import "tensorflow/core/protobuf/error_codes.proto"; + +option cc_enable_arenas = true; +option java_outer_classname = "QueueRunnerProtos"; +option java_multiple_files = true; +option java_package = "org.tensorflow.framework"; +option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/protobuf/for_core_protos_go_proto"; + +// Protocol buffer representing a QueueRunner. +message QueueRunnerDef { + // Queue name. + string queue_name = 1; + + // A list of enqueue operations. + repeated string enqueue_op_name = 2; + + // The operation to run to close the queue. + string close_op_name = 3; + + // The operation to run to cancel the queue. + string cancel_op_name = 4; + + // A list of exception types considered to signal a safely closed queue + // if raised during enqueue operations. + repeated error.Code queue_closed_exception_types = 5; +} diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/remote_tensor_handle.pb.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/remote_tensor_handle.pb.h new file mode 100644 index 0000000000000000000000000000000000000000..7630366e6aff78cd1710ba443ac2af3c42e1ef95 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/remote_tensor_handle.pb.h @@ -0,0 +1,790 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/remote_tensor_handle.proto + +#ifndef GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprotobuf_2fremote_5ftensor_5fhandle_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprotobuf_2fremote_5ftensor_5fhandle_2eproto + +#include +#include + +#include +#if PROTOBUF_VERSION < 3021000 +#error This file was generated by a newer version of protoc which is +#error incompatible with your Protocol Buffer headers. Please update +#error your headers. +#endif +#if 3021009 < PROTOBUF_MIN_PROTOC_VERSION +#error This file was generated by an older version of protoc which is +#error incompatible with your Protocol Buffer headers. Please +#error regenerate this file with a newer version of protoc. +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include // IWYU pragma: export +#include // IWYU pragma: export +#include +#include "tensorflow/core/framework/tensor_shape.pb.h" +#include "tensorflow/core/framework/types.pb.h" +// @@protoc_insertion_point(includes) +#include +#define PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2fprotobuf_2fremote_5ftensor_5fhandle_2eproto +PROTOBUF_NAMESPACE_OPEN +namespace internal { +class AnyMetadata; +} // namespace internal +PROTOBUF_NAMESPACE_CLOSE + +// Internal implementation detail -- do not use these members. +struct TableStruct_tensorflow_2fcore_2fprotobuf_2fremote_5ftensor_5fhandle_2eproto { + static const uint32_t offsets[]; +}; +extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_tensorflow_2fcore_2fprotobuf_2fremote_5ftensor_5fhandle_2eproto; +namespace tensorflow { +namespace eager { +class RemoteTensorHandle; +struct RemoteTensorHandleDefaultTypeInternal; +extern RemoteTensorHandleDefaultTypeInternal _RemoteTensorHandle_default_instance_; +class ResourceDtypeAndShape; +struct ResourceDtypeAndShapeDefaultTypeInternal; +extern ResourceDtypeAndShapeDefaultTypeInternal _ResourceDtypeAndShape_default_instance_; +} // namespace eager +} // namespace tensorflow +PROTOBUF_NAMESPACE_OPEN +template<> ::tensorflow::eager::RemoteTensorHandle* Arena::CreateMaybeMessage<::tensorflow::eager::RemoteTensorHandle>(Arena*); +template<> ::tensorflow::eager::ResourceDtypeAndShape* Arena::CreateMaybeMessage<::tensorflow::eager::ResourceDtypeAndShape>(Arena*); +PROTOBUF_NAMESPACE_CLOSE +namespace tensorflow { +namespace eager { + +// =================================================================== + +class ResourceDtypeAndShape final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.eager.ResourceDtypeAndShape) */ { + public: + inline ResourceDtypeAndShape() : ResourceDtypeAndShape(nullptr) {} + ~ResourceDtypeAndShape() override; + explicit PROTOBUF_CONSTEXPR ResourceDtypeAndShape(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + ResourceDtypeAndShape(const ResourceDtypeAndShape& from); + ResourceDtypeAndShape(ResourceDtypeAndShape&& from) noexcept + : ResourceDtypeAndShape() { + *this = ::std::move(from); + } + + inline ResourceDtypeAndShape& operator=(const ResourceDtypeAndShape& from) { + CopyFrom(from); + return *this; + } + inline ResourceDtypeAndShape& operator=(ResourceDtypeAndShape&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const ResourceDtypeAndShape& default_instance() { + return *internal_default_instance(); + } + static inline const ResourceDtypeAndShape* internal_default_instance() { + return reinterpret_cast( + &_ResourceDtypeAndShape_default_instance_); + } + static constexpr int kIndexInFileMessages = + 0; + + friend void swap(ResourceDtypeAndShape& a, ResourceDtypeAndShape& b) { + a.Swap(&b); + } + inline void Swap(ResourceDtypeAndShape* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(ResourceDtypeAndShape* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + ResourceDtypeAndShape* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const ResourceDtypeAndShape& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const ResourceDtypeAndShape& from) { + ResourceDtypeAndShape::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(ResourceDtypeAndShape* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.eager.ResourceDtypeAndShape"; + } + protected: + explicit ResourceDtypeAndShape(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kShapeFieldNumber = 2, + kDtypeFieldNumber = 1, + }; + // .tensorflow.TensorShapeProto shape = 2; + bool has_shape() const; + private: + bool _internal_has_shape() const; + public: + void clear_shape(); + const ::tensorflow::TensorShapeProto& shape() const; + PROTOBUF_NODISCARD ::tensorflow::TensorShapeProto* release_shape(); + ::tensorflow::TensorShapeProto* mutable_shape(); + void set_allocated_shape(::tensorflow::TensorShapeProto* shape); + private: + const ::tensorflow::TensorShapeProto& _internal_shape() const; + ::tensorflow::TensorShapeProto* _internal_mutable_shape(); + public: + void unsafe_arena_set_allocated_shape( + ::tensorflow::TensorShapeProto* shape); + ::tensorflow::TensorShapeProto* unsafe_arena_release_shape(); + + // .tensorflow.DataType dtype = 1; + void clear_dtype(); + ::tensorflow::DataType dtype() const; + void set_dtype(::tensorflow::DataType value); + private: + ::tensorflow::DataType _internal_dtype() const; + void _internal_set_dtype(::tensorflow::DataType value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.eager.ResourceDtypeAndShape) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::tensorflow::TensorShapeProto* shape_; + int dtype_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fremote_5ftensor_5fhandle_2eproto; +}; +// ------------------------------------------------------------------- + +class RemoteTensorHandle final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.eager.RemoteTensorHandle) */ { + public: + inline RemoteTensorHandle() : RemoteTensorHandle(nullptr) {} + ~RemoteTensorHandle() override; + explicit PROTOBUF_CONSTEXPR RemoteTensorHandle(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + RemoteTensorHandle(const RemoteTensorHandle& from); + RemoteTensorHandle(RemoteTensorHandle&& from) noexcept + : RemoteTensorHandle() { + *this = ::std::move(from); + } + + inline RemoteTensorHandle& operator=(const RemoteTensorHandle& from) { + CopyFrom(from); + return *this; + } + inline RemoteTensorHandle& operator=(RemoteTensorHandle&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const RemoteTensorHandle& default_instance() { + return *internal_default_instance(); + } + static inline const RemoteTensorHandle* internal_default_instance() { + return reinterpret_cast( + &_RemoteTensorHandle_default_instance_); + } + static constexpr int kIndexInFileMessages = + 1; + + friend void swap(RemoteTensorHandle& a, RemoteTensorHandle& b) { + a.Swap(&b); + } + inline void Swap(RemoteTensorHandle* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(RemoteTensorHandle* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + RemoteTensorHandle* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const RemoteTensorHandle& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const RemoteTensorHandle& from) { + RemoteTensorHandle::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(RemoteTensorHandle* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.eager.RemoteTensorHandle"; + } + protected: + explicit RemoteTensorHandle(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kResourceDtypesAndShapesFieldNumber = 6, + kDeviceFieldNumber = 3, + kOpDeviceFieldNumber = 4, + kOpIdFieldNumber = 1, + kOutputNumFieldNumber = 2, + kDtypeFieldNumber = 5, + }; + // repeated .tensorflow.eager.ResourceDtypeAndShape resource_dtypes_and_shapes = 6; + int resource_dtypes_and_shapes_size() const; + private: + int _internal_resource_dtypes_and_shapes_size() const; + public: + void clear_resource_dtypes_and_shapes(); + ::tensorflow::eager::ResourceDtypeAndShape* mutable_resource_dtypes_and_shapes(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::eager::ResourceDtypeAndShape >* + mutable_resource_dtypes_and_shapes(); + private: + const ::tensorflow::eager::ResourceDtypeAndShape& _internal_resource_dtypes_and_shapes(int index) const; + ::tensorflow::eager::ResourceDtypeAndShape* _internal_add_resource_dtypes_and_shapes(); + public: + const ::tensorflow::eager::ResourceDtypeAndShape& resource_dtypes_and_shapes(int index) const; + ::tensorflow::eager::ResourceDtypeAndShape* add_resource_dtypes_and_shapes(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::eager::ResourceDtypeAndShape >& + resource_dtypes_and_shapes() const; + + // string device = 3; + void clear_device(); + const std::string& device() const; + template + void set_device(ArgT0&& arg0, ArgT... args); + std::string* mutable_device(); + PROTOBUF_NODISCARD std::string* release_device(); + void set_allocated_device(std::string* device); + private: + const std::string& _internal_device() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_device(const std::string& value); + std::string* _internal_mutable_device(); + public: + + // string op_device = 4; + void clear_op_device(); + const std::string& op_device() const; + template + void set_op_device(ArgT0&& arg0, ArgT... args); + std::string* mutable_op_device(); + PROTOBUF_NODISCARD std::string* release_op_device(); + void set_allocated_op_device(std::string* op_device); + private: + const std::string& _internal_op_device() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_op_device(const std::string& value); + std::string* _internal_mutable_op_device(); + public: + + // int64 op_id = 1; + void clear_op_id(); + int64_t op_id() const; + void set_op_id(int64_t value); + private: + int64_t _internal_op_id() const; + void _internal_set_op_id(int64_t value); + public: + + // int32 output_num = 2; + void clear_output_num(); + int32_t output_num() const; + void set_output_num(int32_t value); + private: + int32_t _internal_output_num() const; + void _internal_set_output_num(int32_t value); + public: + + // .tensorflow.DataType dtype = 5; + void clear_dtype(); + ::tensorflow::DataType dtype() const; + void set_dtype(::tensorflow::DataType value); + private: + ::tensorflow::DataType _internal_dtype() const; + void _internal_set_dtype(::tensorflow::DataType value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.eager.RemoteTensorHandle) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::eager::ResourceDtypeAndShape > resource_dtypes_and_shapes_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr device_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr op_device_; + int64_t op_id_; + int32_t output_num_; + int dtype_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fremote_5ftensor_5fhandle_2eproto; +}; +// =================================================================== + + +// =================================================================== + +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// ResourceDtypeAndShape + +// .tensorflow.DataType dtype = 1; +inline void ResourceDtypeAndShape::clear_dtype() { + _impl_.dtype_ = 0; +} +inline ::tensorflow::DataType ResourceDtypeAndShape::_internal_dtype() const { + return static_cast< ::tensorflow::DataType >(_impl_.dtype_); +} +inline ::tensorflow::DataType ResourceDtypeAndShape::dtype() const { + // @@protoc_insertion_point(field_get:tensorflow.eager.ResourceDtypeAndShape.dtype) + return _internal_dtype(); +} +inline void ResourceDtypeAndShape::_internal_set_dtype(::tensorflow::DataType value) { + + _impl_.dtype_ = value; +} +inline void ResourceDtypeAndShape::set_dtype(::tensorflow::DataType value) { + _internal_set_dtype(value); + // @@protoc_insertion_point(field_set:tensorflow.eager.ResourceDtypeAndShape.dtype) +} + +// .tensorflow.TensorShapeProto shape = 2; +inline bool ResourceDtypeAndShape::_internal_has_shape() const { + return this != internal_default_instance() && _impl_.shape_ != nullptr; +} +inline bool ResourceDtypeAndShape::has_shape() const { + return _internal_has_shape(); +} +inline const ::tensorflow::TensorShapeProto& ResourceDtypeAndShape::_internal_shape() const { + const ::tensorflow::TensorShapeProto* p = _impl_.shape_; + return p != nullptr ? *p : reinterpret_cast( + ::tensorflow::_TensorShapeProto_default_instance_); +} +inline const ::tensorflow::TensorShapeProto& ResourceDtypeAndShape::shape() const { + // @@protoc_insertion_point(field_get:tensorflow.eager.ResourceDtypeAndShape.shape) + return _internal_shape(); +} +inline void ResourceDtypeAndShape::unsafe_arena_set_allocated_shape( + ::tensorflow::TensorShapeProto* shape) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.shape_); + } + _impl_.shape_ = shape; + if (shape) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.eager.ResourceDtypeAndShape.shape) +} +inline ::tensorflow::TensorShapeProto* ResourceDtypeAndShape::release_shape() { + + ::tensorflow::TensorShapeProto* temp = _impl_.shape_; + _impl_.shape_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tensorflow::TensorShapeProto* ResourceDtypeAndShape::unsafe_arena_release_shape() { + // @@protoc_insertion_point(field_release:tensorflow.eager.ResourceDtypeAndShape.shape) + + ::tensorflow::TensorShapeProto* temp = _impl_.shape_; + _impl_.shape_ = nullptr; + return temp; +} +inline ::tensorflow::TensorShapeProto* ResourceDtypeAndShape::_internal_mutable_shape() { + + if (_impl_.shape_ == nullptr) { + auto* p = CreateMaybeMessage<::tensorflow::TensorShapeProto>(GetArenaForAllocation()); + _impl_.shape_ = p; + } + return _impl_.shape_; +} +inline ::tensorflow::TensorShapeProto* ResourceDtypeAndShape::mutable_shape() { + ::tensorflow::TensorShapeProto* _msg = _internal_mutable_shape(); + // @@protoc_insertion_point(field_mutable:tensorflow.eager.ResourceDtypeAndShape.shape) + return _msg; +} +inline void ResourceDtypeAndShape::set_allocated_shape(::tensorflow::TensorShapeProto* shape) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.shape_); + } + if (shape) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( + reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(shape)); + if (message_arena != submessage_arena) { + shape = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, shape, submessage_arena); + } + + } else { + + } + _impl_.shape_ = shape; + // @@protoc_insertion_point(field_set_allocated:tensorflow.eager.ResourceDtypeAndShape.shape) +} + +// ------------------------------------------------------------------- + +// RemoteTensorHandle + +// int64 op_id = 1; +inline void RemoteTensorHandle::clear_op_id() { + _impl_.op_id_ = int64_t{0}; +} +inline int64_t RemoteTensorHandle::_internal_op_id() const { + return _impl_.op_id_; +} +inline int64_t RemoteTensorHandle::op_id() const { + // @@protoc_insertion_point(field_get:tensorflow.eager.RemoteTensorHandle.op_id) + return _internal_op_id(); +} +inline void RemoteTensorHandle::_internal_set_op_id(int64_t value) { + + _impl_.op_id_ = value; +} +inline void RemoteTensorHandle::set_op_id(int64_t value) { + _internal_set_op_id(value); + // @@protoc_insertion_point(field_set:tensorflow.eager.RemoteTensorHandle.op_id) +} + +// int32 output_num = 2; +inline void RemoteTensorHandle::clear_output_num() { + _impl_.output_num_ = 0; +} +inline int32_t RemoteTensorHandle::_internal_output_num() const { + return _impl_.output_num_; +} +inline int32_t RemoteTensorHandle::output_num() const { + // @@protoc_insertion_point(field_get:tensorflow.eager.RemoteTensorHandle.output_num) + return _internal_output_num(); +} +inline void RemoteTensorHandle::_internal_set_output_num(int32_t value) { + + _impl_.output_num_ = value; +} +inline void RemoteTensorHandle::set_output_num(int32_t value) { + _internal_set_output_num(value); + // @@protoc_insertion_point(field_set:tensorflow.eager.RemoteTensorHandle.output_num) +} + +// string device = 3; +inline void RemoteTensorHandle::clear_device() { + _impl_.device_.ClearToEmpty(); +} +inline const std::string& RemoteTensorHandle::device() const { + // @@protoc_insertion_point(field_get:tensorflow.eager.RemoteTensorHandle.device) + return _internal_device(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void RemoteTensorHandle::set_device(ArgT0&& arg0, ArgT... args) { + + _impl_.device_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.eager.RemoteTensorHandle.device) +} +inline std::string* RemoteTensorHandle::mutable_device() { + std::string* _s = _internal_mutable_device(); + // @@protoc_insertion_point(field_mutable:tensorflow.eager.RemoteTensorHandle.device) + return _s; +} +inline const std::string& RemoteTensorHandle::_internal_device() const { + return _impl_.device_.Get(); +} +inline void RemoteTensorHandle::_internal_set_device(const std::string& value) { + + _impl_.device_.Set(value, GetArenaForAllocation()); +} +inline std::string* RemoteTensorHandle::_internal_mutable_device() { + + return _impl_.device_.Mutable(GetArenaForAllocation()); +} +inline std::string* RemoteTensorHandle::release_device() { + // @@protoc_insertion_point(field_release:tensorflow.eager.RemoteTensorHandle.device) + return _impl_.device_.Release(); +} +inline void RemoteTensorHandle::set_allocated_device(std::string* device) { + if (device != nullptr) { + + } else { + + } + _impl_.device_.SetAllocated(device, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.device_.IsDefault()) { + _impl_.device_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.eager.RemoteTensorHandle.device) +} + +// string op_device = 4; +inline void RemoteTensorHandle::clear_op_device() { + _impl_.op_device_.ClearToEmpty(); +} +inline const std::string& RemoteTensorHandle::op_device() const { + // @@protoc_insertion_point(field_get:tensorflow.eager.RemoteTensorHandle.op_device) + return _internal_op_device(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void RemoteTensorHandle::set_op_device(ArgT0&& arg0, ArgT... args) { + + _impl_.op_device_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.eager.RemoteTensorHandle.op_device) +} +inline std::string* RemoteTensorHandle::mutable_op_device() { + std::string* _s = _internal_mutable_op_device(); + // @@protoc_insertion_point(field_mutable:tensorflow.eager.RemoteTensorHandle.op_device) + return _s; +} +inline const std::string& RemoteTensorHandle::_internal_op_device() const { + return _impl_.op_device_.Get(); +} +inline void RemoteTensorHandle::_internal_set_op_device(const std::string& value) { + + _impl_.op_device_.Set(value, GetArenaForAllocation()); +} +inline std::string* RemoteTensorHandle::_internal_mutable_op_device() { + + return _impl_.op_device_.Mutable(GetArenaForAllocation()); +} +inline std::string* RemoteTensorHandle::release_op_device() { + // @@protoc_insertion_point(field_release:tensorflow.eager.RemoteTensorHandle.op_device) + return _impl_.op_device_.Release(); +} +inline void RemoteTensorHandle::set_allocated_op_device(std::string* op_device) { + if (op_device != nullptr) { + + } else { + + } + _impl_.op_device_.SetAllocated(op_device, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.op_device_.IsDefault()) { + _impl_.op_device_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.eager.RemoteTensorHandle.op_device) +} + +// .tensorflow.DataType dtype = 5; +inline void RemoteTensorHandle::clear_dtype() { + _impl_.dtype_ = 0; +} +inline ::tensorflow::DataType RemoteTensorHandle::_internal_dtype() const { + return static_cast< ::tensorflow::DataType >(_impl_.dtype_); +} +inline ::tensorflow::DataType RemoteTensorHandle::dtype() const { + // @@protoc_insertion_point(field_get:tensorflow.eager.RemoteTensorHandle.dtype) + return _internal_dtype(); +} +inline void RemoteTensorHandle::_internal_set_dtype(::tensorflow::DataType value) { + + _impl_.dtype_ = value; +} +inline void RemoteTensorHandle::set_dtype(::tensorflow::DataType value) { + _internal_set_dtype(value); + // @@protoc_insertion_point(field_set:tensorflow.eager.RemoteTensorHandle.dtype) +} + +// repeated .tensorflow.eager.ResourceDtypeAndShape resource_dtypes_and_shapes = 6; +inline int RemoteTensorHandle::_internal_resource_dtypes_and_shapes_size() const { + return _impl_.resource_dtypes_and_shapes_.size(); +} +inline int RemoteTensorHandle::resource_dtypes_and_shapes_size() const { + return _internal_resource_dtypes_and_shapes_size(); +} +inline void RemoteTensorHandle::clear_resource_dtypes_and_shapes() { + _impl_.resource_dtypes_and_shapes_.Clear(); +} +inline ::tensorflow::eager::ResourceDtypeAndShape* RemoteTensorHandle::mutable_resource_dtypes_and_shapes(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.eager.RemoteTensorHandle.resource_dtypes_and_shapes) + return _impl_.resource_dtypes_and_shapes_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::eager::ResourceDtypeAndShape >* +RemoteTensorHandle::mutable_resource_dtypes_and_shapes() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.eager.RemoteTensorHandle.resource_dtypes_and_shapes) + return &_impl_.resource_dtypes_and_shapes_; +} +inline const ::tensorflow::eager::ResourceDtypeAndShape& RemoteTensorHandle::_internal_resource_dtypes_and_shapes(int index) const { + return _impl_.resource_dtypes_and_shapes_.Get(index); +} +inline const ::tensorflow::eager::ResourceDtypeAndShape& RemoteTensorHandle::resource_dtypes_and_shapes(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.eager.RemoteTensorHandle.resource_dtypes_and_shapes) + return _internal_resource_dtypes_and_shapes(index); +} +inline ::tensorflow::eager::ResourceDtypeAndShape* RemoteTensorHandle::_internal_add_resource_dtypes_and_shapes() { + return _impl_.resource_dtypes_and_shapes_.Add(); +} +inline ::tensorflow::eager::ResourceDtypeAndShape* RemoteTensorHandle::add_resource_dtypes_and_shapes() { + ::tensorflow::eager::ResourceDtypeAndShape* _add = _internal_add_resource_dtypes_and_shapes(); + // @@protoc_insertion_point(field_add:tensorflow.eager.RemoteTensorHandle.resource_dtypes_and_shapes) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::eager::ResourceDtypeAndShape >& +RemoteTensorHandle::resource_dtypes_and_shapes() const { + // @@protoc_insertion_point(field_list:tensorflow.eager.RemoteTensorHandle.resource_dtypes_and_shapes) + return _impl_.resource_dtypes_and_shapes_; +} + +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ +// ------------------------------------------------------------------- + + +// @@protoc_insertion_point(namespace_scope) + +} // namespace eager +} // namespace tensorflow + +// @@protoc_insertion_point(global_scope) + +#include +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprotobuf_2fremote_5ftensor_5fhandle_2eproto diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/remote_tensor_handle.proto b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/remote_tensor_handle.proto new file mode 100644 index 0000000000000000000000000000000000000000..904d6a3b209ad1dabef2b8346657d33624ab0a0c --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/remote_tensor_handle.proto @@ -0,0 +1,34 @@ +syntax = "proto3"; + +package tensorflow.eager; + +import "tensorflow/core/framework/tensor_shape.proto"; +import "tensorflow/core/framework/types.proto"; + +option cc_enable_arenas = true; +option java_outer_classname = "RemoteTensorHandleProtos"; +option java_multiple_files = true; +option java_package = "org.tensorflow.framework"; +option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/protobuf/for_core_protos_go_proto"; + +message ResourceDtypeAndShape { + DataType dtype = 1; + TensorShapeProto shape = 2; +} + +message RemoteTensorHandle { + // The ID of the operation that produced this tensor. + int64 op_id = 1; + // The index into the outputs of the operation that produced this tensor. + int32 output_num = 2; + // Device where the tensor is located. Cannot be empty. + // For multi-device functions, it's the default device passed to placer. + string device = 3; + // Device of the operation producing this tensor. Can be empty if the + // operation producing this tensor is a multi-device function. + string op_device = 4; + // Tensor type. + DataType dtype = 5; + // Optional data types and shapes of a remote resource variable. + repeated ResourceDtypeAndShape resource_dtypes_and_shapes = 6; +} diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/replay_log.pb.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/replay_log.pb.h new file mode 100644 index 0000000000000000000000000000000000000000..9a8f23e3e7b4d2c9ed5d044d7bb081b122092abe --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/replay_log.pb.h @@ -0,0 +1,2499 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/replay_log.proto + +#ifndef GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprotobuf_2freplay_5flog_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprotobuf_2freplay_5flog_2eproto + +#include +#include + +#include +#if PROTOBUF_VERSION < 3021000 +#error This file was generated by a newer version of protoc which is +#error incompatible with your Protocol Buffer headers. Please update +#error your headers. +#endif +#if 3021009 < PROTOBUF_MIN_PROTOC_VERSION +#error This file was generated by an older version of protoc which is +#error incompatible with your Protocol Buffer headers. Please +#error regenerate this file with a newer version of protoc. +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include // IWYU pragma: export +#include // IWYU pragma: export +#include +#include "tensorflow/core/protobuf/master.pb.h" +// @@protoc_insertion_point(includes) +#include +#define PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2fprotobuf_2freplay_5flog_2eproto +PROTOBUF_NAMESPACE_OPEN +namespace internal { +class AnyMetadata; +} // namespace internal +PROTOBUF_NAMESPACE_CLOSE + +// Internal implementation detail -- do not use these members. +struct TableStruct_tensorflow_2fcore_2fprotobuf_2freplay_5flog_2eproto { + static const uint32_t offsets[]; +}; +extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_tensorflow_2fcore_2fprotobuf_2freplay_5flog_2eproto; +namespace tensorflow { +class NewReplaySession; +struct NewReplaySessionDefaultTypeInternal; +extern NewReplaySessionDefaultTypeInternal _NewReplaySession_default_instance_; +class ReplayOp; +struct ReplayOpDefaultTypeInternal; +extern ReplayOpDefaultTypeInternal _ReplayOp_default_instance_; +} // namespace tensorflow +PROTOBUF_NAMESPACE_OPEN +template<> ::tensorflow::NewReplaySession* Arena::CreateMaybeMessage<::tensorflow::NewReplaySession>(Arena*); +template<> ::tensorflow::ReplayOp* Arena::CreateMaybeMessage<::tensorflow::ReplayOp>(Arena*); +PROTOBUF_NAMESPACE_CLOSE +namespace tensorflow { + +// =================================================================== + +class NewReplaySession final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.NewReplaySession) */ { + public: + inline NewReplaySession() : NewReplaySession(nullptr) {} + ~NewReplaySession() override; + explicit PROTOBUF_CONSTEXPR NewReplaySession(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + NewReplaySession(const NewReplaySession& from); + NewReplaySession(NewReplaySession&& from) noexcept + : NewReplaySession() { + *this = ::std::move(from); + } + + inline NewReplaySession& operator=(const NewReplaySession& from) { + CopyFrom(from); + return *this; + } + inline NewReplaySession& operator=(NewReplaySession&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const NewReplaySession& default_instance() { + return *internal_default_instance(); + } + static inline const NewReplaySession* internal_default_instance() { + return reinterpret_cast( + &_NewReplaySession_default_instance_); + } + static constexpr int kIndexInFileMessages = + 0; + + friend void swap(NewReplaySession& a, NewReplaySession& b) { + a.Swap(&b); + } + inline void Swap(NewReplaySession* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(NewReplaySession* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + NewReplaySession* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const NewReplaySession& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const NewReplaySession& from) { + NewReplaySession::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(NewReplaySession* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.NewReplaySession"; + } + protected: + explicit NewReplaySession(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kSessionHandleFieldNumber = 2, + kDevicesFieldNumber = 1, + }; + // string session_handle = 2; + void clear_session_handle(); + const std::string& session_handle() const; + template + void set_session_handle(ArgT0&& arg0, ArgT... args); + std::string* mutable_session_handle(); + PROTOBUF_NODISCARD std::string* release_session_handle(); + void set_allocated_session_handle(std::string* session_handle); + private: + const std::string& _internal_session_handle() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_session_handle(const std::string& value); + std::string* _internal_mutable_session_handle(); + public: + + // .tensorflow.ListDevicesResponse devices = 1; + bool has_devices() const; + private: + bool _internal_has_devices() const; + public: + void clear_devices(); + const ::tensorflow::ListDevicesResponse& devices() const; + PROTOBUF_NODISCARD ::tensorflow::ListDevicesResponse* release_devices(); + ::tensorflow::ListDevicesResponse* mutable_devices(); + void set_allocated_devices(::tensorflow::ListDevicesResponse* devices); + private: + const ::tensorflow::ListDevicesResponse& _internal_devices() const; + ::tensorflow::ListDevicesResponse* _internal_mutable_devices(); + public: + void unsafe_arena_set_allocated_devices( + ::tensorflow::ListDevicesResponse* devices); + ::tensorflow::ListDevicesResponse* unsafe_arena_release_devices(); + + // @@protoc_insertion_point(class_scope:tensorflow.NewReplaySession) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr session_handle_; + ::tensorflow::ListDevicesResponse* devices_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2freplay_5flog_2eproto; +}; +// ------------------------------------------------------------------- + +class ReplayOp final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.ReplayOp) */ { + public: + inline ReplayOp() : ReplayOp(nullptr) {} + ~ReplayOp() override; + explicit PROTOBUF_CONSTEXPR ReplayOp(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + ReplayOp(const ReplayOp& from); + ReplayOp(ReplayOp&& from) noexcept + : ReplayOp() { + *this = ::std::move(from); + } + + inline ReplayOp& operator=(const ReplayOp& from) { + CopyFrom(from); + return *this; + } + inline ReplayOp& operator=(ReplayOp&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const ReplayOp& default_instance() { + return *internal_default_instance(); + } + enum OpCase { + kCreateSession = 1, + kExtendSession = 2, + kPartialRunSetup = 3, + kRunStep = 4, + kCloseSession = 5, + kListDevices = 6, + kResetRequest = 7, + kMakeCallable = 8, + kRunCallable = 9, + kReleaseCallable = 10, + kNewReplaySession = 11, + OP_NOT_SET = 0, + }; + + enum ResponseCase { + kCreateSessionResponse = 21, + kExtendSessionResponse = 22, + kPartialRunSetupResponse = 23, + kRunStepResponse = 24, + kCloseSessionResponse = 25, + kListDevicesResponse = 26, + kResetRequestResponse = 27, + kMakeCallableResponse = 28, + kRunCallableResponse = 29, + kReleaseCallableResponse = 30, + RESPONSE_NOT_SET = 0, + }; + + static inline const ReplayOp* internal_default_instance() { + return reinterpret_cast( + &_ReplayOp_default_instance_); + } + static constexpr int kIndexInFileMessages = + 1; + + friend void swap(ReplayOp& a, ReplayOp& b) { + a.Swap(&b); + } + inline void Swap(ReplayOp* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(ReplayOp* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + ReplayOp* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const ReplayOp& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const ReplayOp& from) { + ReplayOp::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(ReplayOp* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.ReplayOp"; + } + protected: + explicit ReplayOp(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kStartTimeUsFieldNumber = 31, + kEndTimeUsFieldNumber = 32, + kCreateSessionFieldNumber = 1, + kExtendSessionFieldNumber = 2, + kPartialRunSetupFieldNumber = 3, + kRunStepFieldNumber = 4, + kCloseSessionFieldNumber = 5, + kListDevicesFieldNumber = 6, + kResetRequestFieldNumber = 7, + kMakeCallableFieldNumber = 8, + kRunCallableFieldNumber = 9, + kReleaseCallableFieldNumber = 10, + kNewReplaySessionFieldNumber = 11, + kCreateSessionResponseFieldNumber = 21, + kExtendSessionResponseFieldNumber = 22, + kPartialRunSetupResponseFieldNumber = 23, + kRunStepResponseFieldNumber = 24, + kCloseSessionResponseFieldNumber = 25, + kListDevicesResponseFieldNumber = 26, + kResetRequestResponseFieldNumber = 27, + kMakeCallableResponseFieldNumber = 28, + kRunCallableResponseFieldNumber = 29, + kReleaseCallableResponseFieldNumber = 30, + }; + // double start_time_us = 31; + void clear_start_time_us(); + double start_time_us() const; + void set_start_time_us(double value); + private: + double _internal_start_time_us() const; + void _internal_set_start_time_us(double value); + public: + + // double end_time_us = 32; + void clear_end_time_us(); + double end_time_us() const; + void set_end_time_us(double value); + private: + double _internal_end_time_us() const; + void _internal_set_end_time_us(double value); + public: + + // .tensorflow.CreateSessionRequest create_session = 1; + bool has_create_session() const; + private: + bool _internal_has_create_session() const; + public: + void clear_create_session(); + const ::tensorflow::CreateSessionRequest& create_session() const; + PROTOBUF_NODISCARD ::tensorflow::CreateSessionRequest* release_create_session(); + ::tensorflow::CreateSessionRequest* mutable_create_session(); + void set_allocated_create_session(::tensorflow::CreateSessionRequest* create_session); + private: + const ::tensorflow::CreateSessionRequest& _internal_create_session() const; + ::tensorflow::CreateSessionRequest* _internal_mutable_create_session(); + public: + void unsafe_arena_set_allocated_create_session( + ::tensorflow::CreateSessionRequest* create_session); + ::tensorflow::CreateSessionRequest* unsafe_arena_release_create_session(); + + // .tensorflow.ExtendSessionRequest extend_session = 2; + bool has_extend_session() const; + private: + bool _internal_has_extend_session() const; + public: + void clear_extend_session(); + const ::tensorflow::ExtendSessionRequest& extend_session() const; + PROTOBUF_NODISCARD ::tensorflow::ExtendSessionRequest* release_extend_session(); + ::tensorflow::ExtendSessionRequest* mutable_extend_session(); + void set_allocated_extend_session(::tensorflow::ExtendSessionRequest* extend_session); + private: + const ::tensorflow::ExtendSessionRequest& _internal_extend_session() const; + ::tensorflow::ExtendSessionRequest* _internal_mutable_extend_session(); + public: + void unsafe_arena_set_allocated_extend_session( + ::tensorflow::ExtendSessionRequest* extend_session); + ::tensorflow::ExtendSessionRequest* unsafe_arena_release_extend_session(); + + // .tensorflow.PartialRunSetupRequest partial_run_setup = 3; + bool has_partial_run_setup() const; + private: + bool _internal_has_partial_run_setup() const; + public: + void clear_partial_run_setup(); + const ::tensorflow::PartialRunSetupRequest& partial_run_setup() const; + PROTOBUF_NODISCARD ::tensorflow::PartialRunSetupRequest* release_partial_run_setup(); + ::tensorflow::PartialRunSetupRequest* mutable_partial_run_setup(); + void set_allocated_partial_run_setup(::tensorflow::PartialRunSetupRequest* partial_run_setup); + private: + const ::tensorflow::PartialRunSetupRequest& _internal_partial_run_setup() const; + ::tensorflow::PartialRunSetupRequest* _internal_mutable_partial_run_setup(); + public: + void unsafe_arena_set_allocated_partial_run_setup( + ::tensorflow::PartialRunSetupRequest* partial_run_setup); + ::tensorflow::PartialRunSetupRequest* unsafe_arena_release_partial_run_setup(); + + // .tensorflow.RunStepRequest run_step = 4; + bool has_run_step() const; + private: + bool _internal_has_run_step() const; + public: + void clear_run_step(); + const ::tensorflow::RunStepRequest& run_step() const; + PROTOBUF_NODISCARD ::tensorflow::RunStepRequest* release_run_step(); + ::tensorflow::RunStepRequest* mutable_run_step(); + void set_allocated_run_step(::tensorflow::RunStepRequest* run_step); + private: + const ::tensorflow::RunStepRequest& _internal_run_step() const; + ::tensorflow::RunStepRequest* _internal_mutable_run_step(); + public: + void unsafe_arena_set_allocated_run_step( + ::tensorflow::RunStepRequest* run_step); + ::tensorflow::RunStepRequest* unsafe_arena_release_run_step(); + + // .tensorflow.CloseSessionRequest close_session = 5; + bool has_close_session() const; + private: + bool _internal_has_close_session() const; + public: + void clear_close_session(); + const ::tensorflow::CloseSessionRequest& close_session() const; + PROTOBUF_NODISCARD ::tensorflow::CloseSessionRequest* release_close_session(); + ::tensorflow::CloseSessionRequest* mutable_close_session(); + void set_allocated_close_session(::tensorflow::CloseSessionRequest* close_session); + private: + const ::tensorflow::CloseSessionRequest& _internal_close_session() const; + ::tensorflow::CloseSessionRequest* _internal_mutable_close_session(); + public: + void unsafe_arena_set_allocated_close_session( + ::tensorflow::CloseSessionRequest* close_session); + ::tensorflow::CloseSessionRequest* unsafe_arena_release_close_session(); + + // .tensorflow.ListDevicesRequest list_devices = 6; + bool has_list_devices() const; + private: + bool _internal_has_list_devices() const; + public: + void clear_list_devices(); + const ::tensorflow::ListDevicesRequest& list_devices() const; + PROTOBUF_NODISCARD ::tensorflow::ListDevicesRequest* release_list_devices(); + ::tensorflow::ListDevicesRequest* mutable_list_devices(); + void set_allocated_list_devices(::tensorflow::ListDevicesRequest* list_devices); + private: + const ::tensorflow::ListDevicesRequest& _internal_list_devices() const; + ::tensorflow::ListDevicesRequest* _internal_mutable_list_devices(); + public: + void unsafe_arena_set_allocated_list_devices( + ::tensorflow::ListDevicesRequest* list_devices); + ::tensorflow::ListDevicesRequest* unsafe_arena_release_list_devices(); + + // .tensorflow.ResetRequest reset_request = 7; + bool has_reset_request() const; + private: + bool _internal_has_reset_request() const; + public: + void clear_reset_request(); + const ::tensorflow::ResetRequest& reset_request() const; + PROTOBUF_NODISCARD ::tensorflow::ResetRequest* release_reset_request(); + ::tensorflow::ResetRequest* mutable_reset_request(); + void set_allocated_reset_request(::tensorflow::ResetRequest* reset_request); + private: + const ::tensorflow::ResetRequest& _internal_reset_request() const; + ::tensorflow::ResetRequest* _internal_mutable_reset_request(); + public: + void unsafe_arena_set_allocated_reset_request( + ::tensorflow::ResetRequest* reset_request); + ::tensorflow::ResetRequest* unsafe_arena_release_reset_request(); + + // .tensorflow.MakeCallableRequest make_callable = 8; + bool has_make_callable() const; + private: + bool _internal_has_make_callable() const; + public: + void clear_make_callable(); + const ::tensorflow::MakeCallableRequest& make_callable() const; + PROTOBUF_NODISCARD ::tensorflow::MakeCallableRequest* release_make_callable(); + ::tensorflow::MakeCallableRequest* mutable_make_callable(); + void set_allocated_make_callable(::tensorflow::MakeCallableRequest* make_callable); + private: + const ::tensorflow::MakeCallableRequest& _internal_make_callable() const; + ::tensorflow::MakeCallableRequest* _internal_mutable_make_callable(); + public: + void unsafe_arena_set_allocated_make_callable( + ::tensorflow::MakeCallableRequest* make_callable); + ::tensorflow::MakeCallableRequest* unsafe_arena_release_make_callable(); + + // .tensorflow.RunCallableRequest run_callable = 9; + bool has_run_callable() const; + private: + bool _internal_has_run_callable() const; + public: + void clear_run_callable(); + const ::tensorflow::RunCallableRequest& run_callable() const; + PROTOBUF_NODISCARD ::tensorflow::RunCallableRequest* release_run_callable(); + ::tensorflow::RunCallableRequest* mutable_run_callable(); + void set_allocated_run_callable(::tensorflow::RunCallableRequest* run_callable); + private: + const ::tensorflow::RunCallableRequest& _internal_run_callable() const; + ::tensorflow::RunCallableRequest* _internal_mutable_run_callable(); + public: + void unsafe_arena_set_allocated_run_callable( + ::tensorflow::RunCallableRequest* run_callable); + ::tensorflow::RunCallableRequest* unsafe_arena_release_run_callable(); + + // .tensorflow.ReleaseCallableRequest release_callable = 10; + bool has_release_callable() const; + private: + bool _internal_has_release_callable() const; + public: + void clear_release_callable(); + const ::tensorflow::ReleaseCallableRequest& release_callable() const; + PROTOBUF_NODISCARD ::tensorflow::ReleaseCallableRequest* release_release_callable(); + ::tensorflow::ReleaseCallableRequest* mutable_release_callable(); + void set_allocated_release_callable(::tensorflow::ReleaseCallableRequest* release_callable); + private: + const ::tensorflow::ReleaseCallableRequest& _internal_release_callable() const; + ::tensorflow::ReleaseCallableRequest* _internal_mutable_release_callable(); + public: + void unsafe_arena_set_allocated_release_callable( + ::tensorflow::ReleaseCallableRequest* release_callable); + ::tensorflow::ReleaseCallableRequest* unsafe_arena_release_release_callable(); + + // .tensorflow.NewReplaySession new_replay_session = 11; + bool has_new_replay_session() const; + private: + bool _internal_has_new_replay_session() const; + public: + void clear_new_replay_session(); + const ::tensorflow::NewReplaySession& new_replay_session() const; + PROTOBUF_NODISCARD ::tensorflow::NewReplaySession* release_new_replay_session(); + ::tensorflow::NewReplaySession* mutable_new_replay_session(); + void set_allocated_new_replay_session(::tensorflow::NewReplaySession* new_replay_session); + private: + const ::tensorflow::NewReplaySession& _internal_new_replay_session() const; + ::tensorflow::NewReplaySession* _internal_mutable_new_replay_session(); + public: + void unsafe_arena_set_allocated_new_replay_session( + ::tensorflow::NewReplaySession* new_replay_session); + ::tensorflow::NewReplaySession* unsafe_arena_release_new_replay_session(); + + // .tensorflow.CreateSessionResponse create_session_response = 21; + bool has_create_session_response() const; + private: + bool _internal_has_create_session_response() const; + public: + void clear_create_session_response(); + const ::tensorflow::CreateSessionResponse& create_session_response() const; + PROTOBUF_NODISCARD ::tensorflow::CreateSessionResponse* release_create_session_response(); + ::tensorflow::CreateSessionResponse* mutable_create_session_response(); + void set_allocated_create_session_response(::tensorflow::CreateSessionResponse* create_session_response); + private: + const ::tensorflow::CreateSessionResponse& _internal_create_session_response() const; + ::tensorflow::CreateSessionResponse* _internal_mutable_create_session_response(); + public: + void unsafe_arena_set_allocated_create_session_response( + ::tensorflow::CreateSessionResponse* create_session_response); + ::tensorflow::CreateSessionResponse* unsafe_arena_release_create_session_response(); + + // .tensorflow.ExtendSessionResponse extend_session_response = 22; + bool has_extend_session_response() const; + private: + bool _internal_has_extend_session_response() const; + public: + void clear_extend_session_response(); + const ::tensorflow::ExtendSessionResponse& extend_session_response() const; + PROTOBUF_NODISCARD ::tensorflow::ExtendSessionResponse* release_extend_session_response(); + ::tensorflow::ExtendSessionResponse* mutable_extend_session_response(); + void set_allocated_extend_session_response(::tensorflow::ExtendSessionResponse* extend_session_response); + private: + const ::tensorflow::ExtendSessionResponse& _internal_extend_session_response() const; + ::tensorflow::ExtendSessionResponse* _internal_mutable_extend_session_response(); + public: + void unsafe_arena_set_allocated_extend_session_response( + ::tensorflow::ExtendSessionResponse* extend_session_response); + ::tensorflow::ExtendSessionResponse* unsafe_arena_release_extend_session_response(); + + // .tensorflow.PartialRunSetupResponse partial_run_setup_response = 23; + bool has_partial_run_setup_response() const; + private: + bool _internal_has_partial_run_setup_response() const; + public: + void clear_partial_run_setup_response(); + const ::tensorflow::PartialRunSetupResponse& partial_run_setup_response() const; + PROTOBUF_NODISCARD ::tensorflow::PartialRunSetupResponse* release_partial_run_setup_response(); + ::tensorflow::PartialRunSetupResponse* mutable_partial_run_setup_response(); + void set_allocated_partial_run_setup_response(::tensorflow::PartialRunSetupResponse* partial_run_setup_response); + private: + const ::tensorflow::PartialRunSetupResponse& _internal_partial_run_setup_response() const; + ::tensorflow::PartialRunSetupResponse* _internal_mutable_partial_run_setup_response(); + public: + void unsafe_arena_set_allocated_partial_run_setup_response( + ::tensorflow::PartialRunSetupResponse* partial_run_setup_response); + ::tensorflow::PartialRunSetupResponse* unsafe_arena_release_partial_run_setup_response(); + + // .tensorflow.RunStepResponse run_step_response = 24; + bool has_run_step_response() const; + private: + bool _internal_has_run_step_response() const; + public: + void clear_run_step_response(); + const ::tensorflow::RunStepResponse& run_step_response() const; + PROTOBUF_NODISCARD ::tensorflow::RunStepResponse* release_run_step_response(); + ::tensorflow::RunStepResponse* mutable_run_step_response(); + void set_allocated_run_step_response(::tensorflow::RunStepResponse* run_step_response); + private: + const ::tensorflow::RunStepResponse& _internal_run_step_response() const; + ::tensorflow::RunStepResponse* _internal_mutable_run_step_response(); + public: + void unsafe_arena_set_allocated_run_step_response( + ::tensorflow::RunStepResponse* run_step_response); + ::tensorflow::RunStepResponse* unsafe_arena_release_run_step_response(); + + // .tensorflow.CloseSessionResponse close_session_response = 25; + bool has_close_session_response() const; + private: + bool _internal_has_close_session_response() const; + public: + void clear_close_session_response(); + const ::tensorflow::CloseSessionResponse& close_session_response() const; + PROTOBUF_NODISCARD ::tensorflow::CloseSessionResponse* release_close_session_response(); + ::tensorflow::CloseSessionResponse* mutable_close_session_response(); + void set_allocated_close_session_response(::tensorflow::CloseSessionResponse* close_session_response); + private: + const ::tensorflow::CloseSessionResponse& _internal_close_session_response() const; + ::tensorflow::CloseSessionResponse* _internal_mutable_close_session_response(); + public: + void unsafe_arena_set_allocated_close_session_response( + ::tensorflow::CloseSessionResponse* close_session_response); + ::tensorflow::CloseSessionResponse* unsafe_arena_release_close_session_response(); + + // .tensorflow.ListDevicesResponse list_devices_response = 26; + bool has_list_devices_response() const; + private: + bool _internal_has_list_devices_response() const; + public: + void clear_list_devices_response(); + const ::tensorflow::ListDevicesResponse& list_devices_response() const; + PROTOBUF_NODISCARD ::tensorflow::ListDevicesResponse* release_list_devices_response(); + ::tensorflow::ListDevicesResponse* mutable_list_devices_response(); + void set_allocated_list_devices_response(::tensorflow::ListDevicesResponse* list_devices_response); + private: + const ::tensorflow::ListDevicesResponse& _internal_list_devices_response() const; + ::tensorflow::ListDevicesResponse* _internal_mutable_list_devices_response(); + public: + void unsafe_arena_set_allocated_list_devices_response( + ::tensorflow::ListDevicesResponse* list_devices_response); + ::tensorflow::ListDevicesResponse* unsafe_arena_release_list_devices_response(); + + // .tensorflow.ResetResponse reset_request_response = 27; + bool has_reset_request_response() const; + private: + bool _internal_has_reset_request_response() const; + public: + void clear_reset_request_response(); + const ::tensorflow::ResetResponse& reset_request_response() const; + PROTOBUF_NODISCARD ::tensorflow::ResetResponse* release_reset_request_response(); + ::tensorflow::ResetResponse* mutable_reset_request_response(); + void set_allocated_reset_request_response(::tensorflow::ResetResponse* reset_request_response); + private: + const ::tensorflow::ResetResponse& _internal_reset_request_response() const; + ::tensorflow::ResetResponse* _internal_mutable_reset_request_response(); + public: + void unsafe_arena_set_allocated_reset_request_response( + ::tensorflow::ResetResponse* reset_request_response); + ::tensorflow::ResetResponse* unsafe_arena_release_reset_request_response(); + + // .tensorflow.MakeCallableResponse make_callable_response = 28; + bool has_make_callable_response() const; + private: + bool _internal_has_make_callable_response() const; + public: + void clear_make_callable_response(); + const ::tensorflow::MakeCallableResponse& make_callable_response() const; + PROTOBUF_NODISCARD ::tensorflow::MakeCallableResponse* release_make_callable_response(); + ::tensorflow::MakeCallableResponse* mutable_make_callable_response(); + void set_allocated_make_callable_response(::tensorflow::MakeCallableResponse* make_callable_response); + private: + const ::tensorflow::MakeCallableResponse& _internal_make_callable_response() const; + ::tensorflow::MakeCallableResponse* _internal_mutable_make_callable_response(); + public: + void unsafe_arena_set_allocated_make_callable_response( + ::tensorflow::MakeCallableResponse* make_callable_response); + ::tensorflow::MakeCallableResponse* unsafe_arena_release_make_callable_response(); + + // .tensorflow.RunCallableResponse run_callable_response = 29; + bool has_run_callable_response() const; + private: + bool _internal_has_run_callable_response() const; + public: + void clear_run_callable_response(); + const ::tensorflow::RunCallableResponse& run_callable_response() const; + PROTOBUF_NODISCARD ::tensorflow::RunCallableResponse* release_run_callable_response(); + ::tensorflow::RunCallableResponse* mutable_run_callable_response(); + void set_allocated_run_callable_response(::tensorflow::RunCallableResponse* run_callable_response); + private: + const ::tensorflow::RunCallableResponse& _internal_run_callable_response() const; + ::tensorflow::RunCallableResponse* _internal_mutable_run_callable_response(); + public: + void unsafe_arena_set_allocated_run_callable_response( + ::tensorflow::RunCallableResponse* run_callable_response); + ::tensorflow::RunCallableResponse* unsafe_arena_release_run_callable_response(); + + // .tensorflow.ReleaseCallableResponse release_callable_response = 30; + bool has_release_callable_response() const; + private: + bool _internal_has_release_callable_response() const; + public: + void clear_release_callable_response(); + const ::tensorflow::ReleaseCallableResponse& release_callable_response() const; + PROTOBUF_NODISCARD ::tensorflow::ReleaseCallableResponse* release_release_callable_response(); + ::tensorflow::ReleaseCallableResponse* mutable_release_callable_response(); + void set_allocated_release_callable_response(::tensorflow::ReleaseCallableResponse* release_callable_response); + private: + const ::tensorflow::ReleaseCallableResponse& _internal_release_callable_response() const; + ::tensorflow::ReleaseCallableResponse* _internal_mutable_release_callable_response(); + public: + void unsafe_arena_set_allocated_release_callable_response( + ::tensorflow::ReleaseCallableResponse* release_callable_response); + ::tensorflow::ReleaseCallableResponse* unsafe_arena_release_release_callable_response(); + + void clear_op(); + OpCase op_case() const; + void clear_response(); + ResponseCase response_case() const; + // @@protoc_insertion_point(class_scope:tensorflow.ReplayOp) + private: + class _Internal; + void set_has_create_session(); + void set_has_extend_session(); + void set_has_partial_run_setup(); + void set_has_run_step(); + void set_has_close_session(); + void set_has_list_devices(); + void set_has_reset_request(); + void set_has_make_callable(); + void set_has_run_callable(); + void set_has_release_callable(); + void set_has_new_replay_session(); + void set_has_create_session_response(); + void set_has_extend_session_response(); + void set_has_partial_run_setup_response(); + void set_has_run_step_response(); + void set_has_close_session_response(); + void set_has_list_devices_response(); + void set_has_reset_request_response(); + void set_has_make_callable_response(); + void set_has_run_callable_response(); + void set_has_release_callable_response(); + + inline bool has_op() const; + inline void clear_has_op(); + + inline bool has_response() const; + inline void clear_has_response(); + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + double start_time_us_; + double end_time_us_; + union OpUnion { + constexpr OpUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + ::tensorflow::CreateSessionRequest* create_session_; + ::tensorflow::ExtendSessionRequest* extend_session_; + ::tensorflow::PartialRunSetupRequest* partial_run_setup_; + ::tensorflow::RunStepRequest* run_step_; + ::tensorflow::CloseSessionRequest* close_session_; + ::tensorflow::ListDevicesRequest* list_devices_; + ::tensorflow::ResetRequest* reset_request_; + ::tensorflow::MakeCallableRequest* make_callable_; + ::tensorflow::RunCallableRequest* run_callable_; + ::tensorflow::ReleaseCallableRequest* release_callable_; + ::tensorflow::NewReplaySession* new_replay_session_; + } op_; + union ResponseUnion { + constexpr ResponseUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + ::tensorflow::CreateSessionResponse* create_session_response_; + ::tensorflow::ExtendSessionResponse* extend_session_response_; + ::tensorflow::PartialRunSetupResponse* partial_run_setup_response_; + ::tensorflow::RunStepResponse* run_step_response_; + ::tensorflow::CloseSessionResponse* close_session_response_; + ::tensorflow::ListDevicesResponse* list_devices_response_; + ::tensorflow::ResetResponse* reset_request_response_; + ::tensorflow::MakeCallableResponse* make_callable_response_; + ::tensorflow::RunCallableResponse* run_callable_response_; + ::tensorflow::ReleaseCallableResponse* release_callable_response_; + } response_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + uint32_t _oneof_case_[2]; + + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2freplay_5flog_2eproto; +}; +// =================================================================== + + +// =================================================================== + +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// NewReplaySession + +// .tensorflow.ListDevicesResponse devices = 1; +inline bool NewReplaySession::_internal_has_devices() const { + return this != internal_default_instance() && _impl_.devices_ != nullptr; +} +inline bool NewReplaySession::has_devices() const { + return _internal_has_devices(); +} +inline const ::tensorflow::ListDevicesResponse& NewReplaySession::_internal_devices() const { + const ::tensorflow::ListDevicesResponse* p = _impl_.devices_; + return p != nullptr ? *p : reinterpret_cast( + ::tensorflow::_ListDevicesResponse_default_instance_); +} +inline const ::tensorflow::ListDevicesResponse& NewReplaySession::devices() const { + // @@protoc_insertion_point(field_get:tensorflow.NewReplaySession.devices) + return _internal_devices(); +} +inline void NewReplaySession::unsafe_arena_set_allocated_devices( + ::tensorflow::ListDevicesResponse* devices) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.devices_); + } + _impl_.devices_ = devices; + if (devices) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.NewReplaySession.devices) +} +inline ::tensorflow::ListDevicesResponse* NewReplaySession::release_devices() { + + ::tensorflow::ListDevicesResponse* temp = _impl_.devices_; + _impl_.devices_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tensorflow::ListDevicesResponse* NewReplaySession::unsafe_arena_release_devices() { + // @@protoc_insertion_point(field_release:tensorflow.NewReplaySession.devices) + + ::tensorflow::ListDevicesResponse* temp = _impl_.devices_; + _impl_.devices_ = nullptr; + return temp; +} +inline ::tensorflow::ListDevicesResponse* NewReplaySession::_internal_mutable_devices() { + + if (_impl_.devices_ == nullptr) { + auto* p = CreateMaybeMessage<::tensorflow::ListDevicesResponse>(GetArenaForAllocation()); + _impl_.devices_ = p; + } + return _impl_.devices_; +} +inline ::tensorflow::ListDevicesResponse* NewReplaySession::mutable_devices() { + ::tensorflow::ListDevicesResponse* _msg = _internal_mutable_devices(); + // @@protoc_insertion_point(field_mutable:tensorflow.NewReplaySession.devices) + return _msg; +} +inline void NewReplaySession::set_allocated_devices(::tensorflow::ListDevicesResponse* devices) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.devices_); + } + if (devices) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( + reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(devices)); + if (message_arena != submessage_arena) { + devices = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, devices, submessage_arena); + } + + } else { + + } + _impl_.devices_ = devices; + // @@protoc_insertion_point(field_set_allocated:tensorflow.NewReplaySession.devices) +} + +// string session_handle = 2; +inline void NewReplaySession::clear_session_handle() { + _impl_.session_handle_.ClearToEmpty(); +} +inline const std::string& NewReplaySession::session_handle() const { + // @@protoc_insertion_point(field_get:tensorflow.NewReplaySession.session_handle) + return _internal_session_handle(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void NewReplaySession::set_session_handle(ArgT0&& arg0, ArgT... args) { + + _impl_.session_handle_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.NewReplaySession.session_handle) +} +inline std::string* NewReplaySession::mutable_session_handle() { + std::string* _s = _internal_mutable_session_handle(); + // @@protoc_insertion_point(field_mutable:tensorflow.NewReplaySession.session_handle) + return _s; +} +inline const std::string& NewReplaySession::_internal_session_handle() const { + return _impl_.session_handle_.Get(); +} +inline void NewReplaySession::_internal_set_session_handle(const std::string& value) { + + _impl_.session_handle_.Set(value, GetArenaForAllocation()); +} +inline std::string* NewReplaySession::_internal_mutable_session_handle() { + + return _impl_.session_handle_.Mutable(GetArenaForAllocation()); +} +inline std::string* NewReplaySession::release_session_handle() { + // @@protoc_insertion_point(field_release:tensorflow.NewReplaySession.session_handle) + return _impl_.session_handle_.Release(); +} +inline void NewReplaySession::set_allocated_session_handle(std::string* session_handle) { + if (session_handle != nullptr) { + + } else { + + } + _impl_.session_handle_.SetAllocated(session_handle, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.session_handle_.IsDefault()) { + _impl_.session_handle_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.NewReplaySession.session_handle) +} + +// ------------------------------------------------------------------- + +// ReplayOp + +// double start_time_us = 31; +inline void ReplayOp::clear_start_time_us() { + _impl_.start_time_us_ = 0; +} +inline double ReplayOp::_internal_start_time_us() const { + return _impl_.start_time_us_; +} +inline double ReplayOp::start_time_us() const { + // @@protoc_insertion_point(field_get:tensorflow.ReplayOp.start_time_us) + return _internal_start_time_us(); +} +inline void ReplayOp::_internal_set_start_time_us(double value) { + + _impl_.start_time_us_ = value; +} +inline void ReplayOp::set_start_time_us(double value) { + _internal_set_start_time_us(value); + // @@protoc_insertion_point(field_set:tensorflow.ReplayOp.start_time_us) +} + +// double end_time_us = 32; +inline void ReplayOp::clear_end_time_us() { + _impl_.end_time_us_ = 0; +} +inline double ReplayOp::_internal_end_time_us() const { + return _impl_.end_time_us_; +} +inline double ReplayOp::end_time_us() const { + // @@protoc_insertion_point(field_get:tensorflow.ReplayOp.end_time_us) + return _internal_end_time_us(); +} +inline void ReplayOp::_internal_set_end_time_us(double value) { + + _impl_.end_time_us_ = value; +} +inline void ReplayOp::set_end_time_us(double value) { + _internal_set_end_time_us(value); + // @@protoc_insertion_point(field_set:tensorflow.ReplayOp.end_time_us) +} + +// .tensorflow.CreateSessionRequest create_session = 1; +inline bool ReplayOp::_internal_has_create_session() const { + return op_case() == kCreateSession; +} +inline bool ReplayOp::has_create_session() const { + return _internal_has_create_session(); +} +inline void ReplayOp::set_has_create_session() { + _impl_._oneof_case_[0] = kCreateSession; +} +inline ::tensorflow::CreateSessionRequest* ReplayOp::release_create_session() { + // @@protoc_insertion_point(field_release:tensorflow.ReplayOp.create_session) + if (_internal_has_create_session()) { + clear_has_op(); + ::tensorflow::CreateSessionRequest* temp = _impl_.op_.create_session_; + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + _impl_.op_.create_session_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::tensorflow::CreateSessionRequest& ReplayOp::_internal_create_session() const { + return _internal_has_create_session() + ? *_impl_.op_.create_session_ + : reinterpret_cast< ::tensorflow::CreateSessionRequest&>(::tensorflow::_CreateSessionRequest_default_instance_); +} +inline const ::tensorflow::CreateSessionRequest& ReplayOp::create_session() const { + // @@protoc_insertion_point(field_get:tensorflow.ReplayOp.create_session) + return _internal_create_session(); +} +inline ::tensorflow::CreateSessionRequest* ReplayOp::unsafe_arena_release_create_session() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.ReplayOp.create_session) + if (_internal_has_create_session()) { + clear_has_op(); + ::tensorflow::CreateSessionRequest* temp = _impl_.op_.create_session_; + _impl_.op_.create_session_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void ReplayOp::unsafe_arena_set_allocated_create_session(::tensorflow::CreateSessionRequest* create_session) { + clear_op(); + if (create_session) { + set_has_create_session(); + _impl_.op_.create_session_ = create_session; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.ReplayOp.create_session) +} +inline ::tensorflow::CreateSessionRequest* ReplayOp::_internal_mutable_create_session() { + if (!_internal_has_create_session()) { + clear_op(); + set_has_create_session(); + _impl_.op_.create_session_ = CreateMaybeMessage< ::tensorflow::CreateSessionRequest >(GetArenaForAllocation()); + } + return _impl_.op_.create_session_; +} +inline ::tensorflow::CreateSessionRequest* ReplayOp::mutable_create_session() { + ::tensorflow::CreateSessionRequest* _msg = _internal_mutable_create_session(); + // @@protoc_insertion_point(field_mutable:tensorflow.ReplayOp.create_session) + return _msg; +} + +// .tensorflow.ExtendSessionRequest extend_session = 2; +inline bool ReplayOp::_internal_has_extend_session() const { + return op_case() == kExtendSession; +} +inline bool ReplayOp::has_extend_session() const { + return _internal_has_extend_session(); +} +inline void ReplayOp::set_has_extend_session() { + _impl_._oneof_case_[0] = kExtendSession; +} +inline ::tensorflow::ExtendSessionRequest* ReplayOp::release_extend_session() { + // @@protoc_insertion_point(field_release:tensorflow.ReplayOp.extend_session) + if (_internal_has_extend_session()) { + clear_has_op(); + ::tensorflow::ExtendSessionRequest* temp = _impl_.op_.extend_session_; + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + _impl_.op_.extend_session_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::tensorflow::ExtendSessionRequest& ReplayOp::_internal_extend_session() const { + return _internal_has_extend_session() + ? *_impl_.op_.extend_session_ + : reinterpret_cast< ::tensorflow::ExtendSessionRequest&>(::tensorflow::_ExtendSessionRequest_default_instance_); +} +inline const ::tensorflow::ExtendSessionRequest& ReplayOp::extend_session() const { + // @@protoc_insertion_point(field_get:tensorflow.ReplayOp.extend_session) + return _internal_extend_session(); +} +inline ::tensorflow::ExtendSessionRequest* ReplayOp::unsafe_arena_release_extend_session() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.ReplayOp.extend_session) + if (_internal_has_extend_session()) { + clear_has_op(); + ::tensorflow::ExtendSessionRequest* temp = _impl_.op_.extend_session_; + _impl_.op_.extend_session_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void ReplayOp::unsafe_arena_set_allocated_extend_session(::tensorflow::ExtendSessionRequest* extend_session) { + clear_op(); + if (extend_session) { + set_has_extend_session(); + _impl_.op_.extend_session_ = extend_session; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.ReplayOp.extend_session) +} +inline ::tensorflow::ExtendSessionRequest* ReplayOp::_internal_mutable_extend_session() { + if (!_internal_has_extend_session()) { + clear_op(); + set_has_extend_session(); + _impl_.op_.extend_session_ = CreateMaybeMessage< ::tensorflow::ExtendSessionRequest >(GetArenaForAllocation()); + } + return _impl_.op_.extend_session_; +} +inline ::tensorflow::ExtendSessionRequest* ReplayOp::mutable_extend_session() { + ::tensorflow::ExtendSessionRequest* _msg = _internal_mutable_extend_session(); + // @@protoc_insertion_point(field_mutable:tensorflow.ReplayOp.extend_session) + return _msg; +} + +// .tensorflow.PartialRunSetupRequest partial_run_setup = 3; +inline bool ReplayOp::_internal_has_partial_run_setup() const { + return op_case() == kPartialRunSetup; +} +inline bool ReplayOp::has_partial_run_setup() const { + return _internal_has_partial_run_setup(); +} +inline void ReplayOp::set_has_partial_run_setup() { + _impl_._oneof_case_[0] = kPartialRunSetup; +} +inline ::tensorflow::PartialRunSetupRequest* ReplayOp::release_partial_run_setup() { + // @@protoc_insertion_point(field_release:tensorflow.ReplayOp.partial_run_setup) + if (_internal_has_partial_run_setup()) { + clear_has_op(); + ::tensorflow::PartialRunSetupRequest* temp = _impl_.op_.partial_run_setup_; + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + _impl_.op_.partial_run_setup_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::tensorflow::PartialRunSetupRequest& ReplayOp::_internal_partial_run_setup() const { + return _internal_has_partial_run_setup() + ? *_impl_.op_.partial_run_setup_ + : reinterpret_cast< ::tensorflow::PartialRunSetupRequest&>(::tensorflow::_PartialRunSetupRequest_default_instance_); +} +inline const ::tensorflow::PartialRunSetupRequest& ReplayOp::partial_run_setup() const { + // @@protoc_insertion_point(field_get:tensorflow.ReplayOp.partial_run_setup) + return _internal_partial_run_setup(); +} +inline ::tensorflow::PartialRunSetupRequest* ReplayOp::unsafe_arena_release_partial_run_setup() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.ReplayOp.partial_run_setup) + if (_internal_has_partial_run_setup()) { + clear_has_op(); + ::tensorflow::PartialRunSetupRequest* temp = _impl_.op_.partial_run_setup_; + _impl_.op_.partial_run_setup_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void ReplayOp::unsafe_arena_set_allocated_partial_run_setup(::tensorflow::PartialRunSetupRequest* partial_run_setup) { + clear_op(); + if (partial_run_setup) { + set_has_partial_run_setup(); + _impl_.op_.partial_run_setup_ = partial_run_setup; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.ReplayOp.partial_run_setup) +} +inline ::tensorflow::PartialRunSetupRequest* ReplayOp::_internal_mutable_partial_run_setup() { + if (!_internal_has_partial_run_setup()) { + clear_op(); + set_has_partial_run_setup(); + _impl_.op_.partial_run_setup_ = CreateMaybeMessage< ::tensorflow::PartialRunSetupRequest >(GetArenaForAllocation()); + } + return _impl_.op_.partial_run_setup_; +} +inline ::tensorflow::PartialRunSetupRequest* ReplayOp::mutable_partial_run_setup() { + ::tensorflow::PartialRunSetupRequest* _msg = _internal_mutable_partial_run_setup(); + // @@protoc_insertion_point(field_mutable:tensorflow.ReplayOp.partial_run_setup) + return _msg; +} + +// .tensorflow.RunStepRequest run_step = 4; +inline bool ReplayOp::_internal_has_run_step() const { + return op_case() == kRunStep; +} +inline bool ReplayOp::has_run_step() const { + return _internal_has_run_step(); +} +inline void ReplayOp::set_has_run_step() { + _impl_._oneof_case_[0] = kRunStep; +} +inline ::tensorflow::RunStepRequest* ReplayOp::release_run_step() { + // @@protoc_insertion_point(field_release:tensorflow.ReplayOp.run_step) + if (_internal_has_run_step()) { + clear_has_op(); + ::tensorflow::RunStepRequest* temp = _impl_.op_.run_step_; + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + _impl_.op_.run_step_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::tensorflow::RunStepRequest& ReplayOp::_internal_run_step() const { + return _internal_has_run_step() + ? *_impl_.op_.run_step_ + : reinterpret_cast< ::tensorflow::RunStepRequest&>(::tensorflow::_RunStepRequest_default_instance_); +} +inline const ::tensorflow::RunStepRequest& ReplayOp::run_step() const { + // @@protoc_insertion_point(field_get:tensorflow.ReplayOp.run_step) + return _internal_run_step(); +} +inline ::tensorflow::RunStepRequest* ReplayOp::unsafe_arena_release_run_step() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.ReplayOp.run_step) + if (_internal_has_run_step()) { + clear_has_op(); + ::tensorflow::RunStepRequest* temp = _impl_.op_.run_step_; + _impl_.op_.run_step_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void ReplayOp::unsafe_arena_set_allocated_run_step(::tensorflow::RunStepRequest* run_step) { + clear_op(); + if (run_step) { + set_has_run_step(); + _impl_.op_.run_step_ = run_step; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.ReplayOp.run_step) +} +inline ::tensorflow::RunStepRequest* ReplayOp::_internal_mutable_run_step() { + if (!_internal_has_run_step()) { + clear_op(); + set_has_run_step(); + _impl_.op_.run_step_ = CreateMaybeMessage< ::tensorflow::RunStepRequest >(GetArenaForAllocation()); + } + return _impl_.op_.run_step_; +} +inline ::tensorflow::RunStepRequest* ReplayOp::mutable_run_step() { + ::tensorflow::RunStepRequest* _msg = _internal_mutable_run_step(); + // @@protoc_insertion_point(field_mutable:tensorflow.ReplayOp.run_step) + return _msg; +} + +// .tensorflow.CloseSessionRequest close_session = 5; +inline bool ReplayOp::_internal_has_close_session() const { + return op_case() == kCloseSession; +} +inline bool ReplayOp::has_close_session() const { + return _internal_has_close_session(); +} +inline void ReplayOp::set_has_close_session() { + _impl_._oneof_case_[0] = kCloseSession; +} +inline ::tensorflow::CloseSessionRequest* ReplayOp::release_close_session() { + // @@protoc_insertion_point(field_release:tensorflow.ReplayOp.close_session) + if (_internal_has_close_session()) { + clear_has_op(); + ::tensorflow::CloseSessionRequest* temp = _impl_.op_.close_session_; + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + _impl_.op_.close_session_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::tensorflow::CloseSessionRequest& ReplayOp::_internal_close_session() const { + return _internal_has_close_session() + ? *_impl_.op_.close_session_ + : reinterpret_cast< ::tensorflow::CloseSessionRequest&>(::tensorflow::_CloseSessionRequest_default_instance_); +} +inline const ::tensorflow::CloseSessionRequest& ReplayOp::close_session() const { + // @@protoc_insertion_point(field_get:tensorflow.ReplayOp.close_session) + return _internal_close_session(); +} +inline ::tensorflow::CloseSessionRequest* ReplayOp::unsafe_arena_release_close_session() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.ReplayOp.close_session) + if (_internal_has_close_session()) { + clear_has_op(); + ::tensorflow::CloseSessionRequest* temp = _impl_.op_.close_session_; + _impl_.op_.close_session_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void ReplayOp::unsafe_arena_set_allocated_close_session(::tensorflow::CloseSessionRequest* close_session) { + clear_op(); + if (close_session) { + set_has_close_session(); + _impl_.op_.close_session_ = close_session; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.ReplayOp.close_session) +} +inline ::tensorflow::CloseSessionRequest* ReplayOp::_internal_mutable_close_session() { + if (!_internal_has_close_session()) { + clear_op(); + set_has_close_session(); + _impl_.op_.close_session_ = CreateMaybeMessage< ::tensorflow::CloseSessionRequest >(GetArenaForAllocation()); + } + return _impl_.op_.close_session_; +} +inline ::tensorflow::CloseSessionRequest* ReplayOp::mutable_close_session() { + ::tensorflow::CloseSessionRequest* _msg = _internal_mutable_close_session(); + // @@protoc_insertion_point(field_mutable:tensorflow.ReplayOp.close_session) + return _msg; +} + +// .tensorflow.ListDevicesRequest list_devices = 6; +inline bool ReplayOp::_internal_has_list_devices() const { + return op_case() == kListDevices; +} +inline bool ReplayOp::has_list_devices() const { + return _internal_has_list_devices(); +} +inline void ReplayOp::set_has_list_devices() { + _impl_._oneof_case_[0] = kListDevices; +} +inline ::tensorflow::ListDevicesRequest* ReplayOp::release_list_devices() { + // @@protoc_insertion_point(field_release:tensorflow.ReplayOp.list_devices) + if (_internal_has_list_devices()) { + clear_has_op(); + ::tensorflow::ListDevicesRequest* temp = _impl_.op_.list_devices_; + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + _impl_.op_.list_devices_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::tensorflow::ListDevicesRequest& ReplayOp::_internal_list_devices() const { + return _internal_has_list_devices() + ? *_impl_.op_.list_devices_ + : reinterpret_cast< ::tensorflow::ListDevicesRequest&>(::tensorflow::_ListDevicesRequest_default_instance_); +} +inline const ::tensorflow::ListDevicesRequest& ReplayOp::list_devices() const { + // @@protoc_insertion_point(field_get:tensorflow.ReplayOp.list_devices) + return _internal_list_devices(); +} +inline ::tensorflow::ListDevicesRequest* ReplayOp::unsafe_arena_release_list_devices() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.ReplayOp.list_devices) + if (_internal_has_list_devices()) { + clear_has_op(); + ::tensorflow::ListDevicesRequest* temp = _impl_.op_.list_devices_; + _impl_.op_.list_devices_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void ReplayOp::unsafe_arena_set_allocated_list_devices(::tensorflow::ListDevicesRequest* list_devices) { + clear_op(); + if (list_devices) { + set_has_list_devices(); + _impl_.op_.list_devices_ = list_devices; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.ReplayOp.list_devices) +} +inline ::tensorflow::ListDevicesRequest* ReplayOp::_internal_mutable_list_devices() { + if (!_internal_has_list_devices()) { + clear_op(); + set_has_list_devices(); + _impl_.op_.list_devices_ = CreateMaybeMessage< ::tensorflow::ListDevicesRequest >(GetArenaForAllocation()); + } + return _impl_.op_.list_devices_; +} +inline ::tensorflow::ListDevicesRequest* ReplayOp::mutable_list_devices() { + ::tensorflow::ListDevicesRequest* _msg = _internal_mutable_list_devices(); + // @@protoc_insertion_point(field_mutable:tensorflow.ReplayOp.list_devices) + return _msg; +} + +// .tensorflow.ResetRequest reset_request = 7; +inline bool ReplayOp::_internal_has_reset_request() const { + return op_case() == kResetRequest; +} +inline bool ReplayOp::has_reset_request() const { + return _internal_has_reset_request(); +} +inline void ReplayOp::set_has_reset_request() { + _impl_._oneof_case_[0] = kResetRequest; +} +inline ::tensorflow::ResetRequest* ReplayOp::release_reset_request() { + // @@protoc_insertion_point(field_release:tensorflow.ReplayOp.reset_request) + if (_internal_has_reset_request()) { + clear_has_op(); + ::tensorflow::ResetRequest* temp = _impl_.op_.reset_request_; + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + _impl_.op_.reset_request_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::tensorflow::ResetRequest& ReplayOp::_internal_reset_request() const { + return _internal_has_reset_request() + ? *_impl_.op_.reset_request_ + : reinterpret_cast< ::tensorflow::ResetRequest&>(::tensorflow::_ResetRequest_default_instance_); +} +inline const ::tensorflow::ResetRequest& ReplayOp::reset_request() const { + // @@protoc_insertion_point(field_get:tensorflow.ReplayOp.reset_request) + return _internal_reset_request(); +} +inline ::tensorflow::ResetRequest* ReplayOp::unsafe_arena_release_reset_request() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.ReplayOp.reset_request) + if (_internal_has_reset_request()) { + clear_has_op(); + ::tensorflow::ResetRequest* temp = _impl_.op_.reset_request_; + _impl_.op_.reset_request_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void ReplayOp::unsafe_arena_set_allocated_reset_request(::tensorflow::ResetRequest* reset_request) { + clear_op(); + if (reset_request) { + set_has_reset_request(); + _impl_.op_.reset_request_ = reset_request; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.ReplayOp.reset_request) +} +inline ::tensorflow::ResetRequest* ReplayOp::_internal_mutable_reset_request() { + if (!_internal_has_reset_request()) { + clear_op(); + set_has_reset_request(); + _impl_.op_.reset_request_ = CreateMaybeMessage< ::tensorflow::ResetRequest >(GetArenaForAllocation()); + } + return _impl_.op_.reset_request_; +} +inline ::tensorflow::ResetRequest* ReplayOp::mutable_reset_request() { + ::tensorflow::ResetRequest* _msg = _internal_mutable_reset_request(); + // @@protoc_insertion_point(field_mutable:tensorflow.ReplayOp.reset_request) + return _msg; +} + +// .tensorflow.MakeCallableRequest make_callable = 8; +inline bool ReplayOp::_internal_has_make_callable() const { + return op_case() == kMakeCallable; +} +inline bool ReplayOp::has_make_callable() const { + return _internal_has_make_callable(); +} +inline void ReplayOp::set_has_make_callable() { + _impl_._oneof_case_[0] = kMakeCallable; +} +inline ::tensorflow::MakeCallableRequest* ReplayOp::release_make_callable() { + // @@protoc_insertion_point(field_release:tensorflow.ReplayOp.make_callable) + if (_internal_has_make_callable()) { + clear_has_op(); + ::tensorflow::MakeCallableRequest* temp = _impl_.op_.make_callable_; + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + _impl_.op_.make_callable_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::tensorflow::MakeCallableRequest& ReplayOp::_internal_make_callable() const { + return _internal_has_make_callable() + ? *_impl_.op_.make_callable_ + : reinterpret_cast< ::tensorflow::MakeCallableRequest&>(::tensorflow::_MakeCallableRequest_default_instance_); +} +inline const ::tensorflow::MakeCallableRequest& ReplayOp::make_callable() const { + // @@protoc_insertion_point(field_get:tensorflow.ReplayOp.make_callable) + return _internal_make_callable(); +} +inline ::tensorflow::MakeCallableRequest* ReplayOp::unsafe_arena_release_make_callable() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.ReplayOp.make_callable) + if (_internal_has_make_callable()) { + clear_has_op(); + ::tensorflow::MakeCallableRequest* temp = _impl_.op_.make_callable_; + _impl_.op_.make_callable_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void ReplayOp::unsafe_arena_set_allocated_make_callable(::tensorflow::MakeCallableRequest* make_callable) { + clear_op(); + if (make_callable) { + set_has_make_callable(); + _impl_.op_.make_callable_ = make_callable; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.ReplayOp.make_callable) +} +inline ::tensorflow::MakeCallableRequest* ReplayOp::_internal_mutable_make_callable() { + if (!_internal_has_make_callable()) { + clear_op(); + set_has_make_callable(); + _impl_.op_.make_callable_ = CreateMaybeMessage< ::tensorflow::MakeCallableRequest >(GetArenaForAllocation()); + } + return _impl_.op_.make_callable_; +} +inline ::tensorflow::MakeCallableRequest* ReplayOp::mutable_make_callable() { + ::tensorflow::MakeCallableRequest* _msg = _internal_mutable_make_callable(); + // @@protoc_insertion_point(field_mutable:tensorflow.ReplayOp.make_callable) + return _msg; +} + +// .tensorflow.RunCallableRequest run_callable = 9; +inline bool ReplayOp::_internal_has_run_callable() const { + return op_case() == kRunCallable; +} +inline bool ReplayOp::has_run_callable() const { + return _internal_has_run_callable(); +} +inline void ReplayOp::set_has_run_callable() { + _impl_._oneof_case_[0] = kRunCallable; +} +inline ::tensorflow::RunCallableRequest* ReplayOp::release_run_callable() { + // @@protoc_insertion_point(field_release:tensorflow.ReplayOp.run_callable) + if (_internal_has_run_callable()) { + clear_has_op(); + ::tensorflow::RunCallableRequest* temp = _impl_.op_.run_callable_; + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + _impl_.op_.run_callable_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::tensorflow::RunCallableRequest& ReplayOp::_internal_run_callable() const { + return _internal_has_run_callable() + ? *_impl_.op_.run_callable_ + : reinterpret_cast< ::tensorflow::RunCallableRequest&>(::tensorflow::_RunCallableRequest_default_instance_); +} +inline const ::tensorflow::RunCallableRequest& ReplayOp::run_callable() const { + // @@protoc_insertion_point(field_get:tensorflow.ReplayOp.run_callable) + return _internal_run_callable(); +} +inline ::tensorflow::RunCallableRequest* ReplayOp::unsafe_arena_release_run_callable() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.ReplayOp.run_callable) + if (_internal_has_run_callable()) { + clear_has_op(); + ::tensorflow::RunCallableRequest* temp = _impl_.op_.run_callable_; + _impl_.op_.run_callable_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void ReplayOp::unsafe_arena_set_allocated_run_callable(::tensorflow::RunCallableRequest* run_callable) { + clear_op(); + if (run_callable) { + set_has_run_callable(); + _impl_.op_.run_callable_ = run_callable; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.ReplayOp.run_callable) +} +inline ::tensorflow::RunCallableRequest* ReplayOp::_internal_mutable_run_callable() { + if (!_internal_has_run_callable()) { + clear_op(); + set_has_run_callable(); + _impl_.op_.run_callable_ = CreateMaybeMessage< ::tensorflow::RunCallableRequest >(GetArenaForAllocation()); + } + return _impl_.op_.run_callable_; +} +inline ::tensorflow::RunCallableRequest* ReplayOp::mutable_run_callable() { + ::tensorflow::RunCallableRequest* _msg = _internal_mutable_run_callable(); + // @@protoc_insertion_point(field_mutable:tensorflow.ReplayOp.run_callable) + return _msg; +} + +// .tensorflow.ReleaseCallableRequest release_callable = 10; +inline bool ReplayOp::_internal_has_release_callable() const { + return op_case() == kReleaseCallable; +} +inline bool ReplayOp::has_release_callable() const { + return _internal_has_release_callable(); +} +inline void ReplayOp::set_has_release_callable() { + _impl_._oneof_case_[0] = kReleaseCallable; +} +inline ::tensorflow::ReleaseCallableRequest* ReplayOp::release_release_callable() { + // @@protoc_insertion_point(field_release:tensorflow.ReplayOp.release_callable) + if (_internal_has_release_callable()) { + clear_has_op(); + ::tensorflow::ReleaseCallableRequest* temp = _impl_.op_.release_callable_; + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + _impl_.op_.release_callable_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::tensorflow::ReleaseCallableRequest& ReplayOp::_internal_release_callable() const { + return _internal_has_release_callable() + ? *_impl_.op_.release_callable_ + : reinterpret_cast< ::tensorflow::ReleaseCallableRequest&>(::tensorflow::_ReleaseCallableRequest_default_instance_); +} +inline const ::tensorflow::ReleaseCallableRequest& ReplayOp::release_callable() const { + // @@protoc_insertion_point(field_get:tensorflow.ReplayOp.release_callable) + return _internal_release_callable(); +} +inline ::tensorflow::ReleaseCallableRequest* ReplayOp::unsafe_arena_release_release_callable() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.ReplayOp.release_callable) + if (_internal_has_release_callable()) { + clear_has_op(); + ::tensorflow::ReleaseCallableRequest* temp = _impl_.op_.release_callable_; + _impl_.op_.release_callable_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void ReplayOp::unsafe_arena_set_allocated_release_callable(::tensorflow::ReleaseCallableRequest* release_callable) { + clear_op(); + if (release_callable) { + set_has_release_callable(); + _impl_.op_.release_callable_ = release_callable; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.ReplayOp.release_callable) +} +inline ::tensorflow::ReleaseCallableRequest* ReplayOp::_internal_mutable_release_callable() { + if (!_internal_has_release_callable()) { + clear_op(); + set_has_release_callable(); + _impl_.op_.release_callable_ = CreateMaybeMessage< ::tensorflow::ReleaseCallableRequest >(GetArenaForAllocation()); + } + return _impl_.op_.release_callable_; +} +inline ::tensorflow::ReleaseCallableRequest* ReplayOp::mutable_release_callable() { + ::tensorflow::ReleaseCallableRequest* _msg = _internal_mutable_release_callable(); + // @@protoc_insertion_point(field_mutable:tensorflow.ReplayOp.release_callable) + return _msg; +} + +// .tensorflow.NewReplaySession new_replay_session = 11; +inline bool ReplayOp::_internal_has_new_replay_session() const { + return op_case() == kNewReplaySession; +} +inline bool ReplayOp::has_new_replay_session() const { + return _internal_has_new_replay_session(); +} +inline void ReplayOp::set_has_new_replay_session() { + _impl_._oneof_case_[0] = kNewReplaySession; +} +inline void ReplayOp::clear_new_replay_session() { + if (_internal_has_new_replay_session()) { + if (GetArenaForAllocation() == nullptr) { + delete _impl_.op_.new_replay_session_; + } + clear_has_op(); + } +} +inline ::tensorflow::NewReplaySession* ReplayOp::release_new_replay_session() { + // @@protoc_insertion_point(field_release:tensorflow.ReplayOp.new_replay_session) + if (_internal_has_new_replay_session()) { + clear_has_op(); + ::tensorflow::NewReplaySession* temp = _impl_.op_.new_replay_session_; + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + _impl_.op_.new_replay_session_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::tensorflow::NewReplaySession& ReplayOp::_internal_new_replay_session() const { + return _internal_has_new_replay_session() + ? *_impl_.op_.new_replay_session_ + : reinterpret_cast< ::tensorflow::NewReplaySession&>(::tensorflow::_NewReplaySession_default_instance_); +} +inline const ::tensorflow::NewReplaySession& ReplayOp::new_replay_session() const { + // @@protoc_insertion_point(field_get:tensorflow.ReplayOp.new_replay_session) + return _internal_new_replay_session(); +} +inline ::tensorflow::NewReplaySession* ReplayOp::unsafe_arena_release_new_replay_session() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.ReplayOp.new_replay_session) + if (_internal_has_new_replay_session()) { + clear_has_op(); + ::tensorflow::NewReplaySession* temp = _impl_.op_.new_replay_session_; + _impl_.op_.new_replay_session_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void ReplayOp::unsafe_arena_set_allocated_new_replay_session(::tensorflow::NewReplaySession* new_replay_session) { + clear_op(); + if (new_replay_session) { + set_has_new_replay_session(); + _impl_.op_.new_replay_session_ = new_replay_session; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.ReplayOp.new_replay_session) +} +inline ::tensorflow::NewReplaySession* ReplayOp::_internal_mutable_new_replay_session() { + if (!_internal_has_new_replay_session()) { + clear_op(); + set_has_new_replay_session(); + _impl_.op_.new_replay_session_ = CreateMaybeMessage< ::tensorflow::NewReplaySession >(GetArenaForAllocation()); + } + return _impl_.op_.new_replay_session_; +} +inline ::tensorflow::NewReplaySession* ReplayOp::mutable_new_replay_session() { + ::tensorflow::NewReplaySession* _msg = _internal_mutable_new_replay_session(); + // @@protoc_insertion_point(field_mutable:tensorflow.ReplayOp.new_replay_session) + return _msg; +} + +// .tensorflow.CreateSessionResponse create_session_response = 21; +inline bool ReplayOp::_internal_has_create_session_response() const { + return response_case() == kCreateSessionResponse; +} +inline bool ReplayOp::has_create_session_response() const { + return _internal_has_create_session_response(); +} +inline void ReplayOp::set_has_create_session_response() { + _impl_._oneof_case_[1] = kCreateSessionResponse; +} +inline ::tensorflow::CreateSessionResponse* ReplayOp::release_create_session_response() { + // @@protoc_insertion_point(field_release:tensorflow.ReplayOp.create_session_response) + if (_internal_has_create_session_response()) { + clear_has_response(); + ::tensorflow::CreateSessionResponse* temp = _impl_.response_.create_session_response_; + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + _impl_.response_.create_session_response_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::tensorflow::CreateSessionResponse& ReplayOp::_internal_create_session_response() const { + return _internal_has_create_session_response() + ? *_impl_.response_.create_session_response_ + : reinterpret_cast< ::tensorflow::CreateSessionResponse&>(::tensorflow::_CreateSessionResponse_default_instance_); +} +inline const ::tensorflow::CreateSessionResponse& ReplayOp::create_session_response() const { + // @@protoc_insertion_point(field_get:tensorflow.ReplayOp.create_session_response) + return _internal_create_session_response(); +} +inline ::tensorflow::CreateSessionResponse* ReplayOp::unsafe_arena_release_create_session_response() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.ReplayOp.create_session_response) + if (_internal_has_create_session_response()) { + clear_has_response(); + ::tensorflow::CreateSessionResponse* temp = _impl_.response_.create_session_response_; + _impl_.response_.create_session_response_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void ReplayOp::unsafe_arena_set_allocated_create_session_response(::tensorflow::CreateSessionResponse* create_session_response) { + clear_response(); + if (create_session_response) { + set_has_create_session_response(); + _impl_.response_.create_session_response_ = create_session_response; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.ReplayOp.create_session_response) +} +inline ::tensorflow::CreateSessionResponse* ReplayOp::_internal_mutable_create_session_response() { + if (!_internal_has_create_session_response()) { + clear_response(); + set_has_create_session_response(); + _impl_.response_.create_session_response_ = CreateMaybeMessage< ::tensorflow::CreateSessionResponse >(GetArenaForAllocation()); + } + return _impl_.response_.create_session_response_; +} +inline ::tensorflow::CreateSessionResponse* ReplayOp::mutable_create_session_response() { + ::tensorflow::CreateSessionResponse* _msg = _internal_mutable_create_session_response(); + // @@protoc_insertion_point(field_mutable:tensorflow.ReplayOp.create_session_response) + return _msg; +} + +// .tensorflow.ExtendSessionResponse extend_session_response = 22; +inline bool ReplayOp::_internal_has_extend_session_response() const { + return response_case() == kExtendSessionResponse; +} +inline bool ReplayOp::has_extend_session_response() const { + return _internal_has_extend_session_response(); +} +inline void ReplayOp::set_has_extend_session_response() { + _impl_._oneof_case_[1] = kExtendSessionResponse; +} +inline ::tensorflow::ExtendSessionResponse* ReplayOp::release_extend_session_response() { + // @@protoc_insertion_point(field_release:tensorflow.ReplayOp.extend_session_response) + if (_internal_has_extend_session_response()) { + clear_has_response(); + ::tensorflow::ExtendSessionResponse* temp = _impl_.response_.extend_session_response_; + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + _impl_.response_.extend_session_response_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::tensorflow::ExtendSessionResponse& ReplayOp::_internal_extend_session_response() const { + return _internal_has_extend_session_response() + ? *_impl_.response_.extend_session_response_ + : reinterpret_cast< ::tensorflow::ExtendSessionResponse&>(::tensorflow::_ExtendSessionResponse_default_instance_); +} +inline const ::tensorflow::ExtendSessionResponse& ReplayOp::extend_session_response() const { + // @@protoc_insertion_point(field_get:tensorflow.ReplayOp.extend_session_response) + return _internal_extend_session_response(); +} +inline ::tensorflow::ExtendSessionResponse* ReplayOp::unsafe_arena_release_extend_session_response() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.ReplayOp.extend_session_response) + if (_internal_has_extend_session_response()) { + clear_has_response(); + ::tensorflow::ExtendSessionResponse* temp = _impl_.response_.extend_session_response_; + _impl_.response_.extend_session_response_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void ReplayOp::unsafe_arena_set_allocated_extend_session_response(::tensorflow::ExtendSessionResponse* extend_session_response) { + clear_response(); + if (extend_session_response) { + set_has_extend_session_response(); + _impl_.response_.extend_session_response_ = extend_session_response; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.ReplayOp.extend_session_response) +} +inline ::tensorflow::ExtendSessionResponse* ReplayOp::_internal_mutable_extend_session_response() { + if (!_internal_has_extend_session_response()) { + clear_response(); + set_has_extend_session_response(); + _impl_.response_.extend_session_response_ = CreateMaybeMessage< ::tensorflow::ExtendSessionResponse >(GetArenaForAllocation()); + } + return _impl_.response_.extend_session_response_; +} +inline ::tensorflow::ExtendSessionResponse* ReplayOp::mutable_extend_session_response() { + ::tensorflow::ExtendSessionResponse* _msg = _internal_mutable_extend_session_response(); + // @@protoc_insertion_point(field_mutable:tensorflow.ReplayOp.extend_session_response) + return _msg; +} + +// .tensorflow.PartialRunSetupResponse partial_run_setup_response = 23; +inline bool ReplayOp::_internal_has_partial_run_setup_response() const { + return response_case() == kPartialRunSetupResponse; +} +inline bool ReplayOp::has_partial_run_setup_response() const { + return _internal_has_partial_run_setup_response(); +} +inline void ReplayOp::set_has_partial_run_setup_response() { + _impl_._oneof_case_[1] = kPartialRunSetupResponse; +} +inline ::tensorflow::PartialRunSetupResponse* ReplayOp::release_partial_run_setup_response() { + // @@protoc_insertion_point(field_release:tensorflow.ReplayOp.partial_run_setup_response) + if (_internal_has_partial_run_setup_response()) { + clear_has_response(); + ::tensorflow::PartialRunSetupResponse* temp = _impl_.response_.partial_run_setup_response_; + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + _impl_.response_.partial_run_setup_response_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::tensorflow::PartialRunSetupResponse& ReplayOp::_internal_partial_run_setup_response() const { + return _internal_has_partial_run_setup_response() + ? *_impl_.response_.partial_run_setup_response_ + : reinterpret_cast< ::tensorflow::PartialRunSetupResponse&>(::tensorflow::_PartialRunSetupResponse_default_instance_); +} +inline const ::tensorflow::PartialRunSetupResponse& ReplayOp::partial_run_setup_response() const { + // @@protoc_insertion_point(field_get:tensorflow.ReplayOp.partial_run_setup_response) + return _internal_partial_run_setup_response(); +} +inline ::tensorflow::PartialRunSetupResponse* ReplayOp::unsafe_arena_release_partial_run_setup_response() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.ReplayOp.partial_run_setup_response) + if (_internal_has_partial_run_setup_response()) { + clear_has_response(); + ::tensorflow::PartialRunSetupResponse* temp = _impl_.response_.partial_run_setup_response_; + _impl_.response_.partial_run_setup_response_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void ReplayOp::unsafe_arena_set_allocated_partial_run_setup_response(::tensorflow::PartialRunSetupResponse* partial_run_setup_response) { + clear_response(); + if (partial_run_setup_response) { + set_has_partial_run_setup_response(); + _impl_.response_.partial_run_setup_response_ = partial_run_setup_response; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.ReplayOp.partial_run_setup_response) +} +inline ::tensorflow::PartialRunSetupResponse* ReplayOp::_internal_mutable_partial_run_setup_response() { + if (!_internal_has_partial_run_setup_response()) { + clear_response(); + set_has_partial_run_setup_response(); + _impl_.response_.partial_run_setup_response_ = CreateMaybeMessage< ::tensorflow::PartialRunSetupResponse >(GetArenaForAllocation()); + } + return _impl_.response_.partial_run_setup_response_; +} +inline ::tensorflow::PartialRunSetupResponse* ReplayOp::mutable_partial_run_setup_response() { + ::tensorflow::PartialRunSetupResponse* _msg = _internal_mutable_partial_run_setup_response(); + // @@protoc_insertion_point(field_mutable:tensorflow.ReplayOp.partial_run_setup_response) + return _msg; +} + +// .tensorflow.RunStepResponse run_step_response = 24; +inline bool ReplayOp::_internal_has_run_step_response() const { + return response_case() == kRunStepResponse; +} +inline bool ReplayOp::has_run_step_response() const { + return _internal_has_run_step_response(); +} +inline void ReplayOp::set_has_run_step_response() { + _impl_._oneof_case_[1] = kRunStepResponse; +} +inline ::tensorflow::RunStepResponse* ReplayOp::release_run_step_response() { + // @@protoc_insertion_point(field_release:tensorflow.ReplayOp.run_step_response) + if (_internal_has_run_step_response()) { + clear_has_response(); + ::tensorflow::RunStepResponse* temp = _impl_.response_.run_step_response_; + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + _impl_.response_.run_step_response_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::tensorflow::RunStepResponse& ReplayOp::_internal_run_step_response() const { + return _internal_has_run_step_response() + ? *_impl_.response_.run_step_response_ + : reinterpret_cast< ::tensorflow::RunStepResponse&>(::tensorflow::_RunStepResponse_default_instance_); +} +inline const ::tensorflow::RunStepResponse& ReplayOp::run_step_response() const { + // @@protoc_insertion_point(field_get:tensorflow.ReplayOp.run_step_response) + return _internal_run_step_response(); +} +inline ::tensorflow::RunStepResponse* ReplayOp::unsafe_arena_release_run_step_response() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.ReplayOp.run_step_response) + if (_internal_has_run_step_response()) { + clear_has_response(); + ::tensorflow::RunStepResponse* temp = _impl_.response_.run_step_response_; + _impl_.response_.run_step_response_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void ReplayOp::unsafe_arena_set_allocated_run_step_response(::tensorflow::RunStepResponse* run_step_response) { + clear_response(); + if (run_step_response) { + set_has_run_step_response(); + _impl_.response_.run_step_response_ = run_step_response; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.ReplayOp.run_step_response) +} +inline ::tensorflow::RunStepResponse* ReplayOp::_internal_mutable_run_step_response() { + if (!_internal_has_run_step_response()) { + clear_response(); + set_has_run_step_response(); + _impl_.response_.run_step_response_ = CreateMaybeMessage< ::tensorflow::RunStepResponse >(GetArenaForAllocation()); + } + return _impl_.response_.run_step_response_; +} +inline ::tensorflow::RunStepResponse* ReplayOp::mutable_run_step_response() { + ::tensorflow::RunStepResponse* _msg = _internal_mutable_run_step_response(); + // @@protoc_insertion_point(field_mutable:tensorflow.ReplayOp.run_step_response) + return _msg; +} + +// .tensorflow.CloseSessionResponse close_session_response = 25; +inline bool ReplayOp::_internal_has_close_session_response() const { + return response_case() == kCloseSessionResponse; +} +inline bool ReplayOp::has_close_session_response() const { + return _internal_has_close_session_response(); +} +inline void ReplayOp::set_has_close_session_response() { + _impl_._oneof_case_[1] = kCloseSessionResponse; +} +inline ::tensorflow::CloseSessionResponse* ReplayOp::release_close_session_response() { + // @@protoc_insertion_point(field_release:tensorflow.ReplayOp.close_session_response) + if (_internal_has_close_session_response()) { + clear_has_response(); + ::tensorflow::CloseSessionResponse* temp = _impl_.response_.close_session_response_; + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + _impl_.response_.close_session_response_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::tensorflow::CloseSessionResponse& ReplayOp::_internal_close_session_response() const { + return _internal_has_close_session_response() + ? *_impl_.response_.close_session_response_ + : reinterpret_cast< ::tensorflow::CloseSessionResponse&>(::tensorflow::_CloseSessionResponse_default_instance_); +} +inline const ::tensorflow::CloseSessionResponse& ReplayOp::close_session_response() const { + // @@protoc_insertion_point(field_get:tensorflow.ReplayOp.close_session_response) + return _internal_close_session_response(); +} +inline ::tensorflow::CloseSessionResponse* ReplayOp::unsafe_arena_release_close_session_response() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.ReplayOp.close_session_response) + if (_internal_has_close_session_response()) { + clear_has_response(); + ::tensorflow::CloseSessionResponse* temp = _impl_.response_.close_session_response_; + _impl_.response_.close_session_response_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void ReplayOp::unsafe_arena_set_allocated_close_session_response(::tensorflow::CloseSessionResponse* close_session_response) { + clear_response(); + if (close_session_response) { + set_has_close_session_response(); + _impl_.response_.close_session_response_ = close_session_response; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.ReplayOp.close_session_response) +} +inline ::tensorflow::CloseSessionResponse* ReplayOp::_internal_mutable_close_session_response() { + if (!_internal_has_close_session_response()) { + clear_response(); + set_has_close_session_response(); + _impl_.response_.close_session_response_ = CreateMaybeMessage< ::tensorflow::CloseSessionResponse >(GetArenaForAllocation()); + } + return _impl_.response_.close_session_response_; +} +inline ::tensorflow::CloseSessionResponse* ReplayOp::mutable_close_session_response() { + ::tensorflow::CloseSessionResponse* _msg = _internal_mutable_close_session_response(); + // @@protoc_insertion_point(field_mutable:tensorflow.ReplayOp.close_session_response) + return _msg; +} + +// .tensorflow.ListDevicesResponse list_devices_response = 26; +inline bool ReplayOp::_internal_has_list_devices_response() const { + return response_case() == kListDevicesResponse; +} +inline bool ReplayOp::has_list_devices_response() const { + return _internal_has_list_devices_response(); +} +inline void ReplayOp::set_has_list_devices_response() { + _impl_._oneof_case_[1] = kListDevicesResponse; +} +inline ::tensorflow::ListDevicesResponse* ReplayOp::release_list_devices_response() { + // @@protoc_insertion_point(field_release:tensorflow.ReplayOp.list_devices_response) + if (_internal_has_list_devices_response()) { + clear_has_response(); + ::tensorflow::ListDevicesResponse* temp = _impl_.response_.list_devices_response_; + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + _impl_.response_.list_devices_response_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::tensorflow::ListDevicesResponse& ReplayOp::_internal_list_devices_response() const { + return _internal_has_list_devices_response() + ? *_impl_.response_.list_devices_response_ + : reinterpret_cast< ::tensorflow::ListDevicesResponse&>(::tensorflow::_ListDevicesResponse_default_instance_); +} +inline const ::tensorflow::ListDevicesResponse& ReplayOp::list_devices_response() const { + // @@protoc_insertion_point(field_get:tensorflow.ReplayOp.list_devices_response) + return _internal_list_devices_response(); +} +inline ::tensorflow::ListDevicesResponse* ReplayOp::unsafe_arena_release_list_devices_response() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.ReplayOp.list_devices_response) + if (_internal_has_list_devices_response()) { + clear_has_response(); + ::tensorflow::ListDevicesResponse* temp = _impl_.response_.list_devices_response_; + _impl_.response_.list_devices_response_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void ReplayOp::unsafe_arena_set_allocated_list_devices_response(::tensorflow::ListDevicesResponse* list_devices_response) { + clear_response(); + if (list_devices_response) { + set_has_list_devices_response(); + _impl_.response_.list_devices_response_ = list_devices_response; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.ReplayOp.list_devices_response) +} +inline ::tensorflow::ListDevicesResponse* ReplayOp::_internal_mutable_list_devices_response() { + if (!_internal_has_list_devices_response()) { + clear_response(); + set_has_list_devices_response(); + _impl_.response_.list_devices_response_ = CreateMaybeMessage< ::tensorflow::ListDevicesResponse >(GetArenaForAllocation()); + } + return _impl_.response_.list_devices_response_; +} +inline ::tensorflow::ListDevicesResponse* ReplayOp::mutable_list_devices_response() { + ::tensorflow::ListDevicesResponse* _msg = _internal_mutable_list_devices_response(); + // @@protoc_insertion_point(field_mutable:tensorflow.ReplayOp.list_devices_response) + return _msg; +} + +// .tensorflow.ResetResponse reset_request_response = 27; +inline bool ReplayOp::_internal_has_reset_request_response() const { + return response_case() == kResetRequestResponse; +} +inline bool ReplayOp::has_reset_request_response() const { + return _internal_has_reset_request_response(); +} +inline void ReplayOp::set_has_reset_request_response() { + _impl_._oneof_case_[1] = kResetRequestResponse; +} +inline ::tensorflow::ResetResponse* ReplayOp::release_reset_request_response() { + // @@protoc_insertion_point(field_release:tensorflow.ReplayOp.reset_request_response) + if (_internal_has_reset_request_response()) { + clear_has_response(); + ::tensorflow::ResetResponse* temp = _impl_.response_.reset_request_response_; + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + _impl_.response_.reset_request_response_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::tensorflow::ResetResponse& ReplayOp::_internal_reset_request_response() const { + return _internal_has_reset_request_response() + ? *_impl_.response_.reset_request_response_ + : reinterpret_cast< ::tensorflow::ResetResponse&>(::tensorflow::_ResetResponse_default_instance_); +} +inline const ::tensorflow::ResetResponse& ReplayOp::reset_request_response() const { + // @@protoc_insertion_point(field_get:tensorflow.ReplayOp.reset_request_response) + return _internal_reset_request_response(); +} +inline ::tensorflow::ResetResponse* ReplayOp::unsafe_arena_release_reset_request_response() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.ReplayOp.reset_request_response) + if (_internal_has_reset_request_response()) { + clear_has_response(); + ::tensorflow::ResetResponse* temp = _impl_.response_.reset_request_response_; + _impl_.response_.reset_request_response_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void ReplayOp::unsafe_arena_set_allocated_reset_request_response(::tensorflow::ResetResponse* reset_request_response) { + clear_response(); + if (reset_request_response) { + set_has_reset_request_response(); + _impl_.response_.reset_request_response_ = reset_request_response; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.ReplayOp.reset_request_response) +} +inline ::tensorflow::ResetResponse* ReplayOp::_internal_mutable_reset_request_response() { + if (!_internal_has_reset_request_response()) { + clear_response(); + set_has_reset_request_response(); + _impl_.response_.reset_request_response_ = CreateMaybeMessage< ::tensorflow::ResetResponse >(GetArenaForAllocation()); + } + return _impl_.response_.reset_request_response_; +} +inline ::tensorflow::ResetResponse* ReplayOp::mutable_reset_request_response() { + ::tensorflow::ResetResponse* _msg = _internal_mutable_reset_request_response(); + // @@protoc_insertion_point(field_mutable:tensorflow.ReplayOp.reset_request_response) + return _msg; +} + +// .tensorflow.MakeCallableResponse make_callable_response = 28; +inline bool ReplayOp::_internal_has_make_callable_response() const { + return response_case() == kMakeCallableResponse; +} +inline bool ReplayOp::has_make_callable_response() const { + return _internal_has_make_callable_response(); +} +inline void ReplayOp::set_has_make_callable_response() { + _impl_._oneof_case_[1] = kMakeCallableResponse; +} +inline ::tensorflow::MakeCallableResponse* ReplayOp::release_make_callable_response() { + // @@protoc_insertion_point(field_release:tensorflow.ReplayOp.make_callable_response) + if (_internal_has_make_callable_response()) { + clear_has_response(); + ::tensorflow::MakeCallableResponse* temp = _impl_.response_.make_callable_response_; + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + _impl_.response_.make_callable_response_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::tensorflow::MakeCallableResponse& ReplayOp::_internal_make_callable_response() const { + return _internal_has_make_callable_response() + ? *_impl_.response_.make_callable_response_ + : reinterpret_cast< ::tensorflow::MakeCallableResponse&>(::tensorflow::_MakeCallableResponse_default_instance_); +} +inline const ::tensorflow::MakeCallableResponse& ReplayOp::make_callable_response() const { + // @@protoc_insertion_point(field_get:tensorflow.ReplayOp.make_callable_response) + return _internal_make_callable_response(); +} +inline ::tensorflow::MakeCallableResponse* ReplayOp::unsafe_arena_release_make_callable_response() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.ReplayOp.make_callable_response) + if (_internal_has_make_callable_response()) { + clear_has_response(); + ::tensorflow::MakeCallableResponse* temp = _impl_.response_.make_callable_response_; + _impl_.response_.make_callable_response_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void ReplayOp::unsafe_arena_set_allocated_make_callable_response(::tensorflow::MakeCallableResponse* make_callable_response) { + clear_response(); + if (make_callable_response) { + set_has_make_callable_response(); + _impl_.response_.make_callable_response_ = make_callable_response; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.ReplayOp.make_callable_response) +} +inline ::tensorflow::MakeCallableResponse* ReplayOp::_internal_mutable_make_callable_response() { + if (!_internal_has_make_callable_response()) { + clear_response(); + set_has_make_callable_response(); + _impl_.response_.make_callable_response_ = CreateMaybeMessage< ::tensorflow::MakeCallableResponse >(GetArenaForAllocation()); + } + return _impl_.response_.make_callable_response_; +} +inline ::tensorflow::MakeCallableResponse* ReplayOp::mutable_make_callable_response() { + ::tensorflow::MakeCallableResponse* _msg = _internal_mutable_make_callable_response(); + // @@protoc_insertion_point(field_mutable:tensorflow.ReplayOp.make_callable_response) + return _msg; +} + +// .tensorflow.RunCallableResponse run_callable_response = 29; +inline bool ReplayOp::_internal_has_run_callable_response() const { + return response_case() == kRunCallableResponse; +} +inline bool ReplayOp::has_run_callable_response() const { + return _internal_has_run_callable_response(); +} +inline void ReplayOp::set_has_run_callable_response() { + _impl_._oneof_case_[1] = kRunCallableResponse; +} +inline ::tensorflow::RunCallableResponse* ReplayOp::release_run_callable_response() { + // @@protoc_insertion_point(field_release:tensorflow.ReplayOp.run_callable_response) + if (_internal_has_run_callable_response()) { + clear_has_response(); + ::tensorflow::RunCallableResponse* temp = _impl_.response_.run_callable_response_; + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + _impl_.response_.run_callable_response_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::tensorflow::RunCallableResponse& ReplayOp::_internal_run_callable_response() const { + return _internal_has_run_callable_response() + ? *_impl_.response_.run_callable_response_ + : reinterpret_cast< ::tensorflow::RunCallableResponse&>(::tensorflow::_RunCallableResponse_default_instance_); +} +inline const ::tensorflow::RunCallableResponse& ReplayOp::run_callable_response() const { + // @@protoc_insertion_point(field_get:tensorflow.ReplayOp.run_callable_response) + return _internal_run_callable_response(); +} +inline ::tensorflow::RunCallableResponse* ReplayOp::unsafe_arena_release_run_callable_response() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.ReplayOp.run_callable_response) + if (_internal_has_run_callable_response()) { + clear_has_response(); + ::tensorflow::RunCallableResponse* temp = _impl_.response_.run_callable_response_; + _impl_.response_.run_callable_response_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void ReplayOp::unsafe_arena_set_allocated_run_callable_response(::tensorflow::RunCallableResponse* run_callable_response) { + clear_response(); + if (run_callable_response) { + set_has_run_callable_response(); + _impl_.response_.run_callable_response_ = run_callable_response; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.ReplayOp.run_callable_response) +} +inline ::tensorflow::RunCallableResponse* ReplayOp::_internal_mutable_run_callable_response() { + if (!_internal_has_run_callable_response()) { + clear_response(); + set_has_run_callable_response(); + _impl_.response_.run_callable_response_ = CreateMaybeMessage< ::tensorflow::RunCallableResponse >(GetArenaForAllocation()); + } + return _impl_.response_.run_callable_response_; +} +inline ::tensorflow::RunCallableResponse* ReplayOp::mutable_run_callable_response() { + ::tensorflow::RunCallableResponse* _msg = _internal_mutable_run_callable_response(); + // @@protoc_insertion_point(field_mutable:tensorflow.ReplayOp.run_callable_response) + return _msg; +} + +// .tensorflow.ReleaseCallableResponse release_callable_response = 30; +inline bool ReplayOp::_internal_has_release_callable_response() const { + return response_case() == kReleaseCallableResponse; +} +inline bool ReplayOp::has_release_callable_response() const { + return _internal_has_release_callable_response(); +} +inline void ReplayOp::set_has_release_callable_response() { + _impl_._oneof_case_[1] = kReleaseCallableResponse; +} +inline ::tensorflow::ReleaseCallableResponse* ReplayOp::release_release_callable_response() { + // @@protoc_insertion_point(field_release:tensorflow.ReplayOp.release_callable_response) + if (_internal_has_release_callable_response()) { + clear_has_response(); + ::tensorflow::ReleaseCallableResponse* temp = _impl_.response_.release_callable_response_; + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + _impl_.response_.release_callable_response_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::tensorflow::ReleaseCallableResponse& ReplayOp::_internal_release_callable_response() const { + return _internal_has_release_callable_response() + ? *_impl_.response_.release_callable_response_ + : reinterpret_cast< ::tensorflow::ReleaseCallableResponse&>(::tensorflow::_ReleaseCallableResponse_default_instance_); +} +inline const ::tensorflow::ReleaseCallableResponse& ReplayOp::release_callable_response() const { + // @@protoc_insertion_point(field_get:tensorflow.ReplayOp.release_callable_response) + return _internal_release_callable_response(); +} +inline ::tensorflow::ReleaseCallableResponse* ReplayOp::unsafe_arena_release_release_callable_response() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.ReplayOp.release_callable_response) + if (_internal_has_release_callable_response()) { + clear_has_response(); + ::tensorflow::ReleaseCallableResponse* temp = _impl_.response_.release_callable_response_; + _impl_.response_.release_callable_response_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void ReplayOp::unsafe_arena_set_allocated_release_callable_response(::tensorflow::ReleaseCallableResponse* release_callable_response) { + clear_response(); + if (release_callable_response) { + set_has_release_callable_response(); + _impl_.response_.release_callable_response_ = release_callable_response; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.ReplayOp.release_callable_response) +} +inline ::tensorflow::ReleaseCallableResponse* ReplayOp::_internal_mutable_release_callable_response() { + if (!_internal_has_release_callable_response()) { + clear_response(); + set_has_release_callable_response(); + _impl_.response_.release_callable_response_ = CreateMaybeMessage< ::tensorflow::ReleaseCallableResponse >(GetArenaForAllocation()); + } + return _impl_.response_.release_callable_response_; +} +inline ::tensorflow::ReleaseCallableResponse* ReplayOp::mutable_release_callable_response() { + ::tensorflow::ReleaseCallableResponse* _msg = _internal_mutable_release_callable_response(); + // @@protoc_insertion_point(field_mutable:tensorflow.ReplayOp.release_callable_response) + return _msg; +} + +inline bool ReplayOp::has_op() const { + return op_case() != OP_NOT_SET; +} +inline void ReplayOp::clear_has_op() { + _impl_._oneof_case_[0] = OP_NOT_SET; +} +inline bool ReplayOp::has_response() const { + return response_case() != RESPONSE_NOT_SET; +} +inline void ReplayOp::clear_has_response() { + _impl_._oneof_case_[1] = RESPONSE_NOT_SET; +} +inline ReplayOp::OpCase ReplayOp::op_case() const { + return ReplayOp::OpCase(_impl_._oneof_case_[0]); +} +inline ReplayOp::ResponseCase ReplayOp::response_case() const { + return ReplayOp::ResponseCase(_impl_._oneof_case_[1]); +} +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ +// ------------------------------------------------------------------- + + +// @@protoc_insertion_point(namespace_scope) + +} // namespace tensorflow + +// @@protoc_insertion_point(global_scope) + +#include +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprotobuf_2freplay_5flog_2eproto diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/rewriter_config.pb.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/rewriter_config.pb.h new file mode 100644 index 0000000000000000000000000000000000000000..7af81ebefe61db8e7b6e762e45a36328eeb23ffa --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/rewriter_config.pb.h @@ -0,0 +1,2845 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/rewriter_config.proto + +#ifndef GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprotobuf_2frewriter_5fconfig_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprotobuf_2frewriter_5fconfig_2eproto + +#include +#include + +#include +#if PROTOBUF_VERSION < 3021000 +#error This file was generated by a newer version of protoc which is +#error incompatible with your Protocol Buffer headers. Please update +#error your headers. +#endif +#if 3021009 < PROTOBUF_MIN_PROTOC_VERSION +#error This file was generated by an older version of protoc which is +#error incompatible with your Protocol Buffer headers. Please +#error regenerate this file with a newer version of protoc. +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include // IWYU pragma: export +#include // IWYU pragma: export +#include // IWYU pragma: export +#include +#include +#include +#include +#include "tensorflow/core/framework/attr_value.pb.h" +#include "tensorflow/core/protobuf/verifier_config.pb.h" +// @@protoc_insertion_point(includes) +#include +#define PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2fprotobuf_2frewriter_5fconfig_2eproto +PROTOBUF_NAMESPACE_OPEN +namespace internal { +class AnyMetadata; +} // namespace internal +PROTOBUF_NAMESPACE_CLOSE + +// Internal implementation detail -- do not use these members. +struct TableStruct_tensorflow_2fcore_2fprotobuf_2frewriter_5fconfig_2eproto { + static const uint32_t offsets[]; +}; +extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_tensorflow_2fcore_2fprotobuf_2frewriter_5fconfig_2eproto; +namespace tensorflow { +class AutoParallelOptions; +struct AutoParallelOptionsDefaultTypeInternal; +extern AutoParallelOptionsDefaultTypeInternal _AutoParallelOptions_default_instance_; +class RewriterConfig; +struct RewriterConfigDefaultTypeInternal; +extern RewriterConfigDefaultTypeInternal _RewriterConfig_default_instance_; +class RewriterConfig_CustomGraphOptimizer; +struct RewriterConfig_CustomGraphOptimizerDefaultTypeInternal; +extern RewriterConfig_CustomGraphOptimizerDefaultTypeInternal _RewriterConfig_CustomGraphOptimizer_default_instance_; +class RewriterConfig_CustomGraphOptimizer_ParameterMapEntry_DoNotUse; +struct RewriterConfig_CustomGraphOptimizer_ParameterMapEntry_DoNotUseDefaultTypeInternal; +extern RewriterConfig_CustomGraphOptimizer_ParameterMapEntry_DoNotUseDefaultTypeInternal _RewriterConfig_CustomGraphOptimizer_ParameterMapEntry_DoNotUse_default_instance_; +class ScopedAllocatorOptions; +struct ScopedAllocatorOptionsDefaultTypeInternal; +extern ScopedAllocatorOptionsDefaultTypeInternal _ScopedAllocatorOptions_default_instance_; +} // namespace tensorflow +PROTOBUF_NAMESPACE_OPEN +template<> ::tensorflow::AutoParallelOptions* Arena::CreateMaybeMessage<::tensorflow::AutoParallelOptions>(Arena*); +template<> ::tensorflow::RewriterConfig* Arena::CreateMaybeMessage<::tensorflow::RewriterConfig>(Arena*); +template<> ::tensorflow::RewriterConfig_CustomGraphOptimizer* Arena::CreateMaybeMessage<::tensorflow::RewriterConfig_CustomGraphOptimizer>(Arena*); +template<> ::tensorflow::RewriterConfig_CustomGraphOptimizer_ParameterMapEntry_DoNotUse* Arena::CreateMaybeMessage<::tensorflow::RewriterConfig_CustomGraphOptimizer_ParameterMapEntry_DoNotUse>(Arena*); +template<> ::tensorflow::ScopedAllocatorOptions* Arena::CreateMaybeMessage<::tensorflow::ScopedAllocatorOptions>(Arena*); +PROTOBUF_NAMESPACE_CLOSE +namespace tensorflow { + +enum RewriterConfig_Toggle : int { + RewriterConfig_Toggle_DEFAULT = 0, + RewriterConfig_Toggle_ON = 1, + RewriterConfig_Toggle_OFF = 2, + RewriterConfig_Toggle_AGGRESSIVE = 3, + RewriterConfig_Toggle_EXPERIMENTAL_MLIR = 4, + RewriterConfig_Toggle_EXPERIMENTAL_BOTH = 5, + RewriterConfig_Toggle_RewriterConfig_Toggle_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits::min(), + RewriterConfig_Toggle_RewriterConfig_Toggle_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits::max() +}; +bool RewriterConfig_Toggle_IsValid(int value); +constexpr RewriterConfig_Toggle RewriterConfig_Toggle_Toggle_MIN = RewriterConfig_Toggle_DEFAULT; +constexpr RewriterConfig_Toggle RewriterConfig_Toggle_Toggle_MAX = RewriterConfig_Toggle_EXPERIMENTAL_BOTH; +constexpr int RewriterConfig_Toggle_Toggle_ARRAYSIZE = RewriterConfig_Toggle_Toggle_MAX + 1; + +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* RewriterConfig_Toggle_descriptor(); +template +inline const std::string& RewriterConfig_Toggle_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function RewriterConfig_Toggle_Name."); + return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( + RewriterConfig_Toggle_descriptor(), enum_t_value); +} +inline bool RewriterConfig_Toggle_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, RewriterConfig_Toggle* value) { + return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( + RewriterConfig_Toggle_descriptor(), name, value); +} +enum RewriterConfig_CpuLayout : int { + RewriterConfig_CpuLayout_NO_CONVERSION_ON_CPU = 0, + RewriterConfig_CpuLayout_NCHW_TO_NHWC = 1, + RewriterConfig_CpuLayout_NHWC_TO_NCHW = 2, + RewriterConfig_CpuLayout_RewriterConfig_CpuLayout_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits::min(), + RewriterConfig_CpuLayout_RewriterConfig_CpuLayout_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits::max() +}; +bool RewriterConfig_CpuLayout_IsValid(int value); +constexpr RewriterConfig_CpuLayout RewriterConfig_CpuLayout_CpuLayout_MIN = RewriterConfig_CpuLayout_NO_CONVERSION_ON_CPU; +constexpr RewriterConfig_CpuLayout RewriterConfig_CpuLayout_CpuLayout_MAX = RewriterConfig_CpuLayout_NHWC_TO_NCHW; +constexpr int RewriterConfig_CpuLayout_CpuLayout_ARRAYSIZE = RewriterConfig_CpuLayout_CpuLayout_MAX + 1; + +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* RewriterConfig_CpuLayout_descriptor(); +template +inline const std::string& RewriterConfig_CpuLayout_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function RewriterConfig_CpuLayout_Name."); + return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( + RewriterConfig_CpuLayout_descriptor(), enum_t_value); +} +inline bool RewriterConfig_CpuLayout_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, RewriterConfig_CpuLayout* value) { + return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( + RewriterConfig_CpuLayout_descriptor(), name, value); +} +enum RewriterConfig_NumIterationsType : int { + RewriterConfig_NumIterationsType_DEFAULT_NUM_ITERS = 0, + RewriterConfig_NumIterationsType_ONE = 1, + RewriterConfig_NumIterationsType_TWO = 2, + RewriterConfig_NumIterationsType_RewriterConfig_NumIterationsType_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits::min(), + RewriterConfig_NumIterationsType_RewriterConfig_NumIterationsType_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits::max() +}; +bool RewriterConfig_NumIterationsType_IsValid(int value); +constexpr RewriterConfig_NumIterationsType RewriterConfig_NumIterationsType_NumIterationsType_MIN = RewriterConfig_NumIterationsType_DEFAULT_NUM_ITERS; +constexpr RewriterConfig_NumIterationsType RewriterConfig_NumIterationsType_NumIterationsType_MAX = RewriterConfig_NumIterationsType_TWO; +constexpr int RewriterConfig_NumIterationsType_NumIterationsType_ARRAYSIZE = RewriterConfig_NumIterationsType_NumIterationsType_MAX + 1; + +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* RewriterConfig_NumIterationsType_descriptor(); +template +inline const std::string& RewriterConfig_NumIterationsType_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function RewriterConfig_NumIterationsType_Name."); + return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( + RewriterConfig_NumIterationsType_descriptor(), enum_t_value); +} +inline bool RewriterConfig_NumIterationsType_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, RewriterConfig_NumIterationsType* value) { + return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( + RewriterConfig_NumIterationsType_descriptor(), name, value); +} +enum RewriterConfig_MemOptType : int { + RewriterConfig_MemOptType_DEFAULT_MEM_OPT = 0, + RewriterConfig_MemOptType_NO_MEM_OPT = 1, + RewriterConfig_MemOptType_MANUAL = 2, + RewriterConfig_MemOptType_SWAPPING_HEURISTICS = 4, + RewriterConfig_MemOptType_RECOMPUTATION_HEURISTICS = 5, + RewriterConfig_MemOptType_SCHEDULING_HEURISTICS = 6, + RewriterConfig_MemOptType_HEURISTICS = 3, + RewriterConfig_MemOptType_RewriterConfig_MemOptType_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits::min(), + RewriterConfig_MemOptType_RewriterConfig_MemOptType_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits::max() +}; +bool RewriterConfig_MemOptType_IsValid(int value); +constexpr RewriterConfig_MemOptType RewriterConfig_MemOptType_MemOptType_MIN = RewriterConfig_MemOptType_DEFAULT_MEM_OPT; +constexpr RewriterConfig_MemOptType RewriterConfig_MemOptType_MemOptType_MAX = RewriterConfig_MemOptType_SCHEDULING_HEURISTICS; +constexpr int RewriterConfig_MemOptType_MemOptType_ARRAYSIZE = RewriterConfig_MemOptType_MemOptType_MAX + 1; + +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* RewriterConfig_MemOptType_descriptor(); +template +inline const std::string& RewriterConfig_MemOptType_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function RewriterConfig_MemOptType_Name."); + return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( + RewriterConfig_MemOptType_descriptor(), enum_t_value); +} +inline bool RewriterConfig_MemOptType_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, RewriterConfig_MemOptType* value) { + return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( + RewriterConfig_MemOptType_descriptor(), name, value); +} +// =================================================================== + +class AutoParallelOptions final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.AutoParallelOptions) */ { + public: + inline AutoParallelOptions() : AutoParallelOptions(nullptr) {} + ~AutoParallelOptions() override; + explicit PROTOBUF_CONSTEXPR AutoParallelOptions(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + AutoParallelOptions(const AutoParallelOptions& from); + AutoParallelOptions(AutoParallelOptions&& from) noexcept + : AutoParallelOptions() { + *this = ::std::move(from); + } + + inline AutoParallelOptions& operator=(const AutoParallelOptions& from) { + CopyFrom(from); + return *this; + } + inline AutoParallelOptions& operator=(AutoParallelOptions&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const AutoParallelOptions& default_instance() { + return *internal_default_instance(); + } + static inline const AutoParallelOptions* internal_default_instance() { + return reinterpret_cast( + &_AutoParallelOptions_default_instance_); + } + static constexpr int kIndexInFileMessages = + 0; + + friend void swap(AutoParallelOptions& a, AutoParallelOptions& b) { + a.Swap(&b); + } + inline void Swap(AutoParallelOptions* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(AutoParallelOptions* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + AutoParallelOptions* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const AutoParallelOptions& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const AutoParallelOptions& from) { + AutoParallelOptions::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(AutoParallelOptions* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.AutoParallelOptions"; + } + protected: + explicit AutoParallelOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kEnableFieldNumber = 1, + kNumReplicasFieldNumber = 2, + }; + // bool enable = 1; + void clear_enable(); + bool enable() const; + void set_enable(bool value); + private: + bool _internal_enable() const; + void _internal_set_enable(bool value); + public: + + // int32 num_replicas = 2; + void clear_num_replicas(); + int32_t num_replicas() const; + void set_num_replicas(int32_t value); + private: + int32_t _internal_num_replicas() const; + void _internal_set_num_replicas(int32_t value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.AutoParallelOptions) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + bool enable_; + int32_t num_replicas_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2frewriter_5fconfig_2eproto; +}; +// ------------------------------------------------------------------- + +class ScopedAllocatorOptions final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.ScopedAllocatorOptions) */ { + public: + inline ScopedAllocatorOptions() : ScopedAllocatorOptions(nullptr) {} + ~ScopedAllocatorOptions() override; + explicit PROTOBUF_CONSTEXPR ScopedAllocatorOptions(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + ScopedAllocatorOptions(const ScopedAllocatorOptions& from); + ScopedAllocatorOptions(ScopedAllocatorOptions&& from) noexcept + : ScopedAllocatorOptions() { + *this = ::std::move(from); + } + + inline ScopedAllocatorOptions& operator=(const ScopedAllocatorOptions& from) { + CopyFrom(from); + return *this; + } + inline ScopedAllocatorOptions& operator=(ScopedAllocatorOptions&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const ScopedAllocatorOptions& default_instance() { + return *internal_default_instance(); + } + static inline const ScopedAllocatorOptions* internal_default_instance() { + return reinterpret_cast( + &_ScopedAllocatorOptions_default_instance_); + } + static constexpr int kIndexInFileMessages = + 1; + + friend void swap(ScopedAllocatorOptions& a, ScopedAllocatorOptions& b) { + a.Swap(&b); + } + inline void Swap(ScopedAllocatorOptions* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(ScopedAllocatorOptions* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + ScopedAllocatorOptions* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const ScopedAllocatorOptions& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const ScopedAllocatorOptions& from) { + ScopedAllocatorOptions::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(ScopedAllocatorOptions* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.ScopedAllocatorOptions"; + } + protected: + explicit ScopedAllocatorOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kEnableOpFieldNumber = 1, + }; + // repeated string enable_op = 1; + int enable_op_size() const; + private: + int _internal_enable_op_size() const; + public: + void clear_enable_op(); + const std::string& enable_op(int index) const; + std::string* mutable_enable_op(int index); + void set_enable_op(int index, const std::string& value); + void set_enable_op(int index, std::string&& value); + void set_enable_op(int index, const char* value); + void set_enable_op(int index, const char* value, size_t size); + std::string* add_enable_op(); + void add_enable_op(const std::string& value); + void add_enable_op(std::string&& value); + void add_enable_op(const char* value); + void add_enable_op(const char* value, size_t size); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& enable_op() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* mutable_enable_op(); + private: + const std::string& _internal_enable_op(int index) const; + std::string* _internal_add_enable_op(); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.ScopedAllocatorOptions) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField enable_op_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2frewriter_5fconfig_2eproto; +}; +// ------------------------------------------------------------------- + +class RewriterConfig_CustomGraphOptimizer_ParameterMapEntry_DoNotUse : public ::PROTOBUF_NAMESPACE_ID::internal::MapEntry { +public: + typedef ::PROTOBUF_NAMESPACE_ID::internal::MapEntry SuperType; + RewriterConfig_CustomGraphOptimizer_ParameterMapEntry_DoNotUse(); + explicit PROTOBUF_CONSTEXPR RewriterConfig_CustomGraphOptimizer_ParameterMapEntry_DoNotUse( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + explicit RewriterConfig_CustomGraphOptimizer_ParameterMapEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena); + void MergeFrom(const RewriterConfig_CustomGraphOptimizer_ParameterMapEntry_DoNotUse& other); + static const RewriterConfig_CustomGraphOptimizer_ParameterMapEntry_DoNotUse* internal_default_instance() { return reinterpret_cast(&_RewriterConfig_CustomGraphOptimizer_ParameterMapEntry_DoNotUse_default_instance_); } + static bool ValidateKey(std::string* s) { + return ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(s->data(), static_cast(s->size()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, "tensorflow.RewriterConfig.CustomGraphOptimizer.ParameterMapEntry.key"); + } + static bool ValidateValue(void*) { return true; } + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2frewriter_5fconfig_2eproto; +}; + +// ------------------------------------------------------------------- + +class RewriterConfig_CustomGraphOptimizer final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.RewriterConfig.CustomGraphOptimizer) */ { + public: + inline RewriterConfig_CustomGraphOptimizer() : RewriterConfig_CustomGraphOptimizer(nullptr) {} + ~RewriterConfig_CustomGraphOptimizer() override; + explicit PROTOBUF_CONSTEXPR RewriterConfig_CustomGraphOptimizer(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + RewriterConfig_CustomGraphOptimizer(const RewriterConfig_CustomGraphOptimizer& from); + RewriterConfig_CustomGraphOptimizer(RewriterConfig_CustomGraphOptimizer&& from) noexcept + : RewriterConfig_CustomGraphOptimizer() { + *this = ::std::move(from); + } + + inline RewriterConfig_CustomGraphOptimizer& operator=(const RewriterConfig_CustomGraphOptimizer& from) { + CopyFrom(from); + return *this; + } + inline RewriterConfig_CustomGraphOptimizer& operator=(RewriterConfig_CustomGraphOptimizer&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const RewriterConfig_CustomGraphOptimizer& default_instance() { + return *internal_default_instance(); + } + static inline const RewriterConfig_CustomGraphOptimizer* internal_default_instance() { + return reinterpret_cast( + &_RewriterConfig_CustomGraphOptimizer_default_instance_); + } + static constexpr int kIndexInFileMessages = + 3; + + friend void swap(RewriterConfig_CustomGraphOptimizer& a, RewriterConfig_CustomGraphOptimizer& b) { + a.Swap(&b); + } + inline void Swap(RewriterConfig_CustomGraphOptimizer* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(RewriterConfig_CustomGraphOptimizer* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + RewriterConfig_CustomGraphOptimizer* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const RewriterConfig_CustomGraphOptimizer& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const RewriterConfig_CustomGraphOptimizer& from) { + RewriterConfig_CustomGraphOptimizer::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(RewriterConfig_CustomGraphOptimizer* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.RewriterConfig.CustomGraphOptimizer"; + } + protected: + explicit RewriterConfig_CustomGraphOptimizer(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + + // accessors ------------------------------------------------------- + + enum : int { + kParameterMapFieldNumber = 2, + kNameFieldNumber = 1, + }; + // map parameter_map = 2; + int parameter_map_size() const; + private: + int _internal_parameter_map_size() const; + public: + void clear_parameter_map(); + private: + const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::AttrValue >& + _internal_parameter_map() const; + ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::AttrValue >* + _internal_mutable_parameter_map(); + public: + const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::AttrValue >& + parameter_map() const; + ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::AttrValue >* + mutable_parameter_map(); + + // string name = 1; + void clear_name(); + const std::string& name() const; + template + void set_name(ArgT0&& arg0, ArgT... args); + std::string* mutable_name(); + PROTOBUF_NODISCARD std::string* release_name(); + void set_allocated_name(std::string* name); + private: + const std::string& _internal_name() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_name(const std::string& value); + std::string* _internal_mutable_name(); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.RewriterConfig.CustomGraphOptimizer) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::MapField< + RewriterConfig_CustomGraphOptimizer_ParameterMapEntry_DoNotUse, + std::string, ::tensorflow::AttrValue, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_MESSAGE> parameter_map_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2frewriter_5fconfig_2eproto; +}; +// ------------------------------------------------------------------- + +class RewriterConfig final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.RewriterConfig) */ { + public: + inline RewriterConfig() : RewriterConfig(nullptr) {} + ~RewriterConfig() override; + explicit PROTOBUF_CONSTEXPR RewriterConfig(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + RewriterConfig(const RewriterConfig& from); + RewriterConfig(RewriterConfig&& from) noexcept + : RewriterConfig() { + *this = ::std::move(from); + } + + inline RewriterConfig& operator=(const RewriterConfig& from) { + CopyFrom(from); + return *this; + } + inline RewriterConfig& operator=(RewriterConfig&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const RewriterConfig& default_instance() { + return *internal_default_instance(); + } + static inline const RewriterConfig* internal_default_instance() { + return reinterpret_cast( + &_RewriterConfig_default_instance_); + } + static constexpr int kIndexInFileMessages = + 4; + + friend void swap(RewriterConfig& a, RewriterConfig& b) { + a.Swap(&b); + } + inline void Swap(RewriterConfig* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(RewriterConfig* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + RewriterConfig* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const RewriterConfig& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const RewriterConfig& from) { + RewriterConfig::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(RewriterConfig* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.RewriterConfig"; + } + protected: + explicit RewriterConfig(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + typedef RewriterConfig_CustomGraphOptimizer CustomGraphOptimizer; + + typedef RewriterConfig_Toggle Toggle; + static constexpr Toggle DEFAULT = + RewriterConfig_Toggle_DEFAULT; + static constexpr Toggle ON = + RewriterConfig_Toggle_ON; + static constexpr Toggle OFF = + RewriterConfig_Toggle_OFF; + static constexpr Toggle AGGRESSIVE = + RewriterConfig_Toggle_AGGRESSIVE; + static constexpr Toggle EXPERIMENTAL_MLIR = + RewriterConfig_Toggle_EXPERIMENTAL_MLIR; + static constexpr Toggle EXPERIMENTAL_BOTH = + RewriterConfig_Toggle_EXPERIMENTAL_BOTH; + static inline bool Toggle_IsValid(int value) { + return RewriterConfig_Toggle_IsValid(value); + } + static constexpr Toggle Toggle_MIN = + RewriterConfig_Toggle_Toggle_MIN; + static constexpr Toggle Toggle_MAX = + RewriterConfig_Toggle_Toggle_MAX; + static constexpr int Toggle_ARRAYSIZE = + RewriterConfig_Toggle_Toggle_ARRAYSIZE; + static inline const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* + Toggle_descriptor() { + return RewriterConfig_Toggle_descriptor(); + } + template + static inline const std::string& Toggle_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function Toggle_Name."); + return RewriterConfig_Toggle_Name(enum_t_value); + } + static inline bool Toggle_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name, + Toggle* value) { + return RewriterConfig_Toggle_Parse(name, value); + } + + typedef RewriterConfig_CpuLayout CpuLayout; + static constexpr CpuLayout NO_CONVERSION_ON_CPU = + RewriterConfig_CpuLayout_NO_CONVERSION_ON_CPU; + static constexpr CpuLayout NCHW_TO_NHWC = + RewriterConfig_CpuLayout_NCHW_TO_NHWC; + static constexpr CpuLayout NHWC_TO_NCHW = + RewriterConfig_CpuLayout_NHWC_TO_NCHW; + static inline bool CpuLayout_IsValid(int value) { + return RewriterConfig_CpuLayout_IsValid(value); + } + static constexpr CpuLayout CpuLayout_MIN = + RewriterConfig_CpuLayout_CpuLayout_MIN; + static constexpr CpuLayout CpuLayout_MAX = + RewriterConfig_CpuLayout_CpuLayout_MAX; + static constexpr int CpuLayout_ARRAYSIZE = + RewriterConfig_CpuLayout_CpuLayout_ARRAYSIZE; + static inline const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* + CpuLayout_descriptor() { + return RewriterConfig_CpuLayout_descriptor(); + } + template + static inline const std::string& CpuLayout_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function CpuLayout_Name."); + return RewriterConfig_CpuLayout_Name(enum_t_value); + } + static inline bool CpuLayout_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name, + CpuLayout* value) { + return RewriterConfig_CpuLayout_Parse(name, value); + } + + typedef RewriterConfig_NumIterationsType NumIterationsType; + static constexpr NumIterationsType DEFAULT_NUM_ITERS = + RewriterConfig_NumIterationsType_DEFAULT_NUM_ITERS; + static constexpr NumIterationsType ONE = + RewriterConfig_NumIterationsType_ONE; + static constexpr NumIterationsType TWO = + RewriterConfig_NumIterationsType_TWO; + static inline bool NumIterationsType_IsValid(int value) { + return RewriterConfig_NumIterationsType_IsValid(value); + } + static constexpr NumIterationsType NumIterationsType_MIN = + RewriterConfig_NumIterationsType_NumIterationsType_MIN; + static constexpr NumIterationsType NumIterationsType_MAX = + RewriterConfig_NumIterationsType_NumIterationsType_MAX; + static constexpr int NumIterationsType_ARRAYSIZE = + RewriterConfig_NumIterationsType_NumIterationsType_ARRAYSIZE; + static inline const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* + NumIterationsType_descriptor() { + return RewriterConfig_NumIterationsType_descriptor(); + } + template + static inline const std::string& NumIterationsType_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function NumIterationsType_Name."); + return RewriterConfig_NumIterationsType_Name(enum_t_value); + } + static inline bool NumIterationsType_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name, + NumIterationsType* value) { + return RewriterConfig_NumIterationsType_Parse(name, value); + } + + typedef RewriterConfig_MemOptType MemOptType; + static constexpr MemOptType DEFAULT_MEM_OPT = + RewriterConfig_MemOptType_DEFAULT_MEM_OPT; + static constexpr MemOptType NO_MEM_OPT = + RewriterConfig_MemOptType_NO_MEM_OPT; + static constexpr MemOptType MANUAL = + RewriterConfig_MemOptType_MANUAL; + static constexpr MemOptType SWAPPING_HEURISTICS = + RewriterConfig_MemOptType_SWAPPING_HEURISTICS; + static constexpr MemOptType RECOMPUTATION_HEURISTICS = + RewriterConfig_MemOptType_RECOMPUTATION_HEURISTICS; + static constexpr MemOptType SCHEDULING_HEURISTICS = + RewriterConfig_MemOptType_SCHEDULING_HEURISTICS; + static constexpr MemOptType HEURISTICS = + RewriterConfig_MemOptType_HEURISTICS; + static inline bool MemOptType_IsValid(int value) { + return RewriterConfig_MemOptType_IsValid(value); + } + static constexpr MemOptType MemOptType_MIN = + RewriterConfig_MemOptType_MemOptType_MIN; + static constexpr MemOptType MemOptType_MAX = + RewriterConfig_MemOptType_MemOptType_MAX; + static constexpr int MemOptType_ARRAYSIZE = + RewriterConfig_MemOptType_MemOptType_ARRAYSIZE; + static inline const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* + MemOptType_descriptor() { + return RewriterConfig_MemOptType_descriptor(); + } + template + static inline const std::string& MemOptType_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function MemOptType_Name."); + return RewriterConfig_MemOptType_Name(enum_t_value); + } + static inline bool MemOptType_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name, + MemOptType* value) { + return RewriterConfig_MemOptType_Parse(name, value); + } + + // accessors ------------------------------------------------------- + + enum : int { + kOptimizersFieldNumber = 100, + kCustomOptimizersFieldNumber = 200, + kMemoryOptimizerTargetNodeNameScopeFieldNumber = 6, + kAutoParallelFieldNumber = 5, + kScopedAllocatorOptsFieldNumber = 16, + kInterOptimizerVerifierConfigFieldNumber = 300, + kPostOptimizationVerifierConfigFieldNumber = 301, + kLayoutOptimizerFieldNumber = 1, + kConstantFoldingFieldNumber = 3, + kMemoryOptimizationFieldNumber = 4, + kArithmeticOptimizationFieldNumber = 7, + kDependencyOptimizationFieldNumber = 8, + kLoopOptimizationFieldNumber = 9, + kFunctionOptimizationFieldNumber = 10, + kDebugStripperFieldNumber = 11, + kMetaOptimizerIterationsFieldNumber = 12, + kShapeOptimizationFieldNumber = 13, + kRemappingFieldNumber = 14, + kScopedAllocatorOptimizationFieldNumber = 15, + kMinGraphNodesFieldNumber = 17, + kPinToHostOptimizationFieldNumber = 18, + kMetaOptimizerTimeoutMsFieldNumber = 20, + kDisableModelPruningFieldNumber = 2, + kDisableMetaOptimizerFieldNumber = 19, + kDisableTfgOptimizerFieldNumber = 32, + kExperimentalDisableCompressedTensorOptimizationFieldNumber = 26, + kImplementationSelectorFieldNumber = 22, + kAutoMixedPrecisionFieldNumber = 23, + kCommonSubgraphEliminationFieldNumber = 24, + kExperimentalDisableFoldingQuantizationEmulationFieldNumber = 27, + kFailOnOptimizerErrorsFieldNumber = 21, + kAutoMixedPrecisionMklFieldNumber = 25, + kUsePluginOptimizersFieldNumber = 28, + kAutoMixedPrecisionCpuFieldNumber = 29, + kExperimentalConditionalCodeMotionFieldNumber = 30, + kAutoMixedPrecisionOnednnBfloat16FieldNumber = 31, + kCpuLayoutConversionFieldNumber = 50, + }; + // repeated string optimizers = 100; + int optimizers_size() const; + private: + int _internal_optimizers_size() const; + public: + void clear_optimizers(); + const std::string& optimizers(int index) const; + std::string* mutable_optimizers(int index); + void set_optimizers(int index, const std::string& value); + void set_optimizers(int index, std::string&& value); + void set_optimizers(int index, const char* value); + void set_optimizers(int index, const char* value, size_t size); + std::string* add_optimizers(); + void add_optimizers(const std::string& value); + void add_optimizers(std::string&& value); + void add_optimizers(const char* value); + void add_optimizers(const char* value, size_t size); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& optimizers() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* mutable_optimizers(); + private: + const std::string& _internal_optimizers(int index) const; + std::string* _internal_add_optimizers(); + public: + + // repeated .tensorflow.RewriterConfig.CustomGraphOptimizer custom_optimizers = 200; + int custom_optimizers_size() const; + private: + int _internal_custom_optimizers_size() const; + public: + void clear_custom_optimizers(); + ::tensorflow::RewriterConfig_CustomGraphOptimizer* mutable_custom_optimizers(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::RewriterConfig_CustomGraphOptimizer >* + mutable_custom_optimizers(); + private: + const ::tensorflow::RewriterConfig_CustomGraphOptimizer& _internal_custom_optimizers(int index) const; + ::tensorflow::RewriterConfig_CustomGraphOptimizer* _internal_add_custom_optimizers(); + public: + const ::tensorflow::RewriterConfig_CustomGraphOptimizer& custom_optimizers(int index) const; + ::tensorflow::RewriterConfig_CustomGraphOptimizer* add_custom_optimizers(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::RewriterConfig_CustomGraphOptimizer >& + custom_optimizers() const; + + // string memory_optimizer_target_node_name_scope = 6; + void clear_memory_optimizer_target_node_name_scope(); + const std::string& memory_optimizer_target_node_name_scope() const; + template + void set_memory_optimizer_target_node_name_scope(ArgT0&& arg0, ArgT... args); + std::string* mutable_memory_optimizer_target_node_name_scope(); + PROTOBUF_NODISCARD std::string* release_memory_optimizer_target_node_name_scope(); + void set_allocated_memory_optimizer_target_node_name_scope(std::string* memory_optimizer_target_node_name_scope); + private: + const std::string& _internal_memory_optimizer_target_node_name_scope() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_memory_optimizer_target_node_name_scope(const std::string& value); + std::string* _internal_mutable_memory_optimizer_target_node_name_scope(); + public: + + // .tensorflow.AutoParallelOptions auto_parallel = 5; + bool has_auto_parallel() const; + private: + bool _internal_has_auto_parallel() const; + public: + void clear_auto_parallel(); + const ::tensorflow::AutoParallelOptions& auto_parallel() const; + PROTOBUF_NODISCARD ::tensorflow::AutoParallelOptions* release_auto_parallel(); + ::tensorflow::AutoParallelOptions* mutable_auto_parallel(); + void set_allocated_auto_parallel(::tensorflow::AutoParallelOptions* auto_parallel); + private: + const ::tensorflow::AutoParallelOptions& _internal_auto_parallel() const; + ::tensorflow::AutoParallelOptions* _internal_mutable_auto_parallel(); + public: + void unsafe_arena_set_allocated_auto_parallel( + ::tensorflow::AutoParallelOptions* auto_parallel); + ::tensorflow::AutoParallelOptions* unsafe_arena_release_auto_parallel(); + + // .tensorflow.ScopedAllocatorOptions scoped_allocator_opts = 16; + bool has_scoped_allocator_opts() const; + private: + bool _internal_has_scoped_allocator_opts() const; + public: + void clear_scoped_allocator_opts(); + const ::tensorflow::ScopedAllocatorOptions& scoped_allocator_opts() const; + PROTOBUF_NODISCARD ::tensorflow::ScopedAllocatorOptions* release_scoped_allocator_opts(); + ::tensorflow::ScopedAllocatorOptions* mutable_scoped_allocator_opts(); + void set_allocated_scoped_allocator_opts(::tensorflow::ScopedAllocatorOptions* scoped_allocator_opts); + private: + const ::tensorflow::ScopedAllocatorOptions& _internal_scoped_allocator_opts() const; + ::tensorflow::ScopedAllocatorOptions* _internal_mutable_scoped_allocator_opts(); + public: + void unsafe_arena_set_allocated_scoped_allocator_opts( + ::tensorflow::ScopedAllocatorOptions* scoped_allocator_opts); + ::tensorflow::ScopedAllocatorOptions* unsafe_arena_release_scoped_allocator_opts(); + + // .tensorflow.VerifierConfig inter_optimizer_verifier_config = 300; + bool has_inter_optimizer_verifier_config() const; + private: + bool _internal_has_inter_optimizer_verifier_config() const; + public: + void clear_inter_optimizer_verifier_config(); + const ::tensorflow::VerifierConfig& inter_optimizer_verifier_config() const; + PROTOBUF_NODISCARD ::tensorflow::VerifierConfig* release_inter_optimizer_verifier_config(); + ::tensorflow::VerifierConfig* mutable_inter_optimizer_verifier_config(); + void set_allocated_inter_optimizer_verifier_config(::tensorflow::VerifierConfig* inter_optimizer_verifier_config); + private: + const ::tensorflow::VerifierConfig& _internal_inter_optimizer_verifier_config() const; + ::tensorflow::VerifierConfig* _internal_mutable_inter_optimizer_verifier_config(); + public: + void unsafe_arena_set_allocated_inter_optimizer_verifier_config( + ::tensorflow::VerifierConfig* inter_optimizer_verifier_config); + ::tensorflow::VerifierConfig* unsafe_arena_release_inter_optimizer_verifier_config(); + + // .tensorflow.VerifierConfig post_optimization_verifier_config = 301; + bool has_post_optimization_verifier_config() const; + private: + bool _internal_has_post_optimization_verifier_config() const; + public: + void clear_post_optimization_verifier_config(); + const ::tensorflow::VerifierConfig& post_optimization_verifier_config() const; + PROTOBUF_NODISCARD ::tensorflow::VerifierConfig* release_post_optimization_verifier_config(); + ::tensorflow::VerifierConfig* mutable_post_optimization_verifier_config(); + void set_allocated_post_optimization_verifier_config(::tensorflow::VerifierConfig* post_optimization_verifier_config); + private: + const ::tensorflow::VerifierConfig& _internal_post_optimization_verifier_config() const; + ::tensorflow::VerifierConfig* _internal_mutable_post_optimization_verifier_config(); + public: + void unsafe_arena_set_allocated_post_optimization_verifier_config( + ::tensorflow::VerifierConfig* post_optimization_verifier_config); + ::tensorflow::VerifierConfig* unsafe_arena_release_post_optimization_verifier_config(); + + // .tensorflow.RewriterConfig.Toggle layout_optimizer = 1; + void clear_layout_optimizer(); + ::tensorflow::RewriterConfig_Toggle layout_optimizer() const; + void set_layout_optimizer(::tensorflow::RewriterConfig_Toggle value); + private: + ::tensorflow::RewriterConfig_Toggle _internal_layout_optimizer() const; + void _internal_set_layout_optimizer(::tensorflow::RewriterConfig_Toggle value); + public: + + // .tensorflow.RewriterConfig.Toggle constant_folding = 3; + void clear_constant_folding(); + ::tensorflow::RewriterConfig_Toggle constant_folding() const; + void set_constant_folding(::tensorflow::RewriterConfig_Toggle value); + private: + ::tensorflow::RewriterConfig_Toggle _internal_constant_folding() const; + void _internal_set_constant_folding(::tensorflow::RewriterConfig_Toggle value); + public: + + // .tensorflow.RewriterConfig.MemOptType memory_optimization = 4; + void clear_memory_optimization(); + ::tensorflow::RewriterConfig_MemOptType memory_optimization() const; + void set_memory_optimization(::tensorflow::RewriterConfig_MemOptType value); + private: + ::tensorflow::RewriterConfig_MemOptType _internal_memory_optimization() const; + void _internal_set_memory_optimization(::tensorflow::RewriterConfig_MemOptType value); + public: + + // .tensorflow.RewriterConfig.Toggle arithmetic_optimization = 7; + void clear_arithmetic_optimization(); + ::tensorflow::RewriterConfig_Toggle arithmetic_optimization() const; + void set_arithmetic_optimization(::tensorflow::RewriterConfig_Toggle value); + private: + ::tensorflow::RewriterConfig_Toggle _internal_arithmetic_optimization() const; + void _internal_set_arithmetic_optimization(::tensorflow::RewriterConfig_Toggle value); + public: + + // .tensorflow.RewriterConfig.Toggle dependency_optimization = 8; + void clear_dependency_optimization(); + ::tensorflow::RewriterConfig_Toggle dependency_optimization() const; + void set_dependency_optimization(::tensorflow::RewriterConfig_Toggle value); + private: + ::tensorflow::RewriterConfig_Toggle _internal_dependency_optimization() const; + void _internal_set_dependency_optimization(::tensorflow::RewriterConfig_Toggle value); + public: + + // .tensorflow.RewriterConfig.Toggle loop_optimization = 9; + void clear_loop_optimization(); + ::tensorflow::RewriterConfig_Toggle loop_optimization() const; + void set_loop_optimization(::tensorflow::RewriterConfig_Toggle value); + private: + ::tensorflow::RewriterConfig_Toggle _internal_loop_optimization() const; + void _internal_set_loop_optimization(::tensorflow::RewriterConfig_Toggle value); + public: + + // .tensorflow.RewriterConfig.Toggle function_optimization = 10; + void clear_function_optimization(); + ::tensorflow::RewriterConfig_Toggle function_optimization() const; + void set_function_optimization(::tensorflow::RewriterConfig_Toggle value); + private: + ::tensorflow::RewriterConfig_Toggle _internal_function_optimization() const; + void _internal_set_function_optimization(::tensorflow::RewriterConfig_Toggle value); + public: + + // .tensorflow.RewriterConfig.Toggle debug_stripper = 11; + void clear_debug_stripper(); + ::tensorflow::RewriterConfig_Toggle debug_stripper() const; + void set_debug_stripper(::tensorflow::RewriterConfig_Toggle value); + private: + ::tensorflow::RewriterConfig_Toggle _internal_debug_stripper() const; + void _internal_set_debug_stripper(::tensorflow::RewriterConfig_Toggle value); + public: + + // .tensorflow.RewriterConfig.NumIterationsType meta_optimizer_iterations = 12; + void clear_meta_optimizer_iterations(); + ::tensorflow::RewriterConfig_NumIterationsType meta_optimizer_iterations() const; + void set_meta_optimizer_iterations(::tensorflow::RewriterConfig_NumIterationsType value); + private: + ::tensorflow::RewriterConfig_NumIterationsType _internal_meta_optimizer_iterations() const; + void _internal_set_meta_optimizer_iterations(::tensorflow::RewriterConfig_NumIterationsType value); + public: + + // .tensorflow.RewriterConfig.Toggle shape_optimization = 13; + void clear_shape_optimization(); + ::tensorflow::RewriterConfig_Toggle shape_optimization() const; + void set_shape_optimization(::tensorflow::RewriterConfig_Toggle value); + private: + ::tensorflow::RewriterConfig_Toggle _internal_shape_optimization() const; + void _internal_set_shape_optimization(::tensorflow::RewriterConfig_Toggle value); + public: + + // .tensorflow.RewriterConfig.Toggle remapping = 14; + void clear_remapping(); + ::tensorflow::RewriterConfig_Toggle remapping() const; + void set_remapping(::tensorflow::RewriterConfig_Toggle value); + private: + ::tensorflow::RewriterConfig_Toggle _internal_remapping() const; + void _internal_set_remapping(::tensorflow::RewriterConfig_Toggle value); + public: + + // .tensorflow.RewriterConfig.Toggle scoped_allocator_optimization = 15; + void clear_scoped_allocator_optimization(); + ::tensorflow::RewriterConfig_Toggle scoped_allocator_optimization() const; + void set_scoped_allocator_optimization(::tensorflow::RewriterConfig_Toggle value); + private: + ::tensorflow::RewriterConfig_Toggle _internal_scoped_allocator_optimization() const; + void _internal_set_scoped_allocator_optimization(::tensorflow::RewriterConfig_Toggle value); + public: + + // int32 min_graph_nodes = 17; + void clear_min_graph_nodes(); + int32_t min_graph_nodes() const; + void set_min_graph_nodes(int32_t value); + private: + int32_t _internal_min_graph_nodes() const; + void _internal_set_min_graph_nodes(int32_t value); + public: + + // .tensorflow.RewriterConfig.Toggle pin_to_host_optimization = 18; + void clear_pin_to_host_optimization(); + ::tensorflow::RewriterConfig_Toggle pin_to_host_optimization() const; + void set_pin_to_host_optimization(::tensorflow::RewriterConfig_Toggle value); + private: + ::tensorflow::RewriterConfig_Toggle _internal_pin_to_host_optimization() const; + void _internal_set_pin_to_host_optimization(::tensorflow::RewriterConfig_Toggle value); + public: + + // int64 meta_optimizer_timeout_ms = 20; + void clear_meta_optimizer_timeout_ms(); + int64_t meta_optimizer_timeout_ms() const; + void set_meta_optimizer_timeout_ms(int64_t value); + private: + int64_t _internal_meta_optimizer_timeout_ms() const; + void _internal_set_meta_optimizer_timeout_ms(int64_t value); + public: + + // bool disable_model_pruning = 2; + void clear_disable_model_pruning(); + bool disable_model_pruning() const; + void set_disable_model_pruning(bool value); + private: + bool _internal_disable_model_pruning() const; + void _internal_set_disable_model_pruning(bool value); + public: + + // bool disable_meta_optimizer = 19; + void clear_disable_meta_optimizer(); + bool disable_meta_optimizer() const; + void set_disable_meta_optimizer(bool value); + private: + bool _internal_disable_meta_optimizer() const; + void _internal_set_disable_meta_optimizer(bool value); + public: + + // bool disable_tfg_optimizer = 32; + void clear_disable_tfg_optimizer(); + bool disable_tfg_optimizer() const; + void set_disable_tfg_optimizer(bool value); + private: + bool _internal_disable_tfg_optimizer() const; + void _internal_set_disable_tfg_optimizer(bool value); + public: + + // bool experimental_disable_compressed_tensor_optimization = 26; + void clear_experimental_disable_compressed_tensor_optimization(); + bool experimental_disable_compressed_tensor_optimization() const; + void set_experimental_disable_compressed_tensor_optimization(bool value); + private: + bool _internal_experimental_disable_compressed_tensor_optimization() const; + void _internal_set_experimental_disable_compressed_tensor_optimization(bool value); + public: + + // .tensorflow.RewriterConfig.Toggle implementation_selector = 22; + void clear_implementation_selector(); + ::tensorflow::RewriterConfig_Toggle implementation_selector() const; + void set_implementation_selector(::tensorflow::RewriterConfig_Toggle value); + private: + ::tensorflow::RewriterConfig_Toggle _internal_implementation_selector() const; + void _internal_set_implementation_selector(::tensorflow::RewriterConfig_Toggle value); + public: + + // .tensorflow.RewriterConfig.Toggle auto_mixed_precision = 23; + void clear_auto_mixed_precision(); + ::tensorflow::RewriterConfig_Toggle auto_mixed_precision() const; + void set_auto_mixed_precision(::tensorflow::RewriterConfig_Toggle value); + private: + ::tensorflow::RewriterConfig_Toggle _internal_auto_mixed_precision() const; + void _internal_set_auto_mixed_precision(::tensorflow::RewriterConfig_Toggle value); + public: + + // .tensorflow.RewriterConfig.Toggle common_subgraph_elimination = 24; + void clear_common_subgraph_elimination(); + ::tensorflow::RewriterConfig_Toggle common_subgraph_elimination() const; + void set_common_subgraph_elimination(::tensorflow::RewriterConfig_Toggle value); + private: + ::tensorflow::RewriterConfig_Toggle _internal_common_subgraph_elimination() const; + void _internal_set_common_subgraph_elimination(::tensorflow::RewriterConfig_Toggle value); + public: + + // bool experimental_disable_folding_quantization_emulation = 27; + void clear_experimental_disable_folding_quantization_emulation(); + bool experimental_disable_folding_quantization_emulation() const; + void set_experimental_disable_folding_quantization_emulation(bool value); + private: + bool _internal_experimental_disable_folding_quantization_emulation() const; + void _internal_set_experimental_disable_folding_quantization_emulation(bool value); + public: + + // bool fail_on_optimizer_errors = 21; + void clear_fail_on_optimizer_errors(); + bool fail_on_optimizer_errors() const; + void set_fail_on_optimizer_errors(bool value); + private: + bool _internal_fail_on_optimizer_errors() const; + void _internal_set_fail_on_optimizer_errors(bool value); + public: + + // .tensorflow.RewriterConfig.Toggle auto_mixed_precision_mkl = 25; + void clear_auto_mixed_precision_mkl(); + ::tensorflow::RewriterConfig_Toggle auto_mixed_precision_mkl() const; + void set_auto_mixed_precision_mkl(::tensorflow::RewriterConfig_Toggle value); + private: + ::tensorflow::RewriterConfig_Toggle _internal_auto_mixed_precision_mkl() const; + void _internal_set_auto_mixed_precision_mkl(::tensorflow::RewriterConfig_Toggle value); + public: + + // .tensorflow.RewriterConfig.Toggle use_plugin_optimizers = 28; + void clear_use_plugin_optimizers(); + ::tensorflow::RewriterConfig_Toggle use_plugin_optimizers() const; + void set_use_plugin_optimizers(::tensorflow::RewriterConfig_Toggle value); + private: + ::tensorflow::RewriterConfig_Toggle _internal_use_plugin_optimizers() const; + void _internal_set_use_plugin_optimizers(::tensorflow::RewriterConfig_Toggle value); + public: + + // .tensorflow.RewriterConfig.Toggle auto_mixed_precision_cpu = 29; + void clear_auto_mixed_precision_cpu(); + ::tensorflow::RewriterConfig_Toggle auto_mixed_precision_cpu() const; + void set_auto_mixed_precision_cpu(::tensorflow::RewriterConfig_Toggle value); + private: + ::tensorflow::RewriterConfig_Toggle _internal_auto_mixed_precision_cpu() const; + void _internal_set_auto_mixed_precision_cpu(::tensorflow::RewriterConfig_Toggle value); + public: + + // .tensorflow.RewriterConfig.Toggle experimental_conditional_code_motion = 30; + void clear_experimental_conditional_code_motion(); + ::tensorflow::RewriterConfig_Toggle experimental_conditional_code_motion() const; + void set_experimental_conditional_code_motion(::tensorflow::RewriterConfig_Toggle value); + private: + ::tensorflow::RewriterConfig_Toggle _internal_experimental_conditional_code_motion() const; + void _internal_set_experimental_conditional_code_motion(::tensorflow::RewriterConfig_Toggle value); + public: + + // .tensorflow.RewriterConfig.Toggle auto_mixed_precision_onednn_bfloat16 = 31; + void clear_auto_mixed_precision_onednn_bfloat16(); + ::tensorflow::RewriterConfig_Toggle auto_mixed_precision_onednn_bfloat16() const; + void set_auto_mixed_precision_onednn_bfloat16(::tensorflow::RewriterConfig_Toggle value); + private: + ::tensorflow::RewriterConfig_Toggle _internal_auto_mixed_precision_onednn_bfloat16() const; + void _internal_set_auto_mixed_precision_onednn_bfloat16(::tensorflow::RewriterConfig_Toggle value); + public: + + // .tensorflow.RewriterConfig.CpuLayout cpu_layout_conversion = 50; + void clear_cpu_layout_conversion(); + ::tensorflow::RewriterConfig_CpuLayout cpu_layout_conversion() const; + void set_cpu_layout_conversion(::tensorflow::RewriterConfig_CpuLayout value); + private: + ::tensorflow::RewriterConfig_CpuLayout _internal_cpu_layout_conversion() const; + void _internal_set_cpu_layout_conversion(::tensorflow::RewriterConfig_CpuLayout value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.RewriterConfig) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField optimizers_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::RewriterConfig_CustomGraphOptimizer > custom_optimizers_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr memory_optimizer_target_node_name_scope_; + ::tensorflow::AutoParallelOptions* auto_parallel_; + ::tensorflow::ScopedAllocatorOptions* scoped_allocator_opts_; + ::tensorflow::VerifierConfig* inter_optimizer_verifier_config_; + ::tensorflow::VerifierConfig* post_optimization_verifier_config_; + int layout_optimizer_; + int constant_folding_; + int memory_optimization_; + int arithmetic_optimization_; + int dependency_optimization_; + int loop_optimization_; + int function_optimization_; + int debug_stripper_; + int meta_optimizer_iterations_; + int shape_optimization_; + int remapping_; + int scoped_allocator_optimization_; + int32_t min_graph_nodes_; + int pin_to_host_optimization_; + int64_t meta_optimizer_timeout_ms_; + bool disable_model_pruning_; + bool disable_meta_optimizer_; + bool disable_tfg_optimizer_; + bool experimental_disable_compressed_tensor_optimization_; + int implementation_selector_; + int auto_mixed_precision_; + int common_subgraph_elimination_; + bool experimental_disable_folding_quantization_emulation_; + bool fail_on_optimizer_errors_; + int auto_mixed_precision_mkl_; + int use_plugin_optimizers_; + int auto_mixed_precision_cpu_; + int experimental_conditional_code_motion_; + int auto_mixed_precision_onednn_bfloat16_; + int cpu_layout_conversion_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2frewriter_5fconfig_2eproto; +}; +// =================================================================== + + +// =================================================================== + +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// AutoParallelOptions + +// bool enable = 1; +inline void AutoParallelOptions::clear_enable() { + _impl_.enable_ = false; +} +inline bool AutoParallelOptions::_internal_enable() const { + return _impl_.enable_; +} +inline bool AutoParallelOptions::enable() const { + // @@protoc_insertion_point(field_get:tensorflow.AutoParallelOptions.enable) + return _internal_enable(); +} +inline void AutoParallelOptions::_internal_set_enable(bool value) { + + _impl_.enable_ = value; +} +inline void AutoParallelOptions::set_enable(bool value) { + _internal_set_enable(value); + // @@protoc_insertion_point(field_set:tensorflow.AutoParallelOptions.enable) +} + +// int32 num_replicas = 2; +inline void AutoParallelOptions::clear_num_replicas() { + _impl_.num_replicas_ = 0; +} +inline int32_t AutoParallelOptions::_internal_num_replicas() const { + return _impl_.num_replicas_; +} +inline int32_t AutoParallelOptions::num_replicas() const { + // @@protoc_insertion_point(field_get:tensorflow.AutoParallelOptions.num_replicas) + return _internal_num_replicas(); +} +inline void AutoParallelOptions::_internal_set_num_replicas(int32_t value) { + + _impl_.num_replicas_ = value; +} +inline void AutoParallelOptions::set_num_replicas(int32_t value) { + _internal_set_num_replicas(value); + // @@protoc_insertion_point(field_set:tensorflow.AutoParallelOptions.num_replicas) +} + +// ------------------------------------------------------------------- + +// ScopedAllocatorOptions + +// repeated string enable_op = 1; +inline int ScopedAllocatorOptions::_internal_enable_op_size() const { + return _impl_.enable_op_.size(); +} +inline int ScopedAllocatorOptions::enable_op_size() const { + return _internal_enable_op_size(); +} +inline void ScopedAllocatorOptions::clear_enable_op() { + _impl_.enable_op_.Clear(); +} +inline std::string* ScopedAllocatorOptions::add_enable_op() { + std::string* _s = _internal_add_enable_op(); + // @@protoc_insertion_point(field_add_mutable:tensorflow.ScopedAllocatorOptions.enable_op) + return _s; +} +inline const std::string& ScopedAllocatorOptions::_internal_enable_op(int index) const { + return _impl_.enable_op_.Get(index); +} +inline const std::string& ScopedAllocatorOptions::enable_op(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.ScopedAllocatorOptions.enable_op) + return _internal_enable_op(index); +} +inline std::string* ScopedAllocatorOptions::mutable_enable_op(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.ScopedAllocatorOptions.enable_op) + return _impl_.enable_op_.Mutable(index); +} +inline void ScopedAllocatorOptions::set_enable_op(int index, const std::string& value) { + _impl_.enable_op_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set:tensorflow.ScopedAllocatorOptions.enable_op) +} +inline void ScopedAllocatorOptions::set_enable_op(int index, std::string&& value) { + _impl_.enable_op_.Mutable(index)->assign(std::move(value)); + // @@protoc_insertion_point(field_set:tensorflow.ScopedAllocatorOptions.enable_op) +} +inline void ScopedAllocatorOptions::set_enable_op(int index, const char* value) { + GOOGLE_DCHECK(value != nullptr); + _impl_.enable_op_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set_char:tensorflow.ScopedAllocatorOptions.enable_op) +} +inline void ScopedAllocatorOptions::set_enable_op(int index, const char* value, size_t size) { + _impl_.enable_op_.Mutable(index)->assign( + reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:tensorflow.ScopedAllocatorOptions.enable_op) +} +inline std::string* ScopedAllocatorOptions::_internal_add_enable_op() { + return _impl_.enable_op_.Add(); +} +inline void ScopedAllocatorOptions::add_enable_op(const std::string& value) { + _impl_.enable_op_.Add()->assign(value); + // @@protoc_insertion_point(field_add:tensorflow.ScopedAllocatorOptions.enable_op) +} +inline void ScopedAllocatorOptions::add_enable_op(std::string&& value) { + _impl_.enable_op_.Add(std::move(value)); + // @@protoc_insertion_point(field_add:tensorflow.ScopedAllocatorOptions.enable_op) +} +inline void ScopedAllocatorOptions::add_enable_op(const char* value) { + GOOGLE_DCHECK(value != nullptr); + _impl_.enable_op_.Add()->assign(value); + // @@protoc_insertion_point(field_add_char:tensorflow.ScopedAllocatorOptions.enable_op) +} +inline void ScopedAllocatorOptions::add_enable_op(const char* value, size_t size) { + _impl_.enable_op_.Add()->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_add_pointer:tensorflow.ScopedAllocatorOptions.enable_op) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& +ScopedAllocatorOptions::enable_op() const { + // @@protoc_insertion_point(field_list:tensorflow.ScopedAllocatorOptions.enable_op) + return _impl_.enable_op_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* +ScopedAllocatorOptions::mutable_enable_op() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.ScopedAllocatorOptions.enable_op) + return &_impl_.enable_op_; +} + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// RewriterConfig_CustomGraphOptimizer + +// string name = 1; +inline void RewriterConfig_CustomGraphOptimizer::clear_name() { + _impl_.name_.ClearToEmpty(); +} +inline const std::string& RewriterConfig_CustomGraphOptimizer::name() const { + // @@protoc_insertion_point(field_get:tensorflow.RewriterConfig.CustomGraphOptimizer.name) + return _internal_name(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void RewriterConfig_CustomGraphOptimizer::set_name(ArgT0&& arg0, ArgT... args) { + + _impl_.name_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.RewriterConfig.CustomGraphOptimizer.name) +} +inline std::string* RewriterConfig_CustomGraphOptimizer::mutable_name() { + std::string* _s = _internal_mutable_name(); + // @@protoc_insertion_point(field_mutable:tensorflow.RewriterConfig.CustomGraphOptimizer.name) + return _s; +} +inline const std::string& RewriterConfig_CustomGraphOptimizer::_internal_name() const { + return _impl_.name_.Get(); +} +inline void RewriterConfig_CustomGraphOptimizer::_internal_set_name(const std::string& value) { + + _impl_.name_.Set(value, GetArenaForAllocation()); +} +inline std::string* RewriterConfig_CustomGraphOptimizer::_internal_mutable_name() { + + return _impl_.name_.Mutable(GetArenaForAllocation()); +} +inline std::string* RewriterConfig_CustomGraphOptimizer::release_name() { + // @@protoc_insertion_point(field_release:tensorflow.RewriterConfig.CustomGraphOptimizer.name) + return _impl_.name_.Release(); +} +inline void RewriterConfig_CustomGraphOptimizer::set_allocated_name(std::string* name) { + if (name != nullptr) { + + } else { + + } + _impl_.name_.SetAllocated(name, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.name_.IsDefault()) { + _impl_.name_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.RewriterConfig.CustomGraphOptimizer.name) +} + +// map parameter_map = 2; +inline int RewriterConfig_CustomGraphOptimizer::_internal_parameter_map_size() const { + return _impl_.parameter_map_.size(); +} +inline int RewriterConfig_CustomGraphOptimizer::parameter_map_size() const { + return _internal_parameter_map_size(); +} +inline const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::AttrValue >& +RewriterConfig_CustomGraphOptimizer::_internal_parameter_map() const { + return _impl_.parameter_map_.GetMap(); +} +inline const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::AttrValue >& +RewriterConfig_CustomGraphOptimizer::parameter_map() const { + // @@protoc_insertion_point(field_map:tensorflow.RewriterConfig.CustomGraphOptimizer.parameter_map) + return _internal_parameter_map(); +} +inline ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::AttrValue >* +RewriterConfig_CustomGraphOptimizer::_internal_mutable_parameter_map() { + return _impl_.parameter_map_.MutableMap(); +} +inline ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::AttrValue >* +RewriterConfig_CustomGraphOptimizer::mutable_parameter_map() { + // @@protoc_insertion_point(field_mutable_map:tensorflow.RewriterConfig.CustomGraphOptimizer.parameter_map) + return _internal_mutable_parameter_map(); +} + +// ------------------------------------------------------------------- + +// RewriterConfig + +// .tensorflow.RewriterConfig.CpuLayout cpu_layout_conversion = 50; +inline void RewriterConfig::clear_cpu_layout_conversion() { + _impl_.cpu_layout_conversion_ = 0; +} +inline ::tensorflow::RewriterConfig_CpuLayout RewriterConfig::_internal_cpu_layout_conversion() const { + return static_cast< ::tensorflow::RewriterConfig_CpuLayout >(_impl_.cpu_layout_conversion_); +} +inline ::tensorflow::RewriterConfig_CpuLayout RewriterConfig::cpu_layout_conversion() const { + // @@protoc_insertion_point(field_get:tensorflow.RewriterConfig.cpu_layout_conversion) + return _internal_cpu_layout_conversion(); +} +inline void RewriterConfig::_internal_set_cpu_layout_conversion(::tensorflow::RewriterConfig_CpuLayout value) { + + _impl_.cpu_layout_conversion_ = value; +} +inline void RewriterConfig::set_cpu_layout_conversion(::tensorflow::RewriterConfig_CpuLayout value) { + _internal_set_cpu_layout_conversion(value); + // @@protoc_insertion_point(field_set:tensorflow.RewriterConfig.cpu_layout_conversion) +} + +// .tensorflow.RewriterConfig.Toggle layout_optimizer = 1; +inline void RewriterConfig::clear_layout_optimizer() { + _impl_.layout_optimizer_ = 0; +} +inline ::tensorflow::RewriterConfig_Toggle RewriterConfig::_internal_layout_optimizer() const { + return static_cast< ::tensorflow::RewriterConfig_Toggle >(_impl_.layout_optimizer_); +} +inline ::tensorflow::RewriterConfig_Toggle RewriterConfig::layout_optimizer() const { + // @@protoc_insertion_point(field_get:tensorflow.RewriterConfig.layout_optimizer) + return _internal_layout_optimizer(); +} +inline void RewriterConfig::_internal_set_layout_optimizer(::tensorflow::RewriterConfig_Toggle value) { + + _impl_.layout_optimizer_ = value; +} +inline void RewriterConfig::set_layout_optimizer(::tensorflow::RewriterConfig_Toggle value) { + _internal_set_layout_optimizer(value); + // @@protoc_insertion_point(field_set:tensorflow.RewriterConfig.layout_optimizer) +} + +// .tensorflow.RewriterConfig.Toggle constant_folding = 3; +inline void RewriterConfig::clear_constant_folding() { + _impl_.constant_folding_ = 0; +} +inline ::tensorflow::RewriterConfig_Toggle RewriterConfig::_internal_constant_folding() const { + return static_cast< ::tensorflow::RewriterConfig_Toggle >(_impl_.constant_folding_); +} +inline ::tensorflow::RewriterConfig_Toggle RewriterConfig::constant_folding() const { + // @@protoc_insertion_point(field_get:tensorflow.RewriterConfig.constant_folding) + return _internal_constant_folding(); +} +inline void RewriterConfig::_internal_set_constant_folding(::tensorflow::RewriterConfig_Toggle value) { + + _impl_.constant_folding_ = value; +} +inline void RewriterConfig::set_constant_folding(::tensorflow::RewriterConfig_Toggle value) { + _internal_set_constant_folding(value); + // @@protoc_insertion_point(field_set:tensorflow.RewriterConfig.constant_folding) +} + +// .tensorflow.RewriterConfig.Toggle shape_optimization = 13; +inline void RewriterConfig::clear_shape_optimization() { + _impl_.shape_optimization_ = 0; +} +inline ::tensorflow::RewriterConfig_Toggle RewriterConfig::_internal_shape_optimization() const { + return static_cast< ::tensorflow::RewriterConfig_Toggle >(_impl_.shape_optimization_); +} +inline ::tensorflow::RewriterConfig_Toggle RewriterConfig::shape_optimization() const { + // @@protoc_insertion_point(field_get:tensorflow.RewriterConfig.shape_optimization) + return _internal_shape_optimization(); +} +inline void RewriterConfig::_internal_set_shape_optimization(::tensorflow::RewriterConfig_Toggle value) { + + _impl_.shape_optimization_ = value; +} +inline void RewriterConfig::set_shape_optimization(::tensorflow::RewriterConfig_Toggle value) { + _internal_set_shape_optimization(value); + // @@protoc_insertion_point(field_set:tensorflow.RewriterConfig.shape_optimization) +} + +// .tensorflow.RewriterConfig.Toggle remapping = 14; +inline void RewriterConfig::clear_remapping() { + _impl_.remapping_ = 0; +} +inline ::tensorflow::RewriterConfig_Toggle RewriterConfig::_internal_remapping() const { + return static_cast< ::tensorflow::RewriterConfig_Toggle >(_impl_.remapping_); +} +inline ::tensorflow::RewriterConfig_Toggle RewriterConfig::remapping() const { + // @@protoc_insertion_point(field_get:tensorflow.RewriterConfig.remapping) + return _internal_remapping(); +} +inline void RewriterConfig::_internal_set_remapping(::tensorflow::RewriterConfig_Toggle value) { + + _impl_.remapping_ = value; +} +inline void RewriterConfig::set_remapping(::tensorflow::RewriterConfig_Toggle value) { + _internal_set_remapping(value); + // @@protoc_insertion_point(field_set:tensorflow.RewriterConfig.remapping) +} + +// .tensorflow.RewriterConfig.Toggle common_subgraph_elimination = 24; +inline void RewriterConfig::clear_common_subgraph_elimination() { + _impl_.common_subgraph_elimination_ = 0; +} +inline ::tensorflow::RewriterConfig_Toggle RewriterConfig::_internal_common_subgraph_elimination() const { + return static_cast< ::tensorflow::RewriterConfig_Toggle >(_impl_.common_subgraph_elimination_); +} +inline ::tensorflow::RewriterConfig_Toggle RewriterConfig::common_subgraph_elimination() const { + // @@protoc_insertion_point(field_get:tensorflow.RewriterConfig.common_subgraph_elimination) + return _internal_common_subgraph_elimination(); +} +inline void RewriterConfig::_internal_set_common_subgraph_elimination(::tensorflow::RewriterConfig_Toggle value) { + + _impl_.common_subgraph_elimination_ = value; +} +inline void RewriterConfig::set_common_subgraph_elimination(::tensorflow::RewriterConfig_Toggle value) { + _internal_set_common_subgraph_elimination(value); + // @@protoc_insertion_point(field_set:tensorflow.RewriterConfig.common_subgraph_elimination) +} + +// .tensorflow.RewriterConfig.Toggle arithmetic_optimization = 7; +inline void RewriterConfig::clear_arithmetic_optimization() { + _impl_.arithmetic_optimization_ = 0; +} +inline ::tensorflow::RewriterConfig_Toggle RewriterConfig::_internal_arithmetic_optimization() const { + return static_cast< ::tensorflow::RewriterConfig_Toggle >(_impl_.arithmetic_optimization_); +} +inline ::tensorflow::RewriterConfig_Toggle RewriterConfig::arithmetic_optimization() const { + // @@protoc_insertion_point(field_get:tensorflow.RewriterConfig.arithmetic_optimization) + return _internal_arithmetic_optimization(); +} +inline void RewriterConfig::_internal_set_arithmetic_optimization(::tensorflow::RewriterConfig_Toggle value) { + + _impl_.arithmetic_optimization_ = value; +} +inline void RewriterConfig::set_arithmetic_optimization(::tensorflow::RewriterConfig_Toggle value) { + _internal_set_arithmetic_optimization(value); + // @@protoc_insertion_point(field_set:tensorflow.RewriterConfig.arithmetic_optimization) +} + +// .tensorflow.RewriterConfig.Toggle dependency_optimization = 8; +inline void RewriterConfig::clear_dependency_optimization() { + _impl_.dependency_optimization_ = 0; +} +inline ::tensorflow::RewriterConfig_Toggle RewriterConfig::_internal_dependency_optimization() const { + return static_cast< ::tensorflow::RewriterConfig_Toggle >(_impl_.dependency_optimization_); +} +inline ::tensorflow::RewriterConfig_Toggle RewriterConfig::dependency_optimization() const { + // @@protoc_insertion_point(field_get:tensorflow.RewriterConfig.dependency_optimization) + return _internal_dependency_optimization(); +} +inline void RewriterConfig::_internal_set_dependency_optimization(::tensorflow::RewriterConfig_Toggle value) { + + _impl_.dependency_optimization_ = value; +} +inline void RewriterConfig::set_dependency_optimization(::tensorflow::RewriterConfig_Toggle value) { + _internal_set_dependency_optimization(value); + // @@protoc_insertion_point(field_set:tensorflow.RewriterConfig.dependency_optimization) +} + +// .tensorflow.RewriterConfig.Toggle loop_optimization = 9; +inline void RewriterConfig::clear_loop_optimization() { + _impl_.loop_optimization_ = 0; +} +inline ::tensorflow::RewriterConfig_Toggle RewriterConfig::_internal_loop_optimization() const { + return static_cast< ::tensorflow::RewriterConfig_Toggle >(_impl_.loop_optimization_); +} +inline ::tensorflow::RewriterConfig_Toggle RewriterConfig::loop_optimization() const { + // @@protoc_insertion_point(field_get:tensorflow.RewriterConfig.loop_optimization) + return _internal_loop_optimization(); +} +inline void RewriterConfig::_internal_set_loop_optimization(::tensorflow::RewriterConfig_Toggle value) { + + _impl_.loop_optimization_ = value; +} +inline void RewriterConfig::set_loop_optimization(::tensorflow::RewriterConfig_Toggle value) { + _internal_set_loop_optimization(value); + // @@protoc_insertion_point(field_set:tensorflow.RewriterConfig.loop_optimization) +} + +// .tensorflow.RewriterConfig.Toggle function_optimization = 10; +inline void RewriterConfig::clear_function_optimization() { + _impl_.function_optimization_ = 0; +} +inline ::tensorflow::RewriterConfig_Toggle RewriterConfig::_internal_function_optimization() const { + return static_cast< ::tensorflow::RewriterConfig_Toggle >(_impl_.function_optimization_); +} +inline ::tensorflow::RewriterConfig_Toggle RewriterConfig::function_optimization() const { + // @@protoc_insertion_point(field_get:tensorflow.RewriterConfig.function_optimization) + return _internal_function_optimization(); +} +inline void RewriterConfig::_internal_set_function_optimization(::tensorflow::RewriterConfig_Toggle value) { + + _impl_.function_optimization_ = value; +} +inline void RewriterConfig::set_function_optimization(::tensorflow::RewriterConfig_Toggle value) { + _internal_set_function_optimization(value); + // @@protoc_insertion_point(field_set:tensorflow.RewriterConfig.function_optimization) +} + +// .tensorflow.RewriterConfig.Toggle debug_stripper = 11; +inline void RewriterConfig::clear_debug_stripper() { + _impl_.debug_stripper_ = 0; +} +inline ::tensorflow::RewriterConfig_Toggle RewriterConfig::_internal_debug_stripper() const { + return static_cast< ::tensorflow::RewriterConfig_Toggle >(_impl_.debug_stripper_); +} +inline ::tensorflow::RewriterConfig_Toggle RewriterConfig::debug_stripper() const { + // @@protoc_insertion_point(field_get:tensorflow.RewriterConfig.debug_stripper) + return _internal_debug_stripper(); +} +inline void RewriterConfig::_internal_set_debug_stripper(::tensorflow::RewriterConfig_Toggle value) { + + _impl_.debug_stripper_ = value; +} +inline void RewriterConfig::set_debug_stripper(::tensorflow::RewriterConfig_Toggle value) { + _internal_set_debug_stripper(value); + // @@protoc_insertion_point(field_set:tensorflow.RewriterConfig.debug_stripper) +} + +// bool disable_model_pruning = 2; +inline void RewriterConfig::clear_disable_model_pruning() { + _impl_.disable_model_pruning_ = false; +} +inline bool RewriterConfig::_internal_disable_model_pruning() const { + return _impl_.disable_model_pruning_; +} +inline bool RewriterConfig::disable_model_pruning() const { + // @@protoc_insertion_point(field_get:tensorflow.RewriterConfig.disable_model_pruning) + return _internal_disable_model_pruning(); +} +inline void RewriterConfig::_internal_set_disable_model_pruning(bool value) { + + _impl_.disable_model_pruning_ = value; +} +inline void RewriterConfig::set_disable_model_pruning(bool value) { + _internal_set_disable_model_pruning(value); + // @@protoc_insertion_point(field_set:tensorflow.RewriterConfig.disable_model_pruning) +} + +// .tensorflow.RewriterConfig.Toggle scoped_allocator_optimization = 15; +inline void RewriterConfig::clear_scoped_allocator_optimization() { + _impl_.scoped_allocator_optimization_ = 0; +} +inline ::tensorflow::RewriterConfig_Toggle RewriterConfig::_internal_scoped_allocator_optimization() const { + return static_cast< ::tensorflow::RewriterConfig_Toggle >(_impl_.scoped_allocator_optimization_); +} +inline ::tensorflow::RewriterConfig_Toggle RewriterConfig::scoped_allocator_optimization() const { + // @@protoc_insertion_point(field_get:tensorflow.RewriterConfig.scoped_allocator_optimization) + return _internal_scoped_allocator_optimization(); +} +inline void RewriterConfig::_internal_set_scoped_allocator_optimization(::tensorflow::RewriterConfig_Toggle value) { + + _impl_.scoped_allocator_optimization_ = value; +} +inline void RewriterConfig::set_scoped_allocator_optimization(::tensorflow::RewriterConfig_Toggle value) { + _internal_set_scoped_allocator_optimization(value); + // @@protoc_insertion_point(field_set:tensorflow.RewriterConfig.scoped_allocator_optimization) +} + +// .tensorflow.RewriterConfig.Toggle pin_to_host_optimization = 18; +inline void RewriterConfig::clear_pin_to_host_optimization() { + _impl_.pin_to_host_optimization_ = 0; +} +inline ::tensorflow::RewriterConfig_Toggle RewriterConfig::_internal_pin_to_host_optimization() const { + return static_cast< ::tensorflow::RewriterConfig_Toggle >(_impl_.pin_to_host_optimization_); +} +inline ::tensorflow::RewriterConfig_Toggle RewriterConfig::pin_to_host_optimization() const { + // @@protoc_insertion_point(field_get:tensorflow.RewriterConfig.pin_to_host_optimization) + return _internal_pin_to_host_optimization(); +} +inline void RewriterConfig::_internal_set_pin_to_host_optimization(::tensorflow::RewriterConfig_Toggle value) { + + _impl_.pin_to_host_optimization_ = value; +} +inline void RewriterConfig::set_pin_to_host_optimization(::tensorflow::RewriterConfig_Toggle value) { + _internal_set_pin_to_host_optimization(value); + // @@protoc_insertion_point(field_set:tensorflow.RewriterConfig.pin_to_host_optimization) +} + +// .tensorflow.RewriterConfig.Toggle implementation_selector = 22; +inline void RewriterConfig::clear_implementation_selector() { + _impl_.implementation_selector_ = 0; +} +inline ::tensorflow::RewriterConfig_Toggle RewriterConfig::_internal_implementation_selector() const { + return static_cast< ::tensorflow::RewriterConfig_Toggle >(_impl_.implementation_selector_); +} +inline ::tensorflow::RewriterConfig_Toggle RewriterConfig::implementation_selector() const { + // @@protoc_insertion_point(field_get:tensorflow.RewriterConfig.implementation_selector) + return _internal_implementation_selector(); +} +inline void RewriterConfig::_internal_set_implementation_selector(::tensorflow::RewriterConfig_Toggle value) { + + _impl_.implementation_selector_ = value; +} +inline void RewriterConfig::set_implementation_selector(::tensorflow::RewriterConfig_Toggle value) { + _internal_set_implementation_selector(value); + // @@protoc_insertion_point(field_set:tensorflow.RewriterConfig.implementation_selector) +} + +// .tensorflow.RewriterConfig.Toggle auto_mixed_precision = 23; +inline void RewriterConfig::clear_auto_mixed_precision() { + _impl_.auto_mixed_precision_ = 0; +} +inline ::tensorflow::RewriterConfig_Toggle RewriterConfig::_internal_auto_mixed_precision() const { + return static_cast< ::tensorflow::RewriterConfig_Toggle >(_impl_.auto_mixed_precision_); +} +inline ::tensorflow::RewriterConfig_Toggle RewriterConfig::auto_mixed_precision() const { + // @@protoc_insertion_point(field_get:tensorflow.RewriterConfig.auto_mixed_precision) + return _internal_auto_mixed_precision(); +} +inline void RewriterConfig::_internal_set_auto_mixed_precision(::tensorflow::RewriterConfig_Toggle value) { + + _impl_.auto_mixed_precision_ = value; +} +inline void RewriterConfig::set_auto_mixed_precision(::tensorflow::RewriterConfig_Toggle value) { + _internal_set_auto_mixed_precision(value); + // @@protoc_insertion_point(field_set:tensorflow.RewriterConfig.auto_mixed_precision) +} + +// .tensorflow.RewriterConfig.Toggle auto_mixed_precision_mkl = 25; +inline void RewriterConfig::clear_auto_mixed_precision_mkl() { + _impl_.auto_mixed_precision_mkl_ = 0; +} +inline ::tensorflow::RewriterConfig_Toggle RewriterConfig::_internal_auto_mixed_precision_mkl() const { + return static_cast< ::tensorflow::RewriterConfig_Toggle >(_impl_.auto_mixed_precision_mkl_); +} +inline ::tensorflow::RewriterConfig_Toggle RewriterConfig::auto_mixed_precision_mkl() const { + // @@protoc_insertion_point(field_get:tensorflow.RewriterConfig.auto_mixed_precision_mkl) + return _internal_auto_mixed_precision_mkl(); +} +inline void RewriterConfig::_internal_set_auto_mixed_precision_mkl(::tensorflow::RewriterConfig_Toggle value) { + + _impl_.auto_mixed_precision_mkl_ = value; +} +inline void RewriterConfig::set_auto_mixed_precision_mkl(::tensorflow::RewriterConfig_Toggle value) { + _internal_set_auto_mixed_precision_mkl(value); + // @@protoc_insertion_point(field_set:tensorflow.RewriterConfig.auto_mixed_precision_mkl) +} + +// .tensorflow.RewriterConfig.Toggle auto_mixed_precision_onednn_bfloat16 = 31; +inline void RewriterConfig::clear_auto_mixed_precision_onednn_bfloat16() { + _impl_.auto_mixed_precision_onednn_bfloat16_ = 0; +} +inline ::tensorflow::RewriterConfig_Toggle RewriterConfig::_internal_auto_mixed_precision_onednn_bfloat16() const { + return static_cast< ::tensorflow::RewriterConfig_Toggle >(_impl_.auto_mixed_precision_onednn_bfloat16_); +} +inline ::tensorflow::RewriterConfig_Toggle RewriterConfig::auto_mixed_precision_onednn_bfloat16() const { + // @@protoc_insertion_point(field_get:tensorflow.RewriterConfig.auto_mixed_precision_onednn_bfloat16) + return _internal_auto_mixed_precision_onednn_bfloat16(); +} +inline void RewriterConfig::_internal_set_auto_mixed_precision_onednn_bfloat16(::tensorflow::RewriterConfig_Toggle value) { + + _impl_.auto_mixed_precision_onednn_bfloat16_ = value; +} +inline void RewriterConfig::set_auto_mixed_precision_onednn_bfloat16(::tensorflow::RewriterConfig_Toggle value) { + _internal_set_auto_mixed_precision_onednn_bfloat16(value); + // @@protoc_insertion_point(field_set:tensorflow.RewriterConfig.auto_mixed_precision_onednn_bfloat16) +} + +// .tensorflow.RewriterConfig.Toggle auto_mixed_precision_cpu = 29; +inline void RewriterConfig::clear_auto_mixed_precision_cpu() { + _impl_.auto_mixed_precision_cpu_ = 0; +} +inline ::tensorflow::RewriterConfig_Toggle RewriterConfig::_internal_auto_mixed_precision_cpu() const { + return static_cast< ::tensorflow::RewriterConfig_Toggle >(_impl_.auto_mixed_precision_cpu_); +} +inline ::tensorflow::RewriterConfig_Toggle RewriterConfig::auto_mixed_precision_cpu() const { + // @@protoc_insertion_point(field_get:tensorflow.RewriterConfig.auto_mixed_precision_cpu) + return _internal_auto_mixed_precision_cpu(); +} +inline void RewriterConfig::_internal_set_auto_mixed_precision_cpu(::tensorflow::RewriterConfig_Toggle value) { + + _impl_.auto_mixed_precision_cpu_ = value; +} +inline void RewriterConfig::set_auto_mixed_precision_cpu(::tensorflow::RewriterConfig_Toggle value) { + _internal_set_auto_mixed_precision_cpu(value); + // @@protoc_insertion_point(field_set:tensorflow.RewriterConfig.auto_mixed_precision_cpu) +} + +// bool disable_meta_optimizer = 19; +inline void RewriterConfig::clear_disable_meta_optimizer() { + _impl_.disable_meta_optimizer_ = false; +} +inline bool RewriterConfig::_internal_disable_meta_optimizer() const { + return _impl_.disable_meta_optimizer_; +} +inline bool RewriterConfig::disable_meta_optimizer() const { + // @@protoc_insertion_point(field_get:tensorflow.RewriterConfig.disable_meta_optimizer) + return _internal_disable_meta_optimizer(); +} +inline void RewriterConfig::_internal_set_disable_meta_optimizer(bool value) { + + _impl_.disable_meta_optimizer_ = value; +} +inline void RewriterConfig::set_disable_meta_optimizer(bool value) { + _internal_set_disable_meta_optimizer(value); + // @@protoc_insertion_point(field_set:tensorflow.RewriterConfig.disable_meta_optimizer) +} + +// bool disable_tfg_optimizer = 32; +inline void RewriterConfig::clear_disable_tfg_optimizer() { + _impl_.disable_tfg_optimizer_ = false; +} +inline bool RewriterConfig::_internal_disable_tfg_optimizer() const { + return _impl_.disable_tfg_optimizer_; +} +inline bool RewriterConfig::disable_tfg_optimizer() const { + // @@protoc_insertion_point(field_get:tensorflow.RewriterConfig.disable_tfg_optimizer) + return _internal_disable_tfg_optimizer(); +} +inline void RewriterConfig::_internal_set_disable_tfg_optimizer(bool value) { + + _impl_.disable_tfg_optimizer_ = value; +} +inline void RewriterConfig::set_disable_tfg_optimizer(bool value) { + _internal_set_disable_tfg_optimizer(value); + // @@protoc_insertion_point(field_set:tensorflow.RewriterConfig.disable_tfg_optimizer) +} + +// .tensorflow.RewriterConfig.Toggle use_plugin_optimizers = 28; +inline void RewriterConfig::clear_use_plugin_optimizers() { + _impl_.use_plugin_optimizers_ = 0; +} +inline ::tensorflow::RewriterConfig_Toggle RewriterConfig::_internal_use_plugin_optimizers() const { + return static_cast< ::tensorflow::RewriterConfig_Toggle >(_impl_.use_plugin_optimizers_); +} +inline ::tensorflow::RewriterConfig_Toggle RewriterConfig::use_plugin_optimizers() const { + // @@protoc_insertion_point(field_get:tensorflow.RewriterConfig.use_plugin_optimizers) + return _internal_use_plugin_optimizers(); +} +inline void RewriterConfig::_internal_set_use_plugin_optimizers(::tensorflow::RewriterConfig_Toggle value) { + + _impl_.use_plugin_optimizers_ = value; +} +inline void RewriterConfig::set_use_plugin_optimizers(::tensorflow::RewriterConfig_Toggle value) { + _internal_set_use_plugin_optimizers(value); + // @@protoc_insertion_point(field_set:tensorflow.RewriterConfig.use_plugin_optimizers) +} + +// .tensorflow.RewriterConfig.Toggle experimental_conditional_code_motion = 30; +inline void RewriterConfig::clear_experimental_conditional_code_motion() { + _impl_.experimental_conditional_code_motion_ = 0; +} +inline ::tensorflow::RewriterConfig_Toggle RewriterConfig::_internal_experimental_conditional_code_motion() const { + return static_cast< ::tensorflow::RewriterConfig_Toggle >(_impl_.experimental_conditional_code_motion_); +} +inline ::tensorflow::RewriterConfig_Toggle RewriterConfig::experimental_conditional_code_motion() const { + // @@protoc_insertion_point(field_get:tensorflow.RewriterConfig.experimental_conditional_code_motion) + return _internal_experimental_conditional_code_motion(); +} +inline void RewriterConfig::_internal_set_experimental_conditional_code_motion(::tensorflow::RewriterConfig_Toggle value) { + + _impl_.experimental_conditional_code_motion_ = value; +} +inline void RewriterConfig::set_experimental_conditional_code_motion(::tensorflow::RewriterConfig_Toggle value) { + _internal_set_experimental_conditional_code_motion(value); + // @@protoc_insertion_point(field_set:tensorflow.RewriterConfig.experimental_conditional_code_motion) +} + +// .tensorflow.RewriterConfig.NumIterationsType meta_optimizer_iterations = 12; +inline void RewriterConfig::clear_meta_optimizer_iterations() { + _impl_.meta_optimizer_iterations_ = 0; +} +inline ::tensorflow::RewriterConfig_NumIterationsType RewriterConfig::_internal_meta_optimizer_iterations() const { + return static_cast< ::tensorflow::RewriterConfig_NumIterationsType >(_impl_.meta_optimizer_iterations_); +} +inline ::tensorflow::RewriterConfig_NumIterationsType RewriterConfig::meta_optimizer_iterations() const { + // @@protoc_insertion_point(field_get:tensorflow.RewriterConfig.meta_optimizer_iterations) + return _internal_meta_optimizer_iterations(); +} +inline void RewriterConfig::_internal_set_meta_optimizer_iterations(::tensorflow::RewriterConfig_NumIterationsType value) { + + _impl_.meta_optimizer_iterations_ = value; +} +inline void RewriterConfig::set_meta_optimizer_iterations(::tensorflow::RewriterConfig_NumIterationsType value) { + _internal_set_meta_optimizer_iterations(value); + // @@protoc_insertion_point(field_set:tensorflow.RewriterConfig.meta_optimizer_iterations) +} + +// int32 min_graph_nodes = 17; +inline void RewriterConfig::clear_min_graph_nodes() { + _impl_.min_graph_nodes_ = 0; +} +inline int32_t RewriterConfig::_internal_min_graph_nodes() const { + return _impl_.min_graph_nodes_; +} +inline int32_t RewriterConfig::min_graph_nodes() const { + // @@protoc_insertion_point(field_get:tensorflow.RewriterConfig.min_graph_nodes) + return _internal_min_graph_nodes(); +} +inline void RewriterConfig::_internal_set_min_graph_nodes(int32_t value) { + + _impl_.min_graph_nodes_ = value; +} +inline void RewriterConfig::set_min_graph_nodes(int32_t value) { + _internal_set_min_graph_nodes(value); + // @@protoc_insertion_point(field_set:tensorflow.RewriterConfig.min_graph_nodes) +} + +// bool experimental_disable_compressed_tensor_optimization = 26; +inline void RewriterConfig::clear_experimental_disable_compressed_tensor_optimization() { + _impl_.experimental_disable_compressed_tensor_optimization_ = false; +} +inline bool RewriterConfig::_internal_experimental_disable_compressed_tensor_optimization() const { + return _impl_.experimental_disable_compressed_tensor_optimization_; +} +inline bool RewriterConfig::experimental_disable_compressed_tensor_optimization() const { + // @@protoc_insertion_point(field_get:tensorflow.RewriterConfig.experimental_disable_compressed_tensor_optimization) + return _internal_experimental_disable_compressed_tensor_optimization(); +} +inline void RewriterConfig::_internal_set_experimental_disable_compressed_tensor_optimization(bool value) { + + _impl_.experimental_disable_compressed_tensor_optimization_ = value; +} +inline void RewriterConfig::set_experimental_disable_compressed_tensor_optimization(bool value) { + _internal_set_experimental_disable_compressed_tensor_optimization(value); + // @@protoc_insertion_point(field_set:tensorflow.RewriterConfig.experimental_disable_compressed_tensor_optimization) +} + +// bool experimental_disable_folding_quantization_emulation = 27; +inline void RewriterConfig::clear_experimental_disable_folding_quantization_emulation() { + _impl_.experimental_disable_folding_quantization_emulation_ = false; +} +inline bool RewriterConfig::_internal_experimental_disable_folding_quantization_emulation() const { + return _impl_.experimental_disable_folding_quantization_emulation_; +} +inline bool RewriterConfig::experimental_disable_folding_quantization_emulation() const { + // @@protoc_insertion_point(field_get:tensorflow.RewriterConfig.experimental_disable_folding_quantization_emulation) + return _internal_experimental_disable_folding_quantization_emulation(); +} +inline void RewriterConfig::_internal_set_experimental_disable_folding_quantization_emulation(bool value) { + + _impl_.experimental_disable_folding_quantization_emulation_ = value; +} +inline void RewriterConfig::set_experimental_disable_folding_quantization_emulation(bool value) { + _internal_set_experimental_disable_folding_quantization_emulation(value); + // @@protoc_insertion_point(field_set:tensorflow.RewriterConfig.experimental_disable_folding_quantization_emulation) +} + +// .tensorflow.RewriterConfig.MemOptType memory_optimization = 4; +inline void RewriterConfig::clear_memory_optimization() { + _impl_.memory_optimization_ = 0; +} +inline ::tensorflow::RewriterConfig_MemOptType RewriterConfig::_internal_memory_optimization() const { + return static_cast< ::tensorflow::RewriterConfig_MemOptType >(_impl_.memory_optimization_); +} +inline ::tensorflow::RewriterConfig_MemOptType RewriterConfig::memory_optimization() const { + // @@protoc_insertion_point(field_get:tensorflow.RewriterConfig.memory_optimization) + return _internal_memory_optimization(); +} +inline void RewriterConfig::_internal_set_memory_optimization(::tensorflow::RewriterConfig_MemOptType value) { + + _impl_.memory_optimization_ = value; +} +inline void RewriterConfig::set_memory_optimization(::tensorflow::RewriterConfig_MemOptType value) { + _internal_set_memory_optimization(value); + // @@protoc_insertion_point(field_set:tensorflow.RewriterConfig.memory_optimization) +} + +// string memory_optimizer_target_node_name_scope = 6; +inline void RewriterConfig::clear_memory_optimizer_target_node_name_scope() { + _impl_.memory_optimizer_target_node_name_scope_.ClearToEmpty(); +} +inline const std::string& RewriterConfig::memory_optimizer_target_node_name_scope() const { + // @@protoc_insertion_point(field_get:tensorflow.RewriterConfig.memory_optimizer_target_node_name_scope) + return _internal_memory_optimizer_target_node_name_scope(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void RewriterConfig::set_memory_optimizer_target_node_name_scope(ArgT0&& arg0, ArgT... args) { + + _impl_.memory_optimizer_target_node_name_scope_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.RewriterConfig.memory_optimizer_target_node_name_scope) +} +inline std::string* RewriterConfig::mutable_memory_optimizer_target_node_name_scope() { + std::string* _s = _internal_mutable_memory_optimizer_target_node_name_scope(); + // @@protoc_insertion_point(field_mutable:tensorflow.RewriterConfig.memory_optimizer_target_node_name_scope) + return _s; +} +inline const std::string& RewriterConfig::_internal_memory_optimizer_target_node_name_scope() const { + return _impl_.memory_optimizer_target_node_name_scope_.Get(); +} +inline void RewriterConfig::_internal_set_memory_optimizer_target_node_name_scope(const std::string& value) { + + _impl_.memory_optimizer_target_node_name_scope_.Set(value, GetArenaForAllocation()); +} +inline std::string* RewriterConfig::_internal_mutable_memory_optimizer_target_node_name_scope() { + + return _impl_.memory_optimizer_target_node_name_scope_.Mutable(GetArenaForAllocation()); +} +inline std::string* RewriterConfig::release_memory_optimizer_target_node_name_scope() { + // @@protoc_insertion_point(field_release:tensorflow.RewriterConfig.memory_optimizer_target_node_name_scope) + return _impl_.memory_optimizer_target_node_name_scope_.Release(); +} +inline void RewriterConfig::set_allocated_memory_optimizer_target_node_name_scope(std::string* memory_optimizer_target_node_name_scope) { + if (memory_optimizer_target_node_name_scope != nullptr) { + + } else { + + } + _impl_.memory_optimizer_target_node_name_scope_.SetAllocated(memory_optimizer_target_node_name_scope, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.memory_optimizer_target_node_name_scope_.IsDefault()) { + _impl_.memory_optimizer_target_node_name_scope_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.RewriterConfig.memory_optimizer_target_node_name_scope) +} + +// int64 meta_optimizer_timeout_ms = 20; +inline void RewriterConfig::clear_meta_optimizer_timeout_ms() { + _impl_.meta_optimizer_timeout_ms_ = int64_t{0}; +} +inline int64_t RewriterConfig::_internal_meta_optimizer_timeout_ms() const { + return _impl_.meta_optimizer_timeout_ms_; +} +inline int64_t RewriterConfig::meta_optimizer_timeout_ms() const { + // @@protoc_insertion_point(field_get:tensorflow.RewriterConfig.meta_optimizer_timeout_ms) + return _internal_meta_optimizer_timeout_ms(); +} +inline void RewriterConfig::_internal_set_meta_optimizer_timeout_ms(int64_t value) { + + _impl_.meta_optimizer_timeout_ms_ = value; +} +inline void RewriterConfig::set_meta_optimizer_timeout_ms(int64_t value) { + _internal_set_meta_optimizer_timeout_ms(value); + // @@protoc_insertion_point(field_set:tensorflow.RewriterConfig.meta_optimizer_timeout_ms) +} + +// .tensorflow.AutoParallelOptions auto_parallel = 5; +inline bool RewriterConfig::_internal_has_auto_parallel() const { + return this != internal_default_instance() && _impl_.auto_parallel_ != nullptr; +} +inline bool RewriterConfig::has_auto_parallel() const { + return _internal_has_auto_parallel(); +} +inline void RewriterConfig::clear_auto_parallel() { + if (GetArenaForAllocation() == nullptr && _impl_.auto_parallel_ != nullptr) { + delete _impl_.auto_parallel_; + } + _impl_.auto_parallel_ = nullptr; +} +inline const ::tensorflow::AutoParallelOptions& RewriterConfig::_internal_auto_parallel() const { + const ::tensorflow::AutoParallelOptions* p = _impl_.auto_parallel_; + return p != nullptr ? *p : reinterpret_cast( + ::tensorflow::_AutoParallelOptions_default_instance_); +} +inline const ::tensorflow::AutoParallelOptions& RewriterConfig::auto_parallel() const { + // @@protoc_insertion_point(field_get:tensorflow.RewriterConfig.auto_parallel) + return _internal_auto_parallel(); +} +inline void RewriterConfig::unsafe_arena_set_allocated_auto_parallel( + ::tensorflow::AutoParallelOptions* auto_parallel) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.auto_parallel_); + } + _impl_.auto_parallel_ = auto_parallel; + if (auto_parallel) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.RewriterConfig.auto_parallel) +} +inline ::tensorflow::AutoParallelOptions* RewriterConfig::release_auto_parallel() { + + ::tensorflow::AutoParallelOptions* temp = _impl_.auto_parallel_; + _impl_.auto_parallel_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tensorflow::AutoParallelOptions* RewriterConfig::unsafe_arena_release_auto_parallel() { + // @@protoc_insertion_point(field_release:tensorflow.RewriterConfig.auto_parallel) + + ::tensorflow::AutoParallelOptions* temp = _impl_.auto_parallel_; + _impl_.auto_parallel_ = nullptr; + return temp; +} +inline ::tensorflow::AutoParallelOptions* RewriterConfig::_internal_mutable_auto_parallel() { + + if (_impl_.auto_parallel_ == nullptr) { + auto* p = CreateMaybeMessage<::tensorflow::AutoParallelOptions>(GetArenaForAllocation()); + _impl_.auto_parallel_ = p; + } + return _impl_.auto_parallel_; +} +inline ::tensorflow::AutoParallelOptions* RewriterConfig::mutable_auto_parallel() { + ::tensorflow::AutoParallelOptions* _msg = _internal_mutable_auto_parallel(); + // @@protoc_insertion_point(field_mutable:tensorflow.RewriterConfig.auto_parallel) + return _msg; +} +inline void RewriterConfig::set_allocated_auto_parallel(::tensorflow::AutoParallelOptions* auto_parallel) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete _impl_.auto_parallel_; + } + if (auto_parallel) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(auto_parallel); + if (message_arena != submessage_arena) { + auto_parallel = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, auto_parallel, submessage_arena); + } + + } else { + + } + _impl_.auto_parallel_ = auto_parallel; + // @@protoc_insertion_point(field_set_allocated:tensorflow.RewriterConfig.auto_parallel) +} + +// bool fail_on_optimizer_errors = 21; +inline void RewriterConfig::clear_fail_on_optimizer_errors() { + _impl_.fail_on_optimizer_errors_ = false; +} +inline bool RewriterConfig::_internal_fail_on_optimizer_errors() const { + return _impl_.fail_on_optimizer_errors_; +} +inline bool RewriterConfig::fail_on_optimizer_errors() const { + // @@protoc_insertion_point(field_get:tensorflow.RewriterConfig.fail_on_optimizer_errors) + return _internal_fail_on_optimizer_errors(); +} +inline void RewriterConfig::_internal_set_fail_on_optimizer_errors(bool value) { + + _impl_.fail_on_optimizer_errors_ = value; +} +inline void RewriterConfig::set_fail_on_optimizer_errors(bool value) { + _internal_set_fail_on_optimizer_errors(value); + // @@protoc_insertion_point(field_set:tensorflow.RewriterConfig.fail_on_optimizer_errors) +} + +// .tensorflow.ScopedAllocatorOptions scoped_allocator_opts = 16; +inline bool RewriterConfig::_internal_has_scoped_allocator_opts() const { + return this != internal_default_instance() && _impl_.scoped_allocator_opts_ != nullptr; +} +inline bool RewriterConfig::has_scoped_allocator_opts() const { + return _internal_has_scoped_allocator_opts(); +} +inline void RewriterConfig::clear_scoped_allocator_opts() { + if (GetArenaForAllocation() == nullptr && _impl_.scoped_allocator_opts_ != nullptr) { + delete _impl_.scoped_allocator_opts_; + } + _impl_.scoped_allocator_opts_ = nullptr; +} +inline const ::tensorflow::ScopedAllocatorOptions& RewriterConfig::_internal_scoped_allocator_opts() const { + const ::tensorflow::ScopedAllocatorOptions* p = _impl_.scoped_allocator_opts_; + return p != nullptr ? *p : reinterpret_cast( + ::tensorflow::_ScopedAllocatorOptions_default_instance_); +} +inline const ::tensorflow::ScopedAllocatorOptions& RewriterConfig::scoped_allocator_opts() const { + // @@protoc_insertion_point(field_get:tensorflow.RewriterConfig.scoped_allocator_opts) + return _internal_scoped_allocator_opts(); +} +inline void RewriterConfig::unsafe_arena_set_allocated_scoped_allocator_opts( + ::tensorflow::ScopedAllocatorOptions* scoped_allocator_opts) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.scoped_allocator_opts_); + } + _impl_.scoped_allocator_opts_ = scoped_allocator_opts; + if (scoped_allocator_opts) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.RewriterConfig.scoped_allocator_opts) +} +inline ::tensorflow::ScopedAllocatorOptions* RewriterConfig::release_scoped_allocator_opts() { + + ::tensorflow::ScopedAllocatorOptions* temp = _impl_.scoped_allocator_opts_; + _impl_.scoped_allocator_opts_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tensorflow::ScopedAllocatorOptions* RewriterConfig::unsafe_arena_release_scoped_allocator_opts() { + // @@protoc_insertion_point(field_release:tensorflow.RewriterConfig.scoped_allocator_opts) + + ::tensorflow::ScopedAllocatorOptions* temp = _impl_.scoped_allocator_opts_; + _impl_.scoped_allocator_opts_ = nullptr; + return temp; +} +inline ::tensorflow::ScopedAllocatorOptions* RewriterConfig::_internal_mutable_scoped_allocator_opts() { + + if (_impl_.scoped_allocator_opts_ == nullptr) { + auto* p = CreateMaybeMessage<::tensorflow::ScopedAllocatorOptions>(GetArenaForAllocation()); + _impl_.scoped_allocator_opts_ = p; + } + return _impl_.scoped_allocator_opts_; +} +inline ::tensorflow::ScopedAllocatorOptions* RewriterConfig::mutable_scoped_allocator_opts() { + ::tensorflow::ScopedAllocatorOptions* _msg = _internal_mutable_scoped_allocator_opts(); + // @@protoc_insertion_point(field_mutable:tensorflow.RewriterConfig.scoped_allocator_opts) + return _msg; +} +inline void RewriterConfig::set_allocated_scoped_allocator_opts(::tensorflow::ScopedAllocatorOptions* scoped_allocator_opts) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete _impl_.scoped_allocator_opts_; + } + if (scoped_allocator_opts) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(scoped_allocator_opts); + if (message_arena != submessage_arena) { + scoped_allocator_opts = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, scoped_allocator_opts, submessage_arena); + } + + } else { + + } + _impl_.scoped_allocator_opts_ = scoped_allocator_opts; + // @@protoc_insertion_point(field_set_allocated:tensorflow.RewriterConfig.scoped_allocator_opts) +} + +// repeated string optimizers = 100; +inline int RewriterConfig::_internal_optimizers_size() const { + return _impl_.optimizers_.size(); +} +inline int RewriterConfig::optimizers_size() const { + return _internal_optimizers_size(); +} +inline void RewriterConfig::clear_optimizers() { + _impl_.optimizers_.Clear(); +} +inline std::string* RewriterConfig::add_optimizers() { + std::string* _s = _internal_add_optimizers(); + // @@protoc_insertion_point(field_add_mutable:tensorflow.RewriterConfig.optimizers) + return _s; +} +inline const std::string& RewriterConfig::_internal_optimizers(int index) const { + return _impl_.optimizers_.Get(index); +} +inline const std::string& RewriterConfig::optimizers(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.RewriterConfig.optimizers) + return _internal_optimizers(index); +} +inline std::string* RewriterConfig::mutable_optimizers(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.RewriterConfig.optimizers) + return _impl_.optimizers_.Mutable(index); +} +inline void RewriterConfig::set_optimizers(int index, const std::string& value) { + _impl_.optimizers_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set:tensorflow.RewriterConfig.optimizers) +} +inline void RewriterConfig::set_optimizers(int index, std::string&& value) { + _impl_.optimizers_.Mutable(index)->assign(std::move(value)); + // @@protoc_insertion_point(field_set:tensorflow.RewriterConfig.optimizers) +} +inline void RewriterConfig::set_optimizers(int index, const char* value) { + GOOGLE_DCHECK(value != nullptr); + _impl_.optimizers_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set_char:tensorflow.RewriterConfig.optimizers) +} +inline void RewriterConfig::set_optimizers(int index, const char* value, size_t size) { + _impl_.optimizers_.Mutable(index)->assign( + reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:tensorflow.RewriterConfig.optimizers) +} +inline std::string* RewriterConfig::_internal_add_optimizers() { + return _impl_.optimizers_.Add(); +} +inline void RewriterConfig::add_optimizers(const std::string& value) { + _impl_.optimizers_.Add()->assign(value); + // @@protoc_insertion_point(field_add:tensorflow.RewriterConfig.optimizers) +} +inline void RewriterConfig::add_optimizers(std::string&& value) { + _impl_.optimizers_.Add(std::move(value)); + // @@protoc_insertion_point(field_add:tensorflow.RewriterConfig.optimizers) +} +inline void RewriterConfig::add_optimizers(const char* value) { + GOOGLE_DCHECK(value != nullptr); + _impl_.optimizers_.Add()->assign(value); + // @@protoc_insertion_point(field_add_char:tensorflow.RewriterConfig.optimizers) +} +inline void RewriterConfig::add_optimizers(const char* value, size_t size) { + _impl_.optimizers_.Add()->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_add_pointer:tensorflow.RewriterConfig.optimizers) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& +RewriterConfig::optimizers() const { + // @@protoc_insertion_point(field_list:tensorflow.RewriterConfig.optimizers) + return _impl_.optimizers_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* +RewriterConfig::mutable_optimizers() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.RewriterConfig.optimizers) + return &_impl_.optimizers_; +} + +// repeated .tensorflow.RewriterConfig.CustomGraphOptimizer custom_optimizers = 200; +inline int RewriterConfig::_internal_custom_optimizers_size() const { + return _impl_.custom_optimizers_.size(); +} +inline int RewriterConfig::custom_optimizers_size() const { + return _internal_custom_optimizers_size(); +} +inline void RewriterConfig::clear_custom_optimizers() { + _impl_.custom_optimizers_.Clear(); +} +inline ::tensorflow::RewriterConfig_CustomGraphOptimizer* RewriterConfig::mutable_custom_optimizers(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.RewriterConfig.custom_optimizers) + return _impl_.custom_optimizers_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::RewriterConfig_CustomGraphOptimizer >* +RewriterConfig::mutable_custom_optimizers() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.RewriterConfig.custom_optimizers) + return &_impl_.custom_optimizers_; +} +inline const ::tensorflow::RewriterConfig_CustomGraphOptimizer& RewriterConfig::_internal_custom_optimizers(int index) const { + return _impl_.custom_optimizers_.Get(index); +} +inline const ::tensorflow::RewriterConfig_CustomGraphOptimizer& RewriterConfig::custom_optimizers(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.RewriterConfig.custom_optimizers) + return _internal_custom_optimizers(index); +} +inline ::tensorflow::RewriterConfig_CustomGraphOptimizer* RewriterConfig::_internal_add_custom_optimizers() { + return _impl_.custom_optimizers_.Add(); +} +inline ::tensorflow::RewriterConfig_CustomGraphOptimizer* RewriterConfig::add_custom_optimizers() { + ::tensorflow::RewriterConfig_CustomGraphOptimizer* _add = _internal_add_custom_optimizers(); + // @@protoc_insertion_point(field_add:tensorflow.RewriterConfig.custom_optimizers) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::RewriterConfig_CustomGraphOptimizer >& +RewriterConfig::custom_optimizers() const { + // @@protoc_insertion_point(field_list:tensorflow.RewriterConfig.custom_optimizers) + return _impl_.custom_optimizers_; +} + +// .tensorflow.VerifierConfig inter_optimizer_verifier_config = 300; +inline bool RewriterConfig::_internal_has_inter_optimizer_verifier_config() const { + return this != internal_default_instance() && _impl_.inter_optimizer_verifier_config_ != nullptr; +} +inline bool RewriterConfig::has_inter_optimizer_verifier_config() const { + return _internal_has_inter_optimizer_verifier_config(); +} +inline const ::tensorflow::VerifierConfig& RewriterConfig::_internal_inter_optimizer_verifier_config() const { + const ::tensorflow::VerifierConfig* p = _impl_.inter_optimizer_verifier_config_; + return p != nullptr ? *p : reinterpret_cast( + ::tensorflow::_VerifierConfig_default_instance_); +} +inline const ::tensorflow::VerifierConfig& RewriterConfig::inter_optimizer_verifier_config() const { + // @@protoc_insertion_point(field_get:tensorflow.RewriterConfig.inter_optimizer_verifier_config) + return _internal_inter_optimizer_verifier_config(); +} +inline void RewriterConfig::unsafe_arena_set_allocated_inter_optimizer_verifier_config( + ::tensorflow::VerifierConfig* inter_optimizer_verifier_config) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.inter_optimizer_verifier_config_); + } + _impl_.inter_optimizer_verifier_config_ = inter_optimizer_verifier_config; + if (inter_optimizer_verifier_config) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.RewriterConfig.inter_optimizer_verifier_config) +} +inline ::tensorflow::VerifierConfig* RewriterConfig::release_inter_optimizer_verifier_config() { + + ::tensorflow::VerifierConfig* temp = _impl_.inter_optimizer_verifier_config_; + _impl_.inter_optimizer_verifier_config_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tensorflow::VerifierConfig* RewriterConfig::unsafe_arena_release_inter_optimizer_verifier_config() { + // @@protoc_insertion_point(field_release:tensorflow.RewriterConfig.inter_optimizer_verifier_config) + + ::tensorflow::VerifierConfig* temp = _impl_.inter_optimizer_verifier_config_; + _impl_.inter_optimizer_verifier_config_ = nullptr; + return temp; +} +inline ::tensorflow::VerifierConfig* RewriterConfig::_internal_mutable_inter_optimizer_verifier_config() { + + if (_impl_.inter_optimizer_verifier_config_ == nullptr) { + auto* p = CreateMaybeMessage<::tensorflow::VerifierConfig>(GetArenaForAllocation()); + _impl_.inter_optimizer_verifier_config_ = p; + } + return _impl_.inter_optimizer_verifier_config_; +} +inline ::tensorflow::VerifierConfig* RewriterConfig::mutable_inter_optimizer_verifier_config() { + ::tensorflow::VerifierConfig* _msg = _internal_mutable_inter_optimizer_verifier_config(); + // @@protoc_insertion_point(field_mutable:tensorflow.RewriterConfig.inter_optimizer_verifier_config) + return _msg; +} +inline void RewriterConfig::set_allocated_inter_optimizer_verifier_config(::tensorflow::VerifierConfig* inter_optimizer_verifier_config) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.inter_optimizer_verifier_config_); + } + if (inter_optimizer_verifier_config) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( + reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(inter_optimizer_verifier_config)); + if (message_arena != submessage_arena) { + inter_optimizer_verifier_config = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, inter_optimizer_verifier_config, submessage_arena); + } + + } else { + + } + _impl_.inter_optimizer_verifier_config_ = inter_optimizer_verifier_config; + // @@protoc_insertion_point(field_set_allocated:tensorflow.RewriterConfig.inter_optimizer_verifier_config) +} + +// .tensorflow.VerifierConfig post_optimization_verifier_config = 301; +inline bool RewriterConfig::_internal_has_post_optimization_verifier_config() const { + return this != internal_default_instance() && _impl_.post_optimization_verifier_config_ != nullptr; +} +inline bool RewriterConfig::has_post_optimization_verifier_config() const { + return _internal_has_post_optimization_verifier_config(); +} +inline const ::tensorflow::VerifierConfig& RewriterConfig::_internal_post_optimization_verifier_config() const { + const ::tensorflow::VerifierConfig* p = _impl_.post_optimization_verifier_config_; + return p != nullptr ? *p : reinterpret_cast( + ::tensorflow::_VerifierConfig_default_instance_); +} +inline const ::tensorflow::VerifierConfig& RewriterConfig::post_optimization_verifier_config() const { + // @@protoc_insertion_point(field_get:tensorflow.RewriterConfig.post_optimization_verifier_config) + return _internal_post_optimization_verifier_config(); +} +inline void RewriterConfig::unsafe_arena_set_allocated_post_optimization_verifier_config( + ::tensorflow::VerifierConfig* post_optimization_verifier_config) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.post_optimization_verifier_config_); + } + _impl_.post_optimization_verifier_config_ = post_optimization_verifier_config; + if (post_optimization_verifier_config) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.RewriterConfig.post_optimization_verifier_config) +} +inline ::tensorflow::VerifierConfig* RewriterConfig::release_post_optimization_verifier_config() { + + ::tensorflow::VerifierConfig* temp = _impl_.post_optimization_verifier_config_; + _impl_.post_optimization_verifier_config_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tensorflow::VerifierConfig* RewriterConfig::unsafe_arena_release_post_optimization_verifier_config() { + // @@protoc_insertion_point(field_release:tensorflow.RewriterConfig.post_optimization_verifier_config) + + ::tensorflow::VerifierConfig* temp = _impl_.post_optimization_verifier_config_; + _impl_.post_optimization_verifier_config_ = nullptr; + return temp; +} +inline ::tensorflow::VerifierConfig* RewriterConfig::_internal_mutable_post_optimization_verifier_config() { + + if (_impl_.post_optimization_verifier_config_ == nullptr) { + auto* p = CreateMaybeMessage<::tensorflow::VerifierConfig>(GetArenaForAllocation()); + _impl_.post_optimization_verifier_config_ = p; + } + return _impl_.post_optimization_verifier_config_; +} +inline ::tensorflow::VerifierConfig* RewriterConfig::mutable_post_optimization_verifier_config() { + ::tensorflow::VerifierConfig* _msg = _internal_mutable_post_optimization_verifier_config(); + // @@protoc_insertion_point(field_mutable:tensorflow.RewriterConfig.post_optimization_verifier_config) + return _msg; +} +inline void RewriterConfig::set_allocated_post_optimization_verifier_config(::tensorflow::VerifierConfig* post_optimization_verifier_config) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.post_optimization_verifier_config_); + } + if (post_optimization_verifier_config) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( + reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(post_optimization_verifier_config)); + if (message_arena != submessage_arena) { + post_optimization_verifier_config = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, post_optimization_verifier_config, submessage_arena); + } + + } else { + + } + _impl_.post_optimization_verifier_config_ = post_optimization_verifier_config; + // @@protoc_insertion_point(field_set_allocated:tensorflow.RewriterConfig.post_optimization_verifier_config) +} + +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + + +// @@protoc_insertion_point(namespace_scope) + +} // namespace tensorflow + +PROTOBUF_NAMESPACE_OPEN + +template <> struct is_proto_enum< ::tensorflow::RewriterConfig_Toggle> : ::std::true_type {}; +template <> +inline const EnumDescriptor* GetEnumDescriptor< ::tensorflow::RewriterConfig_Toggle>() { + return ::tensorflow::RewriterConfig_Toggle_descriptor(); +} +template <> struct is_proto_enum< ::tensorflow::RewriterConfig_CpuLayout> : ::std::true_type {}; +template <> +inline const EnumDescriptor* GetEnumDescriptor< ::tensorflow::RewriterConfig_CpuLayout>() { + return ::tensorflow::RewriterConfig_CpuLayout_descriptor(); +} +template <> struct is_proto_enum< ::tensorflow::RewriterConfig_NumIterationsType> : ::std::true_type {}; +template <> +inline const EnumDescriptor* GetEnumDescriptor< ::tensorflow::RewriterConfig_NumIterationsType>() { + return ::tensorflow::RewriterConfig_NumIterationsType_descriptor(); +} +template <> struct is_proto_enum< ::tensorflow::RewriterConfig_MemOptType> : ::std::true_type {}; +template <> +inline const EnumDescriptor* GetEnumDescriptor< ::tensorflow::RewriterConfig_MemOptType>() { + return ::tensorflow::RewriterConfig_MemOptType_descriptor(); +} + +PROTOBUF_NAMESPACE_CLOSE + +// @@protoc_insertion_point(global_scope) + +#include +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprotobuf_2frewriter_5fconfig_2eproto diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/rewriter_config.proto b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/rewriter_config.proto new file mode 100644 index 0000000000000000000000000000000000000000..9f4042e6f8be9bd2ba54590a4c49f643e70cba5f --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/rewriter_config.proto @@ -0,0 +1,241 @@ +syntax = "proto3"; + +package tensorflow; + +import "tensorflow/core/framework/attr_value.proto"; +import "tensorflow/core/protobuf/verifier_config.proto"; + +option cc_enable_arenas = true; +option java_outer_classname = "RewriterConfigProtos"; +option java_multiple_files = true; +option java_package = "org.tensorflow.framework"; +option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/protobuf/for_core_protos_go_proto"; + +message AutoParallelOptions { + bool enable = 1; + int32 num_replicas = 2; +} + +message ScopedAllocatorOptions { + // If present, only perform optimization for these ops. + repeated string enable_op = 1; +} + +message RewriterConfig { + // Graph rewriting is experimental and subject to change, not covered by any + // API stability guarantees. + + // Configuration options for the meta-optimizer. Unless otherwise noted, these + // configuration options do not apply to explicitly triggered optimization + // passes in the optimizers field. + + enum Toggle { + DEFAULT = 0; + ON = 1; + OFF = 2; + // Enable some aggressive optimizations that use assumptions that TF graphs + // may break. For example, assume the shape of a placeholder matches its + // actual feed. + AGGRESSIVE = 3; + // Run MLIR pass if there's one implemented in TFG, do nothing otherwise. + // I.e., if there's no corresponding TFG pass, it's an OFF. This is supposed + // to be mapped with `ON` and there's no `AGGRESSIVE` in MLIR pass now. + EXPERIMENTAL_MLIR = 4; + // Run both MLIR and Grappler passes consecutively and MLIR pass will come + // first. + EXPERIMENTAL_BOTH = 5; + } + + // Enum for layout conversion between NCHW and NHWC on CPU. Default is OFF. + enum CpuLayout { + NO_CONVERSION_ON_CPU = 0; + NCHW_TO_NHWC = 1; + NHWC_TO_NCHW = 2; + } + + // Enum controlling the number of times to run optimizers. The default is to + // run them twice. + enum NumIterationsType { + DEFAULT_NUM_ITERS = 0; + ONE = 1; + TWO = 2; + } + + // CPU Conversion settings between NHCW and NCHW. + CpuLayout cpu_layout_conversion = 50; + + // Optimize tensor layouts (default is ON) + // e.g. This will try to use NCHW layout on GPU which is faster. + Toggle layout_optimizer = 1; + // Fold constants (default is ON) + // Statically infer the value of tensors when possible, and materialize the + // result using constants. + Toggle constant_folding = 3; + // Shape optimizations (default is ON) + // Simplify computations made on shapes. + Toggle shape_optimization = 13; + // Remapping (default is ON) + // Remap subgraphs onto more efficient implementations. + Toggle remapping = 14; + // Common subgraph elimination (default is ON) + // e.g. Simplify arithmetic ops; merge ops with same value (like constants). + Toggle common_subgraph_elimination = 24; + // Arithmetic optimizations (default is ON) + // e.g. Simplify arithmetic ops; merge ops with same value (like constants). + Toggle arithmetic_optimization = 7; + // Control dependency optimizations (default is ON). + // Remove redundant control dependencies, which may enable other optimization. + Toggle dependency_optimization = 8; + // Loop optimizations (default is ON). + Toggle loop_optimization = 9; + // Function optimizations (default is ON). + Toggle function_optimization = 10; + // Strips debug-related nodes from the graph (off by default). + Toggle debug_stripper = 11; + // If true, don't remove unnecessary ops from the graph + bool disable_model_pruning = 2; + // Try to allocate some independent Op outputs contiguously in order to + // merge or eliminate downstream Ops (off by default). + Toggle scoped_allocator_optimization = 15; + // Force small ops onto the CPU (default is OFF). + Toggle pin_to_host_optimization = 18; + // Enable the swap of kernel implementations based on the device placement + // (default is ON). + Toggle implementation_selector = 22; + // Optimize data types for CUDA (default is OFF). + // This will try to use float16 on GPU which is faster. + // Note that this can change the numerical stability of the graph and may + // require the use of loss scaling to maintain model convergence. + Toggle auto_mixed_precision = 23; + // Optimize data types for oneDNN (default is OFF). + // This will try to use bfloat16 on CPUs, which is faster. + // Note that this can change the numerical stability of the graph. + // Note: this is deprecated. + // It is replaced by auto_mixed_precision_onednn_bfloat16 + Toggle auto_mixed_precision_mkl = 25; + // Optimize data types for oneDNN (default is OFF). + // This will try to use bfloat16 on CPUs, which is faster. + // Note that this can change the numerical stability of the graph. + // Note: this is equivalent to the deprecated option auto_mixed_precision_mkl + Toggle auto_mixed_precision_onednn_bfloat16 = 31; + // Emulate a model using data type float16 on CPU (default is OFF). + // This will try to emulate the float16 inputs and outputs of an operator + // on CPU to have better correlation with float16 on GPU; however the + // computation in the operator is based on float32. + // Note that this can change the numerical stability of the graph. + Toggle auto_mixed_precision_cpu = 29; + // Disable the entire meta optimizer (off by default). + bool disable_meta_optimizer = 19; + // Disable the TFG optimizer (off by default). + bool disable_tfg_optimizer = 32; + // Optimizers registered by plugin (default is ON) + Toggle use_plugin_optimizers = 28; + // Conditional code motion (default is ON). + Toggle experimental_conditional_code_motion = 30; + + // Controls how many times we run the optimizers in meta optimizer (default + // is once). + NumIterationsType meta_optimizer_iterations = 12; + + // The minimum number of nodes in a graph to optimizer. For smaller graphs, + // optimization is skipped. + // 0 means the system picks an appropriate number. + // < 0 means do not skip optimization. + int32 min_graph_nodes = 17; + + // Disable optimizations that assume compressed tensors. Note that this flag + // is experimental and may be removed in the future. + bool experimental_disable_compressed_tensor_optimization = 26; + + // Disable folding quantization emulation ops such as FakeQuantWithMinMax* and + // QuantizeAndDequantize*. Some compilers (e.g. the TF-to-tflite converter) + // have to extract quantization configs (e.g. min/max range, number of bits, + // and per-channel) from the quantization emulation ops. Note that this flag + // is experimental and may be removed in the future. See b/174138564 for more + // details. + bool experimental_disable_folding_quantization_emulation = 27; + + enum MemOptType { + // The default setting (SCHEDULING and SWAPPING HEURISTICS only) + DEFAULT_MEM_OPT = 0; + // Disabled in the meta-optimizer. + NO_MEM_OPT = 1; + // Driven by manual op-level annotations. + MANUAL = 2; + + // Driven by heuristics. The behavior of these heuristics is subject to + // change. Currently includes an experimental recomputation and swapping + // heuristics. Manual annotations are respected, but additional nodes are + // selected automatically. + + // Swapping heuristic will move a tensor from the GPU to the CPU and move + // it back when needed to reduce peak memory usage. + SWAPPING_HEURISTICS = 4; + // Recomputation heuristics will recompute ops (such as Relu activation) + // during backprop instead of storing them, reducing peak memory usage. + RECOMPUTATION_HEURISTICS = 5; + // Scheduling will split big ops such as AddN and try to enforce a schedule + // of the new computations that decreases peak memory usage. + SCHEDULING_HEURISTICS = 6; + // Use any combination of swapping and recomputation heuristics. + HEURISTICS = 3; + } + // Configures memory optimization passes through the meta-optimizer. Has no + // effect on manually requested memory optimization passes in the optimizers + // field. + MemOptType memory_optimization = 4; + // A node name scope for node names which are valid outputs of recomputations. + // Inputs to nodes that match this scope may be recomputed (subject either to + // manual annotation of those input nodes or to manual annotation and + // heuristics depending on memory_optimization), but the nodes themselves will + // not be recomputed. This matches any sub-scopes as well, meaning the scope + // can appear not just as a top-level scope. For example, if the value is + // "gradients/", the default, it will match node name "gradients/foo", + // "foo/gradients/bar", but not "foo_gradients/" + string memory_optimizer_target_node_name_scope = 6; + // Maximum number of milliseconds to spend optimizing a single graph before + // timing out. If less than or equal to 0 (default value) the optimizer will + // never time out. + int64 meta_optimizer_timeout_ms = 20; + + // Configures AutoParallel optimization passes either through the + // meta-optimizer or when manually specified through the optimizers field. + AutoParallelOptions auto_parallel = 5; + + // If true, any optimization pass failing will cause the MetaOptimizer to + // stop with an error. By default - or when set to false, failing passes are + // skipped silently. + bool fail_on_optimizer_errors = 21; + + ScopedAllocatorOptions scoped_allocator_opts = 16; + + // If non-empty, will use this as an alternative way to specify a list of + // optimizations to turn on and the order of the optimizations (replacing the + // meta-optimizer). + // + // Of the RewriterConfig options, only the AutoParallel configuration options + // (the auto_parallel field) apply to manually requested optimization passes + // ("autoparallel"). Memory optimization passes ("memory") invoked here are + // not configurable (in contrast to memory optimization passes through the + // meta-optimizer) and act only on manual op annotations. + // + // Custom optimizers (see custom_optimizers) that are not part of this + // schedule will be run after - in the order that they were specified. + repeated string optimizers = 100; + + // Message to describe custom graph optimizer and its parameters + message CustomGraphOptimizer { + string name = 1; + map parameter_map = 2; + } + + // list of CustomGraphOptimizers to apply. + repeated CustomGraphOptimizer custom_optimizers = 200; + + // VerifierConfig specifying the verifiers to be run after every optimizer. + VerifierConfig inter_optimizer_verifier_config = 300; + + // VerifierConfig specifying the verifiers to be run at the end, after all + // optimizers have run. + VerifierConfig post_optimization_verifier_config = 301; +} diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/rpc_options.pb.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/rpc_options.pb.h new file mode 100644 index 0000000000000000000000000000000000000000..1dfb48ea88f9e3d51bd14b6065723d831a54e94e --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/rpc_options.pb.h @@ -0,0 +1,75 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/rpc_options.proto + +#ifndef GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprotobuf_2frpc_5foptions_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprotobuf_2frpc_5foptions_2eproto + +#include +#include + +#include +#if PROTOBUF_VERSION < 3021000 +#error This file was generated by a newer version of protoc which is +#error incompatible with your Protocol Buffer headers. Please update +#error your headers. +#endif +#if 3021009 < PROTOBUF_MIN_PROTOC_VERSION +#error This file was generated by an older version of protoc which is +#error incompatible with your Protocol Buffer headers. Please +#error regenerate this file with a newer version of protoc. +#endif + +#include +#include +#include +#include +#include +#include +#include +#include // IWYU pragma: export +#include // IWYU pragma: export +#include "tsl/protobuf/rpc_options.pb.h" +// @@protoc_insertion_point(includes) +#include +#define PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2fprotobuf_2frpc_5foptions_2eproto +PROTOBUF_NAMESPACE_OPEN +namespace internal { +class AnyMetadata; +} // namespace internal +PROTOBUF_NAMESPACE_CLOSE + +// Internal implementation detail -- do not use these members. +struct TableStruct_tensorflow_2fcore_2fprotobuf_2frpc_5foptions_2eproto { + static const uint32_t offsets[]; +}; +extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_tensorflow_2fcore_2fprotobuf_2frpc_5foptions_2eproto; +PROTOBUF_NAMESPACE_OPEN +PROTOBUF_NAMESPACE_CLOSE +namespace tensorflow { +namespace dummy { + +// =================================================================== + + +// =================================================================== + + +// =================================================================== + +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ + +// @@protoc_insertion_point(namespace_scope) + +} // namespace dummy +} // namespace tensorflow + +// @@protoc_insertion_point(global_scope) + +#include +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprotobuf_2frpc_5foptions_2eproto diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/rpc_options.proto b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/rpc_options.proto new file mode 100644 index 0000000000000000000000000000000000000000..db9216a7e7bb4caf345b4c77ea188ce2cbb1bd0f --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/rpc_options.proto @@ -0,0 +1,7 @@ +syntax = "proto3"; + +package tensorflow.dummy; + +import public "tsl/protobuf/rpc_options.proto"; + +option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/protobuf/for_core_protos_go_proto"; diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/saved_model.pb.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/saved_model.pb.h new file mode 100644 index 0000000000000000000000000000000000000000..ee97dc3ab1e55c7e2c6b9e1280cf0fa810257abf --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/saved_model.pb.h @@ -0,0 +1,305 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/saved_model.proto + +#ifndef GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprotobuf_2fsaved_5fmodel_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprotobuf_2fsaved_5fmodel_2eproto + +#include +#include + +#include +#if PROTOBUF_VERSION < 3021000 +#error This file was generated by a newer version of protoc which is +#error incompatible with your Protocol Buffer headers. Please update +#error your headers. +#endif +#if 3021009 < PROTOBUF_MIN_PROTOC_VERSION +#error This file was generated by an older version of protoc which is +#error incompatible with your Protocol Buffer headers. Please +#error regenerate this file with a newer version of protoc. +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include // IWYU pragma: export +#include // IWYU pragma: export +#include +#include "tensorflow/core/protobuf/meta_graph.pb.h" +// @@protoc_insertion_point(includes) +#include +#define PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2fprotobuf_2fsaved_5fmodel_2eproto +PROTOBUF_NAMESPACE_OPEN +namespace internal { +class AnyMetadata; +} // namespace internal +PROTOBUF_NAMESPACE_CLOSE + +// Internal implementation detail -- do not use these members. +struct TableStruct_tensorflow_2fcore_2fprotobuf_2fsaved_5fmodel_2eproto { + static const uint32_t offsets[]; +}; +extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_tensorflow_2fcore_2fprotobuf_2fsaved_5fmodel_2eproto; +namespace tensorflow { +class SavedModel; +struct SavedModelDefaultTypeInternal; +extern SavedModelDefaultTypeInternal _SavedModel_default_instance_; +} // namespace tensorflow +PROTOBUF_NAMESPACE_OPEN +template<> ::tensorflow::SavedModel* Arena::CreateMaybeMessage<::tensorflow::SavedModel>(Arena*); +PROTOBUF_NAMESPACE_CLOSE +namespace tensorflow { + +// =================================================================== + +class SavedModel final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.SavedModel) */ { + public: + inline SavedModel() : SavedModel(nullptr) {} + ~SavedModel() override; + explicit PROTOBUF_CONSTEXPR SavedModel(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + SavedModel(const SavedModel& from); + SavedModel(SavedModel&& from) noexcept + : SavedModel() { + *this = ::std::move(from); + } + + inline SavedModel& operator=(const SavedModel& from) { + CopyFrom(from); + return *this; + } + inline SavedModel& operator=(SavedModel&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const SavedModel& default_instance() { + return *internal_default_instance(); + } + static inline const SavedModel* internal_default_instance() { + return reinterpret_cast( + &_SavedModel_default_instance_); + } + static constexpr int kIndexInFileMessages = + 0; + + friend void swap(SavedModel& a, SavedModel& b) { + a.Swap(&b); + } + inline void Swap(SavedModel* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(SavedModel* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + SavedModel* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const SavedModel& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const SavedModel& from) { + SavedModel::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(SavedModel* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.SavedModel"; + } + protected: + explicit SavedModel(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kMetaGraphsFieldNumber = 2, + kSavedModelSchemaVersionFieldNumber = 1, + }; + // repeated .tensorflow.MetaGraphDef meta_graphs = 2; + int meta_graphs_size() const; + private: + int _internal_meta_graphs_size() const; + public: + void clear_meta_graphs(); + ::tensorflow::MetaGraphDef* mutable_meta_graphs(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::MetaGraphDef >* + mutable_meta_graphs(); + private: + const ::tensorflow::MetaGraphDef& _internal_meta_graphs(int index) const; + ::tensorflow::MetaGraphDef* _internal_add_meta_graphs(); + public: + const ::tensorflow::MetaGraphDef& meta_graphs(int index) const; + ::tensorflow::MetaGraphDef* add_meta_graphs(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::MetaGraphDef >& + meta_graphs() const; + + // int64 saved_model_schema_version = 1; + void clear_saved_model_schema_version(); + int64_t saved_model_schema_version() const; + void set_saved_model_schema_version(int64_t value); + private: + int64_t _internal_saved_model_schema_version() const; + void _internal_set_saved_model_schema_version(int64_t value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.SavedModel) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::MetaGraphDef > meta_graphs_; + int64_t saved_model_schema_version_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fsaved_5fmodel_2eproto; +}; +// =================================================================== + + +// =================================================================== + +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// SavedModel + +// int64 saved_model_schema_version = 1; +inline void SavedModel::clear_saved_model_schema_version() { + _impl_.saved_model_schema_version_ = int64_t{0}; +} +inline int64_t SavedModel::_internal_saved_model_schema_version() const { + return _impl_.saved_model_schema_version_; +} +inline int64_t SavedModel::saved_model_schema_version() const { + // @@protoc_insertion_point(field_get:tensorflow.SavedModel.saved_model_schema_version) + return _internal_saved_model_schema_version(); +} +inline void SavedModel::_internal_set_saved_model_schema_version(int64_t value) { + + _impl_.saved_model_schema_version_ = value; +} +inline void SavedModel::set_saved_model_schema_version(int64_t value) { + _internal_set_saved_model_schema_version(value); + // @@protoc_insertion_point(field_set:tensorflow.SavedModel.saved_model_schema_version) +} + +// repeated .tensorflow.MetaGraphDef meta_graphs = 2; +inline int SavedModel::_internal_meta_graphs_size() const { + return _impl_.meta_graphs_.size(); +} +inline int SavedModel::meta_graphs_size() const { + return _internal_meta_graphs_size(); +} +inline ::tensorflow::MetaGraphDef* SavedModel::mutable_meta_graphs(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.SavedModel.meta_graphs) + return _impl_.meta_graphs_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::MetaGraphDef >* +SavedModel::mutable_meta_graphs() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.SavedModel.meta_graphs) + return &_impl_.meta_graphs_; +} +inline const ::tensorflow::MetaGraphDef& SavedModel::_internal_meta_graphs(int index) const { + return _impl_.meta_graphs_.Get(index); +} +inline const ::tensorflow::MetaGraphDef& SavedModel::meta_graphs(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.SavedModel.meta_graphs) + return _internal_meta_graphs(index); +} +inline ::tensorflow::MetaGraphDef* SavedModel::_internal_add_meta_graphs() { + return _impl_.meta_graphs_.Add(); +} +inline ::tensorflow::MetaGraphDef* SavedModel::add_meta_graphs() { + ::tensorflow::MetaGraphDef* _add = _internal_add_meta_graphs(); + // @@protoc_insertion_point(field_add:tensorflow.SavedModel.meta_graphs) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::MetaGraphDef >& +SavedModel::meta_graphs() const { + // @@protoc_insertion_point(field_list:tensorflow.SavedModel.meta_graphs) + return _impl_.meta_graphs_; +} + +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ + +// @@protoc_insertion_point(namespace_scope) + +} // namespace tensorflow + +// @@protoc_insertion_point(global_scope) + +#include +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprotobuf_2fsaved_5fmodel_2eproto diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/saved_model.proto b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/saved_model.proto new file mode 100644 index 0000000000000000000000000000000000000000..47a707c81397f5287f96375b6a904d86fd59582f --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/saved_model.proto @@ -0,0 +1,23 @@ +syntax = "proto3"; + +package tensorflow; + +import "tensorflow/core/protobuf/meta_graph.proto"; + +option cc_enable_arenas = true; +option java_outer_classname = "SavedModelProtos"; +option java_multiple_files = true; +option java_package = "org.tensorflow.framework"; +option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/protobuf/for_core_protos_go_proto"; + +// SavedModel is the high level serialization format for TensorFlow Models. +// See [todo: doc links, similar to session_bundle] for more information. +message SavedModel { + // The schema version of the SavedModel instance. Used for versioning when + // making future changes to the specification/implementation. Initial value + // at release will be 1. + int64 saved_model_schema_version = 1; + + // One or more MetaGraphs. + repeated MetaGraphDef meta_graphs = 2; +} diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/saved_object_graph.pb.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/saved_object_graph.pb.h new file mode 100644 index 0000000000000000000000000000000000000000..83056125e349a3eecb30f435c661a1c067957658 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/saved_object_graph.pb.h @@ -0,0 +1,5585 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/saved_object_graph.proto + +#ifndef GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto + +#include +#include + +#include +#if PROTOBUF_VERSION < 3021000 +#error This file was generated by a newer version of protoc which is +#error incompatible with your Protocol Buffer headers. Please update +#error your headers. +#endif +#if 3021009 < PROTOBUF_MIN_PROTOC_VERSION +#error This file was generated by an older version of protoc which is +#error incompatible with your Protocol Buffer headers. Please +#error regenerate this file with a newer version of protoc. +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include // IWYU pragma: export +#include // IWYU pragma: export +#include // IWYU pragma: export +#include +#include +#include +#include +#include +#include "tensorflow/core/framework/tensor_shape.pb.h" +#include "tensorflow/core/framework/types.pb.h" +#include "tensorflow/core/framework/variable.pb.h" +#include "tensorflow/core/framework/versions.pb.h" +#include "tensorflow/core/protobuf/struct.pb.h" +#include "tensorflow/core/protobuf/trackable_object_graph.pb.h" +// @@protoc_insertion_point(includes) +#include +#define PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto +PROTOBUF_NAMESPACE_OPEN +namespace internal { +class AnyMetadata; +} // namespace internal +PROTOBUF_NAMESPACE_CLOSE + +// Internal implementation detail -- do not use these members. +struct TableStruct_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto { + static const uint32_t offsets[]; +}; +extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto; +namespace tensorflow { +class CapturedTensor; +struct CapturedTensorDefaultTypeInternal; +extern CapturedTensorDefaultTypeInternal _CapturedTensor_default_instance_; +class FunctionSpec; +struct FunctionSpecDefaultTypeInternal; +extern FunctionSpecDefaultTypeInternal _FunctionSpec_default_instance_; +class SaveableObject; +struct SaveableObjectDefaultTypeInternal; +extern SaveableObjectDefaultTypeInternal _SaveableObject_default_instance_; +class SavedAsset; +struct SavedAssetDefaultTypeInternal; +extern SavedAssetDefaultTypeInternal _SavedAsset_default_instance_; +class SavedBareConcreteFunction; +struct SavedBareConcreteFunctionDefaultTypeInternal; +extern SavedBareConcreteFunctionDefaultTypeInternal _SavedBareConcreteFunction_default_instance_; +class SavedConcreteFunction; +struct SavedConcreteFunctionDefaultTypeInternal; +extern SavedConcreteFunctionDefaultTypeInternal _SavedConcreteFunction_default_instance_; +class SavedConstant; +struct SavedConstantDefaultTypeInternal; +extern SavedConstantDefaultTypeInternal _SavedConstant_default_instance_; +class SavedFunction; +struct SavedFunctionDefaultTypeInternal; +extern SavedFunctionDefaultTypeInternal _SavedFunction_default_instance_; +class SavedObject; +struct SavedObjectDefaultTypeInternal; +extern SavedObjectDefaultTypeInternal _SavedObject_default_instance_; +class SavedObjectGraph; +struct SavedObjectGraphDefaultTypeInternal; +extern SavedObjectGraphDefaultTypeInternal _SavedObjectGraph_default_instance_; +class SavedObjectGraph_ConcreteFunctionsEntry_DoNotUse; +struct SavedObjectGraph_ConcreteFunctionsEntry_DoNotUseDefaultTypeInternal; +extern SavedObjectGraph_ConcreteFunctionsEntry_DoNotUseDefaultTypeInternal _SavedObjectGraph_ConcreteFunctionsEntry_DoNotUse_default_instance_; +class SavedObject_SaveableObjectsEntry_DoNotUse; +struct SavedObject_SaveableObjectsEntry_DoNotUseDefaultTypeInternal; +extern SavedObject_SaveableObjectsEntry_DoNotUseDefaultTypeInternal _SavedObject_SaveableObjectsEntry_DoNotUse_default_instance_; +class SavedResource; +struct SavedResourceDefaultTypeInternal; +extern SavedResourceDefaultTypeInternal _SavedResource_default_instance_; +class SavedUserObject; +struct SavedUserObjectDefaultTypeInternal; +extern SavedUserObjectDefaultTypeInternal _SavedUserObject_default_instance_; +class SavedVariable; +struct SavedVariableDefaultTypeInternal; +extern SavedVariableDefaultTypeInternal _SavedVariable_default_instance_; +} // namespace tensorflow +PROTOBUF_NAMESPACE_OPEN +template<> ::tensorflow::CapturedTensor* Arena::CreateMaybeMessage<::tensorflow::CapturedTensor>(Arena*); +template<> ::tensorflow::FunctionSpec* Arena::CreateMaybeMessage<::tensorflow::FunctionSpec>(Arena*); +template<> ::tensorflow::SaveableObject* Arena::CreateMaybeMessage<::tensorflow::SaveableObject>(Arena*); +template<> ::tensorflow::SavedAsset* Arena::CreateMaybeMessage<::tensorflow::SavedAsset>(Arena*); +template<> ::tensorflow::SavedBareConcreteFunction* Arena::CreateMaybeMessage<::tensorflow::SavedBareConcreteFunction>(Arena*); +template<> ::tensorflow::SavedConcreteFunction* Arena::CreateMaybeMessage<::tensorflow::SavedConcreteFunction>(Arena*); +template<> ::tensorflow::SavedConstant* Arena::CreateMaybeMessage<::tensorflow::SavedConstant>(Arena*); +template<> ::tensorflow::SavedFunction* Arena::CreateMaybeMessage<::tensorflow::SavedFunction>(Arena*); +template<> ::tensorflow::SavedObject* Arena::CreateMaybeMessage<::tensorflow::SavedObject>(Arena*); +template<> ::tensorflow::SavedObjectGraph* Arena::CreateMaybeMessage<::tensorflow::SavedObjectGraph>(Arena*); +template<> ::tensorflow::SavedObjectGraph_ConcreteFunctionsEntry_DoNotUse* Arena::CreateMaybeMessage<::tensorflow::SavedObjectGraph_ConcreteFunctionsEntry_DoNotUse>(Arena*); +template<> ::tensorflow::SavedObject_SaveableObjectsEntry_DoNotUse* Arena::CreateMaybeMessage<::tensorflow::SavedObject_SaveableObjectsEntry_DoNotUse>(Arena*); +template<> ::tensorflow::SavedResource* Arena::CreateMaybeMessage<::tensorflow::SavedResource>(Arena*); +template<> ::tensorflow::SavedUserObject* Arena::CreateMaybeMessage<::tensorflow::SavedUserObject>(Arena*); +template<> ::tensorflow::SavedVariable* Arena::CreateMaybeMessage<::tensorflow::SavedVariable>(Arena*); +PROTOBUF_NAMESPACE_CLOSE +namespace tensorflow { + +enum FunctionSpec_JitCompile : int { + FunctionSpec_JitCompile_DEFAULT = 0, + FunctionSpec_JitCompile_ON = 1, + FunctionSpec_JitCompile_OFF = 2, + FunctionSpec_JitCompile_FunctionSpec_JitCompile_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits::min(), + FunctionSpec_JitCompile_FunctionSpec_JitCompile_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits::max() +}; +bool FunctionSpec_JitCompile_IsValid(int value); +constexpr FunctionSpec_JitCompile FunctionSpec_JitCompile_JitCompile_MIN = FunctionSpec_JitCompile_DEFAULT; +constexpr FunctionSpec_JitCompile FunctionSpec_JitCompile_JitCompile_MAX = FunctionSpec_JitCompile_OFF; +constexpr int FunctionSpec_JitCompile_JitCompile_ARRAYSIZE = FunctionSpec_JitCompile_JitCompile_MAX + 1; + +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* FunctionSpec_JitCompile_descriptor(); +template +inline const std::string& FunctionSpec_JitCompile_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function FunctionSpec_JitCompile_Name."); + return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( + FunctionSpec_JitCompile_descriptor(), enum_t_value); +} +inline bool FunctionSpec_JitCompile_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, FunctionSpec_JitCompile* value) { + return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( + FunctionSpec_JitCompile_descriptor(), name, value); +} +// =================================================================== + +class SavedObjectGraph_ConcreteFunctionsEntry_DoNotUse : public ::PROTOBUF_NAMESPACE_ID::internal::MapEntry { +public: + typedef ::PROTOBUF_NAMESPACE_ID::internal::MapEntry SuperType; + SavedObjectGraph_ConcreteFunctionsEntry_DoNotUse(); + explicit PROTOBUF_CONSTEXPR SavedObjectGraph_ConcreteFunctionsEntry_DoNotUse( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + explicit SavedObjectGraph_ConcreteFunctionsEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena); + void MergeFrom(const SavedObjectGraph_ConcreteFunctionsEntry_DoNotUse& other); + static const SavedObjectGraph_ConcreteFunctionsEntry_DoNotUse* internal_default_instance() { return reinterpret_cast(&_SavedObjectGraph_ConcreteFunctionsEntry_DoNotUse_default_instance_); } + static bool ValidateKey(std::string* s) { + return ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(s->data(), static_cast(s->size()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, "tensorflow.SavedObjectGraph.ConcreteFunctionsEntry.key"); + } + static bool ValidateValue(void*) { return true; } + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto; +}; + +// ------------------------------------------------------------------- + +class SavedObjectGraph final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.SavedObjectGraph) */ { + public: + inline SavedObjectGraph() : SavedObjectGraph(nullptr) {} + ~SavedObjectGraph() override; + explicit PROTOBUF_CONSTEXPR SavedObjectGraph(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + SavedObjectGraph(const SavedObjectGraph& from); + SavedObjectGraph(SavedObjectGraph&& from) noexcept + : SavedObjectGraph() { + *this = ::std::move(from); + } + + inline SavedObjectGraph& operator=(const SavedObjectGraph& from) { + CopyFrom(from); + return *this; + } + inline SavedObjectGraph& operator=(SavedObjectGraph&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const SavedObjectGraph& default_instance() { + return *internal_default_instance(); + } + static inline const SavedObjectGraph* internal_default_instance() { + return reinterpret_cast( + &_SavedObjectGraph_default_instance_); + } + static constexpr int kIndexInFileMessages = + 1; + + friend void swap(SavedObjectGraph& a, SavedObjectGraph& b) { + a.Swap(&b); + } + inline void Swap(SavedObjectGraph* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(SavedObjectGraph* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + SavedObjectGraph* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const SavedObjectGraph& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const SavedObjectGraph& from) { + SavedObjectGraph::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(SavedObjectGraph* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.SavedObjectGraph"; + } + protected: + explicit SavedObjectGraph(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + + // accessors ------------------------------------------------------- + + enum : int { + kNodesFieldNumber = 1, + kConcreteFunctionsFieldNumber = 2, + }; + // repeated .tensorflow.SavedObject nodes = 1; + int nodes_size() const; + private: + int _internal_nodes_size() const; + public: + void clear_nodes(); + ::tensorflow::SavedObject* mutable_nodes(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::SavedObject >* + mutable_nodes(); + private: + const ::tensorflow::SavedObject& _internal_nodes(int index) const; + ::tensorflow::SavedObject* _internal_add_nodes(); + public: + const ::tensorflow::SavedObject& nodes(int index) const; + ::tensorflow::SavedObject* add_nodes(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::SavedObject >& + nodes() const; + + // map concrete_functions = 2; + int concrete_functions_size() const; + private: + int _internal_concrete_functions_size() const; + public: + void clear_concrete_functions(); + private: + const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::SavedConcreteFunction >& + _internal_concrete_functions() const; + ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::SavedConcreteFunction >* + _internal_mutable_concrete_functions(); + public: + const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::SavedConcreteFunction >& + concrete_functions() const; + ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::SavedConcreteFunction >* + mutable_concrete_functions(); + + // @@protoc_insertion_point(class_scope:tensorflow.SavedObjectGraph) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::SavedObject > nodes_; + ::PROTOBUF_NAMESPACE_ID::internal::MapField< + SavedObjectGraph_ConcreteFunctionsEntry_DoNotUse, + std::string, ::tensorflow::SavedConcreteFunction, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_MESSAGE> concrete_functions_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto; +}; +// ------------------------------------------------------------------- + +class SavedObject_SaveableObjectsEntry_DoNotUse : public ::PROTOBUF_NAMESPACE_ID::internal::MapEntry { +public: + typedef ::PROTOBUF_NAMESPACE_ID::internal::MapEntry SuperType; + SavedObject_SaveableObjectsEntry_DoNotUse(); + explicit PROTOBUF_CONSTEXPR SavedObject_SaveableObjectsEntry_DoNotUse( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + explicit SavedObject_SaveableObjectsEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena); + void MergeFrom(const SavedObject_SaveableObjectsEntry_DoNotUse& other); + static const SavedObject_SaveableObjectsEntry_DoNotUse* internal_default_instance() { return reinterpret_cast(&_SavedObject_SaveableObjectsEntry_DoNotUse_default_instance_); } + static bool ValidateKey(std::string* s) { + return ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(s->data(), static_cast(s->size()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, "tensorflow.SavedObject.SaveableObjectsEntry.key"); + } + static bool ValidateValue(void*) { return true; } + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto; +}; + +// ------------------------------------------------------------------- + +class SavedObject final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.SavedObject) */ { + public: + inline SavedObject() : SavedObject(nullptr) {} + ~SavedObject() override; + explicit PROTOBUF_CONSTEXPR SavedObject(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + SavedObject(const SavedObject& from); + SavedObject(SavedObject&& from) noexcept + : SavedObject() { + *this = ::std::move(from); + } + + inline SavedObject& operator=(const SavedObject& from) { + CopyFrom(from); + return *this; + } + inline SavedObject& operator=(SavedObject&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const SavedObject& default_instance() { + return *internal_default_instance(); + } + enum KindCase { + kUserObject = 4, + kAsset = 5, + kFunction = 6, + kVariable = 7, + kBareConcreteFunction = 8, + kConstant = 9, + kResource = 10, + kCapturedTensor = 12, + KIND_NOT_SET = 0, + }; + + static inline const SavedObject* internal_default_instance() { + return reinterpret_cast( + &_SavedObject_default_instance_); + } + static constexpr int kIndexInFileMessages = + 3; + + friend void swap(SavedObject& a, SavedObject& b) { + a.Swap(&b); + } + inline void Swap(SavedObject* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(SavedObject* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + SavedObject* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const SavedObject& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const SavedObject& from) { + SavedObject::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(SavedObject* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.SavedObject"; + } + protected: + explicit SavedObject(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + + // accessors ------------------------------------------------------- + + enum : int { + kChildrenFieldNumber = 1, + kSlotVariablesFieldNumber = 3, + kSaveableObjectsFieldNumber = 11, + kDependenciesFieldNumber = 15, + kRegisteredNameFieldNumber = 13, + kRegisteredSaverFieldNumber = 16, + kSerializedUserProtoFieldNumber = 14, + kUserObjectFieldNumber = 4, + kAssetFieldNumber = 5, + kFunctionFieldNumber = 6, + kVariableFieldNumber = 7, + kBareConcreteFunctionFieldNumber = 8, + kConstantFieldNumber = 9, + kResourceFieldNumber = 10, + kCapturedTensorFieldNumber = 12, + }; + // repeated .tensorflow.TrackableObjectGraph.TrackableObject.ObjectReference children = 1; + int children_size() const; + private: + int _internal_children_size() const; + public: + void clear_children(); + ::tensorflow::TrackableObjectGraph_TrackableObject_ObjectReference* mutable_children(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::TrackableObjectGraph_TrackableObject_ObjectReference >* + mutable_children(); + private: + const ::tensorflow::TrackableObjectGraph_TrackableObject_ObjectReference& _internal_children(int index) const; + ::tensorflow::TrackableObjectGraph_TrackableObject_ObjectReference* _internal_add_children(); + public: + const ::tensorflow::TrackableObjectGraph_TrackableObject_ObjectReference& children(int index) const; + ::tensorflow::TrackableObjectGraph_TrackableObject_ObjectReference* add_children(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::TrackableObjectGraph_TrackableObject_ObjectReference >& + children() const; + + // repeated .tensorflow.TrackableObjectGraph.TrackableObject.SlotVariableReference slot_variables = 3; + int slot_variables_size() const; + private: + int _internal_slot_variables_size() const; + public: + void clear_slot_variables(); + ::tensorflow::TrackableObjectGraph_TrackableObject_SlotVariableReference* mutable_slot_variables(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::TrackableObjectGraph_TrackableObject_SlotVariableReference >* + mutable_slot_variables(); + private: + const ::tensorflow::TrackableObjectGraph_TrackableObject_SlotVariableReference& _internal_slot_variables(int index) const; + ::tensorflow::TrackableObjectGraph_TrackableObject_SlotVariableReference* _internal_add_slot_variables(); + public: + const ::tensorflow::TrackableObjectGraph_TrackableObject_SlotVariableReference& slot_variables(int index) const; + ::tensorflow::TrackableObjectGraph_TrackableObject_SlotVariableReference* add_slot_variables(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::TrackableObjectGraph_TrackableObject_SlotVariableReference >& + slot_variables() const; + + // map saveable_objects = 11; + int saveable_objects_size() const; + private: + int _internal_saveable_objects_size() const; + public: + void clear_saveable_objects(); + private: + const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::SaveableObject >& + _internal_saveable_objects() const; + ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::SaveableObject >* + _internal_mutable_saveable_objects(); + public: + const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::SaveableObject >& + saveable_objects() const; + ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::SaveableObject >* + mutable_saveable_objects(); + + // repeated .tensorflow.TrackableObjectGraph.TrackableObject.ObjectReference dependencies = 15; + int dependencies_size() const; + private: + int _internal_dependencies_size() const; + public: + void clear_dependencies(); + ::tensorflow::TrackableObjectGraph_TrackableObject_ObjectReference* mutable_dependencies(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::TrackableObjectGraph_TrackableObject_ObjectReference >* + mutable_dependencies(); + private: + const ::tensorflow::TrackableObjectGraph_TrackableObject_ObjectReference& _internal_dependencies(int index) const; + ::tensorflow::TrackableObjectGraph_TrackableObject_ObjectReference* _internal_add_dependencies(); + public: + const ::tensorflow::TrackableObjectGraph_TrackableObject_ObjectReference& dependencies(int index) const; + ::tensorflow::TrackableObjectGraph_TrackableObject_ObjectReference* add_dependencies(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::TrackableObjectGraph_TrackableObject_ObjectReference >& + dependencies() const; + + // string registered_name = 13; + void clear_registered_name(); + const std::string& registered_name() const; + template + void set_registered_name(ArgT0&& arg0, ArgT... args); + std::string* mutable_registered_name(); + PROTOBUF_NODISCARD std::string* release_registered_name(); + void set_allocated_registered_name(std::string* registered_name); + private: + const std::string& _internal_registered_name() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_registered_name(const std::string& value); + std::string* _internal_mutable_registered_name(); + public: + + // string registered_saver = 16; + void clear_registered_saver(); + const std::string& registered_saver() const; + template + void set_registered_saver(ArgT0&& arg0, ArgT... args); + std::string* mutable_registered_saver(); + PROTOBUF_NODISCARD std::string* release_registered_saver(); + void set_allocated_registered_saver(std::string* registered_saver); + private: + const std::string& _internal_registered_saver() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_registered_saver(const std::string& value); + std::string* _internal_mutable_registered_saver(); + public: + + // .google.protobuf.Any serialized_user_proto = 14; + bool has_serialized_user_proto() const; + private: + bool _internal_has_serialized_user_proto() const; + public: + void clear_serialized_user_proto(); + const ::PROTOBUF_NAMESPACE_ID::Any& serialized_user_proto() const; + PROTOBUF_NODISCARD ::PROTOBUF_NAMESPACE_ID::Any* release_serialized_user_proto(); + ::PROTOBUF_NAMESPACE_ID::Any* mutable_serialized_user_proto(); + void set_allocated_serialized_user_proto(::PROTOBUF_NAMESPACE_ID::Any* serialized_user_proto); + private: + const ::PROTOBUF_NAMESPACE_ID::Any& _internal_serialized_user_proto() const; + ::PROTOBUF_NAMESPACE_ID::Any* _internal_mutable_serialized_user_proto(); + public: + void unsafe_arena_set_allocated_serialized_user_proto( + ::PROTOBUF_NAMESPACE_ID::Any* serialized_user_proto); + ::PROTOBUF_NAMESPACE_ID::Any* unsafe_arena_release_serialized_user_proto(); + + // .tensorflow.SavedUserObject user_object = 4; + bool has_user_object() const; + private: + bool _internal_has_user_object() const; + public: + void clear_user_object(); + const ::tensorflow::SavedUserObject& user_object() const; + PROTOBUF_NODISCARD ::tensorflow::SavedUserObject* release_user_object(); + ::tensorflow::SavedUserObject* mutable_user_object(); + void set_allocated_user_object(::tensorflow::SavedUserObject* user_object); + private: + const ::tensorflow::SavedUserObject& _internal_user_object() const; + ::tensorflow::SavedUserObject* _internal_mutable_user_object(); + public: + void unsafe_arena_set_allocated_user_object( + ::tensorflow::SavedUserObject* user_object); + ::tensorflow::SavedUserObject* unsafe_arena_release_user_object(); + + // .tensorflow.SavedAsset asset = 5; + bool has_asset() const; + private: + bool _internal_has_asset() const; + public: + void clear_asset(); + const ::tensorflow::SavedAsset& asset() const; + PROTOBUF_NODISCARD ::tensorflow::SavedAsset* release_asset(); + ::tensorflow::SavedAsset* mutable_asset(); + void set_allocated_asset(::tensorflow::SavedAsset* asset); + private: + const ::tensorflow::SavedAsset& _internal_asset() const; + ::tensorflow::SavedAsset* _internal_mutable_asset(); + public: + void unsafe_arena_set_allocated_asset( + ::tensorflow::SavedAsset* asset); + ::tensorflow::SavedAsset* unsafe_arena_release_asset(); + + // .tensorflow.SavedFunction function = 6; + bool has_function() const; + private: + bool _internal_has_function() const; + public: + void clear_function(); + const ::tensorflow::SavedFunction& function() const; + PROTOBUF_NODISCARD ::tensorflow::SavedFunction* release_function(); + ::tensorflow::SavedFunction* mutable_function(); + void set_allocated_function(::tensorflow::SavedFunction* function); + private: + const ::tensorflow::SavedFunction& _internal_function() const; + ::tensorflow::SavedFunction* _internal_mutable_function(); + public: + void unsafe_arena_set_allocated_function( + ::tensorflow::SavedFunction* function); + ::tensorflow::SavedFunction* unsafe_arena_release_function(); + + // .tensorflow.SavedVariable variable = 7; + bool has_variable() const; + private: + bool _internal_has_variable() const; + public: + void clear_variable(); + const ::tensorflow::SavedVariable& variable() const; + PROTOBUF_NODISCARD ::tensorflow::SavedVariable* release_variable(); + ::tensorflow::SavedVariable* mutable_variable(); + void set_allocated_variable(::tensorflow::SavedVariable* variable); + private: + const ::tensorflow::SavedVariable& _internal_variable() const; + ::tensorflow::SavedVariable* _internal_mutable_variable(); + public: + void unsafe_arena_set_allocated_variable( + ::tensorflow::SavedVariable* variable); + ::tensorflow::SavedVariable* unsafe_arena_release_variable(); + + // .tensorflow.SavedBareConcreteFunction bare_concrete_function = 8; + bool has_bare_concrete_function() const; + private: + bool _internal_has_bare_concrete_function() const; + public: + void clear_bare_concrete_function(); + const ::tensorflow::SavedBareConcreteFunction& bare_concrete_function() const; + PROTOBUF_NODISCARD ::tensorflow::SavedBareConcreteFunction* release_bare_concrete_function(); + ::tensorflow::SavedBareConcreteFunction* mutable_bare_concrete_function(); + void set_allocated_bare_concrete_function(::tensorflow::SavedBareConcreteFunction* bare_concrete_function); + private: + const ::tensorflow::SavedBareConcreteFunction& _internal_bare_concrete_function() const; + ::tensorflow::SavedBareConcreteFunction* _internal_mutable_bare_concrete_function(); + public: + void unsafe_arena_set_allocated_bare_concrete_function( + ::tensorflow::SavedBareConcreteFunction* bare_concrete_function); + ::tensorflow::SavedBareConcreteFunction* unsafe_arena_release_bare_concrete_function(); + + // .tensorflow.SavedConstant constant = 9; + bool has_constant() const; + private: + bool _internal_has_constant() const; + public: + void clear_constant(); + const ::tensorflow::SavedConstant& constant() const; + PROTOBUF_NODISCARD ::tensorflow::SavedConstant* release_constant(); + ::tensorflow::SavedConstant* mutable_constant(); + void set_allocated_constant(::tensorflow::SavedConstant* constant); + private: + const ::tensorflow::SavedConstant& _internal_constant() const; + ::tensorflow::SavedConstant* _internal_mutable_constant(); + public: + void unsafe_arena_set_allocated_constant( + ::tensorflow::SavedConstant* constant); + ::tensorflow::SavedConstant* unsafe_arena_release_constant(); + + // .tensorflow.SavedResource resource = 10; + bool has_resource() const; + private: + bool _internal_has_resource() const; + public: + void clear_resource(); + const ::tensorflow::SavedResource& resource() const; + PROTOBUF_NODISCARD ::tensorflow::SavedResource* release_resource(); + ::tensorflow::SavedResource* mutable_resource(); + void set_allocated_resource(::tensorflow::SavedResource* resource); + private: + const ::tensorflow::SavedResource& _internal_resource() const; + ::tensorflow::SavedResource* _internal_mutable_resource(); + public: + void unsafe_arena_set_allocated_resource( + ::tensorflow::SavedResource* resource); + ::tensorflow::SavedResource* unsafe_arena_release_resource(); + + // .tensorflow.CapturedTensor captured_tensor = 12; + bool has_captured_tensor() const; + private: + bool _internal_has_captured_tensor() const; + public: + void clear_captured_tensor(); + const ::tensorflow::CapturedTensor& captured_tensor() const; + PROTOBUF_NODISCARD ::tensorflow::CapturedTensor* release_captured_tensor(); + ::tensorflow::CapturedTensor* mutable_captured_tensor(); + void set_allocated_captured_tensor(::tensorflow::CapturedTensor* captured_tensor); + private: + const ::tensorflow::CapturedTensor& _internal_captured_tensor() const; + ::tensorflow::CapturedTensor* _internal_mutable_captured_tensor(); + public: + void unsafe_arena_set_allocated_captured_tensor( + ::tensorflow::CapturedTensor* captured_tensor); + ::tensorflow::CapturedTensor* unsafe_arena_release_captured_tensor(); + + void clear_kind(); + KindCase kind_case() const; + // @@protoc_insertion_point(class_scope:tensorflow.SavedObject) + private: + class _Internal; + void set_has_user_object(); + void set_has_asset(); + void set_has_function(); + void set_has_variable(); + void set_has_bare_concrete_function(); + void set_has_constant(); + void set_has_resource(); + void set_has_captured_tensor(); + + inline bool has_kind() const; + inline void clear_has_kind(); + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::TrackableObjectGraph_TrackableObject_ObjectReference > children_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::TrackableObjectGraph_TrackableObject_SlotVariableReference > slot_variables_; + ::PROTOBUF_NAMESPACE_ID::internal::MapField< + SavedObject_SaveableObjectsEntry_DoNotUse, + std::string, ::tensorflow::SaveableObject, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_MESSAGE> saveable_objects_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::TrackableObjectGraph_TrackableObject_ObjectReference > dependencies_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr registered_name_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr registered_saver_; + ::PROTOBUF_NAMESPACE_ID::Any* serialized_user_proto_; + union KindUnion { + constexpr KindUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + ::tensorflow::SavedUserObject* user_object_; + ::tensorflow::SavedAsset* asset_; + ::tensorflow::SavedFunction* function_; + ::tensorflow::SavedVariable* variable_; + ::tensorflow::SavedBareConcreteFunction* bare_concrete_function_; + ::tensorflow::SavedConstant* constant_; + ::tensorflow::SavedResource* resource_; + ::tensorflow::CapturedTensor* captured_tensor_; + } kind_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + uint32_t _oneof_case_[1]; + + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto; +}; +// ------------------------------------------------------------------- + +class SavedUserObject final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.SavedUserObject) */ { + public: + inline SavedUserObject() : SavedUserObject(nullptr) {} + ~SavedUserObject() override; + explicit PROTOBUF_CONSTEXPR SavedUserObject(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + SavedUserObject(const SavedUserObject& from); + SavedUserObject(SavedUserObject&& from) noexcept + : SavedUserObject() { + *this = ::std::move(from); + } + + inline SavedUserObject& operator=(const SavedUserObject& from) { + CopyFrom(from); + return *this; + } + inline SavedUserObject& operator=(SavedUserObject&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const SavedUserObject& default_instance() { + return *internal_default_instance(); + } + static inline const SavedUserObject* internal_default_instance() { + return reinterpret_cast( + &_SavedUserObject_default_instance_); + } + static constexpr int kIndexInFileMessages = + 4; + + friend void swap(SavedUserObject& a, SavedUserObject& b) { + a.Swap(&b); + } + inline void Swap(SavedUserObject* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(SavedUserObject* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + SavedUserObject* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const SavedUserObject& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const SavedUserObject& from) { + SavedUserObject::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(SavedUserObject* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.SavedUserObject"; + } + protected: + explicit SavedUserObject(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kIdentifierFieldNumber = 1, + kMetadataFieldNumber = 3, + kVersionFieldNumber = 2, + }; + // string identifier = 1; + void clear_identifier(); + const std::string& identifier() const; + template + void set_identifier(ArgT0&& arg0, ArgT... args); + std::string* mutable_identifier(); + PROTOBUF_NODISCARD std::string* release_identifier(); + void set_allocated_identifier(std::string* identifier); + private: + const std::string& _internal_identifier() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_identifier(const std::string& value); + std::string* _internal_mutable_identifier(); + public: + + // string metadata = 3 [deprecated = true]; + PROTOBUF_DEPRECATED void clear_metadata(); + PROTOBUF_DEPRECATED const std::string& metadata() const; + template + PROTOBUF_DEPRECATED void set_metadata(ArgT0&& arg0, ArgT... args); + PROTOBUF_DEPRECATED std::string* mutable_metadata(); + PROTOBUF_NODISCARD PROTOBUF_DEPRECATED std::string* release_metadata(); + PROTOBUF_DEPRECATED void set_allocated_metadata(std::string* metadata); + private: + const std::string& _internal_metadata() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_metadata(const std::string& value); + std::string* _internal_mutable_metadata(); + public: + + // .tensorflow.VersionDef version = 2; + bool has_version() const; + private: + bool _internal_has_version() const; + public: + void clear_version(); + const ::tensorflow::VersionDef& version() const; + PROTOBUF_NODISCARD ::tensorflow::VersionDef* release_version(); + ::tensorflow::VersionDef* mutable_version(); + void set_allocated_version(::tensorflow::VersionDef* version); + private: + const ::tensorflow::VersionDef& _internal_version() const; + ::tensorflow::VersionDef* _internal_mutable_version(); + public: + void unsafe_arena_set_allocated_version( + ::tensorflow::VersionDef* version); + ::tensorflow::VersionDef* unsafe_arena_release_version(); + + // @@protoc_insertion_point(class_scope:tensorflow.SavedUserObject) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr identifier_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr metadata_; + ::tensorflow::VersionDef* version_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto; +}; +// ------------------------------------------------------------------- + +class SavedAsset final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.SavedAsset) */ { + public: + inline SavedAsset() : SavedAsset(nullptr) {} + ~SavedAsset() override; + explicit PROTOBUF_CONSTEXPR SavedAsset(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + SavedAsset(const SavedAsset& from); + SavedAsset(SavedAsset&& from) noexcept + : SavedAsset() { + *this = ::std::move(from); + } + + inline SavedAsset& operator=(const SavedAsset& from) { + CopyFrom(from); + return *this; + } + inline SavedAsset& operator=(SavedAsset&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const SavedAsset& default_instance() { + return *internal_default_instance(); + } + static inline const SavedAsset* internal_default_instance() { + return reinterpret_cast( + &_SavedAsset_default_instance_); + } + static constexpr int kIndexInFileMessages = + 5; + + friend void swap(SavedAsset& a, SavedAsset& b) { + a.Swap(&b); + } + inline void Swap(SavedAsset* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(SavedAsset* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + SavedAsset* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const SavedAsset& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const SavedAsset& from) { + SavedAsset::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(SavedAsset* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.SavedAsset"; + } + protected: + explicit SavedAsset(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kAssetFileDefIndexFieldNumber = 1, + }; + // int32 asset_file_def_index = 1; + void clear_asset_file_def_index(); + int32_t asset_file_def_index() const; + void set_asset_file_def_index(int32_t value); + private: + int32_t _internal_asset_file_def_index() const; + void _internal_set_asset_file_def_index(int32_t value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.SavedAsset) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + int32_t asset_file_def_index_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto; +}; +// ------------------------------------------------------------------- + +class SavedFunction final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.SavedFunction) */ { + public: + inline SavedFunction() : SavedFunction(nullptr) {} + ~SavedFunction() override; + explicit PROTOBUF_CONSTEXPR SavedFunction(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + SavedFunction(const SavedFunction& from); + SavedFunction(SavedFunction&& from) noexcept + : SavedFunction() { + *this = ::std::move(from); + } + + inline SavedFunction& operator=(const SavedFunction& from) { + CopyFrom(from); + return *this; + } + inline SavedFunction& operator=(SavedFunction&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const SavedFunction& default_instance() { + return *internal_default_instance(); + } + static inline const SavedFunction* internal_default_instance() { + return reinterpret_cast( + &_SavedFunction_default_instance_); + } + static constexpr int kIndexInFileMessages = + 6; + + friend void swap(SavedFunction& a, SavedFunction& b) { + a.Swap(&b); + } + inline void Swap(SavedFunction* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(SavedFunction* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + SavedFunction* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const SavedFunction& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const SavedFunction& from) { + SavedFunction::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(SavedFunction* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.SavedFunction"; + } + protected: + explicit SavedFunction(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kConcreteFunctionsFieldNumber = 1, + kFunctionSpecFieldNumber = 2, + }; + // repeated string concrete_functions = 1; + int concrete_functions_size() const; + private: + int _internal_concrete_functions_size() const; + public: + void clear_concrete_functions(); + const std::string& concrete_functions(int index) const; + std::string* mutable_concrete_functions(int index); + void set_concrete_functions(int index, const std::string& value); + void set_concrete_functions(int index, std::string&& value); + void set_concrete_functions(int index, const char* value); + void set_concrete_functions(int index, const char* value, size_t size); + std::string* add_concrete_functions(); + void add_concrete_functions(const std::string& value); + void add_concrete_functions(std::string&& value); + void add_concrete_functions(const char* value); + void add_concrete_functions(const char* value, size_t size); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& concrete_functions() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* mutable_concrete_functions(); + private: + const std::string& _internal_concrete_functions(int index) const; + std::string* _internal_add_concrete_functions(); + public: + + // .tensorflow.FunctionSpec function_spec = 2; + bool has_function_spec() const; + private: + bool _internal_has_function_spec() const; + public: + void clear_function_spec(); + const ::tensorflow::FunctionSpec& function_spec() const; + PROTOBUF_NODISCARD ::tensorflow::FunctionSpec* release_function_spec(); + ::tensorflow::FunctionSpec* mutable_function_spec(); + void set_allocated_function_spec(::tensorflow::FunctionSpec* function_spec); + private: + const ::tensorflow::FunctionSpec& _internal_function_spec() const; + ::tensorflow::FunctionSpec* _internal_mutable_function_spec(); + public: + void unsafe_arena_set_allocated_function_spec( + ::tensorflow::FunctionSpec* function_spec); + ::tensorflow::FunctionSpec* unsafe_arena_release_function_spec(); + + // @@protoc_insertion_point(class_scope:tensorflow.SavedFunction) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField concrete_functions_; + ::tensorflow::FunctionSpec* function_spec_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto; +}; +// ------------------------------------------------------------------- + +class CapturedTensor final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.CapturedTensor) */ { + public: + inline CapturedTensor() : CapturedTensor(nullptr) {} + ~CapturedTensor() override; + explicit PROTOBUF_CONSTEXPR CapturedTensor(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + CapturedTensor(const CapturedTensor& from); + CapturedTensor(CapturedTensor&& from) noexcept + : CapturedTensor() { + *this = ::std::move(from); + } + + inline CapturedTensor& operator=(const CapturedTensor& from) { + CopyFrom(from); + return *this; + } + inline CapturedTensor& operator=(CapturedTensor&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const CapturedTensor& default_instance() { + return *internal_default_instance(); + } + static inline const CapturedTensor* internal_default_instance() { + return reinterpret_cast( + &_CapturedTensor_default_instance_); + } + static constexpr int kIndexInFileMessages = + 7; + + friend void swap(CapturedTensor& a, CapturedTensor& b) { + a.Swap(&b); + } + inline void Swap(CapturedTensor* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(CapturedTensor* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + CapturedTensor* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const CapturedTensor& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const CapturedTensor& from) { + CapturedTensor::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(CapturedTensor* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.CapturedTensor"; + } + protected: + explicit CapturedTensor(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kNameFieldNumber = 1, + kConcreteFunctionFieldNumber = 2, + }; + // string name = 1; + void clear_name(); + const std::string& name() const; + template + void set_name(ArgT0&& arg0, ArgT... args); + std::string* mutable_name(); + PROTOBUF_NODISCARD std::string* release_name(); + void set_allocated_name(std::string* name); + private: + const std::string& _internal_name() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_name(const std::string& value); + std::string* _internal_mutable_name(); + public: + + // string concrete_function = 2; + void clear_concrete_function(); + const std::string& concrete_function() const; + template + void set_concrete_function(ArgT0&& arg0, ArgT... args); + std::string* mutable_concrete_function(); + PROTOBUF_NODISCARD std::string* release_concrete_function(); + void set_allocated_concrete_function(std::string* concrete_function); + private: + const std::string& _internal_concrete_function() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_concrete_function(const std::string& value); + std::string* _internal_mutable_concrete_function(); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.CapturedTensor) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr concrete_function_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto; +}; +// ------------------------------------------------------------------- + +class SavedConcreteFunction final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.SavedConcreteFunction) */ { + public: + inline SavedConcreteFunction() : SavedConcreteFunction(nullptr) {} + ~SavedConcreteFunction() override; + explicit PROTOBUF_CONSTEXPR SavedConcreteFunction(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + SavedConcreteFunction(const SavedConcreteFunction& from); + SavedConcreteFunction(SavedConcreteFunction&& from) noexcept + : SavedConcreteFunction() { + *this = ::std::move(from); + } + + inline SavedConcreteFunction& operator=(const SavedConcreteFunction& from) { + CopyFrom(from); + return *this; + } + inline SavedConcreteFunction& operator=(SavedConcreteFunction&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const SavedConcreteFunction& default_instance() { + return *internal_default_instance(); + } + static inline const SavedConcreteFunction* internal_default_instance() { + return reinterpret_cast( + &_SavedConcreteFunction_default_instance_); + } + static constexpr int kIndexInFileMessages = + 8; + + friend void swap(SavedConcreteFunction& a, SavedConcreteFunction& b) { + a.Swap(&b); + } + inline void Swap(SavedConcreteFunction* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(SavedConcreteFunction* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + SavedConcreteFunction* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const SavedConcreteFunction& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const SavedConcreteFunction& from) { + SavedConcreteFunction::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(SavedConcreteFunction* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.SavedConcreteFunction"; + } + protected: + explicit SavedConcreteFunction(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kBoundInputsFieldNumber = 2, + kCanonicalizedInputSignatureFieldNumber = 3, + kOutputSignatureFieldNumber = 4, + }; + // repeated int32 bound_inputs = 2; + int bound_inputs_size() const; + private: + int _internal_bound_inputs_size() const; + public: + void clear_bound_inputs(); + private: + int32_t _internal_bound_inputs(int index) const; + const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >& + _internal_bound_inputs() const; + void _internal_add_bound_inputs(int32_t value); + ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >* + _internal_mutable_bound_inputs(); + public: + int32_t bound_inputs(int index) const; + void set_bound_inputs(int index, int32_t value); + void add_bound_inputs(int32_t value); + const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >& + bound_inputs() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >* + mutable_bound_inputs(); + + // .tensorflow.StructuredValue canonicalized_input_signature = 3; + bool has_canonicalized_input_signature() const; + private: + bool _internal_has_canonicalized_input_signature() const; + public: + void clear_canonicalized_input_signature(); + const ::tensorflow::StructuredValue& canonicalized_input_signature() const; + PROTOBUF_NODISCARD ::tensorflow::StructuredValue* release_canonicalized_input_signature(); + ::tensorflow::StructuredValue* mutable_canonicalized_input_signature(); + void set_allocated_canonicalized_input_signature(::tensorflow::StructuredValue* canonicalized_input_signature); + private: + const ::tensorflow::StructuredValue& _internal_canonicalized_input_signature() const; + ::tensorflow::StructuredValue* _internal_mutable_canonicalized_input_signature(); + public: + void unsafe_arena_set_allocated_canonicalized_input_signature( + ::tensorflow::StructuredValue* canonicalized_input_signature); + ::tensorflow::StructuredValue* unsafe_arena_release_canonicalized_input_signature(); + + // .tensorflow.StructuredValue output_signature = 4; + bool has_output_signature() const; + private: + bool _internal_has_output_signature() const; + public: + void clear_output_signature(); + const ::tensorflow::StructuredValue& output_signature() const; + PROTOBUF_NODISCARD ::tensorflow::StructuredValue* release_output_signature(); + ::tensorflow::StructuredValue* mutable_output_signature(); + void set_allocated_output_signature(::tensorflow::StructuredValue* output_signature); + private: + const ::tensorflow::StructuredValue& _internal_output_signature() const; + ::tensorflow::StructuredValue* _internal_mutable_output_signature(); + public: + void unsafe_arena_set_allocated_output_signature( + ::tensorflow::StructuredValue* output_signature); + ::tensorflow::StructuredValue* unsafe_arena_release_output_signature(); + + // @@protoc_insertion_point(class_scope:tensorflow.SavedConcreteFunction) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t > bound_inputs_; + mutable std::atomic _bound_inputs_cached_byte_size_; + ::tensorflow::StructuredValue* canonicalized_input_signature_; + ::tensorflow::StructuredValue* output_signature_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto; +}; +// ------------------------------------------------------------------- + +class SavedBareConcreteFunction final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.SavedBareConcreteFunction) */ { + public: + inline SavedBareConcreteFunction() : SavedBareConcreteFunction(nullptr) {} + ~SavedBareConcreteFunction() override; + explicit PROTOBUF_CONSTEXPR SavedBareConcreteFunction(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + SavedBareConcreteFunction(const SavedBareConcreteFunction& from); + SavedBareConcreteFunction(SavedBareConcreteFunction&& from) noexcept + : SavedBareConcreteFunction() { + *this = ::std::move(from); + } + + inline SavedBareConcreteFunction& operator=(const SavedBareConcreteFunction& from) { + CopyFrom(from); + return *this; + } + inline SavedBareConcreteFunction& operator=(SavedBareConcreteFunction&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const SavedBareConcreteFunction& default_instance() { + return *internal_default_instance(); + } + static inline const SavedBareConcreteFunction* internal_default_instance() { + return reinterpret_cast( + &_SavedBareConcreteFunction_default_instance_); + } + static constexpr int kIndexInFileMessages = + 9; + + friend void swap(SavedBareConcreteFunction& a, SavedBareConcreteFunction& b) { + a.Swap(&b); + } + inline void Swap(SavedBareConcreteFunction* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(SavedBareConcreteFunction* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + SavedBareConcreteFunction* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const SavedBareConcreteFunction& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const SavedBareConcreteFunction& from) { + SavedBareConcreteFunction::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(SavedBareConcreteFunction* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.SavedBareConcreteFunction"; + } + protected: + explicit SavedBareConcreteFunction(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kArgumentKeywordsFieldNumber = 2, + kConcreteFunctionNameFieldNumber = 1, + kFunctionSpecFieldNumber = 4, + kAllowedPositionalArgumentsFieldNumber = 3, + }; + // repeated string argument_keywords = 2; + int argument_keywords_size() const; + private: + int _internal_argument_keywords_size() const; + public: + void clear_argument_keywords(); + const std::string& argument_keywords(int index) const; + std::string* mutable_argument_keywords(int index); + void set_argument_keywords(int index, const std::string& value); + void set_argument_keywords(int index, std::string&& value); + void set_argument_keywords(int index, const char* value); + void set_argument_keywords(int index, const char* value, size_t size); + std::string* add_argument_keywords(); + void add_argument_keywords(const std::string& value); + void add_argument_keywords(std::string&& value); + void add_argument_keywords(const char* value); + void add_argument_keywords(const char* value, size_t size); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& argument_keywords() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* mutable_argument_keywords(); + private: + const std::string& _internal_argument_keywords(int index) const; + std::string* _internal_add_argument_keywords(); + public: + + // string concrete_function_name = 1; + void clear_concrete_function_name(); + const std::string& concrete_function_name() const; + template + void set_concrete_function_name(ArgT0&& arg0, ArgT... args); + std::string* mutable_concrete_function_name(); + PROTOBUF_NODISCARD std::string* release_concrete_function_name(); + void set_allocated_concrete_function_name(std::string* concrete_function_name); + private: + const std::string& _internal_concrete_function_name() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_concrete_function_name(const std::string& value); + std::string* _internal_mutable_concrete_function_name(); + public: + + // .tensorflow.FunctionSpec function_spec = 4; + bool has_function_spec() const; + private: + bool _internal_has_function_spec() const; + public: + void clear_function_spec(); + const ::tensorflow::FunctionSpec& function_spec() const; + PROTOBUF_NODISCARD ::tensorflow::FunctionSpec* release_function_spec(); + ::tensorflow::FunctionSpec* mutable_function_spec(); + void set_allocated_function_spec(::tensorflow::FunctionSpec* function_spec); + private: + const ::tensorflow::FunctionSpec& _internal_function_spec() const; + ::tensorflow::FunctionSpec* _internal_mutable_function_spec(); + public: + void unsafe_arena_set_allocated_function_spec( + ::tensorflow::FunctionSpec* function_spec); + ::tensorflow::FunctionSpec* unsafe_arena_release_function_spec(); + + // int64 allowed_positional_arguments = 3; + void clear_allowed_positional_arguments(); + int64_t allowed_positional_arguments() const; + void set_allowed_positional_arguments(int64_t value); + private: + int64_t _internal_allowed_positional_arguments() const; + void _internal_set_allowed_positional_arguments(int64_t value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.SavedBareConcreteFunction) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField argument_keywords_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr concrete_function_name_; + ::tensorflow::FunctionSpec* function_spec_; + int64_t allowed_positional_arguments_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto; +}; +// ------------------------------------------------------------------- + +class SavedConstant final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.SavedConstant) */ { + public: + inline SavedConstant() : SavedConstant(nullptr) {} + ~SavedConstant() override; + explicit PROTOBUF_CONSTEXPR SavedConstant(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + SavedConstant(const SavedConstant& from); + SavedConstant(SavedConstant&& from) noexcept + : SavedConstant() { + *this = ::std::move(from); + } + + inline SavedConstant& operator=(const SavedConstant& from) { + CopyFrom(from); + return *this; + } + inline SavedConstant& operator=(SavedConstant&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const SavedConstant& default_instance() { + return *internal_default_instance(); + } + static inline const SavedConstant* internal_default_instance() { + return reinterpret_cast( + &_SavedConstant_default_instance_); + } + static constexpr int kIndexInFileMessages = + 10; + + friend void swap(SavedConstant& a, SavedConstant& b) { + a.Swap(&b); + } + inline void Swap(SavedConstant* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(SavedConstant* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + SavedConstant* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const SavedConstant& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const SavedConstant& from) { + SavedConstant::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(SavedConstant* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.SavedConstant"; + } + protected: + explicit SavedConstant(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kOperationFieldNumber = 1, + }; + // string operation = 1; + void clear_operation(); + const std::string& operation() const; + template + void set_operation(ArgT0&& arg0, ArgT... args); + std::string* mutable_operation(); + PROTOBUF_NODISCARD std::string* release_operation(); + void set_allocated_operation(std::string* operation); + private: + const std::string& _internal_operation() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_operation(const std::string& value); + std::string* _internal_mutable_operation(); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.SavedConstant) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr operation_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto; +}; +// ------------------------------------------------------------------- + +class SavedVariable final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.SavedVariable) */ { + public: + inline SavedVariable() : SavedVariable(nullptr) {} + ~SavedVariable() override; + explicit PROTOBUF_CONSTEXPR SavedVariable(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + SavedVariable(const SavedVariable& from); + SavedVariable(SavedVariable&& from) noexcept + : SavedVariable() { + *this = ::std::move(from); + } + + inline SavedVariable& operator=(const SavedVariable& from) { + CopyFrom(from); + return *this; + } + inline SavedVariable& operator=(SavedVariable&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const SavedVariable& default_instance() { + return *internal_default_instance(); + } + static inline const SavedVariable* internal_default_instance() { + return reinterpret_cast( + &_SavedVariable_default_instance_); + } + static constexpr int kIndexInFileMessages = + 11; + + friend void swap(SavedVariable& a, SavedVariable& b) { + a.Swap(&b); + } + inline void Swap(SavedVariable* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(SavedVariable* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + SavedVariable* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const SavedVariable& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const SavedVariable& from) { + SavedVariable::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(SavedVariable* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.SavedVariable"; + } + protected: + explicit SavedVariable(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kExperimentalDistributedVariableComponentsFieldNumber = 8, + kNameFieldNumber = 6, + kDeviceFieldNumber = 7, + kShapeFieldNumber = 2, + kDtypeFieldNumber = 1, + kTrainableFieldNumber = 3, + kSynchronizationFieldNumber = 4, + kAggregationFieldNumber = 5, + }; + // repeated .tensorflow.SavedVariable experimental_distributed_variable_components = 8; + int experimental_distributed_variable_components_size() const; + private: + int _internal_experimental_distributed_variable_components_size() const; + public: + void clear_experimental_distributed_variable_components(); + ::tensorflow::SavedVariable* mutable_experimental_distributed_variable_components(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::SavedVariable >* + mutable_experimental_distributed_variable_components(); + private: + const ::tensorflow::SavedVariable& _internal_experimental_distributed_variable_components(int index) const; + ::tensorflow::SavedVariable* _internal_add_experimental_distributed_variable_components(); + public: + const ::tensorflow::SavedVariable& experimental_distributed_variable_components(int index) const; + ::tensorflow::SavedVariable* add_experimental_distributed_variable_components(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::SavedVariable >& + experimental_distributed_variable_components() const; + + // string name = 6; + void clear_name(); + const std::string& name() const; + template + void set_name(ArgT0&& arg0, ArgT... args); + std::string* mutable_name(); + PROTOBUF_NODISCARD std::string* release_name(); + void set_allocated_name(std::string* name); + private: + const std::string& _internal_name() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_name(const std::string& value); + std::string* _internal_mutable_name(); + public: + + // string device = 7; + void clear_device(); + const std::string& device() const; + template + void set_device(ArgT0&& arg0, ArgT... args); + std::string* mutable_device(); + PROTOBUF_NODISCARD std::string* release_device(); + void set_allocated_device(std::string* device); + private: + const std::string& _internal_device() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_device(const std::string& value); + std::string* _internal_mutable_device(); + public: + + // .tensorflow.TensorShapeProto shape = 2; + bool has_shape() const; + private: + bool _internal_has_shape() const; + public: + void clear_shape(); + const ::tensorflow::TensorShapeProto& shape() const; + PROTOBUF_NODISCARD ::tensorflow::TensorShapeProto* release_shape(); + ::tensorflow::TensorShapeProto* mutable_shape(); + void set_allocated_shape(::tensorflow::TensorShapeProto* shape); + private: + const ::tensorflow::TensorShapeProto& _internal_shape() const; + ::tensorflow::TensorShapeProto* _internal_mutable_shape(); + public: + void unsafe_arena_set_allocated_shape( + ::tensorflow::TensorShapeProto* shape); + ::tensorflow::TensorShapeProto* unsafe_arena_release_shape(); + + // .tensorflow.DataType dtype = 1; + void clear_dtype(); + ::tensorflow::DataType dtype() const; + void set_dtype(::tensorflow::DataType value); + private: + ::tensorflow::DataType _internal_dtype() const; + void _internal_set_dtype(::tensorflow::DataType value); + public: + + // bool trainable = 3; + void clear_trainable(); + bool trainable() const; + void set_trainable(bool value); + private: + bool _internal_trainable() const; + void _internal_set_trainable(bool value); + public: + + // .tensorflow.VariableSynchronization synchronization = 4; + void clear_synchronization(); + ::tensorflow::VariableSynchronization synchronization() const; + void set_synchronization(::tensorflow::VariableSynchronization value); + private: + ::tensorflow::VariableSynchronization _internal_synchronization() const; + void _internal_set_synchronization(::tensorflow::VariableSynchronization value); + public: + + // .tensorflow.VariableAggregation aggregation = 5; + void clear_aggregation(); + ::tensorflow::VariableAggregation aggregation() const; + void set_aggregation(::tensorflow::VariableAggregation value); + private: + ::tensorflow::VariableAggregation _internal_aggregation() const; + void _internal_set_aggregation(::tensorflow::VariableAggregation value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.SavedVariable) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::SavedVariable > experimental_distributed_variable_components_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr device_; + ::tensorflow::TensorShapeProto* shape_; + int dtype_; + bool trainable_; + int synchronization_; + int aggregation_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto; +}; +// ------------------------------------------------------------------- + +class FunctionSpec final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.FunctionSpec) */ { + public: + inline FunctionSpec() : FunctionSpec(nullptr) {} + ~FunctionSpec() override; + explicit PROTOBUF_CONSTEXPR FunctionSpec(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + FunctionSpec(const FunctionSpec& from); + FunctionSpec(FunctionSpec&& from) noexcept + : FunctionSpec() { + *this = ::std::move(from); + } + + inline FunctionSpec& operator=(const FunctionSpec& from) { + CopyFrom(from); + return *this; + } + inline FunctionSpec& operator=(FunctionSpec&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const FunctionSpec& default_instance() { + return *internal_default_instance(); + } + static inline const FunctionSpec* internal_default_instance() { + return reinterpret_cast( + &_FunctionSpec_default_instance_); + } + static constexpr int kIndexInFileMessages = + 12; + + friend void swap(FunctionSpec& a, FunctionSpec& b) { + a.Swap(&b); + } + inline void Swap(FunctionSpec* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(FunctionSpec* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + FunctionSpec* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const FunctionSpec& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const FunctionSpec& from) { + FunctionSpec::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(FunctionSpec* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.FunctionSpec"; + } + protected: + explicit FunctionSpec(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + typedef FunctionSpec_JitCompile JitCompile; + static constexpr JitCompile DEFAULT = + FunctionSpec_JitCompile_DEFAULT; + static constexpr JitCompile ON = + FunctionSpec_JitCompile_ON; + static constexpr JitCompile OFF = + FunctionSpec_JitCompile_OFF; + static inline bool JitCompile_IsValid(int value) { + return FunctionSpec_JitCompile_IsValid(value); + } + static constexpr JitCompile JitCompile_MIN = + FunctionSpec_JitCompile_JitCompile_MIN; + static constexpr JitCompile JitCompile_MAX = + FunctionSpec_JitCompile_JitCompile_MAX; + static constexpr int JitCompile_ARRAYSIZE = + FunctionSpec_JitCompile_JitCompile_ARRAYSIZE; + static inline const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* + JitCompile_descriptor() { + return FunctionSpec_JitCompile_descriptor(); + } + template + static inline const std::string& JitCompile_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function JitCompile_Name."); + return FunctionSpec_JitCompile_Name(enum_t_value); + } + static inline bool JitCompile_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name, + JitCompile* value) { + return FunctionSpec_JitCompile_Parse(name, value); + } + + // accessors ------------------------------------------------------- + + enum : int { + kFullargspecFieldNumber = 1, + kInputSignatureFieldNumber = 5, + kIsMethodFieldNumber = 2, + kJitCompileFieldNumber = 6, + }; + // .tensorflow.StructuredValue fullargspec = 1; + bool has_fullargspec() const; + private: + bool _internal_has_fullargspec() const; + public: + void clear_fullargspec(); + const ::tensorflow::StructuredValue& fullargspec() const; + PROTOBUF_NODISCARD ::tensorflow::StructuredValue* release_fullargspec(); + ::tensorflow::StructuredValue* mutable_fullargspec(); + void set_allocated_fullargspec(::tensorflow::StructuredValue* fullargspec); + private: + const ::tensorflow::StructuredValue& _internal_fullargspec() const; + ::tensorflow::StructuredValue* _internal_mutable_fullargspec(); + public: + void unsafe_arena_set_allocated_fullargspec( + ::tensorflow::StructuredValue* fullargspec); + ::tensorflow::StructuredValue* unsafe_arena_release_fullargspec(); + + // .tensorflow.StructuredValue input_signature = 5; + bool has_input_signature() const; + private: + bool _internal_has_input_signature() const; + public: + void clear_input_signature(); + const ::tensorflow::StructuredValue& input_signature() const; + PROTOBUF_NODISCARD ::tensorflow::StructuredValue* release_input_signature(); + ::tensorflow::StructuredValue* mutable_input_signature(); + void set_allocated_input_signature(::tensorflow::StructuredValue* input_signature); + private: + const ::tensorflow::StructuredValue& _internal_input_signature() const; + ::tensorflow::StructuredValue* _internal_mutable_input_signature(); + public: + void unsafe_arena_set_allocated_input_signature( + ::tensorflow::StructuredValue* input_signature); + ::tensorflow::StructuredValue* unsafe_arena_release_input_signature(); + + // bool is_method = 2; + void clear_is_method(); + bool is_method() const; + void set_is_method(bool value); + private: + bool _internal_is_method() const; + void _internal_set_is_method(bool value); + public: + + // .tensorflow.FunctionSpec.JitCompile jit_compile = 6; + void clear_jit_compile(); + ::tensorflow::FunctionSpec_JitCompile jit_compile() const; + void set_jit_compile(::tensorflow::FunctionSpec_JitCompile value); + private: + ::tensorflow::FunctionSpec_JitCompile _internal_jit_compile() const; + void _internal_set_jit_compile(::tensorflow::FunctionSpec_JitCompile value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.FunctionSpec) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::tensorflow::StructuredValue* fullargspec_; + ::tensorflow::StructuredValue* input_signature_; + bool is_method_; + int jit_compile_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto; +}; +// ------------------------------------------------------------------- + +class SavedResource final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.SavedResource) */ { + public: + inline SavedResource() : SavedResource(nullptr) {} + ~SavedResource() override; + explicit PROTOBUF_CONSTEXPR SavedResource(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + SavedResource(const SavedResource& from); + SavedResource(SavedResource&& from) noexcept + : SavedResource() { + *this = ::std::move(from); + } + + inline SavedResource& operator=(const SavedResource& from) { + CopyFrom(from); + return *this; + } + inline SavedResource& operator=(SavedResource&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const SavedResource& default_instance() { + return *internal_default_instance(); + } + static inline const SavedResource* internal_default_instance() { + return reinterpret_cast( + &_SavedResource_default_instance_); + } + static constexpr int kIndexInFileMessages = + 13; + + friend void swap(SavedResource& a, SavedResource& b) { + a.Swap(&b); + } + inline void Swap(SavedResource* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(SavedResource* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + SavedResource* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const SavedResource& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const SavedResource& from) { + SavedResource::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(SavedResource* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.SavedResource"; + } + protected: + explicit SavedResource(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kDeviceFieldNumber = 1, + }; + // string device = 1; + void clear_device(); + const std::string& device() const; + template + void set_device(ArgT0&& arg0, ArgT... args); + std::string* mutable_device(); + PROTOBUF_NODISCARD std::string* release_device(); + void set_allocated_device(std::string* device); + private: + const std::string& _internal_device() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_device(const std::string& value); + std::string* _internal_mutable_device(); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.SavedResource) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr device_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto; +}; +// ------------------------------------------------------------------- + +class SaveableObject final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.SaveableObject) */ { + public: + inline SaveableObject() : SaveableObject(nullptr) {} + ~SaveableObject() override; + explicit PROTOBUF_CONSTEXPR SaveableObject(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + SaveableObject(const SaveableObject& from); + SaveableObject(SaveableObject&& from) noexcept + : SaveableObject() { + *this = ::std::move(from); + } + + inline SaveableObject& operator=(const SaveableObject& from) { + CopyFrom(from); + return *this; + } + inline SaveableObject& operator=(SaveableObject&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const SaveableObject& default_instance() { + return *internal_default_instance(); + } + static inline const SaveableObject* internal_default_instance() { + return reinterpret_cast( + &_SaveableObject_default_instance_); + } + static constexpr int kIndexInFileMessages = + 14; + + friend void swap(SaveableObject& a, SaveableObject& b) { + a.Swap(&b); + } + inline void Swap(SaveableObject* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(SaveableObject* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + SaveableObject* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const SaveableObject& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const SaveableObject& from) { + SaveableObject::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(SaveableObject* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.SaveableObject"; + } + protected: + explicit SaveableObject(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kSaveFunctionFieldNumber = 2, + kRestoreFunctionFieldNumber = 3, + }; + // int32 save_function = 2; + void clear_save_function(); + int32_t save_function() const; + void set_save_function(int32_t value); + private: + int32_t _internal_save_function() const; + void _internal_set_save_function(int32_t value); + public: + + // int32 restore_function = 3; + void clear_restore_function(); + int32_t restore_function() const; + void set_restore_function(int32_t value); + private: + int32_t _internal_restore_function() const; + void _internal_set_restore_function(int32_t value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.SaveableObject) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + int32_t save_function_; + int32_t restore_function_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto; +}; +// =================================================================== + + +// =================================================================== + +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// ------------------------------------------------------------------- + +// SavedObjectGraph + +// repeated .tensorflow.SavedObject nodes = 1; +inline int SavedObjectGraph::_internal_nodes_size() const { + return _impl_.nodes_.size(); +} +inline int SavedObjectGraph::nodes_size() const { + return _internal_nodes_size(); +} +inline void SavedObjectGraph::clear_nodes() { + _impl_.nodes_.Clear(); +} +inline ::tensorflow::SavedObject* SavedObjectGraph::mutable_nodes(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.SavedObjectGraph.nodes) + return _impl_.nodes_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::SavedObject >* +SavedObjectGraph::mutable_nodes() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.SavedObjectGraph.nodes) + return &_impl_.nodes_; +} +inline const ::tensorflow::SavedObject& SavedObjectGraph::_internal_nodes(int index) const { + return _impl_.nodes_.Get(index); +} +inline const ::tensorflow::SavedObject& SavedObjectGraph::nodes(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.SavedObjectGraph.nodes) + return _internal_nodes(index); +} +inline ::tensorflow::SavedObject* SavedObjectGraph::_internal_add_nodes() { + return _impl_.nodes_.Add(); +} +inline ::tensorflow::SavedObject* SavedObjectGraph::add_nodes() { + ::tensorflow::SavedObject* _add = _internal_add_nodes(); + // @@protoc_insertion_point(field_add:tensorflow.SavedObjectGraph.nodes) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::SavedObject >& +SavedObjectGraph::nodes() const { + // @@protoc_insertion_point(field_list:tensorflow.SavedObjectGraph.nodes) + return _impl_.nodes_; +} + +// map concrete_functions = 2; +inline int SavedObjectGraph::_internal_concrete_functions_size() const { + return _impl_.concrete_functions_.size(); +} +inline int SavedObjectGraph::concrete_functions_size() const { + return _internal_concrete_functions_size(); +} +inline void SavedObjectGraph::clear_concrete_functions() { + _impl_.concrete_functions_.Clear(); +} +inline const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::SavedConcreteFunction >& +SavedObjectGraph::_internal_concrete_functions() const { + return _impl_.concrete_functions_.GetMap(); +} +inline const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::SavedConcreteFunction >& +SavedObjectGraph::concrete_functions() const { + // @@protoc_insertion_point(field_map:tensorflow.SavedObjectGraph.concrete_functions) + return _internal_concrete_functions(); +} +inline ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::SavedConcreteFunction >* +SavedObjectGraph::_internal_mutable_concrete_functions() { + return _impl_.concrete_functions_.MutableMap(); +} +inline ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::SavedConcreteFunction >* +SavedObjectGraph::mutable_concrete_functions() { + // @@protoc_insertion_point(field_mutable_map:tensorflow.SavedObjectGraph.concrete_functions) + return _internal_mutable_concrete_functions(); +} + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// SavedObject + +// repeated .tensorflow.TrackableObjectGraph.TrackableObject.ObjectReference children = 1; +inline int SavedObject::_internal_children_size() const { + return _impl_.children_.size(); +} +inline int SavedObject::children_size() const { + return _internal_children_size(); +} +inline ::tensorflow::TrackableObjectGraph_TrackableObject_ObjectReference* SavedObject::mutable_children(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.SavedObject.children) + return _impl_.children_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::TrackableObjectGraph_TrackableObject_ObjectReference >* +SavedObject::mutable_children() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.SavedObject.children) + return &_impl_.children_; +} +inline const ::tensorflow::TrackableObjectGraph_TrackableObject_ObjectReference& SavedObject::_internal_children(int index) const { + return _impl_.children_.Get(index); +} +inline const ::tensorflow::TrackableObjectGraph_TrackableObject_ObjectReference& SavedObject::children(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.SavedObject.children) + return _internal_children(index); +} +inline ::tensorflow::TrackableObjectGraph_TrackableObject_ObjectReference* SavedObject::_internal_add_children() { + return _impl_.children_.Add(); +} +inline ::tensorflow::TrackableObjectGraph_TrackableObject_ObjectReference* SavedObject::add_children() { + ::tensorflow::TrackableObjectGraph_TrackableObject_ObjectReference* _add = _internal_add_children(); + // @@protoc_insertion_point(field_add:tensorflow.SavedObject.children) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::TrackableObjectGraph_TrackableObject_ObjectReference >& +SavedObject::children() const { + // @@protoc_insertion_point(field_list:tensorflow.SavedObject.children) + return _impl_.children_; +} + +// repeated .tensorflow.TrackableObjectGraph.TrackableObject.ObjectReference dependencies = 15; +inline int SavedObject::_internal_dependencies_size() const { + return _impl_.dependencies_.size(); +} +inline int SavedObject::dependencies_size() const { + return _internal_dependencies_size(); +} +inline ::tensorflow::TrackableObjectGraph_TrackableObject_ObjectReference* SavedObject::mutable_dependencies(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.SavedObject.dependencies) + return _impl_.dependencies_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::TrackableObjectGraph_TrackableObject_ObjectReference >* +SavedObject::mutable_dependencies() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.SavedObject.dependencies) + return &_impl_.dependencies_; +} +inline const ::tensorflow::TrackableObjectGraph_TrackableObject_ObjectReference& SavedObject::_internal_dependencies(int index) const { + return _impl_.dependencies_.Get(index); +} +inline const ::tensorflow::TrackableObjectGraph_TrackableObject_ObjectReference& SavedObject::dependencies(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.SavedObject.dependencies) + return _internal_dependencies(index); +} +inline ::tensorflow::TrackableObjectGraph_TrackableObject_ObjectReference* SavedObject::_internal_add_dependencies() { + return _impl_.dependencies_.Add(); +} +inline ::tensorflow::TrackableObjectGraph_TrackableObject_ObjectReference* SavedObject::add_dependencies() { + ::tensorflow::TrackableObjectGraph_TrackableObject_ObjectReference* _add = _internal_add_dependencies(); + // @@protoc_insertion_point(field_add:tensorflow.SavedObject.dependencies) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::TrackableObjectGraph_TrackableObject_ObjectReference >& +SavedObject::dependencies() const { + // @@protoc_insertion_point(field_list:tensorflow.SavedObject.dependencies) + return _impl_.dependencies_; +} + +// repeated .tensorflow.TrackableObjectGraph.TrackableObject.SlotVariableReference slot_variables = 3; +inline int SavedObject::_internal_slot_variables_size() const { + return _impl_.slot_variables_.size(); +} +inline int SavedObject::slot_variables_size() const { + return _internal_slot_variables_size(); +} +inline ::tensorflow::TrackableObjectGraph_TrackableObject_SlotVariableReference* SavedObject::mutable_slot_variables(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.SavedObject.slot_variables) + return _impl_.slot_variables_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::TrackableObjectGraph_TrackableObject_SlotVariableReference >* +SavedObject::mutable_slot_variables() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.SavedObject.slot_variables) + return &_impl_.slot_variables_; +} +inline const ::tensorflow::TrackableObjectGraph_TrackableObject_SlotVariableReference& SavedObject::_internal_slot_variables(int index) const { + return _impl_.slot_variables_.Get(index); +} +inline const ::tensorflow::TrackableObjectGraph_TrackableObject_SlotVariableReference& SavedObject::slot_variables(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.SavedObject.slot_variables) + return _internal_slot_variables(index); +} +inline ::tensorflow::TrackableObjectGraph_TrackableObject_SlotVariableReference* SavedObject::_internal_add_slot_variables() { + return _impl_.slot_variables_.Add(); +} +inline ::tensorflow::TrackableObjectGraph_TrackableObject_SlotVariableReference* SavedObject::add_slot_variables() { + ::tensorflow::TrackableObjectGraph_TrackableObject_SlotVariableReference* _add = _internal_add_slot_variables(); + // @@protoc_insertion_point(field_add:tensorflow.SavedObject.slot_variables) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::TrackableObjectGraph_TrackableObject_SlotVariableReference >& +SavedObject::slot_variables() const { + // @@protoc_insertion_point(field_list:tensorflow.SavedObject.slot_variables) + return _impl_.slot_variables_; +} + +// .tensorflow.SavedUserObject user_object = 4; +inline bool SavedObject::_internal_has_user_object() const { + return kind_case() == kUserObject; +} +inline bool SavedObject::has_user_object() const { + return _internal_has_user_object(); +} +inline void SavedObject::set_has_user_object() { + _impl_._oneof_case_[0] = kUserObject; +} +inline void SavedObject::clear_user_object() { + if (_internal_has_user_object()) { + if (GetArenaForAllocation() == nullptr) { + delete _impl_.kind_.user_object_; + } + clear_has_kind(); + } +} +inline ::tensorflow::SavedUserObject* SavedObject::release_user_object() { + // @@protoc_insertion_point(field_release:tensorflow.SavedObject.user_object) + if (_internal_has_user_object()) { + clear_has_kind(); + ::tensorflow::SavedUserObject* temp = _impl_.kind_.user_object_; + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + _impl_.kind_.user_object_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::tensorflow::SavedUserObject& SavedObject::_internal_user_object() const { + return _internal_has_user_object() + ? *_impl_.kind_.user_object_ + : reinterpret_cast< ::tensorflow::SavedUserObject&>(::tensorflow::_SavedUserObject_default_instance_); +} +inline const ::tensorflow::SavedUserObject& SavedObject::user_object() const { + // @@protoc_insertion_point(field_get:tensorflow.SavedObject.user_object) + return _internal_user_object(); +} +inline ::tensorflow::SavedUserObject* SavedObject::unsafe_arena_release_user_object() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.SavedObject.user_object) + if (_internal_has_user_object()) { + clear_has_kind(); + ::tensorflow::SavedUserObject* temp = _impl_.kind_.user_object_; + _impl_.kind_.user_object_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void SavedObject::unsafe_arena_set_allocated_user_object(::tensorflow::SavedUserObject* user_object) { + clear_kind(); + if (user_object) { + set_has_user_object(); + _impl_.kind_.user_object_ = user_object; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.SavedObject.user_object) +} +inline ::tensorflow::SavedUserObject* SavedObject::_internal_mutable_user_object() { + if (!_internal_has_user_object()) { + clear_kind(); + set_has_user_object(); + _impl_.kind_.user_object_ = CreateMaybeMessage< ::tensorflow::SavedUserObject >(GetArenaForAllocation()); + } + return _impl_.kind_.user_object_; +} +inline ::tensorflow::SavedUserObject* SavedObject::mutable_user_object() { + ::tensorflow::SavedUserObject* _msg = _internal_mutable_user_object(); + // @@protoc_insertion_point(field_mutable:tensorflow.SavedObject.user_object) + return _msg; +} + +// .tensorflow.SavedAsset asset = 5; +inline bool SavedObject::_internal_has_asset() const { + return kind_case() == kAsset; +} +inline bool SavedObject::has_asset() const { + return _internal_has_asset(); +} +inline void SavedObject::set_has_asset() { + _impl_._oneof_case_[0] = kAsset; +} +inline void SavedObject::clear_asset() { + if (_internal_has_asset()) { + if (GetArenaForAllocation() == nullptr) { + delete _impl_.kind_.asset_; + } + clear_has_kind(); + } +} +inline ::tensorflow::SavedAsset* SavedObject::release_asset() { + // @@protoc_insertion_point(field_release:tensorflow.SavedObject.asset) + if (_internal_has_asset()) { + clear_has_kind(); + ::tensorflow::SavedAsset* temp = _impl_.kind_.asset_; + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + _impl_.kind_.asset_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::tensorflow::SavedAsset& SavedObject::_internal_asset() const { + return _internal_has_asset() + ? *_impl_.kind_.asset_ + : reinterpret_cast< ::tensorflow::SavedAsset&>(::tensorflow::_SavedAsset_default_instance_); +} +inline const ::tensorflow::SavedAsset& SavedObject::asset() const { + // @@protoc_insertion_point(field_get:tensorflow.SavedObject.asset) + return _internal_asset(); +} +inline ::tensorflow::SavedAsset* SavedObject::unsafe_arena_release_asset() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.SavedObject.asset) + if (_internal_has_asset()) { + clear_has_kind(); + ::tensorflow::SavedAsset* temp = _impl_.kind_.asset_; + _impl_.kind_.asset_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void SavedObject::unsafe_arena_set_allocated_asset(::tensorflow::SavedAsset* asset) { + clear_kind(); + if (asset) { + set_has_asset(); + _impl_.kind_.asset_ = asset; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.SavedObject.asset) +} +inline ::tensorflow::SavedAsset* SavedObject::_internal_mutable_asset() { + if (!_internal_has_asset()) { + clear_kind(); + set_has_asset(); + _impl_.kind_.asset_ = CreateMaybeMessage< ::tensorflow::SavedAsset >(GetArenaForAllocation()); + } + return _impl_.kind_.asset_; +} +inline ::tensorflow::SavedAsset* SavedObject::mutable_asset() { + ::tensorflow::SavedAsset* _msg = _internal_mutable_asset(); + // @@protoc_insertion_point(field_mutable:tensorflow.SavedObject.asset) + return _msg; +} + +// .tensorflow.SavedFunction function = 6; +inline bool SavedObject::_internal_has_function() const { + return kind_case() == kFunction; +} +inline bool SavedObject::has_function() const { + return _internal_has_function(); +} +inline void SavedObject::set_has_function() { + _impl_._oneof_case_[0] = kFunction; +} +inline void SavedObject::clear_function() { + if (_internal_has_function()) { + if (GetArenaForAllocation() == nullptr) { + delete _impl_.kind_.function_; + } + clear_has_kind(); + } +} +inline ::tensorflow::SavedFunction* SavedObject::release_function() { + // @@protoc_insertion_point(field_release:tensorflow.SavedObject.function) + if (_internal_has_function()) { + clear_has_kind(); + ::tensorflow::SavedFunction* temp = _impl_.kind_.function_; + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + _impl_.kind_.function_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::tensorflow::SavedFunction& SavedObject::_internal_function() const { + return _internal_has_function() + ? *_impl_.kind_.function_ + : reinterpret_cast< ::tensorflow::SavedFunction&>(::tensorflow::_SavedFunction_default_instance_); +} +inline const ::tensorflow::SavedFunction& SavedObject::function() const { + // @@protoc_insertion_point(field_get:tensorflow.SavedObject.function) + return _internal_function(); +} +inline ::tensorflow::SavedFunction* SavedObject::unsafe_arena_release_function() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.SavedObject.function) + if (_internal_has_function()) { + clear_has_kind(); + ::tensorflow::SavedFunction* temp = _impl_.kind_.function_; + _impl_.kind_.function_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void SavedObject::unsafe_arena_set_allocated_function(::tensorflow::SavedFunction* function) { + clear_kind(); + if (function) { + set_has_function(); + _impl_.kind_.function_ = function; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.SavedObject.function) +} +inline ::tensorflow::SavedFunction* SavedObject::_internal_mutable_function() { + if (!_internal_has_function()) { + clear_kind(); + set_has_function(); + _impl_.kind_.function_ = CreateMaybeMessage< ::tensorflow::SavedFunction >(GetArenaForAllocation()); + } + return _impl_.kind_.function_; +} +inline ::tensorflow::SavedFunction* SavedObject::mutable_function() { + ::tensorflow::SavedFunction* _msg = _internal_mutable_function(); + // @@protoc_insertion_point(field_mutable:tensorflow.SavedObject.function) + return _msg; +} + +// .tensorflow.SavedVariable variable = 7; +inline bool SavedObject::_internal_has_variable() const { + return kind_case() == kVariable; +} +inline bool SavedObject::has_variable() const { + return _internal_has_variable(); +} +inline void SavedObject::set_has_variable() { + _impl_._oneof_case_[0] = kVariable; +} +inline void SavedObject::clear_variable() { + if (_internal_has_variable()) { + if (GetArenaForAllocation() == nullptr) { + delete _impl_.kind_.variable_; + } + clear_has_kind(); + } +} +inline ::tensorflow::SavedVariable* SavedObject::release_variable() { + // @@protoc_insertion_point(field_release:tensorflow.SavedObject.variable) + if (_internal_has_variable()) { + clear_has_kind(); + ::tensorflow::SavedVariable* temp = _impl_.kind_.variable_; + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + _impl_.kind_.variable_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::tensorflow::SavedVariable& SavedObject::_internal_variable() const { + return _internal_has_variable() + ? *_impl_.kind_.variable_ + : reinterpret_cast< ::tensorflow::SavedVariable&>(::tensorflow::_SavedVariable_default_instance_); +} +inline const ::tensorflow::SavedVariable& SavedObject::variable() const { + // @@protoc_insertion_point(field_get:tensorflow.SavedObject.variable) + return _internal_variable(); +} +inline ::tensorflow::SavedVariable* SavedObject::unsafe_arena_release_variable() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.SavedObject.variable) + if (_internal_has_variable()) { + clear_has_kind(); + ::tensorflow::SavedVariable* temp = _impl_.kind_.variable_; + _impl_.kind_.variable_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void SavedObject::unsafe_arena_set_allocated_variable(::tensorflow::SavedVariable* variable) { + clear_kind(); + if (variable) { + set_has_variable(); + _impl_.kind_.variable_ = variable; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.SavedObject.variable) +} +inline ::tensorflow::SavedVariable* SavedObject::_internal_mutable_variable() { + if (!_internal_has_variable()) { + clear_kind(); + set_has_variable(); + _impl_.kind_.variable_ = CreateMaybeMessage< ::tensorflow::SavedVariable >(GetArenaForAllocation()); + } + return _impl_.kind_.variable_; +} +inline ::tensorflow::SavedVariable* SavedObject::mutable_variable() { + ::tensorflow::SavedVariable* _msg = _internal_mutable_variable(); + // @@protoc_insertion_point(field_mutable:tensorflow.SavedObject.variable) + return _msg; +} + +// .tensorflow.SavedBareConcreteFunction bare_concrete_function = 8; +inline bool SavedObject::_internal_has_bare_concrete_function() const { + return kind_case() == kBareConcreteFunction; +} +inline bool SavedObject::has_bare_concrete_function() const { + return _internal_has_bare_concrete_function(); +} +inline void SavedObject::set_has_bare_concrete_function() { + _impl_._oneof_case_[0] = kBareConcreteFunction; +} +inline void SavedObject::clear_bare_concrete_function() { + if (_internal_has_bare_concrete_function()) { + if (GetArenaForAllocation() == nullptr) { + delete _impl_.kind_.bare_concrete_function_; + } + clear_has_kind(); + } +} +inline ::tensorflow::SavedBareConcreteFunction* SavedObject::release_bare_concrete_function() { + // @@protoc_insertion_point(field_release:tensorflow.SavedObject.bare_concrete_function) + if (_internal_has_bare_concrete_function()) { + clear_has_kind(); + ::tensorflow::SavedBareConcreteFunction* temp = _impl_.kind_.bare_concrete_function_; + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + _impl_.kind_.bare_concrete_function_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::tensorflow::SavedBareConcreteFunction& SavedObject::_internal_bare_concrete_function() const { + return _internal_has_bare_concrete_function() + ? *_impl_.kind_.bare_concrete_function_ + : reinterpret_cast< ::tensorflow::SavedBareConcreteFunction&>(::tensorflow::_SavedBareConcreteFunction_default_instance_); +} +inline const ::tensorflow::SavedBareConcreteFunction& SavedObject::bare_concrete_function() const { + // @@protoc_insertion_point(field_get:tensorflow.SavedObject.bare_concrete_function) + return _internal_bare_concrete_function(); +} +inline ::tensorflow::SavedBareConcreteFunction* SavedObject::unsafe_arena_release_bare_concrete_function() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.SavedObject.bare_concrete_function) + if (_internal_has_bare_concrete_function()) { + clear_has_kind(); + ::tensorflow::SavedBareConcreteFunction* temp = _impl_.kind_.bare_concrete_function_; + _impl_.kind_.bare_concrete_function_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void SavedObject::unsafe_arena_set_allocated_bare_concrete_function(::tensorflow::SavedBareConcreteFunction* bare_concrete_function) { + clear_kind(); + if (bare_concrete_function) { + set_has_bare_concrete_function(); + _impl_.kind_.bare_concrete_function_ = bare_concrete_function; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.SavedObject.bare_concrete_function) +} +inline ::tensorflow::SavedBareConcreteFunction* SavedObject::_internal_mutable_bare_concrete_function() { + if (!_internal_has_bare_concrete_function()) { + clear_kind(); + set_has_bare_concrete_function(); + _impl_.kind_.bare_concrete_function_ = CreateMaybeMessage< ::tensorflow::SavedBareConcreteFunction >(GetArenaForAllocation()); + } + return _impl_.kind_.bare_concrete_function_; +} +inline ::tensorflow::SavedBareConcreteFunction* SavedObject::mutable_bare_concrete_function() { + ::tensorflow::SavedBareConcreteFunction* _msg = _internal_mutable_bare_concrete_function(); + // @@protoc_insertion_point(field_mutable:tensorflow.SavedObject.bare_concrete_function) + return _msg; +} + +// .tensorflow.SavedConstant constant = 9; +inline bool SavedObject::_internal_has_constant() const { + return kind_case() == kConstant; +} +inline bool SavedObject::has_constant() const { + return _internal_has_constant(); +} +inline void SavedObject::set_has_constant() { + _impl_._oneof_case_[0] = kConstant; +} +inline void SavedObject::clear_constant() { + if (_internal_has_constant()) { + if (GetArenaForAllocation() == nullptr) { + delete _impl_.kind_.constant_; + } + clear_has_kind(); + } +} +inline ::tensorflow::SavedConstant* SavedObject::release_constant() { + // @@protoc_insertion_point(field_release:tensorflow.SavedObject.constant) + if (_internal_has_constant()) { + clear_has_kind(); + ::tensorflow::SavedConstant* temp = _impl_.kind_.constant_; + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + _impl_.kind_.constant_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::tensorflow::SavedConstant& SavedObject::_internal_constant() const { + return _internal_has_constant() + ? *_impl_.kind_.constant_ + : reinterpret_cast< ::tensorflow::SavedConstant&>(::tensorflow::_SavedConstant_default_instance_); +} +inline const ::tensorflow::SavedConstant& SavedObject::constant() const { + // @@protoc_insertion_point(field_get:tensorflow.SavedObject.constant) + return _internal_constant(); +} +inline ::tensorflow::SavedConstant* SavedObject::unsafe_arena_release_constant() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.SavedObject.constant) + if (_internal_has_constant()) { + clear_has_kind(); + ::tensorflow::SavedConstant* temp = _impl_.kind_.constant_; + _impl_.kind_.constant_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void SavedObject::unsafe_arena_set_allocated_constant(::tensorflow::SavedConstant* constant) { + clear_kind(); + if (constant) { + set_has_constant(); + _impl_.kind_.constant_ = constant; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.SavedObject.constant) +} +inline ::tensorflow::SavedConstant* SavedObject::_internal_mutable_constant() { + if (!_internal_has_constant()) { + clear_kind(); + set_has_constant(); + _impl_.kind_.constant_ = CreateMaybeMessage< ::tensorflow::SavedConstant >(GetArenaForAllocation()); + } + return _impl_.kind_.constant_; +} +inline ::tensorflow::SavedConstant* SavedObject::mutable_constant() { + ::tensorflow::SavedConstant* _msg = _internal_mutable_constant(); + // @@protoc_insertion_point(field_mutable:tensorflow.SavedObject.constant) + return _msg; +} + +// .tensorflow.SavedResource resource = 10; +inline bool SavedObject::_internal_has_resource() const { + return kind_case() == kResource; +} +inline bool SavedObject::has_resource() const { + return _internal_has_resource(); +} +inline void SavedObject::set_has_resource() { + _impl_._oneof_case_[0] = kResource; +} +inline void SavedObject::clear_resource() { + if (_internal_has_resource()) { + if (GetArenaForAllocation() == nullptr) { + delete _impl_.kind_.resource_; + } + clear_has_kind(); + } +} +inline ::tensorflow::SavedResource* SavedObject::release_resource() { + // @@protoc_insertion_point(field_release:tensorflow.SavedObject.resource) + if (_internal_has_resource()) { + clear_has_kind(); + ::tensorflow::SavedResource* temp = _impl_.kind_.resource_; + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + _impl_.kind_.resource_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::tensorflow::SavedResource& SavedObject::_internal_resource() const { + return _internal_has_resource() + ? *_impl_.kind_.resource_ + : reinterpret_cast< ::tensorflow::SavedResource&>(::tensorflow::_SavedResource_default_instance_); +} +inline const ::tensorflow::SavedResource& SavedObject::resource() const { + // @@protoc_insertion_point(field_get:tensorflow.SavedObject.resource) + return _internal_resource(); +} +inline ::tensorflow::SavedResource* SavedObject::unsafe_arena_release_resource() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.SavedObject.resource) + if (_internal_has_resource()) { + clear_has_kind(); + ::tensorflow::SavedResource* temp = _impl_.kind_.resource_; + _impl_.kind_.resource_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void SavedObject::unsafe_arena_set_allocated_resource(::tensorflow::SavedResource* resource) { + clear_kind(); + if (resource) { + set_has_resource(); + _impl_.kind_.resource_ = resource; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.SavedObject.resource) +} +inline ::tensorflow::SavedResource* SavedObject::_internal_mutable_resource() { + if (!_internal_has_resource()) { + clear_kind(); + set_has_resource(); + _impl_.kind_.resource_ = CreateMaybeMessage< ::tensorflow::SavedResource >(GetArenaForAllocation()); + } + return _impl_.kind_.resource_; +} +inline ::tensorflow::SavedResource* SavedObject::mutable_resource() { + ::tensorflow::SavedResource* _msg = _internal_mutable_resource(); + // @@protoc_insertion_point(field_mutable:tensorflow.SavedObject.resource) + return _msg; +} + +// .tensorflow.CapturedTensor captured_tensor = 12; +inline bool SavedObject::_internal_has_captured_tensor() const { + return kind_case() == kCapturedTensor; +} +inline bool SavedObject::has_captured_tensor() const { + return _internal_has_captured_tensor(); +} +inline void SavedObject::set_has_captured_tensor() { + _impl_._oneof_case_[0] = kCapturedTensor; +} +inline void SavedObject::clear_captured_tensor() { + if (_internal_has_captured_tensor()) { + if (GetArenaForAllocation() == nullptr) { + delete _impl_.kind_.captured_tensor_; + } + clear_has_kind(); + } +} +inline ::tensorflow::CapturedTensor* SavedObject::release_captured_tensor() { + // @@protoc_insertion_point(field_release:tensorflow.SavedObject.captured_tensor) + if (_internal_has_captured_tensor()) { + clear_has_kind(); + ::tensorflow::CapturedTensor* temp = _impl_.kind_.captured_tensor_; + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + _impl_.kind_.captured_tensor_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::tensorflow::CapturedTensor& SavedObject::_internal_captured_tensor() const { + return _internal_has_captured_tensor() + ? *_impl_.kind_.captured_tensor_ + : reinterpret_cast< ::tensorflow::CapturedTensor&>(::tensorflow::_CapturedTensor_default_instance_); +} +inline const ::tensorflow::CapturedTensor& SavedObject::captured_tensor() const { + // @@protoc_insertion_point(field_get:tensorflow.SavedObject.captured_tensor) + return _internal_captured_tensor(); +} +inline ::tensorflow::CapturedTensor* SavedObject::unsafe_arena_release_captured_tensor() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.SavedObject.captured_tensor) + if (_internal_has_captured_tensor()) { + clear_has_kind(); + ::tensorflow::CapturedTensor* temp = _impl_.kind_.captured_tensor_; + _impl_.kind_.captured_tensor_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void SavedObject::unsafe_arena_set_allocated_captured_tensor(::tensorflow::CapturedTensor* captured_tensor) { + clear_kind(); + if (captured_tensor) { + set_has_captured_tensor(); + _impl_.kind_.captured_tensor_ = captured_tensor; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.SavedObject.captured_tensor) +} +inline ::tensorflow::CapturedTensor* SavedObject::_internal_mutable_captured_tensor() { + if (!_internal_has_captured_tensor()) { + clear_kind(); + set_has_captured_tensor(); + _impl_.kind_.captured_tensor_ = CreateMaybeMessage< ::tensorflow::CapturedTensor >(GetArenaForAllocation()); + } + return _impl_.kind_.captured_tensor_; +} +inline ::tensorflow::CapturedTensor* SavedObject::mutable_captured_tensor() { + ::tensorflow::CapturedTensor* _msg = _internal_mutable_captured_tensor(); + // @@protoc_insertion_point(field_mutable:tensorflow.SavedObject.captured_tensor) + return _msg; +} + +// map saveable_objects = 11; +inline int SavedObject::_internal_saveable_objects_size() const { + return _impl_.saveable_objects_.size(); +} +inline int SavedObject::saveable_objects_size() const { + return _internal_saveable_objects_size(); +} +inline void SavedObject::clear_saveable_objects() { + _impl_.saveable_objects_.Clear(); +} +inline const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::SaveableObject >& +SavedObject::_internal_saveable_objects() const { + return _impl_.saveable_objects_.GetMap(); +} +inline const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::SaveableObject >& +SavedObject::saveable_objects() const { + // @@protoc_insertion_point(field_map:tensorflow.SavedObject.saveable_objects) + return _internal_saveable_objects(); +} +inline ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::SaveableObject >* +SavedObject::_internal_mutable_saveable_objects() { + return _impl_.saveable_objects_.MutableMap(); +} +inline ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::SaveableObject >* +SavedObject::mutable_saveable_objects() { + // @@protoc_insertion_point(field_mutable_map:tensorflow.SavedObject.saveable_objects) + return _internal_mutable_saveable_objects(); +} + +// string registered_name = 13; +inline void SavedObject::clear_registered_name() { + _impl_.registered_name_.ClearToEmpty(); +} +inline const std::string& SavedObject::registered_name() const { + // @@protoc_insertion_point(field_get:tensorflow.SavedObject.registered_name) + return _internal_registered_name(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void SavedObject::set_registered_name(ArgT0&& arg0, ArgT... args) { + + _impl_.registered_name_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.SavedObject.registered_name) +} +inline std::string* SavedObject::mutable_registered_name() { + std::string* _s = _internal_mutable_registered_name(); + // @@protoc_insertion_point(field_mutable:tensorflow.SavedObject.registered_name) + return _s; +} +inline const std::string& SavedObject::_internal_registered_name() const { + return _impl_.registered_name_.Get(); +} +inline void SavedObject::_internal_set_registered_name(const std::string& value) { + + _impl_.registered_name_.Set(value, GetArenaForAllocation()); +} +inline std::string* SavedObject::_internal_mutable_registered_name() { + + return _impl_.registered_name_.Mutable(GetArenaForAllocation()); +} +inline std::string* SavedObject::release_registered_name() { + // @@protoc_insertion_point(field_release:tensorflow.SavedObject.registered_name) + return _impl_.registered_name_.Release(); +} +inline void SavedObject::set_allocated_registered_name(std::string* registered_name) { + if (registered_name != nullptr) { + + } else { + + } + _impl_.registered_name_.SetAllocated(registered_name, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.registered_name_.IsDefault()) { + _impl_.registered_name_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.SavedObject.registered_name) +} + +// .google.protobuf.Any serialized_user_proto = 14; +inline bool SavedObject::_internal_has_serialized_user_proto() const { + return this != internal_default_instance() && _impl_.serialized_user_proto_ != nullptr; +} +inline bool SavedObject::has_serialized_user_proto() const { + return _internal_has_serialized_user_proto(); +} +inline const ::PROTOBUF_NAMESPACE_ID::Any& SavedObject::_internal_serialized_user_proto() const { + const ::PROTOBUF_NAMESPACE_ID::Any* p = _impl_.serialized_user_proto_; + return p != nullptr ? *p : reinterpret_cast( + ::PROTOBUF_NAMESPACE_ID::_Any_default_instance_); +} +inline const ::PROTOBUF_NAMESPACE_ID::Any& SavedObject::serialized_user_proto() const { + // @@protoc_insertion_point(field_get:tensorflow.SavedObject.serialized_user_proto) + return _internal_serialized_user_proto(); +} +inline void SavedObject::unsafe_arena_set_allocated_serialized_user_proto( + ::PROTOBUF_NAMESPACE_ID::Any* serialized_user_proto) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.serialized_user_proto_); + } + _impl_.serialized_user_proto_ = serialized_user_proto; + if (serialized_user_proto) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.SavedObject.serialized_user_proto) +} +inline ::PROTOBUF_NAMESPACE_ID::Any* SavedObject::release_serialized_user_proto() { + + ::PROTOBUF_NAMESPACE_ID::Any* temp = _impl_.serialized_user_proto_; + _impl_.serialized_user_proto_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::PROTOBUF_NAMESPACE_ID::Any* SavedObject::unsafe_arena_release_serialized_user_proto() { + // @@protoc_insertion_point(field_release:tensorflow.SavedObject.serialized_user_proto) + + ::PROTOBUF_NAMESPACE_ID::Any* temp = _impl_.serialized_user_proto_; + _impl_.serialized_user_proto_ = nullptr; + return temp; +} +inline ::PROTOBUF_NAMESPACE_ID::Any* SavedObject::_internal_mutable_serialized_user_proto() { + + if (_impl_.serialized_user_proto_ == nullptr) { + auto* p = CreateMaybeMessage<::PROTOBUF_NAMESPACE_ID::Any>(GetArenaForAllocation()); + _impl_.serialized_user_proto_ = p; + } + return _impl_.serialized_user_proto_; +} +inline ::PROTOBUF_NAMESPACE_ID::Any* SavedObject::mutable_serialized_user_proto() { + ::PROTOBUF_NAMESPACE_ID::Any* _msg = _internal_mutable_serialized_user_proto(); + // @@protoc_insertion_point(field_mutable:tensorflow.SavedObject.serialized_user_proto) + return _msg; +} +inline void SavedObject::set_allocated_serialized_user_proto(::PROTOBUF_NAMESPACE_ID::Any* serialized_user_proto) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.serialized_user_proto_); + } + if (serialized_user_proto) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( + reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(serialized_user_proto)); + if (message_arena != submessage_arena) { + serialized_user_proto = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, serialized_user_proto, submessage_arena); + } + + } else { + + } + _impl_.serialized_user_proto_ = serialized_user_proto; + // @@protoc_insertion_point(field_set_allocated:tensorflow.SavedObject.serialized_user_proto) +} + +// string registered_saver = 16; +inline void SavedObject::clear_registered_saver() { + _impl_.registered_saver_.ClearToEmpty(); +} +inline const std::string& SavedObject::registered_saver() const { + // @@protoc_insertion_point(field_get:tensorflow.SavedObject.registered_saver) + return _internal_registered_saver(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void SavedObject::set_registered_saver(ArgT0&& arg0, ArgT... args) { + + _impl_.registered_saver_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.SavedObject.registered_saver) +} +inline std::string* SavedObject::mutable_registered_saver() { + std::string* _s = _internal_mutable_registered_saver(); + // @@protoc_insertion_point(field_mutable:tensorflow.SavedObject.registered_saver) + return _s; +} +inline const std::string& SavedObject::_internal_registered_saver() const { + return _impl_.registered_saver_.Get(); +} +inline void SavedObject::_internal_set_registered_saver(const std::string& value) { + + _impl_.registered_saver_.Set(value, GetArenaForAllocation()); +} +inline std::string* SavedObject::_internal_mutable_registered_saver() { + + return _impl_.registered_saver_.Mutable(GetArenaForAllocation()); +} +inline std::string* SavedObject::release_registered_saver() { + // @@protoc_insertion_point(field_release:tensorflow.SavedObject.registered_saver) + return _impl_.registered_saver_.Release(); +} +inline void SavedObject::set_allocated_registered_saver(std::string* registered_saver) { + if (registered_saver != nullptr) { + + } else { + + } + _impl_.registered_saver_.SetAllocated(registered_saver, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.registered_saver_.IsDefault()) { + _impl_.registered_saver_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.SavedObject.registered_saver) +} + +inline bool SavedObject::has_kind() const { + return kind_case() != KIND_NOT_SET; +} +inline void SavedObject::clear_has_kind() { + _impl_._oneof_case_[0] = KIND_NOT_SET; +} +inline SavedObject::KindCase SavedObject::kind_case() const { + return SavedObject::KindCase(_impl_._oneof_case_[0]); +} +// ------------------------------------------------------------------- + +// SavedUserObject + +// string identifier = 1; +inline void SavedUserObject::clear_identifier() { + _impl_.identifier_.ClearToEmpty(); +} +inline const std::string& SavedUserObject::identifier() const { + // @@protoc_insertion_point(field_get:tensorflow.SavedUserObject.identifier) + return _internal_identifier(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void SavedUserObject::set_identifier(ArgT0&& arg0, ArgT... args) { + + _impl_.identifier_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.SavedUserObject.identifier) +} +inline std::string* SavedUserObject::mutable_identifier() { + std::string* _s = _internal_mutable_identifier(); + // @@protoc_insertion_point(field_mutable:tensorflow.SavedUserObject.identifier) + return _s; +} +inline const std::string& SavedUserObject::_internal_identifier() const { + return _impl_.identifier_.Get(); +} +inline void SavedUserObject::_internal_set_identifier(const std::string& value) { + + _impl_.identifier_.Set(value, GetArenaForAllocation()); +} +inline std::string* SavedUserObject::_internal_mutable_identifier() { + + return _impl_.identifier_.Mutable(GetArenaForAllocation()); +} +inline std::string* SavedUserObject::release_identifier() { + // @@protoc_insertion_point(field_release:tensorflow.SavedUserObject.identifier) + return _impl_.identifier_.Release(); +} +inline void SavedUserObject::set_allocated_identifier(std::string* identifier) { + if (identifier != nullptr) { + + } else { + + } + _impl_.identifier_.SetAllocated(identifier, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.identifier_.IsDefault()) { + _impl_.identifier_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.SavedUserObject.identifier) +} + +// .tensorflow.VersionDef version = 2; +inline bool SavedUserObject::_internal_has_version() const { + return this != internal_default_instance() && _impl_.version_ != nullptr; +} +inline bool SavedUserObject::has_version() const { + return _internal_has_version(); +} +inline const ::tensorflow::VersionDef& SavedUserObject::_internal_version() const { + const ::tensorflow::VersionDef* p = _impl_.version_; + return p != nullptr ? *p : reinterpret_cast( + ::tensorflow::_VersionDef_default_instance_); +} +inline const ::tensorflow::VersionDef& SavedUserObject::version() const { + // @@protoc_insertion_point(field_get:tensorflow.SavedUserObject.version) + return _internal_version(); +} +inline void SavedUserObject::unsafe_arena_set_allocated_version( + ::tensorflow::VersionDef* version) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.version_); + } + _impl_.version_ = version; + if (version) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.SavedUserObject.version) +} +inline ::tensorflow::VersionDef* SavedUserObject::release_version() { + + ::tensorflow::VersionDef* temp = _impl_.version_; + _impl_.version_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tensorflow::VersionDef* SavedUserObject::unsafe_arena_release_version() { + // @@protoc_insertion_point(field_release:tensorflow.SavedUserObject.version) + + ::tensorflow::VersionDef* temp = _impl_.version_; + _impl_.version_ = nullptr; + return temp; +} +inline ::tensorflow::VersionDef* SavedUserObject::_internal_mutable_version() { + + if (_impl_.version_ == nullptr) { + auto* p = CreateMaybeMessage<::tensorflow::VersionDef>(GetArenaForAllocation()); + _impl_.version_ = p; + } + return _impl_.version_; +} +inline ::tensorflow::VersionDef* SavedUserObject::mutable_version() { + ::tensorflow::VersionDef* _msg = _internal_mutable_version(); + // @@protoc_insertion_point(field_mutable:tensorflow.SavedUserObject.version) + return _msg; +} +inline void SavedUserObject::set_allocated_version(::tensorflow::VersionDef* version) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.version_); + } + if (version) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( + reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(version)); + if (message_arena != submessage_arena) { + version = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, version, submessage_arena); + } + + } else { + + } + _impl_.version_ = version; + // @@protoc_insertion_point(field_set_allocated:tensorflow.SavedUserObject.version) +} + +// string metadata = 3 [deprecated = true]; +inline void SavedUserObject::clear_metadata() { + _impl_.metadata_.ClearToEmpty(); +} +inline const std::string& SavedUserObject::metadata() const { + // @@protoc_insertion_point(field_get:tensorflow.SavedUserObject.metadata) + return _internal_metadata(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void SavedUserObject::set_metadata(ArgT0&& arg0, ArgT... args) { + + _impl_.metadata_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.SavedUserObject.metadata) +} +inline std::string* SavedUserObject::mutable_metadata() { + std::string* _s = _internal_mutable_metadata(); + // @@protoc_insertion_point(field_mutable:tensorflow.SavedUserObject.metadata) + return _s; +} +inline const std::string& SavedUserObject::_internal_metadata() const { + return _impl_.metadata_.Get(); +} +inline void SavedUserObject::_internal_set_metadata(const std::string& value) { + + _impl_.metadata_.Set(value, GetArenaForAllocation()); +} +inline std::string* SavedUserObject::_internal_mutable_metadata() { + + return _impl_.metadata_.Mutable(GetArenaForAllocation()); +} +inline std::string* SavedUserObject::release_metadata() { + // @@protoc_insertion_point(field_release:tensorflow.SavedUserObject.metadata) + return _impl_.metadata_.Release(); +} +inline void SavedUserObject::set_allocated_metadata(std::string* metadata) { + if (metadata != nullptr) { + + } else { + + } + _impl_.metadata_.SetAllocated(metadata, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.metadata_.IsDefault()) { + _impl_.metadata_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.SavedUserObject.metadata) +} + +// ------------------------------------------------------------------- + +// SavedAsset + +// int32 asset_file_def_index = 1; +inline void SavedAsset::clear_asset_file_def_index() { + _impl_.asset_file_def_index_ = 0; +} +inline int32_t SavedAsset::_internal_asset_file_def_index() const { + return _impl_.asset_file_def_index_; +} +inline int32_t SavedAsset::asset_file_def_index() const { + // @@protoc_insertion_point(field_get:tensorflow.SavedAsset.asset_file_def_index) + return _internal_asset_file_def_index(); +} +inline void SavedAsset::_internal_set_asset_file_def_index(int32_t value) { + + _impl_.asset_file_def_index_ = value; +} +inline void SavedAsset::set_asset_file_def_index(int32_t value) { + _internal_set_asset_file_def_index(value); + // @@protoc_insertion_point(field_set:tensorflow.SavedAsset.asset_file_def_index) +} + +// ------------------------------------------------------------------- + +// SavedFunction + +// repeated string concrete_functions = 1; +inline int SavedFunction::_internal_concrete_functions_size() const { + return _impl_.concrete_functions_.size(); +} +inline int SavedFunction::concrete_functions_size() const { + return _internal_concrete_functions_size(); +} +inline void SavedFunction::clear_concrete_functions() { + _impl_.concrete_functions_.Clear(); +} +inline std::string* SavedFunction::add_concrete_functions() { + std::string* _s = _internal_add_concrete_functions(); + // @@protoc_insertion_point(field_add_mutable:tensorflow.SavedFunction.concrete_functions) + return _s; +} +inline const std::string& SavedFunction::_internal_concrete_functions(int index) const { + return _impl_.concrete_functions_.Get(index); +} +inline const std::string& SavedFunction::concrete_functions(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.SavedFunction.concrete_functions) + return _internal_concrete_functions(index); +} +inline std::string* SavedFunction::mutable_concrete_functions(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.SavedFunction.concrete_functions) + return _impl_.concrete_functions_.Mutable(index); +} +inline void SavedFunction::set_concrete_functions(int index, const std::string& value) { + _impl_.concrete_functions_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set:tensorflow.SavedFunction.concrete_functions) +} +inline void SavedFunction::set_concrete_functions(int index, std::string&& value) { + _impl_.concrete_functions_.Mutable(index)->assign(std::move(value)); + // @@protoc_insertion_point(field_set:tensorflow.SavedFunction.concrete_functions) +} +inline void SavedFunction::set_concrete_functions(int index, const char* value) { + GOOGLE_DCHECK(value != nullptr); + _impl_.concrete_functions_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set_char:tensorflow.SavedFunction.concrete_functions) +} +inline void SavedFunction::set_concrete_functions(int index, const char* value, size_t size) { + _impl_.concrete_functions_.Mutable(index)->assign( + reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:tensorflow.SavedFunction.concrete_functions) +} +inline std::string* SavedFunction::_internal_add_concrete_functions() { + return _impl_.concrete_functions_.Add(); +} +inline void SavedFunction::add_concrete_functions(const std::string& value) { + _impl_.concrete_functions_.Add()->assign(value); + // @@protoc_insertion_point(field_add:tensorflow.SavedFunction.concrete_functions) +} +inline void SavedFunction::add_concrete_functions(std::string&& value) { + _impl_.concrete_functions_.Add(std::move(value)); + // @@protoc_insertion_point(field_add:tensorflow.SavedFunction.concrete_functions) +} +inline void SavedFunction::add_concrete_functions(const char* value) { + GOOGLE_DCHECK(value != nullptr); + _impl_.concrete_functions_.Add()->assign(value); + // @@protoc_insertion_point(field_add_char:tensorflow.SavedFunction.concrete_functions) +} +inline void SavedFunction::add_concrete_functions(const char* value, size_t size) { + _impl_.concrete_functions_.Add()->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_add_pointer:tensorflow.SavedFunction.concrete_functions) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& +SavedFunction::concrete_functions() const { + // @@protoc_insertion_point(field_list:tensorflow.SavedFunction.concrete_functions) + return _impl_.concrete_functions_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* +SavedFunction::mutable_concrete_functions() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.SavedFunction.concrete_functions) + return &_impl_.concrete_functions_; +} + +// .tensorflow.FunctionSpec function_spec = 2; +inline bool SavedFunction::_internal_has_function_spec() const { + return this != internal_default_instance() && _impl_.function_spec_ != nullptr; +} +inline bool SavedFunction::has_function_spec() const { + return _internal_has_function_spec(); +} +inline void SavedFunction::clear_function_spec() { + if (GetArenaForAllocation() == nullptr && _impl_.function_spec_ != nullptr) { + delete _impl_.function_spec_; + } + _impl_.function_spec_ = nullptr; +} +inline const ::tensorflow::FunctionSpec& SavedFunction::_internal_function_spec() const { + const ::tensorflow::FunctionSpec* p = _impl_.function_spec_; + return p != nullptr ? *p : reinterpret_cast( + ::tensorflow::_FunctionSpec_default_instance_); +} +inline const ::tensorflow::FunctionSpec& SavedFunction::function_spec() const { + // @@protoc_insertion_point(field_get:tensorflow.SavedFunction.function_spec) + return _internal_function_spec(); +} +inline void SavedFunction::unsafe_arena_set_allocated_function_spec( + ::tensorflow::FunctionSpec* function_spec) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.function_spec_); + } + _impl_.function_spec_ = function_spec; + if (function_spec) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.SavedFunction.function_spec) +} +inline ::tensorflow::FunctionSpec* SavedFunction::release_function_spec() { + + ::tensorflow::FunctionSpec* temp = _impl_.function_spec_; + _impl_.function_spec_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tensorflow::FunctionSpec* SavedFunction::unsafe_arena_release_function_spec() { + // @@protoc_insertion_point(field_release:tensorflow.SavedFunction.function_spec) + + ::tensorflow::FunctionSpec* temp = _impl_.function_spec_; + _impl_.function_spec_ = nullptr; + return temp; +} +inline ::tensorflow::FunctionSpec* SavedFunction::_internal_mutable_function_spec() { + + if (_impl_.function_spec_ == nullptr) { + auto* p = CreateMaybeMessage<::tensorflow::FunctionSpec>(GetArenaForAllocation()); + _impl_.function_spec_ = p; + } + return _impl_.function_spec_; +} +inline ::tensorflow::FunctionSpec* SavedFunction::mutable_function_spec() { + ::tensorflow::FunctionSpec* _msg = _internal_mutable_function_spec(); + // @@protoc_insertion_point(field_mutable:tensorflow.SavedFunction.function_spec) + return _msg; +} +inline void SavedFunction::set_allocated_function_spec(::tensorflow::FunctionSpec* function_spec) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete _impl_.function_spec_; + } + if (function_spec) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(function_spec); + if (message_arena != submessage_arena) { + function_spec = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, function_spec, submessage_arena); + } + + } else { + + } + _impl_.function_spec_ = function_spec; + // @@protoc_insertion_point(field_set_allocated:tensorflow.SavedFunction.function_spec) +} + +// ------------------------------------------------------------------- + +// CapturedTensor + +// string name = 1; +inline void CapturedTensor::clear_name() { + _impl_.name_.ClearToEmpty(); +} +inline const std::string& CapturedTensor::name() const { + // @@protoc_insertion_point(field_get:tensorflow.CapturedTensor.name) + return _internal_name(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void CapturedTensor::set_name(ArgT0&& arg0, ArgT... args) { + + _impl_.name_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.CapturedTensor.name) +} +inline std::string* CapturedTensor::mutable_name() { + std::string* _s = _internal_mutable_name(); + // @@protoc_insertion_point(field_mutable:tensorflow.CapturedTensor.name) + return _s; +} +inline const std::string& CapturedTensor::_internal_name() const { + return _impl_.name_.Get(); +} +inline void CapturedTensor::_internal_set_name(const std::string& value) { + + _impl_.name_.Set(value, GetArenaForAllocation()); +} +inline std::string* CapturedTensor::_internal_mutable_name() { + + return _impl_.name_.Mutable(GetArenaForAllocation()); +} +inline std::string* CapturedTensor::release_name() { + // @@protoc_insertion_point(field_release:tensorflow.CapturedTensor.name) + return _impl_.name_.Release(); +} +inline void CapturedTensor::set_allocated_name(std::string* name) { + if (name != nullptr) { + + } else { + + } + _impl_.name_.SetAllocated(name, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.name_.IsDefault()) { + _impl_.name_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.CapturedTensor.name) +} + +// string concrete_function = 2; +inline void CapturedTensor::clear_concrete_function() { + _impl_.concrete_function_.ClearToEmpty(); +} +inline const std::string& CapturedTensor::concrete_function() const { + // @@protoc_insertion_point(field_get:tensorflow.CapturedTensor.concrete_function) + return _internal_concrete_function(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void CapturedTensor::set_concrete_function(ArgT0&& arg0, ArgT... args) { + + _impl_.concrete_function_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.CapturedTensor.concrete_function) +} +inline std::string* CapturedTensor::mutable_concrete_function() { + std::string* _s = _internal_mutable_concrete_function(); + // @@protoc_insertion_point(field_mutable:tensorflow.CapturedTensor.concrete_function) + return _s; +} +inline const std::string& CapturedTensor::_internal_concrete_function() const { + return _impl_.concrete_function_.Get(); +} +inline void CapturedTensor::_internal_set_concrete_function(const std::string& value) { + + _impl_.concrete_function_.Set(value, GetArenaForAllocation()); +} +inline std::string* CapturedTensor::_internal_mutable_concrete_function() { + + return _impl_.concrete_function_.Mutable(GetArenaForAllocation()); +} +inline std::string* CapturedTensor::release_concrete_function() { + // @@protoc_insertion_point(field_release:tensorflow.CapturedTensor.concrete_function) + return _impl_.concrete_function_.Release(); +} +inline void CapturedTensor::set_allocated_concrete_function(std::string* concrete_function) { + if (concrete_function != nullptr) { + + } else { + + } + _impl_.concrete_function_.SetAllocated(concrete_function, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.concrete_function_.IsDefault()) { + _impl_.concrete_function_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.CapturedTensor.concrete_function) +} + +// ------------------------------------------------------------------- + +// SavedConcreteFunction + +// repeated int32 bound_inputs = 2; +inline int SavedConcreteFunction::_internal_bound_inputs_size() const { + return _impl_.bound_inputs_.size(); +} +inline int SavedConcreteFunction::bound_inputs_size() const { + return _internal_bound_inputs_size(); +} +inline void SavedConcreteFunction::clear_bound_inputs() { + _impl_.bound_inputs_.Clear(); +} +inline int32_t SavedConcreteFunction::_internal_bound_inputs(int index) const { + return _impl_.bound_inputs_.Get(index); +} +inline int32_t SavedConcreteFunction::bound_inputs(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.SavedConcreteFunction.bound_inputs) + return _internal_bound_inputs(index); +} +inline void SavedConcreteFunction::set_bound_inputs(int index, int32_t value) { + _impl_.bound_inputs_.Set(index, value); + // @@protoc_insertion_point(field_set:tensorflow.SavedConcreteFunction.bound_inputs) +} +inline void SavedConcreteFunction::_internal_add_bound_inputs(int32_t value) { + _impl_.bound_inputs_.Add(value); +} +inline void SavedConcreteFunction::add_bound_inputs(int32_t value) { + _internal_add_bound_inputs(value); + // @@protoc_insertion_point(field_add:tensorflow.SavedConcreteFunction.bound_inputs) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >& +SavedConcreteFunction::_internal_bound_inputs() const { + return _impl_.bound_inputs_; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >& +SavedConcreteFunction::bound_inputs() const { + // @@protoc_insertion_point(field_list:tensorflow.SavedConcreteFunction.bound_inputs) + return _internal_bound_inputs(); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >* +SavedConcreteFunction::_internal_mutable_bound_inputs() { + return &_impl_.bound_inputs_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >* +SavedConcreteFunction::mutable_bound_inputs() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.SavedConcreteFunction.bound_inputs) + return _internal_mutable_bound_inputs(); +} + +// .tensorflow.StructuredValue canonicalized_input_signature = 3; +inline bool SavedConcreteFunction::_internal_has_canonicalized_input_signature() const { + return this != internal_default_instance() && _impl_.canonicalized_input_signature_ != nullptr; +} +inline bool SavedConcreteFunction::has_canonicalized_input_signature() const { + return _internal_has_canonicalized_input_signature(); +} +inline const ::tensorflow::StructuredValue& SavedConcreteFunction::_internal_canonicalized_input_signature() const { + const ::tensorflow::StructuredValue* p = _impl_.canonicalized_input_signature_; + return p != nullptr ? *p : reinterpret_cast( + ::tensorflow::_StructuredValue_default_instance_); +} +inline const ::tensorflow::StructuredValue& SavedConcreteFunction::canonicalized_input_signature() const { + // @@protoc_insertion_point(field_get:tensorflow.SavedConcreteFunction.canonicalized_input_signature) + return _internal_canonicalized_input_signature(); +} +inline void SavedConcreteFunction::unsafe_arena_set_allocated_canonicalized_input_signature( + ::tensorflow::StructuredValue* canonicalized_input_signature) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.canonicalized_input_signature_); + } + _impl_.canonicalized_input_signature_ = canonicalized_input_signature; + if (canonicalized_input_signature) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.SavedConcreteFunction.canonicalized_input_signature) +} +inline ::tensorflow::StructuredValue* SavedConcreteFunction::release_canonicalized_input_signature() { + + ::tensorflow::StructuredValue* temp = _impl_.canonicalized_input_signature_; + _impl_.canonicalized_input_signature_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tensorflow::StructuredValue* SavedConcreteFunction::unsafe_arena_release_canonicalized_input_signature() { + // @@protoc_insertion_point(field_release:tensorflow.SavedConcreteFunction.canonicalized_input_signature) + + ::tensorflow::StructuredValue* temp = _impl_.canonicalized_input_signature_; + _impl_.canonicalized_input_signature_ = nullptr; + return temp; +} +inline ::tensorflow::StructuredValue* SavedConcreteFunction::_internal_mutable_canonicalized_input_signature() { + + if (_impl_.canonicalized_input_signature_ == nullptr) { + auto* p = CreateMaybeMessage<::tensorflow::StructuredValue>(GetArenaForAllocation()); + _impl_.canonicalized_input_signature_ = p; + } + return _impl_.canonicalized_input_signature_; +} +inline ::tensorflow::StructuredValue* SavedConcreteFunction::mutable_canonicalized_input_signature() { + ::tensorflow::StructuredValue* _msg = _internal_mutable_canonicalized_input_signature(); + // @@protoc_insertion_point(field_mutable:tensorflow.SavedConcreteFunction.canonicalized_input_signature) + return _msg; +} +inline void SavedConcreteFunction::set_allocated_canonicalized_input_signature(::tensorflow::StructuredValue* canonicalized_input_signature) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.canonicalized_input_signature_); + } + if (canonicalized_input_signature) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( + reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(canonicalized_input_signature)); + if (message_arena != submessage_arena) { + canonicalized_input_signature = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, canonicalized_input_signature, submessage_arena); + } + + } else { + + } + _impl_.canonicalized_input_signature_ = canonicalized_input_signature; + // @@protoc_insertion_point(field_set_allocated:tensorflow.SavedConcreteFunction.canonicalized_input_signature) +} + +// .tensorflow.StructuredValue output_signature = 4; +inline bool SavedConcreteFunction::_internal_has_output_signature() const { + return this != internal_default_instance() && _impl_.output_signature_ != nullptr; +} +inline bool SavedConcreteFunction::has_output_signature() const { + return _internal_has_output_signature(); +} +inline const ::tensorflow::StructuredValue& SavedConcreteFunction::_internal_output_signature() const { + const ::tensorflow::StructuredValue* p = _impl_.output_signature_; + return p != nullptr ? *p : reinterpret_cast( + ::tensorflow::_StructuredValue_default_instance_); +} +inline const ::tensorflow::StructuredValue& SavedConcreteFunction::output_signature() const { + // @@protoc_insertion_point(field_get:tensorflow.SavedConcreteFunction.output_signature) + return _internal_output_signature(); +} +inline void SavedConcreteFunction::unsafe_arena_set_allocated_output_signature( + ::tensorflow::StructuredValue* output_signature) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.output_signature_); + } + _impl_.output_signature_ = output_signature; + if (output_signature) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.SavedConcreteFunction.output_signature) +} +inline ::tensorflow::StructuredValue* SavedConcreteFunction::release_output_signature() { + + ::tensorflow::StructuredValue* temp = _impl_.output_signature_; + _impl_.output_signature_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tensorflow::StructuredValue* SavedConcreteFunction::unsafe_arena_release_output_signature() { + // @@protoc_insertion_point(field_release:tensorflow.SavedConcreteFunction.output_signature) + + ::tensorflow::StructuredValue* temp = _impl_.output_signature_; + _impl_.output_signature_ = nullptr; + return temp; +} +inline ::tensorflow::StructuredValue* SavedConcreteFunction::_internal_mutable_output_signature() { + + if (_impl_.output_signature_ == nullptr) { + auto* p = CreateMaybeMessage<::tensorflow::StructuredValue>(GetArenaForAllocation()); + _impl_.output_signature_ = p; + } + return _impl_.output_signature_; +} +inline ::tensorflow::StructuredValue* SavedConcreteFunction::mutable_output_signature() { + ::tensorflow::StructuredValue* _msg = _internal_mutable_output_signature(); + // @@protoc_insertion_point(field_mutable:tensorflow.SavedConcreteFunction.output_signature) + return _msg; +} +inline void SavedConcreteFunction::set_allocated_output_signature(::tensorflow::StructuredValue* output_signature) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.output_signature_); + } + if (output_signature) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( + reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(output_signature)); + if (message_arena != submessage_arena) { + output_signature = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, output_signature, submessage_arena); + } + + } else { + + } + _impl_.output_signature_ = output_signature; + // @@protoc_insertion_point(field_set_allocated:tensorflow.SavedConcreteFunction.output_signature) +} + +// ------------------------------------------------------------------- + +// SavedBareConcreteFunction + +// string concrete_function_name = 1; +inline void SavedBareConcreteFunction::clear_concrete_function_name() { + _impl_.concrete_function_name_.ClearToEmpty(); +} +inline const std::string& SavedBareConcreteFunction::concrete_function_name() const { + // @@protoc_insertion_point(field_get:tensorflow.SavedBareConcreteFunction.concrete_function_name) + return _internal_concrete_function_name(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void SavedBareConcreteFunction::set_concrete_function_name(ArgT0&& arg0, ArgT... args) { + + _impl_.concrete_function_name_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.SavedBareConcreteFunction.concrete_function_name) +} +inline std::string* SavedBareConcreteFunction::mutable_concrete_function_name() { + std::string* _s = _internal_mutable_concrete_function_name(); + // @@protoc_insertion_point(field_mutable:tensorflow.SavedBareConcreteFunction.concrete_function_name) + return _s; +} +inline const std::string& SavedBareConcreteFunction::_internal_concrete_function_name() const { + return _impl_.concrete_function_name_.Get(); +} +inline void SavedBareConcreteFunction::_internal_set_concrete_function_name(const std::string& value) { + + _impl_.concrete_function_name_.Set(value, GetArenaForAllocation()); +} +inline std::string* SavedBareConcreteFunction::_internal_mutable_concrete_function_name() { + + return _impl_.concrete_function_name_.Mutable(GetArenaForAllocation()); +} +inline std::string* SavedBareConcreteFunction::release_concrete_function_name() { + // @@protoc_insertion_point(field_release:tensorflow.SavedBareConcreteFunction.concrete_function_name) + return _impl_.concrete_function_name_.Release(); +} +inline void SavedBareConcreteFunction::set_allocated_concrete_function_name(std::string* concrete_function_name) { + if (concrete_function_name != nullptr) { + + } else { + + } + _impl_.concrete_function_name_.SetAllocated(concrete_function_name, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.concrete_function_name_.IsDefault()) { + _impl_.concrete_function_name_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.SavedBareConcreteFunction.concrete_function_name) +} + +// repeated string argument_keywords = 2; +inline int SavedBareConcreteFunction::_internal_argument_keywords_size() const { + return _impl_.argument_keywords_.size(); +} +inline int SavedBareConcreteFunction::argument_keywords_size() const { + return _internal_argument_keywords_size(); +} +inline void SavedBareConcreteFunction::clear_argument_keywords() { + _impl_.argument_keywords_.Clear(); +} +inline std::string* SavedBareConcreteFunction::add_argument_keywords() { + std::string* _s = _internal_add_argument_keywords(); + // @@protoc_insertion_point(field_add_mutable:tensorflow.SavedBareConcreteFunction.argument_keywords) + return _s; +} +inline const std::string& SavedBareConcreteFunction::_internal_argument_keywords(int index) const { + return _impl_.argument_keywords_.Get(index); +} +inline const std::string& SavedBareConcreteFunction::argument_keywords(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.SavedBareConcreteFunction.argument_keywords) + return _internal_argument_keywords(index); +} +inline std::string* SavedBareConcreteFunction::mutable_argument_keywords(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.SavedBareConcreteFunction.argument_keywords) + return _impl_.argument_keywords_.Mutable(index); +} +inline void SavedBareConcreteFunction::set_argument_keywords(int index, const std::string& value) { + _impl_.argument_keywords_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set:tensorflow.SavedBareConcreteFunction.argument_keywords) +} +inline void SavedBareConcreteFunction::set_argument_keywords(int index, std::string&& value) { + _impl_.argument_keywords_.Mutable(index)->assign(std::move(value)); + // @@protoc_insertion_point(field_set:tensorflow.SavedBareConcreteFunction.argument_keywords) +} +inline void SavedBareConcreteFunction::set_argument_keywords(int index, const char* value) { + GOOGLE_DCHECK(value != nullptr); + _impl_.argument_keywords_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set_char:tensorflow.SavedBareConcreteFunction.argument_keywords) +} +inline void SavedBareConcreteFunction::set_argument_keywords(int index, const char* value, size_t size) { + _impl_.argument_keywords_.Mutable(index)->assign( + reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:tensorflow.SavedBareConcreteFunction.argument_keywords) +} +inline std::string* SavedBareConcreteFunction::_internal_add_argument_keywords() { + return _impl_.argument_keywords_.Add(); +} +inline void SavedBareConcreteFunction::add_argument_keywords(const std::string& value) { + _impl_.argument_keywords_.Add()->assign(value); + // @@protoc_insertion_point(field_add:tensorflow.SavedBareConcreteFunction.argument_keywords) +} +inline void SavedBareConcreteFunction::add_argument_keywords(std::string&& value) { + _impl_.argument_keywords_.Add(std::move(value)); + // @@protoc_insertion_point(field_add:tensorflow.SavedBareConcreteFunction.argument_keywords) +} +inline void SavedBareConcreteFunction::add_argument_keywords(const char* value) { + GOOGLE_DCHECK(value != nullptr); + _impl_.argument_keywords_.Add()->assign(value); + // @@protoc_insertion_point(field_add_char:tensorflow.SavedBareConcreteFunction.argument_keywords) +} +inline void SavedBareConcreteFunction::add_argument_keywords(const char* value, size_t size) { + _impl_.argument_keywords_.Add()->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_add_pointer:tensorflow.SavedBareConcreteFunction.argument_keywords) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& +SavedBareConcreteFunction::argument_keywords() const { + // @@protoc_insertion_point(field_list:tensorflow.SavedBareConcreteFunction.argument_keywords) + return _impl_.argument_keywords_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* +SavedBareConcreteFunction::mutable_argument_keywords() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.SavedBareConcreteFunction.argument_keywords) + return &_impl_.argument_keywords_; +} + +// int64 allowed_positional_arguments = 3; +inline void SavedBareConcreteFunction::clear_allowed_positional_arguments() { + _impl_.allowed_positional_arguments_ = int64_t{0}; +} +inline int64_t SavedBareConcreteFunction::_internal_allowed_positional_arguments() const { + return _impl_.allowed_positional_arguments_; +} +inline int64_t SavedBareConcreteFunction::allowed_positional_arguments() const { + // @@protoc_insertion_point(field_get:tensorflow.SavedBareConcreteFunction.allowed_positional_arguments) + return _internal_allowed_positional_arguments(); +} +inline void SavedBareConcreteFunction::_internal_set_allowed_positional_arguments(int64_t value) { + + _impl_.allowed_positional_arguments_ = value; +} +inline void SavedBareConcreteFunction::set_allowed_positional_arguments(int64_t value) { + _internal_set_allowed_positional_arguments(value); + // @@protoc_insertion_point(field_set:tensorflow.SavedBareConcreteFunction.allowed_positional_arguments) +} + +// .tensorflow.FunctionSpec function_spec = 4; +inline bool SavedBareConcreteFunction::_internal_has_function_spec() const { + return this != internal_default_instance() && _impl_.function_spec_ != nullptr; +} +inline bool SavedBareConcreteFunction::has_function_spec() const { + return _internal_has_function_spec(); +} +inline void SavedBareConcreteFunction::clear_function_spec() { + if (GetArenaForAllocation() == nullptr && _impl_.function_spec_ != nullptr) { + delete _impl_.function_spec_; + } + _impl_.function_spec_ = nullptr; +} +inline const ::tensorflow::FunctionSpec& SavedBareConcreteFunction::_internal_function_spec() const { + const ::tensorflow::FunctionSpec* p = _impl_.function_spec_; + return p != nullptr ? *p : reinterpret_cast( + ::tensorflow::_FunctionSpec_default_instance_); +} +inline const ::tensorflow::FunctionSpec& SavedBareConcreteFunction::function_spec() const { + // @@protoc_insertion_point(field_get:tensorflow.SavedBareConcreteFunction.function_spec) + return _internal_function_spec(); +} +inline void SavedBareConcreteFunction::unsafe_arena_set_allocated_function_spec( + ::tensorflow::FunctionSpec* function_spec) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.function_spec_); + } + _impl_.function_spec_ = function_spec; + if (function_spec) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.SavedBareConcreteFunction.function_spec) +} +inline ::tensorflow::FunctionSpec* SavedBareConcreteFunction::release_function_spec() { + + ::tensorflow::FunctionSpec* temp = _impl_.function_spec_; + _impl_.function_spec_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tensorflow::FunctionSpec* SavedBareConcreteFunction::unsafe_arena_release_function_spec() { + // @@protoc_insertion_point(field_release:tensorflow.SavedBareConcreteFunction.function_spec) + + ::tensorflow::FunctionSpec* temp = _impl_.function_spec_; + _impl_.function_spec_ = nullptr; + return temp; +} +inline ::tensorflow::FunctionSpec* SavedBareConcreteFunction::_internal_mutable_function_spec() { + + if (_impl_.function_spec_ == nullptr) { + auto* p = CreateMaybeMessage<::tensorflow::FunctionSpec>(GetArenaForAllocation()); + _impl_.function_spec_ = p; + } + return _impl_.function_spec_; +} +inline ::tensorflow::FunctionSpec* SavedBareConcreteFunction::mutable_function_spec() { + ::tensorflow::FunctionSpec* _msg = _internal_mutable_function_spec(); + // @@protoc_insertion_point(field_mutable:tensorflow.SavedBareConcreteFunction.function_spec) + return _msg; +} +inline void SavedBareConcreteFunction::set_allocated_function_spec(::tensorflow::FunctionSpec* function_spec) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete _impl_.function_spec_; + } + if (function_spec) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(function_spec); + if (message_arena != submessage_arena) { + function_spec = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, function_spec, submessage_arena); + } + + } else { + + } + _impl_.function_spec_ = function_spec; + // @@protoc_insertion_point(field_set_allocated:tensorflow.SavedBareConcreteFunction.function_spec) +} + +// ------------------------------------------------------------------- + +// SavedConstant + +// string operation = 1; +inline void SavedConstant::clear_operation() { + _impl_.operation_.ClearToEmpty(); +} +inline const std::string& SavedConstant::operation() const { + // @@protoc_insertion_point(field_get:tensorflow.SavedConstant.operation) + return _internal_operation(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void SavedConstant::set_operation(ArgT0&& arg0, ArgT... args) { + + _impl_.operation_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.SavedConstant.operation) +} +inline std::string* SavedConstant::mutable_operation() { + std::string* _s = _internal_mutable_operation(); + // @@protoc_insertion_point(field_mutable:tensorflow.SavedConstant.operation) + return _s; +} +inline const std::string& SavedConstant::_internal_operation() const { + return _impl_.operation_.Get(); +} +inline void SavedConstant::_internal_set_operation(const std::string& value) { + + _impl_.operation_.Set(value, GetArenaForAllocation()); +} +inline std::string* SavedConstant::_internal_mutable_operation() { + + return _impl_.operation_.Mutable(GetArenaForAllocation()); +} +inline std::string* SavedConstant::release_operation() { + // @@protoc_insertion_point(field_release:tensorflow.SavedConstant.operation) + return _impl_.operation_.Release(); +} +inline void SavedConstant::set_allocated_operation(std::string* operation) { + if (operation != nullptr) { + + } else { + + } + _impl_.operation_.SetAllocated(operation, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.operation_.IsDefault()) { + _impl_.operation_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.SavedConstant.operation) +} + +// ------------------------------------------------------------------- + +// SavedVariable + +// .tensorflow.DataType dtype = 1; +inline void SavedVariable::clear_dtype() { + _impl_.dtype_ = 0; +} +inline ::tensorflow::DataType SavedVariable::_internal_dtype() const { + return static_cast< ::tensorflow::DataType >(_impl_.dtype_); +} +inline ::tensorflow::DataType SavedVariable::dtype() const { + // @@protoc_insertion_point(field_get:tensorflow.SavedVariable.dtype) + return _internal_dtype(); +} +inline void SavedVariable::_internal_set_dtype(::tensorflow::DataType value) { + + _impl_.dtype_ = value; +} +inline void SavedVariable::set_dtype(::tensorflow::DataType value) { + _internal_set_dtype(value); + // @@protoc_insertion_point(field_set:tensorflow.SavedVariable.dtype) +} + +// .tensorflow.TensorShapeProto shape = 2; +inline bool SavedVariable::_internal_has_shape() const { + return this != internal_default_instance() && _impl_.shape_ != nullptr; +} +inline bool SavedVariable::has_shape() const { + return _internal_has_shape(); +} +inline const ::tensorflow::TensorShapeProto& SavedVariable::_internal_shape() const { + const ::tensorflow::TensorShapeProto* p = _impl_.shape_; + return p != nullptr ? *p : reinterpret_cast( + ::tensorflow::_TensorShapeProto_default_instance_); +} +inline const ::tensorflow::TensorShapeProto& SavedVariable::shape() const { + // @@protoc_insertion_point(field_get:tensorflow.SavedVariable.shape) + return _internal_shape(); +} +inline void SavedVariable::unsafe_arena_set_allocated_shape( + ::tensorflow::TensorShapeProto* shape) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.shape_); + } + _impl_.shape_ = shape; + if (shape) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.SavedVariable.shape) +} +inline ::tensorflow::TensorShapeProto* SavedVariable::release_shape() { + + ::tensorflow::TensorShapeProto* temp = _impl_.shape_; + _impl_.shape_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tensorflow::TensorShapeProto* SavedVariable::unsafe_arena_release_shape() { + // @@protoc_insertion_point(field_release:tensorflow.SavedVariable.shape) + + ::tensorflow::TensorShapeProto* temp = _impl_.shape_; + _impl_.shape_ = nullptr; + return temp; +} +inline ::tensorflow::TensorShapeProto* SavedVariable::_internal_mutable_shape() { + + if (_impl_.shape_ == nullptr) { + auto* p = CreateMaybeMessage<::tensorflow::TensorShapeProto>(GetArenaForAllocation()); + _impl_.shape_ = p; + } + return _impl_.shape_; +} +inline ::tensorflow::TensorShapeProto* SavedVariable::mutable_shape() { + ::tensorflow::TensorShapeProto* _msg = _internal_mutable_shape(); + // @@protoc_insertion_point(field_mutable:tensorflow.SavedVariable.shape) + return _msg; +} +inline void SavedVariable::set_allocated_shape(::tensorflow::TensorShapeProto* shape) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.shape_); + } + if (shape) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( + reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(shape)); + if (message_arena != submessage_arena) { + shape = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, shape, submessage_arena); + } + + } else { + + } + _impl_.shape_ = shape; + // @@protoc_insertion_point(field_set_allocated:tensorflow.SavedVariable.shape) +} + +// bool trainable = 3; +inline void SavedVariable::clear_trainable() { + _impl_.trainable_ = false; +} +inline bool SavedVariable::_internal_trainable() const { + return _impl_.trainable_; +} +inline bool SavedVariable::trainable() const { + // @@protoc_insertion_point(field_get:tensorflow.SavedVariable.trainable) + return _internal_trainable(); +} +inline void SavedVariable::_internal_set_trainable(bool value) { + + _impl_.trainable_ = value; +} +inline void SavedVariable::set_trainable(bool value) { + _internal_set_trainable(value); + // @@protoc_insertion_point(field_set:tensorflow.SavedVariable.trainable) +} + +// .tensorflow.VariableSynchronization synchronization = 4; +inline void SavedVariable::clear_synchronization() { + _impl_.synchronization_ = 0; +} +inline ::tensorflow::VariableSynchronization SavedVariable::_internal_synchronization() const { + return static_cast< ::tensorflow::VariableSynchronization >(_impl_.synchronization_); +} +inline ::tensorflow::VariableSynchronization SavedVariable::synchronization() const { + // @@protoc_insertion_point(field_get:tensorflow.SavedVariable.synchronization) + return _internal_synchronization(); +} +inline void SavedVariable::_internal_set_synchronization(::tensorflow::VariableSynchronization value) { + + _impl_.synchronization_ = value; +} +inline void SavedVariable::set_synchronization(::tensorflow::VariableSynchronization value) { + _internal_set_synchronization(value); + // @@protoc_insertion_point(field_set:tensorflow.SavedVariable.synchronization) +} + +// .tensorflow.VariableAggregation aggregation = 5; +inline void SavedVariable::clear_aggregation() { + _impl_.aggregation_ = 0; +} +inline ::tensorflow::VariableAggregation SavedVariable::_internal_aggregation() const { + return static_cast< ::tensorflow::VariableAggregation >(_impl_.aggregation_); +} +inline ::tensorflow::VariableAggregation SavedVariable::aggregation() const { + // @@protoc_insertion_point(field_get:tensorflow.SavedVariable.aggregation) + return _internal_aggregation(); +} +inline void SavedVariable::_internal_set_aggregation(::tensorflow::VariableAggregation value) { + + _impl_.aggregation_ = value; +} +inline void SavedVariable::set_aggregation(::tensorflow::VariableAggregation value) { + _internal_set_aggregation(value); + // @@protoc_insertion_point(field_set:tensorflow.SavedVariable.aggregation) +} + +// string name = 6; +inline void SavedVariable::clear_name() { + _impl_.name_.ClearToEmpty(); +} +inline const std::string& SavedVariable::name() const { + // @@protoc_insertion_point(field_get:tensorflow.SavedVariable.name) + return _internal_name(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void SavedVariable::set_name(ArgT0&& arg0, ArgT... args) { + + _impl_.name_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.SavedVariable.name) +} +inline std::string* SavedVariable::mutable_name() { + std::string* _s = _internal_mutable_name(); + // @@protoc_insertion_point(field_mutable:tensorflow.SavedVariable.name) + return _s; +} +inline const std::string& SavedVariable::_internal_name() const { + return _impl_.name_.Get(); +} +inline void SavedVariable::_internal_set_name(const std::string& value) { + + _impl_.name_.Set(value, GetArenaForAllocation()); +} +inline std::string* SavedVariable::_internal_mutable_name() { + + return _impl_.name_.Mutable(GetArenaForAllocation()); +} +inline std::string* SavedVariable::release_name() { + // @@protoc_insertion_point(field_release:tensorflow.SavedVariable.name) + return _impl_.name_.Release(); +} +inline void SavedVariable::set_allocated_name(std::string* name) { + if (name != nullptr) { + + } else { + + } + _impl_.name_.SetAllocated(name, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.name_.IsDefault()) { + _impl_.name_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.SavedVariable.name) +} + +// string device = 7; +inline void SavedVariable::clear_device() { + _impl_.device_.ClearToEmpty(); +} +inline const std::string& SavedVariable::device() const { + // @@protoc_insertion_point(field_get:tensorflow.SavedVariable.device) + return _internal_device(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void SavedVariable::set_device(ArgT0&& arg0, ArgT... args) { + + _impl_.device_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.SavedVariable.device) +} +inline std::string* SavedVariable::mutable_device() { + std::string* _s = _internal_mutable_device(); + // @@protoc_insertion_point(field_mutable:tensorflow.SavedVariable.device) + return _s; +} +inline const std::string& SavedVariable::_internal_device() const { + return _impl_.device_.Get(); +} +inline void SavedVariable::_internal_set_device(const std::string& value) { + + _impl_.device_.Set(value, GetArenaForAllocation()); +} +inline std::string* SavedVariable::_internal_mutable_device() { + + return _impl_.device_.Mutable(GetArenaForAllocation()); +} +inline std::string* SavedVariable::release_device() { + // @@protoc_insertion_point(field_release:tensorflow.SavedVariable.device) + return _impl_.device_.Release(); +} +inline void SavedVariable::set_allocated_device(std::string* device) { + if (device != nullptr) { + + } else { + + } + _impl_.device_.SetAllocated(device, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.device_.IsDefault()) { + _impl_.device_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.SavedVariable.device) +} + +// repeated .tensorflow.SavedVariable experimental_distributed_variable_components = 8; +inline int SavedVariable::_internal_experimental_distributed_variable_components_size() const { + return _impl_.experimental_distributed_variable_components_.size(); +} +inline int SavedVariable::experimental_distributed_variable_components_size() const { + return _internal_experimental_distributed_variable_components_size(); +} +inline void SavedVariable::clear_experimental_distributed_variable_components() { + _impl_.experimental_distributed_variable_components_.Clear(); +} +inline ::tensorflow::SavedVariable* SavedVariable::mutable_experimental_distributed_variable_components(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.SavedVariable.experimental_distributed_variable_components) + return _impl_.experimental_distributed_variable_components_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::SavedVariable >* +SavedVariable::mutable_experimental_distributed_variable_components() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.SavedVariable.experimental_distributed_variable_components) + return &_impl_.experimental_distributed_variable_components_; +} +inline const ::tensorflow::SavedVariable& SavedVariable::_internal_experimental_distributed_variable_components(int index) const { + return _impl_.experimental_distributed_variable_components_.Get(index); +} +inline const ::tensorflow::SavedVariable& SavedVariable::experimental_distributed_variable_components(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.SavedVariable.experimental_distributed_variable_components) + return _internal_experimental_distributed_variable_components(index); +} +inline ::tensorflow::SavedVariable* SavedVariable::_internal_add_experimental_distributed_variable_components() { + return _impl_.experimental_distributed_variable_components_.Add(); +} +inline ::tensorflow::SavedVariable* SavedVariable::add_experimental_distributed_variable_components() { + ::tensorflow::SavedVariable* _add = _internal_add_experimental_distributed_variable_components(); + // @@protoc_insertion_point(field_add:tensorflow.SavedVariable.experimental_distributed_variable_components) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::SavedVariable >& +SavedVariable::experimental_distributed_variable_components() const { + // @@protoc_insertion_point(field_list:tensorflow.SavedVariable.experimental_distributed_variable_components) + return _impl_.experimental_distributed_variable_components_; +} + +// ------------------------------------------------------------------- + +// FunctionSpec + +// .tensorflow.StructuredValue fullargspec = 1; +inline bool FunctionSpec::_internal_has_fullargspec() const { + return this != internal_default_instance() && _impl_.fullargspec_ != nullptr; +} +inline bool FunctionSpec::has_fullargspec() const { + return _internal_has_fullargspec(); +} +inline const ::tensorflow::StructuredValue& FunctionSpec::_internal_fullargspec() const { + const ::tensorflow::StructuredValue* p = _impl_.fullargspec_; + return p != nullptr ? *p : reinterpret_cast( + ::tensorflow::_StructuredValue_default_instance_); +} +inline const ::tensorflow::StructuredValue& FunctionSpec::fullargspec() const { + // @@protoc_insertion_point(field_get:tensorflow.FunctionSpec.fullargspec) + return _internal_fullargspec(); +} +inline void FunctionSpec::unsafe_arena_set_allocated_fullargspec( + ::tensorflow::StructuredValue* fullargspec) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.fullargspec_); + } + _impl_.fullargspec_ = fullargspec; + if (fullargspec) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.FunctionSpec.fullargspec) +} +inline ::tensorflow::StructuredValue* FunctionSpec::release_fullargspec() { + + ::tensorflow::StructuredValue* temp = _impl_.fullargspec_; + _impl_.fullargspec_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tensorflow::StructuredValue* FunctionSpec::unsafe_arena_release_fullargspec() { + // @@protoc_insertion_point(field_release:tensorflow.FunctionSpec.fullargspec) + + ::tensorflow::StructuredValue* temp = _impl_.fullargspec_; + _impl_.fullargspec_ = nullptr; + return temp; +} +inline ::tensorflow::StructuredValue* FunctionSpec::_internal_mutable_fullargspec() { + + if (_impl_.fullargspec_ == nullptr) { + auto* p = CreateMaybeMessage<::tensorflow::StructuredValue>(GetArenaForAllocation()); + _impl_.fullargspec_ = p; + } + return _impl_.fullargspec_; +} +inline ::tensorflow::StructuredValue* FunctionSpec::mutable_fullargspec() { + ::tensorflow::StructuredValue* _msg = _internal_mutable_fullargspec(); + // @@protoc_insertion_point(field_mutable:tensorflow.FunctionSpec.fullargspec) + return _msg; +} +inline void FunctionSpec::set_allocated_fullargspec(::tensorflow::StructuredValue* fullargspec) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.fullargspec_); + } + if (fullargspec) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( + reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(fullargspec)); + if (message_arena != submessage_arena) { + fullargspec = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, fullargspec, submessage_arena); + } + + } else { + + } + _impl_.fullargspec_ = fullargspec; + // @@protoc_insertion_point(field_set_allocated:tensorflow.FunctionSpec.fullargspec) +} + +// bool is_method = 2; +inline void FunctionSpec::clear_is_method() { + _impl_.is_method_ = false; +} +inline bool FunctionSpec::_internal_is_method() const { + return _impl_.is_method_; +} +inline bool FunctionSpec::is_method() const { + // @@protoc_insertion_point(field_get:tensorflow.FunctionSpec.is_method) + return _internal_is_method(); +} +inline void FunctionSpec::_internal_set_is_method(bool value) { + + _impl_.is_method_ = value; +} +inline void FunctionSpec::set_is_method(bool value) { + _internal_set_is_method(value); + // @@protoc_insertion_point(field_set:tensorflow.FunctionSpec.is_method) +} + +// .tensorflow.StructuredValue input_signature = 5; +inline bool FunctionSpec::_internal_has_input_signature() const { + return this != internal_default_instance() && _impl_.input_signature_ != nullptr; +} +inline bool FunctionSpec::has_input_signature() const { + return _internal_has_input_signature(); +} +inline const ::tensorflow::StructuredValue& FunctionSpec::_internal_input_signature() const { + const ::tensorflow::StructuredValue* p = _impl_.input_signature_; + return p != nullptr ? *p : reinterpret_cast( + ::tensorflow::_StructuredValue_default_instance_); +} +inline const ::tensorflow::StructuredValue& FunctionSpec::input_signature() const { + // @@protoc_insertion_point(field_get:tensorflow.FunctionSpec.input_signature) + return _internal_input_signature(); +} +inline void FunctionSpec::unsafe_arena_set_allocated_input_signature( + ::tensorflow::StructuredValue* input_signature) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.input_signature_); + } + _impl_.input_signature_ = input_signature; + if (input_signature) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.FunctionSpec.input_signature) +} +inline ::tensorflow::StructuredValue* FunctionSpec::release_input_signature() { + + ::tensorflow::StructuredValue* temp = _impl_.input_signature_; + _impl_.input_signature_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tensorflow::StructuredValue* FunctionSpec::unsafe_arena_release_input_signature() { + // @@protoc_insertion_point(field_release:tensorflow.FunctionSpec.input_signature) + + ::tensorflow::StructuredValue* temp = _impl_.input_signature_; + _impl_.input_signature_ = nullptr; + return temp; +} +inline ::tensorflow::StructuredValue* FunctionSpec::_internal_mutable_input_signature() { + + if (_impl_.input_signature_ == nullptr) { + auto* p = CreateMaybeMessage<::tensorflow::StructuredValue>(GetArenaForAllocation()); + _impl_.input_signature_ = p; + } + return _impl_.input_signature_; +} +inline ::tensorflow::StructuredValue* FunctionSpec::mutable_input_signature() { + ::tensorflow::StructuredValue* _msg = _internal_mutable_input_signature(); + // @@protoc_insertion_point(field_mutable:tensorflow.FunctionSpec.input_signature) + return _msg; +} +inline void FunctionSpec::set_allocated_input_signature(::tensorflow::StructuredValue* input_signature) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.input_signature_); + } + if (input_signature) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( + reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(input_signature)); + if (message_arena != submessage_arena) { + input_signature = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, input_signature, submessage_arena); + } + + } else { + + } + _impl_.input_signature_ = input_signature; + // @@protoc_insertion_point(field_set_allocated:tensorflow.FunctionSpec.input_signature) +} + +// .tensorflow.FunctionSpec.JitCompile jit_compile = 6; +inline void FunctionSpec::clear_jit_compile() { + _impl_.jit_compile_ = 0; +} +inline ::tensorflow::FunctionSpec_JitCompile FunctionSpec::_internal_jit_compile() const { + return static_cast< ::tensorflow::FunctionSpec_JitCompile >(_impl_.jit_compile_); +} +inline ::tensorflow::FunctionSpec_JitCompile FunctionSpec::jit_compile() const { + // @@protoc_insertion_point(field_get:tensorflow.FunctionSpec.jit_compile) + return _internal_jit_compile(); +} +inline void FunctionSpec::_internal_set_jit_compile(::tensorflow::FunctionSpec_JitCompile value) { + + _impl_.jit_compile_ = value; +} +inline void FunctionSpec::set_jit_compile(::tensorflow::FunctionSpec_JitCompile value) { + _internal_set_jit_compile(value); + // @@protoc_insertion_point(field_set:tensorflow.FunctionSpec.jit_compile) +} + +// ------------------------------------------------------------------- + +// SavedResource + +// string device = 1; +inline void SavedResource::clear_device() { + _impl_.device_.ClearToEmpty(); +} +inline const std::string& SavedResource::device() const { + // @@protoc_insertion_point(field_get:tensorflow.SavedResource.device) + return _internal_device(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void SavedResource::set_device(ArgT0&& arg0, ArgT... args) { + + _impl_.device_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.SavedResource.device) +} +inline std::string* SavedResource::mutable_device() { + std::string* _s = _internal_mutable_device(); + // @@protoc_insertion_point(field_mutable:tensorflow.SavedResource.device) + return _s; +} +inline const std::string& SavedResource::_internal_device() const { + return _impl_.device_.Get(); +} +inline void SavedResource::_internal_set_device(const std::string& value) { + + _impl_.device_.Set(value, GetArenaForAllocation()); +} +inline std::string* SavedResource::_internal_mutable_device() { + + return _impl_.device_.Mutable(GetArenaForAllocation()); +} +inline std::string* SavedResource::release_device() { + // @@protoc_insertion_point(field_release:tensorflow.SavedResource.device) + return _impl_.device_.Release(); +} +inline void SavedResource::set_allocated_device(std::string* device) { + if (device != nullptr) { + + } else { + + } + _impl_.device_.SetAllocated(device, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.device_.IsDefault()) { + _impl_.device_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.SavedResource.device) +} + +// ------------------------------------------------------------------- + +// SaveableObject + +// int32 save_function = 2; +inline void SaveableObject::clear_save_function() { + _impl_.save_function_ = 0; +} +inline int32_t SaveableObject::_internal_save_function() const { + return _impl_.save_function_; +} +inline int32_t SaveableObject::save_function() const { + // @@protoc_insertion_point(field_get:tensorflow.SaveableObject.save_function) + return _internal_save_function(); +} +inline void SaveableObject::_internal_set_save_function(int32_t value) { + + _impl_.save_function_ = value; +} +inline void SaveableObject::set_save_function(int32_t value) { + _internal_set_save_function(value); + // @@protoc_insertion_point(field_set:tensorflow.SaveableObject.save_function) +} + +// int32 restore_function = 3; +inline void SaveableObject::clear_restore_function() { + _impl_.restore_function_ = 0; +} +inline int32_t SaveableObject::_internal_restore_function() const { + return _impl_.restore_function_; +} +inline int32_t SaveableObject::restore_function() const { + // @@protoc_insertion_point(field_get:tensorflow.SaveableObject.restore_function) + return _internal_restore_function(); +} +inline void SaveableObject::_internal_set_restore_function(int32_t value) { + + _impl_.restore_function_ = value; +} +inline void SaveableObject::set_restore_function(int32_t value) { + _internal_set_restore_function(value); + // @@protoc_insertion_point(field_set:tensorflow.SaveableObject.restore_function) +} + +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + + +// @@protoc_insertion_point(namespace_scope) + +} // namespace tensorflow + +PROTOBUF_NAMESPACE_OPEN + +template <> struct is_proto_enum< ::tensorflow::FunctionSpec_JitCompile> : ::std::true_type {}; +template <> +inline const EnumDescriptor* GetEnumDescriptor< ::tensorflow::FunctionSpec_JitCompile>() { + return ::tensorflow::FunctionSpec_JitCompile_descriptor(); +} + +PROTOBUF_NAMESPACE_CLOSE + +// @@protoc_insertion_point(global_scope) + +#include +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/saved_object_graph.proto b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/saved_object_graph.proto new file mode 100644 index 0000000000000000000000000000000000000000..a59ad0ed27f53cc943f7e02630ceb124e203f989 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/saved_object_graph.proto @@ -0,0 +1,251 @@ +syntax = "proto3"; + +package tensorflow; + +import "google/protobuf/any.proto"; +import "tensorflow/core/framework/tensor_shape.proto"; +import "tensorflow/core/framework/types.proto"; +import "tensorflow/core/framework/variable.proto"; +import "tensorflow/core/framework/versions.proto"; +import "tensorflow/core/protobuf/struct.proto"; +import "tensorflow/core/protobuf/trackable_object_graph.proto"; + +option cc_enable_arenas = true; +option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/protobuf/for_core_protos_go_proto"; + +// A SavedObjectGraph is part of object-based SavedModels in TF 2.0. It +// describes the directed graph of Python objects (or equivalent in other +// languages) that make up a model, with nodes[0] at the root. + +// SavedObjectGraph shares some structure with TrackableObjectGraph, but +// SavedObjectGraph belongs to the MetaGraph and contains pointers to functions +// and type information, while TrackableObjectGraph lives in the checkpoint +// and contains pointers only to variable values. + +message SavedObjectGraph { + // Flattened list of objects in the object graph. + // + // The position of the object in this list indicates its id. + // Nodes[0] is considered the root node. + repeated SavedObject nodes = 1; + + // Information about captures and output structures in concrete functions. + // Referenced from SavedBareConcreteFunction and SavedFunction. + map concrete_functions = 2; +} + +message SavedObject { + // Objects which this object depends on: named edges in the dependency + // graph. + // + // Note: All kinds of SavedObject may have children, except + // "constant" and "captured_tensor". + repeated TrackableObjectGraph.TrackableObject.ObjectReference children = 1; + + // Ordered list of dependencies that must be loaded before this object. + // SavedModel loads with the bottom-up approach, by first creating all objects + // (in the order defined by the dependencies), then connecting the edges. + repeated TrackableObjectGraph.TrackableObject.ObjectReference dependencies = + 15; + + // Removed when forking SavedObject from TrackableObjectGraph. + reserved "attributes"; + reserved 2; + + // Slot variables owned by this object. This describes the three-way + // (optimizer, variable, slot variable) relationship; none of the three + // depend on the others directly. + // + // Note: currently only valid if kind == "user_object". + repeated TrackableObjectGraph.TrackableObject.SlotVariableReference + slot_variables = 3; + + oneof kind { + SavedUserObject user_object = 4; + SavedAsset asset = 5; + SavedFunction function = 6; + SavedVariable variable = 7; + SavedBareConcreteFunction bare_concrete_function = 8; + SavedConstant constant = 9; + SavedResource resource = 10; + CapturedTensor captured_tensor = 12; + } + + // Stores the functions used to save and restore this object. At most one of + // `saveable_objects` or `registered_saver` is defined for each SavedObject. + // See the comment below for the difference between SaveableObject and + // registered savers. + map saveable_objects = 11; + + // The fields below are filled when the user serializes a registered Trackable + // class or an object with a registered saver function. + // + // Registered classes may save additional metadata and supersede the + // default loading process where nodes are recreated from the proto. + // If the registered class cannot be found, then the object will load as one + // one of the default trackable objects: Autotrackable (a class similar to + // tf.Module), tf.function, or tf.Variable. + // + // Unlike SaveableObjects, which store the functions for saving and restoring + // from tensors, registered savers allow Trackables to write checkpoint shards + // directly (e.g. for performance or coordination reasons). + // *All registered savers must be available when loading the SavedModel.* + + // The name of the registered class of the form "{package}.{class_name}". + // This field is used to search for the registered class at loading time. + string registered_name = 13; + // The user-generated proto storing metadata for this object, to be passed to + // the registered classes's _deserialize_from_proto method when this object is + // loaded from the SavedModel. + google.protobuf.Any serialized_user_proto = 14; + + // String name of the registered saver. At most one of `saveable_objects` or + // `registered_saver` is defined for each SavedObject. + string registered_saver = 16; +} + +// A SavedUserObject is an object (in the object-oriented language of the +// TensorFlow program) of some user- or framework-defined class other than +// those handled specifically by the other kinds of SavedObjects. +// +// This object cannot be evaluated as a tensor, and therefore cannot be bound +// to an input of a function. +message SavedUserObject { + // Corresponds to a registration of the type to use in the loading program. + string identifier = 1; + // Version information from the producer of this SavedUserObject. + VersionDef version = 2; + // Metadata for deserializing this object. + // + // Deprecated! At the time of deprecation, Keras was the only user of this + // field, and its saving and loading code will be updated shortly. + // Please save your application-specific metadata to a separate file. + string metadata = 3 [deprecated = true]; +} + +// A SavedAsset points to an asset in the MetaGraph. +// +// When bound to a function this object evaluates to a tensor with the absolute +// filename. Users should not depend on a particular part of the filename to +// remain stable (e.g. basename could be changed). +message SavedAsset { + // Index into `MetaGraphDef.asset_file_def[]` that describes the Asset. + // + // Only the field `AssetFileDef.filename` is used. Other fields, such as + // `AssetFileDef.tensor_info`, MUST be ignored. + int32 asset_file_def_index = 1; +} + +// A function with multiple signatures, possibly with non-Tensor arguments. +message SavedFunction { + repeated string concrete_functions = 1; + FunctionSpec function_spec = 2; +} + +message CapturedTensor { + // Name of captured tensor + string name = 1; + + // Name of concrete function which contains the computed graph tensor. + string concrete_function = 2; +} + +// Stores low-level information about a concrete function. Referenced in either +// a SavedFunction or a SavedBareConcreteFunction. +message SavedConcreteFunction { + repeated int32 bound_inputs = 2; + + // Input in canonicalized form that was received to create this concrete + // function. + StructuredValue canonicalized_input_signature = 3; + // Output that was the return value of this function after replacing all + // Tensors with TensorSpecs. This can be an arbitrary nested function and will + // be used to reconstruct the full structure from pure tensors. + StructuredValue output_signature = 4; +} + +message SavedBareConcreteFunction { + // Identifies a SavedConcreteFunction. + string concrete_function_name = 1; + + // A sequence of unique strings, one per Tensor argument. + repeated string argument_keywords = 2; + // The prefix of `argument_keywords` which may be identified by position. + int64 allowed_positional_arguments = 3; + // The spec of the function that this ConcreteFunction is traced from. This + // allows the ConcreteFunction to be called with nest structure inputs. This + // field may not be populated. If this field is absent, the concrete function + // can only be called with flat inputs. + // TODO(b/169361281): support calling saved ConcreteFunction with structured + // inputs in C++ SavedModel API. + FunctionSpec function_spec = 4; +} + +message SavedConstant { + // An Operation name for a ConstantOp in this SavedObjectGraph's MetaGraph. + string operation = 1; +} + +// Represents a Variable that is initialized by loading the contents from the +// checkpoint. +message SavedVariable { + DataType dtype = 1; + TensorShapeProto shape = 2; + bool trainable = 3; + VariableSynchronization synchronization = 4; + VariableAggregation aggregation = 5; + string name = 6; + string device = 7; + // List of component variables for a distributed variable. + // + // When this field is non-empty, the SavedVariable will be assumed + // to be a distributed variable defined by the components listed here. + // + // This is only supported by experimental loaders at the moment. + repeated SavedVariable experimental_distributed_variable_components = 8; +} + +// Represents `FunctionSpec` used in `Function`. This represents a +// function that has been wrapped as a TensorFlow `Function`. +message FunctionSpec { + // Full arg spec from inspect.getfullargspec(). + StructuredValue fullargspec = 1; + // Whether this represents a class method. + bool is_method = 2; + // The input signature, if specified. + StructuredValue input_signature = 5; + + // Whether the function should be compiled by XLA. + // + // The public interface to `tf.function` uses an optional boolean to + // represent three distinct states for this field. Unfortunately, proto3 + // removes the ability to explicitly check for the presence or absence of a + // field, so we instead map to an enum. + // + // See `tf.function` for details. + enum JitCompile { + DEFAULT = 0; + ON = 1; + OFF = 2; + } + JitCompile jit_compile = 6; + + reserved 3, 4; +} + +// A SavedResource represents a TF object that holds state during its lifetime. +// An object of this type can have a reference to a: +// create_resource() and an initialize() function. +message SavedResource { + // A device specification indicating a required placement for the resource + // creation function, e.g. "CPU". An empty string allows the user to select a + // device. + string device = 1; +} + +message SaveableObject { + // Node ids of concrete functions for saving and loading from a checkpoint. + // These functions save and restore directly from tensors. + int32 save_function = 2; + int32 restore_function = 3; +} diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/saver.pb.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/saver.pb.h new file mode 100644 index 0000000000000000000000000000000000000000..01bd4c55ef6888fcf90dc509e8dc693e36340283 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/saver.pb.h @@ -0,0 +1,607 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/saver.proto + +#ifndef GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprotobuf_2fsaver_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprotobuf_2fsaver_2eproto + +#include +#include + +#include +#if PROTOBUF_VERSION < 3021000 +#error This file was generated by a newer version of protoc which is +#error incompatible with your Protocol Buffer headers. Please update +#error your headers. +#endif +#if 3021009 < PROTOBUF_MIN_PROTOC_VERSION +#error This file was generated by an older version of protoc which is +#error incompatible with your Protocol Buffer headers. Please +#error regenerate this file with a newer version of protoc. +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include // IWYU pragma: export +#include // IWYU pragma: export +#include +#include +// @@protoc_insertion_point(includes) +#include +#define PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2fprotobuf_2fsaver_2eproto +PROTOBUF_NAMESPACE_OPEN +namespace internal { +class AnyMetadata; +} // namespace internal +PROTOBUF_NAMESPACE_CLOSE + +// Internal implementation detail -- do not use these members. +struct TableStruct_tensorflow_2fcore_2fprotobuf_2fsaver_2eproto { + static const uint32_t offsets[]; +}; +extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_tensorflow_2fcore_2fprotobuf_2fsaver_2eproto; +namespace tensorflow { +class SaverDef; +struct SaverDefDefaultTypeInternal; +extern SaverDefDefaultTypeInternal _SaverDef_default_instance_; +} // namespace tensorflow +PROTOBUF_NAMESPACE_OPEN +template<> ::tensorflow::SaverDef* Arena::CreateMaybeMessage<::tensorflow::SaverDef>(Arena*); +PROTOBUF_NAMESPACE_CLOSE +namespace tensorflow { + +enum SaverDef_CheckpointFormatVersion : int { + SaverDef_CheckpointFormatVersion_LEGACY = 0, + SaverDef_CheckpointFormatVersion_V1 = 1, + SaverDef_CheckpointFormatVersion_V2 = 2, + SaverDef_CheckpointFormatVersion_SaverDef_CheckpointFormatVersion_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits::min(), + SaverDef_CheckpointFormatVersion_SaverDef_CheckpointFormatVersion_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits::max() +}; +bool SaverDef_CheckpointFormatVersion_IsValid(int value); +constexpr SaverDef_CheckpointFormatVersion SaverDef_CheckpointFormatVersion_CheckpointFormatVersion_MIN = SaverDef_CheckpointFormatVersion_LEGACY; +constexpr SaverDef_CheckpointFormatVersion SaverDef_CheckpointFormatVersion_CheckpointFormatVersion_MAX = SaverDef_CheckpointFormatVersion_V2; +constexpr int SaverDef_CheckpointFormatVersion_CheckpointFormatVersion_ARRAYSIZE = SaverDef_CheckpointFormatVersion_CheckpointFormatVersion_MAX + 1; + +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* SaverDef_CheckpointFormatVersion_descriptor(); +template +inline const std::string& SaverDef_CheckpointFormatVersion_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function SaverDef_CheckpointFormatVersion_Name."); + return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( + SaverDef_CheckpointFormatVersion_descriptor(), enum_t_value); +} +inline bool SaverDef_CheckpointFormatVersion_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, SaverDef_CheckpointFormatVersion* value) { + return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( + SaverDef_CheckpointFormatVersion_descriptor(), name, value); +} +// =================================================================== + +class SaverDef final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.SaverDef) */ { + public: + inline SaverDef() : SaverDef(nullptr) {} + ~SaverDef() override; + explicit PROTOBUF_CONSTEXPR SaverDef(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + SaverDef(const SaverDef& from); + SaverDef(SaverDef&& from) noexcept + : SaverDef() { + *this = ::std::move(from); + } + + inline SaverDef& operator=(const SaverDef& from) { + CopyFrom(from); + return *this; + } + inline SaverDef& operator=(SaverDef&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const SaverDef& default_instance() { + return *internal_default_instance(); + } + static inline const SaverDef* internal_default_instance() { + return reinterpret_cast( + &_SaverDef_default_instance_); + } + static constexpr int kIndexInFileMessages = + 0; + + friend void swap(SaverDef& a, SaverDef& b) { + a.Swap(&b); + } + inline void Swap(SaverDef* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(SaverDef* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + SaverDef* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const SaverDef& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const SaverDef& from) { + SaverDef::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(SaverDef* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.SaverDef"; + } + protected: + explicit SaverDef(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + typedef SaverDef_CheckpointFormatVersion CheckpointFormatVersion; + static constexpr CheckpointFormatVersion LEGACY = + SaverDef_CheckpointFormatVersion_LEGACY; + static constexpr CheckpointFormatVersion V1 = + SaverDef_CheckpointFormatVersion_V1; + static constexpr CheckpointFormatVersion V2 = + SaverDef_CheckpointFormatVersion_V2; + static inline bool CheckpointFormatVersion_IsValid(int value) { + return SaverDef_CheckpointFormatVersion_IsValid(value); + } + static constexpr CheckpointFormatVersion CheckpointFormatVersion_MIN = + SaverDef_CheckpointFormatVersion_CheckpointFormatVersion_MIN; + static constexpr CheckpointFormatVersion CheckpointFormatVersion_MAX = + SaverDef_CheckpointFormatVersion_CheckpointFormatVersion_MAX; + static constexpr int CheckpointFormatVersion_ARRAYSIZE = + SaverDef_CheckpointFormatVersion_CheckpointFormatVersion_ARRAYSIZE; + static inline const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* + CheckpointFormatVersion_descriptor() { + return SaverDef_CheckpointFormatVersion_descriptor(); + } + template + static inline const std::string& CheckpointFormatVersion_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function CheckpointFormatVersion_Name."); + return SaverDef_CheckpointFormatVersion_Name(enum_t_value); + } + static inline bool CheckpointFormatVersion_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name, + CheckpointFormatVersion* value) { + return SaverDef_CheckpointFormatVersion_Parse(name, value); + } + + // accessors ------------------------------------------------------- + + enum : int { + kFilenameTensorNameFieldNumber = 1, + kSaveTensorNameFieldNumber = 2, + kRestoreOpNameFieldNumber = 3, + kMaxToKeepFieldNumber = 4, + kShardedFieldNumber = 5, + kKeepCheckpointEveryNHoursFieldNumber = 6, + kVersionFieldNumber = 7, + }; + // string filename_tensor_name = 1; + void clear_filename_tensor_name(); + const std::string& filename_tensor_name() const; + template + void set_filename_tensor_name(ArgT0&& arg0, ArgT... args); + std::string* mutable_filename_tensor_name(); + PROTOBUF_NODISCARD std::string* release_filename_tensor_name(); + void set_allocated_filename_tensor_name(std::string* filename_tensor_name); + private: + const std::string& _internal_filename_tensor_name() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_filename_tensor_name(const std::string& value); + std::string* _internal_mutable_filename_tensor_name(); + public: + + // string save_tensor_name = 2; + void clear_save_tensor_name(); + const std::string& save_tensor_name() const; + template + void set_save_tensor_name(ArgT0&& arg0, ArgT... args); + std::string* mutable_save_tensor_name(); + PROTOBUF_NODISCARD std::string* release_save_tensor_name(); + void set_allocated_save_tensor_name(std::string* save_tensor_name); + private: + const std::string& _internal_save_tensor_name() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_save_tensor_name(const std::string& value); + std::string* _internal_mutable_save_tensor_name(); + public: + + // string restore_op_name = 3; + void clear_restore_op_name(); + const std::string& restore_op_name() const; + template + void set_restore_op_name(ArgT0&& arg0, ArgT... args); + std::string* mutable_restore_op_name(); + PROTOBUF_NODISCARD std::string* release_restore_op_name(); + void set_allocated_restore_op_name(std::string* restore_op_name); + private: + const std::string& _internal_restore_op_name() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_restore_op_name(const std::string& value); + std::string* _internal_mutable_restore_op_name(); + public: + + // int32 max_to_keep = 4; + void clear_max_to_keep(); + int32_t max_to_keep() const; + void set_max_to_keep(int32_t value); + private: + int32_t _internal_max_to_keep() const; + void _internal_set_max_to_keep(int32_t value); + public: + + // bool sharded = 5; + void clear_sharded(); + bool sharded() const; + void set_sharded(bool value); + private: + bool _internal_sharded() const; + void _internal_set_sharded(bool value); + public: + + // float keep_checkpoint_every_n_hours = 6; + void clear_keep_checkpoint_every_n_hours(); + float keep_checkpoint_every_n_hours() const; + void set_keep_checkpoint_every_n_hours(float value); + private: + float _internal_keep_checkpoint_every_n_hours() const; + void _internal_set_keep_checkpoint_every_n_hours(float value); + public: + + // .tensorflow.SaverDef.CheckpointFormatVersion version = 7; + void clear_version(); + ::tensorflow::SaverDef_CheckpointFormatVersion version() const; + void set_version(::tensorflow::SaverDef_CheckpointFormatVersion value); + private: + ::tensorflow::SaverDef_CheckpointFormatVersion _internal_version() const; + void _internal_set_version(::tensorflow::SaverDef_CheckpointFormatVersion value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.SaverDef) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr filename_tensor_name_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr save_tensor_name_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr restore_op_name_; + int32_t max_to_keep_; + bool sharded_; + float keep_checkpoint_every_n_hours_; + int version_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fsaver_2eproto; +}; +// =================================================================== + + +// =================================================================== + +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// SaverDef + +// string filename_tensor_name = 1; +inline void SaverDef::clear_filename_tensor_name() { + _impl_.filename_tensor_name_.ClearToEmpty(); +} +inline const std::string& SaverDef::filename_tensor_name() const { + // @@protoc_insertion_point(field_get:tensorflow.SaverDef.filename_tensor_name) + return _internal_filename_tensor_name(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void SaverDef::set_filename_tensor_name(ArgT0&& arg0, ArgT... args) { + + _impl_.filename_tensor_name_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.SaverDef.filename_tensor_name) +} +inline std::string* SaverDef::mutable_filename_tensor_name() { + std::string* _s = _internal_mutable_filename_tensor_name(); + // @@protoc_insertion_point(field_mutable:tensorflow.SaverDef.filename_tensor_name) + return _s; +} +inline const std::string& SaverDef::_internal_filename_tensor_name() const { + return _impl_.filename_tensor_name_.Get(); +} +inline void SaverDef::_internal_set_filename_tensor_name(const std::string& value) { + + _impl_.filename_tensor_name_.Set(value, GetArenaForAllocation()); +} +inline std::string* SaverDef::_internal_mutable_filename_tensor_name() { + + return _impl_.filename_tensor_name_.Mutable(GetArenaForAllocation()); +} +inline std::string* SaverDef::release_filename_tensor_name() { + // @@protoc_insertion_point(field_release:tensorflow.SaverDef.filename_tensor_name) + return _impl_.filename_tensor_name_.Release(); +} +inline void SaverDef::set_allocated_filename_tensor_name(std::string* filename_tensor_name) { + if (filename_tensor_name != nullptr) { + + } else { + + } + _impl_.filename_tensor_name_.SetAllocated(filename_tensor_name, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.filename_tensor_name_.IsDefault()) { + _impl_.filename_tensor_name_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.SaverDef.filename_tensor_name) +} + +// string save_tensor_name = 2; +inline void SaverDef::clear_save_tensor_name() { + _impl_.save_tensor_name_.ClearToEmpty(); +} +inline const std::string& SaverDef::save_tensor_name() const { + // @@protoc_insertion_point(field_get:tensorflow.SaverDef.save_tensor_name) + return _internal_save_tensor_name(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void SaverDef::set_save_tensor_name(ArgT0&& arg0, ArgT... args) { + + _impl_.save_tensor_name_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.SaverDef.save_tensor_name) +} +inline std::string* SaverDef::mutable_save_tensor_name() { + std::string* _s = _internal_mutable_save_tensor_name(); + // @@protoc_insertion_point(field_mutable:tensorflow.SaverDef.save_tensor_name) + return _s; +} +inline const std::string& SaverDef::_internal_save_tensor_name() const { + return _impl_.save_tensor_name_.Get(); +} +inline void SaverDef::_internal_set_save_tensor_name(const std::string& value) { + + _impl_.save_tensor_name_.Set(value, GetArenaForAllocation()); +} +inline std::string* SaverDef::_internal_mutable_save_tensor_name() { + + return _impl_.save_tensor_name_.Mutable(GetArenaForAllocation()); +} +inline std::string* SaverDef::release_save_tensor_name() { + // @@protoc_insertion_point(field_release:tensorflow.SaverDef.save_tensor_name) + return _impl_.save_tensor_name_.Release(); +} +inline void SaverDef::set_allocated_save_tensor_name(std::string* save_tensor_name) { + if (save_tensor_name != nullptr) { + + } else { + + } + _impl_.save_tensor_name_.SetAllocated(save_tensor_name, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.save_tensor_name_.IsDefault()) { + _impl_.save_tensor_name_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.SaverDef.save_tensor_name) +} + +// string restore_op_name = 3; +inline void SaverDef::clear_restore_op_name() { + _impl_.restore_op_name_.ClearToEmpty(); +} +inline const std::string& SaverDef::restore_op_name() const { + // @@protoc_insertion_point(field_get:tensorflow.SaverDef.restore_op_name) + return _internal_restore_op_name(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void SaverDef::set_restore_op_name(ArgT0&& arg0, ArgT... args) { + + _impl_.restore_op_name_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.SaverDef.restore_op_name) +} +inline std::string* SaverDef::mutable_restore_op_name() { + std::string* _s = _internal_mutable_restore_op_name(); + // @@protoc_insertion_point(field_mutable:tensorflow.SaverDef.restore_op_name) + return _s; +} +inline const std::string& SaverDef::_internal_restore_op_name() const { + return _impl_.restore_op_name_.Get(); +} +inline void SaverDef::_internal_set_restore_op_name(const std::string& value) { + + _impl_.restore_op_name_.Set(value, GetArenaForAllocation()); +} +inline std::string* SaverDef::_internal_mutable_restore_op_name() { + + return _impl_.restore_op_name_.Mutable(GetArenaForAllocation()); +} +inline std::string* SaverDef::release_restore_op_name() { + // @@protoc_insertion_point(field_release:tensorflow.SaverDef.restore_op_name) + return _impl_.restore_op_name_.Release(); +} +inline void SaverDef::set_allocated_restore_op_name(std::string* restore_op_name) { + if (restore_op_name != nullptr) { + + } else { + + } + _impl_.restore_op_name_.SetAllocated(restore_op_name, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.restore_op_name_.IsDefault()) { + _impl_.restore_op_name_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.SaverDef.restore_op_name) +} + +// int32 max_to_keep = 4; +inline void SaverDef::clear_max_to_keep() { + _impl_.max_to_keep_ = 0; +} +inline int32_t SaverDef::_internal_max_to_keep() const { + return _impl_.max_to_keep_; +} +inline int32_t SaverDef::max_to_keep() const { + // @@protoc_insertion_point(field_get:tensorflow.SaverDef.max_to_keep) + return _internal_max_to_keep(); +} +inline void SaverDef::_internal_set_max_to_keep(int32_t value) { + + _impl_.max_to_keep_ = value; +} +inline void SaverDef::set_max_to_keep(int32_t value) { + _internal_set_max_to_keep(value); + // @@protoc_insertion_point(field_set:tensorflow.SaverDef.max_to_keep) +} + +// bool sharded = 5; +inline void SaverDef::clear_sharded() { + _impl_.sharded_ = false; +} +inline bool SaverDef::_internal_sharded() const { + return _impl_.sharded_; +} +inline bool SaverDef::sharded() const { + // @@protoc_insertion_point(field_get:tensorflow.SaverDef.sharded) + return _internal_sharded(); +} +inline void SaverDef::_internal_set_sharded(bool value) { + + _impl_.sharded_ = value; +} +inline void SaverDef::set_sharded(bool value) { + _internal_set_sharded(value); + // @@protoc_insertion_point(field_set:tensorflow.SaverDef.sharded) +} + +// float keep_checkpoint_every_n_hours = 6; +inline void SaverDef::clear_keep_checkpoint_every_n_hours() { + _impl_.keep_checkpoint_every_n_hours_ = 0; +} +inline float SaverDef::_internal_keep_checkpoint_every_n_hours() const { + return _impl_.keep_checkpoint_every_n_hours_; +} +inline float SaverDef::keep_checkpoint_every_n_hours() const { + // @@protoc_insertion_point(field_get:tensorflow.SaverDef.keep_checkpoint_every_n_hours) + return _internal_keep_checkpoint_every_n_hours(); +} +inline void SaverDef::_internal_set_keep_checkpoint_every_n_hours(float value) { + + _impl_.keep_checkpoint_every_n_hours_ = value; +} +inline void SaverDef::set_keep_checkpoint_every_n_hours(float value) { + _internal_set_keep_checkpoint_every_n_hours(value); + // @@protoc_insertion_point(field_set:tensorflow.SaverDef.keep_checkpoint_every_n_hours) +} + +// .tensorflow.SaverDef.CheckpointFormatVersion version = 7; +inline void SaverDef::clear_version() { + _impl_.version_ = 0; +} +inline ::tensorflow::SaverDef_CheckpointFormatVersion SaverDef::_internal_version() const { + return static_cast< ::tensorflow::SaverDef_CheckpointFormatVersion >(_impl_.version_); +} +inline ::tensorflow::SaverDef_CheckpointFormatVersion SaverDef::version() const { + // @@protoc_insertion_point(field_get:tensorflow.SaverDef.version) + return _internal_version(); +} +inline void SaverDef::_internal_set_version(::tensorflow::SaverDef_CheckpointFormatVersion value) { + + _impl_.version_ = value; +} +inline void SaverDef::set_version(::tensorflow::SaverDef_CheckpointFormatVersion value) { + _internal_set_version(value); + // @@protoc_insertion_point(field_set:tensorflow.SaverDef.version) +} + +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ + +// @@protoc_insertion_point(namespace_scope) + +} // namespace tensorflow + +PROTOBUF_NAMESPACE_OPEN + +template <> struct is_proto_enum< ::tensorflow::SaverDef_CheckpointFormatVersion> : ::std::true_type {}; +template <> +inline const EnumDescriptor* GetEnumDescriptor< ::tensorflow::SaverDef_CheckpointFormatVersion>() { + return ::tensorflow::SaverDef_CheckpointFormatVersion_descriptor(); +} + +PROTOBUF_NAMESPACE_CLOSE + +// @@protoc_insertion_point(global_scope) + +#include +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprotobuf_2fsaver_2eproto diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/saver.proto b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/saver.proto new file mode 100644 index 0000000000000000000000000000000000000000..208468b2b2ca8c1e83e22544ce5e2e517d948e84 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/saver.proto @@ -0,0 +1,48 @@ +syntax = "proto3"; + +package tensorflow; + +option cc_enable_arenas = true; +option java_outer_classname = "SaverProtos"; +option java_multiple_files = true; +option java_package = "org.tensorflow.util"; +option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/protobuf/for_core_protos_go_proto"; + +// Protocol buffer representing the configuration of a Saver. +message SaverDef { + // The name of the tensor in which to specify the filename when saving or + // restoring a model checkpoint. + string filename_tensor_name = 1; + + // The operation to run when saving a model checkpoint. + string save_tensor_name = 2; + + // The operation to run when restoring a model checkpoint. + string restore_op_name = 3; + + // Maximum number of checkpoints to keep. If 0, no checkpoints are deleted. + int32 max_to_keep = 4; + + // Shard the save files, one per device that has Variable nodes. + bool sharded = 5; + + // How often to keep an additional checkpoint. If not specified, only the last + // "max_to_keep" checkpoints are kept; if specified, in addition to keeping + // the last "max_to_keep" checkpoints, an additional checkpoint will be kept + // for every n hours of training. + float keep_checkpoint_every_n_hours = 6; + + // A version number that identifies a different on-disk checkpoint format. + // Usually, each subclass of BaseSaverBuilder works with a particular + // version/format. However, it is possible that the same builder may be + // upgraded to support a newer checkpoint format in the future. + enum CheckpointFormatVersion { + // Internal legacy format. + LEGACY = 0; + // Deprecated format: tf.Saver() which works with tensorflow::table::Table. + V1 = 1; + // Current format: more efficient. + V2 = 2; + } + CheckpointFormatVersion version = 7; +} diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/service_config.pb.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/service_config.pb.h new file mode 100644 index 0000000000000000000000000000000000000000..79c4bb058a55c64a940f750c8764de4b100a4eb3 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/service_config.pb.h @@ -0,0 +1,1501 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/service_config.proto + +#ifndef GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprotobuf_2fservice_5fconfig_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprotobuf_2fservice_5fconfig_2eproto + +#include +#include + +#include +#if PROTOBUF_VERSION < 3021000 +#error This file was generated by a newer version of protoc which is +#error incompatible with your Protocol Buffer headers. Please update +#error your headers. +#endif +#if 3021009 < PROTOBUF_MIN_PROTOC_VERSION +#error This file was generated by an older version of protoc which is +#error incompatible with your Protocol Buffer headers. Please +#error regenerate this file with a newer version of protoc. +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include // IWYU pragma: export +#include // IWYU pragma: export +#include +#include "tensorflow/core/protobuf/data_service.pb.h" +// @@protoc_insertion_point(includes) +#include +#define PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2fprotobuf_2fservice_5fconfig_2eproto +PROTOBUF_NAMESPACE_OPEN +namespace internal { +class AnyMetadata; +} // namespace internal +PROTOBUF_NAMESPACE_CLOSE + +// Internal implementation detail -- do not use these members. +struct TableStruct_tensorflow_2fcore_2fprotobuf_2fservice_5fconfig_2eproto { + static const uint32_t offsets[]; +}; +extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_tensorflow_2fcore_2fprotobuf_2fservice_5fconfig_2eproto; +namespace tensorflow { +namespace data { +namespace experimental { +class DispatcherConfig; +struct DispatcherConfigDefaultTypeInternal; +extern DispatcherConfigDefaultTypeInternal _DispatcherConfig_default_instance_; +class WorkerConfig; +struct WorkerConfigDefaultTypeInternal; +extern WorkerConfigDefaultTypeInternal _WorkerConfig_default_instance_; +} // namespace experimental +} // namespace data +} // namespace tensorflow +PROTOBUF_NAMESPACE_OPEN +template<> ::tensorflow::data::experimental::DispatcherConfig* Arena::CreateMaybeMessage<::tensorflow::data::experimental::DispatcherConfig>(Arena*); +template<> ::tensorflow::data::experimental::WorkerConfig* Arena::CreateMaybeMessage<::tensorflow::data::experimental::WorkerConfig>(Arena*); +PROTOBUF_NAMESPACE_CLOSE +namespace tensorflow { +namespace data { +namespace experimental { + +// =================================================================== + +class DispatcherConfig final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.data.experimental.DispatcherConfig) */ { + public: + inline DispatcherConfig() : DispatcherConfig(nullptr) {} + ~DispatcherConfig() override; + explicit PROTOBUF_CONSTEXPR DispatcherConfig(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + DispatcherConfig(const DispatcherConfig& from); + DispatcherConfig(DispatcherConfig&& from) noexcept + : DispatcherConfig() { + *this = ::std::move(from); + } + + inline DispatcherConfig& operator=(const DispatcherConfig& from) { + CopyFrom(from); + return *this; + } + inline DispatcherConfig& operator=(DispatcherConfig&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const DispatcherConfig& default_instance() { + return *internal_default_instance(); + } + static inline const DispatcherConfig* internal_default_instance() { + return reinterpret_cast( + &_DispatcherConfig_default_instance_); + } + static constexpr int kIndexInFileMessages = + 0; + + friend void swap(DispatcherConfig& a, DispatcherConfig& b) { + a.Swap(&b); + } + inline void Swap(DispatcherConfig* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(DispatcherConfig* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + DispatcherConfig* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const DispatcherConfig& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const DispatcherConfig& from) { + DispatcherConfig::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(DispatcherConfig* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.data.experimental.DispatcherConfig"; + } + protected: + explicit DispatcherConfig(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kWorkerAddressesFieldNumber = 7, + kProtocolFieldNumber = 2, + kWorkDirFieldNumber = 3, + kPortFieldNumber = 1, + kJobGcCheckIntervalMsFieldNumber = 5, + kJobGcTimeoutMsFieldNumber = 6, + kClientTimeoutMsFieldNumber = 8, + kFaultTolerantModeFieldNumber = 4, + kGcDynamicShardingJobsFieldNumber = 11, + kDeploymentModeFieldNumber = 9, + kWorkerTimeoutMsFieldNumber = 10, + kWorkerMaxConcurrentSnapshotsFieldNumber = 12, + }; + // repeated string worker_addresses = 7; + int worker_addresses_size() const; + private: + int _internal_worker_addresses_size() const; + public: + void clear_worker_addresses(); + const std::string& worker_addresses(int index) const; + std::string* mutable_worker_addresses(int index); + void set_worker_addresses(int index, const std::string& value); + void set_worker_addresses(int index, std::string&& value); + void set_worker_addresses(int index, const char* value); + void set_worker_addresses(int index, const char* value, size_t size); + std::string* add_worker_addresses(); + void add_worker_addresses(const std::string& value); + void add_worker_addresses(std::string&& value); + void add_worker_addresses(const char* value); + void add_worker_addresses(const char* value, size_t size); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& worker_addresses() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* mutable_worker_addresses(); + private: + const std::string& _internal_worker_addresses(int index) const; + std::string* _internal_add_worker_addresses(); + public: + + // string protocol = 2; + void clear_protocol(); + const std::string& protocol() const; + template + void set_protocol(ArgT0&& arg0, ArgT... args); + std::string* mutable_protocol(); + PROTOBUF_NODISCARD std::string* release_protocol(); + void set_allocated_protocol(std::string* protocol); + private: + const std::string& _internal_protocol() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_protocol(const std::string& value); + std::string* _internal_mutable_protocol(); + public: + + // string work_dir = 3; + void clear_work_dir(); + const std::string& work_dir() const; + template + void set_work_dir(ArgT0&& arg0, ArgT... args); + std::string* mutable_work_dir(); + PROTOBUF_NODISCARD std::string* release_work_dir(); + void set_allocated_work_dir(std::string* work_dir); + private: + const std::string& _internal_work_dir() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_work_dir(const std::string& value); + std::string* _internal_mutable_work_dir(); + public: + + // int64 port = 1; + void clear_port(); + int64_t port() const; + void set_port(int64_t value); + private: + int64_t _internal_port() const; + void _internal_set_port(int64_t value); + public: + + // int64 job_gc_check_interval_ms = 5; + void clear_job_gc_check_interval_ms(); + int64_t job_gc_check_interval_ms() const; + void set_job_gc_check_interval_ms(int64_t value); + private: + int64_t _internal_job_gc_check_interval_ms() const; + void _internal_set_job_gc_check_interval_ms(int64_t value); + public: + + // int64 job_gc_timeout_ms = 6; + void clear_job_gc_timeout_ms(); + int64_t job_gc_timeout_ms() const; + void set_job_gc_timeout_ms(int64_t value); + private: + int64_t _internal_job_gc_timeout_ms() const; + void _internal_set_job_gc_timeout_ms(int64_t value); + public: + + // int64 client_timeout_ms = 8; + void clear_client_timeout_ms(); + int64_t client_timeout_ms() const; + void set_client_timeout_ms(int64_t value); + private: + int64_t _internal_client_timeout_ms() const; + void _internal_set_client_timeout_ms(int64_t value); + public: + + // bool fault_tolerant_mode = 4; + void clear_fault_tolerant_mode(); + bool fault_tolerant_mode() const; + void set_fault_tolerant_mode(bool value); + private: + bool _internal_fault_tolerant_mode() const; + void _internal_set_fault_tolerant_mode(bool value); + public: + + // bool gc_dynamic_sharding_jobs = 11; + void clear_gc_dynamic_sharding_jobs(); + bool gc_dynamic_sharding_jobs() const; + void set_gc_dynamic_sharding_jobs(bool value); + private: + bool _internal_gc_dynamic_sharding_jobs() const; + void _internal_set_gc_dynamic_sharding_jobs(bool value); + public: + + // .tensorflow.data.DeploymentMode deployment_mode = 9; + void clear_deployment_mode(); + ::tensorflow::data::DeploymentMode deployment_mode() const; + void set_deployment_mode(::tensorflow::data::DeploymentMode value); + private: + ::tensorflow::data::DeploymentMode _internal_deployment_mode() const; + void _internal_set_deployment_mode(::tensorflow::data::DeploymentMode value); + public: + + // int64 worker_timeout_ms = 10; + void clear_worker_timeout_ms(); + int64_t worker_timeout_ms() const; + void set_worker_timeout_ms(int64_t value); + private: + int64_t _internal_worker_timeout_ms() const; + void _internal_set_worker_timeout_ms(int64_t value); + public: + + // int64 worker_max_concurrent_snapshots = 12; + void clear_worker_max_concurrent_snapshots(); + int64_t worker_max_concurrent_snapshots() const; + void set_worker_max_concurrent_snapshots(int64_t value); + private: + int64_t _internal_worker_max_concurrent_snapshots() const; + void _internal_set_worker_max_concurrent_snapshots(int64_t value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.data.experimental.DispatcherConfig) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField worker_addresses_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr protocol_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr work_dir_; + int64_t port_; + int64_t job_gc_check_interval_ms_; + int64_t job_gc_timeout_ms_; + int64_t client_timeout_ms_; + bool fault_tolerant_mode_; + bool gc_dynamic_sharding_jobs_; + int deployment_mode_; + int64_t worker_timeout_ms_; + int64_t worker_max_concurrent_snapshots_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fservice_5fconfig_2eproto; +}; +// ------------------------------------------------------------------- + +class WorkerConfig final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.data.experimental.WorkerConfig) */ { + public: + inline WorkerConfig() : WorkerConfig(nullptr) {} + ~WorkerConfig() override; + explicit PROTOBUF_CONSTEXPR WorkerConfig(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + WorkerConfig(const WorkerConfig& from); + WorkerConfig(WorkerConfig&& from) noexcept + : WorkerConfig() { + *this = ::std::move(from); + } + + inline WorkerConfig& operator=(const WorkerConfig& from) { + CopyFrom(from); + return *this; + } + inline WorkerConfig& operator=(WorkerConfig&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const WorkerConfig& default_instance() { + return *internal_default_instance(); + } + static inline const WorkerConfig* internal_default_instance() { + return reinterpret_cast( + &_WorkerConfig_default_instance_); + } + static constexpr int kIndexInFileMessages = + 1; + + friend void swap(WorkerConfig& a, WorkerConfig& b) { + a.Swap(&b); + } + inline void Swap(WorkerConfig* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(WorkerConfig* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + WorkerConfig* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const WorkerConfig& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const WorkerConfig& from) { + WorkerConfig::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(WorkerConfig* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.data.experimental.WorkerConfig"; + } + protected: + explicit WorkerConfig(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kWorkerTagsFieldNumber = 10, + kProtocolFieldNumber = 2, + kDispatcherAddressFieldNumber = 3, + kWorkerAddressFieldNumber = 4, + kDataTransferProtocolFieldNumber = 7, + kDataTransferAddressFieldNumber = 8, + kPortFieldNumber = 1, + kHeartbeatIntervalMsFieldNumber = 5, + kDispatcherTimeoutMsFieldNumber = 6, + kShutdownQuietPeriodMsFieldNumber = 9, + kCrossTrainerCacheSizeBytesFieldNumber = 11, + kSnapshotMaxChunkSizeBytesFieldNumber = 12, + }; + // repeated string worker_tags = 10; + int worker_tags_size() const; + private: + int _internal_worker_tags_size() const; + public: + void clear_worker_tags(); + const std::string& worker_tags(int index) const; + std::string* mutable_worker_tags(int index); + void set_worker_tags(int index, const std::string& value); + void set_worker_tags(int index, std::string&& value); + void set_worker_tags(int index, const char* value); + void set_worker_tags(int index, const char* value, size_t size); + std::string* add_worker_tags(); + void add_worker_tags(const std::string& value); + void add_worker_tags(std::string&& value); + void add_worker_tags(const char* value); + void add_worker_tags(const char* value, size_t size); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& worker_tags() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* mutable_worker_tags(); + private: + const std::string& _internal_worker_tags(int index) const; + std::string* _internal_add_worker_tags(); + public: + + // string protocol = 2; + void clear_protocol(); + const std::string& protocol() const; + template + void set_protocol(ArgT0&& arg0, ArgT... args); + std::string* mutable_protocol(); + PROTOBUF_NODISCARD std::string* release_protocol(); + void set_allocated_protocol(std::string* protocol); + private: + const std::string& _internal_protocol() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_protocol(const std::string& value); + std::string* _internal_mutable_protocol(); + public: + + // string dispatcher_address = 3; + void clear_dispatcher_address(); + const std::string& dispatcher_address() const; + template + void set_dispatcher_address(ArgT0&& arg0, ArgT... args); + std::string* mutable_dispatcher_address(); + PROTOBUF_NODISCARD std::string* release_dispatcher_address(); + void set_allocated_dispatcher_address(std::string* dispatcher_address); + private: + const std::string& _internal_dispatcher_address() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_dispatcher_address(const std::string& value); + std::string* _internal_mutable_dispatcher_address(); + public: + + // string worker_address = 4; + void clear_worker_address(); + const std::string& worker_address() const; + template + void set_worker_address(ArgT0&& arg0, ArgT... args); + std::string* mutable_worker_address(); + PROTOBUF_NODISCARD std::string* release_worker_address(); + void set_allocated_worker_address(std::string* worker_address); + private: + const std::string& _internal_worker_address() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_worker_address(const std::string& value); + std::string* _internal_mutable_worker_address(); + public: + + // string data_transfer_protocol = 7; + void clear_data_transfer_protocol(); + const std::string& data_transfer_protocol() const; + template + void set_data_transfer_protocol(ArgT0&& arg0, ArgT... args); + std::string* mutable_data_transfer_protocol(); + PROTOBUF_NODISCARD std::string* release_data_transfer_protocol(); + void set_allocated_data_transfer_protocol(std::string* data_transfer_protocol); + private: + const std::string& _internal_data_transfer_protocol() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_data_transfer_protocol(const std::string& value); + std::string* _internal_mutable_data_transfer_protocol(); + public: + + // string data_transfer_address = 8; + void clear_data_transfer_address(); + const std::string& data_transfer_address() const; + template + void set_data_transfer_address(ArgT0&& arg0, ArgT... args); + std::string* mutable_data_transfer_address(); + PROTOBUF_NODISCARD std::string* release_data_transfer_address(); + void set_allocated_data_transfer_address(std::string* data_transfer_address); + private: + const std::string& _internal_data_transfer_address() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_data_transfer_address(const std::string& value); + std::string* _internal_mutable_data_transfer_address(); + public: + + // int64 port = 1; + void clear_port(); + int64_t port() const; + void set_port(int64_t value); + private: + int64_t _internal_port() const; + void _internal_set_port(int64_t value); + public: + + // int64 heartbeat_interval_ms = 5; + void clear_heartbeat_interval_ms(); + int64_t heartbeat_interval_ms() const; + void set_heartbeat_interval_ms(int64_t value); + private: + int64_t _internal_heartbeat_interval_ms() const; + void _internal_set_heartbeat_interval_ms(int64_t value); + public: + + // int64 dispatcher_timeout_ms = 6; + void clear_dispatcher_timeout_ms(); + int64_t dispatcher_timeout_ms() const; + void set_dispatcher_timeout_ms(int64_t value); + private: + int64_t _internal_dispatcher_timeout_ms() const; + void _internal_set_dispatcher_timeout_ms(int64_t value); + public: + + // int64 shutdown_quiet_period_ms = 9; + void clear_shutdown_quiet_period_ms(); + int64_t shutdown_quiet_period_ms() const; + void set_shutdown_quiet_period_ms(int64_t value); + private: + int64_t _internal_shutdown_quiet_period_ms() const; + void _internal_set_shutdown_quiet_period_ms(int64_t value); + public: + + // int64 cross_trainer_cache_size_bytes = 11; + void clear_cross_trainer_cache_size_bytes(); + int64_t cross_trainer_cache_size_bytes() const; + void set_cross_trainer_cache_size_bytes(int64_t value); + private: + int64_t _internal_cross_trainer_cache_size_bytes() const; + void _internal_set_cross_trainer_cache_size_bytes(int64_t value); + public: + + // int64 snapshot_max_chunk_size_bytes = 12; + void clear_snapshot_max_chunk_size_bytes(); + int64_t snapshot_max_chunk_size_bytes() const; + void set_snapshot_max_chunk_size_bytes(int64_t value); + private: + int64_t _internal_snapshot_max_chunk_size_bytes() const; + void _internal_set_snapshot_max_chunk_size_bytes(int64_t value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.data.experimental.WorkerConfig) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField worker_tags_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr protocol_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr dispatcher_address_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr worker_address_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr data_transfer_protocol_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr data_transfer_address_; + int64_t port_; + int64_t heartbeat_interval_ms_; + int64_t dispatcher_timeout_ms_; + int64_t shutdown_quiet_period_ms_; + int64_t cross_trainer_cache_size_bytes_; + int64_t snapshot_max_chunk_size_bytes_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fservice_5fconfig_2eproto; +}; +// =================================================================== + + +// =================================================================== + +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// DispatcherConfig + +// int64 port = 1; +inline void DispatcherConfig::clear_port() { + _impl_.port_ = int64_t{0}; +} +inline int64_t DispatcherConfig::_internal_port() const { + return _impl_.port_; +} +inline int64_t DispatcherConfig::port() const { + // @@protoc_insertion_point(field_get:tensorflow.data.experimental.DispatcherConfig.port) + return _internal_port(); +} +inline void DispatcherConfig::_internal_set_port(int64_t value) { + + _impl_.port_ = value; +} +inline void DispatcherConfig::set_port(int64_t value) { + _internal_set_port(value); + // @@protoc_insertion_point(field_set:tensorflow.data.experimental.DispatcherConfig.port) +} + +// string protocol = 2; +inline void DispatcherConfig::clear_protocol() { + _impl_.protocol_.ClearToEmpty(); +} +inline const std::string& DispatcherConfig::protocol() const { + // @@protoc_insertion_point(field_get:tensorflow.data.experimental.DispatcherConfig.protocol) + return _internal_protocol(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void DispatcherConfig::set_protocol(ArgT0&& arg0, ArgT... args) { + + _impl_.protocol_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.data.experimental.DispatcherConfig.protocol) +} +inline std::string* DispatcherConfig::mutable_protocol() { + std::string* _s = _internal_mutable_protocol(); + // @@protoc_insertion_point(field_mutable:tensorflow.data.experimental.DispatcherConfig.protocol) + return _s; +} +inline const std::string& DispatcherConfig::_internal_protocol() const { + return _impl_.protocol_.Get(); +} +inline void DispatcherConfig::_internal_set_protocol(const std::string& value) { + + _impl_.protocol_.Set(value, GetArenaForAllocation()); +} +inline std::string* DispatcherConfig::_internal_mutable_protocol() { + + return _impl_.protocol_.Mutable(GetArenaForAllocation()); +} +inline std::string* DispatcherConfig::release_protocol() { + // @@protoc_insertion_point(field_release:tensorflow.data.experimental.DispatcherConfig.protocol) + return _impl_.protocol_.Release(); +} +inline void DispatcherConfig::set_allocated_protocol(std::string* protocol) { + if (protocol != nullptr) { + + } else { + + } + _impl_.protocol_.SetAllocated(protocol, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.protocol_.IsDefault()) { + _impl_.protocol_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.data.experimental.DispatcherConfig.protocol) +} + +// string work_dir = 3; +inline void DispatcherConfig::clear_work_dir() { + _impl_.work_dir_.ClearToEmpty(); +} +inline const std::string& DispatcherConfig::work_dir() const { + // @@protoc_insertion_point(field_get:tensorflow.data.experimental.DispatcherConfig.work_dir) + return _internal_work_dir(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void DispatcherConfig::set_work_dir(ArgT0&& arg0, ArgT... args) { + + _impl_.work_dir_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.data.experimental.DispatcherConfig.work_dir) +} +inline std::string* DispatcherConfig::mutable_work_dir() { + std::string* _s = _internal_mutable_work_dir(); + // @@protoc_insertion_point(field_mutable:tensorflow.data.experimental.DispatcherConfig.work_dir) + return _s; +} +inline const std::string& DispatcherConfig::_internal_work_dir() const { + return _impl_.work_dir_.Get(); +} +inline void DispatcherConfig::_internal_set_work_dir(const std::string& value) { + + _impl_.work_dir_.Set(value, GetArenaForAllocation()); +} +inline std::string* DispatcherConfig::_internal_mutable_work_dir() { + + return _impl_.work_dir_.Mutable(GetArenaForAllocation()); +} +inline std::string* DispatcherConfig::release_work_dir() { + // @@protoc_insertion_point(field_release:tensorflow.data.experimental.DispatcherConfig.work_dir) + return _impl_.work_dir_.Release(); +} +inline void DispatcherConfig::set_allocated_work_dir(std::string* work_dir) { + if (work_dir != nullptr) { + + } else { + + } + _impl_.work_dir_.SetAllocated(work_dir, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.work_dir_.IsDefault()) { + _impl_.work_dir_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.data.experimental.DispatcherConfig.work_dir) +} + +// bool fault_tolerant_mode = 4; +inline void DispatcherConfig::clear_fault_tolerant_mode() { + _impl_.fault_tolerant_mode_ = false; +} +inline bool DispatcherConfig::_internal_fault_tolerant_mode() const { + return _impl_.fault_tolerant_mode_; +} +inline bool DispatcherConfig::fault_tolerant_mode() const { + // @@protoc_insertion_point(field_get:tensorflow.data.experimental.DispatcherConfig.fault_tolerant_mode) + return _internal_fault_tolerant_mode(); +} +inline void DispatcherConfig::_internal_set_fault_tolerant_mode(bool value) { + + _impl_.fault_tolerant_mode_ = value; +} +inline void DispatcherConfig::set_fault_tolerant_mode(bool value) { + _internal_set_fault_tolerant_mode(value); + // @@protoc_insertion_point(field_set:tensorflow.data.experimental.DispatcherConfig.fault_tolerant_mode) +} + +// repeated string worker_addresses = 7; +inline int DispatcherConfig::_internal_worker_addresses_size() const { + return _impl_.worker_addresses_.size(); +} +inline int DispatcherConfig::worker_addresses_size() const { + return _internal_worker_addresses_size(); +} +inline void DispatcherConfig::clear_worker_addresses() { + _impl_.worker_addresses_.Clear(); +} +inline std::string* DispatcherConfig::add_worker_addresses() { + std::string* _s = _internal_add_worker_addresses(); + // @@protoc_insertion_point(field_add_mutable:tensorflow.data.experimental.DispatcherConfig.worker_addresses) + return _s; +} +inline const std::string& DispatcherConfig::_internal_worker_addresses(int index) const { + return _impl_.worker_addresses_.Get(index); +} +inline const std::string& DispatcherConfig::worker_addresses(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.data.experimental.DispatcherConfig.worker_addresses) + return _internal_worker_addresses(index); +} +inline std::string* DispatcherConfig::mutable_worker_addresses(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.data.experimental.DispatcherConfig.worker_addresses) + return _impl_.worker_addresses_.Mutable(index); +} +inline void DispatcherConfig::set_worker_addresses(int index, const std::string& value) { + _impl_.worker_addresses_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set:tensorflow.data.experimental.DispatcherConfig.worker_addresses) +} +inline void DispatcherConfig::set_worker_addresses(int index, std::string&& value) { + _impl_.worker_addresses_.Mutable(index)->assign(std::move(value)); + // @@protoc_insertion_point(field_set:tensorflow.data.experimental.DispatcherConfig.worker_addresses) +} +inline void DispatcherConfig::set_worker_addresses(int index, const char* value) { + GOOGLE_DCHECK(value != nullptr); + _impl_.worker_addresses_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set_char:tensorflow.data.experimental.DispatcherConfig.worker_addresses) +} +inline void DispatcherConfig::set_worker_addresses(int index, const char* value, size_t size) { + _impl_.worker_addresses_.Mutable(index)->assign( + reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:tensorflow.data.experimental.DispatcherConfig.worker_addresses) +} +inline std::string* DispatcherConfig::_internal_add_worker_addresses() { + return _impl_.worker_addresses_.Add(); +} +inline void DispatcherConfig::add_worker_addresses(const std::string& value) { + _impl_.worker_addresses_.Add()->assign(value); + // @@protoc_insertion_point(field_add:tensorflow.data.experimental.DispatcherConfig.worker_addresses) +} +inline void DispatcherConfig::add_worker_addresses(std::string&& value) { + _impl_.worker_addresses_.Add(std::move(value)); + // @@protoc_insertion_point(field_add:tensorflow.data.experimental.DispatcherConfig.worker_addresses) +} +inline void DispatcherConfig::add_worker_addresses(const char* value) { + GOOGLE_DCHECK(value != nullptr); + _impl_.worker_addresses_.Add()->assign(value); + // @@protoc_insertion_point(field_add_char:tensorflow.data.experimental.DispatcherConfig.worker_addresses) +} +inline void DispatcherConfig::add_worker_addresses(const char* value, size_t size) { + _impl_.worker_addresses_.Add()->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_add_pointer:tensorflow.data.experimental.DispatcherConfig.worker_addresses) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& +DispatcherConfig::worker_addresses() const { + // @@protoc_insertion_point(field_list:tensorflow.data.experimental.DispatcherConfig.worker_addresses) + return _impl_.worker_addresses_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* +DispatcherConfig::mutable_worker_addresses() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.data.experimental.DispatcherConfig.worker_addresses) + return &_impl_.worker_addresses_; +} + +// .tensorflow.data.DeploymentMode deployment_mode = 9; +inline void DispatcherConfig::clear_deployment_mode() { + _impl_.deployment_mode_ = 0; +} +inline ::tensorflow::data::DeploymentMode DispatcherConfig::_internal_deployment_mode() const { + return static_cast< ::tensorflow::data::DeploymentMode >(_impl_.deployment_mode_); +} +inline ::tensorflow::data::DeploymentMode DispatcherConfig::deployment_mode() const { + // @@protoc_insertion_point(field_get:tensorflow.data.experimental.DispatcherConfig.deployment_mode) + return _internal_deployment_mode(); +} +inline void DispatcherConfig::_internal_set_deployment_mode(::tensorflow::data::DeploymentMode value) { + + _impl_.deployment_mode_ = value; +} +inline void DispatcherConfig::set_deployment_mode(::tensorflow::data::DeploymentMode value) { + _internal_set_deployment_mode(value); + // @@protoc_insertion_point(field_set:tensorflow.data.experimental.DispatcherConfig.deployment_mode) +} + +// int64 job_gc_check_interval_ms = 5; +inline void DispatcherConfig::clear_job_gc_check_interval_ms() { + _impl_.job_gc_check_interval_ms_ = int64_t{0}; +} +inline int64_t DispatcherConfig::_internal_job_gc_check_interval_ms() const { + return _impl_.job_gc_check_interval_ms_; +} +inline int64_t DispatcherConfig::job_gc_check_interval_ms() const { + // @@protoc_insertion_point(field_get:tensorflow.data.experimental.DispatcherConfig.job_gc_check_interval_ms) + return _internal_job_gc_check_interval_ms(); +} +inline void DispatcherConfig::_internal_set_job_gc_check_interval_ms(int64_t value) { + + _impl_.job_gc_check_interval_ms_ = value; +} +inline void DispatcherConfig::set_job_gc_check_interval_ms(int64_t value) { + _internal_set_job_gc_check_interval_ms(value); + // @@protoc_insertion_point(field_set:tensorflow.data.experimental.DispatcherConfig.job_gc_check_interval_ms) +} + +// int64 job_gc_timeout_ms = 6; +inline void DispatcherConfig::clear_job_gc_timeout_ms() { + _impl_.job_gc_timeout_ms_ = int64_t{0}; +} +inline int64_t DispatcherConfig::_internal_job_gc_timeout_ms() const { + return _impl_.job_gc_timeout_ms_; +} +inline int64_t DispatcherConfig::job_gc_timeout_ms() const { + // @@protoc_insertion_point(field_get:tensorflow.data.experimental.DispatcherConfig.job_gc_timeout_ms) + return _internal_job_gc_timeout_ms(); +} +inline void DispatcherConfig::_internal_set_job_gc_timeout_ms(int64_t value) { + + _impl_.job_gc_timeout_ms_ = value; +} +inline void DispatcherConfig::set_job_gc_timeout_ms(int64_t value) { + _internal_set_job_gc_timeout_ms(value); + // @@protoc_insertion_point(field_set:tensorflow.data.experimental.DispatcherConfig.job_gc_timeout_ms) +} + +// bool gc_dynamic_sharding_jobs = 11; +inline void DispatcherConfig::clear_gc_dynamic_sharding_jobs() { + _impl_.gc_dynamic_sharding_jobs_ = false; +} +inline bool DispatcherConfig::_internal_gc_dynamic_sharding_jobs() const { + return _impl_.gc_dynamic_sharding_jobs_; +} +inline bool DispatcherConfig::gc_dynamic_sharding_jobs() const { + // @@protoc_insertion_point(field_get:tensorflow.data.experimental.DispatcherConfig.gc_dynamic_sharding_jobs) + return _internal_gc_dynamic_sharding_jobs(); +} +inline void DispatcherConfig::_internal_set_gc_dynamic_sharding_jobs(bool value) { + + _impl_.gc_dynamic_sharding_jobs_ = value; +} +inline void DispatcherConfig::set_gc_dynamic_sharding_jobs(bool value) { + _internal_set_gc_dynamic_sharding_jobs(value); + // @@protoc_insertion_point(field_set:tensorflow.data.experimental.DispatcherConfig.gc_dynamic_sharding_jobs) +} + +// int64 client_timeout_ms = 8; +inline void DispatcherConfig::clear_client_timeout_ms() { + _impl_.client_timeout_ms_ = int64_t{0}; +} +inline int64_t DispatcherConfig::_internal_client_timeout_ms() const { + return _impl_.client_timeout_ms_; +} +inline int64_t DispatcherConfig::client_timeout_ms() const { + // @@protoc_insertion_point(field_get:tensorflow.data.experimental.DispatcherConfig.client_timeout_ms) + return _internal_client_timeout_ms(); +} +inline void DispatcherConfig::_internal_set_client_timeout_ms(int64_t value) { + + _impl_.client_timeout_ms_ = value; +} +inline void DispatcherConfig::set_client_timeout_ms(int64_t value) { + _internal_set_client_timeout_ms(value); + // @@protoc_insertion_point(field_set:tensorflow.data.experimental.DispatcherConfig.client_timeout_ms) +} + +// int64 worker_timeout_ms = 10; +inline void DispatcherConfig::clear_worker_timeout_ms() { + _impl_.worker_timeout_ms_ = int64_t{0}; +} +inline int64_t DispatcherConfig::_internal_worker_timeout_ms() const { + return _impl_.worker_timeout_ms_; +} +inline int64_t DispatcherConfig::worker_timeout_ms() const { + // @@protoc_insertion_point(field_get:tensorflow.data.experimental.DispatcherConfig.worker_timeout_ms) + return _internal_worker_timeout_ms(); +} +inline void DispatcherConfig::_internal_set_worker_timeout_ms(int64_t value) { + + _impl_.worker_timeout_ms_ = value; +} +inline void DispatcherConfig::set_worker_timeout_ms(int64_t value) { + _internal_set_worker_timeout_ms(value); + // @@protoc_insertion_point(field_set:tensorflow.data.experimental.DispatcherConfig.worker_timeout_ms) +} + +// int64 worker_max_concurrent_snapshots = 12; +inline void DispatcherConfig::clear_worker_max_concurrent_snapshots() { + _impl_.worker_max_concurrent_snapshots_ = int64_t{0}; +} +inline int64_t DispatcherConfig::_internal_worker_max_concurrent_snapshots() const { + return _impl_.worker_max_concurrent_snapshots_; +} +inline int64_t DispatcherConfig::worker_max_concurrent_snapshots() const { + // @@protoc_insertion_point(field_get:tensorflow.data.experimental.DispatcherConfig.worker_max_concurrent_snapshots) + return _internal_worker_max_concurrent_snapshots(); +} +inline void DispatcherConfig::_internal_set_worker_max_concurrent_snapshots(int64_t value) { + + _impl_.worker_max_concurrent_snapshots_ = value; +} +inline void DispatcherConfig::set_worker_max_concurrent_snapshots(int64_t value) { + _internal_set_worker_max_concurrent_snapshots(value); + // @@protoc_insertion_point(field_set:tensorflow.data.experimental.DispatcherConfig.worker_max_concurrent_snapshots) +} + +// ------------------------------------------------------------------- + +// WorkerConfig + +// int64 port = 1; +inline void WorkerConfig::clear_port() { + _impl_.port_ = int64_t{0}; +} +inline int64_t WorkerConfig::_internal_port() const { + return _impl_.port_; +} +inline int64_t WorkerConfig::port() const { + // @@protoc_insertion_point(field_get:tensorflow.data.experimental.WorkerConfig.port) + return _internal_port(); +} +inline void WorkerConfig::_internal_set_port(int64_t value) { + + _impl_.port_ = value; +} +inline void WorkerConfig::set_port(int64_t value) { + _internal_set_port(value); + // @@protoc_insertion_point(field_set:tensorflow.data.experimental.WorkerConfig.port) +} + +// string protocol = 2; +inline void WorkerConfig::clear_protocol() { + _impl_.protocol_.ClearToEmpty(); +} +inline const std::string& WorkerConfig::protocol() const { + // @@protoc_insertion_point(field_get:tensorflow.data.experimental.WorkerConfig.protocol) + return _internal_protocol(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void WorkerConfig::set_protocol(ArgT0&& arg0, ArgT... args) { + + _impl_.protocol_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.data.experimental.WorkerConfig.protocol) +} +inline std::string* WorkerConfig::mutable_protocol() { + std::string* _s = _internal_mutable_protocol(); + // @@protoc_insertion_point(field_mutable:tensorflow.data.experimental.WorkerConfig.protocol) + return _s; +} +inline const std::string& WorkerConfig::_internal_protocol() const { + return _impl_.protocol_.Get(); +} +inline void WorkerConfig::_internal_set_protocol(const std::string& value) { + + _impl_.protocol_.Set(value, GetArenaForAllocation()); +} +inline std::string* WorkerConfig::_internal_mutable_protocol() { + + return _impl_.protocol_.Mutable(GetArenaForAllocation()); +} +inline std::string* WorkerConfig::release_protocol() { + // @@protoc_insertion_point(field_release:tensorflow.data.experimental.WorkerConfig.protocol) + return _impl_.protocol_.Release(); +} +inline void WorkerConfig::set_allocated_protocol(std::string* protocol) { + if (protocol != nullptr) { + + } else { + + } + _impl_.protocol_.SetAllocated(protocol, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.protocol_.IsDefault()) { + _impl_.protocol_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.data.experimental.WorkerConfig.protocol) +} + +// string dispatcher_address = 3; +inline void WorkerConfig::clear_dispatcher_address() { + _impl_.dispatcher_address_.ClearToEmpty(); +} +inline const std::string& WorkerConfig::dispatcher_address() const { + // @@protoc_insertion_point(field_get:tensorflow.data.experimental.WorkerConfig.dispatcher_address) + return _internal_dispatcher_address(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void WorkerConfig::set_dispatcher_address(ArgT0&& arg0, ArgT... args) { + + _impl_.dispatcher_address_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.data.experimental.WorkerConfig.dispatcher_address) +} +inline std::string* WorkerConfig::mutable_dispatcher_address() { + std::string* _s = _internal_mutable_dispatcher_address(); + // @@protoc_insertion_point(field_mutable:tensorflow.data.experimental.WorkerConfig.dispatcher_address) + return _s; +} +inline const std::string& WorkerConfig::_internal_dispatcher_address() const { + return _impl_.dispatcher_address_.Get(); +} +inline void WorkerConfig::_internal_set_dispatcher_address(const std::string& value) { + + _impl_.dispatcher_address_.Set(value, GetArenaForAllocation()); +} +inline std::string* WorkerConfig::_internal_mutable_dispatcher_address() { + + return _impl_.dispatcher_address_.Mutable(GetArenaForAllocation()); +} +inline std::string* WorkerConfig::release_dispatcher_address() { + // @@protoc_insertion_point(field_release:tensorflow.data.experimental.WorkerConfig.dispatcher_address) + return _impl_.dispatcher_address_.Release(); +} +inline void WorkerConfig::set_allocated_dispatcher_address(std::string* dispatcher_address) { + if (dispatcher_address != nullptr) { + + } else { + + } + _impl_.dispatcher_address_.SetAllocated(dispatcher_address, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.dispatcher_address_.IsDefault()) { + _impl_.dispatcher_address_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.data.experimental.WorkerConfig.dispatcher_address) +} + +// string worker_address = 4; +inline void WorkerConfig::clear_worker_address() { + _impl_.worker_address_.ClearToEmpty(); +} +inline const std::string& WorkerConfig::worker_address() const { + // @@protoc_insertion_point(field_get:tensorflow.data.experimental.WorkerConfig.worker_address) + return _internal_worker_address(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void WorkerConfig::set_worker_address(ArgT0&& arg0, ArgT... args) { + + _impl_.worker_address_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.data.experimental.WorkerConfig.worker_address) +} +inline std::string* WorkerConfig::mutable_worker_address() { + std::string* _s = _internal_mutable_worker_address(); + // @@protoc_insertion_point(field_mutable:tensorflow.data.experimental.WorkerConfig.worker_address) + return _s; +} +inline const std::string& WorkerConfig::_internal_worker_address() const { + return _impl_.worker_address_.Get(); +} +inline void WorkerConfig::_internal_set_worker_address(const std::string& value) { + + _impl_.worker_address_.Set(value, GetArenaForAllocation()); +} +inline std::string* WorkerConfig::_internal_mutable_worker_address() { + + return _impl_.worker_address_.Mutable(GetArenaForAllocation()); +} +inline std::string* WorkerConfig::release_worker_address() { + // @@protoc_insertion_point(field_release:tensorflow.data.experimental.WorkerConfig.worker_address) + return _impl_.worker_address_.Release(); +} +inline void WorkerConfig::set_allocated_worker_address(std::string* worker_address) { + if (worker_address != nullptr) { + + } else { + + } + _impl_.worker_address_.SetAllocated(worker_address, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.worker_address_.IsDefault()) { + _impl_.worker_address_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.data.experimental.WorkerConfig.worker_address) +} + +// repeated string worker_tags = 10; +inline int WorkerConfig::_internal_worker_tags_size() const { + return _impl_.worker_tags_.size(); +} +inline int WorkerConfig::worker_tags_size() const { + return _internal_worker_tags_size(); +} +inline void WorkerConfig::clear_worker_tags() { + _impl_.worker_tags_.Clear(); +} +inline std::string* WorkerConfig::add_worker_tags() { + std::string* _s = _internal_add_worker_tags(); + // @@protoc_insertion_point(field_add_mutable:tensorflow.data.experimental.WorkerConfig.worker_tags) + return _s; +} +inline const std::string& WorkerConfig::_internal_worker_tags(int index) const { + return _impl_.worker_tags_.Get(index); +} +inline const std::string& WorkerConfig::worker_tags(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.data.experimental.WorkerConfig.worker_tags) + return _internal_worker_tags(index); +} +inline std::string* WorkerConfig::mutable_worker_tags(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.data.experimental.WorkerConfig.worker_tags) + return _impl_.worker_tags_.Mutable(index); +} +inline void WorkerConfig::set_worker_tags(int index, const std::string& value) { + _impl_.worker_tags_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set:tensorflow.data.experimental.WorkerConfig.worker_tags) +} +inline void WorkerConfig::set_worker_tags(int index, std::string&& value) { + _impl_.worker_tags_.Mutable(index)->assign(std::move(value)); + // @@protoc_insertion_point(field_set:tensorflow.data.experimental.WorkerConfig.worker_tags) +} +inline void WorkerConfig::set_worker_tags(int index, const char* value) { + GOOGLE_DCHECK(value != nullptr); + _impl_.worker_tags_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set_char:tensorflow.data.experimental.WorkerConfig.worker_tags) +} +inline void WorkerConfig::set_worker_tags(int index, const char* value, size_t size) { + _impl_.worker_tags_.Mutable(index)->assign( + reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:tensorflow.data.experimental.WorkerConfig.worker_tags) +} +inline std::string* WorkerConfig::_internal_add_worker_tags() { + return _impl_.worker_tags_.Add(); +} +inline void WorkerConfig::add_worker_tags(const std::string& value) { + _impl_.worker_tags_.Add()->assign(value); + // @@protoc_insertion_point(field_add:tensorflow.data.experimental.WorkerConfig.worker_tags) +} +inline void WorkerConfig::add_worker_tags(std::string&& value) { + _impl_.worker_tags_.Add(std::move(value)); + // @@protoc_insertion_point(field_add:tensorflow.data.experimental.WorkerConfig.worker_tags) +} +inline void WorkerConfig::add_worker_tags(const char* value) { + GOOGLE_DCHECK(value != nullptr); + _impl_.worker_tags_.Add()->assign(value); + // @@protoc_insertion_point(field_add_char:tensorflow.data.experimental.WorkerConfig.worker_tags) +} +inline void WorkerConfig::add_worker_tags(const char* value, size_t size) { + _impl_.worker_tags_.Add()->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_add_pointer:tensorflow.data.experimental.WorkerConfig.worker_tags) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& +WorkerConfig::worker_tags() const { + // @@protoc_insertion_point(field_list:tensorflow.data.experimental.WorkerConfig.worker_tags) + return _impl_.worker_tags_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* +WorkerConfig::mutable_worker_tags() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.data.experimental.WorkerConfig.worker_tags) + return &_impl_.worker_tags_; +} + +// int64 heartbeat_interval_ms = 5; +inline void WorkerConfig::clear_heartbeat_interval_ms() { + _impl_.heartbeat_interval_ms_ = int64_t{0}; +} +inline int64_t WorkerConfig::_internal_heartbeat_interval_ms() const { + return _impl_.heartbeat_interval_ms_; +} +inline int64_t WorkerConfig::heartbeat_interval_ms() const { + // @@protoc_insertion_point(field_get:tensorflow.data.experimental.WorkerConfig.heartbeat_interval_ms) + return _internal_heartbeat_interval_ms(); +} +inline void WorkerConfig::_internal_set_heartbeat_interval_ms(int64_t value) { + + _impl_.heartbeat_interval_ms_ = value; +} +inline void WorkerConfig::set_heartbeat_interval_ms(int64_t value) { + _internal_set_heartbeat_interval_ms(value); + // @@protoc_insertion_point(field_set:tensorflow.data.experimental.WorkerConfig.heartbeat_interval_ms) +} + +// int64 dispatcher_timeout_ms = 6; +inline void WorkerConfig::clear_dispatcher_timeout_ms() { + _impl_.dispatcher_timeout_ms_ = int64_t{0}; +} +inline int64_t WorkerConfig::_internal_dispatcher_timeout_ms() const { + return _impl_.dispatcher_timeout_ms_; +} +inline int64_t WorkerConfig::dispatcher_timeout_ms() const { + // @@protoc_insertion_point(field_get:tensorflow.data.experimental.WorkerConfig.dispatcher_timeout_ms) + return _internal_dispatcher_timeout_ms(); +} +inline void WorkerConfig::_internal_set_dispatcher_timeout_ms(int64_t value) { + + _impl_.dispatcher_timeout_ms_ = value; +} +inline void WorkerConfig::set_dispatcher_timeout_ms(int64_t value) { + _internal_set_dispatcher_timeout_ms(value); + // @@protoc_insertion_point(field_set:tensorflow.data.experimental.WorkerConfig.dispatcher_timeout_ms) +} + +// string data_transfer_protocol = 7; +inline void WorkerConfig::clear_data_transfer_protocol() { + _impl_.data_transfer_protocol_.ClearToEmpty(); +} +inline const std::string& WorkerConfig::data_transfer_protocol() const { + // @@protoc_insertion_point(field_get:tensorflow.data.experimental.WorkerConfig.data_transfer_protocol) + return _internal_data_transfer_protocol(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void WorkerConfig::set_data_transfer_protocol(ArgT0&& arg0, ArgT... args) { + + _impl_.data_transfer_protocol_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.data.experimental.WorkerConfig.data_transfer_protocol) +} +inline std::string* WorkerConfig::mutable_data_transfer_protocol() { + std::string* _s = _internal_mutable_data_transfer_protocol(); + // @@protoc_insertion_point(field_mutable:tensorflow.data.experimental.WorkerConfig.data_transfer_protocol) + return _s; +} +inline const std::string& WorkerConfig::_internal_data_transfer_protocol() const { + return _impl_.data_transfer_protocol_.Get(); +} +inline void WorkerConfig::_internal_set_data_transfer_protocol(const std::string& value) { + + _impl_.data_transfer_protocol_.Set(value, GetArenaForAllocation()); +} +inline std::string* WorkerConfig::_internal_mutable_data_transfer_protocol() { + + return _impl_.data_transfer_protocol_.Mutable(GetArenaForAllocation()); +} +inline std::string* WorkerConfig::release_data_transfer_protocol() { + // @@protoc_insertion_point(field_release:tensorflow.data.experimental.WorkerConfig.data_transfer_protocol) + return _impl_.data_transfer_protocol_.Release(); +} +inline void WorkerConfig::set_allocated_data_transfer_protocol(std::string* data_transfer_protocol) { + if (data_transfer_protocol != nullptr) { + + } else { + + } + _impl_.data_transfer_protocol_.SetAllocated(data_transfer_protocol, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.data_transfer_protocol_.IsDefault()) { + _impl_.data_transfer_protocol_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.data.experimental.WorkerConfig.data_transfer_protocol) +} + +// string data_transfer_address = 8; +inline void WorkerConfig::clear_data_transfer_address() { + _impl_.data_transfer_address_.ClearToEmpty(); +} +inline const std::string& WorkerConfig::data_transfer_address() const { + // @@protoc_insertion_point(field_get:tensorflow.data.experimental.WorkerConfig.data_transfer_address) + return _internal_data_transfer_address(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void WorkerConfig::set_data_transfer_address(ArgT0&& arg0, ArgT... args) { + + _impl_.data_transfer_address_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.data.experimental.WorkerConfig.data_transfer_address) +} +inline std::string* WorkerConfig::mutable_data_transfer_address() { + std::string* _s = _internal_mutable_data_transfer_address(); + // @@protoc_insertion_point(field_mutable:tensorflow.data.experimental.WorkerConfig.data_transfer_address) + return _s; +} +inline const std::string& WorkerConfig::_internal_data_transfer_address() const { + return _impl_.data_transfer_address_.Get(); +} +inline void WorkerConfig::_internal_set_data_transfer_address(const std::string& value) { + + _impl_.data_transfer_address_.Set(value, GetArenaForAllocation()); +} +inline std::string* WorkerConfig::_internal_mutable_data_transfer_address() { + + return _impl_.data_transfer_address_.Mutable(GetArenaForAllocation()); +} +inline std::string* WorkerConfig::release_data_transfer_address() { + // @@protoc_insertion_point(field_release:tensorflow.data.experimental.WorkerConfig.data_transfer_address) + return _impl_.data_transfer_address_.Release(); +} +inline void WorkerConfig::set_allocated_data_transfer_address(std::string* data_transfer_address) { + if (data_transfer_address != nullptr) { + + } else { + + } + _impl_.data_transfer_address_.SetAllocated(data_transfer_address, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.data_transfer_address_.IsDefault()) { + _impl_.data_transfer_address_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.data.experimental.WorkerConfig.data_transfer_address) +} + +// int64 cross_trainer_cache_size_bytes = 11; +inline void WorkerConfig::clear_cross_trainer_cache_size_bytes() { + _impl_.cross_trainer_cache_size_bytes_ = int64_t{0}; +} +inline int64_t WorkerConfig::_internal_cross_trainer_cache_size_bytes() const { + return _impl_.cross_trainer_cache_size_bytes_; +} +inline int64_t WorkerConfig::cross_trainer_cache_size_bytes() const { + // @@protoc_insertion_point(field_get:tensorflow.data.experimental.WorkerConfig.cross_trainer_cache_size_bytes) + return _internal_cross_trainer_cache_size_bytes(); +} +inline void WorkerConfig::_internal_set_cross_trainer_cache_size_bytes(int64_t value) { + + _impl_.cross_trainer_cache_size_bytes_ = value; +} +inline void WorkerConfig::set_cross_trainer_cache_size_bytes(int64_t value) { + _internal_set_cross_trainer_cache_size_bytes(value); + // @@protoc_insertion_point(field_set:tensorflow.data.experimental.WorkerConfig.cross_trainer_cache_size_bytes) +} + +// int64 snapshot_max_chunk_size_bytes = 12; +inline void WorkerConfig::clear_snapshot_max_chunk_size_bytes() { + _impl_.snapshot_max_chunk_size_bytes_ = int64_t{0}; +} +inline int64_t WorkerConfig::_internal_snapshot_max_chunk_size_bytes() const { + return _impl_.snapshot_max_chunk_size_bytes_; +} +inline int64_t WorkerConfig::snapshot_max_chunk_size_bytes() const { + // @@protoc_insertion_point(field_get:tensorflow.data.experimental.WorkerConfig.snapshot_max_chunk_size_bytes) + return _internal_snapshot_max_chunk_size_bytes(); +} +inline void WorkerConfig::_internal_set_snapshot_max_chunk_size_bytes(int64_t value) { + + _impl_.snapshot_max_chunk_size_bytes_ = value; +} +inline void WorkerConfig::set_snapshot_max_chunk_size_bytes(int64_t value) { + _internal_set_snapshot_max_chunk_size_bytes(value); + // @@protoc_insertion_point(field_set:tensorflow.data.experimental.WorkerConfig.snapshot_max_chunk_size_bytes) +} + +// int64 shutdown_quiet_period_ms = 9; +inline void WorkerConfig::clear_shutdown_quiet_period_ms() { + _impl_.shutdown_quiet_period_ms_ = int64_t{0}; +} +inline int64_t WorkerConfig::_internal_shutdown_quiet_period_ms() const { + return _impl_.shutdown_quiet_period_ms_; +} +inline int64_t WorkerConfig::shutdown_quiet_period_ms() const { + // @@protoc_insertion_point(field_get:tensorflow.data.experimental.WorkerConfig.shutdown_quiet_period_ms) + return _internal_shutdown_quiet_period_ms(); +} +inline void WorkerConfig::_internal_set_shutdown_quiet_period_ms(int64_t value) { + + _impl_.shutdown_quiet_period_ms_ = value; +} +inline void WorkerConfig::set_shutdown_quiet_period_ms(int64_t value) { + _internal_set_shutdown_quiet_period_ms(value); + // @@protoc_insertion_point(field_set:tensorflow.data.experimental.WorkerConfig.shutdown_quiet_period_ms) +} + +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ +// ------------------------------------------------------------------- + + +// @@protoc_insertion_point(namespace_scope) + +} // namespace experimental +} // namespace data +} // namespace tensorflow + +// @@protoc_insertion_point(global_scope) + +#include +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprotobuf_2fservice_5fconfig_2eproto diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/service_config.proto b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/service_config.proto new file mode 100644 index 0000000000000000000000000000000000000000..2900478c4f3feb042973ef73e8a93f43730cd496 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/service_config.proto @@ -0,0 +1,103 @@ +syntax = "proto3"; + +package tensorflow.data.experimental; + +import "tensorflow/core/protobuf/data_service.proto"; + +option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/protobuf/for_core_protos_go_proto"; + +// Configuration for a tf.data service DispatchServer. +// Next id: 13 +message DispatcherConfig { + // The port for the dispatcher to bind to. A value of 0 indicates that the + // dispatcher may bind to any available port. + int64 port = 1; + // The protocol for the dispatcher to use when connecting to workers. + string protocol = 2; + // A work directory to use for storing dispatcher state, and for recovering + // during restarts. The empty string indicates not to use any work directory. + string work_dir = 3; + // Whether to run in fault tolerant mode, where dispatcher state is saved + // across restarts. Requires that `work_dir` is nonempty. + bool fault_tolerant_mode = 4; + // (Optional.) If the job uses auto-sharding, it needs to specify a fixed list + // of worker addresses that will register with the dispatcher. The worker + // addresses should be in the format "host" or "host:port", where "port" is an + // integer, named port, or %port% to match any port. + repeated string worker_addresses = 7; + // (Optional.) tf.data service deployment mode. Supported values are "REMOTE", + // "COLOCATED", and "HYBRID". If unspecified, it is assumed to be "REMOTE". + DeploymentMode deployment_mode = 9; + // How often the dispatcher should scan through to delete old and unused + // jobs. A value of 0 indicates that the decision should be left up to the + // runtime. + int64 job_gc_check_interval_ms = 5; + // How long a job needs to be unused before it becomes a candidate for garbage + // collection. A value of -1 indicates that jobs should never be garbage + // collected. A value of 0 indicates that the decision should be left up to + // the runtime. Note: This does not apply to dynamic sharding unless users + // explicitly opt-in by enabling `gc_dynamic_sharding_jobs` below. + int64 job_gc_timeout_ms = 6; + // Whether dynamically sharded jobs should be eligible for garbage collection. + // These jobs are not garbage collected by default, since if a job is garbage + // collected and then re-created, it will revisit all data from the start. If + // revisiting data is acceptible and you want automatic reclamation of + // iterator memory, set `gc_dynamic_sharding_jobs` to `true`. + bool gc_dynamic_sharding_jobs = 11; + // How long to wait before garbage-collecting a client that hasn't + // heartbeated to the dispatcher. A value of 0 indicates that the timeout + // should be left to the runtime. + int64 client_timeout_ms = 8; + // How long to wait for a worker to heartbeat before considering it missing. + // A value of 0 indicates that the timeout should be left to the runtime. + int64 worker_timeout_ms = 10; + // The maximum number of snapshots that a worker can concurrently process at a + // given point in time. This is a tradeoff between worker resource usage and + // snapshot wall time. A value of 0 indicates that the decision should be left + // up to the runtime. + int64 worker_max_concurrent_snapshots = 12; +} + +// Configuration for a tf.data service WorkerServer. +// Next id: 13 +message WorkerConfig { + // The port for the worker to bind to. A value of 0 indicates that the + // worker may bind to any available port. + int64 port = 1; + // The protocol for the worker to use when connecting to the dispatcher. + string protocol = 2; + // The address of the dispatcher to register with. + string dispatcher_address = 3; + // The address of the worker server. The substring "%port%", if specified, + // will be replaced with the worker's bound port. This is useful when the port + // is set to `0`. + string worker_address = 4; + // Tags attached to the worker. This allows reading from selected workers. + // For example, by applying a "COLOCATED" tag, tf.data service is able to read + // from the local tf.data worker if one exists, then from off-TF-host workers, + // to avoid cross-TF-host reads. + repeated string worker_tags = 10; + // How often the worker should heartbeat to the master. A value of 0 indicates + // that the decision should be left up to the runtime. + int64 heartbeat_interval_ms = 5; + // How long to retry requests to the dispatcher before giving up and reporting + // an error. A value of 0 indicates that the decision should be left up to the + // runtime. + int64 dispatcher_timeout_ms = 6; + // The protocol for the worker to use when transferring data to clients. + string data_transfer_protocol = 7; + // The data transfer address of the worker server. The substring "%port%", if + // specified, will be replaced with the worker's bound port. This is useful + // when the port is set to `0`. + string data_transfer_address = 8; + // Maximum size of the cross-trainer cache in bytes. If enabled, make sure + // your training job provides sufficient memory resources. + int64 cross_trainer_cache_size_bytes = 11; + // The maximum size of a distributed snapshot chunk file. A value of 0 + // indicates that the decision should be left up to the runtime. + int64 snapshot_max_chunk_size_bytes = 12; + // When shutting down a worker, how long to wait for the gRPC server to + // process the final requests. This is used to achieve clean shutdown in unit + // tests. + int64 shutdown_quiet_period_ms = 9; +} diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/snapshot.pb.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/snapshot.pb.h new file mode 100644 index 0000000000000000000000000000000000000000..735303934f8ff507bd72433793f4c5bbb915aefc --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/snapshot.pb.h @@ -0,0 +1,1519 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/snapshot.proto + +#ifndef GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprotobuf_2fsnapshot_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprotobuf_2fsnapshot_2eproto + +#include +#include + +#include +#if PROTOBUF_VERSION < 3021000 +#error This file was generated by a newer version of protoc which is +#error incompatible with your Protocol Buffer headers. Please update +#error your headers. +#endif +#if 3021009 < PROTOBUF_MIN_PROTOC_VERSION +#error This file was generated by an older version of protoc which is +#error incompatible with your Protocol Buffer headers. Please +#error regenerate this file with a newer version of protoc. +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include // IWYU pragma: export +#include // IWYU pragma: export +#include +#include "tensorflow/core/framework/tensor.pb.h" +#include "tensorflow/core/framework/tensor_shape.pb.h" +#include "tensorflow/core/framework/types.pb.h" +// @@protoc_insertion_point(includes) +#include +#define PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2fprotobuf_2fsnapshot_2eproto +PROTOBUF_NAMESPACE_OPEN +namespace internal { +class AnyMetadata; +} // namespace internal +PROTOBUF_NAMESPACE_CLOSE + +// Internal implementation detail -- do not use these members. +struct TableStruct_tensorflow_2fcore_2fprotobuf_2fsnapshot_2eproto { + static const uint32_t offsets[]; +}; +extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_tensorflow_2fcore_2fprotobuf_2fsnapshot_2eproto; +namespace tensorflow { +namespace data { +namespace experimental { +class DistributedSnapshotMetadata; +struct DistributedSnapshotMetadataDefaultTypeInternal; +extern DistributedSnapshotMetadataDefaultTypeInternal _DistributedSnapshotMetadata_default_instance_; +class SnapshotMetadataRecord; +struct SnapshotMetadataRecordDefaultTypeInternal; +extern SnapshotMetadataRecordDefaultTypeInternal _SnapshotMetadataRecord_default_instance_; +class SnapshotRecord; +struct SnapshotRecordDefaultTypeInternal; +extern SnapshotRecordDefaultTypeInternal _SnapshotRecord_default_instance_; +class SnapshotTensorMetadata; +struct SnapshotTensorMetadataDefaultTypeInternal; +extern SnapshotTensorMetadataDefaultTypeInternal _SnapshotTensorMetadata_default_instance_; +class TensorMetadata; +struct TensorMetadataDefaultTypeInternal; +extern TensorMetadataDefaultTypeInternal _TensorMetadata_default_instance_; +} // namespace experimental +} // namespace data +} // namespace tensorflow +PROTOBUF_NAMESPACE_OPEN +template<> ::tensorflow::data::experimental::DistributedSnapshotMetadata* Arena::CreateMaybeMessage<::tensorflow::data::experimental::DistributedSnapshotMetadata>(Arena*); +template<> ::tensorflow::data::experimental::SnapshotMetadataRecord* Arena::CreateMaybeMessage<::tensorflow::data::experimental::SnapshotMetadataRecord>(Arena*); +template<> ::tensorflow::data::experimental::SnapshotRecord* Arena::CreateMaybeMessage<::tensorflow::data::experimental::SnapshotRecord>(Arena*); +template<> ::tensorflow::data::experimental::SnapshotTensorMetadata* Arena::CreateMaybeMessage<::tensorflow::data::experimental::SnapshotTensorMetadata>(Arena*); +template<> ::tensorflow::data::experimental::TensorMetadata* Arena::CreateMaybeMessage<::tensorflow::data::experimental::TensorMetadata>(Arena*); +PROTOBUF_NAMESPACE_CLOSE +namespace tensorflow { +namespace data { +namespace experimental { + +// =================================================================== + +class SnapshotRecord final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.data.experimental.SnapshotRecord) */ { + public: + inline SnapshotRecord() : SnapshotRecord(nullptr) {} + ~SnapshotRecord() override; + explicit PROTOBUF_CONSTEXPR SnapshotRecord(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + SnapshotRecord(const SnapshotRecord& from); + SnapshotRecord(SnapshotRecord&& from) noexcept + : SnapshotRecord() { + *this = ::std::move(from); + } + + inline SnapshotRecord& operator=(const SnapshotRecord& from) { + CopyFrom(from); + return *this; + } + inline SnapshotRecord& operator=(SnapshotRecord&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const SnapshotRecord& default_instance() { + return *internal_default_instance(); + } + static inline const SnapshotRecord* internal_default_instance() { + return reinterpret_cast( + &_SnapshotRecord_default_instance_); + } + static constexpr int kIndexInFileMessages = + 0; + + friend void swap(SnapshotRecord& a, SnapshotRecord& b) { + a.Swap(&b); + } + inline void Swap(SnapshotRecord* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(SnapshotRecord* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + SnapshotRecord* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const SnapshotRecord& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const SnapshotRecord& from) { + SnapshotRecord::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(SnapshotRecord* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.data.experimental.SnapshotRecord"; + } + protected: + explicit SnapshotRecord(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kTensorFieldNumber = 1, + }; + // repeated .tensorflow.TensorProto tensor = 1; + int tensor_size() const; + private: + int _internal_tensor_size() const; + public: + void clear_tensor(); + ::tensorflow::TensorProto* mutable_tensor(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::TensorProto >* + mutable_tensor(); + private: + const ::tensorflow::TensorProto& _internal_tensor(int index) const; + ::tensorflow::TensorProto* _internal_add_tensor(); + public: + const ::tensorflow::TensorProto& tensor(int index) const; + ::tensorflow::TensorProto* add_tensor(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::TensorProto >& + tensor() const; + + // @@protoc_insertion_point(class_scope:tensorflow.data.experimental.SnapshotRecord) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::TensorProto > tensor_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fsnapshot_2eproto; +}; +// ------------------------------------------------------------------- + +class SnapshotMetadataRecord final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.data.experimental.SnapshotMetadataRecord) */ { + public: + inline SnapshotMetadataRecord() : SnapshotMetadataRecord(nullptr) {} + ~SnapshotMetadataRecord() override; + explicit PROTOBUF_CONSTEXPR SnapshotMetadataRecord(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + SnapshotMetadataRecord(const SnapshotMetadataRecord& from); + SnapshotMetadataRecord(SnapshotMetadataRecord&& from) noexcept + : SnapshotMetadataRecord() { + *this = ::std::move(from); + } + + inline SnapshotMetadataRecord& operator=(const SnapshotMetadataRecord& from) { + CopyFrom(from); + return *this; + } + inline SnapshotMetadataRecord& operator=(SnapshotMetadataRecord&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const SnapshotMetadataRecord& default_instance() { + return *internal_default_instance(); + } + static inline const SnapshotMetadataRecord* internal_default_instance() { + return reinterpret_cast( + &_SnapshotMetadataRecord_default_instance_); + } + static constexpr int kIndexInFileMessages = + 1; + + friend void swap(SnapshotMetadataRecord& a, SnapshotMetadataRecord& b) { + a.Swap(&b); + } + inline void Swap(SnapshotMetadataRecord* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(SnapshotMetadataRecord* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + SnapshotMetadataRecord* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const SnapshotMetadataRecord& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const SnapshotMetadataRecord& from) { + SnapshotMetadataRecord::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(SnapshotMetadataRecord* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.data.experimental.SnapshotMetadataRecord"; + } + protected: + explicit SnapshotMetadataRecord(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kDtypeFieldNumber = 5, + kGraphHashFieldNumber = 1, + kRunIdFieldNumber = 2, + kCreationTimestampFieldNumber = 3, + kVersionFieldNumber = 4, + kNumElementsFieldNumber = 6, + kFinalizedFieldNumber = 1000, + }; + // repeated .tensorflow.DataType dtype = 5; + int dtype_size() const; + private: + int _internal_dtype_size() const; + public: + void clear_dtype(); + private: + ::tensorflow::DataType _internal_dtype(int index) const; + void _internal_add_dtype(::tensorflow::DataType value); + ::PROTOBUF_NAMESPACE_ID::RepeatedField* _internal_mutable_dtype(); + public: + ::tensorflow::DataType dtype(int index) const; + void set_dtype(int index, ::tensorflow::DataType value); + void add_dtype(::tensorflow::DataType value); + const ::PROTOBUF_NAMESPACE_ID::RepeatedField& dtype() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedField* mutable_dtype(); + + // string graph_hash = 1; + void clear_graph_hash(); + const std::string& graph_hash() const; + template + void set_graph_hash(ArgT0&& arg0, ArgT... args); + std::string* mutable_graph_hash(); + PROTOBUF_NODISCARD std::string* release_graph_hash(); + void set_allocated_graph_hash(std::string* graph_hash); + private: + const std::string& _internal_graph_hash() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_graph_hash(const std::string& value); + std::string* _internal_mutable_graph_hash(); + public: + + // string run_id = 2; + void clear_run_id(); + const std::string& run_id() const; + template + void set_run_id(ArgT0&& arg0, ArgT... args); + std::string* mutable_run_id(); + PROTOBUF_NODISCARD std::string* release_run_id(); + void set_allocated_run_id(std::string* run_id); + private: + const std::string& _internal_run_id() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_run_id(const std::string& value); + std::string* _internal_mutable_run_id(); + public: + + // int64 creation_timestamp = 3; + void clear_creation_timestamp(); + int64_t creation_timestamp() const; + void set_creation_timestamp(int64_t value); + private: + int64_t _internal_creation_timestamp() const; + void _internal_set_creation_timestamp(int64_t value); + public: + + // int64 version = 4; + void clear_version(); + int64_t version() const; + void set_version(int64_t value); + private: + int64_t _internal_version() const; + void _internal_set_version(int64_t value); + public: + + // int64 num_elements = 6; + void clear_num_elements(); + int64_t num_elements() const; + void set_num_elements(int64_t value); + private: + int64_t _internal_num_elements() const; + void _internal_set_num_elements(int64_t value); + public: + + // bool finalized = 1000; + void clear_finalized(); + bool finalized() const; + void set_finalized(bool value); + private: + bool _internal_finalized() const; + void _internal_set_finalized(bool value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.data.experimental.SnapshotMetadataRecord) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedField dtype_; + mutable std::atomic _dtype_cached_byte_size_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr graph_hash_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr run_id_; + int64_t creation_timestamp_; + int64_t version_; + int64_t num_elements_; + bool finalized_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fsnapshot_2eproto; +}; +// ------------------------------------------------------------------- + +class TensorMetadata final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.data.experimental.TensorMetadata) */ { + public: + inline TensorMetadata() : TensorMetadata(nullptr) {} + ~TensorMetadata() override; + explicit PROTOBUF_CONSTEXPR TensorMetadata(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + TensorMetadata(const TensorMetadata& from); + TensorMetadata(TensorMetadata&& from) noexcept + : TensorMetadata() { + *this = ::std::move(from); + } + + inline TensorMetadata& operator=(const TensorMetadata& from) { + CopyFrom(from); + return *this; + } + inline TensorMetadata& operator=(TensorMetadata&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const TensorMetadata& default_instance() { + return *internal_default_instance(); + } + static inline const TensorMetadata* internal_default_instance() { + return reinterpret_cast( + &_TensorMetadata_default_instance_); + } + static constexpr int kIndexInFileMessages = + 2; + + friend void swap(TensorMetadata& a, TensorMetadata& b) { + a.Swap(&b); + } + inline void Swap(TensorMetadata* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(TensorMetadata* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + TensorMetadata* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const TensorMetadata& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const TensorMetadata& from) { + TensorMetadata::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(TensorMetadata* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.data.experimental.TensorMetadata"; + } + protected: + explicit TensorMetadata(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kTensorShapeFieldNumber = 2, + kTensorSizeBytesFieldNumber = 3, + }; + // .tensorflow.TensorShapeProto tensor_shape = 2; + bool has_tensor_shape() const; + private: + bool _internal_has_tensor_shape() const; + public: + void clear_tensor_shape(); + const ::tensorflow::TensorShapeProto& tensor_shape() const; + PROTOBUF_NODISCARD ::tensorflow::TensorShapeProto* release_tensor_shape(); + ::tensorflow::TensorShapeProto* mutable_tensor_shape(); + void set_allocated_tensor_shape(::tensorflow::TensorShapeProto* tensor_shape); + private: + const ::tensorflow::TensorShapeProto& _internal_tensor_shape() const; + ::tensorflow::TensorShapeProto* _internal_mutable_tensor_shape(); + public: + void unsafe_arena_set_allocated_tensor_shape( + ::tensorflow::TensorShapeProto* tensor_shape); + ::tensorflow::TensorShapeProto* unsafe_arena_release_tensor_shape(); + + // int64 tensor_size_bytes = 3; + void clear_tensor_size_bytes(); + int64_t tensor_size_bytes() const; + void set_tensor_size_bytes(int64_t value); + private: + int64_t _internal_tensor_size_bytes() const; + void _internal_set_tensor_size_bytes(int64_t value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.data.experimental.TensorMetadata) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::tensorflow::TensorShapeProto* tensor_shape_; + int64_t tensor_size_bytes_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fsnapshot_2eproto; +}; +// ------------------------------------------------------------------- + +class SnapshotTensorMetadata final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.data.experimental.SnapshotTensorMetadata) */ { + public: + inline SnapshotTensorMetadata() : SnapshotTensorMetadata(nullptr) {} + ~SnapshotTensorMetadata() override; + explicit PROTOBUF_CONSTEXPR SnapshotTensorMetadata(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + SnapshotTensorMetadata(const SnapshotTensorMetadata& from); + SnapshotTensorMetadata(SnapshotTensorMetadata&& from) noexcept + : SnapshotTensorMetadata() { + *this = ::std::move(from); + } + + inline SnapshotTensorMetadata& operator=(const SnapshotTensorMetadata& from) { + CopyFrom(from); + return *this; + } + inline SnapshotTensorMetadata& operator=(SnapshotTensorMetadata&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const SnapshotTensorMetadata& default_instance() { + return *internal_default_instance(); + } + static inline const SnapshotTensorMetadata* internal_default_instance() { + return reinterpret_cast( + &_SnapshotTensorMetadata_default_instance_); + } + static constexpr int kIndexInFileMessages = + 3; + + friend void swap(SnapshotTensorMetadata& a, SnapshotTensorMetadata& b) { + a.Swap(&b); + } + inline void Swap(SnapshotTensorMetadata* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(SnapshotTensorMetadata* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + SnapshotTensorMetadata* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const SnapshotTensorMetadata& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const SnapshotTensorMetadata& from) { + SnapshotTensorMetadata::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(SnapshotTensorMetadata* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.data.experimental.SnapshotTensorMetadata"; + } + protected: + explicit SnapshotTensorMetadata(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kTensorMetadataFieldNumber = 1, + }; + // repeated .tensorflow.data.experimental.TensorMetadata tensor_metadata = 1; + int tensor_metadata_size() const; + private: + int _internal_tensor_metadata_size() const; + public: + void clear_tensor_metadata(); + ::tensorflow::data::experimental::TensorMetadata* mutable_tensor_metadata(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::data::experimental::TensorMetadata >* + mutable_tensor_metadata(); + private: + const ::tensorflow::data::experimental::TensorMetadata& _internal_tensor_metadata(int index) const; + ::tensorflow::data::experimental::TensorMetadata* _internal_add_tensor_metadata(); + public: + const ::tensorflow::data::experimental::TensorMetadata& tensor_metadata(int index) const; + ::tensorflow::data::experimental::TensorMetadata* add_tensor_metadata(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::data::experimental::TensorMetadata >& + tensor_metadata() const; + + // @@protoc_insertion_point(class_scope:tensorflow.data.experimental.SnapshotTensorMetadata) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::data::experimental::TensorMetadata > tensor_metadata_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fsnapshot_2eproto; +}; +// ------------------------------------------------------------------- + +class DistributedSnapshotMetadata final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.data.experimental.DistributedSnapshotMetadata) */ { + public: + inline DistributedSnapshotMetadata() : DistributedSnapshotMetadata(nullptr) {} + ~DistributedSnapshotMetadata() override; + explicit PROTOBUF_CONSTEXPR DistributedSnapshotMetadata(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + DistributedSnapshotMetadata(const DistributedSnapshotMetadata& from); + DistributedSnapshotMetadata(DistributedSnapshotMetadata&& from) noexcept + : DistributedSnapshotMetadata() { + *this = ::std::move(from); + } + + inline DistributedSnapshotMetadata& operator=(const DistributedSnapshotMetadata& from) { + CopyFrom(from); + return *this; + } + inline DistributedSnapshotMetadata& operator=(DistributedSnapshotMetadata&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const DistributedSnapshotMetadata& default_instance() { + return *internal_default_instance(); + } + static inline const DistributedSnapshotMetadata* internal_default_instance() { + return reinterpret_cast( + &_DistributedSnapshotMetadata_default_instance_); + } + static constexpr int kIndexInFileMessages = + 4; + + friend void swap(DistributedSnapshotMetadata& a, DistributedSnapshotMetadata& b) { + a.Swap(&b); + } + inline void Swap(DistributedSnapshotMetadata* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(DistributedSnapshotMetadata* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + DistributedSnapshotMetadata* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const DistributedSnapshotMetadata& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const DistributedSnapshotMetadata& from) { + DistributedSnapshotMetadata::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(DistributedSnapshotMetadata* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.data.experimental.DistributedSnapshotMetadata"; + } + protected: + explicit DistributedSnapshotMetadata(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kElementSpecFieldNumber = 1, + kCompressionFieldNumber = 2, + }; + // bytes element_spec = 1; + void clear_element_spec(); + const std::string& element_spec() const; + template + void set_element_spec(ArgT0&& arg0, ArgT... args); + std::string* mutable_element_spec(); + PROTOBUF_NODISCARD std::string* release_element_spec(); + void set_allocated_element_spec(std::string* element_spec); + private: + const std::string& _internal_element_spec() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_element_spec(const std::string& value); + std::string* _internal_mutable_element_spec(); + public: + + // string compression = 2; + void clear_compression(); + const std::string& compression() const; + template + void set_compression(ArgT0&& arg0, ArgT... args); + std::string* mutable_compression(); + PROTOBUF_NODISCARD std::string* release_compression(); + void set_allocated_compression(std::string* compression); + private: + const std::string& _internal_compression() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_compression(const std::string& value); + std::string* _internal_mutable_compression(); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.data.experimental.DistributedSnapshotMetadata) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr element_spec_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr compression_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fsnapshot_2eproto; +}; +// =================================================================== + + +// =================================================================== + +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// SnapshotRecord + +// repeated .tensorflow.TensorProto tensor = 1; +inline int SnapshotRecord::_internal_tensor_size() const { + return _impl_.tensor_.size(); +} +inline int SnapshotRecord::tensor_size() const { + return _internal_tensor_size(); +} +inline ::tensorflow::TensorProto* SnapshotRecord::mutable_tensor(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.data.experimental.SnapshotRecord.tensor) + return _impl_.tensor_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::TensorProto >* +SnapshotRecord::mutable_tensor() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.data.experimental.SnapshotRecord.tensor) + return &_impl_.tensor_; +} +inline const ::tensorflow::TensorProto& SnapshotRecord::_internal_tensor(int index) const { + return _impl_.tensor_.Get(index); +} +inline const ::tensorflow::TensorProto& SnapshotRecord::tensor(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.data.experimental.SnapshotRecord.tensor) + return _internal_tensor(index); +} +inline ::tensorflow::TensorProto* SnapshotRecord::_internal_add_tensor() { + return _impl_.tensor_.Add(); +} +inline ::tensorflow::TensorProto* SnapshotRecord::add_tensor() { + ::tensorflow::TensorProto* _add = _internal_add_tensor(); + // @@protoc_insertion_point(field_add:tensorflow.data.experimental.SnapshotRecord.tensor) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::TensorProto >& +SnapshotRecord::tensor() const { + // @@protoc_insertion_point(field_list:tensorflow.data.experimental.SnapshotRecord.tensor) + return _impl_.tensor_; +} + +// ------------------------------------------------------------------- + +// SnapshotMetadataRecord + +// string graph_hash = 1; +inline void SnapshotMetadataRecord::clear_graph_hash() { + _impl_.graph_hash_.ClearToEmpty(); +} +inline const std::string& SnapshotMetadataRecord::graph_hash() const { + // @@protoc_insertion_point(field_get:tensorflow.data.experimental.SnapshotMetadataRecord.graph_hash) + return _internal_graph_hash(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void SnapshotMetadataRecord::set_graph_hash(ArgT0&& arg0, ArgT... args) { + + _impl_.graph_hash_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.data.experimental.SnapshotMetadataRecord.graph_hash) +} +inline std::string* SnapshotMetadataRecord::mutable_graph_hash() { + std::string* _s = _internal_mutable_graph_hash(); + // @@protoc_insertion_point(field_mutable:tensorflow.data.experimental.SnapshotMetadataRecord.graph_hash) + return _s; +} +inline const std::string& SnapshotMetadataRecord::_internal_graph_hash() const { + return _impl_.graph_hash_.Get(); +} +inline void SnapshotMetadataRecord::_internal_set_graph_hash(const std::string& value) { + + _impl_.graph_hash_.Set(value, GetArenaForAllocation()); +} +inline std::string* SnapshotMetadataRecord::_internal_mutable_graph_hash() { + + return _impl_.graph_hash_.Mutable(GetArenaForAllocation()); +} +inline std::string* SnapshotMetadataRecord::release_graph_hash() { + // @@protoc_insertion_point(field_release:tensorflow.data.experimental.SnapshotMetadataRecord.graph_hash) + return _impl_.graph_hash_.Release(); +} +inline void SnapshotMetadataRecord::set_allocated_graph_hash(std::string* graph_hash) { + if (graph_hash != nullptr) { + + } else { + + } + _impl_.graph_hash_.SetAllocated(graph_hash, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.graph_hash_.IsDefault()) { + _impl_.graph_hash_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.data.experimental.SnapshotMetadataRecord.graph_hash) +} + +// string run_id = 2; +inline void SnapshotMetadataRecord::clear_run_id() { + _impl_.run_id_.ClearToEmpty(); +} +inline const std::string& SnapshotMetadataRecord::run_id() const { + // @@protoc_insertion_point(field_get:tensorflow.data.experimental.SnapshotMetadataRecord.run_id) + return _internal_run_id(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void SnapshotMetadataRecord::set_run_id(ArgT0&& arg0, ArgT... args) { + + _impl_.run_id_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.data.experimental.SnapshotMetadataRecord.run_id) +} +inline std::string* SnapshotMetadataRecord::mutable_run_id() { + std::string* _s = _internal_mutable_run_id(); + // @@protoc_insertion_point(field_mutable:tensorflow.data.experimental.SnapshotMetadataRecord.run_id) + return _s; +} +inline const std::string& SnapshotMetadataRecord::_internal_run_id() const { + return _impl_.run_id_.Get(); +} +inline void SnapshotMetadataRecord::_internal_set_run_id(const std::string& value) { + + _impl_.run_id_.Set(value, GetArenaForAllocation()); +} +inline std::string* SnapshotMetadataRecord::_internal_mutable_run_id() { + + return _impl_.run_id_.Mutable(GetArenaForAllocation()); +} +inline std::string* SnapshotMetadataRecord::release_run_id() { + // @@protoc_insertion_point(field_release:tensorflow.data.experimental.SnapshotMetadataRecord.run_id) + return _impl_.run_id_.Release(); +} +inline void SnapshotMetadataRecord::set_allocated_run_id(std::string* run_id) { + if (run_id != nullptr) { + + } else { + + } + _impl_.run_id_.SetAllocated(run_id, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.run_id_.IsDefault()) { + _impl_.run_id_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.data.experimental.SnapshotMetadataRecord.run_id) +} + +// int64 creation_timestamp = 3; +inline void SnapshotMetadataRecord::clear_creation_timestamp() { + _impl_.creation_timestamp_ = int64_t{0}; +} +inline int64_t SnapshotMetadataRecord::_internal_creation_timestamp() const { + return _impl_.creation_timestamp_; +} +inline int64_t SnapshotMetadataRecord::creation_timestamp() const { + // @@protoc_insertion_point(field_get:tensorflow.data.experimental.SnapshotMetadataRecord.creation_timestamp) + return _internal_creation_timestamp(); +} +inline void SnapshotMetadataRecord::_internal_set_creation_timestamp(int64_t value) { + + _impl_.creation_timestamp_ = value; +} +inline void SnapshotMetadataRecord::set_creation_timestamp(int64_t value) { + _internal_set_creation_timestamp(value); + // @@protoc_insertion_point(field_set:tensorflow.data.experimental.SnapshotMetadataRecord.creation_timestamp) +} + +// int64 version = 4; +inline void SnapshotMetadataRecord::clear_version() { + _impl_.version_ = int64_t{0}; +} +inline int64_t SnapshotMetadataRecord::_internal_version() const { + return _impl_.version_; +} +inline int64_t SnapshotMetadataRecord::version() const { + // @@protoc_insertion_point(field_get:tensorflow.data.experimental.SnapshotMetadataRecord.version) + return _internal_version(); +} +inline void SnapshotMetadataRecord::_internal_set_version(int64_t value) { + + _impl_.version_ = value; +} +inline void SnapshotMetadataRecord::set_version(int64_t value) { + _internal_set_version(value); + // @@protoc_insertion_point(field_set:tensorflow.data.experimental.SnapshotMetadataRecord.version) +} + +// repeated .tensorflow.DataType dtype = 5; +inline int SnapshotMetadataRecord::_internal_dtype_size() const { + return _impl_.dtype_.size(); +} +inline int SnapshotMetadataRecord::dtype_size() const { + return _internal_dtype_size(); +} +inline void SnapshotMetadataRecord::clear_dtype() { + _impl_.dtype_.Clear(); +} +inline ::tensorflow::DataType SnapshotMetadataRecord::_internal_dtype(int index) const { + return static_cast< ::tensorflow::DataType >(_impl_.dtype_.Get(index)); +} +inline ::tensorflow::DataType SnapshotMetadataRecord::dtype(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.data.experimental.SnapshotMetadataRecord.dtype) + return _internal_dtype(index); +} +inline void SnapshotMetadataRecord::set_dtype(int index, ::tensorflow::DataType value) { + _impl_.dtype_.Set(index, value); + // @@protoc_insertion_point(field_set:tensorflow.data.experimental.SnapshotMetadataRecord.dtype) +} +inline void SnapshotMetadataRecord::_internal_add_dtype(::tensorflow::DataType value) { + _impl_.dtype_.Add(value); +} +inline void SnapshotMetadataRecord::add_dtype(::tensorflow::DataType value) { + _internal_add_dtype(value); + // @@protoc_insertion_point(field_add:tensorflow.data.experimental.SnapshotMetadataRecord.dtype) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField& +SnapshotMetadataRecord::dtype() const { + // @@protoc_insertion_point(field_list:tensorflow.data.experimental.SnapshotMetadataRecord.dtype) + return _impl_.dtype_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField* +SnapshotMetadataRecord::_internal_mutable_dtype() { + return &_impl_.dtype_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField* +SnapshotMetadataRecord::mutable_dtype() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.data.experimental.SnapshotMetadataRecord.dtype) + return _internal_mutable_dtype(); +} + +// int64 num_elements = 6; +inline void SnapshotMetadataRecord::clear_num_elements() { + _impl_.num_elements_ = int64_t{0}; +} +inline int64_t SnapshotMetadataRecord::_internal_num_elements() const { + return _impl_.num_elements_; +} +inline int64_t SnapshotMetadataRecord::num_elements() const { + // @@protoc_insertion_point(field_get:tensorflow.data.experimental.SnapshotMetadataRecord.num_elements) + return _internal_num_elements(); +} +inline void SnapshotMetadataRecord::_internal_set_num_elements(int64_t value) { + + _impl_.num_elements_ = value; +} +inline void SnapshotMetadataRecord::set_num_elements(int64_t value) { + _internal_set_num_elements(value); + // @@protoc_insertion_point(field_set:tensorflow.data.experimental.SnapshotMetadataRecord.num_elements) +} + +// bool finalized = 1000; +inline void SnapshotMetadataRecord::clear_finalized() { + _impl_.finalized_ = false; +} +inline bool SnapshotMetadataRecord::_internal_finalized() const { + return _impl_.finalized_; +} +inline bool SnapshotMetadataRecord::finalized() const { + // @@protoc_insertion_point(field_get:tensorflow.data.experimental.SnapshotMetadataRecord.finalized) + return _internal_finalized(); +} +inline void SnapshotMetadataRecord::_internal_set_finalized(bool value) { + + _impl_.finalized_ = value; +} +inline void SnapshotMetadataRecord::set_finalized(bool value) { + _internal_set_finalized(value); + // @@protoc_insertion_point(field_set:tensorflow.data.experimental.SnapshotMetadataRecord.finalized) +} + +// ------------------------------------------------------------------- + +// TensorMetadata + +// .tensorflow.TensorShapeProto tensor_shape = 2; +inline bool TensorMetadata::_internal_has_tensor_shape() const { + return this != internal_default_instance() && _impl_.tensor_shape_ != nullptr; +} +inline bool TensorMetadata::has_tensor_shape() const { + return _internal_has_tensor_shape(); +} +inline const ::tensorflow::TensorShapeProto& TensorMetadata::_internal_tensor_shape() const { + const ::tensorflow::TensorShapeProto* p = _impl_.tensor_shape_; + return p != nullptr ? *p : reinterpret_cast( + ::tensorflow::_TensorShapeProto_default_instance_); +} +inline const ::tensorflow::TensorShapeProto& TensorMetadata::tensor_shape() const { + // @@protoc_insertion_point(field_get:tensorflow.data.experimental.TensorMetadata.tensor_shape) + return _internal_tensor_shape(); +} +inline void TensorMetadata::unsafe_arena_set_allocated_tensor_shape( + ::tensorflow::TensorShapeProto* tensor_shape) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.tensor_shape_); + } + _impl_.tensor_shape_ = tensor_shape; + if (tensor_shape) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.data.experimental.TensorMetadata.tensor_shape) +} +inline ::tensorflow::TensorShapeProto* TensorMetadata::release_tensor_shape() { + + ::tensorflow::TensorShapeProto* temp = _impl_.tensor_shape_; + _impl_.tensor_shape_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tensorflow::TensorShapeProto* TensorMetadata::unsafe_arena_release_tensor_shape() { + // @@protoc_insertion_point(field_release:tensorflow.data.experimental.TensorMetadata.tensor_shape) + + ::tensorflow::TensorShapeProto* temp = _impl_.tensor_shape_; + _impl_.tensor_shape_ = nullptr; + return temp; +} +inline ::tensorflow::TensorShapeProto* TensorMetadata::_internal_mutable_tensor_shape() { + + if (_impl_.tensor_shape_ == nullptr) { + auto* p = CreateMaybeMessage<::tensorflow::TensorShapeProto>(GetArenaForAllocation()); + _impl_.tensor_shape_ = p; + } + return _impl_.tensor_shape_; +} +inline ::tensorflow::TensorShapeProto* TensorMetadata::mutable_tensor_shape() { + ::tensorflow::TensorShapeProto* _msg = _internal_mutable_tensor_shape(); + // @@protoc_insertion_point(field_mutable:tensorflow.data.experimental.TensorMetadata.tensor_shape) + return _msg; +} +inline void TensorMetadata::set_allocated_tensor_shape(::tensorflow::TensorShapeProto* tensor_shape) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.tensor_shape_); + } + if (tensor_shape) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( + reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(tensor_shape)); + if (message_arena != submessage_arena) { + tensor_shape = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, tensor_shape, submessage_arena); + } + + } else { + + } + _impl_.tensor_shape_ = tensor_shape; + // @@protoc_insertion_point(field_set_allocated:tensorflow.data.experimental.TensorMetadata.tensor_shape) +} + +// int64 tensor_size_bytes = 3; +inline void TensorMetadata::clear_tensor_size_bytes() { + _impl_.tensor_size_bytes_ = int64_t{0}; +} +inline int64_t TensorMetadata::_internal_tensor_size_bytes() const { + return _impl_.tensor_size_bytes_; +} +inline int64_t TensorMetadata::tensor_size_bytes() const { + // @@protoc_insertion_point(field_get:tensorflow.data.experimental.TensorMetadata.tensor_size_bytes) + return _internal_tensor_size_bytes(); +} +inline void TensorMetadata::_internal_set_tensor_size_bytes(int64_t value) { + + _impl_.tensor_size_bytes_ = value; +} +inline void TensorMetadata::set_tensor_size_bytes(int64_t value) { + _internal_set_tensor_size_bytes(value); + // @@protoc_insertion_point(field_set:tensorflow.data.experimental.TensorMetadata.tensor_size_bytes) +} + +// ------------------------------------------------------------------- + +// SnapshotTensorMetadata + +// repeated .tensorflow.data.experimental.TensorMetadata tensor_metadata = 1; +inline int SnapshotTensorMetadata::_internal_tensor_metadata_size() const { + return _impl_.tensor_metadata_.size(); +} +inline int SnapshotTensorMetadata::tensor_metadata_size() const { + return _internal_tensor_metadata_size(); +} +inline void SnapshotTensorMetadata::clear_tensor_metadata() { + _impl_.tensor_metadata_.Clear(); +} +inline ::tensorflow::data::experimental::TensorMetadata* SnapshotTensorMetadata::mutable_tensor_metadata(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.data.experimental.SnapshotTensorMetadata.tensor_metadata) + return _impl_.tensor_metadata_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::data::experimental::TensorMetadata >* +SnapshotTensorMetadata::mutable_tensor_metadata() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.data.experimental.SnapshotTensorMetadata.tensor_metadata) + return &_impl_.tensor_metadata_; +} +inline const ::tensorflow::data::experimental::TensorMetadata& SnapshotTensorMetadata::_internal_tensor_metadata(int index) const { + return _impl_.tensor_metadata_.Get(index); +} +inline const ::tensorflow::data::experimental::TensorMetadata& SnapshotTensorMetadata::tensor_metadata(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.data.experimental.SnapshotTensorMetadata.tensor_metadata) + return _internal_tensor_metadata(index); +} +inline ::tensorflow::data::experimental::TensorMetadata* SnapshotTensorMetadata::_internal_add_tensor_metadata() { + return _impl_.tensor_metadata_.Add(); +} +inline ::tensorflow::data::experimental::TensorMetadata* SnapshotTensorMetadata::add_tensor_metadata() { + ::tensorflow::data::experimental::TensorMetadata* _add = _internal_add_tensor_metadata(); + // @@protoc_insertion_point(field_add:tensorflow.data.experimental.SnapshotTensorMetadata.tensor_metadata) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::data::experimental::TensorMetadata >& +SnapshotTensorMetadata::tensor_metadata() const { + // @@protoc_insertion_point(field_list:tensorflow.data.experimental.SnapshotTensorMetadata.tensor_metadata) + return _impl_.tensor_metadata_; +} + +// ------------------------------------------------------------------- + +// DistributedSnapshotMetadata + +// bytes element_spec = 1; +inline void DistributedSnapshotMetadata::clear_element_spec() { + _impl_.element_spec_.ClearToEmpty(); +} +inline const std::string& DistributedSnapshotMetadata::element_spec() const { + // @@protoc_insertion_point(field_get:tensorflow.data.experimental.DistributedSnapshotMetadata.element_spec) + return _internal_element_spec(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void DistributedSnapshotMetadata::set_element_spec(ArgT0&& arg0, ArgT... args) { + + _impl_.element_spec_.SetBytes(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.data.experimental.DistributedSnapshotMetadata.element_spec) +} +inline std::string* DistributedSnapshotMetadata::mutable_element_spec() { + std::string* _s = _internal_mutable_element_spec(); + // @@protoc_insertion_point(field_mutable:tensorflow.data.experimental.DistributedSnapshotMetadata.element_spec) + return _s; +} +inline const std::string& DistributedSnapshotMetadata::_internal_element_spec() const { + return _impl_.element_spec_.Get(); +} +inline void DistributedSnapshotMetadata::_internal_set_element_spec(const std::string& value) { + + _impl_.element_spec_.Set(value, GetArenaForAllocation()); +} +inline std::string* DistributedSnapshotMetadata::_internal_mutable_element_spec() { + + return _impl_.element_spec_.Mutable(GetArenaForAllocation()); +} +inline std::string* DistributedSnapshotMetadata::release_element_spec() { + // @@protoc_insertion_point(field_release:tensorflow.data.experimental.DistributedSnapshotMetadata.element_spec) + return _impl_.element_spec_.Release(); +} +inline void DistributedSnapshotMetadata::set_allocated_element_spec(std::string* element_spec) { + if (element_spec != nullptr) { + + } else { + + } + _impl_.element_spec_.SetAllocated(element_spec, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.element_spec_.IsDefault()) { + _impl_.element_spec_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.data.experimental.DistributedSnapshotMetadata.element_spec) +} + +// string compression = 2; +inline void DistributedSnapshotMetadata::clear_compression() { + _impl_.compression_.ClearToEmpty(); +} +inline const std::string& DistributedSnapshotMetadata::compression() const { + // @@protoc_insertion_point(field_get:tensorflow.data.experimental.DistributedSnapshotMetadata.compression) + return _internal_compression(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void DistributedSnapshotMetadata::set_compression(ArgT0&& arg0, ArgT... args) { + + _impl_.compression_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.data.experimental.DistributedSnapshotMetadata.compression) +} +inline std::string* DistributedSnapshotMetadata::mutable_compression() { + std::string* _s = _internal_mutable_compression(); + // @@protoc_insertion_point(field_mutable:tensorflow.data.experimental.DistributedSnapshotMetadata.compression) + return _s; +} +inline const std::string& DistributedSnapshotMetadata::_internal_compression() const { + return _impl_.compression_.Get(); +} +inline void DistributedSnapshotMetadata::_internal_set_compression(const std::string& value) { + + _impl_.compression_.Set(value, GetArenaForAllocation()); +} +inline std::string* DistributedSnapshotMetadata::_internal_mutable_compression() { + + return _impl_.compression_.Mutable(GetArenaForAllocation()); +} +inline std::string* DistributedSnapshotMetadata::release_compression() { + // @@protoc_insertion_point(field_release:tensorflow.data.experimental.DistributedSnapshotMetadata.compression) + return _impl_.compression_.Release(); +} +inline void DistributedSnapshotMetadata::set_allocated_compression(std::string* compression) { + if (compression != nullptr) { + + } else { + + } + _impl_.compression_.SetAllocated(compression, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.compression_.IsDefault()) { + _impl_.compression_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.data.experimental.DistributedSnapshotMetadata.compression) +} + +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + + +// @@protoc_insertion_point(namespace_scope) + +} // namespace experimental +} // namespace data +} // namespace tensorflow + +// @@protoc_insertion_point(global_scope) + +#include +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprotobuf_2fsnapshot_2eproto diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/snapshot.proto b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/snapshot.proto new file mode 100644 index 0000000000000000000000000000000000000000..109f974060160bb4282baa8fb609b0f5123c37fe --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/snapshot.proto @@ -0,0 +1,58 @@ +syntax = "proto3"; + +package tensorflow.data.experimental; + +import "tensorflow/core/framework/tensor.proto"; +import "tensorflow/core/framework/tensor_shape.proto"; +import "tensorflow/core/framework/types.proto"; + +option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/protobuf/for_core_protos_go_proto"; + +// Each SnapshotRecord represents one batch of pre-processed input data. A batch +// consists of a list of tensors that we encode as TensorProtos. This message +// doesn't store the structure of the batch. +message SnapshotRecord { + repeated .tensorflow.TensorProto tensor = 1; +} + +// This stores the metadata information present in each snapshot record. +message SnapshotMetadataRecord { + // Stores the fingerprint of the graph that describes the dataset that is + // snapshotted. + string graph_hash = 1; + // Run ID that this snapshot corresponds to. + string run_id = 2; + // Time when we started creating this snapshot. + int64 creation_timestamp = 3; + // Version of the snapshot data file format. + int64 version = 4; + // A list of tensor dtype corresponding to each element of the snapshot. + repeated .tensorflow.DataType dtype = 5; + // The number of elements in the snapshot. + int64 num_elements = 6; + + bool finalized = 1000; +} + +// Metadata for a single tensor in the Snapshot Record. +message TensorMetadata { + .tensorflow.TensorShapeProto tensor_shape = 2; + // Number of uncompressed bytes used to store the tensor representation. + int64 tensor_size_bytes = 3; +} + +// Metadata for all the tensors in a Snapshot Record. +message SnapshotTensorMetadata { + repeated TensorMetadata tensor_metadata = 1; +} + +// Metadata for a `tf.data.Dataset` distributed snapshot. +message DistributedSnapshotMetadata { + // The element spec of the snapshotted dataset. + bytes element_spec = 1; + + // Whether and how to compress the snapshot. Supported values are defined in + // `tsl::io::compression`. In particular, an empty string specifies not to + // compress. + string compression = 2; +} diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/status.pb.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/status.pb.h new file mode 100644 index 0000000000000000000000000000000000000000..2048326da22c0228884f0e56dd052ba3738c083c --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/status.pb.h @@ -0,0 +1,75 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/status.proto + +#ifndef GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprotobuf_2fstatus_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprotobuf_2fstatus_2eproto + +#include +#include + +#include +#if PROTOBUF_VERSION < 3021000 +#error This file was generated by a newer version of protoc which is +#error incompatible with your Protocol Buffer headers. Please update +#error your headers. +#endif +#if 3021009 < PROTOBUF_MIN_PROTOC_VERSION +#error This file was generated by an older version of protoc which is +#error incompatible with your Protocol Buffer headers. Please +#error regenerate this file with a newer version of protoc. +#endif + +#include +#include +#include +#include +#include +#include +#include +#include // IWYU pragma: export +#include // IWYU pragma: export +#include "tsl/protobuf/status.pb.h" +// @@protoc_insertion_point(includes) +#include +#define PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2fprotobuf_2fstatus_2eproto +PROTOBUF_NAMESPACE_OPEN +namespace internal { +class AnyMetadata; +} // namespace internal +PROTOBUF_NAMESPACE_CLOSE + +// Internal implementation detail -- do not use these members. +struct TableStruct_tensorflow_2fcore_2fprotobuf_2fstatus_2eproto { + static const uint32_t offsets[]; +}; +extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_tensorflow_2fcore_2fprotobuf_2fstatus_2eproto; +PROTOBUF_NAMESPACE_OPEN +PROTOBUF_NAMESPACE_CLOSE +namespace tensorflow { +namespace dummy { + +// =================================================================== + + +// =================================================================== + + +// =================================================================== + +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ + +// @@protoc_insertion_point(namespace_scope) + +} // namespace dummy +} // namespace tensorflow + +// @@protoc_insertion_point(global_scope) + +#include +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprotobuf_2fstatus_2eproto diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/status.proto b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/status.proto new file mode 100644 index 0000000000000000000000000000000000000000..dd6f703d100ae2a4e35fe4d567ca8e782561bce9 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/status.proto @@ -0,0 +1,11 @@ +syntax = "proto3"; + +// Add a dummy package name. Having no package like +// core/lib/core/error_codes.proto, or having tensorflow like +// tsl/protobuf/error_codes.proto, results in name collision errors in generated +// code for some users that use JS through J2CL. +package tensorflow.dummy; + +import public "tsl/protobuf/status.proto"; + +option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/protobuf/for_core_protos_go_proto"; diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/struct.pb.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/struct.pb.h new file mode 100644 index 0000000000000000000000000000000000000000..39cbc2c13ed646a992491cba8a16af00e5bbcf66 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/struct.pb.h @@ -0,0 +1,4364 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/struct.proto + +#ifndef GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprotobuf_2fstruct_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprotobuf_2fstruct_2eproto + +#include +#include + +#include +#if PROTOBUF_VERSION < 3021000 +#error This file was generated by a newer version of protoc which is +#error incompatible with your Protocol Buffer headers. Please update +#error your headers. +#endif +#if 3021009 < PROTOBUF_MIN_PROTOC_VERSION +#error This file was generated by an older version of protoc which is +#error incompatible with your Protocol Buffer headers. Please +#error regenerate this file with a newer version of protoc. +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include // IWYU pragma: export +#include // IWYU pragma: export +#include // IWYU pragma: export +#include +#include +#include +#include +#include "tensorflow/core/framework/tensor.pb.h" +#include "tensorflow/core/framework/tensor_shape.pb.h" +#include "tensorflow/core/framework/types.pb.h" +// @@protoc_insertion_point(includes) +#include +#define PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2fprotobuf_2fstruct_2eproto +PROTOBUF_NAMESPACE_OPEN +namespace internal { +class AnyMetadata; +} // namespace internal +PROTOBUF_NAMESPACE_CLOSE + +// Internal implementation detail -- do not use these members. +struct TableStruct_tensorflow_2fcore_2fprotobuf_2fstruct_2eproto { + static const uint32_t offsets[]; +}; +extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_tensorflow_2fcore_2fprotobuf_2fstruct_2eproto; +namespace tensorflow { +class BoundedTensorSpecProto; +struct BoundedTensorSpecProtoDefaultTypeInternal; +extern BoundedTensorSpecProtoDefaultTypeInternal _BoundedTensorSpecProto_default_instance_; +class DictValue; +struct DictValueDefaultTypeInternal; +extern DictValueDefaultTypeInternal _DictValue_default_instance_; +class DictValue_FieldsEntry_DoNotUse; +struct DictValue_FieldsEntry_DoNotUseDefaultTypeInternal; +extern DictValue_FieldsEntry_DoNotUseDefaultTypeInternal _DictValue_FieldsEntry_DoNotUse_default_instance_; +class ListValue; +struct ListValueDefaultTypeInternal; +extern ListValueDefaultTypeInternal _ListValue_default_instance_; +class NamedTupleValue; +struct NamedTupleValueDefaultTypeInternal; +extern NamedTupleValueDefaultTypeInternal _NamedTupleValue_default_instance_; +class NoneValue; +struct NoneValueDefaultTypeInternal; +extern NoneValueDefaultTypeInternal _NoneValue_default_instance_; +class PairValue; +struct PairValueDefaultTypeInternal; +extern PairValueDefaultTypeInternal _PairValue_default_instance_; +class StructuredValue; +struct StructuredValueDefaultTypeInternal; +extern StructuredValueDefaultTypeInternal _StructuredValue_default_instance_; +class TensorSpecProto; +struct TensorSpecProtoDefaultTypeInternal; +extern TensorSpecProtoDefaultTypeInternal _TensorSpecProto_default_instance_; +class TupleValue; +struct TupleValueDefaultTypeInternal; +extern TupleValueDefaultTypeInternal _TupleValue_default_instance_; +class TypeSpecProto; +struct TypeSpecProtoDefaultTypeInternal; +extern TypeSpecProtoDefaultTypeInternal _TypeSpecProto_default_instance_; +} // namespace tensorflow +PROTOBUF_NAMESPACE_OPEN +template<> ::tensorflow::BoundedTensorSpecProto* Arena::CreateMaybeMessage<::tensorflow::BoundedTensorSpecProto>(Arena*); +template<> ::tensorflow::DictValue* Arena::CreateMaybeMessage<::tensorflow::DictValue>(Arena*); +template<> ::tensorflow::DictValue_FieldsEntry_DoNotUse* Arena::CreateMaybeMessage<::tensorflow::DictValue_FieldsEntry_DoNotUse>(Arena*); +template<> ::tensorflow::ListValue* Arena::CreateMaybeMessage<::tensorflow::ListValue>(Arena*); +template<> ::tensorflow::NamedTupleValue* Arena::CreateMaybeMessage<::tensorflow::NamedTupleValue>(Arena*); +template<> ::tensorflow::NoneValue* Arena::CreateMaybeMessage<::tensorflow::NoneValue>(Arena*); +template<> ::tensorflow::PairValue* Arena::CreateMaybeMessage<::tensorflow::PairValue>(Arena*); +template<> ::tensorflow::StructuredValue* Arena::CreateMaybeMessage<::tensorflow::StructuredValue>(Arena*); +template<> ::tensorflow::TensorSpecProto* Arena::CreateMaybeMessage<::tensorflow::TensorSpecProto>(Arena*); +template<> ::tensorflow::TupleValue* Arena::CreateMaybeMessage<::tensorflow::TupleValue>(Arena*); +template<> ::tensorflow::TypeSpecProto* Arena::CreateMaybeMessage<::tensorflow::TypeSpecProto>(Arena*); +PROTOBUF_NAMESPACE_CLOSE +namespace tensorflow { + +enum TypeSpecProto_TypeSpecClass : int { + TypeSpecProto_TypeSpecClass_UNKNOWN = 0, + TypeSpecProto_TypeSpecClass_SPARSE_TENSOR_SPEC = 1, + TypeSpecProto_TypeSpecClass_INDEXED_SLICES_SPEC = 2, + TypeSpecProto_TypeSpecClass_RAGGED_TENSOR_SPEC = 3, + TypeSpecProto_TypeSpecClass_TENSOR_ARRAY_SPEC = 4, + TypeSpecProto_TypeSpecClass_DATA_DATASET_SPEC = 5, + TypeSpecProto_TypeSpecClass_DATA_ITERATOR_SPEC = 6, + TypeSpecProto_TypeSpecClass_OPTIONAL_SPEC = 7, + TypeSpecProto_TypeSpecClass_PER_REPLICA_SPEC = 8, + TypeSpecProto_TypeSpecClass_VARIABLE_SPEC = 9, + TypeSpecProto_TypeSpecClass_ROW_PARTITION_SPEC = 10, + TypeSpecProto_TypeSpecClass_REGISTERED_TYPE_SPEC = 12, + TypeSpecProto_TypeSpecClass_EXTENSION_TYPE_SPEC = 13, + TypeSpecProto_TypeSpecClass_TypeSpecProto_TypeSpecClass_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits::min(), + TypeSpecProto_TypeSpecClass_TypeSpecProto_TypeSpecClass_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits::max() +}; +bool TypeSpecProto_TypeSpecClass_IsValid(int value); +constexpr TypeSpecProto_TypeSpecClass TypeSpecProto_TypeSpecClass_TypeSpecClass_MIN = TypeSpecProto_TypeSpecClass_UNKNOWN; +constexpr TypeSpecProto_TypeSpecClass TypeSpecProto_TypeSpecClass_TypeSpecClass_MAX = TypeSpecProto_TypeSpecClass_EXTENSION_TYPE_SPEC; +constexpr int TypeSpecProto_TypeSpecClass_TypeSpecClass_ARRAYSIZE = TypeSpecProto_TypeSpecClass_TypeSpecClass_MAX + 1; + +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* TypeSpecProto_TypeSpecClass_descriptor(); +template +inline const std::string& TypeSpecProto_TypeSpecClass_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function TypeSpecProto_TypeSpecClass_Name."); + return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( + TypeSpecProto_TypeSpecClass_descriptor(), enum_t_value); +} +inline bool TypeSpecProto_TypeSpecClass_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, TypeSpecProto_TypeSpecClass* value) { + return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( + TypeSpecProto_TypeSpecClass_descriptor(), name, value); +} +// =================================================================== + +class StructuredValue final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.StructuredValue) */ { + public: + inline StructuredValue() : StructuredValue(nullptr) {} + ~StructuredValue() override; + explicit PROTOBUF_CONSTEXPR StructuredValue(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + StructuredValue(const StructuredValue& from); + StructuredValue(StructuredValue&& from) noexcept + : StructuredValue() { + *this = ::std::move(from); + } + + inline StructuredValue& operator=(const StructuredValue& from) { + CopyFrom(from); + return *this; + } + inline StructuredValue& operator=(StructuredValue&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const StructuredValue& default_instance() { + return *internal_default_instance(); + } + enum KindCase { + kNoneValue = 1, + kFloat64Value = 11, + kInt64Value = 12, + kStringValue = 13, + kBoolValue = 14, + kTensorShapeValue = 31, + kTensorDtypeValue = 32, + kTensorSpecValue = 33, + kTypeSpecValue = 34, + kBoundedTensorSpecValue = 35, + kListValue = 51, + kTupleValue = 52, + kDictValue = 53, + kNamedTupleValue = 54, + kTensorValue = 55, + kNumpyValue = 56, + KIND_NOT_SET = 0, + }; + + static inline const StructuredValue* internal_default_instance() { + return reinterpret_cast( + &_StructuredValue_default_instance_); + } + static constexpr int kIndexInFileMessages = + 0; + + friend void swap(StructuredValue& a, StructuredValue& b) { + a.Swap(&b); + } + inline void Swap(StructuredValue* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(StructuredValue* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + StructuredValue* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const StructuredValue& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const StructuredValue& from) { + StructuredValue::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(StructuredValue* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.StructuredValue"; + } + protected: + explicit StructuredValue(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kNoneValueFieldNumber = 1, + kFloat64ValueFieldNumber = 11, + kInt64ValueFieldNumber = 12, + kStringValueFieldNumber = 13, + kBoolValueFieldNumber = 14, + kTensorShapeValueFieldNumber = 31, + kTensorDtypeValueFieldNumber = 32, + kTensorSpecValueFieldNumber = 33, + kTypeSpecValueFieldNumber = 34, + kBoundedTensorSpecValueFieldNumber = 35, + kListValueFieldNumber = 51, + kTupleValueFieldNumber = 52, + kDictValueFieldNumber = 53, + kNamedTupleValueFieldNumber = 54, + kTensorValueFieldNumber = 55, + kNumpyValueFieldNumber = 56, + }; + // .tensorflow.NoneValue none_value = 1; + bool has_none_value() const; + private: + bool _internal_has_none_value() const; + public: + void clear_none_value(); + const ::tensorflow::NoneValue& none_value() const; + PROTOBUF_NODISCARD ::tensorflow::NoneValue* release_none_value(); + ::tensorflow::NoneValue* mutable_none_value(); + void set_allocated_none_value(::tensorflow::NoneValue* none_value); + private: + const ::tensorflow::NoneValue& _internal_none_value() const; + ::tensorflow::NoneValue* _internal_mutable_none_value(); + public: + void unsafe_arena_set_allocated_none_value( + ::tensorflow::NoneValue* none_value); + ::tensorflow::NoneValue* unsafe_arena_release_none_value(); + + // double float64_value = 11; + bool has_float64_value() const; + private: + bool _internal_has_float64_value() const; + public: + void clear_float64_value(); + double float64_value() const; + void set_float64_value(double value); + private: + double _internal_float64_value() const; + void _internal_set_float64_value(double value); + public: + + // sint64 int64_value = 12; + bool has_int64_value() const; + private: + bool _internal_has_int64_value() const; + public: + void clear_int64_value(); + int64_t int64_value() const; + void set_int64_value(int64_t value); + private: + int64_t _internal_int64_value() const; + void _internal_set_int64_value(int64_t value); + public: + + // string string_value = 13; + bool has_string_value() const; + private: + bool _internal_has_string_value() const; + public: + void clear_string_value(); + const std::string& string_value() const; + template + void set_string_value(ArgT0&& arg0, ArgT... args); + std::string* mutable_string_value(); + PROTOBUF_NODISCARD std::string* release_string_value(); + void set_allocated_string_value(std::string* string_value); + private: + const std::string& _internal_string_value() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_string_value(const std::string& value); + std::string* _internal_mutable_string_value(); + public: + + // bool bool_value = 14; + bool has_bool_value() const; + private: + bool _internal_has_bool_value() const; + public: + void clear_bool_value(); + bool bool_value() const; + void set_bool_value(bool value); + private: + bool _internal_bool_value() const; + void _internal_set_bool_value(bool value); + public: + + // .tensorflow.TensorShapeProto tensor_shape_value = 31; + bool has_tensor_shape_value() const; + private: + bool _internal_has_tensor_shape_value() const; + public: + void clear_tensor_shape_value(); + const ::tensorflow::TensorShapeProto& tensor_shape_value() const; + PROTOBUF_NODISCARD ::tensorflow::TensorShapeProto* release_tensor_shape_value(); + ::tensorflow::TensorShapeProto* mutable_tensor_shape_value(); + void set_allocated_tensor_shape_value(::tensorflow::TensorShapeProto* tensor_shape_value); + private: + const ::tensorflow::TensorShapeProto& _internal_tensor_shape_value() const; + ::tensorflow::TensorShapeProto* _internal_mutable_tensor_shape_value(); + public: + void unsafe_arena_set_allocated_tensor_shape_value( + ::tensorflow::TensorShapeProto* tensor_shape_value); + ::tensorflow::TensorShapeProto* unsafe_arena_release_tensor_shape_value(); + + // .tensorflow.DataType tensor_dtype_value = 32; + bool has_tensor_dtype_value() const; + private: + bool _internal_has_tensor_dtype_value() const; + public: + void clear_tensor_dtype_value(); + ::tensorflow::DataType tensor_dtype_value() const; + void set_tensor_dtype_value(::tensorflow::DataType value); + private: + ::tensorflow::DataType _internal_tensor_dtype_value() const; + void _internal_set_tensor_dtype_value(::tensorflow::DataType value); + public: + + // .tensorflow.TensorSpecProto tensor_spec_value = 33; + bool has_tensor_spec_value() const; + private: + bool _internal_has_tensor_spec_value() const; + public: + void clear_tensor_spec_value(); + const ::tensorflow::TensorSpecProto& tensor_spec_value() const; + PROTOBUF_NODISCARD ::tensorflow::TensorSpecProto* release_tensor_spec_value(); + ::tensorflow::TensorSpecProto* mutable_tensor_spec_value(); + void set_allocated_tensor_spec_value(::tensorflow::TensorSpecProto* tensor_spec_value); + private: + const ::tensorflow::TensorSpecProto& _internal_tensor_spec_value() const; + ::tensorflow::TensorSpecProto* _internal_mutable_tensor_spec_value(); + public: + void unsafe_arena_set_allocated_tensor_spec_value( + ::tensorflow::TensorSpecProto* tensor_spec_value); + ::tensorflow::TensorSpecProto* unsafe_arena_release_tensor_spec_value(); + + // .tensorflow.TypeSpecProto type_spec_value = 34; + bool has_type_spec_value() const; + private: + bool _internal_has_type_spec_value() const; + public: + void clear_type_spec_value(); + const ::tensorflow::TypeSpecProto& type_spec_value() const; + PROTOBUF_NODISCARD ::tensorflow::TypeSpecProto* release_type_spec_value(); + ::tensorflow::TypeSpecProto* mutable_type_spec_value(); + void set_allocated_type_spec_value(::tensorflow::TypeSpecProto* type_spec_value); + private: + const ::tensorflow::TypeSpecProto& _internal_type_spec_value() const; + ::tensorflow::TypeSpecProto* _internal_mutable_type_spec_value(); + public: + void unsafe_arena_set_allocated_type_spec_value( + ::tensorflow::TypeSpecProto* type_spec_value); + ::tensorflow::TypeSpecProto* unsafe_arena_release_type_spec_value(); + + // .tensorflow.BoundedTensorSpecProto bounded_tensor_spec_value = 35; + bool has_bounded_tensor_spec_value() const; + private: + bool _internal_has_bounded_tensor_spec_value() const; + public: + void clear_bounded_tensor_spec_value(); + const ::tensorflow::BoundedTensorSpecProto& bounded_tensor_spec_value() const; + PROTOBUF_NODISCARD ::tensorflow::BoundedTensorSpecProto* release_bounded_tensor_spec_value(); + ::tensorflow::BoundedTensorSpecProto* mutable_bounded_tensor_spec_value(); + void set_allocated_bounded_tensor_spec_value(::tensorflow::BoundedTensorSpecProto* bounded_tensor_spec_value); + private: + const ::tensorflow::BoundedTensorSpecProto& _internal_bounded_tensor_spec_value() const; + ::tensorflow::BoundedTensorSpecProto* _internal_mutable_bounded_tensor_spec_value(); + public: + void unsafe_arena_set_allocated_bounded_tensor_spec_value( + ::tensorflow::BoundedTensorSpecProto* bounded_tensor_spec_value); + ::tensorflow::BoundedTensorSpecProto* unsafe_arena_release_bounded_tensor_spec_value(); + + // .tensorflow.ListValue list_value = 51; + bool has_list_value() const; + private: + bool _internal_has_list_value() const; + public: + void clear_list_value(); + const ::tensorflow::ListValue& list_value() const; + PROTOBUF_NODISCARD ::tensorflow::ListValue* release_list_value(); + ::tensorflow::ListValue* mutable_list_value(); + void set_allocated_list_value(::tensorflow::ListValue* list_value); + private: + const ::tensorflow::ListValue& _internal_list_value() const; + ::tensorflow::ListValue* _internal_mutable_list_value(); + public: + void unsafe_arena_set_allocated_list_value( + ::tensorflow::ListValue* list_value); + ::tensorflow::ListValue* unsafe_arena_release_list_value(); + + // .tensorflow.TupleValue tuple_value = 52; + bool has_tuple_value() const; + private: + bool _internal_has_tuple_value() const; + public: + void clear_tuple_value(); + const ::tensorflow::TupleValue& tuple_value() const; + PROTOBUF_NODISCARD ::tensorflow::TupleValue* release_tuple_value(); + ::tensorflow::TupleValue* mutable_tuple_value(); + void set_allocated_tuple_value(::tensorflow::TupleValue* tuple_value); + private: + const ::tensorflow::TupleValue& _internal_tuple_value() const; + ::tensorflow::TupleValue* _internal_mutable_tuple_value(); + public: + void unsafe_arena_set_allocated_tuple_value( + ::tensorflow::TupleValue* tuple_value); + ::tensorflow::TupleValue* unsafe_arena_release_tuple_value(); + + // .tensorflow.DictValue dict_value = 53; + bool has_dict_value() const; + private: + bool _internal_has_dict_value() const; + public: + void clear_dict_value(); + const ::tensorflow::DictValue& dict_value() const; + PROTOBUF_NODISCARD ::tensorflow::DictValue* release_dict_value(); + ::tensorflow::DictValue* mutable_dict_value(); + void set_allocated_dict_value(::tensorflow::DictValue* dict_value); + private: + const ::tensorflow::DictValue& _internal_dict_value() const; + ::tensorflow::DictValue* _internal_mutable_dict_value(); + public: + void unsafe_arena_set_allocated_dict_value( + ::tensorflow::DictValue* dict_value); + ::tensorflow::DictValue* unsafe_arena_release_dict_value(); + + // .tensorflow.NamedTupleValue named_tuple_value = 54; + bool has_named_tuple_value() const; + private: + bool _internal_has_named_tuple_value() const; + public: + void clear_named_tuple_value(); + const ::tensorflow::NamedTupleValue& named_tuple_value() const; + PROTOBUF_NODISCARD ::tensorflow::NamedTupleValue* release_named_tuple_value(); + ::tensorflow::NamedTupleValue* mutable_named_tuple_value(); + void set_allocated_named_tuple_value(::tensorflow::NamedTupleValue* named_tuple_value); + private: + const ::tensorflow::NamedTupleValue& _internal_named_tuple_value() const; + ::tensorflow::NamedTupleValue* _internal_mutable_named_tuple_value(); + public: + void unsafe_arena_set_allocated_named_tuple_value( + ::tensorflow::NamedTupleValue* named_tuple_value); + ::tensorflow::NamedTupleValue* unsafe_arena_release_named_tuple_value(); + + // .tensorflow.TensorProto tensor_value = 55; + bool has_tensor_value() const; + private: + bool _internal_has_tensor_value() const; + public: + void clear_tensor_value(); + const ::tensorflow::TensorProto& tensor_value() const; + PROTOBUF_NODISCARD ::tensorflow::TensorProto* release_tensor_value(); + ::tensorflow::TensorProto* mutable_tensor_value(); + void set_allocated_tensor_value(::tensorflow::TensorProto* tensor_value); + private: + const ::tensorflow::TensorProto& _internal_tensor_value() const; + ::tensorflow::TensorProto* _internal_mutable_tensor_value(); + public: + void unsafe_arena_set_allocated_tensor_value( + ::tensorflow::TensorProto* tensor_value); + ::tensorflow::TensorProto* unsafe_arena_release_tensor_value(); + + // .tensorflow.TensorProto numpy_value = 56; + bool has_numpy_value() const; + private: + bool _internal_has_numpy_value() const; + public: + void clear_numpy_value(); + const ::tensorflow::TensorProto& numpy_value() const; + PROTOBUF_NODISCARD ::tensorflow::TensorProto* release_numpy_value(); + ::tensorflow::TensorProto* mutable_numpy_value(); + void set_allocated_numpy_value(::tensorflow::TensorProto* numpy_value); + private: + const ::tensorflow::TensorProto& _internal_numpy_value() const; + ::tensorflow::TensorProto* _internal_mutable_numpy_value(); + public: + void unsafe_arena_set_allocated_numpy_value( + ::tensorflow::TensorProto* numpy_value); + ::tensorflow::TensorProto* unsafe_arena_release_numpy_value(); + + void clear_kind(); + KindCase kind_case() const; + // @@protoc_insertion_point(class_scope:tensorflow.StructuredValue) + private: + class _Internal; + void set_has_none_value(); + void set_has_float64_value(); + void set_has_int64_value(); + void set_has_string_value(); + void set_has_bool_value(); + void set_has_tensor_shape_value(); + void set_has_tensor_dtype_value(); + void set_has_tensor_spec_value(); + void set_has_type_spec_value(); + void set_has_bounded_tensor_spec_value(); + void set_has_list_value(); + void set_has_tuple_value(); + void set_has_dict_value(); + void set_has_named_tuple_value(); + void set_has_tensor_value(); + void set_has_numpy_value(); + + inline bool has_kind() const; + inline void clear_has_kind(); + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + union KindUnion { + constexpr KindUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + ::tensorflow::NoneValue* none_value_; + double float64_value_; + int64_t int64_value_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr string_value_; + bool bool_value_; + ::tensorflow::TensorShapeProto* tensor_shape_value_; + int tensor_dtype_value_; + ::tensorflow::TensorSpecProto* tensor_spec_value_; + ::tensorflow::TypeSpecProto* type_spec_value_; + ::tensorflow::BoundedTensorSpecProto* bounded_tensor_spec_value_; + ::tensorflow::ListValue* list_value_; + ::tensorflow::TupleValue* tuple_value_; + ::tensorflow::DictValue* dict_value_; + ::tensorflow::NamedTupleValue* named_tuple_value_; + ::tensorflow::TensorProto* tensor_value_; + ::tensorflow::TensorProto* numpy_value_; + } kind_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + uint32_t _oneof_case_[1]; + + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fstruct_2eproto; +}; +// ------------------------------------------------------------------- + +class NoneValue final : + public ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase /* @@protoc_insertion_point(class_definition:tensorflow.NoneValue) */ { + public: + inline NoneValue() : NoneValue(nullptr) {} + explicit PROTOBUF_CONSTEXPR NoneValue(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + NoneValue(const NoneValue& from); + NoneValue(NoneValue&& from) noexcept + : NoneValue() { + *this = ::std::move(from); + } + + inline NoneValue& operator=(const NoneValue& from) { + CopyFrom(from); + return *this; + } + inline NoneValue& operator=(NoneValue&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const NoneValue& default_instance() { + return *internal_default_instance(); + } + static inline const NoneValue* internal_default_instance() { + return reinterpret_cast( + &_NoneValue_default_instance_); + } + static constexpr int kIndexInFileMessages = + 1; + + friend void swap(NoneValue& a, NoneValue& b) { + a.Swap(&b); + } + inline void Swap(NoneValue* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(NoneValue* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + NoneValue* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::CopyFrom; + inline void CopyFrom(const NoneValue& from) { + ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::CopyImpl(*this, from); + } + using ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::MergeFrom; + void MergeFrom(const NoneValue& from) { + ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::MergeImpl(*this, from); + } + public: + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.NoneValue"; + } + protected: + explicit NoneValue(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // @@protoc_insertion_point(class_scope:tensorflow.NoneValue) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fstruct_2eproto; +}; +// ------------------------------------------------------------------- + +class ListValue final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.ListValue) */ { + public: + inline ListValue() : ListValue(nullptr) {} + ~ListValue() override; + explicit PROTOBUF_CONSTEXPR ListValue(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + ListValue(const ListValue& from); + ListValue(ListValue&& from) noexcept + : ListValue() { + *this = ::std::move(from); + } + + inline ListValue& operator=(const ListValue& from) { + CopyFrom(from); + return *this; + } + inline ListValue& operator=(ListValue&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const ListValue& default_instance() { + return *internal_default_instance(); + } + static inline const ListValue* internal_default_instance() { + return reinterpret_cast( + &_ListValue_default_instance_); + } + static constexpr int kIndexInFileMessages = + 2; + + friend void swap(ListValue& a, ListValue& b) { + a.Swap(&b); + } + inline void Swap(ListValue* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(ListValue* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + ListValue* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const ListValue& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const ListValue& from) { + ListValue::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(ListValue* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.ListValue"; + } + protected: + explicit ListValue(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kValuesFieldNumber = 1, + }; + // repeated .tensorflow.StructuredValue values = 1; + int values_size() const; + private: + int _internal_values_size() const; + public: + void clear_values(); + ::tensorflow::StructuredValue* mutable_values(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::StructuredValue >* + mutable_values(); + private: + const ::tensorflow::StructuredValue& _internal_values(int index) const; + ::tensorflow::StructuredValue* _internal_add_values(); + public: + const ::tensorflow::StructuredValue& values(int index) const; + ::tensorflow::StructuredValue* add_values(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::StructuredValue >& + values() const; + + // @@protoc_insertion_point(class_scope:tensorflow.ListValue) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::StructuredValue > values_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fstruct_2eproto; +}; +// ------------------------------------------------------------------- + +class TupleValue final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.TupleValue) */ { + public: + inline TupleValue() : TupleValue(nullptr) {} + ~TupleValue() override; + explicit PROTOBUF_CONSTEXPR TupleValue(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + TupleValue(const TupleValue& from); + TupleValue(TupleValue&& from) noexcept + : TupleValue() { + *this = ::std::move(from); + } + + inline TupleValue& operator=(const TupleValue& from) { + CopyFrom(from); + return *this; + } + inline TupleValue& operator=(TupleValue&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const TupleValue& default_instance() { + return *internal_default_instance(); + } + static inline const TupleValue* internal_default_instance() { + return reinterpret_cast( + &_TupleValue_default_instance_); + } + static constexpr int kIndexInFileMessages = + 3; + + friend void swap(TupleValue& a, TupleValue& b) { + a.Swap(&b); + } + inline void Swap(TupleValue* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(TupleValue* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + TupleValue* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const TupleValue& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const TupleValue& from) { + TupleValue::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(TupleValue* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.TupleValue"; + } + protected: + explicit TupleValue(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kValuesFieldNumber = 1, + }; + // repeated .tensorflow.StructuredValue values = 1; + int values_size() const; + private: + int _internal_values_size() const; + public: + void clear_values(); + ::tensorflow::StructuredValue* mutable_values(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::StructuredValue >* + mutable_values(); + private: + const ::tensorflow::StructuredValue& _internal_values(int index) const; + ::tensorflow::StructuredValue* _internal_add_values(); + public: + const ::tensorflow::StructuredValue& values(int index) const; + ::tensorflow::StructuredValue* add_values(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::StructuredValue >& + values() const; + + // @@protoc_insertion_point(class_scope:tensorflow.TupleValue) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::StructuredValue > values_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fstruct_2eproto; +}; +// ------------------------------------------------------------------- + +class DictValue_FieldsEntry_DoNotUse : public ::PROTOBUF_NAMESPACE_ID::internal::MapEntry { +public: + typedef ::PROTOBUF_NAMESPACE_ID::internal::MapEntry SuperType; + DictValue_FieldsEntry_DoNotUse(); + explicit PROTOBUF_CONSTEXPR DictValue_FieldsEntry_DoNotUse( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + explicit DictValue_FieldsEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena); + void MergeFrom(const DictValue_FieldsEntry_DoNotUse& other); + static const DictValue_FieldsEntry_DoNotUse* internal_default_instance() { return reinterpret_cast(&_DictValue_FieldsEntry_DoNotUse_default_instance_); } + static bool ValidateKey(std::string* s) { + return ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(s->data(), static_cast(s->size()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, "tensorflow.DictValue.FieldsEntry.key"); + } + static bool ValidateValue(void*) { return true; } + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fstruct_2eproto; +}; + +// ------------------------------------------------------------------- + +class DictValue final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.DictValue) */ { + public: + inline DictValue() : DictValue(nullptr) {} + ~DictValue() override; + explicit PROTOBUF_CONSTEXPR DictValue(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + DictValue(const DictValue& from); + DictValue(DictValue&& from) noexcept + : DictValue() { + *this = ::std::move(from); + } + + inline DictValue& operator=(const DictValue& from) { + CopyFrom(from); + return *this; + } + inline DictValue& operator=(DictValue&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const DictValue& default_instance() { + return *internal_default_instance(); + } + static inline const DictValue* internal_default_instance() { + return reinterpret_cast( + &_DictValue_default_instance_); + } + static constexpr int kIndexInFileMessages = + 5; + + friend void swap(DictValue& a, DictValue& b) { + a.Swap(&b); + } + inline void Swap(DictValue* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(DictValue* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + DictValue* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const DictValue& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const DictValue& from) { + DictValue::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(DictValue* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.DictValue"; + } + protected: + explicit DictValue(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + + // accessors ------------------------------------------------------- + + enum : int { + kFieldsFieldNumber = 1, + }; + // map fields = 1; + int fields_size() const; + private: + int _internal_fields_size() const; + public: + void clear_fields(); + private: + const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::StructuredValue >& + _internal_fields() const; + ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::StructuredValue >* + _internal_mutable_fields(); + public: + const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::StructuredValue >& + fields() const; + ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::StructuredValue >* + mutable_fields(); + + // @@protoc_insertion_point(class_scope:tensorflow.DictValue) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::MapField< + DictValue_FieldsEntry_DoNotUse, + std::string, ::tensorflow::StructuredValue, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_MESSAGE> fields_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fstruct_2eproto; +}; +// ------------------------------------------------------------------- + +class PairValue final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.PairValue) */ { + public: + inline PairValue() : PairValue(nullptr) {} + ~PairValue() override; + explicit PROTOBUF_CONSTEXPR PairValue(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + PairValue(const PairValue& from); + PairValue(PairValue&& from) noexcept + : PairValue() { + *this = ::std::move(from); + } + + inline PairValue& operator=(const PairValue& from) { + CopyFrom(from); + return *this; + } + inline PairValue& operator=(PairValue&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const PairValue& default_instance() { + return *internal_default_instance(); + } + static inline const PairValue* internal_default_instance() { + return reinterpret_cast( + &_PairValue_default_instance_); + } + static constexpr int kIndexInFileMessages = + 6; + + friend void swap(PairValue& a, PairValue& b) { + a.Swap(&b); + } + inline void Swap(PairValue* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(PairValue* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + PairValue* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const PairValue& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const PairValue& from) { + PairValue::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(PairValue* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.PairValue"; + } + protected: + explicit PairValue(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kKeyFieldNumber = 1, + kValueFieldNumber = 2, + }; + // string key = 1; + void clear_key(); + const std::string& key() const; + template + void set_key(ArgT0&& arg0, ArgT... args); + std::string* mutable_key(); + PROTOBUF_NODISCARD std::string* release_key(); + void set_allocated_key(std::string* key); + private: + const std::string& _internal_key() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_key(const std::string& value); + std::string* _internal_mutable_key(); + public: + + // .tensorflow.StructuredValue value = 2; + bool has_value() const; + private: + bool _internal_has_value() const; + public: + void clear_value(); + const ::tensorflow::StructuredValue& value() const; + PROTOBUF_NODISCARD ::tensorflow::StructuredValue* release_value(); + ::tensorflow::StructuredValue* mutable_value(); + void set_allocated_value(::tensorflow::StructuredValue* value); + private: + const ::tensorflow::StructuredValue& _internal_value() const; + ::tensorflow::StructuredValue* _internal_mutable_value(); + public: + void unsafe_arena_set_allocated_value( + ::tensorflow::StructuredValue* value); + ::tensorflow::StructuredValue* unsafe_arena_release_value(); + + // @@protoc_insertion_point(class_scope:tensorflow.PairValue) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr key_; + ::tensorflow::StructuredValue* value_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fstruct_2eproto; +}; +// ------------------------------------------------------------------- + +class NamedTupleValue final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.NamedTupleValue) */ { + public: + inline NamedTupleValue() : NamedTupleValue(nullptr) {} + ~NamedTupleValue() override; + explicit PROTOBUF_CONSTEXPR NamedTupleValue(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + NamedTupleValue(const NamedTupleValue& from); + NamedTupleValue(NamedTupleValue&& from) noexcept + : NamedTupleValue() { + *this = ::std::move(from); + } + + inline NamedTupleValue& operator=(const NamedTupleValue& from) { + CopyFrom(from); + return *this; + } + inline NamedTupleValue& operator=(NamedTupleValue&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const NamedTupleValue& default_instance() { + return *internal_default_instance(); + } + static inline const NamedTupleValue* internal_default_instance() { + return reinterpret_cast( + &_NamedTupleValue_default_instance_); + } + static constexpr int kIndexInFileMessages = + 7; + + friend void swap(NamedTupleValue& a, NamedTupleValue& b) { + a.Swap(&b); + } + inline void Swap(NamedTupleValue* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(NamedTupleValue* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + NamedTupleValue* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const NamedTupleValue& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const NamedTupleValue& from) { + NamedTupleValue::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(NamedTupleValue* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.NamedTupleValue"; + } + protected: + explicit NamedTupleValue(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kValuesFieldNumber = 2, + kNameFieldNumber = 1, + }; + // repeated .tensorflow.PairValue values = 2; + int values_size() const; + private: + int _internal_values_size() const; + public: + void clear_values(); + ::tensorflow::PairValue* mutable_values(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::PairValue >* + mutable_values(); + private: + const ::tensorflow::PairValue& _internal_values(int index) const; + ::tensorflow::PairValue* _internal_add_values(); + public: + const ::tensorflow::PairValue& values(int index) const; + ::tensorflow::PairValue* add_values(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::PairValue >& + values() const; + + // string name = 1; + void clear_name(); + const std::string& name() const; + template + void set_name(ArgT0&& arg0, ArgT... args); + std::string* mutable_name(); + PROTOBUF_NODISCARD std::string* release_name(); + void set_allocated_name(std::string* name); + private: + const std::string& _internal_name() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_name(const std::string& value); + std::string* _internal_mutable_name(); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.NamedTupleValue) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::PairValue > values_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fstruct_2eproto; +}; +// ------------------------------------------------------------------- + +class TensorSpecProto final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.TensorSpecProto) */ { + public: + inline TensorSpecProto() : TensorSpecProto(nullptr) {} + ~TensorSpecProto() override; + explicit PROTOBUF_CONSTEXPR TensorSpecProto(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + TensorSpecProto(const TensorSpecProto& from); + TensorSpecProto(TensorSpecProto&& from) noexcept + : TensorSpecProto() { + *this = ::std::move(from); + } + + inline TensorSpecProto& operator=(const TensorSpecProto& from) { + CopyFrom(from); + return *this; + } + inline TensorSpecProto& operator=(TensorSpecProto&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const TensorSpecProto& default_instance() { + return *internal_default_instance(); + } + static inline const TensorSpecProto* internal_default_instance() { + return reinterpret_cast( + &_TensorSpecProto_default_instance_); + } + static constexpr int kIndexInFileMessages = + 8; + + friend void swap(TensorSpecProto& a, TensorSpecProto& b) { + a.Swap(&b); + } + inline void Swap(TensorSpecProto* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(TensorSpecProto* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + TensorSpecProto* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const TensorSpecProto& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const TensorSpecProto& from) { + TensorSpecProto::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(TensorSpecProto* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.TensorSpecProto"; + } + protected: + explicit TensorSpecProto(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kNameFieldNumber = 1, + kShapeFieldNumber = 2, + kDtypeFieldNumber = 3, + }; + // string name = 1; + void clear_name(); + const std::string& name() const; + template + void set_name(ArgT0&& arg0, ArgT... args); + std::string* mutable_name(); + PROTOBUF_NODISCARD std::string* release_name(); + void set_allocated_name(std::string* name); + private: + const std::string& _internal_name() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_name(const std::string& value); + std::string* _internal_mutable_name(); + public: + + // .tensorflow.TensorShapeProto shape = 2; + bool has_shape() const; + private: + bool _internal_has_shape() const; + public: + void clear_shape(); + const ::tensorflow::TensorShapeProto& shape() const; + PROTOBUF_NODISCARD ::tensorflow::TensorShapeProto* release_shape(); + ::tensorflow::TensorShapeProto* mutable_shape(); + void set_allocated_shape(::tensorflow::TensorShapeProto* shape); + private: + const ::tensorflow::TensorShapeProto& _internal_shape() const; + ::tensorflow::TensorShapeProto* _internal_mutable_shape(); + public: + void unsafe_arena_set_allocated_shape( + ::tensorflow::TensorShapeProto* shape); + ::tensorflow::TensorShapeProto* unsafe_arena_release_shape(); + + // .tensorflow.DataType dtype = 3; + void clear_dtype(); + ::tensorflow::DataType dtype() const; + void set_dtype(::tensorflow::DataType value); + private: + ::tensorflow::DataType _internal_dtype() const; + void _internal_set_dtype(::tensorflow::DataType value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.TensorSpecProto) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_; + ::tensorflow::TensorShapeProto* shape_; + int dtype_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fstruct_2eproto; +}; +// ------------------------------------------------------------------- + +class BoundedTensorSpecProto final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.BoundedTensorSpecProto) */ { + public: + inline BoundedTensorSpecProto() : BoundedTensorSpecProto(nullptr) {} + ~BoundedTensorSpecProto() override; + explicit PROTOBUF_CONSTEXPR BoundedTensorSpecProto(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + BoundedTensorSpecProto(const BoundedTensorSpecProto& from); + BoundedTensorSpecProto(BoundedTensorSpecProto&& from) noexcept + : BoundedTensorSpecProto() { + *this = ::std::move(from); + } + + inline BoundedTensorSpecProto& operator=(const BoundedTensorSpecProto& from) { + CopyFrom(from); + return *this; + } + inline BoundedTensorSpecProto& operator=(BoundedTensorSpecProto&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const BoundedTensorSpecProto& default_instance() { + return *internal_default_instance(); + } + static inline const BoundedTensorSpecProto* internal_default_instance() { + return reinterpret_cast( + &_BoundedTensorSpecProto_default_instance_); + } + static constexpr int kIndexInFileMessages = + 9; + + friend void swap(BoundedTensorSpecProto& a, BoundedTensorSpecProto& b) { + a.Swap(&b); + } + inline void Swap(BoundedTensorSpecProto* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(BoundedTensorSpecProto* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + BoundedTensorSpecProto* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const BoundedTensorSpecProto& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const BoundedTensorSpecProto& from) { + BoundedTensorSpecProto::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(BoundedTensorSpecProto* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.BoundedTensorSpecProto"; + } + protected: + explicit BoundedTensorSpecProto(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kNameFieldNumber = 1, + kShapeFieldNumber = 2, + kMinimumFieldNumber = 4, + kMaximumFieldNumber = 5, + kDtypeFieldNumber = 3, + }; + // string name = 1; + void clear_name(); + const std::string& name() const; + template + void set_name(ArgT0&& arg0, ArgT... args); + std::string* mutable_name(); + PROTOBUF_NODISCARD std::string* release_name(); + void set_allocated_name(std::string* name); + private: + const std::string& _internal_name() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_name(const std::string& value); + std::string* _internal_mutable_name(); + public: + + // .tensorflow.TensorShapeProto shape = 2; + bool has_shape() const; + private: + bool _internal_has_shape() const; + public: + void clear_shape(); + const ::tensorflow::TensorShapeProto& shape() const; + PROTOBUF_NODISCARD ::tensorflow::TensorShapeProto* release_shape(); + ::tensorflow::TensorShapeProto* mutable_shape(); + void set_allocated_shape(::tensorflow::TensorShapeProto* shape); + private: + const ::tensorflow::TensorShapeProto& _internal_shape() const; + ::tensorflow::TensorShapeProto* _internal_mutable_shape(); + public: + void unsafe_arena_set_allocated_shape( + ::tensorflow::TensorShapeProto* shape); + ::tensorflow::TensorShapeProto* unsafe_arena_release_shape(); + + // .tensorflow.TensorProto minimum = 4; + bool has_minimum() const; + private: + bool _internal_has_minimum() const; + public: + void clear_minimum(); + const ::tensorflow::TensorProto& minimum() const; + PROTOBUF_NODISCARD ::tensorflow::TensorProto* release_minimum(); + ::tensorflow::TensorProto* mutable_minimum(); + void set_allocated_minimum(::tensorflow::TensorProto* minimum); + private: + const ::tensorflow::TensorProto& _internal_minimum() const; + ::tensorflow::TensorProto* _internal_mutable_minimum(); + public: + void unsafe_arena_set_allocated_minimum( + ::tensorflow::TensorProto* minimum); + ::tensorflow::TensorProto* unsafe_arena_release_minimum(); + + // .tensorflow.TensorProto maximum = 5; + bool has_maximum() const; + private: + bool _internal_has_maximum() const; + public: + void clear_maximum(); + const ::tensorflow::TensorProto& maximum() const; + PROTOBUF_NODISCARD ::tensorflow::TensorProto* release_maximum(); + ::tensorflow::TensorProto* mutable_maximum(); + void set_allocated_maximum(::tensorflow::TensorProto* maximum); + private: + const ::tensorflow::TensorProto& _internal_maximum() const; + ::tensorflow::TensorProto* _internal_mutable_maximum(); + public: + void unsafe_arena_set_allocated_maximum( + ::tensorflow::TensorProto* maximum); + ::tensorflow::TensorProto* unsafe_arena_release_maximum(); + + // .tensorflow.DataType dtype = 3; + void clear_dtype(); + ::tensorflow::DataType dtype() const; + void set_dtype(::tensorflow::DataType value); + private: + ::tensorflow::DataType _internal_dtype() const; + void _internal_set_dtype(::tensorflow::DataType value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.BoundedTensorSpecProto) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_; + ::tensorflow::TensorShapeProto* shape_; + ::tensorflow::TensorProto* minimum_; + ::tensorflow::TensorProto* maximum_; + int dtype_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fstruct_2eproto; +}; +// ------------------------------------------------------------------- + +class TypeSpecProto final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.TypeSpecProto) */ { + public: + inline TypeSpecProto() : TypeSpecProto(nullptr) {} + ~TypeSpecProto() override; + explicit PROTOBUF_CONSTEXPR TypeSpecProto(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + TypeSpecProto(const TypeSpecProto& from); + TypeSpecProto(TypeSpecProto&& from) noexcept + : TypeSpecProto() { + *this = ::std::move(from); + } + + inline TypeSpecProto& operator=(const TypeSpecProto& from) { + CopyFrom(from); + return *this; + } + inline TypeSpecProto& operator=(TypeSpecProto&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const TypeSpecProto& default_instance() { + return *internal_default_instance(); + } + static inline const TypeSpecProto* internal_default_instance() { + return reinterpret_cast( + &_TypeSpecProto_default_instance_); + } + static constexpr int kIndexInFileMessages = + 10; + + friend void swap(TypeSpecProto& a, TypeSpecProto& b) { + a.Swap(&b); + } + inline void Swap(TypeSpecProto* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(TypeSpecProto* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + TypeSpecProto* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const TypeSpecProto& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const TypeSpecProto& from) { + TypeSpecProto::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(TypeSpecProto* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.TypeSpecProto"; + } + protected: + explicit TypeSpecProto(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + typedef TypeSpecProto_TypeSpecClass TypeSpecClass; + static constexpr TypeSpecClass UNKNOWN = + TypeSpecProto_TypeSpecClass_UNKNOWN; + static constexpr TypeSpecClass SPARSE_TENSOR_SPEC = + TypeSpecProto_TypeSpecClass_SPARSE_TENSOR_SPEC; + static constexpr TypeSpecClass INDEXED_SLICES_SPEC = + TypeSpecProto_TypeSpecClass_INDEXED_SLICES_SPEC; + static constexpr TypeSpecClass RAGGED_TENSOR_SPEC = + TypeSpecProto_TypeSpecClass_RAGGED_TENSOR_SPEC; + static constexpr TypeSpecClass TENSOR_ARRAY_SPEC = + TypeSpecProto_TypeSpecClass_TENSOR_ARRAY_SPEC; + static constexpr TypeSpecClass DATA_DATASET_SPEC = + TypeSpecProto_TypeSpecClass_DATA_DATASET_SPEC; + static constexpr TypeSpecClass DATA_ITERATOR_SPEC = + TypeSpecProto_TypeSpecClass_DATA_ITERATOR_SPEC; + static constexpr TypeSpecClass OPTIONAL_SPEC = + TypeSpecProto_TypeSpecClass_OPTIONAL_SPEC; + static constexpr TypeSpecClass PER_REPLICA_SPEC = + TypeSpecProto_TypeSpecClass_PER_REPLICA_SPEC; + static constexpr TypeSpecClass VARIABLE_SPEC = + TypeSpecProto_TypeSpecClass_VARIABLE_SPEC; + static constexpr TypeSpecClass ROW_PARTITION_SPEC = + TypeSpecProto_TypeSpecClass_ROW_PARTITION_SPEC; + static constexpr TypeSpecClass REGISTERED_TYPE_SPEC = + TypeSpecProto_TypeSpecClass_REGISTERED_TYPE_SPEC; + static constexpr TypeSpecClass EXTENSION_TYPE_SPEC = + TypeSpecProto_TypeSpecClass_EXTENSION_TYPE_SPEC; + static inline bool TypeSpecClass_IsValid(int value) { + return TypeSpecProto_TypeSpecClass_IsValid(value); + } + static constexpr TypeSpecClass TypeSpecClass_MIN = + TypeSpecProto_TypeSpecClass_TypeSpecClass_MIN; + static constexpr TypeSpecClass TypeSpecClass_MAX = + TypeSpecProto_TypeSpecClass_TypeSpecClass_MAX; + static constexpr int TypeSpecClass_ARRAYSIZE = + TypeSpecProto_TypeSpecClass_TypeSpecClass_ARRAYSIZE; + static inline const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* + TypeSpecClass_descriptor() { + return TypeSpecProto_TypeSpecClass_descriptor(); + } + template + static inline const std::string& TypeSpecClass_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function TypeSpecClass_Name."); + return TypeSpecProto_TypeSpecClass_Name(enum_t_value); + } + static inline bool TypeSpecClass_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name, + TypeSpecClass* value) { + return TypeSpecProto_TypeSpecClass_Parse(name, value); + } + + // accessors ------------------------------------------------------- + + enum : int { + kTypeSpecClassNameFieldNumber = 3, + kTypeStateFieldNumber = 2, + kTypeSpecClassFieldNumber = 1, + kNumFlatComponentsFieldNumber = 4, + }; + // string type_spec_class_name = 3; + void clear_type_spec_class_name(); + const std::string& type_spec_class_name() const; + template + void set_type_spec_class_name(ArgT0&& arg0, ArgT... args); + std::string* mutable_type_spec_class_name(); + PROTOBUF_NODISCARD std::string* release_type_spec_class_name(); + void set_allocated_type_spec_class_name(std::string* type_spec_class_name); + private: + const std::string& _internal_type_spec_class_name() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_type_spec_class_name(const std::string& value); + std::string* _internal_mutable_type_spec_class_name(); + public: + + // .tensorflow.StructuredValue type_state = 2; + bool has_type_state() const; + private: + bool _internal_has_type_state() const; + public: + void clear_type_state(); + const ::tensorflow::StructuredValue& type_state() const; + PROTOBUF_NODISCARD ::tensorflow::StructuredValue* release_type_state(); + ::tensorflow::StructuredValue* mutable_type_state(); + void set_allocated_type_state(::tensorflow::StructuredValue* type_state); + private: + const ::tensorflow::StructuredValue& _internal_type_state() const; + ::tensorflow::StructuredValue* _internal_mutable_type_state(); + public: + void unsafe_arena_set_allocated_type_state( + ::tensorflow::StructuredValue* type_state); + ::tensorflow::StructuredValue* unsafe_arena_release_type_state(); + + // .tensorflow.TypeSpecProto.TypeSpecClass type_spec_class = 1; + void clear_type_spec_class(); + ::tensorflow::TypeSpecProto_TypeSpecClass type_spec_class() const; + void set_type_spec_class(::tensorflow::TypeSpecProto_TypeSpecClass value); + private: + ::tensorflow::TypeSpecProto_TypeSpecClass _internal_type_spec_class() const; + void _internal_set_type_spec_class(::tensorflow::TypeSpecProto_TypeSpecClass value); + public: + + // int32 num_flat_components = 4; + void clear_num_flat_components(); + int32_t num_flat_components() const; + void set_num_flat_components(int32_t value); + private: + int32_t _internal_num_flat_components() const; + void _internal_set_num_flat_components(int32_t value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.TypeSpecProto) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr type_spec_class_name_; + ::tensorflow::StructuredValue* type_state_; + int type_spec_class_; + int32_t num_flat_components_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fstruct_2eproto; +}; +// =================================================================== + + +// =================================================================== + +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// StructuredValue + +// .tensorflow.NoneValue none_value = 1; +inline bool StructuredValue::_internal_has_none_value() const { + return kind_case() == kNoneValue; +} +inline bool StructuredValue::has_none_value() const { + return _internal_has_none_value(); +} +inline void StructuredValue::set_has_none_value() { + _impl_._oneof_case_[0] = kNoneValue; +} +inline void StructuredValue::clear_none_value() { + if (_internal_has_none_value()) { + if (GetArenaForAllocation() == nullptr) { + delete _impl_.kind_.none_value_; + } + clear_has_kind(); + } +} +inline ::tensorflow::NoneValue* StructuredValue::release_none_value() { + // @@protoc_insertion_point(field_release:tensorflow.StructuredValue.none_value) + if (_internal_has_none_value()) { + clear_has_kind(); + ::tensorflow::NoneValue* temp = _impl_.kind_.none_value_; + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + _impl_.kind_.none_value_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::tensorflow::NoneValue& StructuredValue::_internal_none_value() const { + return _internal_has_none_value() + ? *_impl_.kind_.none_value_ + : reinterpret_cast< ::tensorflow::NoneValue&>(::tensorflow::_NoneValue_default_instance_); +} +inline const ::tensorflow::NoneValue& StructuredValue::none_value() const { + // @@protoc_insertion_point(field_get:tensorflow.StructuredValue.none_value) + return _internal_none_value(); +} +inline ::tensorflow::NoneValue* StructuredValue::unsafe_arena_release_none_value() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.StructuredValue.none_value) + if (_internal_has_none_value()) { + clear_has_kind(); + ::tensorflow::NoneValue* temp = _impl_.kind_.none_value_; + _impl_.kind_.none_value_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void StructuredValue::unsafe_arena_set_allocated_none_value(::tensorflow::NoneValue* none_value) { + clear_kind(); + if (none_value) { + set_has_none_value(); + _impl_.kind_.none_value_ = none_value; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.StructuredValue.none_value) +} +inline ::tensorflow::NoneValue* StructuredValue::_internal_mutable_none_value() { + if (!_internal_has_none_value()) { + clear_kind(); + set_has_none_value(); + _impl_.kind_.none_value_ = CreateMaybeMessage< ::tensorflow::NoneValue >(GetArenaForAllocation()); + } + return _impl_.kind_.none_value_; +} +inline ::tensorflow::NoneValue* StructuredValue::mutable_none_value() { + ::tensorflow::NoneValue* _msg = _internal_mutable_none_value(); + // @@protoc_insertion_point(field_mutable:tensorflow.StructuredValue.none_value) + return _msg; +} + +// double float64_value = 11; +inline bool StructuredValue::_internal_has_float64_value() const { + return kind_case() == kFloat64Value; +} +inline bool StructuredValue::has_float64_value() const { + return _internal_has_float64_value(); +} +inline void StructuredValue::set_has_float64_value() { + _impl_._oneof_case_[0] = kFloat64Value; +} +inline void StructuredValue::clear_float64_value() { + if (_internal_has_float64_value()) { + _impl_.kind_.float64_value_ = 0; + clear_has_kind(); + } +} +inline double StructuredValue::_internal_float64_value() const { + if (_internal_has_float64_value()) { + return _impl_.kind_.float64_value_; + } + return 0; +} +inline void StructuredValue::_internal_set_float64_value(double value) { + if (!_internal_has_float64_value()) { + clear_kind(); + set_has_float64_value(); + } + _impl_.kind_.float64_value_ = value; +} +inline double StructuredValue::float64_value() const { + // @@protoc_insertion_point(field_get:tensorflow.StructuredValue.float64_value) + return _internal_float64_value(); +} +inline void StructuredValue::set_float64_value(double value) { + _internal_set_float64_value(value); + // @@protoc_insertion_point(field_set:tensorflow.StructuredValue.float64_value) +} + +// sint64 int64_value = 12; +inline bool StructuredValue::_internal_has_int64_value() const { + return kind_case() == kInt64Value; +} +inline bool StructuredValue::has_int64_value() const { + return _internal_has_int64_value(); +} +inline void StructuredValue::set_has_int64_value() { + _impl_._oneof_case_[0] = kInt64Value; +} +inline void StructuredValue::clear_int64_value() { + if (_internal_has_int64_value()) { + _impl_.kind_.int64_value_ = int64_t{0}; + clear_has_kind(); + } +} +inline int64_t StructuredValue::_internal_int64_value() const { + if (_internal_has_int64_value()) { + return _impl_.kind_.int64_value_; + } + return int64_t{0}; +} +inline void StructuredValue::_internal_set_int64_value(int64_t value) { + if (!_internal_has_int64_value()) { + clear_kind(); + set_has_int64_value(); + } + _impl_.kind_.int64_value_ = value; +} +inline int64_t StructuredValue::int64_value() const { + // @@protoc_insertion_point(field_get:tensorflow.StructuredValue.int64_value) + return _internal_int64_value(); +} +inline void StructuredValue::set_int64_value(int64_t value) { + _internal_set_int64_value(value); + // @@protoc_insertion_point(field_set:tensorflow.StructuredValue.int64_value) +} + +// string string_value = 13; +inline bool StructuredValue::_internal_has_string_value() const { + return kind_case() == kStringValue; +} +inline bool StructuredValue::has_string_value() const { + return _internal_has_string_value(); +} +inline void StructuredValue::set_has_string_value() { + _impl_._oneof_case_[0] = kStringValue; +} +inline void StructuredValue::clear_string_value() { + if (_internal_has_string_value()) { + _impl_.kind_.string_value_.Destroy(); + clear_has_kind(); + } +} +inline const std::string& StructuredValue::string_value() const { + // @@protoc_insertion_point(field_get:tensorflow.StructuredValue.string_value) + return _internal_string_value(); +} +template +inline void StructuredValue::set_string_value(ArgT0&& arg0, ArgT... args) { + if (!_internal_has_string_value()) { + clear_kind(); + set_has_string_value(); + _impl_.kind_.string_value_.InitDefault(); + } + _impl_.kind_.string_value_.Set( static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.StructuredValue.string_value) +} +inline std::string* StructuredValue::mutable_string_value() { + std::string* _s = _internal_mutable_string_value(); + // @@protoc_insertion_point(field_mutable:tensorflow.StructuredValue.string_value) + return _s; +} +inline const std::string& StructuredValue::_internal_string_value() const { + if (_internal_has_string_value()) { + return _impl_.kind_.string_value_.Get(); + } + return ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(); +} +inline void StructuredValue::_internal_set_string_value(const std::string& value) { + if (!_internal_has_string_value()) { + clear_kind(); + set_has_string_value(); + _impl_.kind_.string_value_.InitDefault(); + } + _impl_.kind_.string_value_.Set(value, GetArenaForAllocation()); +} +inline std::string* StructuredValue::_internal_mutable_string_value() { + if (!_internal_has_string_value()) { + clear_kind(); + set_has_string_value(); + _impl_.kind_.string_value_.InitDefault(); + } + return _impl_.kind_.string_value_.Mutable( GetArenaForAllocation()); +} +inline std::string* StructuredValue::release_string_value() { + // @@protoc_insertion_point(field_release:tensorflow.StructuredValue.string_value) + if (_internal_has_string_value()) { + clear_has_kind(); + return _impl_.kind_.string_value_.Release(); + } else { + return nullptr; + } +} +inline void StructuredValue::set_allocated_string_value(std::string* string_value) { + if (has_kind()) { + clear_kind(); + } + if (string_value != nullptr) { + set_has_string_value(); + _impl_.kind_.string_value_.InitAllocated(string_value, GetArenaForAllocation()); + } + // @@protoc_insertion_point(field_set_allocated:tensorflow.StructuredValue.string_value) +} + +// bool bool_value = 14; +inline bool StructuredValue::_internal_has_bool_value() const { + return kind_case() == kBoolValue; +} +inline bool StructuredValue::has_bool_value() const { + return _internal_has_bool_value(); +} +inline void StructuredValue::set_has_bool_value() { + _impl_._oneof_case_[0] = kBoolValue; +} +inline void StructuredValue::clear_bool_value() { + if (_internal_has_bool_value()) { + _impl_.kind_.bool_value_ = false; + clear_has_kind(); + } +} +inline bool StructuredValue::_internal_bool_value() const { + if (_internal_has_bool_value()) { + return _impl_.kind_.bool_value_; + } + return false; +} +inline void StructuredValue::_internal_set_bool_value(bool value) { + if (!_internal_has_bool_value()) { + clear_kind(); + set_has_bool_value(); + } + _impl_.kind_.bool_value_ = value; +} +inline bool StructuredValue::bool_value() const { + // @@protoc_insertion_point(field_get:tensorflow.StructuredValue.bool_value) + return _internal_bool_value(); +} +inline void StructuredValue::set_bool_value(bool value) { + _internal_set_bool_value(value); + // @@protoc_insertion_point(field_set:tensorflow.StructuredValue.bool_value) +} + +// .tensorflow.TensorShapeProto tensor_shape_value = 31; +inline bool StructuredValue::_internal_has_tensor_shape_value() const { + return kind_case() == kTensorShapeValue; +} +inline bool StructuredValue::has_tensor_shape_value() const { + return _internal_has_tensor_shape_value(); +} +inline void StructuredValue::set_has_tensor_shape_value() { + _impl_._oneof_case_[0] = kTensorShapeValue; +} +inline ::tensorflow::TensorShapeProto* StructuredValue::release_tensor_shape_value() { + // @@protoc_insertion_point(field_release:tensorflow.StructuredValue.tensor_shape_value) + if (_internal_has_tensor_shape_value()) { + clear_has_kind(); + ::tensorflow::TensorShapeProto* temp = _impl_.kind_.tensor_shape_value_; + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + _impl_.kind_.tensor_shape_value_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::tensorflow::TensorShapeProto& StructuredValue::_internal_tensor_shape_value() const { + return _internal_has_tensor_shape_value() + ? *_impl_.kind_.tensor_shape_value_ + : reinterpret_cast< ::tensorflow::TensorShapeProto&>(::tensorflow::_TensorShapeProto_default_instance_); +} +inline const ::tensorflow::TensorShapeProto& StructuredValue::tensor_shape_value() const { + // @@protoc_insertion_point(field_get:tensorflow.StructuredValue.tensor_shape_value) + return _internal_tensor_shape_value(); +} +inline ::tensorflow::TensorShapeProto* StructuredValue::unsafe_arena_release_tensor_shape_value() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.StructuredValue.tensor_shape_value) + if (_internal_has_tensor_shape_value()) { + clear_has_kind(); + ::tensorflow::TensorShapeProto* temp = _impl_.kind_.tensor_shape_value_; + _impl_.kind_.tensor_shape_value_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void StructuredValue::unsafe_arena_set_allocated_tensor_shape_value(::tensorflow::TensorShapeProto* tensor_shape_value) { + clear_kind(); + if (tensor_shape_value) { + set_has_tensor_shape_value(); + _impl_.kind_.tensor_shape_value_ = tensor_shape_value; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.StructuredValue.tensor_shape_value) +} +inline ::tensorflow::TensorShapeProto* StructuredValue::_internal_mutable_tensor_shape_value() { + if (!_internal_has_tensor_shape_value()) { + clear_kind(); + set_has_tensor_shape_value(); + _impl_.kind_.tensor_shape_value_ = CreateMaybeMessage< ::tensorflow::TensorShapeProto >(GetArenaForAllocation()); + } + return _impl_.kind_.tensor_shape_value_; +} +inline ::tensorflow::TensorShapeProto* StructuredValue::mutable_tensor_shape_value() { + ::tensorflow::TensorShapeProto* _msg = _internal_mutable_tensor_shape_value(); + // @@protoc_insertion_point(field_mutable:tensorflow.StructuredValue.tensor_shape_value) + return _msg; +} + +// .tensorflow.DataType tensor_dtype_value = 32; +inline bool StructuredValue::_internal_has_tensor_dtype_value() const { + return kind_case() == kTensorDtypeValue; +} +inline bool StructuredValue::has_tensor_dtype_value() const { + return _internal_has_tensor_dtype_value(); +} +inline void StructuredValue::set_has_tensor_dtype_value() { + _impl_._oneof_case_[0] = kTensorDtypeValue; +} +inline void StructuredValue::clear_tensor_dtype_value() { + if (_internal_has_tensor_dtype_value()) { + _impl_.kind_.tensor_dtype_value_ = 0; + clear_has_kind(); + } +} +inline ::tensorflow::DataType StructuredValue::_internal_tensor_dtype_value() const { + if (_internal_has_tensor_dtype_value()) { + return static_cast< ::tensorflow::DataType >(_impl_.kind_.tensor_dtype_value_); + } + return static_cast< ::tensorflow::DataType >(0); +} +inline ::tensorflow::DataType StructuredValue::tensor_dtype_value() const { + // @@protoc_insertion_point(field_get:tensorflow.StructuredValue.tensor_dtype_value) + return _internal_tensor_dtype_value(); +} +inline void StructuredValue::_internal_set_tensor_dtype_value(::tensorflow::DataType value) { + if (!_internal_has_tensor_dtype_value()) { + clear_kind(); + set_has_tensor_dtype_value(); + } + _impl_.kind_.tensor_dtype_value_ = value; +} +inline void StructuredValue::set_tensor_dtype_value(::tensorflow::DataType value) { + _internal_set_tensor_dtype_value(value); + // @@protoc_insertion_point(field_set:tensorflow.StructuredValue.tensor_dtype_value) +} + +// .tensorflow.TensorSpecProto tensor_spec_value = 33; +inline bool StructuredValue::_internal_has_tensor_spec_value() const { + return kind_case() == kTensorSpecValue; +} +inline bool StructuredValue::has_tensor_spec_value() const { + return _internal_has_tensor_spec_value(); +} +inline void StructuredValue::set_has_tensor_spec_value() { + _impl_._oneof_case_[0] = kTensorSpecValue; +} +inline void StructuredValue::clear_tensor_spec_value() { + if (_internal_has_tensor_spec_value()) { + if (GetArenaForAllocation() == nullptr) { + delete _impl_.kind_.tensor_spec_value_; + } + clear_has_kind(); + } +} +inline ::tensorflow::TensorSpecProto* StructuredValue::release_tensor_spec_value() { + // @@protoc_insertion_point(field_release:tensorflow.StructuredValue.tensor_spec_value) + if (_internal_has_tensor_spec_value()) { + clear_has_kind(); + ::tensorflow::TensorSpecProto* temp = _impl_.kind_.tensor_spec_value_; + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + _impl_.kind_.tensor_spec_value_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::tensorflow::TensorSpecProto& StructuredValue::_internal_tensor_spec_value() const { + return _internal_has_tensor_spec_value() + ? *_impl_.kind_.tensor_spec_value_ + : reinterpret_cast< ::tensorflow::TensorSpecProto&>(::tensorflow::_TensorSpecProto_default_instance_); +} +inline const ::tensorflow::TensorSpecProto& StructuredValue::tensor_spec_value() const { + // @@protoc_insertion_point(field_get:tensorflow.StructuredValue.tensor_spec_value) + return _internal_tensor_spec_value(); +} +inline ::tensorflow::TensorSpecProto* StructuredValue::unsafe_arena_release_tensor_spec_value() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.StructuredValue.tensor_spec_value) + if (_internal_has_tensor_spec_value()) { + clear_has_kind(); + ::tensorflow::TensorSpecProto* temp = _impl_.kind_.tensor_spec_value_; + _impl_.kind_.tensor_spec_value_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void StructuredValue::unsafe_arena_set_allocated_tensor_spec_value(::tensorflow::TensorSpecProto* tensor_spec_value) { + clear_kind(); + if (tensor_spec_value) { + set_has_tensor_spec_value(); + _impl_.kind_.tensor_spec_value_ = tensor_spec_value; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.StructuredValue.tensor_spec_value) +} +inline ::tensorflow::TensorSpecProto* StructuredValue::_internal_mutable_tensor_spec_value() { + if (!_internal_has_tensor_spec_value()) { + clear_kind(); + set_has_tensor_spec_value(); + _impl_.kind_.tensor_spec_value_ = CreateMaybeMessage< ::tensorflow::TensorSpecProto >(GetArenaForAllocation()); + } + return _impl_.kind_.tensor_spec_value_; +} +inline ::tensorflow::TensorSpecProto* StructuredValue::mutable_tensor_spec_value() { + ::tensorflow::TensorSpecProto* _msg = _internal_mutable_tensor_spec_value(); + // @@protoc_insertion_point(field_mutable:tensorflow.StructuredValue.tensor_spec_value) + return _msg; +} + +// .tensorflow.TypeSpecProto type_spec_value = 34; +inline bool StructuredValue::_internal_has_type_spec_value() const { + return kind_case() == kTypeSpecValue; +} +inline bool StructuredValue::has_type_spec_value() const { + return _internal_has_type_spec_value(); +} +inline void StructuredValue::set_has_type_spec_value() { + _impl_._oneof_case_[0] = kTypeSpecValue; +} +inline void StructuredValue::clear_type_spec_value() { + if (_internal_has_type_spec_value()) { + if (GetArenaForAllocation() == nullptr) { + delete _impl_.kind_.type_spec_value_; + } + clear_has_kind(); + } +} +inline ::tensorflow::TypeSpecProto* StructuredValue::release_type_spec_value() { + // @@protoc_insertion_point(field_release:tensorflow.StructuredValue.type_spec_value) + if (_internal_has_type_spec_value()) { + clear_has_kind(); + ::tensorflow::TypeSpecProto* temp = _impl_.kind_.type_spec_value_; + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + _impl_.kind_.type_spec_value_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::tensorflow::TypeSpecProto& StructuredValue::_internal_type_spec_value() const { + return _internal_has_type_spec_value() + ? *_impl_.kind_.type_spec_value_ + : reinterpret_cast< ::tensorflow::TypeSpecProto&>(::tensorflow::_TypeSpecProto_default_instance_); +} +inline const ::tensorflow::TypeSpecProto& StructuredValue::type_spec_value() const { + // @@protoc_insertion_point(field_get:tensorflow.StructuredValue.type_spec_value) + return _internal_type_spec_value(); +} +inline ::tensorflow::TypeSpecProto* StructuredValue::unsafe_arena_release_type_spec_value() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.StructuredValue.type_spec_value) + if (_internal_has_type_spec_value()) { + clear_has_kind(); + ::tensorflow::TypeSpecProto* temp = _impl_.kind_.type_spec_value_; + _impl_.kind_.type_spec_value_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void StructuredValue::unsafe_arena_set_allocated_type_spec_value(::tensorflow::TypeSpecProto* type_spec_value) { + clear_kind(); + if (type_spec_value) { + set_has_type_spec_value(); + _impl_.kind_.type_spec_value_ = type_spec_value; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.StructuredValue.type_spec_value) +} +inline ::tensorflow::TypeSpecProto* StructuredValue::_internal_mutable_type_spec_value() { + if (!_internal_has_type_spec_value()) { + clear_kind(); + set_has_type_spec_value(); + _impl_.kind_.type_spec_value_ = CreateMaybeMessage< ::tensorflow::TypeSpecProto >(GetArenaForAllocation()); + } + return _impl_.kind_.type_spec_value_; +} +inline ::tensorflow::TypeSpecProto* StructuredValue::mutable_type_spec_value() { + ::tensorflow::TypeSpecProto* _msg = _internal_mutable_type_spec_value(); + // @@protoc_insertion_point(field_mutable:tensorflow.StructuredValue.type_spec_value) + return _msg; +} + +// .tensorflow.BoundedTensorSpecProto bounded_tensor_spec_value = 35; +inline bool StructuredValue::_internal_has_bounded_tensor_spec_value() const { + return kind_case() == kBoundedTensorSpecValue; +} +inline bool StructuredValue::has_bounded_tensor_spec_value() const { + return _internal_has_bounded_tensor_spec_value(); +} +inline void StructuredValue::set_has_bounded_tensor_spec_value() { + _impl_._oneof_case_[0] = kBoundedTensorSpecValue; +} +inline void StructuredValue::clear_bounded_tensor_spec_value() { + if (_internal_has_bounded_tensor_spec_value()) { + if (GetArenaForAllocation() == nullptr) { + delete _impl_.kind_.bounded_tensor_spec_value_; + } + clear_has_kind(); + } +} +inline ::tensorflow::BoundedTensorSpecProto* StructuredValue::release_bounded_tensor_spec_value() { + // @@protoc_insertion_point(field_release:tensorflow.StructuredValue.bounded_tensor_spec_value) + if (_internal_has_bounded_tensor_spec_value()) { + clear_has_kind(); + ::tensorflow::BoundedTensorSpecProto* temp = _impl_.kind_.bounded_tensor_spec_value_; + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + _impl_.kind_.bounded_tensor_spec_value_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::tensorflow::BoundedTensorSpecProto& StructuredValue::_internal_bounded_tensor_spec_value() const { + return _internal_has_bounded_tensor_spec_value() + ? *_impl_.kind_.bounded_tensor_spec_value_ + : reinterpret_cast< ::tensorflow::BoundedTensorSpecProto&>(::tensorflow::_BoundedTensorSpecProto_default_instance_); +} +inline const ::tensorflow::BoundedTensorSpecProto& StructuredValue::bounded_tensor_spec_value() const { + // @@protoc_insertion_point(field_get:tensorflow.StructuredValue.bounded_tensor_spec_value) + return _internal_bounded_tensor_spec_value(); +} +inline ::tensorflow::BoundedTensorSpecProto* StructuredValue::unsafe_arena_release_bounded_tensor_spec_value() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.StructuredValue.bounded_tensor_spec_value) + if (_internal_has_bounded_tensor_spec_value()) { + clear_has_kind(); + ::tensorflow::BoundedTensorSpecProto* temp = _impl_.kind_.bounded_tensor_spec_value_; + _impl_.kind_.bounded_tensor_spec_value_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void StructuredValue::unsafe_arena_set_allocated_bounded_tensor_spec_value(::tensorflow::BoundedTensorSpecProto* bounded_tensor_spec_value) { + clear_kind(); + if (bounded_tensor_spec_value) { + set_has_bounded_tensor_spec_value(); + _impl_.kind_.bounded_tensor_spec_value_ = bounded_tensor_spec_value; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.StructuredValue.bounded_tensor_spec_value) +} +inline ::tensorflow::BoundedTensorSpecProto* StructuredValue::_internal_mutable_bounded_tensor_spec_value() { + if (!_internal_has_bounded_tensor_spec_value()) { + clear_kind(); + set_has_bounded_tensor_spec_value(); + _impl_.kind_.bounded_tensor_spec_value_ = CreateMaybeMessage< ::tensorflow::BoundedTensorSpecProto >(GetArenaForAllocation()); + } + return _impl_.kind_.bounded_tensor_spec_value_; +} +inline ::tensorflow::BoundedTensorSpecProto* StructuredValue::mutable_bounded_tensor_spec_value() { + ::tensorflow::BoundedTensorSpecProto* _msg = _internal_mutable_bounded_tensor_spec_value(); + // @@protoc_insertion_point(field_mutable:tensorflow.StructuredValue.bounded_tensor_spec_value) + return _msg; +} + +// .tensorflow.ListValue list_value = 51; +inline bool StructuredValue::_internal_has_list_value() const { + return kind_case() == kListValue; +} +inline bool StructuredValue::has_list_value() const { + return _internal_has_list_value(); +} +inline void StructuredValue::set_has_list_value() { + _impl_._oneof_case_[0] = kListValue; +} +inline void StructuredValue::clear_list_value() { + if (_internal_has_list_value()) { + if (GetArenaForAllocation() == nullptr) { + delete _impl_.kind_.list_value_; + } + clear_has_kind(); + } +} +inline ::tensorflow::ListValue* StructuredValue::release_list_value() { + // @@protoc_insertion_point(field_release:tensorflow.StructuredValue.list_value) + if (_internal_has_list_value()) { + clear_has_kind(); + ::tensorflow::ListValue* temp = _impl_.kind_.list_value_; + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + _impl_.kind_.list_value_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::tensorflow::ListValue& StructuredValue::_internal_list_value() const { + return _internal_has_list_value() + ? *_impl_.kind_.list_value_ + : reinterpret_cast< ::tensorflow::ListValue&>(::tensorflow::_ListValue_default_instance_); +} +inline const ::tensorflow::ListValue& StructuredValue::list_value() const { + // @@protoc_insertion_point(field_get:tensorflow.StructuredValue.list_value) + return _internal_list_value(); +} +inline ::tensorflow::ListValue* StructuredValue::unsafe_arena_release_list_value() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.StructuredValue.list_value) + if (_internal_has_list_value()) { + clear_has_kind(); + ::tensorflow::ListValue* temp = _impl_.kind_.list_value_; + _impl_.kind_.list_value_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void StructuredValue::unsafe_arena_set_allocated_list_value(::tensorflow::ListValue* list_value) { + clear_kind(); + if (list_value) { + set_has_list_value(); + _impl_.kind_.list_value_ = list_value; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.StructuredValue.list_value) +} +inline ::tensorflow::ListValue* StructuredValue::_internal_mutable_list_value() { + if (!_internal_has_list_value()) { + clear_kind(); + set_has_list_value(); + _impl_.kind_.list_value_ = CreateMaybeMessage< ::tensorflow::ListValue >(GetArenaForAllocation()); + } + return _impl_.kind_.list_value_; +} +inline ::tensorflow::ListValue* StructuredValue::mutable_list_value() { + ::tensorflow::ListValue* _msg = _internal_mutable_list_value(); + // @@protoc_insertion_point(field_mutable:tensorflow.StructuredValue.list_value) + return _msg; +} + +// .tensorflow.TupleValue tuple_value = 52; +inline bool StructuredValue::_internal_has_tuple_value() const { + return kind_case() == kTupleValue; +} +inline bool StructuredValue::has_tuple_value() const { + return _internal_has_tuple_value(); +} +inline void StructuredValue::set_has_tuple_value() { + _impl_._oneof_case_[0] = kTupleValue; +} +inline void StructuredValue::clear_tuple_value() { + if (_internal_has_tuple_value()) { + if (GetArenaForAllocation() == nullptr) { + delete _impl_.kind_.tuple_value_; + } + clear_has_kind(); + } +} +inline ::tensorflow::TupleValue* StructuredValue::release_tuple_value() { + // @@protoc_insertion_point(field_release:tensorflow.StructuredValue.tuple_value) + if (_internal_has_tuple_value()) { + clear_has_kind(); + ::tensorflow::TupleValue* temp = _impl_.kind_.tuple_value_; + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + _impl_.kind_.tuple_value_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::tensorflow::TupleValue& StructuredValue::_internal_tuple_value() const { + return _internal_has_tuple_value() + ? *_impl_.kind_.tuple_value_ + : reinterpret_cast< ::tensorflow::TupleValue&>(::tensorflow::_TupleValue_default_instance_); +} +inline const ::tensorflow::TupleValue& StructuredValue::tuple_value() const { + // @@protoc_insertion_point(field_get:tensorflow.StructuredValue.tuple_value) + return _internal_tuple_value(); +} +inline ::tensorflow::TupleValue* StructuredValue::unsafe_arena_release_tuple_value() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.StructuredValue.tuple_value) + if (_internal_has_tuple_value()) { + clear_has_kind(); + ::tensorflow::TupleValue* temp = _impl_.kind_.tuple_value_; + _impl_.kind_.tuple_value_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void StructuredValue::unsafe_arena_set_allocated_tuple_value(::tensorflow::TupleValue* tuple_value) { + clear_kind(); + if (tuple_value) { + set_has_tuple_value(); + _impl_.kind_.tuple_value_ = tuple_value; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.StructuredValue.tuple_value) +} +inline ::tensorflow::TupleValue* StructuredValue::_internal_mutable_tuple_value() { + if (!_internal_has_tuple_value()) { + clear_kind(); + set_has_tuple_value(); + _impl_.kind_.tuple_value_ = CreateMaybeMessage< ::tensorflow::TupleValue >(GetArenaForAllocation()); + } + return _impl_.kind_.tuple_value_; +} +inline ::tensorflow::TupleValue* StructuredValue::mutable_tuple_value() { + ::tensorflow::TupleValue* _msg = _internal_mutable_tuple_value(); + // @@protoc_insertion_point(field_mutable:tensorflow.StructuredValue.tuple_value) + return _msg; +} + +// .tensorflow.DictValue dict_value = 53; +inline bool StructuredValue::_internal_has_dict_value() const { + return kind_case() == kDictValue; +} +inline bool StructuredValue::has_dict_value() const { + return _internal_has_dict_value(); +} +inline void StructuredValue::set_has_dict_value() { + _impl_._oneof_case_[0] = kDictValue; +} +inline void StructuredValue::clear_dict_value() { + if (_internal_has_dict_value()) { + if (GetArenaForAllocation() == nullptr) { + delete _impl_.kind_.dict_value_; + } + clear_has_kind(); + } +} +inline ::tensorflow::DictValue* StructuredValue::release_dict_value() { + // @@protoc_insertion_point(field_release:tensorflow.StructuredValue.dict_value) + if (_internal_has_dict_value()) { + clear_has_kind(); + ::tensorflow::DictValue* temp = _impl_.kind_.dict_value_; + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + _impl_.kind_.dict_value_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::tensorflow::DictValue& StructuredValue::_internal_dict_value() const { + return _internal_has_dict_value() + ? *_impl_.kind_.dict_value_ + : reinterpret_cast< ::tensorflow::DictValue&>(::tensorflow::_DictValue_default_instance_); +} +inline const ::tensorflow::DictValue& StructuredValue::dict_value() const { + // @@protoc_insertion_point(field_get:tensorflow.StructuredValue.dict_value) + return _internal_dict_value(); +} +inline ::tensorflow::DictValue* StructuredValue::unsafe_arena_release_dict_value() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.StructuredValue.dict_value) + if (_internal_has_dict_value()) { + clear_has_kind(); + ::tensorflow::DictValue* temp = _impl_.kind_.dict_value_; + _impl_.kind_.dict_value_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void StructuredValue::unsafe_arena_set_allocated_dict_value(::tensorflow::DictValue* dict_value) { + clear_kind(); + if (dict_value) { + set_has_dict_value(); + _impl_.kind_.dict_value_ = dict_value; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.StructuredValue.dict_value) +} +inline ::tensorflow::DictValue* StructuredValue::_internal_mutable_dict_value() { + if (!_internal_has_dict_value()) { + clear_kind(); + set_has_dict_value(); + _impl_.kind_.dict_value_ = CreateMaybeMessage< ::tensorflow::DictValue >(GetArenaForAllocation()); + } + return _impl_.kind_.dict_value_; +} +inline ::tensorflow::DictValue* StructuredValue::mutable_dict_value() { + ::tensorflow::DictValue* _msg = _internal_mutable_dict_value(); + // @@protoc_insertion_point(field_mutable:tensorflow.StructuredValue.dict_value) + return _msg; +} + +// .tensorflow.NamedTupleValue named_tuple_value = 54; +inline bool StructuredValue::_internal_has_named_tuple_value() const { + return kind_case() == kNamedTupleValue; +} +inline bool StructuredValue::has_named_tuple_value() const { + return _internal_has_named_tuple_value(); +} +inline void StructuredValue::set_has_named_tuple_value() { + _impl_._oneof_case_[0] = kNamedTupleValue; +} +inline void StructuredValue::clear_named_tuple_value() { + if (_internal_has_named_tuple_value()) { + if (GetArenaForAllocation() == nullptr) { + delete _impl_.kind_.named_tuple_value_; + } + clear_has_kind(); + } +} +inline ::tensorflow::NamedTupleValue* StructuredValue::release_named_tuple_value() { + // @@protoc_insertion_point(field_release:tensorflow.StructuredValue.named_tuple_value) + if (_internal_has_named_tuple_value()) { + clear_has_kind(); + ::tensorflow::NamedTupleValue* temp = _impl_.kind_.named_tuple_value_; + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + _impl_.kind_.named_tuple_value_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::tensorflow::NamedTupleValue& StructuredValue::_internal_named_tuple_value() const { + return _internal_has_named_tuple_value() + ? *_impl_.kind_.named_tuple_value_ + : reinterpret_cast< ::tensorflow::NamedTupleValue&>(::tensorflow::_NamedTupleValue_default_instance_); +} +inline const ::tensorflow::NamedTupleValue& StructuredValue::named_tuple_value() const { + // @@protoc_insertion_point(field_get:tensorflow.StructuredValue.named_tuple_value) + return _internal_named_tuple_value(); +} +inline ::tensorflow::NamedTupleValue* StructuredValue::unsafe_arena_release_named_tuple_value() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.StructuredValue.named_tuple_value) + if (_internal_has_named_tuple_value()) { + clear_has_kind(); + ::tensorflow::NamedTupleValue* temp = _impl_.kind_.named_tuple_value_; + _impl_.kind_.named_tuple_value_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void StructuredValue::unsafe_arena_set_allocated_named_tuple_value(::tensorflow::NamedTupleValue* named_tuple_value) { + clear_kind(); + if (named_tuple_value) { + set_has_named_tuple_value(); + _impl_.kind_.named_tuple_value_ = named_tuple_value; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.StructuredValue.named_tuple_value) +} +inline ::tensorflow::NamedTupleValue* StructuredValue::_internal_mutable_named_tuple_value() { + if (!_internal_has_named_tuple_value()) { + clear_kind(); + set_has_named_tuple_value(); + _impl_.kind_.named_tuple_value_ = CreateMaybeMessage< ::tensorflow::NamedTupleValue >(GetArenaForAllocation()); + } + return _impl_.kind_.named_tuple_value_; +} +inline ::tensorflow::NamedTupleValue* StructuredValue::mutable_named_tuple_value() { + ::tensorflow::NamedTupleValue* _msg = _internal_mutable_named_tuple_value(); + // @@protoc_insertion_point(field_mutable:tensorflow.StructuredValue.named_tuple_value) + return _msg; +} + +// .tensorflow.TensorProto tensor_value = 55; +inline bool StructuredValue::_internal_has_tensor_value() const { + return kind_case() == kTensorValue; +} +inline bool StructuredValue::has_tensor_value() const { + return _internal_has_tensor_value(); +} +inline void StructuredValue::set_has_tensor_value() { + _impl_._oneof_case_[0] = kTensorValue; +} +inline ::tensorflow::TensorProto* StructuredValue::release_tensor_value() { + // @@protoc_insertion_point(field_release:tensorflow.StructuredValue.tensor_value) + if (_internal_has_tensor_value()) { + clear_has_kind(); + ::tensorflow::TensorProto* temp = _impl_.kind_.tensor_value_; + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + _impl_.kind_.tensor_value_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::tensorflow::TensorProto& StructuredValue::_internal_tensor_value() const { + return _internal_has_tensor_value() + ? *_impl_.kind_.tensor_value_ + : reinterpret_cast< ::tensorflow::TensorProto&>(::tensorflow::_TensorProto_default_instance_); +} +inline const ::tensorflow::TensorProto& StructuredValue::tensor_value() const { + // @@protoc_insertion_point(field_get:tensorflow.StructuredValue.tensor_value) + return _internal_tensor_value(); +} +inline ::tensorflow::TensorProto* StructuredValue::unsafe_arena_release_tensor_value() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.StructuredValue.tensor_value) + if (_internal_has_tensor_value()) { + clear_has_kind(); + ::tensorflow::TensorProto* temp = _impl_.kind_.tensor_value_; + _impl_.kind_.tensor_value_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void StructuredValue::unsafe_arena_set_allocated_tensor_value(::tensorflow::TensorProto* tensor_value) { + clear_kind(); + if (tensor_value) { + set_has_tensor_value(); + _impl_.kind_.tensor_value_ = tensor_value; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.StructuredValue.tensor_value) +} +inline ::tensorflow::TensorProto* StructuredValue::_internal_mutable_tensor_value() { + if (!_internal_has_tensor_value()) { + clear_kind(); + set_has_tensor_value(); + _impl_.kind_.tensor_value_ = CreateMaybeMessage< ::tensorflow::TensorProto >(GetArenaForAllocation()); + } + return _impl_.kind_.tensor_value_; +} +inline ::tensorflow::TensorProto* StructuredValue::mutable_tensor_value() { + ::tensorflow::TensorProto* _msg = _internal_mutable_tensor_value(); + // @@protoc_insertion_point(field_mutable:tensorflow.StructuredValue.tensor_value) + return _msg; +} + +// .tensorflow.TensorProto numpy_value = 56; +inline bool StructuredValue::_internal_has_numpy_value() const { + return kind_case() == kNumpyValue; +} +inline bool StructuredValue::has_numpy_value() const { + return _internal_has_numpy_value(); +} +inline void StructuredValue::set_has_numpy_value() { + _impl_._oneof_case_[0] = kNumpyValue; +} +inline ::tensorflow::TensorProto* StructuredValue::release_numpy_value() { + // @@protoc_insertion_point(field_release:tensorflow.StructuredValue.numpy_value) + if (_internal_has_numpy_value()) { + clear_has_kind(); + ::tensorflow::TensorProto* temp = _impl_.kind_.numpy_value_; + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + _impl_.kind_.numpy_value_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::tensorflow::TensorProto& StructuredValue::_internal_numpy_value() const { + return _internal_has_numpy_value() + ? *_impl_.kind_.numpy_value_ + : reinterpret_cast< ::tensorflow::TensorProto&>(::tensorflow::_TensorProto_default_instance_); +} +inline const ::tensorflow::TensorProto& StructuredValue::numpy_value() const { + // @@protoc_insertion_point(field_get:tensorflow.StructuredValue.numpy_value) + return _internal_numpy_value(); +} +inline ::tensorflow::TensorProto* StructuredValue::unsafe_arena_release_numpy_value() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.StructuredValue.numpy_value) + if (_internal_has_numpy_value()) { + clear_has_kind(); + ::tensorflow::TensorProto* temp = _impl_.kind_.numpy_value_; + _impl_.kind_.numpy_value_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void StructuredValue::unsafe_arena_set_allocated_numpy_value(::tensorflow::TensorProto* numpy_value) { + clear_kind(); + if (numpy_value) { + set_has_numpy_value(); + _impl_.kind_.numpy_value_ = numpy_value; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.StructuredValue.numpy_value) +} +inline ::tensorflow::TensorProto* StructuredValue::_internal_mutable_numpy_value() { + if (!_internal_has_numpy_value()) { + clear_kind(); + set_has_numpy_value(); + _impl_.kind_.numpy_value_ = CreateMaybeMessage< ::tensorflow::TensorProto >(GetArenaForAllocation()); + } + return _impl_.kind_.numpy_value_; +} +inline ::tensorflow::TensorProto* StructuredValue::mutable_numpy_value() { + ::tensorflow::TensorProto* _msg = _internal_mutable_numpy_value(); + // @@protoc_insertion_point(field_mutable:tensorflow.StructuredValue.numpy_value) + return _msg; +} + +inline bool StructuredValue::has_kind() const { + return kind_case() != KIND_NOT_SET; +} +inline void StructuredValue::clear_has_kind() { + _impl_._oneof_case_[0] = KIND_NOT_SET; +} +inline StructuredValue::KindCase StructuredValue::kind_case() const { + return StructuredValue::KindCase(_impl_._oneof_case_[0]); +} +// ------------------------------------------------------------------- + +// NoneValue + +// ------------------------------------------------------------------- + +// ListValue + +// repeated .tensorflow.StructuredValue values = 1; +inline int ListValue::_internal_values_size() const { + return _impl_.values_.size(); +} +inline int ListValue::values_size() const { + return _internal_values_size(); +} +inline void ListValue::clear_values() { + _impl_.values_.Clear(); +} +inline ::tensorflow::StructuredValue* ListValue::mutable_values(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.ListValue.values) + return _impl_.values_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::StructuredValue >* +ListValue::mutable_values() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.ListValue.values) + return &_impl_.values_; +} +inline const ::tensorflow::StructuredValue& ListValue::_internal_values(int index) const { + return _impl_.values_.Get(index); +} +inline const ::tensorflow::StructuredValue& ListValue::values(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.ListValue.values) + return _internal_values(index); +} +inline ::tensorflow::StructuredValue* ListValue::_internal_add_values() { + return _impl_.values_.Add(); +} +inline ::tensorflow::StructuredValue* ListValue::add_values() { + ::tensorflow::StructuredValue* _add = _internal_add_values(); + // @@protoc_insertion_point(field_add:tensorflow.ListValue.values) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::StructuredValue >& +ListValue::values() const { + // @@protoc_insertion_point(field_list:tensorflow.ListValue.values) + return _impl_.values_; +} + +// ------------------------------------------------------------------- + +// TupleValue + +// repeated .tensorflow.StructuredValue values = 1; +inline int TupleValue::_internal_values_size() const { + return _impl_.values_.size(); +} +inline int TupleValue::values_size() const { + return _internal_values_size(); +} +inline void TupleValue::clear_values() { + _impl_.values_.Clear(); +} +inline ::tensorflow::StructuredValue* TupleValue::mutable_values(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.TupleValue.values) + return _impl_.values_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::StructuredValue >* +TupleValue::mutable_values() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.TupleValue.values) + return &_impl_.values_; +} +inline const ::tensorflow::StructuredValue& TupleValue::_internal_values(int index) const { + return _impl_.values_.Get(index); +} +inline const ::tensorflow::StructuredValue& TupleValue::values(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.TupleValue.values) + return _internal_values(index); +} +inline ::tensorflow::StructuredValue* TupleValue::_internal_add_values() { + return _impl_.values_.Add(); +} +inline ::tensorflow::StructuredValue* TupleValue::add_values() { + ::tensorflow::StructuredValue* _add = _internal_add_values(); + // @@protoc_insertion_point(field_add:tensorflow.TupleValue.values) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::StructuredValue >& +TupleValue::values() const { + // @@protoc_insertion_point(field_list:tensorflow.TupleValue.values) + return _impl_.values_; +} + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// DictValue + +// map fields = 1; +inline int DictValue::_internal_fields_size() const { + return _impl_.fields_.size(); +} +inline int DictValue::fields_size() const { + return _internal_fields_size(); +} +inline void DictValue::clear_fields() { + _impl_.fields_.Clear(); +} +inline const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::StructuredValue >& +DictValue::_internal_fields() const { + return _impl_.fields_.GetMap(); +} +inline const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::StructuredValue >& +DictValue::fields() const { + // @@protoc_insertion_point(field_map:tensorflow.DictValue.fields) + return _internal_fields(); +} +inline ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::StructuredValue >* +DictValue::_internal_mutable_fields() { + return _impl_.fields_.MutableMap(); +} +inline ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::StructuredValue >* +DictValue::mutable_fields() { + // @@protoc_insertion_point(field_mutable_map:tensorflow.DictValue.fields) + return _internal_mutable_fields(); +} + +// ------------------------------------------------------------------- + +// PairValue + +// string key = 1; +inline void PairValue::clear_key() { + _impl_.key_.ClearToEmpty(); +} +inline const std::string& PairValue::key() const { + // @@protoc_insertion_point(field_get:tensorflow.PairValue.key) + return _internal_key(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void PairValue::set_key(ArgT0&& arg0, ArgT... args) { + + _impl_.key_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.PairValue.key) +} +inline std::string* PairValue::mutable_key() { + std::string* _s = _internal_mutable_key(); + // @@protoc_insertion_point(field_mutable:tensorflow.PairValue.key) + return _s; +} +inline const std::string& PairValue::_internal_key() const { + return _impl_.key_.Get(); +} +inline void PairValue::_internal_set_key(const std::string& value) { + + _impl_.key_.Set(value, GetArenaForAllocation()); +} +inline std::string* PairValue::_internal_mutable_key() { + + return _impl_.key_.Mutable(GetArenaForAllocation()); +} +inline std::string* PairValue::release_key() { + // @@protoc_insertion_point(field_release:tensorflow.PairValue.key) + return _impl_.key_.Release(); +} +inline void PairValue::set_allocated_key(std::string* key) { + if (key != nullptr) { + + } else { + + } + _impl_.key_.SetAllocated(key, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.key_.IsDefault()) { + _impl_.key_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.PairValue.key) +} + +// .tensorflow.StructuredValue value = 2; +inline bool PairValue::_internal_has_value() const { + return this != internal_default_instance() && _impl_.value_ != nullptr; +} +inline bool PairValue::has_value() const { + return _internal_has_value(); +} +inline void PairValue::clear_value() { + if (GetArenaForAllocation() == nullptr && _impl_.value_ != nullptr) { + delete _impl_.value_; + } + _impl_.value_ = nullptr; +} +inline const ::tensorflow::StructuredValue& PairValue::_internal_value() const { + const ::tensorflow::StructuredValue* p = _impl_.value_; + return p != nullptr ? *p : reinterpret_cast( + ::tensorflow::_StructuredValue_default_instance_); +} +inline const ::tensorflow::StructuredValue& PairValue::value() const { + // @@protoc_insertion_point(field_get:tensorflow.PairValue.value) + return _internal_value(); +} +inline void PairValue::unsafe_arena_set_allocated_value( + ::tensorflow::StructuredValue* value) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.value_); + } + _impl_.value_ = value; + if (value) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.PairValue.value) +} +inline ::tensorflow::StructuredValue* PairValue::release_value() { + + ::tensorflow::StructuredValue* temp = _impl_.value_; + _impl_.value_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tensorflow::StructuredValue* PairValue::unsafe_arena_release_value() { + // @@protoc_insertion_point(field_release:tensorflow.PairValue.value) + + ::tensorflow::StructuredValue* temp = _impl_.value_; + _impl_.value_ = nullptr; + return temp; +} +inline ::tensorflow::StructuredValue* PairValue::_internal_mutable_value() { + + if (_impl_.value_ == nullptr) { + auto* p = CreateMaybeMessage<::tensorflow::StructuredValue>(GetArenaForAllocation()); + _impl_.value_ = p; + } + return _impl_.value_; +} +inline ::tensorflow::StructuredValue* PairValue::mutable_value() { + ::tensorflow::StructuredValue* _msg = _internal_mutable_value(); + // @@protoc_insertion_point(field_mutable:tensorflow.PairValue.value) + return _msg; +} +inline void PairValue::set_allocated_value(::tensorflow::StructuredValue* value) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete _impl_.value_; + } + if (value) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(value); + if (message_arena != submessage_arena) { + value = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, value, submessage_arena); + } + + } else { + + } + _impl_.value_ = value; + // @@protoc_insertion_point(field_set_allocated:tensorflow.PairValue.value) +} + +// ------------------------------------------------------------------- + +// NamedTupleValue + +// string name = 1; +inline void NamedTupleValue::clear_name() { + _impl_.name_.ClearToEmpty(); +} +inline const std::string& NamedTupleValue::name() const { + // @@protoc_insertion_point(field_get:tensorflow.NamedTupleValue.name) + return _internal_name(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void NamedTupleValue::set_name(ArgT0&& arg0, ArgT... args) { + + _impl_.name_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.NamedTupleValue.name) +} +inline std::string* NamedTupleValue::mutable_name() { + std::string* _s = _internal_mutable_name(); + // @@protoc_insertion_point(field_mutable:tensorflow.NamedTupleValue.name) + return _s; +} +inline const std::string& NamedTupleValue::_internal_name() const { + return _impl_.name_.Get(); +} +inline void NamedTupleValue::_internal_set_name(const std::string& value) { + + _impl_.name_.Set(value, GetArenaForAllocation()); +} +inline std::string* NamedTupleValue::_internal_mutable_name() { + + return _impl_.name_.Mutable(GetArenaForAllocation()); +} +inline std::string* NamedTupleValue::release_name() { + // @@protoc_insertion_point(field_release:tensorflow.NamedTupleValue.name) + return _impl_.name_.Release(); +} +inline void NamedTupleValue::set_allocated_name(std::string* name) { + if (name != nullptr) { + + } else { + + } + _impl_.name_.SetAllocated(name, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.name_.IsDefault()) { + _impl_.name_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.NamedTupleValue.name) +} + +// repeated .tensorflow.PairValue values = 2; +inline int NamedTupleValue::_internal_values_size() const { + return _impl_.values_.size(); +} +inline int NamedTupleValue::values_size() const { + return _internal_values_size(); +} +inline void NamedTupleValue::clear_values() { + _impl_.values_.Clear(); +} +inline ::tensorflow::PairValue* NamedTupleValue::mutable_values(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.NamedTupleValue.values) + return _impl_.values_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::PairValue >* +NamedTupleValue::mutable_values() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.NamedTupleValue.values) + return &_impl_.values_; +} +inline const ::tensorflow::PairValue& NamedTupleValue::_internal_values(int index) const { + return _impl_.values_.Get(index); +} +inline const ::tensorflow::PairValue& NamedTupleValue::values(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.NamedTupleValue.values) + return _internal_values(index); +} +inline ::tensorflow::PairValue* NamedTupleValue::_internal_add_values() { + return _impl_.values_.Add(); +} +inline ::tensorflow::PairValue* NamedTupleValue::add_values() { + ::tensorflow::PairValue* _add = _internal_add_values(); + // @@protoc_insertion_point(field_add:tensorflow.NamedTupleValue.values) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::PairValue >& +NamedTupleValue::values() const { + // @@protoc_insertion_point(field_list:tensorflow.NamedTupleValue.values) + return _impl_.values_; +} + +// ------------------------------------------------------------------- + +// TensorSpecProto + +// string name = 1; +inline void TensorSpecProto::clear_name() { + _impl_.name_.ClearToEmpty(); +} +inline const std::string& TensorSpecProto::name() const { + // @@protoc_insertion_point(field_get:tensorflow.TensorSpecProto.name) + return _internal_name(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void TensorSpecProto::set_name(ArgT0&& arg0, ArgT... args) { + + _impl_.name_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.TensorSpecProto.name) +} +inline std::string* TensorSpecProto::mutable_name() { + std::string* _s = _internal_mutable_name(); + // @@protoc_insertion_point(field_mutable:tensorflow.TensorSpecProto.name) + return _s; +} +inline const std::string& TensorSpecProto::_internal_name() const { + return _impl_.name_.Get(); +} +inline void TensorSpecProto::_internal_set_name(const std::string& value) { + + _impl_.name_.Set(value, GetArenaForAllocation()); +} +inline std::string* TensorSpecProto::_internal_mutable_name() { + + return _impl_.name_.Mutable(GetArenaForAllocation()); +} +inline std::string* TensorSpecProto::release_name() { + // @@protoc_insertion_point(field_release:tensorflow.TensorSpecProto.name) + return _impl_.name_.Release(); +} +inline void TensorSpecProto::set_allocated_name(std::string* name) { + if (name != nullptr) { + + } else { + + } + _impl_.name_.SetAllocated(name, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.name_.IsDefault()) { + _impl_.name_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.TensorSpecProto.name) +} + +// .tensorflow.TensorShapeProto shape = 2; +inline bool TensorSpecProto::_internal_has_shape() const { + return this != internal_default_instance() && _impl_.shape_ != nullptr; +} +inline bool TensorSpecProto::has_shape() const { + return _internal_has_shape(); +} +inline const ::tensorflow::TensorShapeProto& TensorSpecProto::_internal_shape() const { + const ::tensorflow::TensorShapeProto* p = _impl_.shape_; + return p != nullptr ? *p : reinterpret_cast( + ::tensorflow::_TensorShapeProto_default_instance_); +} +inline const ::tensorflow::TensorShapeProto& TensorSpecProto::shape() const { + // @@protoc_insertion_point(field_get:tensorflow.TensorSpecProto.shape) + return _internal_shape(); +} +inline void TensorSpecProto::unsafe_arena_set_allocated_shape( + ::tensorflow::TensorShapeProto* shape) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.shape_); + } + _impl_.shape_ = shape; + if (shape) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.TensorSpecProto.shape) +} +inline ::tensorflow::TensorShapeProto* TensorSpecProto::release_shape() { + + ::tensorflow::TensorShapeProto* temp = _impl_.shape_; + _impl_.shape_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tensorflow::TensorShapeProto* TensorSpecProto::unsafe_arena_release_shape() { + // @@protoc_insertion_point(field_release:tensorflow.TensorSpecProto.shape) + + ::tensorflow::TensorShapeProto* temp = _impl_.shape_; + _impl_.shape_ = nullptr; + return temp; +} +inline ::tensorflow::TensorShapeProto* TensorSpecProto::_internal_mutable_shape() { + + if (_impl_.shape_ == nullptr) { + auto* p = CreateMaybeMessage<::tensorflow::TensorShapeProto>(GetArenaForAllocation()); + _impl_.shape_ = p; + } + return _impl_.shape_; +} +inline ::tensorflow::TensorShapeProto* TensorSpecProto::mutable_shape() { + ::tensorflow::TensorShapeProto* _msg = _internal_mutable_shape(); + // @@protoc_insertion_point(field_mutable:tensorflow.TensorSpecProto.shape) + return _msg; +} +inline void TensorSpecProto::set_allocated_shape(::tensorflow::TensorShapeProto* shape) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.shape_); + } + if (shape) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( + reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(shape)); + if (message_arena != submessage_arena) { + shape = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, shape, submessage_arena); + } + + } else { + + } + _impl_.shape_ = shape; + // @@protoc_insertion_point(field_set_allocated:tensorflow.TensorSpecProto.shape) +} + +// .tensorflow.DataType dtype = 3; +inline void TensorSpecProto::clear_dtype() { + _impl_.dtype_ = 0; +} +inline ::tensorflow::DataType TensorSpecProto::_internal_dtype() const { + return static_cast< ::tensorflow::DataType >(_impl_.dtype_); +} +inline ::tensorflow::DataType TensorSpecProto::dtype() const { + // @@protoc_insertion_point(field_get:tensorflow.TensorSpecProto.dtype) + return _internal_dtype(); +} +inline void TensorSpecProto::_internal_set_dtype(::tensorflow::DataType value) { + + _impl_.dtype_ = value; +} +inline void TensorSpecProto::set_dtype(::tensorflow::DataType value) { + _internal_set_dtype(value); + // @@protoc_insertion_point(field_set:tensorflow.TensorSpecProto.dtype) +} + +// ------------------------------------------------------------------- + +// BoundedTensorSpecProto + +// string name = 1; +inline void BoundedTensorSpecProto::clear_name() { + _impl_.name_.ClearToEmpty(); +} +inline const std::string& BoundedTensorSpecProto::name() const { + // @@protoc_insertion_point(field_get:tensorflow.BoundedTensorSpecProto.name) + return _internal_name(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void BoundedTensorSpecProto::set_name(ArgT0&& arg0, ArgT... args) { + + _impl_.name_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.BoundedTensorSpecProto.name) +} +inline std::string* BoundedTensorSpecProto::mutable_name() { + std::string* _s = _internal_mutable_name(); + // @@protoc_insertion_point(field_mutable:tensorflow.BoundedTensorSpecProto.name) + return _s; +} +inline const std::string& BoundedTensorSpecProto::_internal_name() const { + return _impl_.name_.Get(); +} +inline void BoundedTensorSpecProto::_internal_set_name(const std::string& value) { + + _impl_.name_.Set(value, GetArenaForAllocation()); +} +inline std::string* BoundedTensorSpecProto::_internal_mutable_name() { + + return _impl_.name_.Mutable(GetArenaForAllocation()); +} +inline std::string* BoundedTensorSpecProto::release_name() { + // @@protoc_insertion_point(field_release:tensorflow.BoundedTensorSpecProto.name) + return _impl_.name_.Release(); +} +inline void BoundedTensorSpecProto::set_allocated_name(std::string* name) { + if (name != nullptr) { + + } else { + + } + _impl_.name_.SetAllocated(name, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.name_.IsDefault()) { + _impl_.name_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.BoundedTensorSpecProto.name) +} + +// .tensorflow.TensorShapeProto shape = 2; +inline bool BoundedTensorSpecProto::_internal_has_shape() const { + return this != internal_default_instance() && _impl_.shape_ != nullptr; +} +inline bool BoundedTensorSpecProto::has_shape() const { + return _internal_has_shape(); +} +inline const ::tensorflow::TensorShapeProto& BoundedTensorSpecProto::_internal_shape() const { + const ::tensorflow::TensorShapeProto* p = _impl_.shape_; + return p != nullptr ? *p : reinterpret_cast( + ::tensorflow::_TensorShapeProto_default_instance_); +} +inline const ::tensorflow::TensorShapeProto& BoundedTensorSpecProto::shape() const { + // @@protoc_insertion_point(field_get:tensorflow.BoundedTensorSpecProto.shape) + return _internal_shape(); +} +inline void BoundedTensorSpecProto::unsafe_arena_set_allocated_shape( + ::tensorflow::TensorShapeProto* shape) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.shape_); + } + _impl_.shape_ = shape; + if (shape) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.BoundedTensorSpecProto.shape) +} +inline ::tensorflow::TensorShapeProto* BoundedTensorSpecProto::release_shape() { + + ::tensorflow::TensorShapeProto* temp = _impl_.shape_; + _impl_.shape_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tensorflow::TensorShapeProto* BoundedTensorSpecProto::unsafe_arena_release_shape() { + // @@protoc_insertion_point(field_release:tensorflow.BoundedTensorSpecProto.shape) + + ::tensorflow::TensorShapeProto* temp = _impl_.shape_; + _impl_.shape_ = nullptr; + return temp; +} +inline ::tensorflow::TensorShapeProto* BoundedTensorSpecProto::_internal_mutable_shape() { + + if (_impl_.shape_ == nullptr) { + auto* p = CreateMaybeMessage<::tensorflow::TensorShapeProto>(GetArenaForAllocation()); + _impl_.shape_ = p; + } + return _impl_.shape_; +} +inline ::tensorflow::TensorShapeProto* BoundedTensorSpecProto::mutable_shape() { + ::tensorflow::TensorShapeProto* _msg = _internal_mutable_shape(); + // @@protoc_insertion_point(field_mutable:tensorflow.BoundedTensorSpecProto.shape) + return _msg; +} +inline void BoundedTensorSpecProto::set_allocated_shape(::tensorflow::TensorShapeProto* shape) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.shape_); + } + if (shape) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( + reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(shape)); + if (message_arena != submessage_arena) { + shape = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, shape, submessage_arena); + } + + } else { + + } + _impl_.shape_ = shape; + // @@protoc_insertion_point(field_set_allocated:tensorflow.BoundedTensorSpecProto.shape) +} + +// .tensorflow.DataType dtype = 3; +inline void BoundedTensorSpecProto::clear_dtype() { + _impl_.dtype_ = 0; +} +inline ::tensorflow::DataType BoundedTensorSpecProto::_internal_dtype() const { + return static_cast< ::tensorflow::DataType >(_impl_.dtype_); +} +inline ::tensorflow::DataType BoundedTensorSpecProto::dtype() const { + // @@protoc_insertion_point(field_get:tensorflow.BoundedTensorSpecProto.dtype) + return _internal_dtype(); +} +inline void BoundedTensorSpecProto::_internal_set_dtype(::tensorflow::DataType value) { + + _impl_.dtype_ = value; +} +inline void BoundedTensorSpecProto::set_dtype(::tensorflow::DataType value) { + _internal_set_dtype(value); + // @@protoc_insertion_point(field_set:tensorflow.BoundedTensorSpecProto.dtype) +} + +// .tensorflow.TensorProto minimum = 4; +inline bool BoundedTensorSpecProto::_internal_has_minimum() const { + return this != internal_default_instance() && _impl_.minimum_ != nullptr; +} +inline bool BoundedTensorSpecProto::has_minimum() const { + return _internal_has_minimum(); +} +inline const ::tensorflow::TensorProto& BoundedTensorSpecProto::_internal_minimum() const { + const ::tensorflow::TensorProto* p = _impl_.minimum_; + return p != nullptr ? *p : reinterpret_cast( + ::tensorflow::_TensorProto_default_instance_); +} +inline const ::tensorflow::TensorProto& BoundedTensorSpecProto::minimum() const { + // @@protoc_insertion_point(field_get:tensorflow.BoundedTensorSpecProto.minimum) + return _internal_minimum(); +} +inline void BoundedTensorSpecProto::unsafe_arena_set_allocated_minimum( + ::tensorflow::TensorProto* minimum) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.minimum_); + } + _impl_.minimum_ = minimum; + if (minimum) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.BoundedTensorSpecProto.minimum) +} +inline ::tensorflow::TensorProto* BoundedTensorSpecProto::release_minimum() { + + ::tensorflow::TensorProto* temp = _impl_.minimum_; + _impl_.minimum_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tensorflow::TensorProto* BoundedTensorSpecProto::unsafe_arena_release_minimum() { + // @@protoc_insertion_point(field_release:tensorflow.BoundedTensorSpecProto.minimum) + + ::tensorflow::TensorProto* temp = _impl_.minimum_; + _impl_.minimum_ = nullptr; + return temp; +} +inline ::tensorflow::TensorProto* BoundedTensorSpecProto::_internal_mutable_minimum() { + + if (_impl_.minimum_ == nullptr) { + auto* p = CreateMaybeMessage<::tensorflow::TensorProto>(GetArenaForAllocation()); + _impl_.minimum_ = p; + } + return _impl_.minimum_; +} +inline ::tensorflow::TensorProto* BoundedTensorSpecProto::mutable_minimum() { + ::tensorflow::TensorProto* _msg = _internal_mutable_minimum(); + // @@protoc_insertion_point(field_mutable:tensorflow.BoundedTensorSpecProto.minimum) + return _msg; +} +inline void BoundedTensorSpecProto::set_allocated_minimum(::tensorflow::TensorProto* minimum) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.minimum_); + } + if (minimum) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( + reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(minimum)); + if (message_arena != submessage_arena) { + minimum = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, minimum, submessage_arena); + } + + } else { + + } + _impl_.minimum_ = minimum; + // @@protoc_insertion_point(field_set_allocated:tensorflow.BoundedTensorSpecProto.minimum) +} + +// .tensorflow.TensorProto maximum = 5; +inline bool BoundedTensorSpecProto::_internal_has_maximum() const { + return this != internal_default_instance() && _impl_.maximum_ != nullptr; +} +inline bool BoundedTensorSpecProto::has_maximum() const { + return _internal_has_maximum(); +} +inline const ::tensorflow::TensorProto& BoundedTensorSpecProto::_internal_maximum() const { + const ::tensorflow::TensorProto* p = _impl_.maximum_; + return p != nullptr ? *p : reinterpret_cast( + ::tensorflow::_TensorProto_default_instance_); +} +inline const ::tensorflow::TensorProto& BoundedTensorSpecProto::maximum() const { + // @@protoc_insertion_point(field_get:tensorflow.BoundedTensorSpecProto.maximum) + return _internal_maximum(); +} +inline void BoundedTensorSpecProto::unsafe_arena_set_allocated_maximum( + ::tensorflow::TensorProto* maximum) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.maximum_); + } + _impl_.maximum_ = maximum; + if (maximum) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.BoundedTensorSpecProto.maximum) +} +inline ::tensorflow::TensorProto* BoundedTensorSpecProto::release_maximum() { + + ::tensorflow::TensorProto* temp = _impl_.maximum_; + _impl_.maximum_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tensorflow::TensorProto* BoundedTensorSpecProto::unsafe_arena_release_maximum() { + // @@protoc_insertion_point(field_release:tensorflow.BoundedTensorSpecProto.maximum) + + ::tensorflow::TensorProto* temp = _impl_.maximum_; + _impl_.maximum_ = nullptr; + return temp; +} +inline ::tensorflow::TensorProto* BoundedTensorSpecProto::_internal_mutable_maximum() { + + if (_impl_.maximum_ == nullptr) { + auto* p = CreateMaybeMessage<::tensorflow::TensorProto>(GetArenaForAllocation()); + _impl_.maximum_ = p; + } + return _impl_.maximum_; +} +inline ::tensorflow::TensorProto* BoundedTensorSpecProto::mutable_maximum() { + ::tensorflow::TensorProto* _msg = _internal_mutable_maximum(); + // @@protoc_insertion_point(field_mutable:tensorflow.BoundedTensorSpecProto.maximum) + return _msg; +} +inline void BoundedTensorSpecProto::set_allocated_maximum(::tensorflow::TensorProto* maximum) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.maximum_); + } + if (maximum) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( + reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(maximum)); + if (message_arena != submessage_arena) { + maximum = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, maximum, submessage_arena); + } + + } else { + + } + _impl_.maximum_ = maximum; + // @@protoc_insertion_point(field_set_allocated:tensorflow.BoundedTensorSpecProto.maximum) +} + +// ------------------------------------------------------------------- + +// TypeSpecProto + +// .tensorflow.TypeSpecProto.TypeSpecClass type_spec_class = 1; +inline void TypeSpecProto::clear_type_spec_class() { + _impl_.type_spec_class_ = 0; +} +inline ::tensorflow::TypeSpecProto_TypeSpecClass TypeSpecProto::_internal_type_spec_class() const { + return static_cast< ::tensorflow::TypeSpecProto_TypeSpecClass >(_impl_.type_spec_class_); +} +inline ::tensorflow::TypeSpecProto_TypeSpecClass TypeSpecProto::type_spec_class() const { + // @@protoc_insertion_point(field_get:tensorflow.TypeSpecProto.type_spec_class) + return _internal_type_spec_class(); +} +inline void TypeSpecProto::_internal_set_type_spec_class(::tensorflow::TypeSpecProto_TypeSpecClass value) { + + _impl_.type_spec_class_ = value; +} +inline void TypeSpecProto::set_type_spec_class(::tensorflow::TypeSpecProto_TypeSpecClass value) { + _internal_set_type_spec_class(value); + // @@protoc_insertion_point(field_set:tensorflow.TypeSpecProto.type_spec_class) +} + +// .tensorflow.StructuredValue type_state = 2; +inline bool TypeSpecProto::_internal_has_type_state() const { + return this != internal_default_instance() && _impl_.type_state_ != nullptr; +} +inline bool TypeSpecProto::has_type_state() const { + return _internal_has_type_state(); +} +inline void TypeSpecProto::clear_type_state() { + if (GetArenaForAllocation() == nullptr && _impl_.type_state_ != nullptr) { + delete _impl_.type_state_; + } + _impl_.type_state_ = nullptr; +} +inline const ::tensorflow::StructuredValue& TypeSpecProto::_internal_type_state() const { + const ::tensorflow::StructuredValue* p = _impl_.type_state_; + return p != nullptr ? *p : reinterpret_cast( + ::tensorflow::_StructuredValue_default_instance_); +} +inline const ::tensorflow::StructuredValue& TypeSpecProto::type_state() const { + // @@protoc_insertion_point(field_get:tensorflow.TypeSpecProto.type_state) + return _internal_type_state(); +} +inline void TypeSpecProto::unsafe_arena_set_allocated_type_state( + ::tensorflow::StructuredValue* type_state) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.type_state_); + } + _impl_.type_state_ = type_state; + if (type_state) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.TypeSpecProto.type_state) +} +inline ::tensorflow::StructuredValue* TypeSpecProto::release_type_state() { + + ::tensorflow::StructuredValue* temp = _impl_.type_state_; + _impl_.type_state_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tensorflow::StructuredValue* TypeSpecProto::unsafe_arena_release_type_state() { + // @@protoc_insertion_point(field_release:tensorflow.TypeSpecProto.type_state) + + ::tensorflow::StructuredValue* temp = _impl_.type_state_; + _impl_.type_state_ = nullptr; + return temp; +} +inline ::tensorflow::StructuredValue* TypeSpecProto::_internal_mutable_type_state() { + + if (_impl_.type_state_ == nullptr) { + auto* p = CreateMaybeMessage<::tensorflow::StructuredValue>(GetArenaForAllocation()); + _impl_.type_state_ = p; + } + return _impl_.type_state_; +} +inline ::tensorflow::StructuredValue* TypeSpecProto::mutable_type_state() { + ::tensorflow::StructuredValue* _msg = _internal_mutable_type_state(); + // @@protoc_insertion_point(field_mutable:tensorflow.TypeSpecProto.type_state) + return _msg; +} +inline void TypeSpecProto::set_allocated_type_state(::tensorflow::StructuredValue* type_state) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete _impl_.type_state_; + } + if (type_state) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(type_state); + if (message_arena != submessage_arena) { + type_state = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, type_state, submessage_arena); + } + + } else { + + } + _impl_.type_state_ = type_state; + // @@protoc_insertion_point(field_set_allocated:tensorflow.TypeSpecProto.type_state) +} + +// string type_spec_class_name = 3; +inline void TypeSpecProto::clear_type_spec_class_name() { + _impl_.type_spec_class_name_.ClearToEmpty(); +} +inline const std::string& TypeSpecProto::type_spec_class_name() const { + // @@protoc_insertion_point(field_get:tensorflow.TypeSpecProto.type_spec_class_name) + return _internal_type_spec_class_name(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void TypeSpecProto::set_type_spec_class_name(ArgT0&& arg0, ArgT... args) { + + _impl_.type_spec_class_name_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.TypeSpecProto.type_spec_class_name) +} +inline std::string* TypeSpecProto::mutable_type_spec_class_name() { + std::string* _s = _internal_mutable_type_spec_class_name(); + // @@protoc_insertion_point(field_mutable:tensorflow.TypeSpecProto.type_spec_class_name) + return _s; +} +inline const std::string& TypeSpecProto::_internal_type_spec_class_name() const { + return _impl_.type_spec_class_name_.Get(); +} +inline void TypeSpecProto::_internal_set_type_spec_class_name(const std::string& value) { + + _impl_.type_spec_class_name_.Set(value, GetArenaForAllocation()); +} +inline std::string* TypeSpecProto::_internal_mutable_type_spec_class_name() { + + return _impl_.type_spec_class_name_.Mutable(GetArenaForAllocation()); +} +inline std::string* TypeSpecProto::release_type_spec_class_name() { + // @@protoc_insertion_point(field_release:tensorflow.TypeSpecProto.type_spec_class_name) + return _impl_.type_spec_class_name_.Release(); +} +inline void TypeSpecProto::set_allocated_type_spec_class_name(std::string* type_spec_class_name) { + if (type_spec_class_name != nullptr) { + + } else { + + } + _impl_.type_spec_class_name_.SetAllocated(type_spec_class_name, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.type_spec_class_name_.IsDefault()) { + _impl_.type_spec_class_name_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.TypeSpecProto.type_spec_class_name) +} + +// int32 num_flat_components = 4; +inline void TypeSpecProto::clear_num_flat_components() { + _impl_.num_flat_components_ = 0; +} +inline int32_t TypeSpecProto::_internal_num_flat_components() const { + return _impl_.num_flat_components_; +} +inline int32_t TypeSpecProto::num_flat_components() const { + // @@protoc_insertion_point(field_get:tensorflow.TypeSpecProto.num_flat_components) + return _internal_num_flat_components(); +} +inline void TypeSpecProto::_internal_set_num_flat_components(int32_t value) { + + _impl_.num_flat_components_ = value; +} +inline void TypeSpecProto::set_num_flat_components(int32_t value) { + _internal_set_num_flat_components(value); + // @@protoc_insertion_point(field_set:tensorflow.TypeSpecProto.num_flat_components) +} + +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + + +// @@protoc_insertion_point(namespace_scope) + +} // namespace tensorflow + +PROTOBUF_NAMESPACE_OPEN + +template <> struct is_proto_enum< ::tensorflow::TypeSpecProto_TypeSpecClass> : ::std::true_type {}; +template <> +inline const EnumDescriptor* GetEnumDescriptor< ::tensorflow::TypeSpecProto_TypeSpecClass>() { + return ::tensorflow::TypeSpecProto_TypeSpecClass_descriptor(); +} + +PROTOBUF_NAMESPACE_CLOSE + +// @@protoc_insertion_point(global_scope) + +#include +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprotobuf_2fstruct_2eproto diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/struct.proto b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/struct.proto new file mode 100644 index 0000000000000000000000000000000000000000..019382b6a6315f01f5a8d6ed2a7d1004fbda40a7 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/struct.proto @@ -0,0 +1,164 @@ +syntax = "proto3"; + +package tensorflow; + +import "tensorflow/core/framework/tensor.proto"; +import "tensorflow/core/framework/tensor_shape.proto"; +import "tensorflow/core/framework/types.proto"; + +option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/protobuf/for_core_protos_go_proto"; + +// `StructuredValue` represents a dynamically typed value representing various +// data structures that are inspired by Python data structures typically used in +// TensorFlow functions as inputs and outputs. +// +// For example when saving a Layer there may be a `training` argument. If the +// user passes a boolean True/False, that switches between two concrete +// TensorFlow functions. In order to switch between them in the same way after +// loading the SavedModel, we need to represent "True" and "False". +// +// A more advanced example might be a function which takes a list of +// dictionaries mapping from strings to Tensors. In order to map from +// user-specified arguments `[{"a": tf.constant(1.)}, {"q": tf.constant(3.)}]` +// after load to the right saved TensorFlow function, we need to represent the +// nested structure and the strings, recording that we have a trace for anything +// matching `[{"a": tf.TensorSpec(None, tf.float32)}, {"q": tf.TensorSpec([], +// tf.float64)}]` as an example. +// +// Likewise functions may return nested structures of Tensors, for example +// returning a dictionary mapping from strings to Tensors. In order for the +// loaded function to return the same structure we need to serialize it. +// +// This is an ergonomic aid for working with loaded SavedModels, not a promise +// to serialize all possible function signatures. For example we do not expect +// to pickle generic Python objects, and ideally we'd stay language-agnostic. +message StructuredValue { + // The kind of value. + oneof kind { + // Represents None. + NoneValue none_value = 1; + + // Represents a double-precision floating-point value (a Python `float`). + double float64_value = 11; + // Represents a signed integer value, limited to 64 bits. + // Larger values from Python's arbitrary-precision integers are unsupported. + sint64 int64_value = 12; + // Represents a string of Unicode characters stored in a Python `str`. + // In Python 3, this is exactly what type `str` is. + // In Python 2, this is the UTF-8 encoding of the characters. + // For strings with ASCII characters only (as often used in TensorFlow code) + // there is effectively no difference between the language versions. + // The obsolescent `unicode` type of Python 2 is not supported here. + string string_value = 13; + // Represents a boolean value. + bool bool_value = 14; + + // Represents a TensorShape. + tensorflow.TensorShapeProto tensor_shape_value = 31; + // Represents an enum value for dtype. + tensorflow.DataType tensor_dtype_value = 32; + // Represents a value for tf.TensorSpec. + TensorSpecProto tensor_spec_value = 33; + // Represents a value for tf.TypeSpec. + TypeSpecProto type_spec_value = 34; + // Represents a value for tf.BoundedTensorSpec. + BoundedTensorSpecProto bounded_tensor_spec_value = 35; + + // Represents a list of `Value`. + ListValue list_value = 51; + // Represents a tuple of `Value`. + TupleValue tuple_value = 52; + // Represents a dict `Value`. + DictValue dict_value = 53; + // Represents Python's namedtuple. + NamedTupleValue named_tuple_value = 54; + // Represents a value for tf.Tensor. + tensorflow.TensorProto tensor_value = 55; + // Represents a value for np.ndarray. + tensorflow.TensorProto numpy_value = 56; + } +} + +// Represents None. +message NoneValue {} + +// Represents a Python list. +message ListValue { + repeated StructuredValue values = 1; +} + +// Represents a Python tuple. +message TupleValue { + repeated StructuredValue values = 1; +} + +// Represents a Python dict keyed by `str`. +// The comment on Unicode from Value.string_value applies analogously. +message DictValue { + map fields = 1; +} + +// Represents a (key, value) pair. +message PairValue { + string key = 1; + StructuredValue value = 2; +} + +// Represents Python's namedtuple. +message NamedTupleValue { + string name = 1; + repeated PairValue values = 2; +} + +// A protobuf to represent tf.TensorSpec. +message TensorSpecProto { + string name = 1; + tensorflow.TensorShapeProto shape = 2; + tensorflow.DataType dtype = 3; +} + +// A protobuf to represent tf.BoundedTensorSpec. +message BoundedTensorSpecProto { + string name = 1; + tensorflow.TensorShapeProto shape = 2; + tensorflow.DataType dtype = 3; + tensorflow.TensorProto minimum = 4; + tensorflow.TensorProto maximum = 5; +} + +// Represents a tf.TypeSpec +message TypeSpecProto { + enum TypeSpecClass { + UNKNOWN = 0; + SPARSE_TENSOR_SPEC = 1; // tf.SparseTensorSpec + INDEXED_SLICES_SPEC = 2; // tf.IndexedSlicesSpec + RAGGED_TENSOR_SPEC = 3; // tf.RaggedTensorSpec + TENSOR_ARRAY_SPEC = 4; // tf.TensorArraySpec + DATA_DATASET_SPEC = 5; // tf.data.DatasetSpec + DATA_ITERATOR_SPEC = 6; // IteratorSpec from data/ops/iterator_ops.py + OPTIONAL_SPEC = 7; // tf.OptionalSpec + PER_REPLICA_SPEC = 8; // PerReplicaSpec from distribute/values.py + VARIABLE_SPEC = 9; // tf.VariableSpec + ROW_PARTITION_SPEC = 10; // RowPartitionSpec from ragged/row_partition.py + reserved 11; + REGISTERED_TYPE_SPEC = 12; // The type registered as type_spec_class_name. + EXTENSION_TYPE_SPEC = 13; // Subclasses of tf.ExtensionType + } + TypeSpecClass type_spec_class = 1; + + // The value returned by TypeSpec._serialize(). + StructuredValue type_state = 2; + + // The name of the TypeSpec class. + // * If type_spec_class == REGISTERED_TYPE_SPEC, the TypeSpec class is + // the one registered under this name. For types registered outside + // core TensorFlow by an add-on library, that library must be loaded + // before this value can be deserialized by nested_structure_coder. + // * If type_spec_class specifies a particular TypeSpec class, this field is + // redundant with the type_spec_class enum, and is only used for error + // reporting in older binaries that do not know the tupe_spec_class enum. + string type_spec_class_name = 3; + + // The number of flat tensor components required by this TypeSpec. + int32 num_flat_components = 4; +} diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/tensor_bundle.pb.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/tensor_bundle.pb.h new file mode 100644 index 0000000000000000000000000000000000000000..7bb0f45d55a157638cfc60fefc045b4261db0f19 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/tensor_bundle.pb.h @@ -0,0 +1,917 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/tensor_bundle.proto + +#ifndef GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprotobuf_2ftensor_5fbundle_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprotobuf_2ftensor_5fbundle_2eproto + +#include +#include + +#include +#if PROTOBUF_VERSION < 3021000 +#error This file was generated by a newer version of protoc which is +#error incompatible with your Protocol Buffer headers. Please update +#error your headers. +#endif +#if 3021009 < PROTOBUF_MIN_PROTOC_VERSION +#error This file was generated by an older version of protoc which is +#error incompatible with your Protocol Buffer headers. Please +#error regenerate this file with a newer version of protoc. +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include // IWYU pragma: export +#include // IWYU pragma: export +#include +#include +#include "tensorflow/core/framework/tensor_shape.pb.h" +#include "tensorflow/core/framework/tensor_slice.pb.h" +#include "tensorflow/core/framework/types.pb.h" +#include "tensorflow/core/framework/versions.pb.h" +// @@protoc_insertion_point(includes) +#include +#define PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2fprotobuf_2ftensor_5fbundle_2eproto +PROTOBUF_NAMESPACE_OPEN +namespace internal { +class AnyMetadata; +} // namespace internal +PROTOBUF_NAMESPACE_CLOSE + +// Internal implementation detail -- do not use these members. +struct TableStruct_tensorflow_2fcore_2fprotobuf_2ftensor_5fbundle_2eproto { + static const uint32_t offsets[]; +}; +extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_tensorflow_2fcore_2fprotobuf_2ftensor_5fbundle_2eproto; +namespace tensorflow { +class BundleEntryProto; +struct BundleEntryProtoDefaultTypeInternal; +extern BundleEntryProtoDefaultTypeInternal _BundleEntryProto_default_instance_; +class BundleHeaderProto; +struct BundleHeaderProtoDefaultTypeInternal; +extern BundleHeaderProtoDefaultTypeInternal _BundleHeaderProto_default_instance_; +} // namespace tensorflow +PROTOBUF_NAMESPACE_OPEN +template<> ::tensorflow::BundleEntryProto* Arena::CreateMaybeMessage<::tensorflow::BundleEntryProto>(Arena*); +template<> ::tensorflow::BundleHeaderProto* Arena::CreateMaybeMessage<::tensorflow::BundleHeaderProto>(Arena*); +PROTOBUF_NAMESPACE_CLOSE +namespace tensorflow { + +enum BundleHeaderProto_Endianness : int { + BundleHeaderProto_Endianness_LITTLE = 0, + BundleHeaderProto_Endianness_BIG = 1, + BundleHeaderProto_Endianness_BundleHeaderProto_Endianness_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits::min(), + BundleHeaderProto_Endianness_BundleHeaderProto_Endianness_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits::max() +}; +bool BundleHeaderProto_Endianness_IsValid(int value); +constexpr BundleHeaderProto_Endianness BundleHeaderProto_Endianness_Endianness_MIN = BundleHeaderProto_Endianness_LITTLE; +constexpr BundleHeaderProto_Endianness BundleHeaderProto_Endianness_Endianness_MAX = BundleHeaderProto_Endianness_BIG; +constexpr int BundleHeaderProto_Endianness_Endianness_ARRAYSIZE = BundleHeaderProto_Endianness_Endianness_MAX + 1; + +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* BundleHeaderProto_Endianness_descriptor(); +template +inline const std::string& BundleHeaderProto_Endianness_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function BundleHeaderProto_Endianness_Name."); + return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( + BundleHeaderProto_Endianness_descriptor(), enum_t_value); +} +inline bool BundleHeaderProto_Endianness_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, BundleHeaderProto_Endianness* value) { + return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( + BundleHeaderProto_Endianness_descriptor(), name, value); +} +// =================================================================== + +class BundleHeaderProto final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.BundleHeaderProto) */ { + public: + inline BundleHeaderProto() : BundleHeaderProto(nullptr) {} + ~BundleHeaderProto() override; + explicit PROTOBUF_CONSTEXPR BundleHeaderProto(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + BundleHeaderProto(const BundleHeaderProto& from); + BundleHeaderProto(BundleHeaderProto&& from) noexcept + : BundleHeaderProto() { + *this = ::std::move(from); + } + + inline BundleHeaderProto& operator=(const BundleHeaderProto& from) { + CopyFrom(from); + return *this; + } + inline BundleHeaderProto& operator=(BundleHeaderProto&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const BundleHeaderProto& default_instance() { + return *internal_default_instance(); + } + static inline const BundleHeaderProto* internal_default_instance() { + return reinterpret_cast( + &_BundleHeaderProto_default_instance_); + } + static constexpr int kIndexInFileMessages = + 0; + + friend void swap(BundleHeaderProto& a, BundleHeaderProto& b) { + a.Swap(&b); + } + inline void Swap(BundleHeaderProto* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(BundleHeaderProto* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + BundleHeaderProto* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const BundleHeaderProto& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const BundleHeaderProto& from) { + BundleHeaderProto::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(BundleHeaderProto* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.BundleHeaderProto"; + } + protected: + explicit BundleHeaderProto(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + typedef BundleHeaderProto_Endianness Endianness; + static constexpr Endianness LITTLE = + BundleHeaderProto_Endianness_LITTLE; + static constexpr Endianness BIG = + BundleHeaderProto_Endianness_BIG; + static inline bool Endianness_IsValid(int value) { + return BundleHeaderProto_Endianness_IsValid(value); + } + static constexpr Endianness Endianness_MIN = + BundleHeaderProto_Endianness_Endianness_MIN; + static constexpr Endianness Endianness_MAX = + BundleHeaderProto_Endianness_Endianness_MAX; + static constexpr int Endianness_ARRAYSIZE = + BundleHeaderProto_Endianness_Endianness_ARRAYSIZE; + static inline const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* + Endianness_descriptor() { + return BundleHeaderProto_Endianness_descriptor(); + } + template + static inline const std::string& Endianness_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function Endianness_Name."); + return BundleHeaderProto_Endianness_Name(enum_t_value); + } + static inline bool Endianness_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name, + Endianness* value) { + return BundleHeaderProto_Endianness_Parse(name, value); + } + + // accessors ------------------------------------------------------- + + enum : int { + kVersionFieldNumber = 3, + kNumShardsFieldNumber = 1, + kEndiannessFieldNumber = 2, + }; + // .tensorflow.VersionDef version = 3; + bool has_version() const; + private: + bool _internal_has_version() const; + public: + void clear_version(); + const ::tensorflow::VersionDef& version() const; + PROTOBUF_NODISCARD ::tensorflow::VersionDef* release_version(); + ::tensorflow::VersionDef* mutable_version(); + void set_allocated_version(::tensorflow::VersionDef* version); + private: + const ::tensorflow::VersionDef& _internal_version() const; + ::tensorflow::VersionDef* _internal_mutable_version(); + public: + void unsafe_arena_set_allocated_version( + ::tensorflow::VersionDef* version); + ::tensorflow::VersionDef* unsafe_arena_release_version(); + + // int32 num_shards = 1; + void clear_num_shards(); + int32_t num_shards() const; + void set_num_shards(int32_t value); + private: + int32_t _internal_num_shards() const; + void _internal_set_num_shards(int32_t value); + public: + + // .tensorflow.BundleHeaderProto.Endianness endianness = 2; + void clear_endianness(); + ::tensorflow::BundleHeaderProto_Endianness endianness() const; + void set_endianness(::tensorflow::BundleHeaderProto_Endianness value); + private: + ::tensorflow::BundleHeaderProto_Endianness _internal_endianness() const; + void _internal_set_endianness(::tensorflow::BundleHeaderProto_Endianness value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.BundleHeaderProto) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::tensorflow::VersionDef* version_; + int32_t num_shards_; + int endianness_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2ftensor_5fbundle_2eproto; +}; +// ------------------------------------------------------------------- + +class BundleEntryProto final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.BundleEntryProto) */ { + public: + inline BundleEntryProto() : BundleEntryProto(nullptr) {} + ~BundleEntryProto() override; + explicit PROTOBUF_CONSTEXPR BundleEntryProto(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + BundleEntryProto(const BundleEntryProto& from); + BundleEntryProto(BundleEntryProto&& from) noexcept + : BundleEntryProto() { + *this = ::std::move(from); + } + + inline BundleEntryProto& operator=(const BundleEntryProto& from) { + CopyFrom(from); + return *this; + } + inline BundleEntryProto& operator=(BundleEntryProto&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const BundleEntryProto& default_instance() { + return *internal_default_instance(); + } + static inline const BundleEntryProto* internal_default_instance() { + return reinterpret_cast( + &_BundleEntryProto_default_instance_); + } + static constexpr int kIndexInFileMessages = + 1; + + friend void swap(BundleEntryProto& a, BundleEntryProto& b) { + a.Swap(&b); + } + inline void Swap(BundleEntryProto* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(BundleEntryProto* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + BundleEntryProto* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const BundleEntryProto& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const BundleEntryProto& from) { + BundleEntryProto::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(BundleEntryProto* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.BundleEntryProto"; + } + protected: + explicit BundleEntryProto(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kSlicesFieldNumber = 7, + kShapeFieldNumber = 2, + kDtypeFieldNumber = 1, + kShardIdFieldNumber = 3, + kOffsetFieldNumber = 4, + kSizeFieldNumber = 5, + kCrc32CFieldNumber = 6, + }; + // repeated .tensorflow.TensorSliceProto slices = 7; + int slices_size() const; + private: + int _internal_slices_size() const; + public: + void clear_slices(); + ::tensorflow::TensorSliceProto* mutable_slices(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::TensorSliceProto >* + mutable_slices(); + private: + const ::tensorflow::TensorSliceProto& _internal_slices(int index) const; + ::tensorflow::TensorSliceProto* _internal_add_slices(); + public: + const ::tensorflow::TensorSliceProto& slices(int index) const; + ::tensorflow::TensorSliceProto* add_slices(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::TensorSliceProto >& + slices() const; + + // .tensorflow.TensorShapeProto shape = 2; + bool has_shape() const; + private: + bool _internal_has_shape() const; + public: + void clear_shape(); + const ::tensorflow::TensorShapeProto& shape() const; + PROTOBUF_NODISCARD ::tensorflow::TensorShapeProto* release_shape(); + ::tensorflow::TensorShapeProto* mutable_shape(); + void set_allocated_shape(::tensorflow::TensorShapeProto* shape); + private: + const ::tensorflow::TensorShapeProto& _internal_shape() const; + ::tensorflow::TensorShapeProto* _internal_mutable_shape(); + public: + void unsafe_arena_set_allocated_shape( + ::tensorflow::TensorShapeProto* shape); + ::tensorflow::TensorShapeProto* unsafe_arena_release_shape(); + + // .tensorflow.DataType dtype = 1; + void clear_dtype(); + ::tensorflow::DataType dtype() const; + void set_dtype(::tensorflow::DataType value); + private: + ::tensorflow::DataType _internal_dtype() const; + void _internal_set_dtype(::tensorflow::DataType value); + public: + + // int32 shard_id = 3; + void clear_shard_id(); + int32_t shard_id() const; + void set_shard_id(int32_t value); + private: + int32_t _internal_shard_id() const; + void _internal_set_shard_id(int32_t value); + public: + + // int64 offset = 4; + void clear_offset(); + int64_t offset() const; + void set_offset(int64_t value); + private: + int64_t _internal_offset() const; + void _internal_set_offset(int64_t value); + public: + + // int64 size = 5; + void clear_size(); + int64_t size() const; + void set_size(int64_t value); + private: + int64_t _internal_size() const; + void _internal_set_size(int64_t value); + public: + + // fixed32 crc32c = 6; + void clear_crc32c(); + uint32_t crc32c() const; + void set_crc32c(uint32_t value); + private: + uint32_t _internal_crc32c() const; + void _internal_set_crc32c(uint32_t value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.BundleEntryProto) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::TensorSliceProto > slices_; + ::tensorflow::TensorShapeProto* shape_; + int dtype_; + int32_t shard_id_; + int64_t offset_; + int64_t size_; + uint32_t crc32c_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2ftensor_5fbundle_2eproto; +}; +// =================================================================== + + +// =================================================================== + +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// BundleHeaderProto + +// int32 num_shards = 1; +inline void BundleHeaderProto::clear_num_shards() { + _impl_.num_shards_ = 0; +} +inline int32_t BundleHeaderProto::_internal_num_shards() const { + return _impl_.num_shards_; +} +inline int32_t BundleHeaderProto::num_shards() const { + // @@protoc_insertion_point(field_get:tensorflow.BundleHeaderProto.num_shards) + return _internal_num_shards(); +} +inline void BundleHeaderProto::_internal_set_num_shards(int32_t value) { + + _impl_.num_shards_ = value; +} +inline void BundleHeaderProto::set_num_shards(int32_t value) { + _internal_set_num_shards(value); + // @@protoc_insertion_point(field_set:tensorflow.BundleHeaderProto.num_shards) +} + +// .tensorflow.BundleHeaderProto.Endianness endianness = 2; +inline void BundleHeaderProto::clear_endianness() { + _impl_.endianness_ = 0; +} +inline ::tensorflow::BundleHeaderProto_Endianness BundleHeaderProto::_internal_endianness() const { + return static_cast< ::tensorflow::BundleHeaderProto_Endianness >(_impl_.endianness_); +} +inline ::tensorflow::BundleHeaderProto_Endianness BundleHeaderProto::endianness() const { + // @@protoc_insertion_point(field_get:tensorflow.BundleHeaderProto.endianness) + return _internal_endianness(); +} +inline void BundleHeaderProto::_internal_set_endianness(::tensorflow::BundleHeaderProto_Endianness value) { + + _impl_.endianness_ = value; +} +inline void BundleHeaderProto::set_endianness(::tensorflow::BundleHeaderProto_Endianness value) { + _internal_set_endianness(value); + // @@protoc_insertion_point(field_set:tensorflow.BundleHeaderProto.endianness) +} + +// .tensorflow.VersionDef version = 3; +inline bool BundleHeaderProto::_internal_has_version() const { + return this != internal_default_instance() && _impl_.version_ != nullptr; +} +inline bool BundleHeaderProto::has_version() const { + return _internal_has_version(); +} +inline const ::tensorflow::VersionDef& BundleHeaderProto::_internal_version() const { + const ::tensorflow::VersionDef* p = _impl_.version_; + return p != nullptr ? *p : reinterpret_cast( + ::tensorflow::_VersionDef_default_instance_); +} +inline const ::tensorflow::VersionDef& BundleHeaderProto::version() const { + // @@protoc_insertion_point(field_get:tensorflow.BundleHeaderProto.version) + return _internal_version(); +} +inline void BundleHeaderProto::unsafe_arena_set_allocated_version( + ::tensorflow::VersionDef* version) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.version_); + } + _impl_.version_ = version; + if (version) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.BundleHeaderProto.version) +} +inline ::tensorflow::VersionDef* BundleHeaderProto::release_version() { + + ::tensorflow::VersionDef* temp = _impl_.version_; + _impl_.version_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tensorflow::VersionDef* BundleHeaderProto::unsafe_arena_release_version() { + // @@protoc_insertion_point(field_release:tensorflow.BundleHeaderProto.version) + + ::tensorflow::VersionDef* temp = _impl_.version_; + _impl_.version_ = nullptr; + return temp; +} +inline ::tensorflow::VersionDef* BundleHeaderProto::_internal_mutable_version() { + + if (_impl_.version_ == nullptr) { + auto* p = CreateMaybeMessage<::tensorflow::VersionDef>(GetArenaForAllocation()); + _impl_.version_ = p; + } + return _impl_.version_; +} +inline ::tensorflow::VersionDef* BundleHeaderProto::mutable_version() { + ::tensorflow::VersionDef* _msg = _internal_mutable_version(); + // @@protoc_insertion_point(field_mutable:tensorflow.BundleHeaderProto.version) + return _msg; +} +inline void BundleHeaderProto::set_allocated_version(::tensorflow::VersionDef* version) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.version_); + } + if (version) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( + reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(version)); + if (message_arena != submessage_arena) { + version = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, version, submessage_arena); + } + + } else { + + } + _impl_.version_ = version; + // @@protoc_insertion_point(field_set_allocated:tensorflow.BundleHeaderProto.version) +} + +// ------------------------------------------------------------------- + +// BundleEntryProto + +// .tensorflow.DataType dtype = 1; +inline void BundleEntryProto::clear_dtype() { + _impl_.dtype_ = 0; +} +inline ::tensorflow::DataType BundleEntryProto::_internal_dtype() const { + return static_cast< ::tensorflow::DataType >(_impl_.dtype_); +} +inline ::tensorflow::DataType BundleEntryProto::dtype() const { + // @@protoc_insertion_point(field_get:tensorflow.BundleEntryProto.dtype) + return _internal_dtype(); +} +inline void BundleEntryProto::_internal_set_dtype(::tensorflow::DataType value) { + + _impl_.dtype_ = value; +} +inline void BundleEntryProto::set_dtype(::tensorflow::DataType value) { + _internal_set_dtype(value); + // @@protoc_insertion_point(field_set:tensorflow.BundleEntryProto.dtype) +} + +// .tensorflow.TensorShapeProto shape = 2; +inline bool BundleEntryProto::_internal_has_shape() const { + return this != internal_default_instance() && _impl_.shape_ != nullptr; +} +inline bool BundleEntryProto::has_shape() const { + return _internal_has_shape(); +} +inline const ::tensorflow::TensorShapeProto& BundleEntryProto::_internal_shape() const { + const ::tensorflow::TensorShapeProto* p = _impl_.shape_; + return p != nullptr ? *p : reinterpret_cast( + ::tensorflow::_TensorShapeProto_default_instance_); +} +inline const ::tensorflow::TensorShapeProto& BundleEntryProto::shape() const { + // @@protoc_insertion_point(field_get:tensorflow.BundleEntryProto.shape) + return _internal_shape(); +} +inline void BundleEntryProto::unsafe_arena_set_allocated_shape( + ::tensorflow::TensorShapeProto* shape) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.shape_); + } + _impl_.shape_ = shape; + if (shape) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.BundleEntryProto.shape) +} +inline ::tensorflow::TensorShapeProto* BundleEntryProto::release_shape() { + + ::tensorflow::TensorShapeProto* temp = _impl_.shape_; + _impl_.shape_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tensorflow::TensorShapeProto* BundleEntryProto::unsafe_arena_release_shape() { + // @@protoc_insertion_point(field_release:tensorflow.BundleEntryProto.shape) + + ::tensorflow::TensorShapeProto* temp = _impl_.shape_; + _impl_.shape_ = nullptr; + return temp; +} +inline ::tensorflow::TensorShapeProto* BundleEntryProto::_internal_mutable_shape() { + + if (_impl_.shape_ == nullptr) { + auto* p = CreateMaybeMessage<::tensorflow::TensorShapeProto>(GetArenaForAllocation()); + _impl_.shape_ = p; + } + return _impl_.shape_; +} +inline ::tensorflow::TensorShapeProto* BundleEntryProto::mutable_shape() { + ::tensorflow::TensorShapeProto* _msg = _internal_mutable_shape(); + // @@protoc_insertion_point(field_mutable:tensorflow.BundleEntryProto.shape) + return _msg; +} +inline void BundleEntryProto::set_allocated_shape(::tensorflow::TensorShapeProto* shape) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.shape_); + } + if (shape) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( + reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(shape)); + if (message_arena != submessage_arena) { + shape = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, shape, submessage_arena); + } + + } else { + + } + _impl_.shape_ = shape; + // @@protoc_insertion_point(field_set_allocated:tensorflow.BundleEntryProto.shape) +} + +// int32 shard_id = 3; +inline void BundleEntryProto::clear_shard_id() { + _impl_.shard_id_ = 0; +} +inline int32_t BundleEntryProto::_internal_shard_id() const { + return _impl_.shard_id_; +} +inline int32_t BundleEntryProto::shard_id() const { + // @@protoc_insertion_point(field_get:tensorflow.BundleEntryProto.shard_id) + return _internal_shard_id(); +} +inline void BundleEntryProto::_internal_set_shard_id(int32_t value) { + + _impl_.shard_id_ = value; +} +inline void BundleEntryProto::set_shard_id(int32_t value) { + _internal_set_shard_id(value); + // @@protoc_insertion_point(field_set:tensorflow.BundleEntryProto.shard_id) +} + +// int64 offset = 4; +inline void BundleEntryProto::clear_offset() { + _impl_.offset_ = int64_t{0}; +} +inline int64_t BundleEntryProto::_internal_offset() const { + return _impl_.offset_; +} +inline int64_t BundleEntryProto::offset() const { + // @@protoc_insertion_point(field_get:tensorflow.BundleEntryProto.offset) + return _internal_offset(); +} +inline void BundleEntryProto::_internal_set_offset(int64_t value) { + + _impl_.offset_ = value; +} +inline void BundleEntryProto::set_offset(int64_t value) { + _internal_set_offset(value); + // @@protoc_insertion_point(field_set:tensorflow.BundleEntryProto.offset) +} + +// int64 size = 5; +inline void BundleEntryProto::clear_size() { + _impl_.size_ = int64_t{0}; +} +inline int64_t BundleEntryProto::_internal_size() const { + return _impl_.size_; +} +inline int64_t BundleEntryProto::size() const { + // @@protoc_insertion_point(field_get:tensorflow.BundleEntryProto.size) + return _internal_size(); +} +inline void BundleEntryProto::_internal_set_size(int64_t value) { + + _impl_.size_ = value; +} +inline void BundleEntryProto::set_size(int64_t value) { + _internal_set_size(value); + // @@protoc_insertion_point(field_set:tensorflow.BundleEntryProto.size) +} + +// fixed32 crc32c = 6; +inline void BundleEntryProto::clear_crc32c() { + _impl_.crc32c_ = 0u; +} +inline uint32_t BundleEntryProto::_internal_crc32c() const { + return _impl_.crc32c_; +} +inline uint32_t BundleEntryProto::crc32c() const { + // @@protoc_insertion_point(field_get:tensorflow.BundleEntryProto.crc32c) + return _internal_crc32c(); +} +inline void BundleEntryProto::_internal_set_crc32c(uint32_t value) { + + _impl_.crc32c_ = value; +} +inline void BundleEntryProto::set_crc32c(uint32_t value) { + _internal_set_crc32c(value); + // @@protoc_insertion_point(field_set:tensorflow.BundleEntryProto.crc32c) +} + +// repeated .tensorflow.TensorSliceProto slices = 7; +inline int BundleEntryProto::_internal_slices_size() const { + return _impl_.slices_.size(); +} +inline int BundleEntryProto::slices_size() const { + return _internal_slices_size(); +} +inline ::tensorflow::TensorSliceProto* BundleEntryProto::mutable_slices(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.BundleEntryProto.slices) + return _impl_.slices_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::TensorSliceProto >* +BundleEntryProto::mutable_slices() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.BundleEntryProto.slices) + return &_impl_.slices_; +} +inline const ::tensorflow::TensorSliceProto& BundleEntryProto::_internal_slices(int index) const { + return _impl_.slices_.Get(index); +} +inline const ::tensorflow::TensorSliceProto& BundleEntryProto::slices(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.BundleEntryProto.slices) + return _internal_slices(index); +} +inline ::tensorflow::TensorSliceProto* BundleEntryProto::_internal_add_slices() { + return _impl_.slices_.Add(); +} +inline ::tensorflow::TensorSliceProto* BundleEntryProto::add_slices() { + ::tensorflow::TensorSliceProto* _add = _internal_add_slices(); + // @@protoc_insertion_point(field_add:tensorflow.BundleEntryProto.slices) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::TensorSliceProto >& +BundleEntryProto::slices() const { + // @@protoc_insertion_point(field_list:tensorflow.BundleEntryProto.slices) + return _impl_.slices_; +} + +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ +// ------------------------------------------------------------------- + + +// @@protoc_insertion_point(namespace_scope) + +} // namespace tensorflow + +PROTOBUF_NAMESPACE_OPEN + +template <> struct is_proto_enum< ::tensorflow::BundleHeaderProto_Endianness> : ::std::true_type {}; +template <> +inline const EnumDescriptor* GetEnumDescriptor< ::tensorflow::BundleHeaderProto_Endianness>() { + return ::tensorflow::BundleHeaderProto_Endianness_descriptor(); +} + +PROTOBUF_NAMESPACE_CLOSE + +// @@protoc_insertion_point(global_scope) + +#include +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprotobuf_2ftensor_5fbundle_2eproto diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/tensor_bundle.proto b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/tensor_bundle.proto new file mode 100644 index 0000000000000000000000000000000000000000..999195cc95d645d9b8971683938228244c2d5e0b --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/tensor_bundle.proto @@ -0,0 +1,66 @@ +syntax = "proto3"; + +package tensorflow; + +import "tensorflow/core/framework/tensor_shape.proto"; +import "tensorflow/core/framework/tensor_slice.proto"; +import "tensorflow/core/framework/types.proto"; +import "tensorflow/core/framework/versions.proto"; + +option cc_enable_arenas = true; +option java_outer_classname = "TensorBundleProtos"; +option java_multiple_files = true; +option java_package = "org.tensorflow.util"; +option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/protobuf/for_core_protos_go_proto"; + +// Protos used in the tensor bundle module (tf/core/util/tensor_bundle/). + +// Special header that is associated with a bundle. +// +// TODO(zongheng,zhifengc): maybe in the future, we can add information about +// which binary produced this checkpoint, timestamp, etc. Sometime, these can be +// valuable debugging information. And if needed, these can be used as defensive +// information ensuring reader (binary version) of the checkpoint and the writer +// (binary version) must match within certain range, etc. +message BundleHeaderProto { + // Number of data files in the bundle. + int32 num_shards = 1; + + // An enum indicating the endianness of the platform that produced this + // bundle. A bundle can only be read by a platform with matching endianness. + // Defaults to LITTLE, as most modern platforms are little-endian. + // + // Affects the binary tensor data bytes only, not the metadata in protobufs. + enum Endianness { + LITTLE = 0; + BIG = 1; + } + Endianness endianness = 2; + + // Versioning of the tensor bundle format. + VersionDef version = 3; +} + +// Describes the metadata related to a checkpointed tensor. +message BundleEntryProto { + // The tensor dtype and shape. + DataType dtype = 1; + TensorShapeProto shape = 2; + // The binary content of the tensor lies in: + // File "shard_id": bytes [offset, offset + size). + int32 shard_id = 3; + int64 offset = 4; + int64 size = 5; + + // The CRC32C checksum of the tensor bytes. + fixed32 crc32c = 6; + + // Iff present, this entry represents a partitioned tensor. The previous + // fields are interpreted as follows: + // + // "dtype", "shape": describe the full tensor. + // "shard_id", "offset", "size", "crc32c": all IGNORED. + // These information for each slice can be looked up in their own + // BundleEntryProto, keyed by each "slice_name". + repeated TensorSliceProto slices = 7; +} diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/tensorflow_server.pb.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/tensorflow_server.pb.h new file mode 100644 index 0000000000000000000000000000000000000000..33524e7784b1bf000b174cfdcc086639549460ee --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/tensorflow_server.pb.h @@ -0,0 +1,759 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/tensorflow_server.proto + +#ifndef GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprotobuf_2ftensorflow_5fserver_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprotobuf_2ftensorflow_5fserver_2eproto + +#include +#include + +#include +#if PROTOBUF_VERSION < 3021000 +#error This file was generated by a newer version of protoc which is +#error incompatible with your Protocol Buffer headers. Please update +#error your headers. +#endif +#if 3021009 < PROTOBUF_MIN_PROTOC_VERSION +#error This file was generated by an older version of protoc which is +#error incompatible with your Protocol Buffer headers. Please +#error regenerate this file with a newer version of protoc. +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include // IWYU pragma: export +#include // IWYU pragma: export +#include +#include "tensorflow/core/protobuf/cluster.pb.h" +#include "tensorflow/core/protobuf/config.pb.h" +#include "tensorflow/core/protobuf/device_filters.pb.h" +// @@protoc_insertion_point(includes) +#include +#define PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2fprotobuf_2ftensorflow_5fserver_2eproto +PROTOBUF_NAMESPACE_OPEN +namespace internal { +class AnyMetadata; +} // namespace internal +PROTOBUF_NAMESPACE_CLOSE + +// Internal implementation detail -- do not use these members. +struct TableStruct_tensorflow_2fcore_2fprotobuf_2ftensorflow_5fserver_2eproto { + static const uint32_t offsets[]; +}; +extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_tensorflow_2fcore_2fprotobuf_2ftensorflow_5fserver_2eproto; +namespace tensorflow { +class ServerDef; +struct ServerDefDefaultTypeInternal; +extern ServerDefDefaultTypeInternal _ServerDef_default_instance_; +} // namespace tensorflow +PROTOBUF_NAMESPACE_OPEN +template<> ::tensorflow::ServerDef* Arena::CreateMaybeMessage<::tensorflow::ServerDef>(Arena*); +PROTOBUF_NAMESPACE_CLOSE +namespace tensorflow { + +// =================================================================== + +class ServerDef final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.ServerDef) */ { + public: + inline ServerDef() : ServerDef(nullptr) {} + ~ServerDef() override; + explicit PROTOBUF_CONSTEXPR ServerDef(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + ServerDef(const ServerDef& from); + ServerDef(ServerDef&& from) noexcept + : ServerDef() { + *this = ::std::move(from); + } + + inline ServerDef& operator=(const ServerDef& from) { + CopyFrom(from); + return *this; + } + inline ServerDef& operator=(ServerDef&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const ServerDef& default_instance() { + return *internal_default_instance(); + } + static inline const ServerDef* internal_default_instance() { + return reinterpret_cast( + &_ServerDef_default_instance_); + } + static constexpr int kIndexInFileMessages = + 0; + + friend void swap(ServerDef& a, ServerDef& b) { + a.Swap(&b); + } + inline void Swap(ServerDef* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(ServerDef* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + ServerDef* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const ServerDef& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const ServerDef& from) { + ServerDef::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(ServerDef* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.ServerDef"; + } + protected: + explicit ServerDef(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kJobNameFieldNumber = 2, + kProtocolFieldNumber = 5, + kClusterFieldNumber = 1, + kDefaultSessionConfigFieldNumber = 4, + kClusterDeviceFiltersFieldNumber = 7, + kTaskIndexFieldNumber = 3, + kPortFieldNumber = 6, + kReplicaFieldNumber = 8, + }; + // string job_name = 2; + void clear_job_name(); + const std::string& job_name() const; + template + void set_job_name(ArgT0&& arg0, ArgT... args); + std::string* mutable_job_name(); + PROTOBUF_NODISCARD std::string* release_job_name(); + void set_allocated_job_name(std::string* job_name); + private: + const std::string& _internal_job_name() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_job_name(const std::string& value); + std::string* _internal_mutable_job_name(); + public: + + // string protocol = 5; + void clear_protocol(); + const std::string& protocol() const; + template + void set_protocol(ArgT0&& arg0, ArgT... args); + std::string* mutable_protocol(); + PROTOBUF_NODISCARD std::string* release_protocol(); + void set_allocated_protocol(std::string* protocol); + private: + const std::string& _internal_protocol() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_protocol(const std::string& value); + std::string* _internal_mutable_protocol(); + public: + + // .tensorflow.ClusterDef cluster = 1; + bool has_cluster() const; + private: + bool _internal_has_cluster() const; + public: + void clear_cluster(); + const ::tensorflow::ClusterDef& cluster() const; + PROTOBUF_NODISCARD ::tensorflow::ClusterDef* release_cluster(); + ::tensorflow::ClusterDef* mutable_cluster(); + void set_allocated_cluster(::tensorflow::ClusterDef* cluster); + private: + const ::tensorflow::ClusterDef& _internal_cluster() const; + ::tensorflow::ClusterDef* _internal_mutable_cluster(); + public: + void unsafe_arena_set_allocated_cluster( + ::tensorflow::ClusterDef* cluster); + ::tensorflow::ClusterDef* unsafe_arena_release_cluster(); + + // .tensorflow.ConfigProto default_session_config = 4; + bool has_default_session_config() const; + private: + bool _internal_has_default_session_config() const; + public: + void clear_default_session_config(); + const ::tensorflow::ConfigProto& default_session_config() const; + PROTOBUF_NODISCARD ::tensorflow::ConfigProto* release_default_session_config(); + ::tensorflow::ConfigProto* mutable_default_session_config(); + void set_allocated_default_session_config(::tensorflow::ConfigProto* default_session_config); + private: + const ::tensorflow::ConfigProto& _internal_default_session_config() const; + ::tensorflow::ConfigProto* _internal_mutable_default_session_config(); + public: + void unsafe_arena_set_allocated_default_session_config( + ::tensorflow::ConfigProto* default_session_config); + ::tensorflow::ConfigProto* unsafe_arena_release_default_session_config(); + + // .tensorflow.ClusterDeviceFilters cluster_device_filters = 7; + bool has_cluster_device_filters() const; + private: + bool _internal_has_cluster_device_filters() const; + public: + void clear_cluster_device_filters(); + const ::tensorflow::ClusterDeviceFilters& cluster_device_filters() const; + PROTOBUF_NODISCARD ::tensorflow::ClusterDeviceFilters* release_cluster_device_filters(); + ::tensorflow::ClusterDeviceFilters* mutable_cluster_device_filters(); + void set_allocated_cluster_device_filters(::tensorflow::ClusterDeviceFilters* cluster_device_filters); + private: + const ::tensorflow::ClusterDeviceFilters& _internal_cluster_device_filters() const; + ::tensorflow::ClusterDeviceFilters* _internal_mutable_cluster_device_filters(); + public: + void unsafe_arena_set_allocated_cluster_device_filters( + ::tensorflow::ClusterDeviceFilters* cluster_device_filters); + ::tensorflow::ClusterDeviceFilters* unsafe_arena_release_cluster_device_filters(); + + // int32 task_index = 3; + void clear_task_index(); + int32_t task_index() const; + void set_task_index(int32_t value); + private: + int32_t _internal_task_index() const; + void _internal_set_task_index(int32_t value); + public: + + // int32 port = 6; + void clear_port(); + int32_t port() const; + void set_port(int32_t value); + private: + int32_t _internal_port() const; + void _internal_set_port(int32_t value); + public: + + // int32 replica = 8; + void clear_replica(); + int32_t replica() const; + void set_replica(int32_t value); + private: + int32_t _internal_replica() const; + void _internal_set_replica(int32_t value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.ServerDef) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr job_name_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr protocol_; + ::tensorflow::ClusterDef* cluster_; + ::tensorflow::ConfigProto* default_session_config_; + ::tensorflow::ClusterDeviceFilters* cluster_device_filters_; + int32_t task_index_; + int32_t port_; + int32_t replica_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2ftensorflow_5fserver_2eproto; +}; +// =================================================================== + + +// =================================================================== + +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// ServerDef + +// .tensorflow.ClusterDef cluster = 1; +inline bool ServerDef::_internal_has_cluster() const { + return this != internal_default_instance() && _impl_.cluster_ != nullptr; +} +inline bool ServerDef::has_cluster() const { + return _internal_has_cluster(); +} +inline const ::tensorflow::ClusterDef& ServerDef::_internal_cluster() const { + const ::tensorflow::ClusterDef* p = _impl_.cluster_; + return p != nullptr ? *p : reinterpret_cast( + ::tensorflow::_ClusterDef_default_instance_); +} +inline const ::tensorflow::ClusterDef& ServerDef::cluster() const { + // @@protoc_insertion_point(field_get:tensorflow.ServerDef.cluster) + return _internal_cluster(); +} +inline void ServerDef::unsafe_arena_set_allocated_cluster( + ::tensorflow::ClusterDef* cluster) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.cluster_); + } + _impl_.cluster_ = cluster; + if (cluster) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.ServerDef.cluster) +} +inline ::tensorflow::ClusterDef* ServerDef::release_cluster() { + + ::tensorflow::ClusterDef* temp = _impl_.cluster_; + _impl_.cluster_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tensorflow::ClusterDef* ServerDef::unsafe_arena_release_cluster() { + // @@protoc_insertion_point(field_release:tensorflow.ServerDef.cluster) + + ::tensorflow::ClusterDef* temp = _impl_.cluster_; + _impl_.cluster_ = nullptr; + return temp; +} +inline ::tensorflow::ClusterDef* ServerDef::_internal_mutable_cluster() { + + if (_impl_.cluster_ == nullptr) { + auto* p = CreateMaybeMessage<::tensorflow::ClusterDef>(GetArenaForAllocation()); + _impl_.cluster_ = p; + } + return _impl_.cluster_; +} +inline ::tensorflow::ClusterDef* ServerDef::mutable_cluster() { + ::tensorflow::ClusterDef* _msg = _internal_mutable_cluster(); + // @@protoc_insertion_point(field_mutable:tensorflow.ServerDef.cluster) + return _msg; +} +inline void ServerDef::set_allocated_cluster(::tensorflow::ClusterDef* cluster) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.cluster_); + } + if (cluster) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( + reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(cluster)); + if (message_arena != submessage_arena) { + cluster = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, cluster, submessage_arena); + } + + } else { + + } + _impl_.cluster_ = cluster; + // @@protoc_insertion_point(field_set_allocated:tensorflow.ServerDef.cluster) +} + +// string job_name = 2; +inline void ServerDef::clear_job_name() { + _impl_.job_name_.ClearToEmpty(); +} +inline const std::string& ServerDef::job_name() const { + // @@protoc_insertion_point(field_get:tensorflow.ServerDef.job_name) + return _internal_job_name(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void ServerDef::set_job_name(ArgT0&& arg0, ArgT... args) { + + _impl_.job_name_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.ServerDef.job_name) +} +inline std::string* ServerDef::mutable_job_name() { + std::string* _s = _internal_mutable_job_name(); + // @@protoc_insertion_point(field_mutable:tensorflow.ServerDef.job_name) + return _s; +} +inline const std::string& ServerDef::_internal_job_name() const { + return _impl_.job_name_.Get(); +} +inline void ServerDef::_internal_set_job_name(const std::string& value) { + + _impl_.job_name_.Set(value, GetArenaForAllocation()); +} +inline std::string* ServerDef::_internal_mutable_job_name() { + + return _impl_.job_name_.Mutable(GetArenaForAllocation()); +} +inline std::string* ServerDef::release_job_name() { + // @@protoc_insertion_point(field_release:tensorflow.ServerDef.job_name) + return _impl_.job_name_.Release(); +} +inline void ServerDef::set_allocated_job_name(std::string* job_name) { + if (job_name != nullptr) { + + } else { + + } + _impl_.job_name_.SetAllocated(job_name, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.job_name_.IsDefault()) { + _impl_.job_name_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.ServerDef.job_name) +} + +// int32 replica = 8; +inline void ServerDef::clear_replica() { + _impl_.replica_ = 0; +} +inline int32_t ServerDef::_internal_replica() const { + return _impl_.replica_; +} +inline int32_t ServerDef::replica() const { + // @@protoc_insertion_point(field_get:tensorflow.ServerDef.replica) + return _internal_replica(); +} +inline void ServerDef::_internal_set_replica(int32_t value) { + + _impl_.replica_ = value; +} +inline void ServerDef::set_replica(int32_t value) { + _internal_set_replica(value); + // @@protoc_insertion_point(field_set:tensorflow.ServerDef.replica) +} + +// int32 task_index = 3; +inline void ServerDef::clear_task_index() { + _impl_.task_index_ = 0; +} +inline int32_t ServerDef::_internal_task_index() const { + return _impl_.task_index_; +} +inline int32_t ServerDef::task_index() const { + // @@protoc_insertion_point(field_get:tensorflow.ServerDef.task_index) + return _internal_task_index(); +} +inline void ServerDef::_internal_set_task_index(int32_t value) { + + _impl_.task_index_ = value; +} +inline void ServerDef::set_task_index(int32_t value) { + _internal_set_task_index(value); + // @@protoc_insertion_point(field_set:tensorflow.ServerDef.task_index) +} + +// .tensorflow.ConfigProto default_session_config = 4; +inline bool ServerDef::_internal_has_default_session_config() const { + return this != internal_default_instance() && _impl_.default_session_config_ != nullptr; +} +inline bool ServerDef::has_default_session_config() const { + return _internal_has_default_session_config(); +} +inline const ::tensorflow::ConfigProto& ServerDef::_internal_default_session_config() const { + const ::tensorflow::ConfigProto* p = _impl_.default_session_config_; + return p != nullptr ? *p : reinterpret_cast( + ::tensorflow::_ConfigProto_default_instance_); +} +inline const ::tensorflow::ConfigProto& ServerDef::default_session_config() const { + // @@protoc_insertion_point(field_get:tensorflow.ServerDef.default_session_config) + return _internal_default_session_config(); +} +inline void ServerDef::unsafe_arena_set_allocated_default_session_config( + ::tensorflow::ConfigProto* default_session_config) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.default_session_config_); + } + _impl_.default_session_config_ = default_session_config; + if (default_session_config) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.ServerDef.default_session_config) +} +inline ::tensorflow::ConfigProto* ServerDef::release_default_session_config() { + + ::tensorflow::ConfigProto* temp = _impl_.default_session_config_; + _impl_.default_session_config_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tensorflow::ConfigProto* ServerDef::unsafe_arena_release_default_session_config() { + // @@protoc_insertion_point(field_release:tensorflow.ServerDef.default_session_config) + + ::tensorflow::ConfigProto* temp = _impl_.default_session_config_; + _impl_.default_session_config_ = nullptr; + return temp; +} +inline ::tensorflow::ConfigProto* ServerDef::_internal_mutable_default_session_config() { + + if (_impl_.default_session_config_ == nullptr) { + auto* p = CreateMaybeMessage<::tensorflow::ConfigProto>(GetArenaForAllocation()); + _impl_.default_session_config_ = p; + } + return _impl_.default_session_config_; +} +inline ::tensorflow::ConfigProto* ServerDef::mutable_default_session_config() { + ::tensorflow::ConfigProto* _msg = _internal_mutable_default_session_config(); + // @@protoc_insertion_point(field_mutable:tensorflow.ServerDef.default_session_config) + return _msg; +} +inline void ServerDef::set_allocated_default_session_config(::tensorflow::ConfigProto* default_session_config) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.default_session_config_); + } + if (default_session_config) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( + reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(default_session_config)); + if (message_arena != submessage_arena) { + default_session_config = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, default_session_config, submessage_arena); + } + + } else { + + } + _impl_.default_session_config_ = default_session_config; + // @@protoc_insertion_point(field_set_allocated:tensorflow.ServerDef.default_session_config) +} + +// string protocol = 5; +inline void ServerDef::clear_protocol() { + _impl_.protocol_.ClearToEmpty(); +} +inline const std::string& ServerDef::protocol() const { + // @@protoc_insertion_point(field_get:tensorflow.ServerDef.protocol) + return _internal_protocol(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void ServerDef::set_protocol(ArgT0&& arg0, ArgT... args) { + + _impl_.protocol_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.ServerDef.protocol) +} +inline std::string* ServerDef::mutable_protocol() { + std::string* _s = _internal_mutable_protocol(); + // @@protoc_insertion_point(field_mutable:tensorflow.ServerDef.protocol) + return _s; +} +inline const std::string& ServerDef::_internal_protocol() const { + return _impl_.protocol_.Get(); +} +inline void ServerDef::_internal_set_protocol(const std::string& value) { + + _impl_.protocol_.Set(value, GetArenaForAllocation()); +} +inline std::string* ServerDef::_internal_mutable_protocol() { + + return _impl_.protocol_.Mutable(GetArenaForAllocation()); +} +inline std::string* ServerDef::release_protocol() { + // @@protoc_insertion_point(field_release:tensorflow.ServerDef.protocol) + return _impl_.protocol_.Release(); +} +inline void ServerDef::set_allocated_protocol(std::string* protocol) { + if (protocol != nullptr) { + + } else { + + } + _impl_.protocol_.SetAllocated(protocol, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.protocol_.IsDefault()) { + _impl_.protocol_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.ServerDef.protocol) +} + +// int32 port = 6; +inline void ServerDef::clear_port() { + _impl_.port_ = 0; +} +inline int32_t ServerDef::_internal_port() const { + return _impl_.port_; +} +inline int32_t ServerDef::port() const { + // @@protoc_insertion_point(field_get:tensorflow.ServerDef.port) + return _internal_port(); +} +inline void ServerDef::_internal_set_port(int32_t value) { + + _impl_.port_ = value; +} +inline void ServerDef::set_port(int32_t value) { + _internal_set_port(value); + // @@protoc_insertion_point(field_set:tensorflow.ServerDef.port) +} + +// .tensorflow.ClusterDeviceFilters cluster_device_filters = 7; +inline bool ServerDef::_internal_has_cluster_device_filters() const { + return this != internal_default_instance() && _impl_.cluster_device_filters_ != nullptr; +} +inline bool ServerDef::has_cluster_device_filters() const { + return _internal_has_cluster_device_filters(); +} +inline const ::tensorflow::ClusterDeviceFilters& ServerDef::_internal_cluster_device_filters() const { + const ::tensorflow::ClusterDeviceFilters* p = _impl_.cluster_device_filters_; + return p != nullptr ? *p : reinterpret_cast( + ::tensorflow::_ClusterDeviceFilters_default_instance_); +} +inline const ::tensorflow::ClusterDeviceFilters& ServerDef::cluster_device_filters() const { + // @@protoc_insertion_point(field_get:tensorflow.ServerDef.cluster_device_filters) + return _internal_cluster_device_filters(); +} +inline void ServerDef::unsafe_arena_set_allocated_cluster_device_filters( + ::tensorflow::ClusterDeviceFilters* cluster_device_filters) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.cluster_device_filters_); + } + _impl_.cluster_device_filters_ = cluster_device_filters; + if (cluster_device_filters) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.ServerDef.cluster_device_filters) +} +inline ::tensorflow::ClusterDeviceFilters* ServerDef::release_cluster_device_filters() { + + ::tensorflow::ClusterDeviceFilters* temp = _impl_.cluster_device_filters_; + _impl_.cluster_device_filters_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tensorflow::ClusterDeviceFilters* ServerDef::unsafe_arena_release_cluster_device_filters() { + // @@protoc_insertion_point(field_release:tensorflow.ServerDef.cluster_device_filters) + + ::tensorflow::ClusterDeviceFilters* temp = _impl_.cluster_device_filters_; + _impl_.cluster_device_filters_ = nullptr; + return temp; +} +inline ::tensorflow::ClusterDeviceFilters* ServerDef::_internal_mutable_cluster_device_filters() { + + if (_impl_.cluster_device_filters_ == nullptr) { + auto* p = CreateMaybeMessage<::tensorflow::ClusterDeviceFilters>(GetArenaForAllocation()); + _impl_.cluster_device_filters_ = p; + } + return _impl_.cluster_device_filters_; +} +inline ::tensorflow::ClusterDeviceFilters* ServerDef::mutable_cluster_device_filters() { + ::tensorflow::ClusterDeviceFilters* _msg = _internal_mutable_cluster_device_filters(); + // @@protoc_insertion_point(field_mutable:tensorflow.ServerDef.cluster_device_filters) + return _msg; +} +inline void ServerDef::set_allocated_cluster_device_filters(::tensorflow::ClusterDeviceFilters* cluster_device_filters) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.cluster_device_filters_); + } + if (cluster_device_filters) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( + reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(cluster_device_filters)); + if (message_arena != submessage_arena) { + cluster_device_filters = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, cluster_device_filters, submessage_arena); + } + + } else { + + } + _impl_.cluster_device_filters_ = cluster_device_filters; + // @@protoc_insertion_point(field_set_allocated:tensorflow.ServerDef.cluster_device_filters) +} + +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ + +// @@protoc_insertion_point(namespace_scope) + +} // namespace tensorflow + +// @@protoc_insertion_point(global_scope) + +#include +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprotobuf_2ftensorflow_5fserver_2eproto diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/tensorflow_server.proto b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/tensorflow_server.proto new file mode 100644 index 0000000000000000000000000000000000000000..399667bedf62b582982b9c7e2e30250a3ef2cb6f --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/tensorflow_server.proto @@ -0,0 +1,64 @@ +/* Copyright 2016 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +syntax = "proto3"; + +package tensorflow; + +import "tensorflow/core/protobuf/cluster.proto"; +import "tensorflow/core/protobuf/config.proto"; +import "tensorflow/core/protobuf/device_filters.proto"; + +option cc_enable_arenas = true; +option java_outer_classname = "ServerProtos"; +option java_multiple_files = true; +option java_package = "org.tensorflow.distruntime"; +option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/protobuf/for_core_protos_go_proto"; + +// Defines the configuration of a single TensorFlow server. +message ServerDef { + // The cluster of which this server is a member. + ClusterDef cluster = 1; + + // The name of the job of which this server is a member. + // + // NOTE(mrry): The `cluster` field must contain a `JobDef` with a `name` field + // that matches this name. + string job_name = 2; + + // Replica this server manages. + int32 replica = 8; + + // The task index of this server in its job. + // + // NOTE: The `cluster` field must contain a `JobDef` with a matching `name` + // and a mapping in its `tasks` field for this index. + int32 task_index = 3; + + // The default configuration for sessions that run on this server. + ConfigProto default_session_config = 4; + + // The protocol to be used by this server. + // + // Acceptable values include: "grpc", "grpc+verbs". + string protocol = 5; + + // The server port. If not set, then we identify the port from the job_name. + int32 port = 6; + + // Device filters for remote tasks in the cluster. + // NOTE: This is an experimental feature and only effective in TensorFlow 2.x. + ClusterDeviceFilters cluster_device_filters = 7; +} diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/tpu/compile_metadata.pb.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/tpu/compile_metadata.pb.h new file mode 100644 index 0000000000000000000000000000000000000000..95d01db99c41bf8986791025b3c5c7a8a00522bb --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/tpu/compile_metadata.pb.h @@ -0,0 +1,2614 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/tpu/compile_metadata.proto + +#ifndef GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprotobuf_2ftpu_2fcompile_5fmetadata_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprotobuf_2ftpu_2fcompile_5fmetadata_2eproto + +#include +#include + +#include +#if PROTOBUF_VERSION < 3021000 +#error This file was generated by a newer version of protoc which is +#error incompatible with your Protocol Buffer headers. Please update +#error your headers. +#endif +#if 3021009 < PROTOBUF_MIN_PROTOC_VERSION +#error This file was generated by an older version of protoc which is +#error incompatible with your Protocol Buffer headers. Please +#error regenerate this file with a newer version of protoc. +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include // IWYU pragma: export +#include // IWYU pragma: export +#include +#include +#include "xla/xla.pb.h" +#include "xla/xla_data.pb.h" +#include "tensorflow/core/framework/tensor_shape.pb.h" +#include "tensorflow/core/framework/types.pb.h" +#include "tensorflow/core/protobuf/tpu/dynamic_padding.pb.h" +// @@protoc_insertion_point(includes) +#include +#define PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2fprotobuf_2ftpu_2fcompile_5fmetadata_2eproto +PROTOBUF_NAMESPACE_OPEN +namespace internal { +class AnyMetadata; +} // namespace internal +PROTOBUF_NAMESPACE_CLOSE + +// Internal implementation detail -- do not use these members. +struct TableStruct_tensorflow_2fcore_2fprotobuf_2ftpu_2fcompile_5fmetadata_2eproto { + static const uint32_t offsets[]; +}; +extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_tensorflow_2fcore_2fprotobuf_2ftpu_2fcompile_5fmetadata_2eproto; +namespace tensorflow { +namespace tpu { +class TPUCompileMetadataProto; +struct TPUCompileMetadataProtoDefaultTypeInternal; +extern TPUCompileMetadataProtoDefaultTypeInternal _TPUCompileMetadataProto_default_instance_; +class TPUCompileMetadataProto_Arg; +struct TPUCompileMetadataProto_ArgDefaultTypeInternal; +extern TPUCompileMetadataProto_ArgDefaultTypeInternal _TPUCompileMetadataProto_Arg_default_instance_; +class TPUCompileMetadataProto_Retval; +struct TPUCompileMetadataProto_RetvalDefaultTypeInternal; +extern TPUCompileMetadataProto_RetvalDefaultTypeInternal _TPUCompileMetadataProto_Retval_default_instance_; +class TPUCompileOptions; +struct TPUCompileOptionsDefaultTypeInternal; +extern TPUCompileOptionsDefaultTypeInternal _TPUCompileOptions_default_instance_; +} // namespace tpu +} // namespace tensorflow +PROTOBUF_NAMESPACE_OPEN +template<> ::tensorflow::tpu::TPUCompileMetadataProto* Arena::CreateMaybeMessage<::tensorflow::tpu::TPUCompileMetadataProto>(Arena*); +template<> ::tensorflow::tpu::TPUCompileMetadataProto_Arg* Arena::CreateMaybeMessage<::tensorflow::tpu::TPUCompileMetadataProto_Arg>(Arena*); +template<> ::tensorflow::tpu::TPUCompileMetadataProto_Retval* Arena::CreateMaybeMessage<::tensorflow::tpu::TPUCompileMetadataProto_Retval>(Arena*); +template<> ::tensorflow::tpu::TPUCompileOptions* Arena::CreateMaybeMessage<::tensorflow::tpu::TPUCompileOptions>(Arena*); +PROTOBUF_NAMESPACE_CLOSE +namespace tensorflow { +namespace tpu { + +enum TPUCompileMetadataProto_Arg_Kind : int { + TPUCompileMetadataProto_Arg_Kind_INVALID = 0, + TPUCompileMetadataProto_Arg_Kind_PARAMETER = 1, + TPUCompileMetadataProto_Arg_Kind_VARIABLE = 2, + TPUCompileMetadataProto_Arg_Kind_GUARANTEED_CONSTANT = 3, + TPUCompileMetadataProto_Arg_Kind_TPUCompileMetadataProto_Arg_Kind_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits::min(), + TPUCompileMetadataProto_Arg_Kind_TPUCompileMetadataProto_Arg_Kind_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits::max() +}; +bool TPUCompileMetadataProto_Arg_Kind_IsValid(int value); +constexpr TPUCompileMetadataProto_Arg_Kind TPUCompileMetadataProto_Arg_Kind_Kind_MIN = TPUCompileMetadataProto_Arg_Kind_INVALID; +constexpr TPUCompileMetadataProto_Arg_Kind TPUCompileMetadataProto_Arg_Kind_Kind_MAX = TPUCompileMetadataProto_Arg_Kind_GUARANTEED_CONSTANT; +constexpr int TPUCompileMetadataProto_Arg_Kind_Kind_ARRAYSIZE = TPUCompileMetadataProto_Arg_Kind_Kind_MAX + 1; + +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* TPUCompileMetadataProto_Arg_Kind_descriptor(); +template +inline const std::string& TPUCompileMetadataProto_Arg_Kind_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function TPUCompileMetadataProto_Arg_Kind_Name."); + return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( + TPUCompileMetadataProto_Arg_Kind_descriptor(), enum_t_value); +} +inline bool TPUCompileMetadataProto_Arg_Kind_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, TPUCompileMetadataProto_Arg_Kind* value) { + return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( + TPUCompileMetadataProto_Arg_Kind_descriptor(), name, value); +} +enum TPUCompileMetadataProto_Arg_EnableXlaSharding : int { + TPUCompileMetadataProto_Arg_EnableXlaSharding_DISALLOWED = 0, + TPUCompileMetadataProto_Arg_EnableXlaSharding_TENTATIVE = 1, + TPUCompileMetadataProto_Arg_EnableXlaSharding_ALLOWED = 2, + TPUCompileMetadataProto_Arg_EnableXlaSharding_TPUCompileMetadataProto_Arg_EnableXlaSharding_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits::min(), + TPUCompileMetadataProto_Arg_EnableXlaSharding_TPUCompileMetadataProto_Arg_EnableXlaSharding_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits::max() +}; +bool TPUCompileMetadataProto_Arg_EnableXlaSharding_IsValid(int value); +constexpr TPUCompileMetadataProto_Arg_EnableXlaSharding TPUCompileMetadataProto_Arg_EnableXlaSharding_EnableXlaSharding_MIN = TPUCompileMetadataProto_Arg_EnableXlaSharding_DISALLOWED; +constexpr TPUCompileMetadataProto_Arg_EnableXlaSharding TPUCompileMetadataProto_Arg_EnableXlaSharding_EnableXlaSharding_MAX = TPUCompileMetadataProto_Arg_EnableXlaSharding_ALLOWED; +constexpr int TPUCompileMetadataProto_Arg_EnableXlaSharding_EnableXlaSharding_ARRAYSIZE = TPUCompileMetadataProto_Arg_EnableXlaSharding_EnableXlaSharding_MAX + 1; + +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* TPUCompileMetadataProto_Arg_EnableXlaSharding_descriptor(); +template +inline const std::string& TPUCompileMetadataProto_Arg_EnableXlaSharding_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function TPUCompileMetadataProto_Arg_EnableXlaSharding_Name."); + return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( + TPUCompileMetadataProto_Arg_EnableXlaSharding_descriptor(), enum_t_value); +} +inline bool TPUCompileMetadataProto_Arg_EnableXlaSharding_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, TPUCompileMetadataProto_Arg_EnableXlaSharding* value) { + return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( + TPUCompileMetadataProto_Arg_EnableXlaSharding_descriptor(), name, value); +} +enum TPUCompileOptions_Precision : int { + TPUCompileOptions_Precision_DEFAULT = 0, + TPUCompileOptions_Precision_BFLOAT16 = 1, + TPUCompileOptions_Precision_FLOAT32 = 2, + TPUCompileOptions_Precision_TENSOR_FLOAT32 = 3, + TPUCompileOptions_Precision_TPUCompileOptions_Precision_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits::min(), + TPUCompileOptions_Precision_TPUCompileOptions_Precision_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits::max() +}; +bool TPUCompileOptions_Precision_IsValid(int value); +constexpr TPUCompileOptions_Precision TPUCompileOptions_Precision_Precision_MIN = TPUCompileOptions_Precision_DEFAULT; +constexpr TPUCompileOptions_Precision TPUCompileOptions_Precision_Precision_MAX = TPUCompileOptions_Precision_TENSOR_FLOAT32; +constexpr int TPUCompileOptions_Precision_Precision_ARRAYSIZE = TPUCompileOptions_Precision_Precision_MAX + 1; + +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* TPUCompileOptions_Precision_descriptor(); +template +inline const std::string& TPUCompileOptions_Precision_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function TPUCompileOptions_Precision_Name."); + return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( + TPUCompileOptions_Precision_descriptor(), enum_t_value); +} +inline bool TPUCompileOptions_Precision_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, TPUCompileOptions_Precision* value) { + return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( + TPUCompileOptions_Precision_descriptor(), name, value); +} +// =================================================================== + +class TPUCompileMetadataProto_Arg final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.tpu.TPUCompileMetadataProto.Arg) */ { + public: + inline TPUCompileMetadataProto_Arg() : TPUCompileMetadataProto_Arg(nullptr) {} + ~TPUCompileMetadataProto_Arg() override; + explicit PROTOBUF_CONSTEXPR TPUCompileMetadataProto_Arg(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + TPUCompileMetadataProto_Arg(const TPUCompileMetadataProto_Arg& from); + TPUCompileMetadataProto_Arg(TPUCompileMetadataProto_Arg&& from) noexcept + : TPUCompileMetadataProto_Arg() { + *this = ::std::move(from); + } + + inline TPUCompileMetadataProto_Arg& operator=(const TPUCompileMetadataProto_Arg& from) { + CopyFrom(from); + return *this; + } + inline TPUCompileMetadataProto_Arg& operator=(TPUCompileMetadataProto_Arg&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const TPUCompileMetadataProto_Arg& default_instance() { + return *internal_default_instance(); + } + static inline const TPUCompileMetadataProto_Arg* internal_default_instance() { + return reinterpret_cast( + &_TPUCompileMetadataProto_Arg_default_instance_); + } + static constexpr int kIndexInFileMessages = + 0; + + friend void swap(TPUCompileMetadataProto_Arg& a, TPUCompileMetadataProto_Arg& b) { + a.Swap(&b); + } + inline void Swap(TPUCompileMetadataProto_Arg* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(TPUCompileMetadataProto_Arg* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + TPUCompileMetadataProto_Arg* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const TPUCompileMetadataProto_Arg& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const TPUCompileMetadataProto_Arg& from) { + TPUCompileMetadataProto_Arg::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(TPUCompileMetadataProto_Arg* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.tpu.TPUCompileMetadataProto.Arg"; + } + protected: + explicit TPUCompileMetadataProto_Arg(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + typedef TPUCompileMetadataProto_Arg_Kind Kind; + static constexpr Kind INVALID = + TPUCompileMetadataProto_Arg_Kind_INVALID; + static constexpr Kind PARAMETER = + TPUCompileMetadataProto_Arg_Kind_PARAMETER; + static constexpr Kind VARIABLE = + TPUCompileMetadataProto_Arg_Kind_VARIABLE; + static constexpr Kind GUARANTEED_CONSTANT = + TPUCompileMetadataProto_Arg_Kind_GUARANTEED_CONSTANT; + static inline bool Kind_IsValid(int value) { + return TPUCompileMetadataProto_Arg_Kind_IsValid(value); + } + static constexpr Kind Kind_MIN = + TPUCompileMetadataProto_Arg_Kind_Kind_MIN; + static constexpr Kind Kind_MAX = + TPUCompileMetadataProto_Arg_Kind_Kind_MAX; + static constexpr int Kind_ARRAYSIZE = + TPUCompileMetadataProto_Arg_Kind_Kind_ARRAYSIZE; + static inline const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* + Kind_descriptor() { + return TPUCompileMetadataProto_Arg_Kind_descriptor(); + } + template + static inline const std::string& Kind_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function Kind_Name."); + return TPUCompileMetadataProto_Arg_Kind_Name(enum_t_value); + } + static inline bool Kind_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name, + Kind* value) { + return TPUCompileMetadataProto_Arg_Kind_Parse(name, value); + } + + typedef TPUCompileMetadataProto_Arg_EnableXlaSharding EnableXlaSharding; + static constexpr EnableXlaSharding DISALLOWED = + TPUCompileMetadataProto_Arg_EnableXlaSharding_DISALLOWED; + static constexpr EnableXlaSharding TENTATIVE = + TPUCompileMetadataProto_Arg_EnableXlaSharding_TENTATIVE; + static constexpr EnableXlaSharding ALLOWED = + TPUCompileMetadataProto_Arg_EnableXlaSharding_ALLOWED; + static inline bool EnableXlaSharding_IsValid(int value) { + return TPUCompileMetadataProto_Arg_EnableXlaSharding_IsValid(value); + } + static constexpr EnableXlaSharding EnableXlaSharding_MIN = + TPUCompileMetadataProto_Arg_EnableXlaSharding_EnableXlaSharding_MIN; + static constexpr EnableXlaSharding EnableXlaSharding_MAX = + TPUCompileMetadataProto_Arg_EnableXlaSharding_EnableXlaSharding_MAX; + static constexpr int EnableXlaSharding_ARRAYSIZE = + TPUCompileMetadataProto_Arg_EnableXlaSharding_EnableXlaSharding_ARRAYSIZE; + static inline const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* + EnableXlaSharding_descriptor() { + return TPUCompileMetadataProto_Arg_EnableXlaSharding_descriptor(); + } + template + static inline const std::string& EnableXlaSharding_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function EnableXlaSharding_Name."); + return TPUCompileMetadataProto_Arg_EnableXlaSharding_Name(enum_t_value); + } + static inline bool EnableXlaSharding_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name, + EnableXlaSharding* value) { + return TPUCompileMetadataProto_Arg_EnableXlaSharding_Parse(name, value); + } + + // accessors ------------------------------------------------------- + + enum : int { + kIsBoundedDynamicDimFieldNumber = 12, + kNameFieldNumber = 10, + kShapeFieldNumber = 2, + kShardingFieldNumber = 4, + kDtypeFieldNumber = 1, + kKindFieldNumber = 3, + kEnableXlaShardingFieldNumber = 6, + kRetvalIndexForShardingFieldNumber = 8, + kIsSameDataAcrossReplicasFieldNumber = 5, + kFastMemFieldNumber = 7, + kUnrestrictedLayoutFieldNumber = 9, + kRequiresXlaBroadcastFieldNumber = 11, + }; + // repeated bool is_bounded_dynamic_dim = 12; + int is_bounded_dynamic_dim_size() const; + private: + int _internal_is_bounded_dynamic_dim_size() const; + public: + void clear_is_bounded_dynamic_dim(); + private: + bool _internal_is_bounded_dynamic_dim(int index) const; + const ::PROTOBUF_NAMESPACE_ID::RepeatedField< bool >& + _internal_is_bounded_dynamic_dim() const; + void _internal_add_is_bounded_dynamic_dim(bool value); + ::PROTOBUF_NAMESPACE_ID::RepeatedField< bool >* + _internal_mutable_is_bounded_dynamic_dim(); + public: + bool is_bounded_dynamic_dim(int index) const; + void set_is_bounded_dynamic_dim(int index, bool value); + void add_is_bounded_dynamic_dim(bool value); + const ::PROTOBUF_NAMESPACE_ID::RepeatedField< bool >& + is_bounded_dynamic_dim() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedField< bool >* + mutable_is_bounded_dynamic_dim(); + + // string name = 10; + void clear_name(); + const std::string& name() const; + template + void set_name(ArgT0&& arg0, ArgT... args); + std::string* mutable_name(); + PROTOBUF_NODISCARD std::string* release_name(); + void set_allocated_name(std::string* name); + private: + const std::string& _internal_name() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_name(const std::string& value); + std::string* _internal_mutable_name(); + public: + + // .tensorflow.TensorShapeProto shape = 2; + bool has_shape() const; + private: + bool _internal_has_shape() const; + public: + void clear_shape(); + const ::tensorflow::TensorShapeProto& shape() const; + PROTOBUF_NODISCARD ::tensorflow::TensorShapeProto* release_shape(); + ::tensorflow::TensorShapeProto* mutable_shape(); + void set_allocated_shape(::tensorflow::TensorShapeProto* shape); + private: + const ::tensorflow::TensorShapeProto& _internal_shape() const; + ::tensorflow::TensorShapeProto* _internal_mutable_shape(); + public: + void unsafe_arena_set_allocated_shape( + ::tensorflow::TensorShapeProto* shape); + ::tensorflow::TensorShapeProto* unsafe_arena_release_shape(); + + // .xla.OpSharding sharding = 4; + bool has_sharding() const; + private: + bool _internal_has_sharding() const; + public: + void clear_sharding(); + const ::xla::OpSharding& sharding() const; + PROTOBUF_NODISCARD ::xla::OpSharding* release_sharding(); + ::xla::OpSharding* mutable_sharding(); + void set_allocated_sharding(::xla::OpSharding* sharding); + private: + const ::xla::OpSharding& _internal_sharding() const; + ::xla::OpSharding* _internal_mutable_sharding(); + public: + void unsafe_arena_set_allocated_sharding( + ::xla::OpSharding* sharding); + ::xla::OpSharding* unsafe_arena_release_sharding(); + + // .tensorflow.DataType dtype = 1; + void clear_dtype(); + ::tensorflow::DataType dtype() const; + void set_dtype(::tensorflow::DataType value); + private: + ::tensorflow::DataType _internal_dtype() const; + void _internal_set_dtype(::tensorflow::DataType value); + public: + + // .tensorflow.tpu.TPUCompileMetadataProto.Arg.Kind kind = 3; + void clear_kind(); + ::tensorflow::tpu::TPUCompileMetadataProto_Arg_Kind kind() const; + void set_kind(::tensorflow::tpu::TPUCompileMetadataProto_Arg_Kind value); + private: + ::tensorflow::tpu::TPUCompileMetadataProto_Arg_Kind _internal_kind() const; + void _internal_set_kind(::tensorflow::tpu::TPUCompileMetadataProto_Arg_Kind value); + public: + + // .tensorflow.tpu.TPUCompileMetadataProto.Arg.EnableXlaSharding enable_xla_sharding = 6; + void clear_enable_xla_sharding(); + ::tensorflow::tpu::TPUCompileMetadataProto_Arg_EnableXlaSharding enable_xla_sharding() const; + void set_enable_xla_sharding(::tensorflow::tpu::TPUCompileMetadataProto_Arg_EnableXlaSharding value); + private: + ::tensorflow::tpu::TPUCompileMetadataProto_Arg_EnableXlaSharding _internal_enable_xla_sharding() const; + void _internal_set_enable_xla_sharding(::tensorflow::tpu::TPUCompileMetadataProto_Arg_EnableXlaSharding value); + public: + + // int32 retval_index_for_sharding = 8; + void clear_retval_index_for_sharding(); + int32_t retval_index_for_sharding() const; + void set_retval_index_for_sharding(int32_t value); + private: + int32_t _internal_retval_index_for_sharding() const; + void _internal_set_retval_index_for_sharding(int32_t value); + public: + + // bool is_same_data_across_replicas = 5; + void clear_is_same_data_across_replicas(); + bool is_same_data_across_replicas() const; + void set_is_same_data_across_replicas(bool value); + private: + bool _internal_is_same_data_across_replicas() const; + void _internal_set_is_same_data_across_replicas(bool value); + public: + + // bool fast_mem = 7; + void clear_fast_mem(); + bool fast_mem() const; + void set_fast_mem(bool value); + private: + bool _internal_fast_mem() const; + void _internal_set_fast_mem(bool value); + public: + + // bool unrestricted_layout = 9; + void clear_unrestricted_layout(); + bool unrestricted_layout() const; + void set_unrestricted_layout(bool value); + private: + bool _internal_unrestricted_layout() const; + void _internal_set_unrestricted_layout(bool value); + public: + + // bool requires_xla_broadcast = 11; + void clear_requires_xla_broadcast(); + bool requires_xla_broadcast() const; + void set_requires_xla_broadcast(bool value); + private: + bool _internal_requires_xla_broadcast() const; + void _internal_set_requires_xla_broadcast(bool value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.tpu.TPUCompileMetadataProto.Arg) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedField< bool > is_bounded_dynamic_dim_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_; + ::tensorflow::TensorShapeProto* shape_; + ::xla::OpSharding* sharding_; + int dtype_; + int kind_; + int enable_xla_sharding_; + int32_t retval_index_for_sharding_; + bool is_same_data_across_replicas_; + bool fast_mem_; + bool unrestricted_layout_; + bool requires_xla_broadcast_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2ftpu_2fcompile_5fmetadata_2eproto; +}; +// ------------------------------------------------------------------- + +class TPUCompileMetadataProto_Retval final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.tpu.TPUCompileMetadataProto.Retval) */ { + public: + inline TPUCompileMetadataProto_Retval() : TPUCompileMetadataProto_Retval(nullptr) {} + ~TPUCompileMetadataProto_Retval() override; + explicit PROTOBUF_CONSTEXPR TPUCompileMetadataProto_Retval(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + TPUCompileMetadataProto_Retval(const TPUCompileMetadataProto_Retval& from); + TPUCompileMetadataProto_Retval(TPUCompileMetadataProto_Retval&& from) noexcept + : TPUCompileMetadataProto_Retval() { + *this = ::std::move(from); + } + + inline TPUCompileMetadataProto_Retval& operator=(const TPUCompileMetadataProto_Retval& from) { + CopyFrom(from); + return *this; + } + inline TPUCompileMetadataProto_Retval& operator=(TPUCompileMetadataProto_Retval&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const TPUCompileMetadataProto_Retval& default_instance() { + return *internal_default_instance(); + } + static inline const TPUCompileMetadataProto_Retval* internal_default_instance() { + return reinterpret_cast( + &_TPUCompileMetadataProto_Retval_default_instance_); + } + static constexpr int kIndexInFileMessages = + 1; + + friend void swap(TPUCompileMetadataProto_Retval& a, TPUCompileMetadataProto_Retval& b) { + a.Swap(&b); + } + inline void Swap(TPUCompileMetadataProto_Retval* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(TPUCompileMetadataProto_Retval* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + TPUCompileMetadataProto_Retval* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const TPUCompileMetadataProto_Retval& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const TPUCompileMetadataProto_Retval& from) { + TPUCompileMetadataProto_Retval::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(TPUCompileMetadataProto_Retval* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.tpu.TPUCompileMetadataProto.Retval"; + } + protected: + explicit TPUCompileMetadataProto_Retval(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kShardingFieldNumber = 1, + }; + // .xla.OpSharding sharding = 1; + bool has_sharding() const; + private: + bool _internal_has_sharding() const; + public: + void clear_sharding(); + const ::xla::OpSharding& sharding() const; + PROTOBUF_NODISCARD ::xla::OpSharding* release_sharding(); + ::xla::OpSharding* mutable_sharding(); + void set_allocated_sharding(::xla::OpSharding* sharding); + private: + const ::xla::OpSharding& _internal_sharding() const; + ::xla::OpSharding* _internal_mutable_sharding(); + public: + void unsafe_arena_set_allocated_sharding( + ::xla::OpSharding* sharding); + ::xla::OpSharding* unsafe_arena_release_sharding(); + + // @@protoc_insertion_point(class_scope:tensorflow.tpu.TPUCompileMetadataProto.Retval) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::xla::OpSharding* sharding_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2ftpu_2fcompile_5fmetadata_2eproto; +}; +// ------------------------------------------------------------------- + +class TPUCompileMetadataProto final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.tpu.TPUCompileMetadataProto) */ { + public: + inline TPUCompileMetadataProto() : TPUCompileMetadataProto(nullptr) {} + ~TPUCompileMetadataProto() override; + explicit PROTOBUF_CONSTEXPR TPUCompileMetadataProto(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + TPUCompileMetadataProto(const TPUCompileMetadataProto& from); + TPUCompileMetadataProto(TPUCompileMetadataProto&& from) noexcept + : TPUCompileMetadataProto() { + *this = ::std::move(from); + } + + inline TPUCompileMetadataProto& operator=(const TPUCompileMetadataProto& from) { + CopyFrom(from); + return *this; + } + inline TPUCompileMetadataProto& operator=(TPUCompileMetadataProto&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const TPUCompileMetadataProto& default_instance() { + return *internal_default_instance(); + } + static inline const TPUCompileMetadataProto* internal_default_instance() { + return reinterpret_cast( + &_TPUCompileMetadataProto_default_instance_); + } + static constexpr int kIndexInFileMessages = + 2; + + friend void swap(TPUCompileMetadataProto& a, TPUCompileMetadataProto& b) { + a.Swap(&b); + } + inline void Swap(TPUCompileMetadataProto* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(TPUCompileMetadataProto* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + TPUCompileMetadataProto* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const TPUCompileMetadataProto& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const TPUCompileMetadataProto& from) { + TPUCompileMetadataProto::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(TPUCompileMetadataProto* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.tpu.TPUCompileMetadataProto"; + } + protected: + explicit TPUCompileMetadataProto(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + typedef TPUCompileMetadataProto_Arg Arg; + typedef TPUCompileMetadataProto_Retval Retval; + + // accessors ------------------------------------------------------- + + enum : int { + kArgsFieldNumber = 1, + kRetvalsFieldNumber = 2, + kPaddingMapsFieldNumber = 11, + kAutoSpmdMeshShapeFieldNumber = 19, + kAutoSpmdMeshIdsFieldNumber = 20, + kSessionHandleFieldNumber = 9, + kGuaranteedConstFingerprintFieldNumber = 10, + kModuleNameFieldNumber = 22, + kDeviceAssignmentFieldNumber = 8, + kCompileOptionsFieldNumber = 21, + kNumReplicasFieldNumber = 3, + kNumCoresPerReplicaFieldNumber = 4, + kFunctionLibraryFingerprintFieldNumber = 6, + kXlaFusionAutotunerThreshFieldNumber = 13, + kStepMarkerLocationFieldNumber = 12, + kEnableAutomaticModelParallelismFieldNumber = 14, + kUseSpmdForXlaPartitioningFieldNumber = 15, + kUseAutoSpmdForXlaPartitioningFieldNumber = 18, + kMlirFingerprintFieldNumber = 17, + }; + // repeated .tensorflow.tpu.TPUCompileMetadataProto.Arg args = 1; + int args_size() const; + private: + int _internal_args_size() const; + public: + void clear_args(); + ::tensorflow::tpu::TPUCompileMetadataProto_Arg* mutable_args(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::tpu::TPUCompileMetadataProto_Arg >* + mutable_args(); + private: + const ::tensorflow::tpu::TPUCompileMetadataProto_Arg& _internal_args(int index) const; + ::tensorflow::tpu::TPUCompileMetadataProto_Arg* _internal_add_args(); + public: + const ::tensorflow::tpu::TPUCompileMetadataProto_Arg& args(int index) const; + ::tensorflow::tpu::TPUCompileMetadataProto_Arg* add_args(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::tpu::TPUCompileMetadataProto_Arg >& + args() const; + + // repeated .tensorflow.tpu.TPUCompileMetadataProto.Retval retvals = 2; + int retvals_size() const; + private: + int _internal_retvals_size() const; + public: + void clear_retvals(); + ::tensorflow::tpu::TPUCompileMetadataProto_Retval* mutable_retvals(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::tpu::TPUCompileMetadataProto_Retval >* + mutable_retvals(); + private: + const ::tensorflow::tpu::TPUCompileMetadataProto_Retval& _internal_retvals(int index) const; + ::tensorflow::tpu::TPUCompileMetadataProto_Retval* _internal_add_retvals(); + public: + const ::tensorflow::tpu::TPUCompileMetadataProto_Retval& retvals(int index) const; + ::tensorflow::tpu::TPUCompileMetadataProto_Retval* add_retvals(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::tpu::TPUCompileMetadataProto_Retval >& + retvals() const; + + // repeated .tensorflow.tpu.PaddingMap padding_maps = 11; + int padding_maps_size() const; + private: + int _internal_padding_maps_size() const; + public: + void clear_padding_maps(); + ::tensorflow::tpu::PaddingMap* mutable_padding_maps(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::tpu::PaddingMap >* + mutable_padding_maps(); + private: + const ::tensorflow::tpu::PaddingMap& _internal_padding_maps(int index) const; + ::tensorflow::tpu::PaddingMap* _internal_add_padding_maps(); + public: + const ::tensorflow::tpu::PaddingMap& padding_maps(int index) const; + ::tensorflow::tpu::PaddingMap* add_padding_maps(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::tpu::PaddingMap >& + padding_maps() const; + + // repeated int64 auto_spmd_mesh_shape = 19; + int auto_spmd_mesh_shape_size() const; + private: + int _internal_auto_spmd_mesh_shape_size() const; + public: + void clear_auto_spmd_mesh_shape(); + private: + int64_t _internal_auto_spmd_mesh_shape(int index) const; + const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >& + _internal_auto_spmd_mesh_shape() const; + void _internal_add_auto_spmd_mesh_shape(int64_t value); + ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >* + _internal_mutable_auto_spmd_mesh_shape(); + public: + int64_t auto_spmd_mesh_shape(int index) const; + void set_auto_spmd_mesh_shape(int index, int64_t value); + void add_auto_spmd_mesh_shape(int64_t value); + const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >& + auto_spmd_mesh_shape() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >* + mutable_auto_spmd_mesh_shape(); + + // repeated int64 auto_spmd_mesh_ids = 20; + int auto_spmd_mesh_ids_size() const; + private: + int _internal_auto_spmd_mesh_ids_size() const; + public: + void clear_auto_spmd_mesh_ids(); + private: + int64_t _internal_auto_spmd_mesh_ids(int index) const; + const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >& + _internal_auto_spmd_mesh_ids() const; + void _internal_add_auto_spmd_mesh_ids(int64_t value); + ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >* + _internal_mutable_auto_spmd_mesh_ids(); + public: + int64_t auto_spmd_mesh_ids(int index) const; + void set_auto_spmd_mesh_ids(int index, int64_t value); + void add_auto_spmd_mesh_ids(int64_t value); + const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >& + auto_spmd_mesh_ids() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >* + mutable_auto_spmd_mesh_ids(); + + // string session_handle = 9; + void clear_session_handle(); + const std::string& session_handle() const; + template + void set_session_handle(ArgT0&& arg0, ArgT... args); + std::string* mutable_session_handle(); + PROTOBUF_NODISCARD std::string* release_session_handle(); + void set_allocated_session_handle(std::string* session_handle); + private: + const std::string& _internal_session_handle() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_session_handle(const std::string& value); + std::string* _internal_mutable_session_handle(); + public: + + // string guaranteed_const_fingerprint = 10; + void clear_guaranteed_const_fingerprint(); + const std::string& guaranteed_const_fingerprint() const; + template + void set_guaranteed_const_fingerprint(ArgT0&& arg0, ArgT... args); + std::string* mutable_guaranteed_const_fingerprint(); + PROTOBUF_NODISCARD std::string* release_guaranteed_const_fingerprint(); + void set_allocated_guaranteed_const_fingerprint(std::string* guaranteed_const_fingerprint); + private: + const std::string& _internal_guaranteed_const_fingerprint() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_guaranteed_const_fingerprint(const std::string& value); + std::string* _internal_mutable_guaranteed_const_fingerprint(); + public: + + // string module_name = 22; + void clear_module_name(); + const std::string& module_name() const; + template + void set_module_name(ArgT0&& arg0, ArgT... args); + std::string* mutable_module_name(); + PROTOBUF_NODISCARD std::string* release_module_name(); + void set_allocated_module_name(std::string* module_name); + private: + const std::string& _internal_module_name() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_module_name(const std::string& value); + std::string* _internal_mutable_module_name(); + public: + + // .xla.DeviceAssignmentProto device_assignment = 8; + bool has_device_assignment() const; + private: + bool _internal_has_device_assignment() const; + public: + void clear_device_assignment(); + const ::xla::DeviceAssignmentProto& device_assignment() const; + PROTOBUF_NODISCARD ::xla::DeviceAssignmentProto* release_device_assignment(); + ::xla::DeviceAssignmentProto* mutable_device_assignment(); + void set_allocated_device_assignment(::xla::DeviceAssignmentProto* device_assignment); + private: + const ::xla::DeviceAssignmentProto& _internal_device_assignment() const; + ::xla::DeviceAssignmentProto* _internal_mutable_device_assignment(); + public: + void unsafe_arena_set_allocated_device_assignment( + ::xla::DeviceAssignmentProto* device_assignment); + ::xla::DeviceAssignmentProto* unsafe_arena_release_device_assignment(); + + // .tensorflow.tpu.TPUCompileOptions compile_options = 21; + bool has_compile_options() const; + private: + bool _internal_has_compile_options() const; + public: + void clear_compile_options(); + const ::tensorflow::tpu::TPUCompileOptions& compile_options() const; + PROTOBUF_NODISCARD ::tensorflow::tpu::TPUCompileOptions* release_compile_options(); + ::tensorflow::tpu::TPUCompileOptions* mutable_compile_options(); + void set_allocated_compile_options(::tensorflow::tpu::TPUCompileOptions* compile_options); + private: + const ::tensorflow::tpu::TPUCompileOptions& _internal_compile_options() const; + ::tensorflow::tpu::TPUCompileOptions* _internal_mutable_compile_options(); + public: + void unsafe_arena_set_allocated_compile_options( + ::tensorflow::tpu::TPUCompileOptions* compile_options); + ::tensorflow::tpu::TPUCompileOptions* unsafe_arena_release_compile_options(); + + // int32 num_replicas = 3; + void clear_num_replicas(); + int32_t num_replicas() const; + void set_num_replicas(int32_t value); + private: + int32_t _internal_num_replicas() const; + void _internal_set_num_replicas(int32_t value); + public: + + // int32 num_cores_per_replica = 4; + void clear_num_cores_per_replica(); + int32_t num_cores_per_replica() const; + void set_num_cores_per_replica(int32_t value); + private: + int32_t _internal_num_cores_per_replica() const; + void _internal_set_num_cores_per_replica(int32_t value); + public: + + // uint64 function_library_fingerprint = 6; + void clear_function_library_fingerprint(); + uint64_t function_library_fingerprint() const; + void set_function_library_fingerprint(uint64_t value); + private: + uint64_t _internal_function_library_fingerprint() const; + void _internal_set_function_library_fingerprint(uint64_t value); + public: + + // int64 xla_fusion_autotuner_thresh = 13; + void clear_xla_fusion_autotuner_thresh(); + int64_t xla_fusion_autotuner_thresh() const; + void set_xla_fusion_autotuner_thresh(int64_t value); + private: + int64_t _internal_xla_fusion_autotuner_thresh() const; + void _internal_set_xla_fusion_autotuner_thresh(int64_t value); + public: + + // .xla.DebugOptions.StepMarkerLocation step_marker_location = 12; + void clear_step_marker_location(); + ::xla::DebugOptions_StepMarkerLocation step_marker_location() const; + void set_step_marker_location(::xla::DebugOptions_StepMarkerLocation value); + private: + ::xla::DebugOptions_StepMarkerLocation _internal_step_marker_location() const; + void _internal_set_step_marker_location(::xla::DebugOptions_StepMarkerLocation value); + public: + + // bool enable_automatic_model_parallelism = 14; + void clear_enable_automatic_model_parallelism(); + bool enable_automatic_model_parallelism() const; + void set_enable_automatic_model_parallelism(bool value); + private: + bool _internal_enable_automatic_model_parallelism() const; + void _internal_set_enable_automatic_model_parallelism(bool value); + public: + + // bool use_spmd_for_xla_partitioning = 15; + void clear_use_spmd_for_xla_partitioning(); + bool use_spmd_for_xla_partitioning() const; + void set_use_spmd_for_xla_partitioning(bool value); + private: + bool _internal_use_spmd_for_xla_partitioning() const; + void _internal_set_use_spmd_for_xla_partitioning(bool value); + public: + + // bool use_auto_spmd_for_xla_partitioning = 18; + void clear_use_auto_spmd_for_xla_partitioning(); + bool use_auto_spmd_for_xla_partitioning() const; + void set_use_auto_spmd_for_xla_partitioning(bool value); + private: + bool _internal_use_auto_spmd_for_xla_partitioning() const; + void _internal_set_use_auto_spmd_for_xla_partitioning(bool value); + public: + + // uint64 mlir_fingerprint = 17; + void clear_mlir_fingerprint(); + uint64_t mlir_fingerprint() const; + void set_mlir_fingerprint(uint64_t value); + private: + uint64_t _internal_mlir_fingerprint() const; + void _internal_set_mlir_fingerprint(uint64_t value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.tpu.TPUCompileMetadataProto) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::tpu::TPUCompileMetadataProto_Arg > args_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::tpu::TPUCompileMetadataProto_Retval > retvals_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::tpu::PaddingMap > padding_maps_; + ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t > auto_spmd_mesh_shape_; + mutable std::atomic _auto_spmd_mesh_shape_cached_byte_size_; + ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t > auto_spmd_mesh_ids_; + mutable std::atomic _auto_spmd_mesh_ids_cached_byte_size_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr session_handle_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr guaranteed_const_fingerprint_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr module_name_; + ::xla::DeviceAssignmentProto* device_assignment_; + ::tensorflow::tpu::TPUCompileOptions* compile_options_; + int32_t num_replicas_; + int32_t num_cores_per_replica_; + uint64_t function_library_fingerprint_; + int64_t xla_fusion_autotuner_thresh_; + int step_marker_location_; + bool enable_automatic_model_parallelism_; + bool use_spmd_for_xla_partitioning_; + bool use_auto_spmd_for_xla_partitioning_; + uint64_t mlir_fingerprint_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2ftpu_2fcompile_5fmetadata_2eproto; +}; +// ------------------------------------------------------------------- + +class TPUCompileOptions final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.tpu.TPUCompileOptions) */ { + public: + inline TPUCompileOptions() : TPUCompileOptions(nullptr) {} + ~TPUCompileOptions() override; + explicit PROTOBUF_CONSTEXPR TPUCompileOptions(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + TPUCompileOptions(const TPUCompileOptions& from); + TPUCompileOptions(TPUCompileOptions&& from) noexcept + : TPUCompileOptions() { + *this = ::std::move(from); + } + + inline TPUCompileOptions& operator=(const TPUCompileOptions& from) { + CopyFrom(from); + return *this; + } + inline TPUCompileOptions& operator=(TPUCompileOptions&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const TPUCompileOptions& default_instance() { + return *internal_default_instance(); + } + static inline const TPUCompileOptions* internal_default_instance() { + return reinterpret_cast( + &_TPUCompileOptions_default_instance_); + } + static constexpr int kIndexInFileMessages = + 3; + + friend void swap(TPUCompileOptions& a, TPUCompileOptions& b) { + a.Swap(&b); + } + inline void Swap(TPUCompileOptions* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(TPUCompileOptions* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + TPUCompileOptions* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const TPUCompileOptions& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const TPUCompileOptions& from) { + TPUCompileOptions::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(TPUCompileOptions* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.tpu.TPUCompileOptions"; + } + protected: + explicit TPUCompileOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + typedef TPUCompileOptions_Precision Precision; + static constexpr Precision DEFAULT = + TPUCompileOptions_Precision_DEFAULT; + static constexpr Precision BFLOAT16 = + TPUCompileOptions_Precision_BFLOAT16; + static constexpr Precision FLOAT32 = + TPUCompileOptions_Precision_FLOAT32; + static constexpr Precision TENSOR_FLOAT32 = + TPUCompileOptions_Precision_TENSOR_FLOAT32; + static inline bool Precision_IsValid(int value) { + return TPUCompileOptions_Precision_IsValid(value); + } + static constexpr Precision Precision_MIN = + TPUCompileOptions_Precision_Precision_MIN; + static constexpr Precision Precision_MAX = + TPUCompileOptions_Precision_Precision_MAX; + static constexpr int Precision_ARRAYSIZE = + TPUCompileOptions_Precision_Precision_ARRAYSIZE; + static inline const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* + Precision_descriptor() { + return TPUCompileOptions_Precision_descriptor(); + } + template + static inline const std::string& Precision_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function Precision_Name."); + return TPUCompileOptions_Precision_Name(enum_t_value); + } + static inline bool Precision_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name, + Precision* value) { + return TPUCompileOptions_Precision_Parse(name, value); + } + + // accessors ------------------------------------------------------- + + enum : int { + kMatrixUnitOperandPrecisionFieldNumber = 1, + }; + // .tensorflow.tpu.TPUCompileOptions.Precision matrix_unit_operand_precision = 1; + void clear_matrix_unit_operand_precision(); + ::tensorflow::tpu::TPUCompileOptions_Precision matrix_unit_operand_precision() const; + void set_matrix_unit_operand_precision(::tensorflow::tpu::TPUCompileOptions_Precision value); + private: + ::tensorflow::tpu::TPUCompileOptions_Precision _internal_matrix_unit_operand_precision() const; + void _internal_set_matrix_unit_operand_precision(::tensorflow::tpu::TPUCompileOptions_Precision value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.tpu.TPUCompileOptions) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + int matrix_unit_operand_precision_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2ftpu_2fcompile_5fmetadata_2eproto; +}; +// =================================================================== + + +// =================================================================== + +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// TPUCompileMetadataProto_Arg + +// .tensorflow.DataType dtype = 1; +inline void TPUCompileMetadataProto_Arg::clear_dtype() { + _impl_.dtype_ = 0; +} +inline ::tensorflow::DataType TPUCompileMetadataProto_Arg::_internal_dtype() const { + return static_cast< ::tensorflow::DataType >(_impl_.dtype_); +} +inline ::tensorflow::DataType TPUCompileMetadataProto_Arg::dtype() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.TPUCompileMetadataProto.Arg.dtype) + return _internal_dtype(); +} +inline void TPUCompileMetadataProto_Arg::_internal_set_dtype(::tensorflow::DataType value) { + + _impl_.dtype_ = value; +} +inline void TPUCompileMetadataProto_Arg::set_dtype(::tensorflow::DataType value) { + _internal_set_dtype(value); + // @@protoc_insertion_point(field_set:tensorflow.tpu.TPUCompileMetadataProto.Arg.dtype) +} + +// .tensorflow.TensorShapeProto shape = 2; +inline bool TPUCompileMetadataProto_Arg::_internal_has_shape() const { + return this != internal_default_instance() && _impl_.shape_ != nullptr; +} +inline bool TPUCompileMetadataProto_Arg::has_shape() const { + return _internal_has_shape(); +} +inline const ::tensorflow::TensorShapeProto& TPUCompileMetadataProto_Arg::_internal_shape() const { + const ::tensorflow::TensorShapeProto* p = _impl_.shape_; + return p != nullptr ? *p : reinterpret_cast( + ::tensorflow::_TensorShapeProto_default_instance_); +} +inline const ::tensorflow::TensorShapeProto& TPUCompileMetadataProto_Arg::shape() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.TPUCompileMetadataProto.Arg.shape) + return _internal_shape(); +} +inline void TPUCompileMetadataProto_Arg::unsafe_arena_set_allocated_shape( + ::tensorflow::TensorShapeProto* shape) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.shape_); + } + _impl_.shape_ = shape; + if (shape) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.tpu.TPUCompileMetadataProto.Arg.shape) +} +inline ::tensorflow::TensorShapeProto* TPUCompileMetadataProto_Arg::release_shape() { + + ::tensorflow::TensorShapeProto* temp = _impl_.shape_; + _impl_.shape_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tensorflow::TensorShapeProto* TPUCompileMetadataProto_Arg::unsafe_arena_release_shape() { + // @@protoc_insertion_point(field_release:tensorflow.tpu.TPUCompileMetadataProto.Arg.shape) + + ::tensorflow::TensorShapeProto* temp = _impl_.shape_; + _impl_.shape_ = nullptr; + return temp; +} +inline ::tensorflow::TensorShapeProto* TPUCompileMetadataProto_Arg::_internal_mutable_shape() { + + if (_impl_.shape_ == nullptr) { + auto* p = CreateMaybeMessage<::tensorflow::TensorShapeProto>(GetArenaForAllocation()); + _impl_.shape_ = p; + } + return _impl_.shape_; +} +inline ::tensorflow::TensorShapeProto* TPUCompileMetadataProto_Arg::mutable_shape() { + ::tensorflow::TensorShapeProto* _msg = _internal_mutable_shape(); + // @@protoc_insertion_point(field_mutable:tensorflow.tpu.TPUCompileMetadataProto.Arg.shape) + return _msg; +} +inline void TPUCompileMetadataProto_Arg::set_allocated_shape(::tensorflow::TensorShapeProto* shape) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.shape_); + } + if (shape) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( + reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(shape)); + if (message_arena != submessage_arena) { + shape = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, shape, submessage_arena); + } + + } else { + + } + _impl_.shape_ = shape; + // @@protoc_insertion_point(field_set_allocated:tensorflow.tpu.TPUCompileMetadataProto.Arg.shape) +} + +// .tensorflow.tpu.TPUCompileMetadataProto.Arg.Kind kind = 3; +inline void TPUCompileMetadataProto_Arg::clear_kind() { + _impl_.kind_ = 0; +} +inline ::tensorflow::tpu::TPUCompileMetadataProto_Arg_Kind TPUCompileMetadataProto_Arg::_internal_kind() const { + return static_cast< ::tensorflow::tpu::TPUCompileMetadataProto_Arg_Kind >(_impl_.kind_); +} +inline ::tensorflow::tpu::TPUCompileMetadataProto_Arg_Kind TPUCompileMetadataProto_Arg::kind() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.TPUCompileMetadataProto.Arg.kind) + return _internal_kind(); +} +inline void TPUCompileMetadataProto_Arg::_internal_set_kind(::tensorflow::tpu::TPUCompileMetadataProto_Arg_Kind value) { + + _impl_.kind_ = value; +} +inline void TPUCompileMetadataProto_Arg::set_kind(::tensorflow::tpu::TPUCompileMetadataProto_Arg_Kind value) { + _internal_set_kind(value); + // @@protoc_insertion_point(field_set:tensorflow.tpu.TPUCompileMetadataProto.Arg.kind) +} + +// .xla.OpSharding sharding = 4; +inline bool TPUCompileMetadataProto_Arg::_internal_has_sharding() const { + return this != internal_default_instance() && _impl_.sharding_ != nullptr; +} +inline bool TPUCompileMetadataProto_Arg::has_sharding() const { + return _internal_has_sharding(); +} +inline const ::xla::OpSharding& TPUCompileMetadataProto_Arg::_internal_sharding() const { + const ::xla::OpSharding* p = _impl_.sharding_; + return p != nullptr ? *p : reinterpret_cast( + ::xla::_OpSharding_default_instance_); +} +inline const ::xla::OpSharding& TPUCompileMetadataProto_Arg::sharding() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.TPUCompileMetadataProto.Arg.sharding) + return _internal_sharding(); +} +inline void TPUCompileMetadataProto_Arg::unsafe_arena_set_allocated_sharding( + ::xla::OpSharding* sharding) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.sharding_); + } + _impl_.sharding_ = sharding; + if (sharding) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.tpu.TPUCompileMetadataProto.Arg.sharding) +} +inline ::xla::OpSharding* TPUCompileMetadataProto_Arg::release_sharding() { + + ::xla::OpSharding* temp = _impl_.sharding_; + _impl_.sharding_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::xla::OpSharding* TPUCompileMetadataProto_Arg::unsafe_arena_release_sharding() { + // @@protoc_insertion_point(field_release:tensorflow.tpu.TPUCompileMetadataProto.Arg.sharding) + + ::xla::OpSharding* temp = _impl_.sharding_; + _impl_.sharding_ = nullptr; + return temp; +} +inline ::xla::OpSharding* TPUCompileMetadataProto_Arg::_internal_mutable_sharding() { + + if (_impl_.sharding_ == nullptr) { + auto* p = CreateMaybeMessage<::xla::OpSharding>(GetArenaForAllocation()); + _impl_.sharding_ = p; + } + return _impl_.sharding_; +} +inline ::xla::OpSharding* TPUCompileMetadataProto_Arg::mutable_sharding() { + ::xla::OpSharding* _msg = _internal_mutable_sharding(); + // @@protoc_insertion_point(field_mutable:tensorflow.tpu.TPUCompileMetadataProto.Arg.sharding) + return _msg; +} +inline void TPUCompileMetadataProto_Arg::set_allocated_sharding(::xla::OpSharding* sharding) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.sharding_); + } + if (sharding) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( + reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(sharding)); + if (message_arena != submessage_arena) { + sharding = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, sharding, submessage_arena); + } + + } else { + + } + _impl_.sharding_ = sharding; + // @@protoc_insertion_point(field_set_allocated:tensorflow.tpu.TPUCompileMetadataProto.Arg.sharding) +} + +// bool is_same_data_across_replicas = 5; +inline void TPUCompileMetadataProto_Arg::clear_is_same_data_across_replicas() { + _impl_.is_same_data_across_replicas_ = false; +} +inline bool TPUCompileMetadataProto_Arg::_internal_is_same_data_across_replicas() const { + return _impl_.is_same_data_across_replicas_; +} +inline bool TPUCompileMetadataProto_Arg::is_same_data_across_replicas() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.TPUCompileMetadataProto.Arg.is_same_data_across_replicas) + return _internal_is_same_data_across_replicas(); +} +inline void TPUCompileMetadataProto_Arg::_internal_set_is_same_data_across_replicas(bool value) { + + _impl_.is_same_data_across_replicas_ = value; +} +inline void TPUCompileMetadataProto_Arg::set_is_same_data_across_replicas(bool value) { + _internal_set_is_same_data_across_replicas(value); + // @@protoc_insertion_point(field_set:tensorflow.tpu.TPUCompileMetadataProto.Arg.is_same_data_across_replicas) +} + +// .tensorflow.tpu.TPUCompileMetadataProto.Arg.EnableXlaSharding enable_xla_sharding = 6; +inline void TPUCompileMetadataProto_Arg::clear_enable_xla_sharding() { + _impl_.enable_xla_sharding_ = 0; +} +inline ::tensorflow::tpu::TPUCompileMetadataProto_Arg_EnableXlaSharding TPUCompileMetadataProto_Arg::_internal_enable_xla_sharding() const { + return static_cast< ::tensorflow::tpu::TPUCompileMetadataProto_Arg_EnableXlaSharding >(_impl_.enable_xla_sharding_); +} +inline ::tensorflow::tpu::TPUCompileMetadataProto_Arg_EnableXlaSharding TPUCompileMetadataProto_Arg::enable_xla_sharding() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.TPUCompileMetadataProto.Arg.enable_xla_sharding) + return _internal_enable_xla_sharding(); +} +inline void TPUCompileMetadataProto_Arg::_internal_set_enable_xla_sharding(::tensorflow::tpu::TPUCompileMetadataProto_Arg_EnableXlaSharding value) { + + _impl_.enable_xla_sharding_ = value; +} +inline void TPUCompileMetadataProto_Arg::set_enable_xla_sharding(::tensorflow::tpu::TPUCompileMetadataProto_Arg_EnableXlaSharding value) { + _internal_set_enable_xla_sharding(value); + // @@protoc_insertion_point(field_set:tensorflow.tpu.TPUCompileMetadataProto.Arg.enable_xla_sharding) +} + +// int32 retval_index_for_sharding = 8; +inline void TPUCompileMetadataProto_Arg::clear_retval_index_for_sharding() { + _impl_.retval_index_for_sharding_ = 0; +} +inline int32_t TPUCompileMetadataProto_Arg::_internal_retval_index_for_sharding() const { + return _impl_.retval_index_for_sharding_; +} +inline int32_t TPUCompileMetadataProto_Arg::retval_index_for_sharding() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.TPUCompileMetadataProto.Arg.retval_index_for_sharding) + return _internal_retval_index_for_sharding(); +} +inline void TPUCompileMetadataProto_Arg::_internal_set_retval_index_for_sharding(int32_t value) { + + _impl_.retval_index_for_sharding_ = value; +} +inline void TPUCompileMetadataProto_Arg::set_retval_index_for_sharding(int32_t value) { + _internal_set_retval_index_for_sharding(value); + // @@protoc_insertion_point(field_set:tensorflow.tpu.TPUCompileMetadataProto.Arg.retval_index_for_sharding) +} + +// bool fast_mem = 7; +inline void TPUCompileMetadataProto_Arg::clear_fast_mem() { + _impl_.fast_mem_ = false; +} +inline bool TPUCompileMetadataProto_Arg::_internal_fast_mem() const { + return _impl_.fast_mem_; +} +inline bool TPUCompileMetadataProto_Arg::fast_mem() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.TPUCompileMetadataProto.Arg.fast_mem) + return _internal_fast_mem(); +} +inline void TPUCompileMetadataProto_Arg::_internal_set_fast_mem(bool value) { + + _impl_.fast_mem_ = value; +} +inline void TPUCompileMetadataProto_Arg::set_fast_mem(bool value) { + _internal_set_fast_mem(value); + // @@protoc_insertion_point(field_set:tensorflow.tpu.TPUCompileMetadataProto.Arg.fast_mem) +} + +// bool unrestricted_layout = 9; +inline void TPUCompileMetadataProto_Arg::clear_unrestricted_layout() { + _impl_.unrestricted_layout_ = false; +} +inline bool TPUCompileMetadataProto_Arg::_internal_unrestricted_layout() const { + return _impl_.unrestricted_layout_; +} +inline bool TPUCompileMetadataProto_Arg::unrestricted_layout() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.TPUCompileMetadataProto.Arg.unrestricted_layout) + return _internal_unrestricted_layout(); +} +inline void TPUCompileMetadataProto_Arg::_internal_set_unrestricted_layout(bool value) { + + _impl_.unrestricted_layout_ = value; +} +inline void TPUCompileMetadataProto_Arg::set_unrestricted_layout(bool value) { + _internal_set_unrestricted_layout(value); + // @@protoc_insertion_point(field_set:tensorflow.tpu.TPUCompileMetadataProto.Arg.unrestricted_layout) +} + +// string name = 10; +inline void TPUCompileMetadataProto_Arg::clear_name() { + _impl_.name_.ClearToEmpty(); +} +inline const std::string& TPUCompileMetadataProto_Arg::name() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.TPUCompileMetadataProto.Arg.name) + return _internal_name(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void TPUCompileMetadataProto_Arg::set_name(ArgT0&& arg0, ArgT... args) { + + _impl_.name_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.tpu.TPUCompileMetadataProto.Arg.name) +} +inline std::string* TPUCompileMetadataProto_Arg::mutable_name() { + std::string* _s = _internal_mutable_name(); + // @@protoc_insertion_point(field_mutable:tensorflow.tpu.TPUCompileMetadataProto.Arg.name) + return _s; +} +inline const std::string& TPUCompileMetadataProto_Arg::_internal_name() const { + return _impl_.name_.Get(); +} +inline void TPUCompileMetadataProto_Arg::_internal_set_name(const std::string& value) { + + _impl_.name_.Set(value, GetArenaForAllocation()); +} +inline std::string* TPUCompileMetadataProto_Arg::_internal_mutable_name() { + + return _impl_.name_.Mutable(GetArenaForAllocation()); +} +inline std::string* TPUCompileMetadataProto_Arg::release_name() { + // @@protoc_insertion_point(field_release:tensorflow.tpu.TPUCompileMetadataProto.Arg.name) + return _impl_.name_.Release(); +} +inline void TPUCompileMetadataProto_Arg::set_allocated_name(std::string* name) { + if (name != nullptr) { + + } else { + + } + _impl_.name_.SetAllocated(name, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.name_.IsDefault()) { + _impl_.name_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.tpu.TPUCompileMetadataProto.Arg.name) +} + +// bool requires_xla_broadcast = 11; +inline void TPUCompileMetadataProto_Arg::clear_requires_xla_broadcast() { + _impl_.requires_xla_broadcast_ = false; +} +inline bool TPUCompileMetadataProto_Arg::_internal_requires_xla_broadcast() const { + return _impl_.requires_xla_broadcast_; +} +inline bool TPUCompileMetadataProto_Arg::requires_xla_broadcast() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.TPUCompileMetadataProto.Arg.requires_xla_broadcast) + return _internal_requires_xla_broadcast(); +} +inline void TPUCompileMetadataProto_Arg::_internal_set_requires_xla_broadcast(bool value) { + + _impl_.requires_xla_broadcast_ = value; +} +inline void TPUCompileMetadataProto_Arg::set_requires_xla_broadcast(bool value) { + _internal_set_requires_xla_broadcast(value); + // @@protoc_insertion_point(field_set:tensorflow.tpu.TPUCompileMetadataProto.Arg.requires_xla_broadcast) +} + +// repeated bool is_bounded_dynamic_dim = 12; +inline int TPUCompileMetadataProto_Arg::_internal_is_bounded_dynamic_dim_size() const { + return _impl_.is_bounded_dynamic_dim_.size(); +} +inline int TPUCompileMetadataProto_Arg::is_bounded_dynamic_dim_size() const { + return _internal_is_bounded_dynamic_dim_size(); +} +inline void TPUCompileMetadataProto_Arg::clear_is_bounded_dynamic_dim() { + _impl_.is_bounded_dynamic_dim_.Clear(); +} +inline bool TPUCompileMetadataProto_Arg::_internal_is_bounded_dynamic_dim(int index) const { + return _impl_.is_bounded_dynamic_dim_.Get(index); +} +inline bool TPUCompileMetadataProto_Arg::is_bounded_dynamic_dim(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.TPUCompileMetadataProto.Arg.is_bounded_dynamic_dim) + return _internal_is_bounded_dynamic_dim(index); +} +inline void TPUCompileMetadataProto_Arg::set_is_bounded_dynamic_dim(int index, bool value) { + _impl_.is_bounded_dynamic_dim_.Set(index, value); + // @@protoc_insertion_point(field_set:tensorflow.tpu.TPUCompileMetadataProto.Arg.is_bounded_dynamic_dim) +} +inline void TPUCompileMetadataProto_Arg::_internal_add_is_bounded_dynamic_dim(bool value) { + _impl_.is_bounded_dynamic_dim_.Add(value); +} +inline void TPUCompileMetadataProto_Arg::add_is_bounded_dynamic_dim(bool value) { + _internal_add_is_bounded_dynamic_dim(value); + // @@protoc_insertion_point(field_add:tensorflow.tpu.TPUCompileMetadataProto.Arg.is_bounded_dynamic_dim) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< bool >& +TPUCompileMetadataProto_Arg::_internal_is_bounded_dynamic_dim() const { + return _impl_.is_bounded_dynamic_dim_; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< bool >& +TPUCompileMetadataProto_Arg::is_bounded_dynamic_dim() const { + // @@protoc_insertion_point(field_list:tensorflow.tpu.TPUCompileMetadataProto.Arg.is_bounded_dynamic_dim) + return _internal_is_bounded_dynamic_dim(); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< bool >* +TPUCompileMetadataProto_Arg::_internal_mutable_is_bounded_dynamic_dim() { + return &_impl_.is_bounded_dynamic_dim_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< bool >* +TPUCompileMetadataProto_Arg::mutable_is_bounded_dynamic_dim() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.tpu.TPUCompileMetadataProto.Arg.is_bounded_dynamic_dim) + return _internal_mutable_is_bounded_dynamic_dim(); +} + +// ------------------------------------------------------------------- + +// TPUCompileMetadataProto_Retval + +// .xla.OpSharding sharding = 1; +inline bool TPUCompileMetadataProto_Retval::_internal_has_sharding() const { + return this != internal_default_instance() && _impl_.sharding_ != nullptr; +} +inline bool TPUCompileMetadataProto_Retval::has_sharding() const { + return _internal_has_sharding(); +} +inline const ::xla::OpSharding& TPUCompileMetadataProto_Retval::_internal_sharding() const { + const ::xla::OpSharding* p = _impl_.sharding_; + return p != nullptr ? *p : reinterpret_cast( + ::xla::_OpSharding_default_instance_); +} +inline const ::xla::OpSharding& TPUCompileMetadataProto_Retval::sharding() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.TPUCompileMetadataProto.Retval.sharding) + return _internal_sharding(); +} +inline void TPUCompileMetadataProto_Retval::unsafe_arena_set_allocated_sharding( + ::xla::OpSharding* sharding) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.sharding_); + } + _impl_.sharding_ = sharding; + if (sharding) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.tpu.TPUCompileMetadataProto.Retval.sharding) +} +inline ::xla::OpSharding* TPUCompileMetadataProto_Retval::release_sharding() { + + ::xla::OpSharding* temp = _impl_.sharding_; + _impl_.sharding_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::xla::OpSharding* TPUCompileMetadataProto_Retval::unsafe_arena_release_sharding() { + // @@protoc_insertion_point(field_release:tensorflow.tpu.TPUCompileMetadataProto.Retval.sharding) + + ::xla::OpSharding* temp = _impl_.sharding_; + _impl_.sharding_ = nullptr; + return temp; +} +inline ::xla::OpSharding* TPUCompileMetadataProto_Retval::_internal_mutable_sharding() { + + if (_impl_.sharding_ == nullptr) { + auto* p = CreateMaybeMessage<::xla::OpSharding>(GetArenaForAllocation()); + _impl_.sharding_ = p; + } + return _impl_.sharding_; +} +inline ::xla::OpSharding* TPUCompileMetadataProto_Retval::mutable_sharding() { + ::xla::OpSharding* _msg = _internal_mutable_sharding(); + // @@protoc_insertion_point(field_mutable:tensorflow.tpu.TPUCompileMetadataProto.Retval.sharding) + return _msg; +} +inline void TPUCompileMetadataProto_Retval::set_allocated_sharding(::xla::OpSharding* sharding) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.sharding_); + } + if (sharding) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( + reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(sharding)); + if (message_arena != submessage_arena) { + sharding = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, sharding, submessage_arena); + } + + } else { + + } + _impl_.sharding_ = sharding; + // @@protoc_insertion_point(field_set_allocated:tensorflow.tpu.TPUCompileMetadataProto.Retval.sharding) +} + +// ------------------------------------------------------------------- + +// TPUCompileMetadataProto + +// repeated .tensorflow.tpu.TPUCompileMetadataProto.Arg args = 1; +inline int TPUCompileMetadataProto::_internal_args_size() const { + return _impl_.args_.size(); +} +inline int TPUCompileMetadataProto::args_size() const { + return _internal_args_size(); +} +inline void TPUCompileMetadataProto::clear_args() { + _impl_.args_.Clear(); +} +inline ::tensorflow::tpu::TPUCompileMetadataProto_Arg* TPUCompileMetadataProto::mutable_args(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.tpu.TPUCompileMetadataProto.args) + return _impl_.args_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::tpu::TPUCompileMetadataProto_Arg >* +TPUCompileMetadataProto::mutable_args() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.tpu.TPUCompileMetadataProto.args) + return &_impl_.args_; +} +inline const ::tensorflow::tpu::TPUCompileMetadataProto_Arg& TPUCompileMetadataProto::_internal_args(int index) const { + return _impl_.args_.Get(index); +} +inline const ::tensorflow::tpu::TPUCompileMetadataProto_Arg& TPUCompileMetadataProto::args(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.TPUCompileMetadataProto.args) + return _internal_args(index); +} +inline ::tensorflow::tpu::TPUCompileMetadataProto_Arg* TPUCompileMetadataProto::_internal_add_args() { + return _impl_.args_.Add(); +} +inline ::tensorflow::tpu::TPUCompileMetadataProto_Arg* TPUCompileMetadataProto::add_args() { + ::tensorflow::tpu::TPUCompileMetadataProto_Arg* _add = _internal_add_args(); + // @@protoc_insertion_point(field_add:tensorflow.tpu.TPUCompileMetadataProto.args) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::tpu::TPUCompileMetadataProto_Arg >& +TPUCompileMetadataProto::args() const { + // @@protoc_insertion_point(field_list:tensorflow.tpu.TPUCompileMetadataProto.args) + return _impl_.args_; +} + +// repeated .tensorflow.tpu.TPUCompileMetadataProto.Retval retvals = 2; +inline int TPUCompileMetadataProto::_internal_retvals_size() const { + return _impl_.retvals_.size(); +} +inline int TPUCompileMetadataProto::retvals_size() const { + return _internal_retvals_size(); +} +inline void TPUCompileMetadataProto::clear_retvals() { + _impl_.retvals_.Clear(); +} +inline ::tensorflow::tpu::TPUCompileMetadataProto_Retval* TPUCompileMetadataProto::mutable_retvals(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.tpu.TPUCompileMetadataProto.retvals) + return _impl_.retvals_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::tpu::TPUCompileMetadataProto_Retval >* +TPUCompileMetadataProto::mutable_retvals() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.tpu.TPUCompileMetadataProto.retvals) + return &_impl_.retvals_; +} +inline const ::tensorflow::tpu::TPUCompileMetadataProto_Retval& TPUCompileMetadataProto::_internal_retvals(int index) const { + return _impl_.retvals_.Get(index); +} +inline const ::tensorflow::tpu::TPUCompileMetadataProto_Retval& TPUCompileMetadataProto::retvals(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.TPUCompileMetadataProto.retvals) + return _internal_retvals(index); +} +inline ::tensorflow::tpu::TPUCompileMetadataProto_Retval* TPUCompileMetadataProto::_internal_add_retvals() { + return _impl_.retvals_.Add(); +} +inline ::tensorflow::tpu::TPUCompileMetadataProto_Retval* TPUCompileMetadataProto::add_retvals() { + ::tensorflow::tpu::TPUCompileMetadataProto_Retval* _add = _internal_add_retvals(); + // @@protoc_insertion_point(field_add:tensorflow.tpu.TPUCompileMetadataProto.retvals) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::tpu::TPUCompileMetadataProto_Retval >& +TPUCompileMetadataProto::retvals() const { + // @@protoc_insertion_point(field_list:tensorflow.tpu.TPUCompileMetadataProto.retvals) + return _impl_.retvals_; +} + +// int32 num_replicas = 3; +inline void TPUCompileMetadataProto::clear_num_replicas() { + _impl_.num_replicas_ = 0; +} +inline int32_t TPUCompileMetadataProto::_internal_num_replicas() const { + return _impl_.num_replicas_; +} +inline int32_t TPUCompileMetadataProto::num_replicas() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.TPUCompileMetadataProto.num_replicas) + return _internal_num_replicas(); +} +inline void TPUCompileMetadataProto::_internal_set_num_replicas(int32_t value) { + + _impl_.num_replicas_ = value; +} +inline void TPUCompileMetadataProto::set_num_replicas(int32_t value) { + _internal_set_num_replicas(value); + // @@protoc_insertion_point(field_set:tensorflow.tpu.TPUCompileMetadataProto.num_replicas) +} + +// int32 num_cores_per_replica = 4; +inline void TPUCompileMetadataProto::clear_num_cores_per_replica() { + _impl_.num_cores_per_replica_ = 0; +} +inline int32_t TPUCompileMetadataProto::_internal_num_cores_per_replica() const { + return _impl_.num_cores_per_replica_; +} +inline int32_t TPUCompileMetadataProto::num_cores_per_replica() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.TPUCompileMetadataProto.num_cores_per_replica) + return _internal_num_cores_per_replica(); +} +inline void TPUCompileMetadataProto::_internal_set_num_cores_per_replica(int32_t value) { + + _impl_.num_cores_per_replica_ = value; +} +inline void TPUCompileMetadataProto::set_num_cores_per_replica(int32_t value) { + _internal_set_num_cores_per_replica(value); + // @@protoc_insertion_point(field_set:tensorflow.tpu.TPUCompileMetadataProto.num_cores_per_replica) +} + +// .xla.DeviceAssignmentProto device_assignment = 8; +inline bool TPUCompileMetadataProto::_internal_has_device_assignment() const { + return this != internal_default_instance() && _impl_.device_assignment_ != nullptr; +} +inline bool TPUCompileMetadataProto::has_device_assignment() const { + return _internal_has_device_assignment(); +} +inline const ::xla::DeviceAssignmentProto& TPUCompileMetadataProto::_internal_device_assignment() const { + const ::xla::DeviceAssignmentProto* p = _impl_.device_assignment_; + return p != nullptr ? *p : reinterpret_cast( + ::xla::_DeviceAssignmentProto_default_instance_); +} +inline const ::xla::DeviceAssignmentProto& TPUCompileMetadataProto::device_assignment() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.TPUCompileMetadataProto.device_assignment) + return _internal_device_assignment(); +} +inline void TPUCompileMetadataProto::unsafe_arena_set_allocated_device_assignment( + ::xla::DeviceAssignmentProto* device_assignment) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.device_assignment_); + } + _impl_.device_assignment_ = device_assignment; + if (device_assignment) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.tpu.TPUCompileMetadataProto.device_assignment) +} +inline ::xla::DeviceAssignmentProto* TPUCompileMetadataProto::release_device_assignment() { + + ::xla::DeviceAssignmentProto* temp = _impl_.device_assignment_; + _impl_.device_assignment_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::xla::DeviceAssignmentProto* TPUCompileMetadataProto::unsafe_arena_release_device_assignment() { + // @@protoc_insertion_point(field_release:tensorflow.tpu.TPUCompileMetadataProto.device_assignment) + + ::xla::DeviceAssignmentProto* temp = _impl_.device_assignment_; + _impl_.device_assignment_ = nullptr; + return temp; +} +inline ::xla::DeviceAssignmentProto* TPUCompileMetadataProto::_internal_mutable_device_assignment() { + + if (_impl_.device_assignment_ == nullptr) { + auto* p = CreateMaybeMessage<::xla::DeviceAssignmentProto>(GetArenaForAllocation()); + _impl_.device_assignment_ = p; + } + return _impl_.device_assignment_; +} +inline ::xla::DeviceAssignmentProto* TPUCompileMetadataProto::mutable_device_assignment() { + ::xla::DeviceAssignmentProto* _msg = _internal_mutable_device_assignment(); + // @@protoc_insertion_point(field_mutable:tensorflow.tpu.TPUCompileMetadataProto.device_assignment) + return _msg; +} +inline void TPUCompileMetadataProto::set_allocated_device_assignment(::xla::DeviceAssignmentProto* device_assignment) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.device_assignment_); + } + if (device_assignment) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( + reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(device_assignment)); + if (message_arena != submessage_arena) { + device_assignment = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, device_assignment, submessage_arena); + } + + } else { + + } + _impl_.device_assignment_ = device_assignment; + // @@protoc_insertion_point(field_set_allocated:tensorflow.tpu.TPUCompileMetadataProto.device_assignment) +} + +// uint64 function_library_fingerprint = 6; +inline void TPUCompileMetadataProto::clear_function_library_fingerprint() { + _impl_.function_library_fingerprint_ = uint64_t{0u}; +} +inline uint64_t TPUCompileMetadataProto::_internal_function_library_fingerprint() const { + return _impl_.function_library_fingerprint_; +} +inline uint64_t TPUCompileMetadataProto::function_library_fingerprint() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.TPUCompileMetadataProto.function_library_fingerprint) + return _internal_function_library_fingerprint(); +} +inline void TPUCompileMetadataProto::_internal_set_function_library_fingerprint(uint64_t value) { + + _impl_.function_library_fingerprint_ = value; +} +inline void TPUCompileMetadataProto::set_function_library_fingerprint(uint64_t value) { + _internal_set_function_library_fingerprint(value); + // @@protoc_insertion_point(field_set:tensorflow.tpu.TPUCompileMetadataProto.function_library_fingerprint) +} + +// string session_handle = 9; +inline void TPUCompileMetadataProto::clear_session_handle() { + _impl_.session_handle_.ClearToEmpty(); +} +inline const std::string& TPUCompileMetadataProto::session_handle() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.TPUCompileMetadataProto.session_handle) + return _internal_session_handle(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void TPUCompileMetadataProto::set_session_handle(ArgT0&& arg0, ArgT... args) { + + _impl_.session_handle_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.tpu.TPUCompileMetadataProto.session_handle) +} +inline std::string* TPUCompileMetadataProto::mutable_session_handle() { + std::string* _s = _internal_mutable_session_handle(); + // @@protoc_insertion_point(field_mutable:tensorflow.tpu.TPUCompileMetadataProto.session_handle) + return _s; +} +inline const std::string& TPUCompileMetadataProto::_internal_session_handle() const { + return _impl_.session_handle_.Get(); +} +inline void TPUCompileMetadataProto::_internal_set_session_handle(const std::string& value) { + + _impl_.session_handle_.Set(value, GetArenaForAllocation()); +} +inline std::string* TPUCompileMetadataProto::_internal_mutable_session_handle() { + + return _impl_.session_handle_.Mutable(GetArenaForAllocation()); +} +inline std::string* TPUCompileMetadataProto::release_session_handle() { + // @@protoc_insertion_point(field_release:tensorflow.tpu.TPUCompileMetadataProto.session_handle) + return _impl_.session_handle_.Release(); +} +inline void TPUCompileMetadataProto::set_allocated_session_handle(std::string* session_handle) { + if (session_handle != nullptr) { + + } else { + + } + _impl_.session_handle_.SetAllocated(session_handle, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.session_handle_.IsDefault()) { + _impl_.session_handle_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.tpu.TPUCompileMetadataProto.session_handle) +} + +// string guaranteed_const_fingerprint = 10; +inline void TPUCompileMetadataProto::clear_guaranteed_const_fingerprint() { + _impl_.guaranteed_const_fingerprint_.ClearToEmpty(); +} +inline const std::string& TPUCompileMetadataProto::guaranteed_const_fingerprint() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.TPUCompileMetadataProto.guaranteed_const_fingerprint) + return _internal_guaranteed_const_fingerprint(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void TPUCompileMetadataProto::set_guaranteed_const_fingerprint(ArgT0&& arg0, ArgT... args) { + + _impl_.guaranteed_const_fingerprint_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.tpu.TPUCompileMetadataProto.guaranteed_const_fingerprint) +} +inline std::string* TPUCompileMetadataProto::mutable_guaranteed_const_fingerprint() { + std::string* _s = _internal_mutable_guaranteed_const_fingerprint(); + // @@protoc_insertion_point(field_mutable:tensorflow.tpu.TPUCompileMetadataProto.guaranteed_const_fingerprint) + return _s; +} +inline const std::string& TPUCompileMetadataProto::_internal_guaranteed_const_fingerprint() const { + return _impl_.guaranteed_const_fingerprint_.Get(); +} +inline void TPUCompileMetadataProto::_internal_set_guaranteed_const_fingerprint(const std::string& value) { + + _impl_.guaranteed_const_fingerprint_.Set(value, GetArenaForAllocation()); +} +inline std::string* TPUCompileMetadataProto::_internal_mutable_guaranteed_const_fingerprint() { + + return _impl_.guaranteed_const_fingerprint_.Mutable(GetArenaForAllocation()); +} +inline std::string* TPUCompileMetadataProto::release_guaranteed_const_fingerprint() { + // @@protoc_insertion_point(field_release:tensorflow.tpu.TPUCompileMetadataProto.guaranteed_const_fingerprint) + return _impl_.guaranteed_const_fingerprint_.Release(); +} +inline void TPUCompileMetadataProto::set_allocated_guaranteed_const_fingerprint(std::string* guaranteed_const_fingerprint) { + if (guaranteed_const_fingerprint != nullptr) { + + } else { + + } + _impl_.guaranteed_const_fingerprint_.SetAllocated(guaranteed_const_fingerprint, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.guaranteed_const_fingerprint_.IsDefault()) { + _impl_.guaranteed_const_fingerprint_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.tpu.TPUCompileMetadataProto.guaranteed_const_fingerprint) +} + +// repeated .tensorflow.tpu.PaddingMap padding_maps = 11; +inline int TPUCompileMetadataProto::_internal_padding_maps_size() const { + return _impl_.padding_maps_.size(); +} +inline int TPUCompileMetadataProto::padding_maps_size() const { + return _internal_padding_maps_size(); +} +inline ::tensorflow::tpu::PaddingMap* TPUCompileMetadataProto::mutable_padding_maps(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.tpu.TPUCompileMetadataProto.padding_maps) + return _impl_.padding_maps_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::tpu::PaddingMap >* +TPUCompileMetadataProto::mutable_padding_maps() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.tpu.TPUCompileMetadataProto.padding_maps) + return &_impl_.padding_maps_; +} +inline const ::tensorflow::tpu::PaddingMap& TPUCompileMetadataProto::_internal_padding_maps(int index) const { + return _impl_.padding_maps_.Get(index); +} +inline const ::tensorflow::tpu::PaddingMap& TPUCompileMetadataProto::padding_maps(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.TPUCompileMetadataProto.padding_maps) + return _internal_padding_maps(index); +} +inline ::tensorflow::tpu::PaddingMap* TPUCompileMetadataProto::_internal_add_padding_maps() { + return _impl_.padding_maps_.Add(); +} +inline ::tensorflow::tpu::PaddingMap* TPUCompileMetadataProto::add_padding_maps() { + ::tensorflow::tpu::PaddingMap* _add = _internal_add_padding_maps(); + // @@protoc_insertion_point(field_add:tensorflow.tpu.TPUCompileMetadataProto.padding_maps) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::tpu::PaddingMap >& +TPUCompileMetadataProto::padding_maps() const { + // @@protoc_insertion_point(field_list:tensorflow.tpu.TPUCompileMetadataProto.padding_maps) + return _impl_.padding_maps_; +} + +// .xla.DebugOptions.StepMarkerLocation step_marker_location = 12; +inline void TPUCompileMetadataProto::clear_step_marker_location() { + _impl_.step_marker_location_ = 0; +} +inline ::xla::DebugOptions_StepMarkerLocation TPUCompileMetadataProto::_internal_step_marker_location() const { + return static_cast< ::xla::DebugOptions_StepMarkerLocation >(_impl_.step_marker_location_); +} +inline ::xla::DebugOptions_StepMarkerLocation TPUCompileMetadataProto::step_marker_location() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.TPUCompileMetadataProto.step_marker_location) + return _internal_step_marker_location(); +} +inline void TPUCompileMetadataProto::_internal_set_step_marker_location(::xla::DebugOptions_StepMarkerLocation value) { + + _impl_.step_marker_location_ = value; +} +inline void TPUCompileMetadataProto::set_step_marker_location(::xla::DebugOptions_StepMarkerLocation value) { + _internal_set_step_marker_location(value); + // @@protoc_insertion_point(field_set:tensorflow.tpu.TPUCompileMetadataProto.step_marker_location) +} + +// int64 xla_fusion_autotuner_thresh = 13; +inline void TPUCompileMetadataProto::clear_xla_fusion_autotuner_thresh() { + _impl_.xla_fusion_autotuner_thresh_ = int64_t{0}; +} +inline int64_t TPUCompileMetadataProto::_internal_xla_fusion_autotuner_thresh() const { + return _impl_.xla_fusion_autotuner_thresh_; +} +inline int64_t TPUCompileMetadataProto::xla_fusion_autotuner_thresh() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.TPUCompileMetadataProto.xla_fusion_autotuner_thresh) + return _internal_xla_fusion_autotuner_thresh(); +} +inline void TPUCompileMetadataProto::_internal_set_xla_fusion_autotuner_thresh(int64_t value) { + + _impl_.xla_fusion_autotuner_thresh_ = value; +} +inline void TPUCompileMetadataProto::set_xla_fusion_autotuner_thresh(int64_t value) { + _internal_set_xla_fusion_autotuner_thresh(value); + // @@protoc_insertion_point(field_set:tensorflow.tpu.TPUCompileMetadataProto.xla_fusion_autotuner_thresh) +} + +// bool enable_automatic_model_parallelism = 14; +inline void TPUCompileMetadataProto::clear_enable_automatic_model_parallelism() { + _impl_.enable_automatic_model_parallelism_ = false; +} +inline bool TPUCompileMetadataProto::_internal_enable_automatic_model_parallelism() const { + return _impl_.enable_automatic_model_parallelism_; +} +inline bool TPUCompileMetadataProto::enable_automatic_model_parallelism() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.TPUCompileMetadataProto.enable_automatic_model_parallelism) + return _internal_enable_automatic_model_parallelism(); +} +inline void TPUCompileMetadataProto::_internal_set_enable_automatic_model_parallelism(bool value) { + + _impl_.enable_automatic_model_parallelism_ = value; +} +inline void TPUCompileMetadataProto::set_enable_automatic_model_parallelism(bool value) { + _internal_set_enable_automatic_model_parallelism(value); + // @@protoc_insertion_point(field_set:tensorflow.tpu.TPUCompileMetadataProto.enable_automatic_model_parallelism) +} + +// bool use_spmd_for_xla_partitioning = 15; +inline void TPUCompileMetadataProto::clear_use_spmd_for_xla_partitioning() { + _impl_.use_spmd_for_xla_partitioning_ = false; +} +inline bool TPUCompileMetadataProto::_internal_use_spmd_for_xla_partitioning() const { + return _impl_.use_spmd_for_xla_partitioning_; +} +inline bool TPUCompileMetadataProto::use_spmd_for_xla_partitioning() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.TPUCompileMetadataProto.use_spmd_for_xla_partitioning) + return _internal_use_spmd_for_xla_partitioning(); +} +inline void TPUCompileMetadataProto::_internal_set_use_spmd_for_xla_partitioning(bool value) { + + _impl_.use_spmd_for_xla_partitioning_ = value; +} +inline void TPUCompileMetadataProto::set_use_spmd_for_xla_partitioning(bool value) { + _internal_set_use_spmd_for_xla_partitioning(value); + // @@protoc_insertion_point(field_set:tensorflow.tpu.TPUCompileMetadataProto.use_spmd_for_xla_partitioning) +} + +// bool use_auto_spmd_for_xla_partitioning = 18; +inline void TPUCompileMetadataProto::clear_use_auto_spmd_for_xla_partitioning() { + _impl_.use_auto_spmd_for_xla_partitioning_ = false; +} +inline bool TPUCompileMetadataProto::_internal_use_auto_spmd_for_xla_partitioning() const { + return _impl_.use_auto_spmd_for_xla_partitioning_; +} +inline bool TPUCompileMetadataProto::use_auto_spmd_for_xla_partitioning() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.TPUCompileMetadataProto.use_auto_spmd_for_xla_partitioning) + return _internal_use_auto_spmd_for_xla_partitioning(); +} +inline void TPUCompileMetadataProto::_internal_set_use_auto_spmd_for_xla_partitioning(bool value) { + + _impl_.use_auto_spmd_for_xla_partitioning_ = value; +} +inline void TPUCompileMetadataProto::set_use_auto_spmd_for_xla_partitioning(bool value) { + _internal_set_use_auto_spmd_for_xla_partitioning(value); + // @@protoc_insertion_point(field_set:tensorflow.tpu.TPUCompileMetadataProto.use_auto_spmd_for_xla_partitioning) +} + +// repeated int64 auto_spmd_mesh_shape = 19; +inline int TPUCompileMetadataProto::_internal_auto_spmd_mesh_shape_size() const { + return _impl_.auto_spmd_mesh_shape_.size(); +} +inline int TPUCompileMetadataProto::auto_spmd_mesh_shape_size() const { + return _internal_auto_spmd_mesh_shape_size(); +} +inline void TPUCompileMetadataProto::clear_auto_spmd_mesh_shape() { + _impl_.auto_spmd_mesh_shape_.Clear(); +} +inline int64_t TPUCompileMetadataProto::_internal_auto_spmd_mesh_shape(int index) const { + return _impl_.auto_spmd_mesh_shape_.Get(index); +} +inline int64_t TPUCompileMetadataProto::auto_spmd_mesh_shape(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.TPUCompileMetadataProto.auto_spmd_mesh_shape) + return _internal_auto_spmd_mesh_shape(index); +} +inline void TPUCompileMetadataProto::set_auto_spmd_mesh_shape(int index, int64_t value) { + _impl_.auto_spmd_mesh_shape_.Set(index, value); + // @@protoc_insertion_point(field_set:tensorflow.tpu.TPUCompileMetadataProto.auto_spmd_mesh_shape) +} +inline void TPUCompileMetadataProto::_internal_add_auto_spmd_mesh_shape(int64_t value) { + _impl_.auto_spmd_mesh_shape_.Add(value); +} +inline void TPUCompileMetadataProto::add_auto_spmd_mesh_shape(int64_t value) { + _internal_add_auto_spmd_mesh_shape(value); + // @@protoc_insertion_point(field_add:tensorflow.tpu.TPUCompileMetadataProto.auto_spmd_mesh_shape) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >& +TPUCompileMetadataProto::_internal_auto_spmd_mesh_shape() const { + return _impl_.auto_spmd_mesh_shape_; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >& +TPUCompileMetadataProto::auto_spmd_mesh_shape() const { + // @@protoc_insertion_point(field_list:tensorflow.tpu.TPUCompileMetadataProto.auto_spmd_mesh_shape) + return _internal_auto_spmd_mesh_shape(); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >* +TPUCompileMetadataProto::_internal_mutable_auto_spmd_mesh_shape() { + return &_impl_.auto_spmd_mesh_shape_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >* +TPUCompileMetadataProto::mutable_auto_spmd_mesh_shape() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.tpu.TPUCompileMetadataProto.auto_spmd_mesh_shape) + return _internal_mutable_auto_spmd_mesh_shape(); +} + +// repeated int64 auto_spmd_mesh_ids = 20; +inline int TPUCompileMetadataProto::_internal_auto_spmd_mesh_ids_size() const { + return _impl_.auto_spmd_mesh_ids_.size(); +} +inline int TPUCompileMetadataProto::auto_spmd_mesh_ids_size() const { + return _internal_auto_spmd_mesh_ids_size(); +} +inline void TPUCompileMetadataProto::clear_auto_spmd_mesh_ids() { + _impl_.auto_spmd_mesh_ids_.Clear(); +} +inline int64_t TPUCompileMetadataProto::_internal_auto_spmd_mesh_ids(int index) const { + return _impl_.auto_spmd_mesh_ids_.Get(index); +} +inline int64_t TPUCompileMetadataProto::auto_spmd_mesh_ids(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.TPUCompileMetadataProto.auto_spmd_mesh_ids) + return _internal_auto_spmd_mesh_ids(index); +} +inline void TPUCompileMetadataProto::set_auto_spmd_mesh_ids(int index, int64_t value) { + _impl_.auto_spmd_mesh_ids_.Set(index, value); + // @@protoc_insertion_point(field_set:tensorflow.tpu.TPUCompileMetadataProto.auto_spmd_mesh_ids) +} +inline void TPUCompileMetadataProto::_internal_add_auto_spmd_mesh_ids(int64_t value) { + _impl_.auto_spmd_mesh_ids_.Add(value); +} +inline void TPUCompileMetadataProto::add_auto_spmd_mesh_ids(int64_t value) { + _internal_add_auto_spmd_mesh_ids(value); + // @@protoc_insertion_point(field_add:tensorflow.tpu.TPUCompileMetadataProto.auto_spmd_mesh_ids) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >& +TPUCompileMetadataProto::_internal_auto_spmd_mesh_ids() const { + return _impl_.auto_spmd_mesh_ids_; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >& +TPUCompileMetadataProto::auto_spmd_mesh_ids() const { + // @@protoc_insertion_point(field_list:tensorflow.tpu.TPUCompileMetadataProto.auto_spmd_mesh_ids) + return _internal_auto_spmd_mesh_ids(); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >* +TPUCompileMetadataProto::_internal_mutable_auto_spmd_mesh_ids() { + return &_impl_.auto_spmd_mesh_ids_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >* +TPUCompileMetadataProto::mutable_auto_spmd_mesh_ids() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.tpu.TPUCompileMetadataProto.auto_spmd_mesh_ids) + return _internal_mutable_auto_spmd_mesh_ids(); +} + +// uint64 mlir_fingerprint = 17; +inline void TPUCompileMetadataProto::clear_mlir_fingerprint() { + _impl_.mlir_fingerprint_ = uint64_t{0u}; +} +inline uint64_t TPUCompileMetadataProto::_internal_mlir_fingerprint() const { + return _impl_.mlir_fingerprint_; +} +inline uint64_t TPUCompileMetadataProto::mlir_fingerprint() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.TPUCompileMetadataProto.mlir_fingerprint) + return _internal_mlir_fingerprint(); +} +inline void TPUCompileMetadataProto::_internal_set_mlir_fingerprint(uint64_t value) { + + _impl_.mlir_fingerprint_ = value; +} +inline void TPUCompileMetadataProto::set_mlir_fingerprint(uint64_t value) { + _internal_set_mlir_fingerprint(value); + // @@protoc_insertion_point(field_set:tensorflow.tpu.TPUCompileMetadataProto.mlir_fingerprint) +} + +// .tensorflow.tpu.TPUCompileOptions compile_options = 21; +inline bool TPUCompileMetadataProto::_internal_has_compile_options() const { + return this != internal_default_instance() && _impl_.compile_options_ != nullptr; +} +inline bool TPUCompileMetadataProto::has_compile_options() const { + return _internal_has_compile_options(); +} +inline void TPUCompileMetadataProto::clear_compile_options() { + if (GetArenaForAllocation() == nullptr && _impl_.compile_options_ != nullptr) { + delete _impl_.compile_options_; + } + _impl_.compile_options_ = nullptr; +} +inline const ::tensorflow::tpu::TPUCompileOptions& TPUCompileMetadataProto::_internal_compile_options() const { + const ::tensorflow::tpu::TPUCompileOptions* p = _impl_.compile_options_; + return p != nullptr ? *p : reinterpret_cast( + ::tensorflow::tpu::_TPUCompileOptions_default_instance_); +} +inline const ::tensorflow::tpu::TPUCompileOptions& TPUCompileMetadataProto::compile_options() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.TPUCompileMetadataProto.compile_options) + return _internal_compile_options(); +} +inline void TPUCompileMetadataProto::unsafe_arena_set_allocated_compile_options( + ::tensorflow::tpu::TPUCompileOptions* compile_options) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.compile_options_); + } + _impl_.compile_options_ = compile_options; + if (compile_options) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.tpu.TPUCompileMetadataProto.compile_options) +} +inline ::tensorflow::tpu::TPUCompileOptions* TPUCompileMetadataProto::release_compile_options() { + + ::tensorflow::tpu::TPUCompileOptions* temp = _impl_.compile_options_; + _impl_.compile_options_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tensorflow::tpu::TPUCompileOptions* TPUCompileMetadataProto::unsafe_arena_release_compile_options() { + // @@protoc_insertion_point(field_release:tensorflow.tpu.TPUCompileMetadataProto.compile_options) + + ::tensorflow::tpu::TPUCompileOptions* temp = _impl_.compile_options_; + _impl_.compile_options_ = nullptr; + return temp; +} +inline ::tensorflow::tpu::TPUCompileOptions* TPUCompileMetadataProto::_internal_mutable_compile_options() { + + if (_impl_.compile_options_ == nullptr) { + auto* p = CreateMaybeMessage<::tensorflow::tpu::TPUCompileOptions>(GetArenaForAllocation()); + _impl_.compile_options_ = p; + } + return _impl_.compile_options_; +} +inline ::tensorflow::tpu::TPUCompileOptions* TPUCompileMetadataProto::mutable_compile_options() { + ::tensorflow::tpu::TPUCompileOptions* _msg = _internal_mutable_compile_options(); + // @@protoc_insertion_point(field_mutable:tensorflow.tpu.TPUCompileMetadataProto.compile_options) + return _msg; +} +inline void TPUCompileMetadataProto::set_allocated_compile_options(::tensorflow::tpu::TPUCompileOptions* compile_options) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete _impl_.compile_options_; + } + if (compile_options) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(compile_options); + if (message_arena != submessage_arena) { + compile_options = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, compile_options, submessage_arena); + } + + } else { + + } + _impl_.compile_options_ = compile_options; + // @@protoc_insertion_point(field_set_allocated:tensorflow.tpu.TPUCompileMetadataProto.compile_options) +} + +// string module_name = 22; +inline void TPUCompileMetadataProto::clear_module_name() { + _impl_.module_name_.ClearToEmpty(); +} +inline const std::string& TPUCompileMetadataProto::module_name() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.TPUCompileMetadataProto.module_name) + return _internal_module_name(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void TPUCompileMetadataProto::set_module_name(ArgT0&& arg0, ArgT... args) { + + _impl_.module_name_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.tpu.TPUCompileMetadataProto.module_name) +} +inline std::string* TPUCompileMetadataProto::mutable_module_name() { + std::string* _s = _internal_mutable_module_name(); + // @@protoc_insertion_point(field_mutable:tensorflow.tpu.TPUCompileMetadataProto.module_name) + return _s; +} +inline const std::string& TPUCompileMetadataProto::_internal_module_name() const { + return _impl_.module_name_.Get(); +} +inline void TPUCompileMetadataProto::_internal_set_module_name(const std::string& value) { + + _impl_.module_name_.Set(value, GetArenaForAllocation()); +} +inline std::string* TPUCompileMetadataProto::_internal_mutable_module_name() { + + return _impl_.module_name_.Mutable(GetArenaForAllocation()); +} +inline std::string* TPUCompileMetadataProto::release_module_name() { + // @@protoc_insertion_point(field_release:tensorflow.tpu.TPUCompileMetadataProto.module_name) + return _impl_.module_name_.Release(); +} +inline void TPUCompileMetadataProto::set_allocated_module_name(std::string* module_name) { + if (module_name != nullptr) { + + } else { + + } + _impl_.module_name_.SetAllocated(module_name, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.module_name_.IsDefault()) { + _impl_.module_name_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.tpu.TPUCompileMetadataProto.module_name) +} + +// ------------------------------------------------------------------- + +// TPUCompileOptions + +// .tensorflow.tpu.TPUCompileOptions.Precision matrix_unit_operand_precision = 1; +inline void TPUCompileOptions::clear_matrix_unit_operand_precision() { + _impl_.matrix_unit_operand_precision_ = 0; +} +inline ::tensorflow::tpu::TPUCompileOptions_Precision TPUCompileOptions::_internal_matrix_unit_operand_precision() const { + return static_cast< ::tensorflow::tpu::TPUCompileOptions_Precision >(_impl_.matrix_unit_operand_precision_); +} +inline ::tensorflow::tpu::TPUCompileOptions_Precision TPUCompileOptions::matrix_unit_operand_precision() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.TPUCompileOptions.matrix_unit_operand_precision) + return _internal_matrix_unit_operand_precision(); +} +inline void TPUCompileOptions::_internal_set_matrix_unit_operand_precision(::tensorflow::tpu::TPUCompileOptions_Precision value) { + + _impl_.matrix_unit_operand_precision_ = value; +} +inline void TPUCompileOptions::set_matrix_unit_operand_precision(::tensorflow::tpu::TPUCompileOptions_Precision value) { + _internal_set_matrix_unit_operand_precision(value); + // @@protoc_insertion_point(field_set:tensorflow.tpu.TPUCompileOptions.matrix_unit_operand_precision) +} + +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + + +// @@protoc_insertion_point(namespace_scope) + +} // namespace tpu +} // namespace tensorflow + +PROTOBUF_NAMESPACE_OPEN + +template <> struct is_proto_enum< ::tensorflow::tpu::TPUCompileMetadataProto_Arg_Kind> : ::std::true_type {}; +template <> +inline const EnumDescriptor* GetEnumDescriptor< ::tensorflow::tpu::TPUCompileMetadataProto_Arg_Kind>() { + return ::tensorflow::tpu::TPUCompileMetadataProto_Arg_Kind_descriptor(); +} +template <> struct is_proto_enum< ::tensorflow::tpu::TPUCompileMetadataProto_Arg_EnableXlaSharding> : ::std::true_type {}; +template <> +inline const EnumDescriptor* GetEnumDescriptor< ::tensorflow::tpu::TPUCompileMetadataProto_Arg_EnableXlaSharding>() { + return ::tensorflow::tpu::TPUCompileMetadataProto_Arg_EnableXlaSharding_descriptor(); +} +template <> struct is_proto_enum< ::tensorflow::tpu::TPUCompileOptions_Precision> : ::std::true_type {}; +template <> +inline const EnumDescriptor* GetEnumDescriptor< ::tensorflow::tpu::TPUCompileOptions_Precision>() { + return ::tensorflow::tpu::TPUCompileOptions_Precision_descriptor(); +} + +PROTOBUF_NAMESPACE_CLOSE + +// @@protoc_insertion_point(global_scope) + +#include +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprotobuf_2ftpu_2fcompile_5fmetadata_2eproto diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/tpu/dynamic_padding.pb.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/tpu/dynamic_padding.pb.h new file mode 100644 index 0000000000000000000000000000000000000000..93067e3438c18519c90f1862c9ce31291e3aad5f --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/tpu/dynamic_padding.pb.h @@ -0,0 +1,313 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/tpu/dynamic_padding.proto + +#ifndef GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprotobuf_2ftpu_2fdynamic_5fpadding_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprotobuf_2ftpu_2fdynamic_5fpadding_2eproto + +#include +#include + +#include +#if PROTOBUF_VERSION < 3021000 +#error This file was generated by a newer version of protoc which is +#error incompatible with your Protocol Buffer headers. Please update +#error your headers. +#endif +#if 3021009 < PROTOBUF_MIN_PROTOC_VERSION +#error This file was generated by an older version of protoc which is +#error incompatible with your Protocol Buffer headers. Please +#error regenerate this file with a newer version of protoc. +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include // IWYU pragma: export +#include // IWYU pragma: export +#include +// @@protoc_insertion_point(includes) +#include +#define PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2fprotobuf_2ftpu_2fdynamic_5fpadding_2eproto +PROTOBUF_NAMESPACE_OPEN +namespace internal { +class AnyMetadata; +} // namespace internal +PROTOBUF_NAMESPACE_CLOSE + +// Internal implementation detail -- do not use these members. +struct TableStruct_tensorflow_2fcore_2fprotobuf_2ftpu_2fdynamic_5fpadding_2eproto { + static const uint32_t offsets[]; +}; +extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_tensorflow_2fcore_2fprotobuf_2ftpu_2fdynamic_5fpadding_2eproto; +namespace tensorflow { +namespace tpu { +class PaddingMap; +struct PaddingMapDefaultTypeInternal; +extern PaddingMapDefaultTypeInternal _PaddingMap_default_instance_; +} // namespace tpu +} // namespace tensorflow +PROTOBUF_NAMESPACE_OPEN +template<> ::tensorflow::tpu::PaddingMap* Arena::CreateMaybeMessage<::tensorflow::tpu::PaddingMap>(Arena*); +PROTOBUF_NAMESPACE_CLOSE +namespace tensorflow { +namespace tpu { + +// =================================================================== + +class PaddingMap final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.tpu.PaddingMap) */ { + public: + inline PaddingMap() : PaddingMap(nullptr) {} + ~PaddingMap() override; + explicit PROTOBUF_CONSTEXPR PaddingMap(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + PaddingMap(const PaddingMap& from); + PaddingMap(PaddingMap&& from) noexcept + : PaddingMap() { + *this = ::std::move(from); + } + + inline PaddingMap& operator=(const PaddingMap& from) { + CopyFrom(from); + return *this; + } + inline PaddingMap& operator=(PaddingMap&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const PaddingMap& default_instance() { + return *internal_default_instance(); + } + static inline const PaddingMap* internal_default_instance() { + return reinterpret_cast( + &_PaddingMap_default_instance_); + } + static constexpr int kIndexInFileMessages = + 0; + + friend void swap(PaddingMap& a, PaddingMap& b) { + a.Swap(&b); + } + inline void Swap(PaddingMap* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(PaddingMap* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + PaddingMap* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const PaddingMap& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const PaddingMap& from) { + PaddingMap::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(PaddingMap* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.tpu.PaddingMap"; + } + protected: + explicit PaddingMap(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kArgIndexFieldNumber = 1, + kShapeIndexFieldNumber = 2, + kPaddingArgIndexFieldNumber = 3, + }; + // int32 arg_index = 1; + void clear_arg_index(); + int32_t arg_index() const; + void set_arg_index(int32_t value); + private: + int32_t _internal_arg_index() const; + void _internal_set_arg_index(int32_t value); + public: + + // int32 shape_index = 2; + void clear_shape_index(); + int32_t shape_index() const; + void set_shape_index(int32_t value); + private: + int32_t _internal_shape_index() const; + void _internal_set_shape_index(int32_t value); + public: + + // int32 padding_arg_index = 3; + void clear_padding_arg_index(); + int32_t padding_arg_index() const; + void set_padding_arg_index(int32_t value); + private: + int32_t _internal_padding_arg_index() const; + void _internal_set_padding_arg_index(int32_t value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.tpu.PaddingMap) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + int32_t arg_index_; + int32_t shape_index_; + int32_t padding_arg_index_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2ftpu_2fdynamic_5fpadding_2eproto; +}; +// =================================================================== + + +// =================================================================== + +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// PaddingMap + +// int32 arg_index = 1; +inline void PaddingMap::clear_arg_index() { + _impl_.arg_index_ = 0; +} +inline int32_t PaddingMap::_internal_arg_index() const { + return _impl_.arg_index_; +} +inline int32_t PaddingMap::arg_index() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.PaddingMap.arg_index) + return _internal_arg_index(); +} +inline void PaddingMap::_internal_set_arg_index(int32_t value) { + + _impl_.arg_index_ = value; +} +inline void PaddingMap::set_arg_index(int32_t value) { + _internal_set_arg_index(value); + // @@protoc_insertion_point(field_set:tensorflow.tpu.PaddingMap.arg_index) +} + +// int32 shape_index = 2; +inline void PaddingMap::clear_shape_index() { + _impl_.shape_index_ = 0; +} +inline int32_t PaddingMap::_internal_shape_index() const { + return _impl_.shape_index_; +} +inline int32_t PaddingMap::shape_index() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.PaddingMap.shape_index) + return _internal_shape_index(); +} +inline void PaddingMap::_internal_set_shape_index(int32_t value) { + + _impl_.shape_index_ = value; +} +inline void PaddingMap::set_shape_index(int32_t value) { + _internal_set_shape_index(value); + // @@protoc_insertion_point(field_set:tensorflow.tpu.PaddingMap.shape_index) +} + +// int32 padding_arg_index = 3; +inline void PaddingMap::clear_padding_arg_index() { + _impl_.padding_arg_index_ = 0; +} +inline int32_t PaddingMap::_internal_padding_arg_index() const { + return _impl_.padding_arg_index_; +} +inline int32_t PaddingMap::padding_arg_index() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.PaddingMap.padding_arg_index) + return _internal_padding_arg_index(); +} +inline void PaddingMap::_internal_set_padding_arg_index(int32_t value) { + + _impl_.padding_arg_index_ = value; +} +inline void PaddingMap::set_padding_arg_index(int32_t value) { + _internal_set_padding_arg_index(value); + // @@protoc_insertion_point(field_set:tensorflow.tpu.PaddingMap.padding_arg_index) +} + +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ + +// @@protoc_insertion_point(namespace_scope) + +} // namespace tpu +} // namespace tensorflow + +// @@protoc_insertion_point(global_scope) + +#include +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprotobuf_2ftpu_2fdynamic_5fpadding_2eproto diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/tpu/optimization_parameters.pb.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/tpu/optimization_parameters.pb.h new file mode 100644 index 0000000000000000000000000000000000000000..b819f94b731fc44476eb701cf09ab3ae97c25654 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/tpu/optimization_parameters.pb.h @@ -0,0 +1,9687 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/tpu/optimization_parameters.proto + +#ifndef GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprotobuf_2ftpu_2foptimization_5fparameters_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprotobuf_2ftpu_2foptimization_5fparameters_2eproto + +#include +#include + +#include +#if PROTOBUF_VERSION < 3021000 +#error This file was generated by a newer version of protoc which is +#error incompatible with your Protocol Buffer headers. Please update +#error your headers. +#endif +#if 3021009 < PROTOBUF_MIN_PROTOC_VERSION +#error This file was generated by an older version of protoc which is +#error incompatible with your Protocol Buffer headers. Please +#error regenerate this file with a newer version of protoc. +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include // IWYU pragma: export +#include // IWYU pragma: export +#include +#include +#include +#include "xla/service/hlo.pb.h" +// @@protoc_insertion_point(includes) +#include +#define PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2fprotobuf_2ftpu_2foptimization_5fparameters_2eproto +PROTOBUF_NAMESPACE_OPEN +namespace internal { +class AnyMetadata; +} // namespace internal +PROTOBUF_NAMESPACE_CLOSE + +// Internal implementation detail -- do not use these members. +struct TableStruct_tensorflow_2fcore_2fprotobuf_2ftpu_2foptimization_5fparameters_2eproto { + static const uint32_t offsets[]; +}; +extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_tensorflow_2fcore_2fprotobuf_2ftpu_2foptimization_5fparameters_2eproto; +namespace tensorflow { +namespace tpu { +class AdadeltaParameters; +struct AdadeltaParametersDefaultTypeInternal; +extern AdadeltaParametersDefaultTypeInternal _AdadeltaParameters_default_instance_; +class AdagradMomentumParameters; +struct AdagradMomentumParametersDefaultTypeInternal; +extern AdagradMomentumParametersDefaultTypeInternal _AdagradMomentumParameters_default_instance_; +class AdagradParameters; +struct AdagradParametersDefaultTypeInternal; +extern AdagradParametersDefaultTypeInternal _AdagradParameters_default_instance_; +class AdamParameters; +struct AdamParametersDefaultTypeInternal; +extern AdamParametersDefaultTypeInternal _AdamParameters_default_instance_; +class AssignParameters; +struct AssignParametersDefaultTypeInternal; +extern AssignParametersDefaultTypeInternal _AssignParameters_default_instance_; +class BoundedAdagradParameters; +struct BoundedAdagradParametersDefaultTypeInternal; +extern BoundedAdagradParametersDefaultTypeInternal _BoundedAdagradParameters_default_instance_; +class CenteredRmsPropParameters; +struct CenteredRmsPropParametersDefaultTypeInternal; +extern CenteredRmsPropParametersDefaultTypeInternal _CenteredRmsPropParameters_default_instance_; +class ClippingLimits; +struct ClippingLimitsDefaultTypeInternal; +extern ClippingLimitsDefaultTypeInternal _ClippingLimits_default_instance_; +class DynamicLearningRate; +struct DynamicLearningRateDefaultTypeInternal; +extern DynamicLearningRateDefaultTypeInternal _DynamicLearningRate_default_instance_; +class FrequencyEstimatorParameters; +struct FrequencyEstimatorParametersDefaultTypeInternal; +extern FrequencyEstimatorParametersDefaultTypeInternal _FrequencyEstimatorParameters_default_instance_; +class FtrlParameters; +struct FtrlParametersDefaultTypeInternal; +extern FtrlParametersDefaultTypeInternal _FtrlParameters_default_instance_; +class GradientAccumulationStatus; +struct GradientAccumulationStatusDefaultTypeInternal; +extern GradientAccumulationStatusDefaultTypeInternal _GradientAccumulationStatus_default_instance_; +class HotIdReplicationConfiguration; +struct HotIdReplicationConfigurationDefaultTypeInternal; +extern HotIdReplicationConfigurationDefaultTypeInternal _HotIdReplicationConfiguration_default_instance_; +class LearningRate; +struct LearningRateDefaultTypeInternal; +extern LearningRateDefaultTypeInternal _LearningRate_default_instance_; +class LionParameters; +struct LionParametersDefaultTypeInternal; +extern LionParametersDefaultTypeInternal _LionParameters_default_instance_; +class LowDimensionalPackingStatus; +struct LowDimensionalPackingStatusDefaultTypeInternal; +extern LowDimensionalPackingStatusDefaultTypeInternal _LowDimensionalPackingStatus_default_instance_; +class MdlAdagradLightParameters; +struct MdlAdagradLightParametersDefaultTypeInternal; +extern MdlAdagradLightParametersDefaultTypeInternal _MdlAdagradLightParameters_default_instance_; +class MomentumParameters; +struct MomentumParametersDefaultTypeInternal; +extern MomentumParametersDefaultTypeInternal _MomentumParameters_default_instance_; +class OnlineYogiParameters; +struct OnlineYogiParametersDefaultTypeInternal; +extern OnlineYogiParametersDefaultTypeInternal _OnlineYogiParameters_default_instance_; +class OptimizationParameters; +struct OptimizationParametersDefaultTypeInternal; +extern OptimizationParametersDefaultTypeInternal _OptimizationParameters_default_instance_; +class ProximalAdagradParameters; +struct ProximalAdagradParametersDefaultTypeInternal; +extern ProximalAdagradParametersDefaultTypeInternal _ProximalAdagradParameters_default_instance_; +class ProximalYogiParameters; +struct ProximalYogiParametersDefaultTypeInternal; +extern ProximalYogiParametersDefaultTypeInternal _ProximalYogiParameters_default_instance_; +class RmsPropParameters; +struct RmsPropParametersDefaultTypeInternal; +extern RmsPropParametersDefaultTypeInternal _RmsPropParameters_default_instance_; +class SimulatedQuantization; +struct SimulatedQuantizationDefaultTypeInternal; +extern SimulatedQuantizationDefaultTypeInternal _SimulatedQuantization_default_instance_; +class StateVariableSpecification; +struct StateVariableSpecificationDefaultTypeInternal; +extern StateVariableSpecificationDefaultTypeInternal _StateVariableSpecification_default_instance_; +class StateVariableSpecification_FillWithConstant; +struct StateVariableSpecification_FillWithConstantDefaultTypeInternal; +extern StateVariableSpecification_FillWithConstantDefaultTypeInternal _StateVariableSpecification_FillWithConstant_default_instance_; +class StateVariableSpecification_UserDefined; +struct StateVariableSpecification_UserDefinedDefaultTypeInternal; +extern StateVariableSpecification_UserDefinedDefaultTypeInternal _StateVariableSpecification_UserDefined_default_instance_; +class StochasticGradientDescentParameters; +struct StochasticGradientDescentParametersDefaultTypeInternal; +extern StochasticGradientDescentParametersDefaultTypeInternal _StochasticGradientDescentParameters_default_instance_; +class UserDefinedProgramParameters; +struct UserDefinedProgramParametersDefaultTypeInternal; +extern UserDefinedProgramParametersDefaultTypeInternal _UserDefinedProgramParameters_default_instance_; +} // namespace tpu +} // namespace tensorflow +PROTOBUF_NAMESPACE_OPEN +template<> ::tensorflow::tpu::AdadeltaParameters* Arena::CreateMaybeMessage<::tensorflow::tpu::AdadeltaParameters>(Arena*); +template<> ::tensorflow::tpu::AdagradMomentumParameters* Arena::CreateMaybeMessage<::tensorflow::tpu::AdagradMomentumParameters>(Arena*); +template<> ::tensorflow::tpu::AdagradParameters* Arena::CreateMaybeMessage<::tensorflow::tpu::AdagradParameters>(Arena*); +template<> ::tensorflow::tpu::AdamParameters* Arena::CreateMaybeMessage<::tensorflow::tpu::AdamParameters>(Arena*); +template<> ::tensorflow::tpu::AssignParameters* Arena::CreateMaybeMessage<::tensorflow::tpu::AssignParameters>(Arena*); +template<> ::tensorflow::tpu::BoundedAdagradParameters* Arena::CreateMaybeMessage<::tensorflow::tpu::BoundedAdagradParameters>(Arena*); +template<> ::tensorflow::tpu::CenteredRmsPropParameters* Arena::CreateMaybeMessage<::tensorflow::tpu::CenteredRmsPropParameters>(Arena*); +template<> ::tensorflow::tpu::ClippingLimits* Arena::CreateMaybeMessage<::tensorflow::tpu::ClippingLimits>(Arena*); +template<> ::tensorflow::tpu::DynamicLearningRate* Arena::CreateMaybeMessage<::tensorflow::tpu::DynamicLearningRate>(Arena*); +template<> ::tensorflow::tpu::FrequencyEstimatorParameters* Arena::CreateMaybeMessage<::tensorflow::tpu::FrequencyEstimatorParameters>(Arena*); +template<> ::tensorflow::tpu::FtrlParameters* Arena::CreateMaybeMessage<::tensorflow::tpu::FtrlParameters>(Arena*); +template<> ::tensorflow::tpu::GradientAccumulationStatus* Arena::CreateMaybeMessage<::tensorflow::tpu::GradientAccumulationStatus>(Arena*); +template<> ::tensorflow::tpu::HotIdReplicationConfiguration* Arena::CreateMaybeMessage<::tensorflow::tpu::HotIdReplicationConfiguration>(Arena*); +template<> ::tensorflow::tpu::LearningRate* Arena::CreateMaybeMessage<::tensorflow::tpu::LearningRate>(Arena*); +template<> ::tensorflow::tpu::LionParameters* Arena::CreateMaybeMessage<::tensorflow::tpu::LionParameters>(Arena*); +template<> ::tensorflow::tpu::LowDimensionalPackingStatus* Arena::CreateMaybeMessage<::tensorflow::tpu::LowDimensionalPackingStatus>(Arena*); +template<> ::tensorflow::tpu::MdlAdagradLightParameters* Arena::CreateMaybeMessage<::tensorflow::tpu::MdlAdagradLightParameters>(Arena*); +template<> ::tensorflow::tpu::MomentumParameters* Arena::CreateMaybeMessage<::tensorflow::tpu::MomentumParameters>(Arena*); +template<> ::tensorflow::tpu::OnlineYogiParameters* Arena::CreateMaybeMessage<::tensorflow::tpu::OnlineYogiParameters>(Arena*); +template<> ::tensorflow::tpu::OptimizationParameters* Arena::CreateMaybeMessage<::tensorflow::tpu::OptimizationParameters>(Arena*); +template<> ::tensorflow::tpu::ProximalAdagradParameters* Arena::CreateMaybeMessage<::tensorflow::tpu::ProximalAdagradParameters>(Arena*); +template<> ::tensorflow::tpu::ProximalYogiParameters* Arena::CreateMaybeMessage<::tensorflow::tpu::ProximalYogiParameters>(Arena*); +template<> ::tensorflow::tpu::RmsPropParameters* Arena::CreateMaybeMessage<::tensorflow::tpu::RmsPropParameters>(Arena*); +template<> ::tensorflow::tpu::SimulatedQuantization* Arena::CreateMaybeMessage<::tensorflow::tpu::SimulatedQuantization>(Arena*); +template<> ::tensorflow::tpu::StateVariableSpecification* Arena::CreateMaybeMessage<::tensorflow::tpu::StateVariableSpecification>(Arena*); +template<> ::tensorflow::tpu::StateVariableSpecification_FillWithConstant* Arena::CreateMaybeMessage<::tensorflow::tpu::StateVariableSpecification_FillWithConstant>(Arena*); +template<> ::tensorflow::tpu::StateVariableSpecification_UserDefined* Arena::CreateMaybeMessage<::tensorflow::tpu::StateVariableSpecification_UserDefined>(Arena*); +template<> ::tensorflow::tpu::StochasticGradientDescentParameters* Arena::CreateMaybeMessage<::tensorflow::tpu::StochasticGradientDescentParameters>(Arena*); +template<> ::tensorflow::tpu::UserDefinedProgramParameters* Arena::CreateMaybeMessage<::tensorflow::tpu::UserDefinedProgramParameters>(Arena*); +PROTOBUF_NAMESPACE_CLOSE +namespace tensorflow { +namespace tpu { + +enum GradientAccumulationStatus_Status : int { + GradientAccumulationStatus_Status_UNSPECIFIED = 0, + GradientAccumulationStatus_Status_ENABLED = 1, + GradientAccumulationStatus_Status_DISABLED = 2, + GradientAccumulationStatus_Status_GradientAccumulationStatus_Status_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits::min(), + GradientAccumulationStatus_Status_GradientAccumulationStatus_Status_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits::max() +}; +bool GradientAccumulationStatus_Status_IsValid(int value); +constexpr GradientAccumulationStatus_Status GradientAccumulationStatus_Status_Status_MIN = GradientAccumulationStatus_Status_UNSPECIFIED; +constexpr GradientAccumulationStatus_Status GradientAccumulationStatus_Status_Status_MAX = GradientAccumulationStatus_Status_DISABLED; +constexpr int GradientAccumulationStatus_Status_Status_ARRAYSIZE = GradientAccumulationStatus_Status_Status_MAX + 1; + +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* GradientAccumulationStatus_Status_descriptor(); +template +inline const std::string& GradientAccumulationStatus_Status_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function GradientAccumulationStatus_Status_Name."); + return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( + GradientAccumulationStatus_Status_descriptor(), enum_t_value); +} +inline bool GradientAccumulationStatus_Status_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, GradientAccumulationStatus_Status* value) { + return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( + GradientAccumulationStatus_Status_descriptor(), name, value); +} +enum LowDimensionalPackingStatus_Status : int { + LowDimensionalPackingStatus_Status_UNSPECIFIED = 0, + LowDimensionalPackingStatus_Status_ENABLED = 1, + LowDimensionalPackingStatus_Status_DISABLED = 2, + LowDimensionalPackingStatus_Status_LowDimensionalPackingStatus_Status_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits::min(), + LowDimensionalPackingStatus_Status_LowDimensionalPackingStatus_Status_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits::max() +}; +bool LowDimensionalPackingStatus_Status_IsValid(int value); +constexpr LowDimensionalPackingStatus_Status LowDimensionalPackingStatus_Status_Status_MIN = LowDimensionalPackingStatus_Status_UNSPECIFIED; +constexpr LowDimensionalPackingStatus_Status LowDimensionalPackingStatus_Status_Status_MAX = LowDimensionalPackingStatus_Status_DISABLED; +constexpr int LowDimensionalPackingStatus_Status_Status_ARRAYSIZE = LowDimensionalPackingStatus_Status_Status_MAX + 1; + +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* LowDimensionalPackingStatus_Status_descriptor(); +template +inline const std::string& LowDimensionalPackingStatus_Status_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function LowDimensionalPackingStatus_Status_Name."); + return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( + LowDimensionalPackingStatus_Status_descriptor(), enum_t_value); +} +inline bool LowDimensionalPackingStatus_Status_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, LowDimensionalPackingStatus_Status* value) { + return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( + LowDimensionalPackingStatus_Status_descriptor(), name, value); +} +enum HotIdReplicationConfiguration_Status : int { + HotIdReplicationConfiguration_Status_UNSPECIFIED = 0, + HotIdReplicationConfiguration_Status_ENABLED = 1, + HotIdReplicationConfiguration_Status_DISABLED = 2, + HotIdReplicationConfiguration_Status_MIGRATION_ONLY = 3, + HotIdReplicationConfiguration_Status_HotIdReplicationConfiguration_Status_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits::min(), + HotIdReplicationConfiguration_Status_HotIdReplicationConfiguration_Status_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits::max() +}; +bool HotIdReplicationConfiguration_Status_IsValid(int value); +constexpr HotIdReplicationConfiguration_Status HotIdReplicationConfiguration_Status_Status_MIN = HotIdReplicationConfiguration_Status_UNSPECIFIED; +constexpr HotIdReplicationConfiguration_Status HotIdReplicationConfiguration_Status_Status_MAX = HotIdReplicationConfiguration_Status_MIGRATION_ONLY; +constexpr int HotIdReplicationConfiguration_Status_Status_ARRAYSIZE = HotIdReplicationConfiguration_Status_Status_MAX + 1; + +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* HotIdReplicationConfiguration_Status_descriptor(); +template +inline const std::string& HotIdReplicationConfiguration_Status_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function HotIdReplicationConfiguration_Status_Name."); + return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( + HotIdReplicationConfiguration_Status_descriptor(), enum_t_value); +} +inline bool HotIdReplicationConfiguration_Status_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, HotIdReplicationConfiguration_Status* value) { + return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( + HotIdReplicationConfiguration_Status_descriptor(), name, value); +} +// =================================================================== + +class ClippingLimits final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.tpu.ClippingLimits) */ { + public: + inline ClippingLimits() : ClippingLimits(nullptr) {} + ~ClippingLimits() override; + explicit PROTOBUF_CONSTEXPR ClippingLimits(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + ClippingLimits(const ClippingLimits& from); + ClippingLimits(ClippingLimits&& from) noexcept + : ClippingLimits() { + *this = ::std::move(from); + } + + inline ClippingLimits& operator=(const ClippingLimits& from) { + CopyFrom(from); + return *this; + } + inline ClippingLimits& operator=(ClippingLimits&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const ClippingLimits& default_instance() { + return *internal_default_instance(); + } + static inline const ClippingLimits* internal_default_instance() { + return reinterpret_cast( + &_ClippingLimits_default_instance_); + } + static constexpr int kIndexInFileMessages = + 0; + + friend void swap(ClippingLimits& a, ClippingLimits& b) { + a.Swap(&b); + } + inline void Swap(ClippingLimits* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(ClippingLimits* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + ClippingLimits* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const ClippingLimits& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const ClippingLimits& from) { + ClippingLimits::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(ClippingLimits* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.tpu.ClippingLimits"; + } + protected: + explicit ClippingLimits(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kLowerFieldNumber = 1, + kUpperFieldNumber = 2, + }; + // .google.protobuf.FloatValue lower = 1; + bool has_lower() const; + private: + bool _internal_has_lower() const; + public: + void clear_lower(); + const ::PROTOBUF_NAMESPACE_ID::FloatValue& lower() const; + PROTOBUF_NODISCARD ::PROTOBUF_NAMESPACE_ID::FloatValue* release_lower(); + ::PROTOBUF_NAMESPACE_ID::FloatValue* mutable_lower(); + void set_allocated_lower(::PROTOBUF_NAMESPACE_ID::FloatValue* lower); + private: + const ::PROTOBUF_NAMESPACE_ID::FloatValue& _internal_lower() const; + ::PROTOBUF_NAMESPACE_ID::FloatValue* _internal_mutable_lower(); + public: + void unsafe_arena_set_allocated_lower( + ::PROTOBUF_NAMESPACE_ID::FloatValue* lower); + ::PROTOBUF_NAMESPACE_ID::FloatValue* unsafe_arena_release_lower(); + + // .google.protobuf.FloatValue upper = 2; + bool has_upper() const; + private: + bool _internal_has_upper() const; + public: + void clear_upper(); + const ::PROTOBUF_NAMESPACE_ID::FloatValue& upper() const; + PROTOBUF_NODISCARD ::PROTOBUF_NAMESPACE_ID::FloatValue* release_upper(); + ::PROTOBUF_NAMESPACE_ID::FloatValue* mutable_upper(); + void set_allocated_upper(::PROTOBUF_NAMESPACE_ID::FloatValue* upper); + private: + const ::PROTOBUF_NAMESPACE_ID::FloatValue& _internal_upper() const; + ::PROTOBUF_NAMESPACE_ID::FloatValue* _internal_mutable_upper(); + public: + void unsafe_arena_set_allocated_upper( + ::PROTOBUF_NAMESPACE_ID::FloatValue* upper); + ::PROTOBUF_NAMESPACE_ID::FloatValue* unsafe_arena_release_upper(); + + // @@protoc_insertion_point(class_scope:tensorflow.tpu.ClippingLimits) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::FloatValue* lower_; + ::PROTOBUF_NAMESPACE_ID::FloatValue* upper_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2ftpu_2foptimization_5fparameters_2eproto; +}; +// ------------------------------------------------------------------- + +class SimulatedQuantization final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.tpu.SimulatedQuantization) */ { + public: + inline SimulatedQuantization() : SimulatedQuantization(nullptr) {} + ~SimulatedQuantization() override; + explicit PROTOBUF_CONSTEXPR SimulatedQuantization(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + SimulatedQuantization(const SimulatedQuantization& from); + SimulatedQuantization(SimulatedQuantization&& from) noexcept + : SimulatedQuantization() { + *this = ::std::move(from); + } + + inline SimulatedQuantization& operator=(const SimulatedQuantization& from) { + CopyFrom(from); + return *this; + } + inline SimulatedQuantization& operator=(SimulatedQuantization&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const SimulatedQuantization& default_instance() { + return *internal_default_instance(); + } + static inline const SimulatedQuantization* internal_default_instance() { + return reinterpret_cast( + &_SimulatedQuantization_default_instance_); + } + static constexpr int kIndexInFileMessages = + 1; + + friend void swap(SimulatedQuantization& a, SimulatedQuantization& b) { + a.Swap(&b); + } + inline void Swap(SimulatedQuantization* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(SimulatedQuantization* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + SimulatedQuantization* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const SimulatedQuantization& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const SimulatedQuantization& from) { + SimulatedQuantization::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(SimulatedQuantization* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.tpu.SimulatedQuantization"; + } + protected: + explicit SimulatedQuantization(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kClippingLimitsFieldNumber = 2, + kEnabledFieldNumber = 1, + kNumBucketsFieldNumber = 3, + }; + // .tensorflow.tpu.ClippingLimits clipping_limits = 2; + bool has_clipping_limits() const; + private: + bool _internal_has_clipping_limits() const; + public: + void clear_clipping_limits(); + const ::tensorflow::tpu::ClippingLimits& clipping_limits() const; + PROTOBUF_NODISCARD ::tensorflow::tpu::ClippingLimits* release_clipping_limits(); + ::tensorflow::tpu::ClippingLimits* mutable_clipping_limits(); + void set_allocated_clipping_limits(::tensorflow::tpu::ClippingLimits* clipping_limits); + private: + const ::tensorflow::tpu::ClippingLimits& _internal_clipping_limits() const; + ::tensorflow::tpu::ClippingLimits* _internal_mutable_clipping_limits(); + public: + void unsafe_arena_set_allocated_clipping_limits( + ::tensorflow::tpu::ClippingLimits* clipping_limits); + ::tensorflow::tpu::ClippingLimits* unsafe_arena_release_clipping_limits(); + + // bool enabled = 1; + void clear_enabled(); + bool enabled() const; + void set_enabled(bool value); + private: + bool _internal_enabled() const; + void _internal_set_enabled(bool value); + public: + + // int32 num_buckets = 3; + void clear_num_buckets(); + int32_t num_buckets() const; + void set_num_buckets(int32_t value); + private: + int32_t _internal_num_buckets() const; + void _internal_set_num_buckets(int32_t value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.tpu.SimulatedQuantization) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::tensorflow::tpu::ClippingLimits* clipping_limits_; + bool enabled_; + int32_t num_buckets_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2ftpu_2foptimization_5fparameters_2eproto; +}; +// ------------------------------------------------------------------- + +class DynamicLearningRate final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.tpu.DynamicLearningRate) */ { + public: + inline DynamicLearningRate() : DynamicLearningRate(nullptr) {} + ~DynamicLearningRate() override; + explicit PROTOBUF_CONSTEXPR DynamicLearningRate(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + DynamicLearningRate(const DynamicLearningRate& from); + DynamicLearningRate(DynamicLearningRate&& from) noexcept + : DynamicLearningRate() { + *this = ::std::move(from); + } + + inline DynamicLearningRate& operator=(const DynamicLearningRate& from) { + CopyFrom(from); + return *this; + } + inline DynamicLearningRate& operator=(DynamicLearningRate&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const DynamicLearningRate& default_instance() { + return *internal_default_instance(); + } + static inline const DynamicLearningRate* internal_default_instance() { + return reinterpret_cast( + &_DynamicLearningRate_default_instance_); + } + static constexpr int kIndexInFileMessages = + 2; + + friend void swap(DynamicLearningRate& a, DynamicLearningRate& b) { + a.Swap(&b); + } + inline void Swap(DynamicLearningRate* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(DynamicLearningRate* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + DynamicLearningRate* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const DynamicLearningRate& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const DynamicLearningRate& from) { + DynamicLearningRate::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(DynamicLearningRate* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.tpu.DynamicLearningRate"; + } + protected: + explicit DynamicLearningRate(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kTagFieldNumber = 1, + }; + // int32 tag = 1; + void clear_tag(); + int32_t tag() const; + void set_tag(int32_t value); + private: + int32_t _internal_tag() const; + void _internal_set_tag(int32_t value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.tpu.DynamicLearningRate) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + int32_t tag_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2ftpu_2foptimization_5fparameters_2eproto; +}; +// ------------------------------------------------------------------- + +class LearningRate final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.tpu.LearningRate) */ { + public: + inline LearningRate() : LearningRate(nullptr) {} + ~LearningRate() override; + explicit PROTOBUF_CONSTEXPR LearningRate(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + LearningRate(const LearningRate& from); + LearningRate(LearningRate&& from) noexcept + : LearningRate() { + *this = ::std::move(from); + } + + inline LearningRate& operator=(const LearningRate& from) { + CopyFrom(from); + return *this; + } + inline LearningRate& operator=(LearningRate&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const LearningRate& default_instance() { + return *internal_default_instance(); + } + enum LearningRateCase { + kConstant = 1, + kDynamic = 2, + LEARNING_RATE_NOT_SET = 0, + }; + + static inline const LearningRate* internal_default_instance() { + return reinterpret_cast( + &_LearningRate_default_instance_); + } + static constexpr int kIndexInFileMessages = + 3; + + friend void swap(LearningRate& a, LearningRate& b) { + a.Swap(&b); + } + inline void Swap(LearningRate* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(LearningRate* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + LearningRate* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const LearningRate& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const LearningRate& from) { + LearningRate::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(LearningRate* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.tpu.LearningRate"; + } + protected: + explicit LearningRate(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kConstantFieldNumber = 1, + kDynamicFieldNumber = 2, + }; + // float constant = 1; + bool has_constant() const; + private: + bool _internal_has_constant() const; + public: + void clear_constant(); + float constant() const; + void set_constant(float value); + private: + float _internal_constant() const; + void _internal_set_constant(float value); + public: + + // .tensorflow.tpu.DynamicLearningRate dynamic = 2; + bool has_dynamic() const; + private: + bool _internal_has_dynamic() const; + public: + void clear_dynamic(); + const ::tensorflow::tpu::DynamicLearningRate& dynamic() const; + PROTOBUF_NODISCARD ::tensorflow::tpu::DynamicLearningRate* release_dynamic(); + ::tensorflow::tpu::DynamicLearningRate* mutable_dynamic(); + void set_allocated_dynamic(::tensorflow::tpu::DynamicLearningRate* dynamic); + private: + const ::tensorflow::tpu::DynamicLearningRate& _internal_dynamic() const; + ::tensorflow::tpu::DynamicLearningRate* _internal_mutable_dynamic(); + public: + void unsafe_arena_set_allocated_dynamic( + ::tensorflow::tpu::DynamicLearningRate* dynamic); + ::tensorflow::tpu::DynamicLearningRate* unsafe_arena_release_dynamic(); + + void clear_learning_rate(); + LearningRateCase learning_rate_case() const; + // @@protoc_insertion_point(class_scope:tensorflow.tpu.LearningRate) + private: + class _Internal; + void set_has_constant(); + void set_has_dynamic(); + + inline bool has_learning_rate() const; + inline void clear_has_learning_rate(); + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + union LearningRateUnion { + constexpr LearningRateUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + float constant_; + ::tensorflow::tpu::DynamicLearningRate* dynamic_; + } learning_rate_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + uint32_t _oneof_case_[1]; + + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2ftpu_2foptimization_5fparameters_2eproto; +}; +// ------------------------------------------------------------------- + +class AdagradParameters final : + public ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase /* @@protoc_insertion_point(class_definition:tensorflow.tpu.AdagradParameters) */ { + public: + inline AdagradParameters() : AdagradParameters(nullptr) {} + explicit PROTOBUF_CONSTEXPR AdagradParameters(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + AdagradParameters(const AdagradParameters& from); + AdagradParameters(AdagradParameters&& from) noexcept + : AdagradParameters() { + *this = ::std::move(from); + } + + inline AdagradParameters& operator=(const AdagradParameters& from) { + CopyFrom(from); + return *this; + } + inline AdagradParameters& operator=(AdagradParameters&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const AdagradParameters& default_instance() { + return *internal_default_instance(); + } + static inline const AdagradParameters* internal_default_instance() { + return reinterpret_cast( + &_AdagradParameters_default_instance_); + } + static constexpr int kIndexInFileMessages = + 4; + + friend void swap(AdagradParameters& a, AdagradParameters& b) { + a.Swap(&b); + } + inline void Swap(AdagradParameters* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(AdagradParameters* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + AdagradParameters* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::CopyFrom; + inline void CopyFrom(const AdagradParameters& from) { + ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::CopyImpl(*this, from); + } + using ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::MergeFrom; + void MergeFrom(const AdagradParameters& from) { + ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::MergeImpl(*this, from); + } + public: + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.tpu.AdagradParameters"; + } + protected: + explicit AdagradParameters(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // @@protoc_insertion_point(class_scope:tensorflow.tpu.AdagradParameters) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2ftpu_2foptimization_5fparameters_2eproto; +}; +// ------------------------------------------------------------------- + +class AdagradMomentumParameters final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.tpu.AdagradMomentumParameters) */ { + public: + inline AdagradMomentumParameters() : AdagradMomentumParameters(nullptr) {} + ~AdagradMomentumParameters() override; + explicit PROTOBUF_CONSTEXPR AdagradMomentumParameters(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + AdagradMomentumParameters(const AdagradMomentumParameters& from); + AdagradMomentumParameters(AdagradMomentumParameters&& from) noexcept + : AdagradMomentumParameters() { + *this = ::std::move(from); + } + + inline AdagradMomentumParameters& operator=(const AdagradMomentumParameters& from) { + CopyFrom(from); + return *this; + } + inline AdagradMomentumParameters& operator=(AdagradMomentumParameters&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const AdagradMomentumParameters& default_instance() { + return *internal_default_instance(); + } + static inline const AdagradMomentumParameters* internal_default_instance() { + return reinterpret_cast( + &_AdagradMomentumParameters_default_instance_); + } + static constexpr int kIndexInFileMessages = + 5; + + friend void swap(AdagradMomentumParameters& a, AdagradMomentumParameters& b) { + a.Swap(&b); + } + inline void Swap(AdagradMomentumParameters* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(AdagradMomentumParameters* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + AdagradMomentumParameters* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const AdagradMomentumParameters& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const AdagradMomentumParameters& from) { + AdagradMomentumParameters::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(AdagradMomentumParameters* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.tpu.AdagradMomentumParameters"; + } + protected: + explicit AdagradMomentumParameters(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kMomentumFieldNumber = 1, + kUseNesterovFieldNumber = 2, + kExponentFieldNumber = 3, + kBeta2FieldNumber = 4, + kEpsilonFieldNumber = 5, + }; + // float momentum = 1; + void clear_momentum(); + float momentum() const; + void set_momentum(float value); + private: + float _internal_momentum() const; + void _internal_set_momentum(float value); + public: + + // bool use_nesterov = 2; + void clear_use_nesterov(); + bool use_nesterov() const; + void set_use_nesterov(bool value); + private: + bool _internal_use_nesterov() const; + void _internal_set_use_nesterov(bool value); + public: + + // float exponent = 3; + void clear_exponent(); + float exponent() const; + void set_exponent(float value); + private: + float _internal_exponent() const; + void _internal_set_exponent(float value); + public: + + // float beta2 = 4; + void clear_beta2(); + float beta2() const; + void set_beta2(float value); + private: + float _internal_beta2() const; + void _internal_set_beta2(float value); + public: + + // float epsilon = 5; + void clear_epsilon(); + float epsilon() const; + void set_epsilon(float value); + private: + float _internal_epsilon() const; + void _internal_set_epsilon(float value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.tpu.AdagradMomentumParameters) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + float momentum_; + bool use_nesterov_; + float exponent_; + float beta2_; + float epsilon_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2ftpu_2foptimization_5fparameters_2eproto; +}; +// ------------------------------------------------------------------- + +class BoundedAdagradParameters final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.tpu.BoundedAdagradParameters) */ { + public: + inline BoundedAdagradParameters() : BoundedAdagradParameters(nullptr) {} + ~BoundedAdagradParameters() override; + explicit PROTOBUF_CONSTEXPR BoundedAdagradParameters(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + BoundedAdagradParameters(const BoundedAdagradParameters& from); + BoundedAdagradParameters(BoundedAdagradParameters&& from) noexcept + : BoundedAdagradParameters() { + *this = ::std::move(from); + } + + inline BoundedAdagradParameters& operator=(const BoundedAdagradParameters& from) { + CopyFrom(from); + return *this; + } + inline BoundedAdagradParameters& operator=(BoundedAdagradParameters&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const BoundedAdagradParameters& default_instance() { + return *internal_default_instance(); + } + static inline const BoundedAdagradParameters* internal_default_instance() { + return reinterpret_cast( + &_BoundedAdagradParameters_default_instance_); + } + static constexpr int kIndexInFileMessages = + 6; + + friend void swap(BoundedAdagradParameters& a, BoundedAdagradParameters& b) { + a.Swap(&b); + } + inline void Swap(BoundedAdagradParameters* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(BoundedAdagradParameters* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + BoundedAdagradParameters* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const BoundedAdagradParameters& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const BoundedAdagradParameters& from) { + BoundedAdagradParameters::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(BoundedAdagradParameters* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.tpu.BoundedAdagradParameters"; + } + protected: + explicit BoundedAdagradParameters(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kUpdateAccumulatorFirstFieldNumber = 1, + kMaxVarUpdateFieldNumber = 2, + kMaxAccumulatorFieldNumber = 3, + }; + // bool update_accumulator_first = 1; + void clear_update_accumulator_first(); + bool update_accumulator_first() const; + void set_update_accumulator_first(bool value); + private: + bool _internal_update_accumulator_first() const; + void _internal_set_update_accumulator_first(bool value); + public: + + // float max_var_update = 2; + void clear_max_var_update(); + float max_var_update() const; + void set_max_var_update(float value); + private: + float _internal_max_var_update() const; + void _internal_set_max_var_update(float value); + public: + + // float max_accumulator = 3; + void clear_max_accumulator(); + float max_accumulator() const; + void set_max_accumulator(float value); + private: + float _internal_max_accumulator() const; + void _internal_set_max_accumulator(float value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.tpu.BoundedAdagradParameters) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + bool update_accumulator_first_; + float max_var_update_; + float max_accumulator_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2ftpu_2foptimization_5fparameters_2eproto; +}; +// ------------------------------------------------------------------- + +class StochasticGradientDescentParameters final : + public ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase /* @@protoc_insertion_point(class_definition:tensorflow.tpu.StochasticGradientDescentParameters) */ { + public: + inline StochasticGradientDescentParameters() : StochasticGradientDescentParameters(nullptr) {} + explicit PROTOBUF_CONSTEXPR StochasticGradientDescentParameters(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + StochasticGradientDescentParameters(const StochasticGradientDescentParameters& from); + StochasticGradientDescentParameters(StochasticGradientDescentParameters&& from) noexcept + : StochasticGradientDescentParameters() { + *this = ::std::move(from); + } + + inline StochasticGradientDescentParameters& operator=(const StochasticGradientDescentParameters& from) { + CopyFrom(from); + return *this; + } + inline StochasticGradientDescentParameters& operator=(StochasticGradientDescentParameters&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const StochasticGradientDescentParameters& default_instance() { + return *internal_default_instance(); + } + static inline const StochasticGradientDescentParameters* internal_default_instance() { + return reinterpret_cast( + &_StochasticGradientDescentParameters_default_instance_); + } + static constexpr int kIndexInFileMessages = + 7; + + friend void swap(StochasticGradientDescentParameters& a, StochasticGradientDescentParameters& b) { + a.Swap(&b); + } + inline void Swap(StochasticGradientDescentParameters* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(StochasticGradientDescentParameters* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + StochasticGradientDescentParameters* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::CopyFrom; + inline void CopyFrom(const StochasticGradientDescentParameters& from) { + ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::CopyImpl(*this, from); + } + using ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::MergeFrom; + void MergeFrom(const StochasticGradientDescentParameters& from) { + ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::MergeImpl(*this, from); + } + public: + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.tpu.StochasticGradientDescentParameters"; + } + protected: + explicit StochasticGradientDescentParameters(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // @@protoc_insertion_point(class_scope:tensorflow.tpu.StochasticGradientDescentParameters) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2ftpu_2foptimization_5fparameters_2eproto; +}; +// ------------------------------------------------------------------- + +class FtrlParameters final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.tpu.FtrlParameters) */ { + public: + inline FtrlParameters() : FtrlParameters(nullptr) {} + ~FtrlParameters() override; + explicit PROTOBUF_CONSTEXPR FtrlParameters(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + FtrlParameters(const FtrlParameters& from); + FtrlParameters(FtrlParameters&& from) noexcept + : FtrlParameters() { + *this = ::std::move(from); + } + + inline FtrlParameters& operator=(const FtrlParameters& from) { + CopyFrom(from); + return *this; + } + inline FtrlParameters& operator=(FtrlParameters&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const FtrlParameters& default_instance() { + return *internal_default_instance(); + } + static inline const FtrlParameters* internal_default_instance() { + return reinterpret_cast( + &_FtrlParameters_default_instance_); + } + static constexpr int kIndexInFileMessages = + 8; + + friend void swap(FtrlParameters& a, FtrlParameters& b) { + a.Swap(&b); + } + inline void Swap(FtrlParameters* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(FtrlParameters* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + FtrlParameters* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const FtrlParameters& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const FtrlParameters& from) { + FtrlParameters::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(FtrlParameters* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.tpu.FtrlParameters"; + } + protected: + explicit FtrlParameters(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kL1FieldNumber = 1, + kL2FieldNumber = 2, + kLrPowerFieldNumber = 3, + kBetaFieldNumber = 7, + kMultiplyLinearByLrFieldNumber = 6, + kAllowZeroAccumulatorFieldNumber = 8, + }; + // float l1 = 1; + void clear_l1(); + float l1() const; + void set_l1(float value); + private: + float _internal_l1() const; + void _internal_set_l1(float value); + public: + + // float l2 = 2; + void clear_l2(); + float l2() const; + void set_l2(float value); + private: + float _internal_l2() const; + void _internal_set_l2(float value); + public: + + // float lr_power = 3; + void clear_lr_power(); + float lr_power() const; + void set_lr_power(float value); + private: + float _internal_lr_power() const; + void _internal_set_lr_power(float value); + public: + + // float beta = 7; + void clear_beta(); + float beta() const; + void set_beta(float value); + private: + float _internal_beta() const; + void _internal_set_beta(float value); + public: + + // bool multiply_linear_by_lr = 6; + void clear_multiply_linear_by_lr(); + bool multiply_linear_by_lr() const; + void set_multiply_linear_by_lr(bool value); + private: + bool _internal_multiply_linear_by_lr() const; + void _internal_set_multiply_linear_by_lr(bool value); + public: + + // bool allow_zero_accumulator = 8 [deprecated = true]; + PROTOBUF_DEPRECATED void clear_allow_zero_accumulator(); + PROTOBUF_DEPRECATED bool allow_zero_accumulator() const; + PROTOBUF_DEPRECATED void set_allow_zero_accumulator(bool value); + private: + bool _internal_allow_zero_accumulator() const; + void _internal_set_allow_zero_accumulator(bool value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.tpu.FtrlParameters) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + float l1_; + float l2_; + float lr_power_; + float beta_; + bool multiply_linear_by_lr_; + bool allow_zero_accumulator_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2ftpu_2foptimization_5fparameters_2eproto; +}; +// ------------------------------------------------------------------- + +class AdamParameters final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.tpu.AdamParameters) */ { + public: + inline AdamParameters() : AdamParameters(nullptr) {} + ~AdamParameters() override; + explicit PROTOBUF_CONSTEXPR AdamParameters(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + AdamParameters(const AdamParameters& from); + AdamParameters(AdamParameters&& from) noexcept + : AdamParameters() { + *this = ::std::move(from); + } + + inline AdamParameters& operator=(const AdamParameters& from) { + CopyFrom(from); + return *this; + } + inline AdamParameters& operator=(AdamParameters&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const AdamParameters& default_instance() { + return *internal_default_instance(); + } + static inline const AdamParameters* internal_default_instance() { + return reinterpret_cast( + &_AdamParameters_default_instance_); + } + static constexpr int kIndexInFileMessages = + 9; + + friend void swap(AdamParameters& a, AdamParameters& b) { + a.Swap(&b); + } + inline void Swap(AdamParameters* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(AdamParameters* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + AdamParameters* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const AdamParameters& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const AdamParameters& from) { + AdamParameters::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(AdamParameters* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.tpu.AdamParameters"; + } + protected: + explicit AdamParameters(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kBeta1FieldNumber = 3, + kBeta2FieldNumber = 4, + kEpsilonFieldNumber = 5, + kUseNonLazyAdamFieldNumber = 8, + kUseSumInsideSqrtFieldNumber = 10, + }; + // float beta1 = 3; + void clear_beta1(); + float beta1() const; + void set_beta1(float value); + private: + float _internal_beta1() const; + void _internal_set_beta1(float value); + public: + + // float beta2 = 4; + void clear_beta2(); + float beta2() const; + void set_beta2(float value); + private: + float _internal_beta2() const; + void _internal_set_beta2(float value); + public: + + // float epsilon = 5; + void clear_epsilon(); + float epsilon() const; + void set_epsilon(float value); + private: + float _internal_epsilon() const; + void _internal_set_epsilon(float value); + public: + + // bool use_non_lazy_adam = 8; + void clear_use_non_lazy_adam(); + bool use_non_lazy_adam() const; + void set_use_non_lazy_adam(bool value); + private: + bool _internal_use_non_lazy_adam() const; + void _internal_set_use_non_lazy_adam(bool value); + public: + + // bool use_sum_inside_sqrt = 10; + void clear_use_sum_inside_sqrt(); + bool use_sum_inside_sqrt() const; + void set_use_sum_inside_sqrt(bool value); + private: + bool _internal_use_sum_inside_sqrt() const; + void _internal_set_use_sum_inside_sqrt(bool value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.tpu.AdamParameters) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + float beta1_; + float beta2_; + float epsilon_; + bool use_non_lazy_adam_; + bool use_sum_inside_sqrt_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2ftpu_2foptimization_5fparameters_2eproto; +}; +// ------------------------------------------------------------------- + +class MomentumParameters final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.tpu.MomentumParameters) */ { + public: + inline MomentumParameters() : MomentumParameters(nullptr) {} + ~MomentumParameters() override; + explicit PROTOBUF_CONSTEXPR MomentumParameters(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + MomentumParameters(const MomentumParameters& from); + MomentumParameters(MomentumParameters&& from) noexcept + : MomentumParameters() { + *this = ::std::move(from); + } + + inline MomentumParameters& operator=(const MomentumParameters& from) { + CopyFrom(from); + return *this; + } + inline MomentumParameters& operator=(MomentumParameters&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const MomentumParameters& default_instance() { + return *internal_default_instance(); + } + static inline const MomentumParameters* internal_default_instance() { + return reinterpret_cast( + &_MomentumParameters_default_instance_); + } + static constexpr int kIndexInFileMessages = + 10; + + friend void swap(MomentumParameters& a, MomentumParameters& b) { + a.Swap(&b); + } + inline void Swap(MomentumParameters* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(MomentumParameters* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + MomentumParameters* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const MomentumParameters& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const MomentumParameters& from) { + MomentumParameters::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(MomentumParameters* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.tpu.MomentumParameters"; + } + protected: + explicit MomentumParameters(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kMomentumFieldNumber = 1, + kUseNesterovFieldNumber = 2, + }; + // float momentum = 1; + void clear_momentum(); + float momentum() const; + void set_momentum(float value); + private: + float _internal_momentum() const; + void _internal_set_momentum(float value); + public: + + // bool use_nesterov = 2; + void clear_use_nesterov(); + bool use_nesterov() const; + void set_use_nesterov(bool value); + private: + bool _internal_use_nesterov() const; + void _internal_set_use_nesterov(bool value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.tpu.MomentumParameters) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + float momentum_; + bool use_nesterov_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2ftpu_2foptimization_5fparameters_2eproto; +}; +// ------------------------------------------------------------------- + +class LionParameters final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.tpu.LionParameters) */ { + public: + inline LionParameters() : LionParameters(nullptr) {} + ~LionParameters() override; + explicit PROTOBUF_CONSTEXPR LionParameters(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + LionParameters(const LionParameters& from); + LionParameters(LionParameters&& from) noexcept + : LionParameters() { + *this = ::std::move(from); + } + + inline LionParameters& operator=(const LionParameters& from) { + CopyFrom(from); + return *this; + } + inline LionParameters& operator=(LionParameters&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const LionParameters& default_instance() { + return *internal_default_instance(); + } + static inline const LionParameters* internal_default_instance() { + return reinterpret_cast( + &_LionParameters_default_instance_); + } + static constexpr int kIndexInFileMessages = + 11; + + friend void swap(LionParameters& a, LionParameters& b) { + a.Swap(&b); + } + inline void Swap(LionParameters* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(LionParameters* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + LionParameters* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const LionParameters& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const LionParameters& from) { + LionParameters::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(LionParameters* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.tpu.LionParameters"; + } + protected: + explicit LionParameters(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kBeta1FieldNumber = 1, + kBeta2FieldNumber = 2, + kUseNonLazyLionFieldNumber = 3, + }; + // float beta1 = 1; + void clear_beta1(); + float beta1() const; + void set_beta1(float value); + private: + float _internal_beta1() const; + void _internal_set_beta1(float value); + public: + + // float beta2 = 2; + void clear_beta2(); + float beta2() const; + void set_beta2(float value); + private: + float _internal_beta2() const; + void _internal_set_beta2(float value); + public: + + // bool use_non_lazy_lion = 3; + void clear_use_non_lazy_lion(); + bool use_non_lazy_lion() const; + void set_use_non_lazy_lion(bool value); + private: + bool _internal_use_non_lazy_lion() const; + void _internal_set_use_non_lazy_lion(bool value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.tpu.LionParameters) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + float beta1_; + float beta2_; + bool use_non_lazy_lion_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2ftpu_2foptimization_5fparameters_2eproto; +}; +// ------------------------------------------------------------------- + +class RmsPropParameters final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.tpu.RmsPropParameters) */ { + public: + inline RmsPropParameters() : RmsPropParameters(nullptr) {} + ~RmsPropParameters() override; + explicit PROTOBUF_CONSTEXPR RmsPropParameters(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + RmsPropParameters(const RmsPropParameters& from); + RmsPropParameters(RmsPropParameters&& from) noexcept + : RmsPropParameters() { + *this = ::std::move(from); + } + + inline RmsPropParameters& operator=(const RmsPropParameters& from) { + CopyFrom(from); + return *this; + } + inline RmsPropParameters& operator=(RmsPropParameters&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const RmsPropParameters& default_instance() { + return *internal_default_instance(); + } + static inline const RmsPropParameters* internal_default_instance() { + return reinterpret_cast( + &_RmsPropParameters_default_instance_); + } + static constexpr int kIndexInFileMessages = + 12; + + friend void swap(RmsPropParameters& a, RmsPropParameters& b) { + a.Swap(&b); + } + inline void Swap(RmsPropParameters* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(RmsPropParameters* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + RmsPropParameters* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const RmsPropParameters& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const RmsPropParameters& from) { + RmsPropParameters::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(RmsPropParameters* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.tpu.RmsPropParameters"; + } + protected: + explicit RmsPropParameters(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kRhoFieldNumber = 1, + kMomentumFieldNumber = 2, + kEpsilonFieldNumber = 3, + }; + // float rho = 1; + void clear_rho(); + float rho() const; + void set_rho(float value); + private: + float _internal_rho() const; + void _internal_set_rho(float value); + public: + + // float momentum = 2; + void clear_momentum(); + float momentum() const; + void set_momentum(float value); + private: + float _internal_momentum() const; + void _internal_set_momentum(float value); + public: + + // float epsilon = 3; + void clear_epsilon(); + float epsilon() const; + void set_epsilon(float value); + private: + float _internal_epsilon() const; + void _internal_set_epsilon(float value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.tpu.RmsPropParameters) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + float rho_; + float momentum_; + float epsilon_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2ftpu_2foptimization_5fparameters_2eproto; +}; +// ------------------------------------------------------------------- + +class CenteredRmsPropParameters final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.tpu.CenteredRmsPropParameters) */ { + public: + inline CenteredRmsPropParameters() : CenteredRmsPropParameters(nullptr) {} + ~CenteredRmsPropParameters() override; + explicit PROTOBUF_CONSTEXPR CenteredRmsPropParameters(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + CenteredRmsPropParameters(const CenteredRmsPropParameters& from); + CenteredRmsPropParameters(CenteredRmsPropParameters&& from) noexcept + : CenteredRmsPropParameters() { + *this = ::std::move(from); + } + + inline CenteredRmsPropParameters& operator=(const CenteredRmsPropParameters& from) { + CopyFrom(from); + return *this; + } + inline CenteredRmsPropParameters& operator=(CenteredRmsPropParameters&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const CenteredRmsPropParameters& default_instance() { + return *internal_default_instance(); + } + static inline const CenteredRmsPropParameters* internal_default_instance() { + return reinterpret_cast( + &_CenteredRmsPropParameters_default_instance_); + } + static constexpr int kIndexInFileMessages = + 13; + + friend void swap(CenteredRmsPropParameters& a, CenteredRmsPropParameters& b) { + a.Swap(&b); + } + inline void Swap(CenteredRmsPropParameters* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(CenteredRmsPropParameters* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + CenteredRmsPropParameters* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const CenteredRmsPropParameters& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const CenteredRmsPropParameters& from) { + CenteredRmsPropParameters::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(CenteredRmsPropParameters* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.tpu.CenteredRmsPropParameters"; + } + protected: + explicit CenteredRmsPropParameters(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kRhoFieldNumber = 1, + kMomentumFieldNumber = 2, + kEpsilonFieldNumber = 3, + }; + // float rho = 1; + void clear_rho(); + float rho() const; + void set_rho(float value); + private: + float _internal_rho() const; + void _internal_set_rho(float value); + public: + + // float momentum = 2; + void clear_momentum(); + float momentum() const; + void set_momentum(float value); + private: + float _internal_momentum() const; + void _internal_set_momentum(float value); + public: + + // float epsilon = 3; + void clear_epsilon(); + float epsilon() const; + void set_epsilon(float value); + private: + float _internal_epsilon() const; + void _internal_set_epsilon(float value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.tpu.CenteredRmsPropParameters) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + float rho_; + float momentum_; + float epsilon_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2ftpu_2foptimization_5fparameters_2eproto; +}; +// ------------------------------------------------------------------- + +class MdlAdagradLightParameters final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.tpu.MdlAdagradLightParameters) */ { + public: + inline MdlAdagradLightParameters() : MdlAdagradLightParameters(nullptr) {} + ~MdlAdagradLightParameters() override; + explicit PROTOBUF_CONSTEXPR MdlAdagradLightParameters(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + MdlAdagradLightParameters(const MdlAdagradLightParameters& from); + MdlAdagradLightParameters(MdlAdagradLightParameters&& from) noexcept + : MdlAdagradLightParameters() { + *this = ::std::move(from); + } + + inline MdlAdagradLightParameters& operator=(const MdlAdagradLightParameters& from) { + CopyFrom(from); + return *this; + } + inline MdlAdagradLightParameters& operator=(MdlAdagradLightParameters&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const MdlAdagradLightParameters& default_instance() { + return *internal_default_instance(); + } + static inline const MdlAdagradLightParameters* internal_default_instance() { + return reinterpret_cast( + &_MdlAdagradLightParameters_default_instance_); + } + static constexpr int kIndexInFileMessages = + 14; + + friend void swap(MdlAdagradLightParameters& a, MdlAdagradLightParameters& b) { + a.Swap(&b); + } + inline void Swap(MdlAdagradLightParameters* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(MdlAdagradLightParameters* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + MdlAdagradLightParameters* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const MdlAdagradLightParameters& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const MdlAdagradLightParameters& from) { + MdlAdagradLightParameters::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(MdlAdagradLightParameters* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.tpu.MdlAdagradLightParameters"; + } + protected: + explicit MdlAdagradLightParameters(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kL2FieldNumber = 1, + kLrPowerFieldNumber = 2, + kMinServableMdlBenefitFieldNumber = 3, + kMdlMixInMarginFieldNumber = 4, + kMdlBenefitRampupCoeffFieldNumber = 5, + kMdlMinWeightFieldNumber = 6, + kBenefitRevisitScaleFieldNumber = 7, + kMaxEventBenefitFieldNumber = 8, + kMaxTotalBenefitFieldNumber = 9, + kMdlHardLimitFieldNumber = 10, + kHardLimitMinBenefitFieldNumber = 11, + kMdlRegularizeFieldNumber = 12, + }; + // float l2 = 1; + void clear_l2(); + float l2() const; + void set_l2(float value); + private: + float _internal_l2() const; + void _internal_set_l2(float value); + public: + + // float lr_power = 2; + void clear_lr_power(); + float lr_power() const; + void set_lr_power(float value); + private: + float _internal_lr_power() const; + void _internal_set_lr_power(float value); + public: + + // float min_servable_mdl_benefit = 3; + void clear_min_servable_mdl_benefit(); + float min_servable_mdl_benefit() const; + void set_min_servable_mdl_benefit(float value); + private: + float _internal_min_servable_mdl_benefit() const; + void _internal_set_min_servable_mdl_benefit(float value); + public: + + // float mdl_mix_in_margin = 4; + void clear_mdl_mix_in_margin(); + float mdl_mix_in_margin() const; + void set_mdl_mix_in_margin(float value); + private: + float _internal_mdl_mix_in_margin() const; + void _internal_set_mdl_mix_in_margin(float value); + public: + + // float mdl_benefit_rampup_coeff = 5; + void clear_mdl_benefit_rampup_coeff(); + float mdl_benefit_rampup_coeff() const; + void set_mdl_benefit_rampup_coeff(float value); + private: + float _internal_mdl_benefit_rampup_coeff() const; + void _internal_set_mdl_benefit_rampup_coeff(float value); + public: + + // float mdl_min_weight = 6; + void clear_mdl_min_weight(); + float mdl_min_weight() const; + void set_mdl_min_weight(float value); + private: + float _internal_mdl_min_weight() const; + void _internal_set_mdl_min_weight(float value); + public: + + // float benefit_revisit_scale = 7; + void clear_benefit_revisit_scale(); + float benefit_revisit_scale() const; + void set_benefit_revisit_scale(float value); + private: + float _internal_benefit_revisit_scale() const; + void _internal_set_benefit_revisit_scale(float value); + public: + + // float max_event_benefit = 8; + void clear_max_event_benefit(); + float max_event_benefit() const; + void set_max_event_benefit(float value); + private: + float _internal_max_event_benefit() const; + void _internal_set_max_event_benefit(float value); + public: + + // float max_total_benefit = 9; + void clear_max_total_benefit(); + float max_total_benefit() const; + void set_max_total_benefit(float value); + private: + float _internal_max_total_benefit() const; + void _internal_set_max_total_benefit(float value); + public: + + // float mdl_hard_limit = 10; + void clear_mdl_hard_limit(); + float mdl_hard_limit() const; + void set_mdl_hard_limit(float value); + private: + float _internal_mdl_hard_limit() const; + void _internal_set_mdl_hard_limit(float value); + public: + + // bool hard_limit_min_benefit = 11; + void clear_hard_limit_min_benefit(); + bool hard_limit_min_benefit() const; + void set_hard_limit_min_benefit(bool value); + private: + bool _internal_hard_limit_min_benefit() const; + void _internal_set_hard_limit_min_benefit(bool value); + public: + + // bool mdl_regularize = 12; + void clear_mdl_regularize(); + bool mdl_regularize() const; + void set_mdl_regularize(bool value); + private: + bool _internal_mdl_regularize() const; + void _internal_set_mdl_regularize(bool value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.tpu.MdlAdagradLightParameters) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + float l2_; + float lr_power_; + float min_servable_mdl_benefit_; + float mdl_mix_in_margin_; + float mdl_benefit_rampup_coeff_; + float mdl_min_weight_; + float benefit_revisit_scale_; + float max_event_benefit_; + float max_total_benefit_; + float mdl_hard_limit_; + bool hard_limit_min_benefit_; + bool mdl_regularize_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2ftpu_2foptimization_5fparameters_2eproto; +}; +// ------------------------------------------------------------------- + +class AdadeltaParameters final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.tpu.AdadeltaParameters) */ { + public: + inline AdadeltaParameters() : AdadeltaParameters(nullptr) {} + ~AdadeltaParameters() override; + explicit PROTOBUF_CONSTEXPR AdadeltaParameters(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + AdadeltaParameters(const AdadeltaParameters& from); + AdadeltaParameters(AdadeltaParameters&& from) noexcept + : AdadeltaParameters() { + *this = ::std::move(from); + } + + inline AdadeltaParameters& operator=(const AdadeltaParameters& from) { + CopyFrom(from); + return *this; + } + inline AdadeltaParameters& operator=(AdadeltaParameters&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const AdadeltaParameters& default_instance() { + return *internal_default_instance(); + } + static inline const AdadeltaParameters* internal_default_instance() { + return reinterpret_cast( + &_AdadeltaParameters_default_instance_); + } + static constexpr int kIndexInFileMessages = + 15; + + friend void swap(AdadeltaParameters& a, AdadeltaParameters& b) { + a.Swap(&b); + } + inline void Swap(AdadeltaParameters* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(AdadeltaParameters* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + AdadeltaParameters* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const AdadeltaParameters& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const AdadeltaParameters& from) { + AdadeltaParameters::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(AdadeltaParameters* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.tpu.AdadeltaParameters"; + } + protected: + explicit AdadeltaParameters(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kRhoFieldNumber = 1, + kEpsilonFieldNumber = 2, + }; + // float rho = 1; + void clear_rho(); + float rho() const; + void set_rho(float value); + private: + float _internal_rho() const; + void _internal_set_rho(float value); + public: + + // float epsilon = 2; + void clear_epsilon(); + float epsilon() const; + void set_epsilon(float value); + private: + float _internal_epsilon() const; + void _internal_set_epsilon(float value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.tpu.AdadeltaParameters) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + float rho_; + float epsilon_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2ftpu_2foptimization_5fparameters_2eproto; +}; +// ------------------------------------------------------------------- + +class ProximalAdagradParameters final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.tpu.ProximalAdagradParameters) */ { + public: + inline ProximalAdagradParameters() : ProximalAdagradParameters(nullptr) {} + ~ProximalAdagradParameters() override; + explicit PROTOBUF_CONSTEXPR ProximalAdagradParameters(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + ProximalAdagradParameters(const ProximalAdagradParameters& from); + ProximalAdagradParameters(ProximalAdagradParameters&& from) noexcept + : ProximalAdagradParameters() { + *this = ::std::move(from); + } + + inline ProximalAdagradParameters& operator=(const ProximalAdagradParameters& from) { + CopyFrom(from); + return *this; + } + inline ProximalAdagradParameters& operator=(ProximalAdagradParameters&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const ProximalAdagradParameters& default_instance() { + return *internal_default_instance(); + } + static inline const ProximalAdagradParameters* internal_default_instance() { + return reinterpret_cast( + &_ProximalAdagradParameters_default_instance_); + } + static constexpr int kIndexInFileMessages = + 16; + + friend void swap(ProximalAdagradParameters& a, ProximalAdagradParameters& b) { + a.Swap(&b); + } + inline void Swap(ProximalAdagradParameters* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(ProximalAdagradParameters* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + ProximalAdagradParameters* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const ProximalAdagradParameters& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const ProximalAdagradParameters& from) { + ProximalAdagradParameters::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(ProximalAdagradParameters* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.tpu.ProximalAdagradParameters"; + } + protected: + explicit ProximalAdagradParameters(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kL1FieldNumber = 1, + kL2FieldNumber = 2, + }; + // float l1 = 1; + void clear_l1(); + float l1() const; + void set_l1(float value); + private: + float _internal_l1() const; + void _internal_set_l1(float value); + public: + + // float l2 = 2; + void clear_l2(); + float l2() const; + void set_l2(float value); + private: + float _internal_l2() const; + void _internal_set_l2(float value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.tpu.ProximalAdagradParameters) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + float l1_; + float l2_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2ftpu_2foptimization_5fparameters_2eproto; +}; +// ------------------------------------------------------------------- + +class OnlineYogiParameters final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.tpu.OnlineYogiParameters) */ { + public: + inline OnlineYogiParameters() : OnlineYogiParameters(nullptr) {} + ~OnlineYogiParameters() override; + explicit PROTOBUF_CONSTEXPR OnlineYogiParameters(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + OnlineYogiParameters(const OnlineYogiParameters& from); + OnlineYogiParameters(OnlineYogiParameters&& from) noexcept + : OnlineYogiParameters() { + *this = ::std::move(from); + } + + inline OnlineYogiParameters& operator=(const OnlineYogiParameters& from) { + CopyFrom(from); + return *this; + } + inline OnlineYogiParameters& operator=(OnlineYogiParameters&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const OnlineYogiParameters& default_instance() { + return *internal_default_instance(); + } + static inline const OnlineYogiParameters* internal_default_instance() { + return reinterpret_cast( + &_OnlineYogiParameters_default_instance_); + } + static constexpr int kIndexInFileMessages = + 17; + + friend void swap(OnlineYogiParameters& a, OnlineYogiParameters& b) { + a.Swap(&b); + } + inline void Swap(OnlineYogiParameters* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(OnlineYogiParameters* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + OnlineYogiParameters* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const OnlineYogiParameters& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const OnlineYogiParameters& from) { + OnlineYogiParameters::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(OnlineYogiParameters* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.tpu.OnlineYogiParameters"; + } + protected: + explicit OnlineYogiParameters(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kL1FieldNumber = 1, + kL2FieldNumber = 2, + kBeta2FieldNumber = 3, + }; + // float l1 = 1; + void clear_l1(); + float l1() const; + void set_l1(float value); + private: + float _internal_l1() const; + void _internal_set_l1(float value); + public: + + // float l2 = 2; + void clear_l2(); + float l2() const; + void set_l2(float value); + private: + float _internal_l2() const; + void _internal_set_l2(float value); + public: + + // float beta2 = 3; + void clear_beta2(); + float beta2() const; + void set_beta2(float value); + private: + float _internal_beta2() const; + void _internal_set_beta2(float value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.tpu.OnlineYogiParameters) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + float l1_; + float l2_; + float beta2_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2ftpu_2foptimization_5fparameters_2eproto; +}; +// ------------------------------------------------------------------- + +class ProximalYogiParameters final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.tpu.ProximalYogiParameters) */ { + public: + inline ProximalYogiParameters() : ProximalYogiParameters(nullptr) {} + ~ProximalYogiParameters() override; + explicit PROTOBUF_CONSTEXPR ProximalYogiParameters(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + ProximalYogiParameters(const ProximalYogiParameters& from); + ProximalYogiParameters(ProximalYogiParameters&& from) noexcept + : ProximalYogiParameters() { + *this = ::std::move(from); + } + + inline ProximalYogiParameters& operator=(const ProximalYogiParameters& from) { + CopyFrom(from); + return *this; + } + inline ProximalYogiParameters& operator=(ProximalYogiParameters&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const ProximalYogiParameters& default_instance() { + return *internal_default_instance(); + } + static inline const ProximalYogiParameters* internal_default_instance() { + return reinterpret_cast( + &_ProximalYogiParameters_default_instance_); + } + static constexpr int kIndexInFileMessages = + 18; + + friend void swap(ProximalYogiParameters& a, ProximalYogiParameters& b) { + a.Swap(&b); + } + inline void Swap(ProximalYogiParameters* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(ProximalYogiParameters* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + ProximalYogiParameters* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const ProximalYogiParameters& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const ProximalYogiParameters& from) { + ProximalYogiParameters::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(ProximalYogiParameters* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.tpu.ProximalYogiParameters"; + } + protected: + explicit ProximalYogiParameters(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kL1FieldNumber = 1, + kL2FieldNumber = 2, + kBeta1FieldNumber = 3, + kBeta2FieldNumber = 4, + kEpsilonFieldNumber = 5, + }; + // float l1 = 1; + void clear_l1(); + float l1() const; + void set_l1(float value); + private: + float _internal_l1() const; + void _internal_set_l1(float value); + public: + + // float l2 = 2; + void clear_l2(); + float l2() const; + void set_l2(float value); + private: + float _internal_l2() const; + void _internal_set_l2(float value); + public: + + // float beta1 = 3; + void clear_beta1(); + float beta1() const; + void set_beta1(float value); + private: + float _internal_beta1() const; + void _internal_set_beta1(float value); + public: + + // float beta2 = 4; + void clear_beta2(); + float beta2() const; + void set_beta2(float value); + private: + float _internal_beta2() const; + void _internal_set_beta2(float value); + public: + + // float epsilon = 5; + void clear_epsilon(); + float epsilon() const; + void set_epsilon(float value); + private: + float _internal_epsilon() const; + void _internal_set_epsilon(float value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.tpu.ProximalYogiParameters) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + float l1_; + float l2_; + float beta1_; + float beta2_; + float epsilon_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2ftpu_2foptimization_5fparameters_2eproto; +}; +// ------------------------------------------------------------------- + +class FrequencyEstimatorParameters final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.tpu.FrequencyEstimatorParameters) */ { + public: + inline FrequencyEstimatorParameters() : FrequencyEstimatorParameters(nullptr) {} + ~FrequencyEstimatorParameters() override; + explicit PROTOBUF_CONSTEXPR FrequencyEstimatorParameters(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + FrequencyEstimatorParameters(const FrequencyEstimatorParameters& from); + FrequencyEstimatorParameters(FrequencyEstimatorParameters&& from) noexcept + : FrequencyEstimatorParameters() { + *this = ::std::move(from); + } + + inline FrequencyEstimatorParameters& operator=(const FrequencyEstimatorParameters& from) { + CopyFrom(from); + return *this; + } + inline FrequencyEstimatorParameters& operator=(FrequencyEstimatorParameters&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const FrequencyEstimatorParameters& default_instance() { + return *internal_default_instance(); + } + static inline const FrequencyEstimatorParameters* internal_default_instance() { + return reinterpret_cast( + &_FrequencyEstimatorParameters_default_instance_); + } + static constexpr int kIndexInFileMessages = + 19; + + friend void swap(FrequencyEstimatorParameters& a, FrequencyEstimatorParameters& b) { + a.Swap(&b); + } + inline void Swap(FrequencyEstimatorParameters* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(FrequencyEstimatorParameters* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + FrequencyEstimatorParameters* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const FrequencyEstimatorParameters& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const FrequencyEstimatorParameters& from) { + FrequencyEstimatorParameters::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(FrequencyEstimatorParameters* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.tpu.FrequencyEstimatorParameters"; + } + protected: + explicit FrequencyEstimatorParameters(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kTauFieldNumber = 1, + kMaxDeltaFieldNumber = 2, + kOutlierThresholdFieldNumber = 3, + kWeightExponentFieldNumber = 4, + }; + // float tau = 1; + void clear_tau(); + float tau() const; + void set_tau(float value); + private: + float _internal_tau() const; + void _internal_set_tau(float value); + public: + + // float max_delta = 2; + void clear_max_delta(); + float max_delta() const; + void set_max_delta(float value); + private: + float _internal_max_delta() const; + void _internal_set_max_delta(float value); + public: + + // float outlier_threshold = 3; + void clear_outlier_threshold(); + float outlier_threshold() const; + void set_outlier_threshold(float value); + private: + float _internal_outlier_threshold() const; + void _internal_set_outlier_threshold(float value); + public: + + // float weight_exponent = 4; + void clear_weight_exponent(); + float weight_exponent() const; + void set_weight_exponent(float value); + private: + float _internal_weight_exponent() const; + void _internal_set_weight_exponent(float value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.tpu.FrequencyEstimatorParameters) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + float tau_; + float max_delta_; + float outlier_threshold_; + float weight_exponent_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2ftpu_2foptimization_5fparameters_2eproto; +}; +// ------------------------------------------------------------------- + +class UserDefinedProgramParameters final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.tpu.UserDefinedProgramParameters) */ { + public: + inline UserDefinedProgramParameters() : UserDefinedProgramParameters(nullptr) {} + ~UserDefinedProgramParameters() override; + explicit PROTOBUF_CONSTEXPR UserDefinedProgramParameters(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + UserDefinedProgramParameters(const UserDefinedProgramParameters& from); + UserDefinedProgramParameters(UserDefinedProgramParameters&& from) noexcept + : UserDefinedProgramParameters() { + *this = ::std::move(from); + } + + inline UserDefinedProgramParameters& operator=(const UserDefinedProgramParameters& from) { + CopyFrom(from); + return *this; + } + inline UserDefinedProgramParameters& operator=(UserDefinedProgramParameters&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const UserDefinedProgramParameters& default_instance() { + return *internal_default_instance(); + } + static inline const UserDefinedProgramParameters* internal_default_instance() { + return reinterpret_cast( + &_UserDefinedProgramParameters_default_instance_); + } + static constexpr int kIndexInFileMessages = + 20; + + friend void swap(UserDefinedProgramParameters& a, UserDefinedProgramParameters& b) { + a.Swap(&b); + } + inline void Swap(UserDefinedProgramParameters* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(UserDefinedProgramParameters* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + UserDefinedProgramParameters* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const UserDefinedProgramParameters& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const UserDefinedProgramParameters& from) { + UserDefinedProgramParameters::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(UserDefinedProgramParameters* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.tpu.UserDefinedProgramParameters"; + } + protected: + explicit UserDefinedProgramParameters(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kProgramFieldNumber = 1, + }; + // .xla.HloModuleProto program = 1; + bool has_program() const; + private: + bool _internal_has_program() const; + public: + void clear_program(); + const ::xla::HloModuleProto& program() const; + PROTOBUF_NODISCARD ::xla::HloModuleProto* release_program(); + ::xla::HloModuleProto* mutable_program(); + void set_allocated_program(::xla::HloModuleProto* program); + private: + const ::xla::HloModuleProto& _internal_program() const; + ::xla::HloModuleProto* _internal_mutable_program(); + public: + void unsafe_arena_set_allocated_program( + ::xla::HloModuleProto* program); + ::xla::HloModuleProto* unsafe_arena_release_program(); + + // @@protoc_insertion_point(class_scope:tensorflow.tpu.UserDefinedProgramParameters) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::xla::HloModuleProto* program_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2ftpu_2foptimization_5fparameters_2eproto; +}; +// ------------------------------------------------------------------- + +class AssignParameters final : + public ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase /* @@protoc_insertion_point(class_definition:tensorflow.tpu.AssignParameters) */ { + public: + inline AssignParameters() : AssignParameters(nullptr) {} + explicit PROTOBUF_CONSTEXPR AssignParameters(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + AssignParameters(const AssignParameters& from); + AssignParameters(AssignParameters&& from) noexcept + : AssignParameters() { + *this = ::std::move(from); + } + + inline AssignParameters& operator=(const AssignParameters& from) { + CopyFrom(from); + return *this; + } + inline AssignParameters& operator=(AssignParameters&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const AssignParameters& default_instance() { + return *internal_default_instance(); + } + static inline const AssignParameters* internal_default_instance() { + return reinterpret_cast( + &_AssignParameters_default_instance_); + } + static constexpr int kIndexInFileMessages = + 21; + + friend void swap(AssignParameters& a, AssignParameters& b) { + a.Swap(&b); + } + inline void Swap(AssignParameters* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(AssignParameters* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + AssignParameters* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::CopyFrom; + inline void CopyFrom(const AssignParameters& from) { + ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::CopyImpl(*this, from); + } + using ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::MergeFrom; + void MergeFrom(const AssignParameters& from) { + ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::MergeImpl(*this, from); + } + public: + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.tpu.AssignParameters"; + } + protected: + explicit AssignParameters(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // @@protoc_insertion_point(class_scope:tensorflow.tpu.AssignParameters) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2ftpu_2foptimization_5fparameters_2eproto; +}; +// ------------------------------------------------------------------- + +class GradientAccumulationStatus final : + public ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase /* @@protoc_insertion_point(class_definition:tensorflow.tpu.GradientAccumulationStatus) */ { + public: + inline GradientAccumulationStatus() : GradientAccumulationStatus(nullptr) {} + explicit PROTOBUF_CONSTEXPR GradientAccumulationStatus(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + GradientAccumulationStatus(const GradientAccumulationStatus& from); + GradientAccumulationStatus(GradientAccumulationStatus&& from) noexcept + : GradientAccumulationStatus() { + *this = ::std::move(from); + } + + inline GradientAccumulationStatus& operator=(const GradientAccumulationStatus& from) { + CopyFrom(from); + return *this; + } + inline GradientAccumulationStatus& operator=(GradientAccumulationStatus&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const GradientAccumulationStatus& default_instance() { + return *internal_default_instance(); + } + static inline const GradientAccumulationStatus* internal_default_instance() { + return reinterpret_cast( + &_GradientAccumulationStatus_default_instance_); + } + static constexpr int kIndexInFileMessages = + 22; + + friend void swap(GradientAccumulationStatus& a, GradientAccumulationStatus& b) { + a.Swap(&b); + } + inline void Swap(GradientAccumulationStatus* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(GradientAccumulationStatus* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + GradientAccumulationStatus* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::CopyFrom; + inline void CopyFrom(const GradientAccumulationStatus& from) { + ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::CopyImpl(*this, from); + } + using ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::MergeFrom; + void MergeFrom(const GradientAccumulationStatus& from) { + ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::MergeImpl(*this, from); + } + public: + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.tpu.GradientAccumulationStatus"; + } + protected: + explicit GradientAccumulationStatus(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + typedef GradientAccumulationStatus_Status Status; + static constexpr Status UNSPECIFIED = + GradientAccumulationStatus_Status_UNSPECIFIED; + static constexpr Status ENABLED = + GradientAccumulationStatus_Status_ENABLED; + static constexpr Status DISABLED = + GradientAccumulationStatus_Status_DISABLED; + static inline bool Status_IsValid(int value) { + return GradientAccumulationStatus_Status_IsValid(value); + } + static constexpr Status Status_MIN = + GradientAccumulationStatus_Status_Status_MIN; + static constexpr Status Status_MAX = + GradientAccumulationStatus_Status_Status_MAX; + static constexpr int Status_ARRAYSIZE = + GradientAccumulationStatus_Status_Status_ARRAYSIZE; + static inline const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* + Status_descriptor() { + return GradientAccumulationStatus_Status_descriptor(); + } + template + static inline const std::string& Status_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function Status_Name."); + return GradientAccumulationStatus_Status_Name(enum_t_value); + } + static inline bool Status_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name, + Status* value) { + return GradientAccumulationStatus_Status_Parse(name, value); + } + + // accessors ------------------------------------------------------- + + // @@protoc_insertion_point(class_scope:tensorflow.tpu.GradientAccumulationStatus) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2ftpu_2foptimization_5fparameters_2eproto; +}; +// ------------------------------------------------------------------- + +class LowDimensionalPackingStatus final : + public ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase /* @@protoc_insertion_point(class_definition:tensorflow.tpu.LowDimensionalPackingStatus) */ { + public: + inline LowDimensionalPackingStatus() : LowDimensionalPackingStatus(nullptr) {} + explicit PROTOBUF_CONSTEXPR LowDimensionalPackingStatus(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + LowDimensionalPackingStatus(const LowDimensionalPackingStatus& from); + LowDimensionalPackingStatus(LowDimensionalPackingStatus&& from) noexcept + : LowDimensionalPackingStatus() { + *this = ::std::move(from); + } + + inline LowDimensionalPackingStatus& operator=(const LowDimensionalPackingStatus& from) { + CopyFrom(from); + return *this; + } + inline LowDimensionalPackingStatus& operator=(LowDimensionalPackingStatus&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const LowDimensionalPackingStatus& default_instance() { + return *internal_default_instance(); + } + static inline const LowDimensionalPackingStatus* internal_default_instance() { + return reinterpret_cast( + &_LowDimensionalPackingStatus_default_instance_); + } + static constexpr int kIndexInFileMessages = + 23; + + friend void swap(LowDimensionalPackingStatus& a, LowDimensionalPackingStatus& b) { + a.Swap(&b); + } + inline void Swap(LowDimensionalPackingStatus* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(LowDimensionalPackingStatus* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + LowDimensionalPackingStatus* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::CopyFrom; + inline void CopyFrom(const LowDimensionalPackingStatus& from) { + ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::CopyImpl(*this, from); + } + using ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::MergeFrom; + void MergeFrom(const LowDimensionalPackingStatus& from) { + ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::MergeImpl(*this, from); + } + public: + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.tpu.LowDimensionalPackingStatus"; + } + protected: + explicit LowDimensionalPackingStatus(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + typedef LowDimensionalPackingStatus_Status Status; + static constexpr Status UNSPECIFIED = + LowDimensionalPackingStatus_Status_UNSPECIFIED; + static constexpr Status ENABLED = + LowDimensionalPackingStatus_Status_ENABLED; + static constexpr Status DISABLED = + LowDimensionalPackingStatus_Status_DISABLED; + static inline bool Status_IsValid(int value) { + return LowDimensionalPackingStatus_Status_IsValid(value); + } + static constexpr Status Status_MIN = + LowDimensionalPackingStatus_Status_Status_MIN; + static constexpr Status Status_MAX = + LowDimensionalPackingStatus_Status_Status_MAX; + static constexpr int Status_ARRAYSIZE = + LowDimensionalPackingStatus_Status_Status_ARRAYSIZE; + static inline const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* + Status_descriptor() { + return LowDimensionalPackingStatus_Status_descriptor(); + } + template + static inline const std::string& Status_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function Status_Name."); + return LowDimensionalPackingStatus_Status_Name(enum_t_value); + } + static inline bool Status_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name, + Status* value) { + return LowDimensionalPackingStatus_Status_Parse(name, value); + } + + // accessors ------------------------------------------------------- + + // @@protoc_insertion_point(class_scope:tensorflow.tpu.LowDimensionalPackingStatus) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2ftpu_2foptimization_5fparameters_2eproto; +}; +// ------------------------------------------------------------------- + +class HotIdReplicationConfiguration final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.tpu.HotIdReplicationConfiguration) */ { + public: + inline HotIdReplicationConfiguration() : HotIdReplicationConfiguration(nullptr) {} + ~HotIdReplicationConfiguration() override; + explicit PROTOBUF_CONSTEXPR HotIdReplicationConfiguration(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + HotIdReplicationConfiguration(const HotIdReplicationConfiguration& from); + HotIdReplicationConfiguration(HotIdReplicationConfiguration&& from) noexcept + : HotIdReplicationConfiguration() { + *this = ::std::move(from); + } + + inline HotIdReplicationConfiguration& operator=(const HotIdReplicationConfiguration& from) { + CopyFrom(from); + return *this; + } + inline HotIdReplicationConfiguration& operator=(HotIdReplicationConfiguration&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const HotIdReplicationConfiguration& default_instance() { + return *internal_default_instance(); + } + static inline const HotIdReplicationConfiguration* internal_default_instance() { + return reinterpret_cast( + &_HotIdReplicationConfiguration_default_instance_); + } + static constexpr int kIndexInFileMessages = + 24; + + friend void swap(HotIdReplicationConfiguration& a, HotIdReplicationConfiguration& b) { + a.Swap(&b); + } + inline void Swap(HotIdReplicationConfiguration* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(HotIdReplicationConfiguration* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + HotIdReplicationConfiguration* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const HotIdReplicationConfiguration& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const HotIdReplicationConfiguration& from) { + HotIdReplicationConfiguration::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(HotIdReplicationConfiguration* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.tpu.HotIdReplicationConfiguration"; + } + protected: + explicit HotIdReplicationConfiguration(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + typedef HotIdReplicationConfiguration_Status Status; + static constexpr Status UNSPECIFIED = + HotIdReplicationConfiguration_Status_UNSPECIFIED; + static constexpr Status ENABLED = + HotIdReplicationConfiguration_Status_ENABLED; + static constexpr Status DISABLED = + HotIdReplicationConfiguration_Status_DISABLED; + static constexpr Status MIGRATION_ONLY = + HotIdReplicationConfiguration_Status_MIGRATION_ONLY; + static inline bool Status_IsValid(int value) { + return HotIdReplicationConfiguration_Status_IsValid(value); + } + static constexpr Status Status_MIN = + HotIdReplicationConfiguration_Status_Status_MIN; + static constexpr Status Status_MAX = + HotIdReplicationConfiguration_Status_Status_MAX; + static constexpr int Status_ARRAYSIZE = + HotIdReplicationConfiguration_Status_Status_ARRAYSIZE; + static inline const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* + Status_descriptor() { + return HotIdReplicationConfiguration_Status_descriptor(); + } + template + static inline const std::string& Status_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function Status_Name."); + return HotIdReplicationConfiguration_Status_Name(enum_t_value); + } + static inline bool Status_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name, + Status* value) { + return HotIdReplicationConfiguration_Status_Parse(name, value); + } + + // accessors ------------------------------------------------------- + + enum : int { + kStatusFieldNumber = 1, + }; + // .tensorflow.tpu.HotIdReplicationConfiguration.Status status = 1; + void clear_status(); + ::tensorflow::tpu::HotIdReplicationConfiguration_Status status() const; + void set_status(::tensorflow::tpu::HotIdReplicationConfiguration_Status value); + private: + ::tensorflow::tpu::HotIdReplicationConfiguration_Status _internal_status() const; + void _internal_set_status(::tensorflow::tpu::HotIdReplicationConfiguration_Status value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.tpu.HotIdReplicationConfiguration) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + int status_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2ftpu_2foptimization_5fparameters_2eproto; +}; +// ------------------------------------------------------------------- + +class OptimizationParameters final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.tpu.OptimizationParameters) */ { + public: + inline OptimizationParameters() : OptimizationParameters(nullptr) {} + ~OptimizationParameters() override; + explicit PROTOBUF_CONSTEXPR OptimizationParameters(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + OptimizationParameters(const OptimizationParameters& from); + OptimizationParameters(OptimizationParameters&& from) noexcept + : OptimizationParameters() { + *this = ::std::move(from); + } + + inline OptimizationParameters& operator=(const OptimizationParameters& from) { + CopyFrom(from); + return *this; + } + inline OptimizationParameters& operator=(OptimizationParameters&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const OptimizationParameters& default_instance() { + return *internal_default_instance(); + } + enum ParametersCase { + kAdagrad = 3, + kAdagradMomentum = 26, + kBoundedAdagrad = 19, + kStochasticGradientDescent = 4, + kFtrl = 5, + kAdam = 6, + kMomentum = 8, + kLion = 29, + kRmsProp = 9, + kCenteredRmsProp = 10, + kMdlAdagradLight = 11, + kAdadelta = 12, + kProximalAdagrad = 14, + kOnlineYogi = 20, + kProximalYogi = 21, + kFrequencyEstimator = 23, + kUserDefinedProgram = 24, + kAssign = 25, + PARAMETERS_NOT_SET = 0, + }; + + static inline const OptimizationParameters* internal_default_instance() { + return reinterpret_cast( + &_OptimizationParameters_default_instance_); + } + static constexpr int kIndexInFileMessages = + 25; + + friend void swap(OptimizationParameters& a, OptimizationParameters& b) { + a.Swap(&b); + } + inline void Swap(OptimizationParameters* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(OptimizationParameters* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + OptimizationParameters* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const OptimizationParameters& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const OptimizationParameters& from) { + OptimizationParameters::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(OptimizationParameters* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.tpu.OptimizationParameters"; + } + protected: + explicit OptimizationParameters(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kClippingLimitsFieldNumber = 2, + kGradientClippingLimitsFieldNumber = 7, + kLearningRateFieldNumber = 13, + kHotIdReplicationConfigurationFieldNumber = 18, + kSimulatedQuantizationFieldNumber = 27, + kWeightDecayFactorFieldNumber = 16, + kGradientAccumulationStatusFieldNumber = 17, + kMultiplyWeightDecayFactorByLearningRateFieldNumber = 22, + kLowDimensionalPackingStatusFieldNumber = 28, + kAdagradFieldNumber = 3, + kAdagradMomentumFieldNumber = 26, + kBoundedAdagradFieldNumber = 19, + kStochasticGradientDescentFieldNumber = 4, + kFtrlFieldNumber = 5, + kAdamFieldNumber = 6, + kMomentumFieldNumber = 8, + kLionFieldNumber = 29, + kRmsPropFieldNumber = 9, + kCenteredRmsPropFieldNumber = 10, + kMdlAdagradLightFieldNumber = 11, + kAdadeltaFieldNumber = 12, + kProximalAdagradFieldNumber = 14, + kOnlineYogiFieldNumber = 20, + kProximalYogiFieldNumber = 21, + kFrequencyEstimatorFieldNumber = 23, + kUserDefinedProgramFieldNumber = 24, + kAssignFieldNumber = 25, + }; + // .tensorflow.tpu.ClippingLimits clipping_limits = 2; + bool has_clipping_limits() const; + private: + bool _internal_has_clipping_limits() const; + public: + void clear_clipping_limits(); + const ::tensorflow::tpu::ClippingLimits& clipping_limits() const; + PROTOBUF_NODISCARD ::tensorflow::tpu::ClippingLimits* release_clipping_limits(); + ::tensorflow::tpu::ClippingLimits* mutable_clipping_limits(); + void set_allocated_clipping_limits(::tensorflow::tpu::ClippingLimits* clipping_limits); + private: + const ::tensorflow::tpu::ClippingLimits& _internal_clipping_limits() const; + ::tensorflow::tpu::ClippingLimits* _internal_mutable_clipping_limits(); + public: + void unsafe_arena_set_allocated_clipping_limits( + ::tensorflow::tpu::ClippingLimits* clipping_limits); + ::tensorflow::tpu::ClippingLimits* unsafe_arena_release_clipping_limits(); + + // .tensorflow.tpu.ClippingLimits gradient_clipping_limits = 7; + bool has_gradient_clipping_limits() const; + private: + bool _internal_has_gradient_clipping_limits() const; + public: + void clear_gradient_clipping_limits(); + const ::tensorflow::tpu::ClippingLimits& gradient_clipping_limits() const; + PROTOBUF_NODISCARD ::tensorflow::tpu::ClippingLimits* release_gradient_clipping_limits(); + ::tensorflow::tpu::ClippingLimits* mutable_gradient_clipping_limits(); + void set_allocated_gradient_clipping_limits(::tensorflow::tpu::ClippingLimits* gradient_clipping_limits); + private: + const ::tensorflow::tpu::ClippingLimits& _internal_gradient_clipping_limits() const; + ::tensorflow::tpu::ClippingLimits* _internal_mutable_gradient_clipping_limits(); + public: + void unsafe_arena_set_allocated_gradient_clipping_limits( + ::tensorflow::tpu::ClippingLimits* gradient_clipping_limits); + ::tensorflow::tpu::ClippingLimits* unsafe_arena_release_gradient_clipping_limits(); + + // .tensorflow.tpu.LearningRate learning_rate = 13; + bool has_learning_rate() const; + private: + bool _internal_has_learning_rate() const; + public: + void clear_learning_rate(); + const ::tensorflow::tpu::LearningRate& learning_rate() const; + PROTOBUF_NODISCARD ::tensorflow::tpu::LearningRate* release_learning_rate(); + ::tensorflow::tpu::LearningRate* mutable_learning_rate(); + void set_allocated_learning_rate(::tensorflow::tpu::LearningRate* learning_rate); + private: + const ::tensorflow::tpu::LearningRate& _internal_learning_rate() const; + ::tensorflow::tpu::LearningRate* _internal_mutable_learning_rate(); + public: + void unsafe_arena_set_allocated_learning_rate( + ::tensorflow::tpu::LearningRate* learning_rate); + ::tensorflow::tpu::LearningRate* unsafe_arena_release_learning_rate(); + + // .tensorflow.tpu.HotIdReplicationConfiguration hot_id_replication_configuration = 18; + bool has_hot_id_replication_configuration() const; + private: + bool _internal_has_hot_id_replication_configuration() const; + public: + void clear_hot_id_replication_configuration(); + const ::tensorflow::tpu::HotIdReplicationConfiguration& hot_id_replication_configuration() const; + PROTOBUF_NODISCARD ::tensorflow::tpu::HotIdReplicationConfiguration* release_hot_id_replication_configuration(); + ::tensorflow::tpu::HotIdReplicationConfiguration* mutable_hot_id_replication_configuration(); + void set_allocated_hot_id_replication_configuration(::tensorflow::tpu::HotIdReplicationConfiguration* hot_id_replication_configuration); + private: + const ::tensorflow::tpu::HotIdReplicationConfiguration& _internal_hot_id_replication_configuration() const; + ::tensorflow::tpu::HotIdReplicationConfiguration* _internal_mutable_hot_id_replication_configuration(); + public: + void unsafe_arena_set_allocated_hot_id_replication_configuration( + ::tensorflow::tpu::HotIdReplicationConfiguration* hot_id_replication_configuration); + ::tensorflow::tpu::HotIdReplicationConfiguration* unsafe_arena_release_hot_id_replication_configuration(); + + // .tensorflow.tpu.SimulatedQuantization simulated_quantization = 27; + bool has_simulated_quantization() const; + private: + bool _internal_has_simulated_quantization() const; + public: + void clear_simulated_quantization(); + const ::tensorflow::tpu::SimulatedQuantization& simulated_quantization() const; + PROTOBUF_NODISCARD ::tensorflow::tpu::SimulatedQuantization* release_simulated_quantization(); + ::tensorflow::tpu::SimulatedQuantization* mutable_simulated_quantization(); + void set_allocated_simulated_quantization(::tensorflow::tpu::SimulatedQuantization* simulated_quantization); + private: + const ::tensorflow::tpu::SimulatedQuantization& _internal_simulated_quantization() const; + ::tensorflow::tpu::SimulatedQuantization* _internal_mutable_simulated_quantization(); + public: + void unsafe_arena_set_allocated_simulated_quantization( + ::tensorflow::tpu::SimulatedQuantization* simulated_quantization); + ::tensorflow::tpu::SimulatedQuantization* unsafe_arena_release_simulated_quantization(); + + // float weight_decay_factor = 16; + void clear_weight_decay_factor(); + float weight_decay_factor() const; + void set_weight_decay_factor(float value); + private: + float _internal_weight_decay_factor() const; + void _internal_set_weight_decay_factor(float value); + public: + + // .tensorflow.tpu.GradientAccumulationStatus.Status gradient_accumulation_status = 17; + void clear_gradient_accumulation_status(); + ::tensorflow::tpu::GradientAccumulationStatus_Status gradient_accumulation_status() const; + void set_gradient_accumulation_status(::tensorflow::tpu::GradientAccumulationStatus_Status value); + private: + ::tensorflow::tpu::GradientAccumulationStatus_Status _internal_gradient_accumulation_status() const; + void _internal_set_gradient_accumulation_status(::tensorflow::tpu::GradientAccumulationStatus_Status value); + public: + + // bool multiply_weight_decay_factor_by_learning_rate = 22; + void clear_multiply_weight_decay_factor_by_learning_rate(); + bool multiply_weight_decay_factor_by_learning_rate() const; + void set_multiply_weight_decay_factor_by_learning_rate(bool value); + private: + bool _internal_multiply_weight_decay_factor_by_learning_rate() const; + void _internal_set_multiply_weight_decay_factor_by_learning_rate(bool value); + public: + + // .tensorflow.tpu.LowDimensionalPackingStatus.Status low_dimensional_packing_status = 28; + void clear_low_dimensional_packing_status(); + ::tensorflow::tpu::LowDimensionalPackingStatus_Status low_dimensional_packing_status() const; + void set_low_dimensional_packing_status(::tensorflow::tpu::LowDimensionalPackingStatus_Status value); + private: + ::tensorflow::tpu::LowDimensionalPackingStatus_Status _internal_low_dimensional_packing_status() const; + void _internal_set_low_dimensional_packing_status(::tensorflow::tpu::LowDimensionalPackingStatus_Status value); + public: + + // .tensorflow.tpu.AdagradParameters adagrad = 3; + bool has_adagrad() const; + private: + bool _internal_has_adagrad() const; + public: + void clear_adagrad(); + const ::tensorflow::tpu::AdagradParameters& adagrad() const; + PROTOBUF_NODISCARD ::tensorflow::tpu::AdagradParameters* release_adagrad(); + ::tensorflow::tpu::AdagradParameters* mutable_adagrad(); + void set_allocated_adagrad(::tensorflow::tpu::AdagradParameters* adagrad); + private: + const ::tensorflow::tpu::AdagradParameters& _internal_adagrad() const; + ::tensorflow::tpu::AdagradParameters* _internal_mutable_adagrad(); + public: + void unsafe_arena_set_allocated_adagrad( + ::tensorflow::tpu::AdagradParameters* adagrad); + ::tensorflow::tpu::AdagradParameters* unsafe_arena_release_adagrad(); + + // .tensorflow.tpu.AdagradMomentumParameters adagrad_momentum = 26; + bool has_adagrad_momentum() const; + private: + bool _internal_has_adagrad_momentum() const; + public: + void clear_adagrad_momentum(); + const ::tensorflow::tpu::AdagradMomentumParameters& adagrad_momentum() const; + PROTOBUF_NODISCARD ::tensorflow::tpu::AdagradMomentumParameters* release_adagrad_momentum(); + ::tensorflow::tpu::AdagradMomentumParameters* mutable_adagrad_momentum(); + void set_allocated_adagrad_momentum(::tensorflow::tpu::AdagradMomentumParameters* adagrad_momentum); + private: + const ::tensorflow::tpu::AdagradMomentumParameters& _internal_adagrad_momentum() const; + ::tensorflow::tpu::AdagradMomentumParameters* _internal_mutable_adagrad_momentum(); + public: + void unsafe_arena_set_allocated_adagrad_momentum( + ::tensorflow::tpu::AdagradMomentumParameters* adagrad_momentum); + ::tensorflow::tpu::AdagradMomentumParameters* unsafe_arena_release_adagrad_momentum(); + + // .tensorflow.tpu.BoundedAdagradParameters bounded_adagrad = 19; + bool has_bounded_adagrad() const; + private: + bool _internal_has_bounded_adagrad() const; + public: + void clear_bounded_adagrad(); + const ::tensorflow::tpu::BoundedAdagradParameters& bounded_adagrad() const; + PROTOBUF_NODISCARD ::tensorflow::tpu::BoundedAdagradParameters* release_bounded_adagrad(); + ::tensorflow::tpu::BoundedAdagradParameters* mutable_bounded_adagrad(); + void set_allocated_bounded_adagrad(::tensorflow::tpu::BoundedAdagradParameters* bounded_adagrad); + private: + const ::tensorflow::tpu::BoundedAdagradParameters& _internal_bounded_adagrad() const; + ::tensorflow::tpu::BoundedAdagradParameters* _internal_mutable_bounded_adagrad(); + public: + void unsafe_arena_set_allocated_bounded_adagrad( + ::tensorflow::tpu::BoundedAdagradParameters* bounded_adagrad); + ::tensorflow::tpu::BoundedAdagradParameters* unsafe_arena_release_bounded_adagrad(); + + // .tensorflow.tpu.StochasticGradientDescentParameters stochastic_gradient_descent = 4; + bool has_stochastic_gradient_descent() const; + private: + bool _internal_has_stochastic_gradient_descent() const; + public: + void clear_stochastic_gradient_descent(); + const ::tensorflow::tpu::StochasticGradientDescentParameters& stochastic_gradient_descent() const; + PROTOBUF_NODISCARD ::tensorflow::tpu::StochasticGradientDescentParameters* release_stochastic_gradient_descent(); + ::tensorflow::tpu::StochasticGradientDescentParameters* mutable_stochastic_gradient_descent(); + void set_allocated_stochastic_gradient_descent(::tensorflow::tpu::StochasticGradientDescentParameters* stochastic_gradient_descent); + private: + const ::tensorflow::tpu::StochasticGradientDescentParameters& _internal_stochastic_gradient_descent() const; + ::tensorflow::tpu::StochasticGradientDescentParameters* _internal_mutable_stochastic_gradient_descent(); + public: + void unsafe_arena_set_allocated_stochastic_gradient_descent( + ::tensorflow::tpu::StochasticGradientDescentParameters* stochastic_gradient_descent); + ::tensorflow::tpu::StochasticGradientDescentParameters* unsafe_arena_release_stochastic_gradient_descent(); + + // .tensorflow.tpu.FtrlParameters ftrl = 5; + bool has_ftrl() const; + private: + bool _internal_has_ftrl() const; + public: + void clear_ftrl(); + const ::tensorflow::tpu::FtrlParameters& ftrl() const; + PROTOBUF_NODISCARD ::tensorflow::tpu::FtrlParameters* release_ftrl(); + ::tensorflow::tpu::FtrlParameters* mutable_ftrl(); + void set_allocated_ftrl(::tensorflow::tpu::FtrlParameters* ftrl); + private: + const ::tensorflow::tpu::FtrlParameters& _internal_ftrl() const; + ::tensorflow::tpu::FtrlParameters* _internal_mutable_ftrl(); + public: + void unsafe_arena_set_allocated_ftrl( + ::tensorflow::tpu::FtrlParameters* ftrl); + ::tensorflow::tpu::FtrlParameters* unsafe_arena_release_ftrl(); + + // .tensorflow.tpu.AdamParameters adam = 6; + bool has_adam() const; + private: + bool _internal_has_adam() const; + public: + void clear_adam(); + const ::tensorflow::tpu::AdamParameters& adam() const; + PROTOBUF_NODISCARD ::tensorflow::tpu::AdamParameters* release_adam(); + ::tensorflow::tpu::AdamParameters* mutable_adam(); + void set_allocated_adam(::tensorflow::tpu::AdamParameters* adam); + private: + const ::tensorflow::tpu::AdamParameters& _internal_adam() const; + ::tensorflow::tpu::AdamParameters* _internal_mutable_adam(); + public: + void unsafe_arena_set_allocated_adam( + ::tensorflow::tpu::AdamParameters* adam); + ::tensorflow::tpu::AdamParameters* unsafe_arena_release_adam(); + + // .tensorflow.tpu.MomentumParameters momentum = 8; + bool has_momentum() const; + private: + bool _internal_has_momentum() const; + public: + void clear_momentum(); + const ::tensorflow::tpu::MomentumParameters& momentum() const; + PROTOBUF_NODISCARD ::tensorflow::tpu::MomentumParameters* release_momentum(); + ::tensorflow::tpu::MomentumParameters* mutable_momentum(); + void set_allocated_momentum(::tensorflow::tpu::MomentumParameters* momentum); + private: + const ::tensorflow::tpu::MomentumParameters& _internal_momentum() const; + ::tensorflow::tpu::MomentumParameters* _internal_mutable_momentum(); + public: + void unsafe_arena_set_allocated_momentum( + ::tensorflow::tpu::MomentumParameters* momentum); + ::tensorflow::tpu::MomentumParameters* unsafe_arena_release_momentum(); + + // .tensorflow.tpu.LionParameters lion = 29; + bool has_lion() const; + private: + bool _internal_has_lion() const; + public: + void clear_lion(); + const ::tensorflow::tpu::LionParameters& lion() const; + PROTOBUF_NODISCARD ::tensorflow::tpu::LionParameters* release_lion(); + ::tensorflow::tpu::LionParameters* mutable_lion(); + void set_allocated_lion(::tensorflow::tpu::LionParameters* lion); + private: + const ::tensorflow::tpu::LionParameters& _internal_lion() const; + ::tensorflow::tpu::LionParameters* _internal_mutable_lion(); + public: + void unsafe_arena_set_allocated_lion( + ::tensorflow::tpu::LionParameters* lion); + ::tensorflow::tpu::LionParameters* unsafe_arena_release_lion(); + + // .tensorflow.tpu.RmsPropParameters rms_prop = 9; + bool has_rms_prop() const; + private: + bool _internal_has_rms_prop() const; + public: + void clear_rms_prop(); + const ::tensorflow::tpu::RmsPropParameters& rms_prop() const; + PROTOBUF_NODISCARD ::tensorflow::tpu::RmsPropParameters* release_rms_prop(); + ::tensorflow::tpu::RmsPropParameters* mutable_rms_prop(); + void set_allocated_rms_prop(::tensorflow::tpu::RmsPropParameters* rms_prop); + private: + const ::tensorflow::tpu::RmsPropParameters& _internal_rms_prop() const; + ::tensorflow::tpu::RmsPropParameters* _internal_mutable_rms_prop(); + public: + void unsafe_arena_set_allocated_rms_prop( + ::tensorflow::tpu::RmsPropParameters* rms_prop); + ::tensorflow::tpu::RmsPropParameters* unsafe_arena_release_rms_prop(); + + // .tensorflow.tpu.CenteredRmsPropParameters centered_rms_prop = 10; + bool has_centered_rms_prop() const; + private: + bool _internal_has_centered_rms_prop() const; + public: + void clear_centered_rms_prop(); + const ::tensorflow::tpu::CenteredRmsPropParameters& centered_rms_prop() const; + PROTOBUF_NODISCARD ::tensorflow::tpu::CenteredRmsPropParameters* release_centered_rms_prop(); + ::tensorflow::tpu::CenteredRmsPropParameters* mutable_centered_rms_prop(); + void set_allocated_centered_rms_prop(::tensorflow::tpu::CenteredRmsPropParameters* centered_rms_prop); + private: + const ::tensorflow::tpu::CenteredRmsPropParameters& _internal_centered_rms_prop() const; + ::tensorflow::tpu::CenteredRmsPropParameters* _internal_mutable_centered_rms_prop(); + public: + void unsafe_arena_set_allocated_centered_rms_prop( + ::tensorflow::tpu::CenteredRmsPropParameters* centered_rms_prop); + ::tensorflow::tpu::CenteredRmsPropParameters* unsafe_arena_release_centered_rms_prop(); + + // .tensorflow.tpu.MdlAdagradLightParameters mdl_adagrad_light = 11; + bool has_mdl_adagrad_light() const; + private: + bool _internal_has_mdl_adagrad_light() const; + public: + void clear_mdl_adagrad_light(); + const ::tensorflow::tpu::MdlAdagradLightParameters& mdl_adagrad_light() const; + PROTOBUF_NODISCARD ::tensorflow::tpu::MdlAdagradLightParameters* release_mdl_adagrad_light(); + ::tensorflow::tpu::MdlAdagradLightParameters* mutable_mdl_adagrad_light(); + void set_allocated_mdl_adagrad_light(::tensorflow::tpu::MdlAdagradLightParameters* mdl_adagrad_light); + private: + const ::tensorflow::tpu::MdlAdagradLightParameters& _internal_mdl_adagrad_light() const; + ::tensorflow::tpu::MdlAdagradLightParameters* _internal_mutable_mdl_adagrad_light(); + public: + void unsafe_arena_set_allocated_mdl_adagrad_light( + ::tensorflow::tpu::MdlAdagradLightParameters* mdl_adagrad_light); + ::tensorflow::tpu::MdlAdagradLightParameters* unsafe_arena_release_mdl_adagrad_light(); + + // .tensorflow.tpu.AdadeltaParameters adadelta = 12; + bool has_adadelta() const; + private: + bool _internal_has_adadelta() const; + public: + void clear_adadelta(); + const ::tensorflow::tpu::AdadeltaParameters& adadelta() const; + PROTOBUF_NODISCARD ::tensorflow::tpu::AdadeltaParameters* release_adadelta(); + ::tensorflow::tpu::AdadeltaParameters* mutable_adadelta(); + void set_allocated_adadelta(::tensorflow::tpu::AdadeltaParameters* adadelta); + private: + const ::tensorflow::tpu::AdadeltaParameters& _internal_adadelta() const; + ::tensorflow::tpu::AdadeltaParameters* _internal_mutable_adadelta(); + public: + void unsafe_arena_set_allocated_adadelta( + ::tensorflow::tpu::AdadeltaParameters* adadelta); + ::tensorflow::tpu::AdadeltaParameters* unsafe_arena_release_adadelta(); + + // .tensorflow.tpu.ProximalAdagradParameters proximal_adagrad = 14; + bool has_proximal_adagrad() const; + private: + bool _internal_has_proximal_adagrad() const; + public: + void clear_proximal_adagrad(); + const ::tensorflow::tpu::ProximalAdagradParameters& proximal_adagrad() const; + PROTOBUF_NODISCARD ::tensorflow::tpu::ProximalAdagradParameters* release_proximal_adagrad(); + ::tensorflow::tpu::ProximalAdagradParameters* mutable_proximal_adagrad(); + void set_allocated_proximal_adagrad(::tensorflow::tpu::ProximalAdagradParameters* proximal_adagrad); + private: + const ::tensorflow::tpu::ProximalAdagradParameters& _internal_proximal_adagrad() const; + ::tensorflow::tpu::ProximalAdagradParameters* _internal_mutable_proximal_adagrad(); + public: + void unsafe_arena_set_allocated_proximal_adagrad( + ::tensorflow::tpu::ProximalAdagradParameters* proximal_adagrad); + ::tensorflow::tpu::ProximalAdagradParameters* unsafe_arena_release_proximal_adagrad(); + + // .tensorflow.tpu.OnlineYogiParameters online_yogi = 20; + bool has_online_yogi() const; + private: + bool _internal_has_online_yogi() const; + public: + void clear_online_yogi(); + const ::tensorflow::tpu::OnlineYogiParameters& online_yogi() const; + PROTOBUF_NODISCARD ::tensorflow::tpu::OnlineYogiParameters* release_online_yogi(); + ::tensorflow::tpu::OnlineYogiParameters* mutable_online_yogi(); + void set_allocated_online_yogi(::tensorflow::tpu::OnlineYogiParameters* online_yogi); + private: + const ::tensorflow::tpu::OnlineYogiParameters& _internal_online_yogi() const; + ::tensorflow::tpu::OnlineYogiParameters* _internal_mutable_online_yogi(); + public: + void unsafe_arena_set_allocated_online_yogi( + ::tensorflow::tpu::OnlineYogiParameters* online_yogi); + ::tensorflow::tpu::OnlineYogiParameters* unsafe_arena_release_online_yogi(); + + // .tensorflow.tpu.ProximalYogiParameters proximal_yogi = 21; + bool has_proximal_yogi() const; + private: + bool _internal_has_proximal_yogi() const; + public: + void clear_proximal_yogi(); + const ::tensorflow::tpu::ProximalYogiParameters& proximal_yogi() const; + PROTOBUF_NODISCARD ::tensorflow::tpu::ProximalYogiParameters* release_proximal_yogi(); + ::tensorflow::tpu::ProximalYogiParameters* mutable_proximal_yogi(); + void set_allocated_proximal_yogi(::tensorflow::tpu::ProximalYogiParameters* proximal_yogi); + private: + const ::tensorflow::tpu::ProximalYogiParameters& _internal_proximal_yogi() const; + ::tensorflow::tpu::ProximalYogiParameters* _internal_mutable_proximal_yogi(); + public: + void unsafe_arena_set_allocated_proximal_yogi( + ::tensorflow::tpu::ProximalYogiParameters* proximal_yogi); + ::tensorflow::tpu::ProximalYogiParameters* unsafe_arena_release_proximal_yogi(); + + // .tensorflow.tpu.FrequencyEstimatorParameters frequency_estimator = 23; + bool has_frequency_estimator() const; + private: + bool _internal_has_frequency_estimator() const; + public: + void clear_frequency_estimator(); + const ::tensorflow::tpu::FrequencyEstimatorParameters& frequency_estimator() const; + PROTOBUF_NODISCARD ::tensorflow::tpu::FrequencyEstimatorParameters* release_frequency_estimator(); + ::tensorflow::tpu::FrequencyEstimatorParameters* mutable_frequency_estimator(); + void set_allocated_frequency_estimator(::tensorflow::tpu::FrequencyEstimatorParameters* frequency_estimator); + private: + const ::tensorflow::tpu::FrequencyEstimatorParameters& _internal_frequency_estimator() const; + ::tensorflow::tpu::FrequencyEstimatorParameters* _internal_mutable_frequency_estimator(); + public: + void unsafe_arena_set_allocated_frequency_estimator( + ::tensorflow::tpu::FrequencyEstimatorParameters* frequency_estimator); + ::tensorflow::tpu::FrequencyEstimatorParameters* unsafe_arena_release_frequency_estimator(); + + // .tensorflow.tpu.UserDefinedProgramParameters user_defined_program = 24; + bool has_user_defined_program() const; + private: + bool _internal_has_user_defined_program() const; + public: + void clear_user_defined_program(); + const ::tensorflow::tpu::UserDefinedProgramParameters& user_defined_program() const; + PROTOBUF_NODISCARD ::tensorflow::tpu::UserDefinedProgramParameters* release_user_defined_program(); + ::tensorflow::tpu::UserDefinedProgramParameters* mutable_user_defined_program(); + void set_allocated_user_defined_program(::tensorflow::tpu::UserDefinedProgramParameters* user_defined_program); + private: + const ::tensorflow::tpu::UserDefinedProgramParameters& _internal_user_defined_program() const; + ::tensorflow::tpu::UserDefinedProgramParameters* _internal_mutable_user_defined_program(); + public: + void unsafe_arena_set_allocated_user_defined_program( + ::tensorflow::tpu::UserDefinedProgramParameters* user_defined_program); + ::tensorflow::tpu::UserDefinedProgramParameters* unsafe_arena_release_user_defined_program(); + + // .tensorflow.tpu.AssignParameters assign = 25; + bool has_assign() const; + private: + bool _internal_has_assign() const; + public: + void clear_assign(); + const ::tensorflow::tpu::AssignParameters& assign() const; + PROTOBUF_NODISCARD ::tensorflow::tpu::AssignParameters* release_assign(); + ::tensorflow::tpu::AssignParameters* mutable_assign(); + void set_allocated_assign(::tensorflow::tpu::AssignParameters* assign); + private: + const ::tensorflow::tpu::AssignParameters& _internal_assign() const; + ::tensorflow::tpu::AssignParameters* _internal_mutable_assign(); + public: + void unsafe_arena_set_allocated_assign( + ::tensorflow::tpu::AssignParameters* assign); + ::tensorflow::tpu::AssignParameters* unsafe_arena_release_assign(); + + void clear_parameters(); + ParametersCase parameters_case() const; + // @@protoc_insertion_point(class_scope:tensorflow.tpu.OptimizationParameters) + private: + class _Internal; + void set_has_adagrad(); + void set_has_adagrad_momentum(); + void set_has_bounded_adagrad(); + void set_has_stochastic_gradient_descent(); + void set_has_ftrl(); + void set_has_adam(); + void set_has_momentum(); + void set_has_lion(); + void set_has_rms_prop(); + void set_has_centered_rms_prop(); + void set_has_mdl_adagrad_light(); + void set_has_adadelta(); + void set_has_proximal_adagrad(); + void set_has_online_yogi(); + void set_has_proximal_yogi(); + void set_has_frequency_estimator(); + void set_has_user_defined_program(); + void set_has_assign(); + + inline bool has_parameters() const; + inline void clear_has_parameters(); + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::tensorflow::tpu::ClippingLimits* clipping_limits_; + ::tensorflow::tpu::ClippingLimits* gradient_clipping_limits_; + ::tensorflow::tpu::LearningRate* learning_rate_; + ::tensorflow::tpu::HotIdReplicationConfiguration* hot_id_replication_configuration_; + ::tensorflow::tpu::SimulatedQuantization* simulated_quantization_; + float weight_decay_factor_; + int gradient_accumulation_status_; + bool multiply_weight_decay_factor_by_learning_rate_; + int low_dimensional_packing_status_; + union ParametersUnion { + constexpr ParametersUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + ::tensorflow::tpu::AdagradParameters* adagrad_; + ::tensorflow::tpu::AdagradMomentumParameters* adagrad_momentum_; + ::tensorflow::tpu::BoundedAdagradParameters* bounded_adagrad_; + ::tensorflow::tpu::StochasticGradientDescentParameters* stochastic_gradient_descent_; + ::tensorflow::tpu::FtrlParameters* ftrl_; + ::tensorflow::tpu::AdamParameters* adam_; + ::tensorflow::tpu::MomentumParameters* momentum_; + ::tensorflow::tpu::LionParameters* lion_; + ::tensorflow::tpu::RmsPropParameters* rms_prop_; + ::tensorflow::tpu::CenteredRmsPropParameters* centered_rms_prop_; + ::tensorflow::tpu::MdlAdagradLightParameters* mdl_adagrad_light_; + ::tensorflow::tpu::AdadeltaParameters* adadelta_; + ::tensorflow::tpu::ProximalAdagradParameters* proximal_adagrad_; + ::tensorflow::tpu::OnlineYogiParameters* online_yogi_; + ::tensorflow::tpu::ProximalYogiParameters* proximal_yogi_; + ::tensorflow::tpu::FrequencyEstimatorParameters* frequency_estimator_; + ::tensorflow::tpu::UserDefinedProgramParameters* user_defined_program_; + ::tensorflow::tpu::AssignParameters* assign_; + } parameters_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + uint32_t _oneof_case_[1]; + + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2ftpu_2foptimization_5fparameters_2eproto; +}; +// ------------------------------------------------------------------- + +class StateVariableSpecification_UserDefined final : + public ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase /* @@protoc_insertion_point(class_definition:tensorflow.tpu.StateVariableSpecification.UserDefined) */ { + public: + inline StateVariableSpecification_UserDefined() : StateVariableSpecification_UserDefined(nullptr) {} + explicit PROTOBUF_CONSTEXPR StateVariableSpecification_UserDefined(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + StateVariableSpecification_UserDefined(const StateVariableSpecification_UserDefined& from); + StateVariableSpecification_UserDefined(StateVariableSpecification_UserDefined&& from) noexcept + : StateVariableSpecification_UserDefined() { + *this = ::std::move(from); + } + + inline StateVariableSpecification_UserDefined& operator=(const StateVariableSpecification_UserDefined& from) { + CopyFrom(from); + return *this; + } + inline StateVariableSpecification_UserDefined& operator=(StateVariableSpecification_UserDefined&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const StateVariableSpecification_UserDefined& default_instance() { + return *internal_default_instance(); + } + static inline const StateVariableSpecification_UserDefined* internal_default_instance() { + return reinterpret_cast( + &_StateVariableSpecification_UserDefined_default_instance_); + } + static constexpr int kIndexInFileMessages = + 26; + + friend void swap(StateVariableSpecification_UserDefined& a, StateVariableSpecification_UserDefined& b) { + a.Swap(&b); + } + inline void Swap(StateVariableSpecification_UserDefined* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(StateVariableSpecification_UserDefined* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + StateVariableSpecification_UserDefined* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::CopyFrom; + inline void CopyFrom(const StateVariableSpecification_UserDefined& from) { + ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::CopyImpl(*this, from); + } + using ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::MergeFrom; + void MergeFrom(const StateVariableSpecification_UserDefined& from) { + ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::MergeImpl(*this, from); + } + public: + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.tpu.StateVariableSpecification.UserDefined"; + } + protected: + explicit StateVariableSpecification_UserDefined(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // @@protoc_insertion_point(class_scope:tensorflow.tpu.StateVariableSpecification.UserDefined) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2ftpu_2foptimization_5fparameters_2eproto; +}; +// ------------------------------------------------------------------- + +class StateVariableSpecification_FillWithConstant final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.tpu.StateVariableSpecification.FillWithConstant) */ { + public: + inline StateVariableSpecification_FillWithConstant() : StateVariableSpecification_FillWithConstant(nullptr) {} + ~StateVariableSpecification_FillWithConstant() override; + explicit PROTOBUF_CONSTEXPR StateVariableSpecification_FillWithConstant(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + StateVariableSpecification_FillWithConstant(const StateVariableSpecification_FillWithConstant& from); + StateVariableSpecification_FillWithConstant(StateVariableSpecification_FillWithConstant&& from) noexcept + : StateVariableSpecification_FillWithConstant() { + *this = ::std::move(from); + } + + inline StateVariableSpecification_FillWithConstant& operator=(const StateVariableSpecification_FillWithConstant& from) { + CopyFrom(from); + return *this; + } + inline StateVariableSpecification_FillWithConstant& operator=(StateVariableSpecification_FillWithConstant&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const StateVariableSpecification_FillWithConstant& default_instance() { + return *internal_default_instance(); + } + static inline const StateVariableSpecification_FillWithConstant* internal_default_instance() { + return reinterpret_cast( + &_StateVariableSpecification_FillWithConstant_default_instance_); + } + static constexpr int kIndexInFileMessages = + 27; + + friend void swap(StateVariableSpecification_FillWithConstant& a, StateVariableSpecification_FillWithConstant& b) { + a.Swap(&b); + } + inline void Swap(StateVariableSpecification_FillWithConstant* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(StateVariableSpecification_FillWithConstant* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + StateVariableSpecification_FillWithConstant* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const StateVariableSpecification_FillWithConstant& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const StateVariableSpecification_FillWithConstant& from) { + StateVariableSpecification_FillWithConstant::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(StateVariableSpecification_FillWithConstant* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.tpu.StateVariableSpecification.FillWithConstant"; + } + protected: + explicit StateVariableSpecification_FillWithConstant(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kInitialValueFieldNumber = 1, + }; + // double initial_value = 1; + void clear_initial_value(); + double initial_value() const; + void set_initial_value(double value); + private: + double _internal_initial_value() const; + void _internal_set_initial_value(double value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.tpu.StateVariableSpecification.FillWithConstant) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + double initial_value_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2ftpu_2foptimization_5fparameters_2eproto; +}; +// ------------------------------------------------------------------- + +class StateVariableSpecification final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.tpu.StateVariableSpecification) */ { + public: + inline StateVariableSpecification() : StateVariableSpecification(nullptr) {} + ~StateVariableSpecification() override; + explicit PROTOBUF_CONSTEXPR StateVariableSpecification(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + StateVariableSpecification(const StateVariableSpecification& from); + StateVariableSpecification(StateVariableSpecification&& from) noexcept + : StateVariableSpecification() { + *this = ::std::move(from); + } + + inline StateVariableSpecification& operator=(const StateVariableSpecification& from) { + CopyFrom(from); + return *this; + } + inline StateVariableSpecification& operator=(StateVariableSpecification&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const StateVariableSpecification& default_instance() { + return *internal_default_instance(); + } + enum UsageCase { + kUserDefined = 2, + kFillWithConstant = 3, + USAGE_NOT_SET = 0, + }; + + static inline const StateVariableSpecification* internal_default_instance() { + return reinterpret_cast( + &_StateVariableSpecification_default_instance_); + } + static constexpr int kIndexInFileMessages = + 28; + + friend void swap(StateVariableSpecification& a, StateVariableSpecification& b) { + a.Swap(&b); + } + inline void Swap(StateVariableSpecification* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(StateVariableSpecification* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + StateVariableSpecification* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const StateVariableSpecification& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const StateVariableSpecification& from) { + StateVariableSpecification::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(StateVariableSpecification* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.tpu.StateVariableSpecification"; + } + protected: + explicit StateVariableSpecification(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + typedef StateVariableSpecification_UserDefined UserDefined; + typedef StateVariableSpecification_FillWithConstant FillWithConstant; + + // accessors ------------------------------------------------------- + + enum : int { + kNameFieldNumber = 1, + kUserDefinedFieldNumber = 2, + kFillWithConstantFieldNumber = 3, + }; + // string name = 1; + void clear_name(); + const std::string& name() const; + template + void set_name(ArgT0&& arg0, ArgT... args); + std::string* mutable_name(); + PROTOBUF_NODISCARD std::string* release_name(); + void set_allocated_name(std::string* name); + private: + const std::string& _internal_name() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_name(const std::string& value); + std::string* _internal_mutable_name(); + public: + + // .tensorflow.tpu.StateVariableSpecification.UserDefined user_defined = 2; + bool has_user_defined() const; + private: + bool _internal_has_user_defined() const; + public: + void clear_user_defined(); + const ::tensorflow::tpu::StateVariableSpecification_UserDefined& user_defined() const; + PROTOBUF_NODISCARD ::tensorflow::tpu::StateVariableSpecification_UserDefined* release_user_defined(); + ::tensorflow::tpu::StateVariableSpecification_UserDefined* mutable_user_defined(); + void set_allocated_user_defined(::tensorflow::tpu::StateVariableSpecification_UserDefined* user_defined); + private: + const ::tensorflow::tpu::StateVariableSpecification_UserDefined& _internal_user_defined() const; + ::tensorflow::tpu::StateVariableSpecification_UserDefined* _internal_mutable_user_defined(); + public: + void unsafe_arena_set_allocated_user_defined( + ::tensorflow::tpu::StateVariableSpecification_UserDefined* user_defined); + ::tensorflow::tpu::StateVariableSpecification_UserDefined* unsafe_arena_release_user_defined(); + + // .tensorflow.tpu.StateVariableSpecification.FillWithConstant fill_with_constant = 3; + bool has_fill_with_constant() const; + private: + bool _internal_has_fill_with_constant() const; + public: + void clear_fill_with_constant(); + const ::tensorflow::tpu::StateVariableSpecification_FillWithConstant& fill_with_constant() const; + PROTOBUF_NODISCARD ::tensorflow::tpu::StateVariableSpecification_FillWithConstant* release_fill_with_constant(); + ::tensorflow::tpu::StateVariableSpecification_FillWithConstant* mutable_fill_with_constant(); + void set_allocated_fill_with_constant(::tensorflow::tpu::StateVariableSpecification_FillWithConstant* fill_with_constant); + private: + const ::tensorflow::tpu::StateVariableSpecification_FillWithConstant& _internal_fill_with_constant() const; + ::tensorflow::tpu::StateVariableSpecification_FillWithConstant* _internal_mutable_fill_with_constant(); + public: + void unsafe_arena_set_allocated_fill_with_constant( + ::tensorflow::tpu::StateVariableSpecification_FillWithConstant* fill_with_constant); + ::tensorflow::tpu::StateVariableSpecification_FillWithConstant* unsafe_arena_release_fill_with_constant(); + + void clear_usage(); + UsageCase usage_case() const; + // @@protoc_insertion_point(class_scope:tensorflow.tpu.StateVariableSpecification) + private: + class _Internal; + void set_has_user_defined(); + void set_has_fill_with_constant(); + + inline bool has_usage() const; + inline void clear_has_usage(); + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_; + union UsageUnion { + constexpr UsageUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + ::tensorflow::tpu::StateVariableSpecification_UserDefined* user_defined_; + ::tensorflow::tpu::StateVariableSpecification_FillWithConstant* fill_with_constant_; + } usage_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + uint32_t _oneof_case_[1]; + + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2ftpu_2foptimization_5fparameters_2eproto; +}; +// =================================================================== + + +// =================================================================== + +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// ClippingLimits + +// .google.protobuf.FloatValue lower = 1; +inline bool ClippingLimits::_internal_has_lower() const { + return this != internal_default_instance() && _impl_.lower_ != nullptr; +} +inline bool ClippingLimits::has_lower() const { + return _internal_has_lower(); +} +inline const ::PROTOBUF_NAMESPACE_ID::FloatValue& ClippingLimits::_internal_lower() const { + const ::PROTOBUF_NAMESPACE_ID::FloatValue* p = _impl_.lower_; + return p != nullptr ? *p : reinterpret_cast( + ::PROTOBUF_NAMESPACE_ID::_FloatValue_default_instance_); +} +inline const ::PROTOBUF_NAMESPACE_ID::FloatValue& ClippingLimits::lower() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.ClippingLimits.lower) + return _internal_lower(); +} +inline void ClippingLimits::unsafe_arena_set_allocated_lower( + ::PROTOBUF_NAMESPACE_ID::FloatValue* lower) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.lower_); + } + _impl_.lower_ = lower; + if (lower) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.tpu.ClippingLimits.lower) +} +inline ::PROTOBUF_NAMESPACE_ID::FloatValue* ClippingLimits::release_lower() { + + ::PROTOBUF_NAMESPACE_ID::FloatValue* temp = _impl_.lower_; + _impl_.lower_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::PROTOBUF_NAMESPACE_ID::FloatValue* ClippingLimits::unsafe_arena_release_lower() { + // @@protoc_insertion_point(field_release:tensorflow.tpu.ClippingLimits.lower) + + ::PROTOBUF_NAMESPACE_ID::FloatValue* temp = _impl_.lower_; + _impl_.lower_ = nullptr; + return temp; +} +inline ::PROTOBUF_NAMESPACE_ID::FloatValue* ClippingLimits::_internal_mutable_lower() { + + if (_impl_.lower_ == nullptr) { + auto* p = CreateMaybeMessage<::PROTOBUF_NAMESPACE_ID::FloatValue>(GetArenaForAllocation()); + _impl_.lower_ = p; + } + return _impl_.lower_; +} +inline ::PROTOBUF_NAMESPACE_ID::FloatValue* ClippingLimits::mutable_lower() { + ::PROTOBUF_NAMESPACE_ID::FloatValue* _msg = _internal_mutable_lower(); + // @@protoc_insertion_point(field_mutable:tensorflow.tpu.ClippingLimits.lower) + return _msg; +} +inline void ClippingLimits::set_allocated_lower(::PROTOBUF_NAMESPACE_ID::FloatValue* lower) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.lower_); + } + if (lower) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( + reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(lower)); + if (message_arena != submessage_arena) { + lower = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, lower, submessage_arena); + } + + } else { + + } + _impl_.lower_ = lower; + // @@protoc_insertion_point(field_set_allocated:tensorflow.tpu.ClippingLimits.lower) +} + +// .google.protobuf.FloatValue upper = 2; +inline bool ClippingLimits::_internal_has_upper() const { + return this != internal_default_instance() && _impl_.upper_ != nullptr; +} +inline bool ClippingLimits::has_upper() const { + return _internal_has_upper(); +} +inline const ::PROTOBUF_NAMESPACE_ID::FloatValue& ClippingLimits::_internal_upper() const { + const ::PROTOBUF_NAMESPACE_ID::FloatValue* p = _impl_.upper_; + return p != nullptr ? *p : reinterpret_cast( + ::PROTOBUF_NAMESPACE_ID::_FloatValue_default_instance_); +} +inline const ::PROTOBUF_NAMESPACE_ID::FloatValue& ClippingLimits::upper() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.ClippingLimits.upper) + return _internal_upper(); +} +inline void ClippingLimits::unsafe_arena_set_allocated_upper( + ::PROTOBUF_NAMESPACE_ID::FloatValue* upper) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.upper_); + } + _impl_.upper_ = upper; + if (upper) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.tpu.ClippingLimits.upper) +} +inline ::PROTOBUF_NAMESPACE_ID::FloatValue* ClippingLimits::release_upper() { + + ::PROTOBUF_NAMESPACE_ID::FloatValue* temp = _impl_.upper_; + _impl_.upper_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::PROTOBUF_NAMESPACE_ID::FloatValue* ClippingLimits::unsafe_arena_release_upper() { + // @@protoc_insertion_point(field_release:tensorflow.tpu.ClippingLimits.upper) + + ::PROTOBUF_NAMESPACE_ID::FloatValue* temp = _impl_.upper_; + _impl_.upper_ = nullptr; + return temp; +} +inline ::PROTOBUF_NAMESPACE_ID::FloatValue* ClippingLimits::_internal_mutable_upper() { + + if (_impl_.upper_ == nullptr) { + auto* p = CreateMaybeMessage<::PROTOBUF_NAMESPACE_ID::FloatValue>(GetArenaForAllocation()); + _impl_.upper_ = p; + } + return _impl_.upper_; +} +inline ::PROTOBUF_NAMESPACE_ID::FloatValue* ClippingLimits::mutable_upper() { + ::PROTOBUF_NAMESPACE_ID::FloatValue* _msg = _internal_mutable_upper(); + // @@protoc_insertion_point(field_mutable:tensorflow.tpu.ClippingLimits.upper) + return _msg; +} +inline void ClippingLimits::set_allocated_upper(::PROTOBUF_NAMESPACE_ID::FloatValue* upper) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.upper_); + } + if (upper) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( + reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(upper)); + if (message_arena != submessage_arena) { + upper = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, upper, submessage_arena); + } + + } else { + + } + _impl_.upper_ = upper; + // @@protoc_insertion_point(field_set_allocated:tensorflow.tpu.ClippingLimits.upper) +} + +// ------------------------------------------------------------------- + +// SimulatedQuantization + +// bool enabled = 1; +inline void SimulatedQuantization::clear_enabled() { + _impl_.enabled_ = false; +} +inline bool SimulatedQuantization::_internal_enabled() const { + return _impl_.enabled_; +} +inline bool SimulatedQuantization::enabled() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.SimulatedQuantization.enabled) + return _internal_enabled(); +} +inline void SimulatedQuantization::_internal_set_enabled(bool value) { + + _impl_.enabled_ = value; +} +inline void SimulatedQuantization::set_enabled(bool value) { + _internal_set_enabled(value); + // @@protoc_insertion_point(field_set:tensorflow.tpu.SimulatedQuantization.enabled) +} + +// .tensorflow.tpu.ClippingLimits clipping_limits = 2; +inline bool SimulatedQuantization::_internal_has_clipping_limits() const { + return this != internal_default_instance() && _impl_.clipping_limits_ != nullptr; +} +inline bool SimulatedQuantization::has_clipping_limits() const { + return _internal_has_clipping_limits(); +} +inline void SimulatedQuantization::clear_clipping_limits() { + if (GetArenaForAllocation() == nullptr && _impl_.clipping_limits_ != nullptr) { + delete _impl_.clipping_limits_; + } + _impl_.clipping_limits_ = nullptr; +} +inline const ::tensorflow::tpu::ClippingLimits& SimulatedQuantization::_internal_clipping_limits() const { + const ::tensorflow::tpu::ClippingLimits* p = _impl_.clipping_limits_; + return p != nullptr ? *p : reinterpret_cast( + ::tensorflow::tpu::_ClippingLimits_default_instance_); +} +inline const ::tensorflow::tpu::ClippingLimits& SimulatedQuantization::clipping_limits() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.SimulatedQuantization.clipping_limits) + return _internal_clipping_limits(); +} +inline void SimulatedQuantization::unsafe_arena_set_allocated_clipping_limits( + ::tensorflow::tpu::ClippingLimits* clipping_limits) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.clipping_limits_); + } + _impl_.clipping_limits_ = clipping_limits; + if (clipping_limits) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.tpu.SimulatedQuantization.clipping_limits) +} +inline ::tensorflow::tpu::ClippingLimits* SimulatedQuantization::release_clipping_limits() { + + ::tensorflow::tpu::ClippingLimits* temp = _impl_.clipping_limits_; + _impl_.clipping_limits_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tensorflow::tpu::ClippingLimits* SimulatedQuantization::unsafe_arena_release_clipping_limits() { + // @@protoc_insertion_point(field_release:tensorflow.tpu.SimulatedQuantization.clipping_limits) + + ::tensorflow::tpu::ClippingLimits* temp = _impl_.clipping_limits_; + _impl_.clipping_limits_ = nullptr; + return temp; +} +inline ::tensorflow::tpu::ClippingLimits* SimulatedQuantization::_internal_mutable_clipping_limits() { + + if (_impl_.clipping_limits_ == nullptr) { + auto* p = CreateMaybeMessage<::tensorflow::tpu::ClippingLimits>(GetArenaForAllocation()); + _impl_.clipping_limits_ = p; + } + return _impl_.clipping_limits_; +} +inline ::tensorflow::tpu::ClippingLimits* SimulatedQuantization::mutable_clipping_limits() { + ::tensorflow::tpu::ClippingLimits* _msg = _internal_mutable_clipping_limits(); + // @@protoc_insertion_point(field_mutable:tensorflow.tpu.SimulatedQuantization.clipping_limits) + return _msg; +} +inline void SimulatedQuantization::set_allocated_clipping_limits(::tensorflow::tpu::ClippingLimits* clipping_limits) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete _impl_.clipping_limits_; + } + if (clipping_limits) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(clipping_limits); + if (message_arena != submessage_arena) { + clipping_limits = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, clipping_limits, submessage_arena); + } + + } else { + + } + _impl_.clipping_limits_ = clipping_limits; + // @@protoc_insertion_point(field_set_allocated:tensorflow.tpu.SimulatedQuantization.clipping_limits) +} + +// int32 num_buckets = 3; +inline void SimulatedQuantization::clear_num_buckets() { + _impl_.num_buckets_ = 0; +} +inline int32_t SimulatedQuantization::_internal_num_buckets() const { + return _impl_.num_buckets_; +} +inline int32_t SimulatedQuantization::num_buckets() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.SimulatedQuantization.num_buckets) + return _internal_num_buckets(); +} +inline void SimulatedQuantization::_internal_set_num_buckets(int32_t value) { + + _impl_.num_buckets_ = value; +} +inline void SimulatedQuantization::set_num_buckets(int32_t value) { + _internal_set_num_buckets(value); + // @@protoc_insertion_point(field_set:tensorflow.tpu.SimulatedQuantization.num_buckets) +} + +// ------------------------------------------------------------------- + +// DynamicLearningRate + +// int32 tag = 1; +inline void DynamicLearningRate::clear_tag() { + _impl_.tag_ = 0; +} +inline int32_t DynamicLearningRate::_internal_tag() const { + return _impl_.tag_; +} +inline int32_t DynamicLearningRate::tag() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.DynamicLearningRate.tag) + return _internal_tag(); +} +inline void DynamicLearningRate::_internal_set_tag(int32_t value) { + + _impl_.tag_ = value; +} +inline void DynamicLearningRate::set_tag(int32_t value) { + _internal_set_tag(value); + // @@protoc_insertion_point(field_set:tensorflow.tpu.DynamicLearningRate.tag) +} + +// ------------------------------------------------------------------- + +// LearningRate + +// float constant = 1; +inline bool LearningRate::_internal_has_constant() const { + return learning_rate_case() == kConstant; +} +inline bool LearningRate::has_constant() const { + return _internal_has_constant(); +} +inline void LearningRate::set_has_constant() { + _impl_._oneof_case_[0] = kConstant; +} +inline void LearningRate::clear_constant() { + if (_internal_has_constant()) { + _impl_.learning_rate_.constant_ = 0; + clear_has_learning_rate(); + } +} +inline float LearningRate::_internal_constant() const { + if (_internal_has_constant()) { + return _impl_.learning_rate_.constant_; + } + return 0; +} +inline void LearningRate::_internal_set_constant(float value) { + if (!_internal_has_constant()) { + clear_learning_rate(); + set_has_constant(); + } + _impl_.learning_rate_.constant_ = value; +} +inline float LearningRate::constant() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.LearningRate.constant) + return _internal_constant(); +} +inline void LearningRate::set_constant(float value) { + _internal_set_constant(value); + // @@protoc_insertion_point(field_set:tensorflow.tpu.LearningRate.constant) +} + +// .tensorflow.tpu.DynamicLearningRate dynamic = 2; +inline bool LearningRate::_internal_has_dynamic() const { + return learning_rate_case() == kDynamic; +} +inline bool LearningRate::has_dynamic() const { + return _internal_has_dynamic(); +} +inline void LearningRate::set_has_dynamic() { + _impl_._oneof_case_[0] = kDynamic; +} +inline void LearningRate::clear_dynamic() { + if (_internal_has_dynamic()) { + if (GetArenaForAllocation() == nullptr) { + delete _impl_.learning_rate_.dynamic_; + } + clear_has_learning_rate(); + } +} +inline ::tensorflow::tpu::DynamicLearningRate* LearningRate::release_dynamic() { + // @@protoc_insertion_point(field_release:tensorflow.tpu.LearningRate.dynamic) + if (_internal_has_dynamic()) { + clear_has_learning_rate(); + ::tensorflow::tpu::DynamicLearningRate* temp = _impl_.learning_rate_.dynamic_; + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + _impl_.learning_rate_.dynamic_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::tensorflow::tpu::DynamicLearningRate& LearningRate::_internal_dynamic() const { + return _internal_has_dynamic() + ? *_impl_.learning_rate_.dynamic_ + : reinterpret_cast< ::tensorflow::tpu::DynamicLearningRate&>(::tensorflow::tpu::_DynamicLearningRate_default_instance_); +} +inline const ::tensorflow::tpu::DynamicLearningRate& LearningRate::dynamic() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.LearningRate.dynamic) + return _internal_dynamic(); +} +inline ::tensorflow::tpu::DynamicLearningRate* LearningRate::unsafe_arena_release_dynamic() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.tpu.LearningRate.dynamic) + if (_internal_has_dynamic()) { + clear_has_learning_rate(); + ::tensorflow::tpu::DynamicLearningRate* temp = _impl_.learning_rate_.dynamic_; + _impl_.learning_rate_.dynamic_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void LearningRate::unsafe_arena_set_allocated_dynamic(::tensorflow::tpu::DynamicLearningRate* dynamic) { + clear_learning_rate(); + if (dynamic) { + set_has_dynamic(); + _impl_.learning_rate_.dynamic_ = dynamic; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.tpu.LearningRate.dynamic) +} +inline ::tensorflow::tpu::DynamicLearningRate* LearningRate::_internal_mutable_dynamic() { + if (!_internal_has_dynamic()) { + clear_learning_rate(); + set_has_dynamic(); + _impl_.learning_rate_.dynamic_ = CreateMaybeMessage< ::tensorflow::tpu::DynamicLearningRate >(GetArenaForAllocation()); + } + return _impl_.learning_rate_.dynamic_; +} +inline ::tensorflow::tpu::DynamicLearningRate* LearningRate::mutable_dynamic() { + ::tensorflow::tpu::DynamicLearningRate* _msg = _internal_mutable_dynamic(); + // @@protoc_insertion_point(field_mutable:tensorflow.tpu.LearningRate.dynamic) + return _msg; +} + +inline bool LearningRate::has_learning_rate() const { + return learning_rate_case() != LEARNING_RATE_NOT_SET; +} +inline void LearningRate::clear_has_learning_rate() { + _impl_._oneof_case_[0] = LEARNING_RATE_NOT_SET; +} +inline LearningRate::LearningRateCase LearningRate::learning_rate_case() const { + return LearningRate::LearningRateCase(_impl_._oneof_case_[0]); +} +// ------------------------------------------------------------------- + +// AdagradParameters + +// ------------------------------------------------------------------- + +// AdagradMomentumParameters + +// float momentum = 1; +inline void AdagradMomentumParameters::clear_momentum() { + _impl_.momentum_ = 0; +} +inline float AdagradMomentumParameters::_internal_momentum() const { + return _impl_.momentum_; +} +inline float AdagradMomentumParameters::momentum() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.AdagradMomentumParameters.momentum) + return _internal_momentum(); +} +inline void AdagradMomentumParameters::_internal_set_momentum(float value) { + + _impl_.momentum_ = value; +} +inline void AdagradMomentumParameters::set_momentum(float value) { + _internal_set_momentum(value); + // @@protoc_insertion_point(field_set:tensorflow.tpu.AdagradMomentumParameters.momentum) +} + +// bool use_nesterov = 2; +inline void AdagradMomentumParameters::clear_use_nesterov() { + _impl_.use_nesterov_ = false; +} +inline bool AdagradMomentumParameters::_internal_use_nesterov() const { + return _impl_.use_nesterov_; +} +inline bool AdagradMomentumParameters::use_nesterov() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.AdagradMomentumParameters.use_nesterov) + return _internal_use_nesterov(); +} +inline void AdagradMomentumParameters::_internal_set_use_nesterov(bool value) { + + _impl_.use_nesterov_ = value; +} +inline void AdagradMomentumParameters::set_use_nesterov(bool value) { + _internal_set_use_nesterov(value); + // @@protoc_insertion_point(field_set:tensorflow.tpu.AdagradMomentumParameters.use_nesterov) +} + +// float exponent = 3; +inline void AdagradMomentumParameters::clear_exponent() { + _impl_.exponent_ = 0; +} +inline float AdagradMomentumParameters::_internal_exponent() const { + return _impl_.exponent_; +} +inline float AdagradMomentumParameters::exponent() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.AdagradMomentumParameters.exponent) + return _internal_exponent(); +} +inline void AdagradMomentumParameters::_internal_set_exponent(float value) { + + _impl_.exponent_ = value; +} +inline void AdagradMomentumParameters::set_exponent(float value) { + _internal_set_exponent(value); + // @@protoc_insertion_point(field_set:tensorflow.tpu.AdagradMomentumParameters.exponent) +} + +// float beta2 = 4; +inline void AdagradMomentumParameters::clear_beta2() { + _impl_.beta2_ = 0; +} +inline float AdagradMomentumParameters::_internal_beta2() const { + return _impl_.beta2_; +} +inline float AdagradMomentumParameters::beta2() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.AdagradMomentumParameters.beta2) + return _internal_beta2(); +} +inline void AdagradMomentumParameters::_internal_set_beta2(float value) { + + _impl_.beta2_ = value; +} +inline void AdagradMomentumParameters::set_beta2(float value) { + _internal_set_beta2(value); + // @@protoc_insertion_point(field_set:tensorflow.tpu.AdagradMomentumParameters.beta2) +} + +// float epsilon = 5; +inline void AdagradMomentumParameters::clear_epsilon() { + _impl_.epsilon_ = 0; +} +inline float AdagradMomentumParameters::_internal_epsilon() const { + return _impl_.epsilon_; +} +inline float AdagradMomentumParameters::epsilon() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.AdagradMomentumParameters.epsilon) + return _internal_epsilon(); +} +inline void AdagradMomentumParameters::_internal_set_epsilon(float value) { + + _impl_.epsilon_ = value; +} +inline void AdagradMomentumParameters::set_epsilon(float value) { + _internal_set_epsilon(value); + // @@protoc_insertion_point(field_set:tensorflow.tpu.AdagradMomentumParameters.epsilon) +} + +// ------------------------------------------------------------------- + +// BoundedAdagradParameters + +// bool update_accumulator_first = 1; +inline void BoundedAdagradParameters::clear_update_accumulator_first() { + _impl_.update_accumulator_first_ = false; +} +inline bool BoundedAdagradParameters::_internal_update_accumulator_first() const { + return _impl_.update_accumulator_first_; +} +inline bool BoundedAdagradParameters::update_accumulator_first() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.BoundedAdagradParameters.update_accumulator_first) + return _internal_update_accumulator_first(); +} +inline void BoundedAdagradParameters::_internal_set_update_accumulator_first(bool value) { + + _impl_.update_accumulator_first_ = value; +} +inline void BoundedAdagradParameters::set_update_accumulator_first(bool value) { + _internal_set_update_accumulator_first(value); + // @@protoc_insertion_point(field_set:tensorflow.tpu.BoundedAdagradParameters.update_accumulator_first) +} + +// float max_var_update = 2; +inline void BoundedAdagradParameters::clear_max_var_update() { + _impl_.max_var_update_ = 0; +} +inline float BoundedAdagradParameters::_internal_max_var_update() const { + return _impl_.max_var_update_; +} +inline float BoundedAdagradParameters::max_var_update() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.BoundedAdagradParameters.max_var_update) + return _internal_max_var_update(); +} +inline void BoundedAdagradParameters::_internal_set_max_var_update(float value) { + + _impl_.max_var_update_ = value; +} +inline void BoundedAdagradParameters::set_max_var_update(float value) { + _internal_set_max_var_update(value); + // @@protoc_insertion_point(field_set:tensorflow.tpu.BoundedAdagradParameters.max_var_update) +} + +// float max_accumulator = 3; +inline void BoundedAdagradParameters::clear_max_accumulator() { + _impl_.max_accumulator_ = 0; +} +inline float BoundedAdagradParameters::_internal_max_accumulator() const { + return _impl_.max_accumulator_; +} +inline float BoundedAdagradParameters::max_accumulator() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.BoundedAdagradParameters.max_accumulator) + return _internal_max_accumulator(); +} +inline void BoundedAdagradParameters::_internal_set_max_accumulator(float value) { + + _impl_.max_accumulator_ = value; +} +inline void BoundedAdagradParameters::set_max_accumulator(float value) { + _internal_set_max_accumulator(value); + // @@protoc_insertion_point(field_set:tensorflow.tpu.BoundedAdagradParameters.max_accumulator) +} + +// ------------------------------------------------------------------- + +// StochasticGradientDescentParameters + +// ------------------------------------------------------------------- + +// FtrlParameters + +// float l1 = 1; +inline void FtrlParameters::clear_l1() { + _impl_.l1_ = 0; +} +inline float FtrlParameters::_internal_l1() const { + return _impl_.l1_; +} +inline float FtrlParameters::l1() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.FtrlParameters.l1) + return _internal_l1(); +} +inline void FtrlParameters::_internal_set_l1(float value) { + + _impl_.l1_ = value; +} +inline void FtrlParameters::set_l1(float value) { + _internal_set_l1(value); + // @@protoc_insertion_point(field_set:tensorflow.tpu.FtrlParameters.l1) +} + +// float l2 = 2; +inline void FtrlParameters::clear_l2() { + _impl_.l2_ = 0; +} +inline float FtrlParameters::_internal_l2() const { + return _impl_.l2_; +} +inline float FtrlParameters::l2() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.FtrlParameters.l2) + return _internal_l2(); +} +inline void FtrlParameters::_internal_set_l2(float value) { + + _impl_.l2_ = value; +} +inline void FtrlParameters::set_l2(float value) { + _internal_set_l2(value); + // @@protoc_insertion_point(field_set:tensorflow.tpu.FtrlParameters.l2) +} + +// float lr_power = 3; +inline void FtrlParameters::clear_lr_power() { + _impl_.lr_power_ = 0; +} +inline float FtrlParameters::_internal_lr_power() const { + return _impl_.lr_power_; +} +inline float FtrlParameters::lr_power() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.FtrlParameters.lr_power) + return _internal_lr_power(); +} +inline void FtrlParameters::_internal_set_lr_power(float value) { + + _impl_.lr_power_ = value; +} +inline void FtrlParameters::set_lr_power(float value) { + _internal_set_lr_power(value); + // @@protoc_insertion_point(field_set:tensorflow.tpu.FtrlParameters.lr_power) +} + +// float beta = 7; +inline void FtrlParameters::clear_beta() { + _impl_.beta_ = 0; +} +inline float FtrlParameters::_internal_beta() const { + return _impl_.beta_; +} +inline float FtrlParameters::beta() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.FtrlParameters.beta) + return _internal_beta(); +} +inline void FtrlParameters::_internal_set_beta(float value) { + + _impl_.beta_ = value; +} +inline void FtrlParameters::set_beta(float value) { + _internal_set_beta(value); + // @@protoc_insertion_point(field_set:tensorflow.tpu.FtrlParameters.beta) +} + +// bool multiply_linear_by_lr = 6; +inline void FtrlParameters::clear_multiply_linear_by_lr() { + _impl_.multiply_linear_by_lr_ = false; +} +inline bool FtrlParameters::_internal_multiply_linear_by_lr() const { + return _impl_.multiply_linear_by_lr_; +} +inline bool FtrlParameters::multiply_linear_by_lr() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.FtrlParameters.multiply_linear_by_lr) + return _internal_multiply_linear_by_lr(); +} +inline void FtrlParameters::_internal_set_multiply_linear_by_lr(bool value) { + + _impl_.multiply_linear_by_lr_ = value; +} +inline void FtrlParameters::set_multiply_linear_by_lr(bool value) { + _internal_set_multiply_linear_by_lr(value); + // @@protoc_insertion_point(field_set:tensorflow.tpu.FtrlParameters.multiply_linear_by_lr) +} + +// bool allow_zero_accumulator = 8 [deprecated = true]; +inline void FtrlParameters::clear_allow_zero_accumulator() { + _impl_.allow_zero_accumulator_ = false; +} +inline bool FtrlParameters::_internal_allow_zero_accumulator() const { + return _impl_.allow_zero_accumulator_; +} +inline bool FtrlParameters::allow_zero_accumulator() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.FtrlParameters.allow_zero_accumulator) + return _internal_allow_zero_accumulator(); +} +inline void FtrlParameters::_internal_set_allow_zero_accumulator(bool value) { + + _impl_.allow_zero_accumulator_ = value; +} +inline void FtrlParameters::set_allow_zero_accumulator(bool value) { + _internal_set_allow_zero_accumulator(value); + // @@protoc_insertion_point(field_set:tensorflow.tpu.FtrlParameters.allow_zero_accumulator) +} + +// ------------------------------------------------------------------- + +// AdamParameters + +// float beta1 = 3; +inline void AdamParameters::clear_beta1() { + _impl_.beta1_ = 0; +} +inline float AdamParameters::_internal_beta1() const { + return _impl_.beta1_; +} +inline float AdamParameters::beta1() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.AdamParameters.beta1) + return _internal_beta1(); +} +inline void AdamParameters::_internal_set_beta1(float value) { + + _impl_.beta1_ = value; +} +inline void AdamParameters::set_beta1(float value) { + _internal_set_beta1(value); + // @@protoc_insertion_point(field_set:tensorflow.tpu.AdamParameters.beta1) +} + +// float beta2 = 4; +inline void AdamParameters::clear_beta2() { + _impl_.beta2_ = 0; +} +inline float AdamParameters::_internal_beta2() const { + return _impl_.beta2_; +} +inline float AdamParameters::beta2() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.AdamParameters.beta2) + return _internal_beta2(); +} +inline void AdamParameters::_internal_set_beta2(float value) { + + _impl_.beta2_ = value; +} +inline void AdamParameters::set_beta2(float value) { + _internal_set_beta2(value); + // @@protoc_insertion_point(field_set:tensorflow.tpu.AdamParameters.beta2) +} + +// float epsilon = 5; +inline void AdamParameters::clear_epsilon() { + _impl_.epsilon_ = 0; +} +inline float AdamParameters::_internal_epsilon() const { + return _impl_.epsilon_; +} +inline float AdamParameters::epsilon() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.AdamParameters.epsilon) + return _internal_epsilon(); +} +inline void AdamParameters::_internal_set_epsilon(float value) { + + _impl_.epsilon_ = value; +} +inline void AdamParameters::set_epsilon(float value) { + _internal_set_epsilon(value); + // @@protoc_insertion_point(field_set:tensorflow.tpu.AdamParameters.epsilon) +} + +// bool use_non_lazy_adam = 8; +inline void AdamParameters::clear_use_non_lazy_adam() { + _impl_.use_non_lazy_adam_ = false; +} +inline bool AdamParameters::_internal_use_non_lazy_adam() const { + return _impl_.use_non_lazy_adam_; +} +inline bool AdamParameters::use_non_lazy_adam() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.AdamParameters.use_non_lazy_adam) + return _internal_use_non_lazy_adam(); +} +inline void AdamParameters::_internal_set_use_non_lazy_adam(bool value) { + + _impl_.use_non_lazy_adam_ = value; +} +inline void AdamParameters::set_use_non_lazy_adam(bool value) { + _internal_set_use_non_lazy_adam(value); + // @@protoc_insertion_point(field_set:tensorflow.tpu.AdamParameters.use_non_lazy_adam) +} + +// bool use_sum_inside_sqrt = 10; +inline void AdamParameters::clear_use_sum_inside_sqrt() { + _impl_.use_sum_inside_sqrt_ = false; +} +inline bool AdamParameters::_internal_use_sum_inside_sqrt() const { + return _impl_.use_sum_inside_sqrt_; +} +inline bool AdamParameters::use_sum_inside_sqrt() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.AdamParameters.use_sum_inside_sqrt) + return _internal_use_sum_inside_sqrt(); +} +inline void AdamParameters::_internal_set_use_sum_inside_sqrt(bool value) { + + _impl_.use_sum_inside_sqrt_ = value; +} +inline void AdamParameters::set_use_sum_inside_sqrt(bool value) { + _internal_set_use_sum_inside_sqrt(value); + // @@protoc_insertion_point(field_set:tensorflow.tpu.AdamParameters.use_sum_inside_sqrt) +} + +// ------------------------------------------------------------------- + +// MomentumParameters + +// float momentum = 1; +inline void MomentumParameters::clear_momentum() { + _impl_.momentum_ = 0; +} +inline float MomentumParameters::_internal_momentum() const { + return _impl_.momentum_; +} +inline float MomentumParameters::momentum() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.MomentumParameters.momentum) + return _internal_momentum(); +} +inline void MomentumParameters::_internal_set_momentum(float value) { + + _impl_.momentum_ = value; +} +inline void MomentumParameters::set_momentum(float value) { + _internal_set_momentum(value); + // @@protoc_insertion_point(field_set:tensorflow.tpu.MomentumParameters.momentum) +} + +// bool use_nesterov = 2; +inline void MomentumParameters::clear_use_nesterov() { + _impl_.use_nesterov_ = false; +} +inline bool MomentumParameters::_internal_use_nesterov() const { + return _impl_.use_nesterov_; +} +inline bool MomentumParameters::use_nesterov() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.MomentumParameters.use_nesterov) + return _internal_use_nesterov(); +} +inline void MomentumParameters::_internal_set_use_nesterov(bool value) { + + _impl_.use_nesterov_ = value; +} +inline void MomentumParameters::set_use_nesterov(bool value) { + _internal_set_use_nesterov(value); + // @@protoc_insertion_point(field_set:tensorflow.tpu.MomentumParameters.use_nesterov) +} + +// ------------------------------------------------------------------- + +// LionParameters + +// float beta1 = 1; +inline void LionParameters::clear_beta1() { + _impl_.beta1_ = 0; +} +inline float LionParameters::_internal_beta1() const { + return _impl_.beta1_; +} +inline float LionParameters::beta1() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.LionParameters.beta1) + return _internal_beta1(); +} +inline void LionParameters::_internal_set_beta1(float value) { + + _impl_.beta1_ = value; +} +inline void LionParameters::set_beta1(float value) { + _internal_set_beta1(value); + // @@protoc_insertion_point(field_set:tensorflow.tpu.LionParameters.beta1) +} + +// float beta2 = 2; +inline void LionParameters::clear_beta2() { + _impl_.beta2_ = 0; +} +inline float LionParameters::_internal_beta2() const { + return _impl_.beta2_; +} +inline float LionParameters::beta2() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.LionParameters.beta2) + return _internal_beta2(); +} +inline void LionParameters::_internal_set_beta2(float value) { + + _impl_.beta2_ = value; +} +inline void LionParameters::set_beta2(float value) { + _internal_set_beta2(value); + // @@protoc_insertion_point(field_set:tensorflow.tpu.LionParameters.beta2) +} + +// bool use_non_lazy_lion = 3; +inline void LionParameters::clear_use_non_lazy_lion() { + _impl_.use_non_lazy_lion_ = false; +} +inline bool LionParameters::_internal_use_non_lazy_lion() const { + return _impl_.use_non_lazy_lion_; +} +inline bool LionParameters::use_non_lazy_lion() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.LionParameters.use_non_lazy_lion) + return _internal_use_non_lazy_lion(); +} +inline void LionParameters::_internal_set_use_non_lazy_lion(bool value) { + + _impl_.use_non_lazy_lion_ = value; +} +inline void LionParameters::set_use_non_lazy_lion(bool value) { + _internal_set_use_non_lazy_lion(value); + // @@protoc_insertion_point(field_set:tensorflow.tpu.LionParameters.use_non_lazy_lion) +} + +// ------------------------------------------------------------------- + +// RmsPropParameters + +// float rho = 1; +inline void RmsPropParameters::clear_rho() { + _impl_.rho_ = 0; +} +inline float RmsPropParameters::_internal_rho() const { + return _impl_.rho_; +} +inline float RmsPropParameters::rho() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.RmsPropParameters.rho) + return _internal_rho(); +} +inline void RmsPropParameters::_internal_set_rho(float value) { + + _impl_.rho_ = value; +} +inline void RmsPropParameters::set_rho(float value) { + _internal_set_rho(value); + // @@protoc_insertion_point(field_set:tensorflow.tpu.RmsPropParameters.rho) +} + +// float momentum = 2; +inline void RmsPropParameters::clear_momentum() { + _impl_.momentum_ = 0; +} +inline float RmsPropParameters::_internal_momentum() const { + return _impl_.momentum_; +} +inline float RmsPropParameters::momentum() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.RmsPropParameters.momentum) + return _internal_momentum(); +} +inline void RmsPropParameters::_internal_set_momentum(float value) { + + _impl_.momentum_ = value; +} +inline void RmsPropParameters::set_momentum(float value) { + _internal_set_momentum(value); + // @@protoc_insertion_point(field_set:tensorflow.tpu.RmsPropParameters.momentum) +} + +// float epsilon = 3; +inline void RmsPropParameters::clear_epsilon() { + _impl_.epsilon_ = 0; +} +inline float RmsPropParameters::_internal_epsilon() const { + return _impl_.epsilon_; +} +inline float RmsPropParameters::epsilon() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.RmsPropParameters.epsilon) + return _internal_epsilon(); +} +inline void RmsPropParameters::_internal_set_epsilon(float value) { + + _impl_.epsilon_ = value; +} +inline void RmsPropParameters::set_epsilon(float value) { + _internal_set_epsilon(value); + // @@protoc_insertion_point(field_set:tensorflow.tpu.RmsPropParameters.epsilon) +} + +// ------------------------------------------------------------------- + +// CenteredRmsPropParameters + +// float rho = 1; +inline void CenteredRmsPropParameters::clear_rho() { + _impl_.rho_ = 0; +} +inline float CenteredRmsPropParameters::_internal_rho() const { + return _impl_.rho_; +} +inline float CenteredRmsPropParameters::rho() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.CenteredRmsPropParameters.rho) + return _internal_rho(); +} +inline void CenteredRmsPropParameters::_internal_set_rho(float value) { + + _impl_.rho_ = value; +} +inline void CenteredRmsPropParameters::set_rho(float value) { + _internal_set_rho(value); + // @@protoc_insertion_point(field_set:tensorflow.tpu.CenteredRmsPropParameters.rho) +} + +// float momentum = 2; +inline void CenteredRmsPropParameters::clear_momentum() { + _impl_.momentum_ = 0; +} +inline float CenteredRmsPropParameters::_internal_momentum() const { + return _impl_.momentum_; +} +inline float CenteredRmsPropParameters::momentum() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.CenteredRmsPropParameters.momentum) + return _internal_momentum(); +} +inline void CenteredRmsPropParameters::_internal_set_momentum(float value) { + + _impl_.momentum_ = value; +} +inline void CenteredRmsPropParameters::set_momentum(float value) { + _internal_set_momentum(value); + // @@protoc_insertion_point(field_set:tensorflow.tpu.CenteredRmsPropParameters.momentum) +} + +// float epsilon = 3; +inline void CenteredRmsPropParameters::clear_epsilon() { + _impl_.epsilon_ = 0; +} +inline float CenteredRmsPropParameters::_internal_epsilon() const { + return _impl_.epsilon_; +} +inline float CenteredRmsPropParameters::epsilon() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.CenteredRmsPropParameters.epsilon) + return _internal_epsilon(); +} +inline void CenteredRmsPropParameters::_internal_set_epsilon(float value) { + + _impl_.epsilon_ = value; +} +inline void CenteredRmsPropParameters::set_epsilon(float value) { + _internal_set_epsilon(value); + // @@protoc_insertion_point(field_set:tensorflow.tpu.CenteredRmsPropParameters.epsilon) +} + +// ------------------------------------------------------------------- + +// MdlAdagradLightParameters + +// float l2 = 1; +inline void MdlAdagradLightParameters::clear_l2() { + _impl_.l2_ = 0; +} +inline float MdlAdagradLightParameters::_internal_l2() const { + return _impl_.l2_; +} +inline float MdlAdagradLightParameters::l2() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.MdlAdagradLightParameters.l2) + return _internal_l2(); +} +inline void MdlAdagradLightParameters::_internal_set_l2(float value) { + + _impl_.l2_ = value; +} +inline void MdlAdagradLightParameters::set_l2(float value) { + _internal_set_l2(value); + // @@protoc_insertion_point(field_set:tensorflow.tpu.MdlAdagradLightParameters.l2) +} + +// float lr_power = 2; +inline void MdlAdagradLightParameters::clear_lr_power() { + _impl_.lr_power_ = 0; +} +inline float MdlAdagradLightParameters::_internal_lr_power() const { + return _impl_.lr_power_; +} +inline float MdlAdagradLightParameters::lr_power() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.MdlAdagradLightParameters.lr_power) + return _internal_lr_power(); +} +inline void MdlAdagradLightParameters::_internal_set_lr_power(float value) { + + _impl_.lr_power_ = value; +} +inline void MdlAdagradLightParameters::set_lr_power(float value) { + _internal_set_lr_power(value); + // @@protoc_insertion_point(field_set:tensorflow.tpu.MdlAdagradLightParameters.lr_power) +} + +// float min_servable_mdl_benefit = 3; +inline void MdlAdagradLightParameters::clear_min_servable_mdl_benefit() { + _impl_.min_servable_mdl_benefit_ = 0; +} +inline float MdlAdagradLightParameters::_internal_min_servable_mdl_benefit() const { + return _impl_.min_servable_mdl_benefit_; +} +inline float MdlAdagradLightParameters::min_servable_mdl_benefit() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.MdlAdagradLightParameters.min_servable_mdl_benefit) + return _internal_min_servable_mdl_benefit(); +} +inline void MdlAdagradLightParameters::_internal_set_min_servable_mdl_benefit(float value) { + + _impl_.min_servable_mdl_benefit_ = value; +} +inline void MdlAdagradLightParameters::set_min_servable_mdl_benefit(float value) { + _internal_set_min_servable_mdl_benefit(value); + // @@protoc_insertion_point(field_set:tensorflow.tpu.MdlAdagradLightParameters.min_servable_mdl_benefit) +} + +// float mdl_mix_in_margin = 4; +inline void MdlAdagradLightParameters::clear_mdl_mix_in_margin() { + _impl_.mdl_mix_in_margin_ = 0; +} +inline float MdlAdagradLightParameters::_internal_mdl_mix_in_margin() const { + return _impl_.mdl_mix_in_margin_; +} +inline float MdlAdagradLightParameters::mdl_mix_in_margin() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.MdlAdagradLightParameters.mdl_mix_in_margin) + return _internal_mdl_mix_in_margin(); +} +inline void MdlAdagradLightParameters::_internal_set_mdl_mix_in_margin(float value) { + + _impl_.mdl_mix_in_margin_ = value; +} +inline void MdlAdagradLightParameters::set_mdl_mix_in_margin(float value) { + _internal_set_mdl_mix_in_margin(value); + // @@protoc_insertion_point(field_set:tensorflow.tpu.MdlAdagradLightParameters.mdl_mix_in_margin) +} + +// float mdl_benefit_rampup_coeff = 5; +inline void MdlAdagradLightParameters::clear_mdl_benefit_rampup_coeff() { + _impl_.mdl_benefit_rampup_coeff_ = 0; +} +inline float MdlAdagradLightParameters::_internal_mdl_benefit_rampup_coeff() const { + return _impl_.mdl_benefit_rampup_coeff_; +} +inline float MdlAdagradLightParameters::mdl_benefit_rampup_coeff() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.MdlAdagradLightParameters.mdl_benefit_rampup_coeff) + return _internal_mdl_benefit_rampup_coeff(); +} +inline void MdlAdagradLightParameters::_internal_set_mdl_benefit_rampup_coeff(float value) { + + _impl_.mdl_benefit_rampup_coeff_ = value; +} +inline void MdlAdagradLightParameters::set_mdl_benefit_rampup_coeff(float value) { + _internal_set_mdl_benefit_rampup_coeff(value); + // @@protoc_insertion_point(field_set:tensorflow.tpu.MdlAdagradLightParameters.mdl_benefit_rampup_coeff) +} + +// float mdl_min_weight = 6; +inline void MdlAdagradLightParameters::clear_mdl_min_weight() { + _impl_.mdl_min_weight_ = 0; +} +inline float MdlAdagradLightParameters::_internal_mdl_min_weight() const { + return _impl_.mdl_min_weight_; +} +inline float MdlAdagradLightParameters::mdl_min_weight() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.MdlAdagradLightParameters.mdl_min_weight) + return _internal_mdl_min_weight(); +} +inline void MdlAdagradLightParameters::_internal_set_mdl_min_weight(float value) { + + _impl_.mdl_min_weight_ = value; +} +inline void MdlAdagradLightParameters::set_mdl_min_weight(float value) { + _internal_set_mdl_min_weight(value); + // @@protoc_insertion_point(field_set:tensorflow.tpu.MdlAdagradLightParameters.mdl_min_weight) +} + +// float benefit_revisit_scale = 7; +inline void MdlAdagradLightParameters::clear_benefit_revisit_scale() { + _impl_.benefit_revisit_scale_ = 0; +} +inline float MdlAdagradLightParameters::_internal_benefit_revisit_scale() const { + return _impl_.benefit_revisit_scale_; +} +inline float MdlAdagradLightParameters::benefit_revisit_scale() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.MdlAdagradLightParameters.benefit_revisit_scale) + return _internal_benefit_revisit_scale(); +} +inline void MdlAdagradLightParameters::_internal_set_benefit_revisit_scale(float value) { + + _impl_.benefit_revisit_scale_ = value; +} +inline void MdlAdagradLightParameters::set_benefit_revisit_scale(float value) { + _internal_set_benefit_revisit_scale(value); + // @@protoc_insertion_point(field_set:tensorflow.tpu.MdlAdagradLightParameters.benefit_revisit_scale) +} + +// float max_event_benefit = 8; +inline void MdlAdagradLightParameters::clear_max_event_benefit() { + _impl_.max_event_benefit_ = 0; +} +inline float MdlAdagradLightParameters::_internal_max_event_benefit() const { + return _impl_.max_event_benefit_; +} +inline float MdlAdagradLightParameters::max_event_benefit() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.MdlAdagradLightParameters.max_event_benefit) + return _internal_max_event_benefit(); +} +inline void MdlAdagradLightParameters::_internal_set_max_event_benefit(float value) { + + _impl_.max_event_benefit_ = value; +} +inline void MdlAdagradLightParameters::set_max_event_benefit(float value) { + _internal_set_max_event_benefit(value); + // @@protoc_insertion_point(field_set:tensorflow.tpu.MdlAdagradLightParameters.max_event_benefit) +} + +// float max_total_benefit = 9; +inline void MdlAdagradLightParameters::clear_max_total_benefit() { + _impl_.max_total_benefit_ = 0; +} +inline float MdlAdagradLightParameters::_internal_max_total_benefit() const { + return _impl_.max_total_benefit_; +} +inline float MdlAdagradLightParameters::max_total_benefit() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.MdlAdagradLightParameters.max_total_benefit) + return _internal_max_total_benefit(); +} +inline void MdlAdagradLightParameters::_internal_set_max_total_benefit(float value) { + + _impl_.max_total_benefit_ = value; +} +inline void MdlAdagradLightParameters::set_max_total_benefit(float value) { + _internal_set_max_total_benefit(value); + // @@protoc_insertion_point(field_set:tensorflow.tpu.MdlAdagradLightParameters.max_total_benefit) +} + +// float mdl_hard_limit = 10; +inline void MdlAdagradLightParameters::clear_mdl_hard_limit() { + _impl_.mdl_hard_limit_ = 0; +} +inline float MdlAdagradLightParameters::_internal_mdl_hard_limit() const { + return _impl_.mdl_hard_limit_; +} +inline float MdlAdagradLightParameters::mdl_hard_limit() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.MdlAdagradLightParameters.mdl_hard_limit) + return _internal_mdl_hard_limit(); +} +inline void MdlAdagradLightParameters::_internal_set_mdl_hard_limit(float value) { + + _impl_.mdl_hard_limit_ = value; +} +inline void MdlAdagradLightParameters::set_mdl_hard_limit(float value) { + _internal_set_mdl_hard_limit(value); + // @@protoc_insertion_point(field_set:tensorflow.tpu.MdlAdagradLightParameters.mdl_hard_limit) +} + +// bool hard_limit_min_benefit = 11; +inline void MdlAdagradLightParameters::clear_hard_limit_min_benefit() { + _impl_.hard_limit_min_benefit_ = false; +} +inline bool MdlAdagradLightParameters::_internal_hard_limit_min_benefit() const { + return _impl_.hard_limit_min_benefit_; +} +inline bool MdlAdagradLightParameters::hard_limit_min_benefit() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.MdlAdagradLightParameters.hard_limit_min_benefit) + return _internal_hard_limit_min_benefit(); +} +inline void MdlAdagradLightParameters::_internal_set_hard_limit_min_benefit(bool value) { + + _impl_.hard_limit_min_benefit_ = value; +} +inline void MdlAdagradLightParameters::set_hard_limit_min_benefit(bool value) { + _internal_set_hard_limit_min_benefit(value); + // @@protoc_insertion_point(field_set:tensorflow.tpu.MdlAdagradLightParameters.hard_limit_min_benefit) +} + +// bool mdl_regularize = 12; +inline void MdlAdagradLightParameters::clear_mdl_regularize() { + _impl_.mdl_regularize_ = false; +} +inline bool MdlAdagradLightParameters::_internal_mdl_regularize() const { + return _impl_.mdl_regularize_; +} +inline bool MdlAdagradLightParameters::mdl_regularize() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.MdlAdagradLightParameters.mdl_regularize) + return _internal_mdl_regularize(); +} +inline void MdlAdagradLightParameters::_internal_set_mdl_regularize(bool value) { + + _impl_.mdl_regularize_ = value; +} +inline void MdlAdagradLightParameters::set_mdl_regularize(bool value) { + _internal_set_mdl_regularize(value); + // @@protoc_insertion_point(field_set:tensorflow.tpu.MdlAdagradLightParameters.mdl_regularize) +} + +// ------------------------------------------------------------------- + +// AdadeltaParameters + +// float rho = 1; +inline void AdadeltaParameters::clear_rho() { + _impl_.rho_ = 0; +} +inline float AdadeltaParameters::_internal_rho() const { + return _impl_.rho_; +} +inline float AdadeltaParameters::rho() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.AdadeltaParameters.rho) + return _internal_rho(); +} +inline void AdadeltaParameters::_internal_set_rho(float value) { + + _impl_.rho_ = value; +} +inline void AdadeltaParameters::set_rho(float value) { + _internal_set_rho(value); + // @@protoc_insertion_point(field_set:tensorflow.tpu.AdadeltaParameters.rho) +} + +// float epsilon = 2; +inline void AdadeltaParameters::clear_epsilon() { + _impl_.epsilon_ = 0; +} +inline float AdadeltaParameters::_internal_epsilon() const { + return _impl_.epsilon_; +} +inline float AdadeltaParameters::epsilon() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.AdadeltaParameters.epsilon) + return _internal_epsilon(); +} +inline void AdadeltaParameters::_internal_set_epsilon(float value) { + + _impl_.epsilon_ = value; +} +inline void AdadeltaParameters::set_epsilon(float value) { + _internal_set_epsilon(value); + // @@protoc_insertion_point(field_set:tensorflow.tpu.AdadeltaParameters.epsilon) +} + +// ------------------------------------------------------------------- + +// ProximalAdagradParameters + +// float l1 = 1; +inline void ProximalAdagradParameters::clear_l1() { + _impl_.l1_ = 0; +} +inline float ProximalAdagradParameters::_internal_l1() const { + return _impl_.l1_; +} +inline float ProximalAdagradParameters::l1() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.ProximalAdagradParameters.l1) + return _internal_l1(); +} +inline void ProximalAdagradParameters::_internal_set_l1(float value) { + + _impl_.l1_ = value; +} +inline void ProximalAdagradParameters::set_l1(float value) { + _internal_set_l1(value); + // @@protoc_insertion_point(field_set:tensorflow.tpu.ProximalAdagradParameters.l1) +} + +// float l2 = 2; +inline void ProximalAdagradParameters::clear_l2() { + _impl_.l2_ = 0; +} +inline float ProximalAdagradParameters::_internal_l2() const { + return _impl_.l2_; +} +inline float ProximalAdagradParameters::l2() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.ProximalAdagradParameters.l2) + return _internal_l2(); +} +inline void ProximalAdagradParameters::_internal_set_l2(float value) { + + _impl_.l2_ = value; +} +inline void ProximalAdagradParameters::set_l2(float value) { + _internal_set_l2(value); + // @@protoc_insertion_point(field_set:tensorflow.tpu.ProximalAdagradParameters.l2) +} + +// ------------------------------------------------------------------- + +// OnlineYogiParameters + +// float l1 = 1; +inline void OnlineYogiParameters::clear_l1() { + _impl_.l1_ = 0; +} +inline float OnlineYogiParameters::_internal_l1() const { + return _impl_.l1_; +} +inline float OnlineYogiParameters::l1() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.OnlineYogiParameters.l1) + return _internal_l1(); +} +inline void OnlineYogiParameters::_internal_set_l1(float value) { + + _impl_.l1_ = value; +} +inline void OnlineYogiParameters::set_l1(float value) { + _internal_set_l1(value); + // @@protoc_insertion_point(field_set:tensorflow.tpu.OnlineYogiParameters.l1) +} + +// float l2 = 2; +inline void OnlineYogiParameters::clear_l2() { + _impl_.l2_ = 0; +} +inline float OnlineYogiParameters::_internal_l2() const { + return _impl_.l2_; +} +inline float OnlineYogiParameters::l2() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.OnlineYogiParameters.l2) + return _internal_l2(); +} +inline void OnlineYogiParameters::_internal_set_l2(float value) { + + _impl_.l2_ = value; +} +inline void OnlineYogiParameters::set_l2(float value) { + _internal_set_l2(value); + // @@protoc_insertion_point(field_set:tensorflow.tpu.OnlineYogiParameters.l2) +} + +// float beta2 = 3; +inline void OnlineYogiParameters::clear_beta2() { + _impl_.beta2_ = 0; +} +inline float OnlineYogiParameters::_internal_beta2() const { + return _impl_.beta2_; +} +inline float OnlineYogiParameters::beta2() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.OnlineYogiParameters.beta2) + return _internal_beta2(); +} +inline void OnlineYogiParameters::_internal_set_beta2(float value) { + + _impl_.beta2_ = value; +} +inline void OnlineYogiParameters::set_beta2(float value) { + _internal_set_beta2(value); + // @@protoc_insertion_point(field_set:tensorflow.tpu.OnlineYogiParameters.beta2) +} + +// ------------------------------------------------------------------- + +// ProximalYogiParameters + +// float l1 = 1; +inline void ProximalYogiParameters::clear_l1() { + _impl_.l1_ = 0; +} +inline float ProximalYogiParameters::_internal_l1() const { + return _impl_.l1_; +} +inline float ProximalYogiParameters::l1() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.ProximalYogiParameters.l1) + return _internal_l1(); +} +inline void ProximalYogiParameters::_internal_set_l1(float value) { + + _impl_.l1_ = value; +} +inline void ProximalYogiParameters::set_l1(float value) { + _internal_set_l1(value); + // @@protoc_insertion_point(field_set:tensorflow.tpu.ProximalYogiParameters.l1) +} + +// float l2 = 2; +inline void ProximalYogiParameters::clear_l2() { + _impl_.l2_ = 0; +} +inline float ProximalYogiParameters::_internal_l2() const { + return _impl_.l2_; +} +inline float ProximalYogiParameters::l2() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.ProximalYogiParameters.l2) + return _internal_l2(); +} +inline void ProximalYogiParameters::_internal_set_l2(float value) { + + _impl_.l2_ = value; +} +inline void ProximalYogiParameters::set_l2(float value) { + _internal_set_l2(value); + // @@protoc_insertion_point(field_set:tensorflow.tpu.ProximalYogiParameters.l2) +} + +// float beta1 = 3; +inline void ProximalYogiParameters::clear_beta1() { + _impl_.beta1_ = 0; +} +inline float ProximalYogiParameters::_internal_beta1() const { + return _impl_.beta1_; +} +inline float ProximalYogiParameters::beta1() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.ProximalYogiParameters.beta1) + return _internal_beta1(); +} +inline void ProximalYogiParameters::_internal_set_beta1(float value) { + + _impl_.beta1_ = value; +} +inline void ProximalYogiParameters::set_beta1(float value) { + _internal_set_beta1(value); + // @@protoc_insertion_point(field_set:tensorflow.tpu.ProximalYogiParameters.beta1) +} + +// float beta2 = 4; +inline void ProximalYogiParameters::clear_beta2() { + _impl_.beta2_ = 0; +} +inline float ProximalYogiParameters::_internal_beta2() const { + return _impl_.beta2_; +} +inline float ProximalYogiParameters::beta2() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.ProximalYogiParameters.beta2) + return _internal_beta2(); +} +inline void ProximalYogiParameters::_internal_set_beta2(float value) { + + _impl_.beta2_ = value; +} +inline void ProximalYogiParameters::set_beta2(float value) { + _internal_set_beta2(value); + // @@protoc_insertion_point(field_set:tensorflow.tpu.ProximalYogiParameters.beta2) +} + +// float epsilon = 5; +inline void ProximalYogiParameters::clear_epsilon() { + _impl_.epsilon_ = 0; +} +inline float ProximalYogiParameters::_internal_epsilon() const { + return _impl_.epsilon_; +} +inline float ProximalYogiParameters::epsilon() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.ProximalYogiParameters.epsilon) + return _internal_epsilon(); +} +inline void ProximalYogiParameters::_internal_set_epsilon(float value) { + + _impl_.epsilon_ = value; +} +inline void ProximalYogiParameters::set_epsilon(float value) { + _internal_set_epsilon(value); + // @@protoc_insertion_point(field_set:tensorflow.tpu.ProximalYogiParameters.epsilon) +} + +// ------------------------------------------------------------------- + +// FrequencyEstimatorParameters + +// float tau = 1; +inline void FrequencyEstimatorParameters::clear_tau() { + _impl_.tau_ = 0; +} +inline float FrequencyEstimatorParameters::_internal_tau() const { + return _impl_.tau_; +} +inline float FrequencyEstimatorParameters::tau() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.FrequencyEstimatorParameters.tau) + return _internal_tau(); +} +inline void FrequencyEstimatorParameters::_internal_set_tau(float value) { + + _impl_.tau_ = value; +} +inline void FrequencyEstimatorParameters::set_tau(float value) { + _internal_set_tau(value); + // @@protoc_insertion_point(field_set:tensorflow.tpu.FrequencyEstimatorParameters.tau) +} + +// float max_delta = 2; +inline void FrequencyEstimatorParameters::clear_max_delta() { + _impl_.max_delta_ = 0; +} +inline float FrequencyEstimatorParameters::_internal_max_delta() const { + return _impl_.max_delta_; +} +inline float FrequencyEstimatorParameters::max_delta() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.FrequencyEstimatorParameters.max_delta) + return _internal_max_delta(); +} +inline void FrequencyEstimatorParameters::_internal_set_max_delta(float value) { + + _impl_.max_delta_ = value; +} +inline void FrequencyEstimatorParameters::set_max_delta(float value) { + _internal_set_max_delta(value); + // @@protoc_insertion_point(field_set:tensorflow.tpu.FrequencyEstimatorParameters.max_delta) +} + +// float outlier_threshold = 3; +inline void FrequencyEstimatorParameters::clear_outlier_threshold() { + _impl_.outlier_threshold_ = 0; +} +inline float FrequencyEstimatorParameters::_internal_outlier_threshold() const { + return _impl_.outlier_threshold_; +} +inline float FrequencyEstimatorParameters::outlier_threshold() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.FrequencyEstimatorParameters.outlier_threshold) + return _internal_outlier_threshold(); +} +inline void FrequencyEstimatorParameters::_internal_set_outlier_threshold(float value) { + + _impl_.outlier_threshold_ = value; +} +inline void FrequencyEstimatorParameters::set_outlier_threshold(float value) { + _internal_set_outlier_threshold(value); + // @@protoc_insertion_point(field_set:tensorflow.tpu.FrequencyEstimatorParameters.outlier_threshold) +} + +// float weight_exponent = 4; +inline void FrequencyEstimatorParameters::clear_weight_exponent() { + _impl_.weight_exponent_ = 0; +} +inline float FrequencyEstimatorParameters::_internal_weight_exponent() const { + return _impl_.weight_exponent_; +} +inline float FrequencyEstimatorParameters::weight_exponent() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.FrequencyEstimatorParameters.weight_exponent) + return _internal_weight_exponent(); +} +inline void FrequencyEstimatorParameters::_internal_set_weight_exponent(float value) { + + _impl_.weight_exponent_ = value; +} +inline void FrequencyEstimatorParameters::set_weight_exponent(float value) { + _internal_set_weight_exponent(value); + // @@protoc_insertion_point(field_set:tensorflow.tpu.FrequencyEstimatorParameters.weight_exponent) +} + +// ------------------------------------------------------------------- + +// UserDefinedProgramParameters + +// .xla.HloModuleProto program = 1; +inline bool UserDefinedProgramParameters::_internal_has_program() const { + return this != internal_default_instance() && _impl_.program_ != nullptr; +} +inline bool UserDefinedProgramParameters::has_program() const { + return _internal_has_program(); +} +inline const ::xla::HloModuleProto& UserDefinedProgramParameters::_internal_program() const { + const ::xla::HloModuleProto* p = _impl_.program_; + return p != nullptr ? *p : reinterpret_cast( + ::xla::_HloModuleProto_default_instance_); +} +inline const ::xla::HloModuleProto& UserDefinedProgramParameters::program() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.UserDefinedProgramParameters.program) + return _internal_program(); +} +inline void UserDefinedProgramParameters::unsafe_arena_set_allocated_program( + ::xla::HloModuleProto* program) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.program_); + } + _impl_.program_ = program; + if (program) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.tpu.UserDefinedProgramParameters.program) +} +inline ::xla::HloModuleProto* UserDefinedProgramParameters::release_program() { + + ::xla::HloModuleProto* temp = _impl_.program_; + _impl_.program_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::xla::HloModuleProto* UserDefinedProgramParameters::unsafe_arena_release_program() { + // @@protoc_insertion_point(field_release:tensorflow.tpu.UserDefinedProgramParameters.program) + + ::xla::HloModuleProto* temp = _impl_.program_; + _impl_.program_ = nullptr; + return temp; +} +inline ::xla::HloModuleProto* UserDefinedProgramParameters::_internal_mutable_program() { + + if (_impl_.program_ == nullptr) { + auto* p = CreateMaybeMessage<::xla::HloModuleProto>(GetArenaForAllocation()); + _impl_.program_ = p; + } + return _impl_.program_; +} +inline ::xla::HloModuleProto* UserDefinedProgramParameters::mutable_program() { + ::xla::HloModuleProto* _msg = _internal_mutable_program(); + // @@protoc_insertion_point(field_mutable:tensorflow.tpu.UserDefinedProgramParameters.program) + return _msg; +} +inline void UserDefinedProgramParameters::set_allocated_program(::xla::HloModuleProto* program) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.program_); + } + if (program) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( + reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(program)); + if (message_arena != submessage_arena) { + program = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, program, submessage_arena); + } + + } else { + + } + _impl_.program_ = program; + // @@protoc_insertion_point(field_set_allocated:tensorflow.tpu.UserDefinedProgramParameters.program) +} + +// ------------------------------------------------------------------- + +// AssignParameters + +// ------------------------------------------------------------------- + +// GradientAccumulationStatus + +// ------------------------------------------------------------------- + +// LowDimensionalPackingStatus + +// ------------------------------------------------------------------- + +// HotIdReplicationConfiguration + +// .tensorflow.tpu.HotIdReplicationConfiguration.Status status = 1; +inline void HotIdReplicationConfiguration::clear_status() { + _impl_.status_ = 0; +} +inline ::tensorflow::tpu::HotIdReplicationConfiguration_Status HotIdReplicationConfiguration::_internal_status() const { + return static_cast< ::tensorflow::tpu::HotIdReplicationConfiguration_Status >(_impl_.status_); +} +inline ::tensorflow::tpu::HotIdReplicationConfiguration_Status HotIdReplicationConfiguration::status() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.HotIdReplicationConfiguration.status) + return _internal_status(); +} +inline void HotIdReplicationConfiguration::_internal_set_status(::tensorflow::tpu::HotIdReplicationConfiguration_Status value) { + + _impl_.status_ = value; +} +inline void HotIdReplicationConfiguration::set_status(::tensorflow::tpu::HotIdReplicationConfiguration_Status value) { + _internal_set_status(value); + // @@protoc_insertion_point(field_set:tensorflow.tpu.HotIdReplicationConfiguration.status) +} + +// ------------------------------------------------------------------- + +// OptimizationParameters + +// .tensorflow.tpu.LearningRate learning_rate = 13; +inline bool OptimizationParameters::_internal_has_learning_rate() const { + return this != internal_default_instance() && _impl_.learning_rate_ != nullptr; +} +inline bool OptimizationParameters::has_learning_rate() const { + return _internal_has_learning_rate(); +} +inline void OptimizationParameters::clear_learning_rate() { + if (GetArenaForAllocation() == nullptr && _impl_.learning_rate_ != nullptr) { + delete _impl_.learning_rate_; + } + _impl_.learning_rate_ = nullptr; +} +inline const ::tensorflow::tpu::LearningRate& OptimizationParameters::_internal_learning_rate() const { + const ::tensorflow::tpu::LearningRate* p = _impl_.learning_rate_; + return p != nullptr ? *p : reinterpret_cast( + ::tensorflow::tpu::_LearningRate_default_instance_); +} +inline const ::tensorflow::tpu::LearningRate& OptimizationParameters::learning_rate() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.OptimizationParameters.learning_rate) + return _internal_learning_rate(); +} +inline void OptimizationParameters::unsafe_arena_set_allocated_learning_rate( + ::tensorflow::tpu::LearningRate* learning_rate) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.learning_rate_); + } + _impl_.learning_rate_ = learning_rate; + if (learning_rate) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.tpu.OptimizationParameters.learning_rate) +} +inline ::tensorflow::tpu::LearningRate* OptimizationParameters::release_learning_rate() { + + ::tensorflow::tpu::LearningRate* temp = _impl_.learning_rate_; + _impl_.learning_rate_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tensorflow::tpu::LearningRate* OptimizationParameters::unsafe_arena_release_learning_rate() { + // @@protoc_insertion_point(field_release:tensorflow.tpu.OptimizationParameters.learning_rate) + + ::tensorflow::tpu::LearningRate* temp = _impl_.learning_rate_; + _impl_.learning_rate_ = nullptr; + return temp; +} +inline ::tensorflow::tpu::LearningRate* OptimizationParameters::_internal_mutable_learning_rate() { + + if (_impl_.learning_rate_ == nullptr) { + auto* p = CreateMaybeMessage<::tensorflow::tpu::LearningRate>(GetArenaForAllocation()); + _impl_.learning_rate_ = p; + } + return _impl_.learning_rate_; +} +inline ::tensorflow::tpu::LearningRate* OptimizationParameters::mutable_learning_rate() { + ::tensorflow::tpu::LearningRate* _msg = _internal_mutable_learning_rate(); + // @@protoc_insertion_point(field_mutable:tensorflow.tpu.OptimizationParameters.learning_rate) + return _msg; +} +inline void OptimizationParameters::set_allocated_learning_rate(::tensorflow::tpu::LearningRate* learning_rate) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete _impl_.learning_rate_; + } + if (learning_rate) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(learning_rate); + if (message_arena != submessage_arena) { + learning_rate = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, learning_rate, submessage_arena); + } + + } else { + + } + _impl_.learning_rate_ = learning_rate; + // @@protoc_insertion_point(field_set_allocated:tensorflow.tpu.OptimizationParameters.learning_rate) +} + +// .tensorflow.tpu.ClippingLimits clipping_limits = 2; +inline bool OptimizationParameters::_internal_has_clipping_limits() const { + return this != internal_default_instance() && _impl_.clipping_limits_ != nullptr; +} +inline bool OptimizationParameters::has_clipping_limits() const { + return _internal_has_clipping_limits(); +} +inline void OptimizationParameters::clear_clipping_limits() { + if (GetArenaForAllocation() == nullptr && _impl_.clipping_limits_ != nullptr) { + delete _impl_.clipping_limits_; + } + _impl_.clipping_limits_ = nullptr; +} +inline const ::tensorflow::tpu::ClippingLimits& OptimizationParameters::_internal_clipping_limits() const { + const ::tensorflow::tpu::ClippingLimits* p = _impl_.clipping_limits_; + return p != nullptr ? *p : reinterpret_cast( + ::tensorflow::tpu::_ClippingLimits_default_instance_); +} +inline const ::tensorflow::tpu::ClippingLimits& OptimizationParameters::clipping_limits() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.OptimizationParameters.clipping_limits) + return _internal_clipping_limits(); +} +inline void OptimizationParameters::unsafe_arena_set_allocated_clipping_limits( + ::tensorflow::tpu::ClippingLimits* clipping_limits) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.clipping_limits_); + } + _impl_.clipping_limits_ = clipping_limits; + if (clipping_limits) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.tpu.OptimizationParameters.clipping_limits) +} +inline ::tensorflow::tpu::ClippingLimits* OptimizationParameters::release_clipping_limits() { + + ::tensorflow::tpu::ClippingLimits* temp = _impl_.clipping_limits_; + _impl_.clipping_limits_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tensorflow::tpu::ClippingLimits* OptimizationParameters::unsafe_arena_release_clipping_limits() { + // @@protoc_insertion_point(field_release:tensorflow.tpu.OptimizationParameters.clipping_limits) + + ::tensorflow::tpu::ClippingLimits* temp = _impl_.clipping_limits_; + _impl_.clipping_limits_ = nullptr; + return temp; +} +inline ::tensorflow::tpu::ClippingLimits* OptimizationParameters::_internal_mutable_clipping_limits() { + + if (_impl_.clipping_limits_ == nullptr) { + auto* p = CreateMaybeMessage<::tensorflow::tpu::ClippingLimits>(GetArenaForAllocation()); + _impl_.clipping_limits_ = p; + } + return _impl_.clipping_limits_; +} +inline ::tensorflow::tpu::ClippingLimits* OptimizationParameters::mutable_clipping_limits() { + ::tensorflow::tpu::ClippingLimits* _msg = _internal_mutable_clipping_limits(); + // @@protoc_insertion_point(field_mutable:tensorflow.tpu.OptimizationParameters.clipping_limits) + return _msg; +} +inline void OptimizationParameters::set_allocated_clipping_limits(::tensorflow::tpu::ClippingLimits* clipping_limits) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete _impl_.clipping_limits_; + } + if (clipping_limits) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(clipping_limits); + if (message_arena != submessage_arena) { + clipping_limits = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, clipping_limits, submessage_arena); + } + + } else { + + } + _impl_.clipping_limits_ = clipping_limits; + // @@protoc_insertion_point(field_set_allocated:tensorflow.tpu.OptimizationParameters.clipping_limits) +} + +// .tensorflow.tpu.ClippingLimits gradient_clipping_limits = 7; +inline bool OptimizationParameters::_internal_has_gradient_clipping_limits() const { + return this != internal_default_instance() && _impl_.gradient_clipping_limits_ != nullptr; +} +inline bool OptimizationParameters::has_gradient_clipping_limits() const { + return _internal_has_gradient_clipping_limits(); +} +inline void OptimizationParameters::clear_gradient_clipping_limits() { + if (GetArenaForAllocation() == nullptr && _impl_.gradient_clipping_limits_ != nullptr) { + delete _impl_.gradient_clipping_limits_; + } + _impl_.gradient_clipping_limits_ = nullptr; +} +inline const ::tensorflow::tpu::ClippingLimits& OptimizationParameters::_internal_gradient_clipping_limits() const { + const ::tensorflow::tpu::ClippingLimits* p = _impl_.gradient_clipping_limits_; + return p != nullptr ? *p : reinterpret_cast( + ::tensorflow::tpu::_ClippingLimits_default_instance_); +} +inline const ::tensorflow::tpu::ClippingLimits& OptimizationParameters::gradient_clipping_limits() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.OptimizationParameters.gradient_clipping_limits) + return _internal_gradient_clipping_limits(); +} +inline void OptimizationParameters::unsafe_arena_set_allocated_gradient_clipping_limits( + ::tensorflow::tpu::ClippingLimits* gradient_clipping_limits) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.gradient_clipping_limits_); + } + _impl_.gradient_clipping_limits_ = gradient_clipping_limits; + if (gradient_clipping_limits) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.tpu.OptimizationParameters.gradient_clipping_limits) +} +inline ::tensorflow::tpu::ClippingLimits* OptimizationParameters::release_gradient_clipping_limits() { + + ::tensorflow::tpu::ClippingLimits* temp = _impl_.gradient_clipping_limits_; + _impl_.gradient_clipping_limits_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tensorflow::tpu::ClippingLimits* OptimizationParameters::unsafe_arena_release_gradient_clipping_limits() { + // @@protoc_insertion_point(field_release:tensorflow.tpu.OptimizationParameters.gradient_clipping_limits) + + ::tensorflow::tpu::ClippingLimits* temp = _impl_.gradient_clipping_limits_; + _impl_.gradient_clipping_limits_ = nullptr; + return temp; +} +inline ::tensorflow::tpu::ClippingLimits* OptimizationParameters::_internal_mutable_gradient_clipping_limits() { + + if (_impl_.gradient_clipping_limits_ == nullptr) { + auto* p = CreateMaybeMessage<::tensorflow::tpu::ClippingLimits>(GetArenaForAllocation()); + _impl_.gradient_clipping_limits_ = p; + } + return _impl_.gradient_clipping_limits_; +} +inline ::tensorflow::tpu::ClippingLimits* OptimizationParameters::mutable_gradient_clipping_limits() { + ::tensorflow::tpu::ClippingLimits* _msg = _internal_mutable_gradient_clipping_limits(); + // @@protoc_insertion_point(field_mutable:tensorflow.tpu.OptimizationParameters.gradient_clipping_limits) + return _msg; +} +inline void OptimizationParameters::set_allocated_gradient_clipping_limits(::tensorflow::tpu::ClippingLimits* gradient_clipping_limits) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete _impl_.gradient_clipping_limits_; + } + if (gradient_clipping_limits) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(gradient_clipping_limits); + if (message_arena != submessage_arena) { + gradient_clipping_limits = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, gradient_clipping_limits, submessage_arena); + } + + } else { + + } + _impl_.gradient_clipping_limits_ = gradient_clipping_limits; + // @@protoc_insertion_point(field_set_allocated:tensorflow.tpu.OptimizationParameters.gradient_clipping_limits) +} + +// float weight_decay_factor = 16; +inline void OptimizationParameters::clear_weight_decay_factor() { + _impl_.weight_decay_factor_ = 0; +} +inline float OptimizationParameters::_internal_weight_decay_factor() const { + return _impl_.weight_decay_factor_; +} +inline float OptimizationParameters::weight_decay_factor() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.OptimizationParameters.weight_decay_factor) + return _internal_weight_decay_factor(); +} +inline void OptimizationParameters::_internal_set_weight_decay_factor(float value) { + + _impl_.weight_decay_factor_ = value; +} +inline void OptimizationParameters::set_weight_decay_factor(float value) { + _internal_set_weight_decay_factor(value); + // @@protoc_insertion_point(field_set:tensorflow.tpu.OptimizationParameters.weight_decay_factor) +} + +// bool multiply_weight_decay_factor_by_learning_rate = 22; +inline void OptimizationParameters::clear_multiply_weight_decay_factor_by_learning_rate() { + _impl_.multiply_weight_decay_factor_by_learning_rate_ = false; +} +inline bool OptimizationParameters::_internal_multiply_weight_decay_factor_by_learning_rate() const { + return _impl_.multiply_weight_decay_factor_by_learning_rate_; +} +inline bool OptimizationParameters::multiply_weight_decay_factor_by_learning_rate() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.OptimizationParameters.multiply_weight_decay_factor_by_learning_rate) + return _internal_multiply_weight_decay_factor_by_learning_rate(); +} +inline void OptimizationParameters::_internal_set_multiply_weight_decay_factor_by_learning_rate(bool value) { + + _impl_.multiply_weight_decay_factor_by_learning_rate_ = value; +} +inline void OptimizationParameters::set_multiply_weight_decay_factor_by_learning_rate(bool value) { + _internal_set_multiply_weight_decay_factor_by_learning_rate(value); + // @@protoc_insertion_point(field_set:tensorflow.tpu.OptimizationParameters.multiply_weight_decay_factor_by_learning_rate) +} + +// .tensorflow.tpu.SimulatedQuantization simulated_quantization = 27; +inline bool OptimizationParameters::_internal_has_simulated_quantization() const { + return this != internal_default_instance() && _impl_.simulated_quantization_ != nullptr; +} +inline bool OptimizationParameters::has_simulated_quantization() const { + return _internal_has_simulated_quantization(); +} +inline void OptimizationParameters::clear_simulated_quantization() { + if (GetArenaForAllocation() == nullptr && _impl_.simulated_quantization_ != nullptr) { + delete _impl_.simulated_quantization_; + } + _impl_.simulated_quantization_ = nullptr; +} +inline const ::tensorflow::tpu::SimulatedQuantization& OptimizationParameters::_internal_simulated_quantization() const { + const ::tensorflow::tpu::SimulatedQuantization* p = _impl_.simulated_quantization_; + return p != nullptr ? *p : reinterpret_cast( + ::tensorflow::tpu::_SimulatedQuantization_default_instance_); +} +inline const ::tensorflow::tpu::SimulatedQuantization& OptimizationParameters::simulated_quantization() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.OptimizationParameters.simulated_quantization) + return _internal_simulated_quantization(); +} +inline void OptimizationParameters::unsafe_arena_set_allocated_simulated_quantization( + ::tensorflow::tpu::SimulatedQuantization* simulated_quantization) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.simulated_quantization_); + } + _impl_.simulated_quantization_ = simulated_quantization; + if (simulated_quantization) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.tpu.OptimizationParameters.simulated_quantization) +} +inline ::tensorflow::tpu::SimulatedQuantization* OptimizationParameters::release_simulated_quantization() { + + ::tensorflow::tpu::SimulatedQuantization* temp = _impl_.simulated_quantization_; + _impl_.simulated_quantization_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tensorflow::tpu::SimulatedQuantization* OptimizationParameters::unsafe_arena_release_simulated_quantization() { + // @@protoc_insertion_point(field_release:tensorflow.tpu.OptimizationParameters.simulated_quantization) + + ::tensorflow::tpu::SimulatedQuantization* temp = _impl_.simulated_quantization_; + _impl_.simulated_quantization_ = nullptr; + return temp; +} +inline ::tensorflow::tpu::SimulatedQuantization* OptimizationParameters::_internal_mutable_simulated_quantization() { + + if (_impl_.simulated_quantization_ == nullptr) { + auto* p = CreateMaybeMessage<::tensorflow::tpu::SimulatedQuantization>(GetArenaForAllocation()); + _impl_.simulated_quantization_ = p; + } + return _impl_.simulated_quantization_; +} +inline ::tensorflow::tpu::SimulatedQuantization* OptimizationParameters::mutable_simulated_quantization() { + ::tensorflow::tpu::SimulatedQuantization* _msg = _internal_mutable_simulated_quantization(); + // @@protoc_insertion_point(field_mutable:tensorflow.tpu.OptimizationParameters.simulated_quantization) + return _msg; +} +inline void OptimizationParameters::set_allocated_simulated_quantization(::tensorflow::tpu::SimulatedQuantization* simulated_quantization) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete _impl_.simulated_quantization_; + } + if (simulated_quantization) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(simulated_quantization); + if (message_arena != submessage_arena) { + simulated_quantization = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, simulated_quantization, submessage_arena); + } + + } else { + + } + _impl_.simulated_quantization_ = simulated_quantization; + // @@protoc_insertion_point(field_set_allocated:tensorflow.tpu.OptimizationParameters.simulated_quantization) +} + +// .tensorflow.tpu.GradientAccumulationStatus.Status gradient_accumulation_status = 17; +inline void OptimizationParameters::clear_gradient_accumulation_status() { + _impl_.gradient_accumulation_status_ = 0; +} +inline ::tensorflow::tpu::GradientAccumulationStatus_Status OptimizationParameters::_internal_gradient_accumulation_status() const { + return static_cast< ::tensorflow::tpu::GradientAccumulationStatus_Status >(_impl_.gradient_accumulation_status_); +} +inline ::tensorflow::tpu::GradientAccumulationStatus_Status OptimizationParameters::gradient_accumulation_status() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.OptimizationParameters.gradient_accumulation_status) + return _internal_gradient_accumulation_status(); +} +inline void OptimizationParameters::_internal_set_gradient_accumulation_status(::tensorflow::tpu::GradientAccumulationStatus_Status value) { + + _impl_.gradient_accumulation_status_ = value; +} +inline void OptimizationParameters::set_gradient_accumulation_status(::tensorflow::tpu::GradientAccumulationStatus_Status value) { + _internal_set_gradient_accumulation_status(value); + // @@protoc_insertion_point(field_set:tensorflow.tpu.OptimizationParameters.gradient_accumulation_status) +} + +// .tensorflow.tpu.LowDimensionalPackingStatus.Status low_dimensional_packing_status = 28; +inline void OptimizationParameters::clear_low_dimensional_packing_status() { + _impl_.low_dimensional_packing_status_ = 0; +} +inline ::tensorflow::tpu::LowDimensionalPackingStatus_Status OptimizationParameters::_internal_low_dimensional_packing_status() const { + return static_cast< ::tensorflow::tpu::LowDimensionalPackingStatus_Status >(_impl_.low_dimensional_packing_status_); +} +inline ::tensorflow::tpu::LowDimensionalPackingStatus_Status OptimizationParameters::low_dimensional_packing_status() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.OptimizationParameters.low_dimensional_packing_status) + return _internal_low_dimensional_packing_status(); +} +inline void OptimizationParameters::_internal_set_low_dimensional_packing_status(::tensorflow::tpu::LowDimensionalPackingStatus_Status value) { + + _impl_.low_dimensional_packing_status_ = value; +} +inline void OptimizationParameters::set_low_dimensional_packing_status(::tensorflow::tpu::LowDimensionalPackingStatus_Status value) { + _internal_set_low_dimensional_packing_status(value); + // @@protoc_insertion_point(field_set:tensorflow.tpu.OptimizationParameters.low_dimensional_packing_status) +} + +// .tensorflow.tpu.HotIdReplicationConfiguration hot_id_replication_configuration = 18; +inline bool OptimizationParameters::_internal_has_hot_id_replication_configuration() const { + return this != internal_default_instance() && _impl_.hot_id_replication_configuration_ != nullptr; +} +inline bool OptimizationParameters::has_hot_id_replication_configuration() const { + return _internal_has_hot_id_replication_configuration(); +} +inline void OptimizationParameters::clear_hot_id_replication_configuration() { + if (GetArenaForAllocation() == nullptr && _impl_.hot_id_replication_configuration_ != nullptr) { + delete _impl_.hot_id_replication_configuration_; + } + _impl_.hot_id_replication_configuration_ = nullptr; +} +inline const ::tensorflow::tpu::HotIdReplicationConfiguration& OptimizationParameters::_internal_hot_id_replication_configuration() const { + const ::tensorflow::tpu::HotIdReplicationConfiguration* p = _impl_.hot_id_replication_configuration_; + return p != nullptr ? *p : reinterpret_cast( + ::tensorflow::tpu::_HotIdReplicationConfiguration_default_instance_); +} +inline const ::tensorflow::tpu::HotIdReplicationConfiguration& OptimizationParameters::hot_id_replication_configuration() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.OptimizationParameters.hot_id_replication_configuration) + return _internal_hot_id_replication_configuration(); +} +inline void OptimizationParameters::unsafe_arena_set_allocated_hot_id_replication_configuration( + ::tensorflow::tpu::HotIdReplicationConfiguration* hot_id_replication_configuration) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.hot_id_replication_configuration_); + } + _impl_.hot_id_replication_configuration_ = hot_id_replication_configuration; + if (hot_id_replication_configuration) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.tpu.OptimizationParameters.hot_id_replication_configuration) +} +inline ::tensorflow::tpu::HotIdReplicationConfiguration* OptimizationParameters::release_hot_id_replication_configuration() { + + ::tensorflow::tpu::HotIdReplicationConfiguration* temp = _impl_.hot_id_replication_configuration_; + _impl_.hot_id_replication_configuration_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tensorflow::tpu::HotIdReplicationConfiguration* OptimizationParameters::unsafe_arena_release_hot_id_replication_configuration() { + // @@protoc_insertion_point(field_release:tensorflow.tpu.OptimizationParameters.hot_id_replication_configuration) + + ::tensorflow::tpu::HotIdReplicationConfiguration* temp = _impl_.hot_id_replication_configuration_; + _impl_.hot_id_replication_configuration_ = nullptr; + return temp; +} +inline ::tensorflow::tpu::HotIdReplicationConfiguration* OptimizationParameters::_internal_mutable_hot_id_replication_configuration() { + + if (_impl_.hot_id_replication_configuration_ == nullptr) { + auto* p = CreateMaybeMessage<::tensorflow::tpu::HotIdReplicationConfiguration>(GetArenaForAllocation()); + _impl_.hot_id_replication_configuration_ = p; + } + return _impl_.hot_id_replication_configuration_; +} +inline ::tensorflow::tpu::HotIdReplicationConfiguration* OptimizationParameters::mutable_hot_id_replication_configuration() { + ::tensorflow::tpu::HotIdReplicationConfiguration* _msg = _internal_mutable_hot_id_replication_configuration(); + // @@protoc_insertion_point(field_mutable:tensorflow.tpu.OptimizationParameters.hot_id_replication_configuration) + return _msg; +} +inline void OptimizationParameters::set_allocated_hot_id_replication_configuration(::tensorflow::tpu::HotIdReplicationConfiguration* hot_id_replication_configuration) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete _impl_.hot_id_replication_configuration_; + } + if (hot_id_replication_configuration) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(hot_id_replication_configuration); + if (message_arena != submessage_arena) { + hot_id_replication_configuration = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, hot_id_replication_configuration, submessage_arena); + } + + } else { + + } + _impl_.hot_id_replication_configuration_ = hot_id_replication_configuration; + // @@protoc_insertion_point(field_set_allocated:tensorflow.tpu.OptimizationParameters.hot_id_replication_configuration) +} + +// .tensorflow.tpu.AdagradParameters adagrad = 3; +inline bool OptimizationParameters::_internal_has_adagrad() const { + return parameters_case() == kAdagrad; +} +inline bool OptimizationParameters::has_adagrad() const { + return _internal_has_adagrad(); +} +inline void OptimizationParameters::set_has_adagrad() { + _impl_._oneof_case_[0] = kAdagrad; +} +inline void OptimizationParameters::clear_adagrad() { + if (_internal_has_adagrad()) { + if (GetArenaForAllocation() == nullptr) { + delete _impl_.parameters_.adagrad_; + } + clear_has_parameters(); + } +} +inline ::tensorflow::tpu::AdagradParameters* OptimizationParameters::release_adagrad() { + // @@protoc_insertion_point(field_release:tensorflow.tpu.OptimizationParameters.adagrad) + if (_internal_has_adagrad()) { + clear_has_parameters(); + ::tensorflow::tpu::AdagradParameters* temp = _impl_.parameters_.adagrad_; + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + _impl_.parameters_.adagrad_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::tensorflow::tpu::AdagradParameters& OptimizationParameters::_internal_adagrad() const { + return _internal_has_adagrad() + ? *_impl_.parameters_.adagrad_ + : reinterpret_cast< ::tensorflow::tpu::AdagradParameters&>(::tensorflow::tpu::_AdagradParameters_default_instance_); +} +inline const ::tensorflow::tpu::AdagradParameters& OptimizationParameters::adagrad() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.OptimizationParameters.adagrad) + return _internal_adagrad(); +} +inline ::tensorflow::tpu::AdagradParameters* OptimizationParameters::unsafe_arena_release_adagrad() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.tpu.OptimizationParameters.adagrad) + if (_internal_has_adagrad()) { + clear_has_parameters(); + ::tensorflow::tpu::AdagradParameters* temp = _impl_.parameters_.adagrad_; + _impl_.parameters_.adagrad_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void OptimizationParameters::unsafe_arena_set_allocated_adagrad(::tensorflow::tpu::AdagradParameters* adagrad) { + clear_parameters(); + if (adagrad) { + set_has_adagrad(); + _impl_.parameters_.adagrad_ = adagrad; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.tpu.OptimizationParameters.adagrad) +} +inline ::tensorflow::tpu::AdagradParameters* OptimizationParameters::_internal_mutable_adagrad() { + if (!_internal_has_adagrad()) { + clear_parameters(); + set_has_adagrad(); + _impl_.parameters_.adagrad_ = CreateMaybeMessage< ::tensorflow::tpu::AdagradParameters >(GetArenaForAllocation()); + } + return _impl_.parameters_.adagrad_; +} +inline ::tensorflow::tpu::AdagradParameters* OptimizationParameters::mutable_adagrad() { + ::tensorflow::tpu::AdagradParameters* _msg = _internal_mutable_adagrad(); + // @@protoc_insertion_point(field_mutable:tensorflow.tpu.OptimizationParameters.adagrad) + return _msg; +} + +// .tensorflow.tpu.AdagradMomentumParameters adagrad_momentum = 26; +inline bool OptimizationParameters::_internal_has_adagrad_momentum() const { + return parameters_case() == kAdagradMomentum; +} +inline bool OptimizationParameters::has_adagrad_momentum() const { + return _internal_has_adagrad_momentum(); +} +inline void OptimizationParameters::set_has_adagrad_momentum() { + _impl_._oneof_case_[0] = kAdagradMomentum; +} +inline void OptimizationParameters::clear_adagrad_momentum() { + if (_internal_has_adagrad_momentum()) { + if (GetArenaForAllocation() == nullptr) { + delete _impl_.parameters_.adagrad_momentum_; + } + clear_has_parameters(); + } +} +inline ::tensorflow::tpu::AdagradMomentumParameters* OptimizationParameters::release_adagrad_momentum() { + // @@protoc_insertion_point(field_release:tensorflow.tpu.OptimizationParameters.adagrad_momentum) + if (_internal_has_adagrad_momentum()) { + clear_has_parameters(); + ::tensorflow::tpu::AdagradMomentumParameters* temp = _impl_.parameters_.adagrad_momentum_; + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + _impl_.parameters_.adagrad_momentum_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::tensorflow::tpu::AdagradMomentumParameters& OptimizationParameters::_internal_adagrad_momentum() const { + return _internal_has_adagrad_momentum() + ? *_impl_.parameters_.adagrad_momentum_ + : reinterpret_cast< ::tensorflow::tpu::AdagradMomentumParameters&>(::tensorflow::tpu::_AdagradMomentumParameters_default_instance_); +} +inline const ::tensorflow::tpu::AdagradMomentumParameters& OptimizationParameters::adagrad_momentum() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.OptimizationParameters.adagrad_momentum) + return _internal_adagrad_momentum(); +} +inline ::tensorflow::tpu::AdagradMomentumParameters* OptimizationParameters::unsafe_arena_release_adagrad_momentum() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.tpu.OptimizationParameters.adagrad_momentum) + if (_internal_has_adagrad_momentum()) { + clear_has_parameters(); + ::tensorflow::tpu::AdagradMomentumParameters* temp = _impl_.parameters_.adagrad_momentum_; + _impl_.parameters_.adagrad_momentum_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void OptimizationParameters::unsafe_arena_set_allocated_adagrad_momentum(::tensorflow::tpu::AdagradMomentumParameters* adagrad_momentum) { + clear_parameters(); + if (adagrad_momentum) { + set_has_adagrad_momentum(); + _impl_.parameters_.adagrad_momentum_ = adagrad_momentum; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.tpu.OptimizationParameters.adagrad_momentum) +} +inline ::tensorflow::tpu::AdagradMomentumParameters* OptimizationParameters::_internal_mutable_adagrad_momentum() { + if (!_internal_has_adagrad_momentum()) { + clear_parameters(); + set_has_adagrad_momentum(); + _impl_.parameters_.adagrad_momentum_ = CreateMaybeMessage< ::tensorflow::tpu::AdagradMomentumParameters >(GetArenaForAllocation()); + } + return _impl_.parameters_.adagrad_momentum_; +} +inline ::tensorflow::tpu::AdagradMomentumParameters* OptimizationParameters::mutable_adagrad_momentum() { + ::tensorflow::tpu::AdagradMomentumParameters* _msg = _internal_mutable_adagrad_momentum(); + // @@protoc_insertion_point(field_mutable:tensorflow.tpu.OptimizationParameters.adagrad_momentum) + return _msg; +} + +// .tensorflow.tpu.BoundedAdagradParameters bounded_adagrad = 19; +inline bool OptimizationParameters::_internal_has_bounded_adagrad() const { + return parameters_case() == kBoundedAdagrad; +} +inline bool OptimizationParameters::has_bounded_adagrad() const { + return _internal_has_bounded_adagrad(); +} +inline void OptimizationParameters::set_has_bounded_adagrad() { + _impl_._oneof_case_[0] = kBoundedAdagrad; +} +inline void OptimizationParameters::clear_bounded_adagrad() { + if (_internal_has_bounded_adagrad()) { + if (GetArenaForAllocation() == nullptr) { + delete _impl_.parameters_.bounded_adagrad_; + } + clear_has_parameters(); + } +} +inline ::tensorflow::tpu::BoundedAdagradParameters* OptimizationParameters::release_bounded_adagrad() { + // @@protoc_insertion_point(field_release:tensorflow.tpu.OptimizationParameters.bounded_adagrad) + if (_internal_has_bounded_adagrad()) { + clear_has_parameters(); + ::tensorflow::tpu::BoundedAdagradParameters* temp = _impl_.parameters_.bounded_adagrad_; + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + _impl_.parameters_.bounded_adagrad_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::tensorflow::tpu::BoundedAdagradParameters& OptimizationParameters::_internal_bounded_adagrad() const { + return _internal_has_bounded_adagrad() + ? *_impl_.parameters_.bounded_adagrad_ + : reinterpret_cast< ::tensorflow::tpu::BoundedAdagradParameters&>(::tensorflow::tpu::_BoundedAdagradParameters_default_instance_); +} +inline const ::tensorflow::tpu::BoundedAdagradParameters& OptimizationParameters::bounded_adagrad() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.OptimizationParameters.bounded_adagrad) + return _internal_bounded_adagrad(); +} +inline ::tensorflow::tpu::BoundedAdagradParameters* OptimizationParameters::unsafe_arena_release_bounded_adagrad() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.tpu.OptimizationParameters.bounded_adagrad) + if (_internal_has_bounded_adagrad()) { + clear_has_parameters(); + ::tensorflow::tpu::BoundedAdagradParameters* temp = _impl_.parameters_.bounded_adagrad_; + _impl_.parameters_.bounded_adagrad_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void OptimizationParameters::unsafe_arena_set_allocated_bounded_adagrad(::tensorflow::tpu::BoundedAdagradParameters* bounded_adagrad) { + clear_parameters(); + if (bounded_adagrad) { + set_has_bounded_adagrad(); + _impl_.parameters_.bounded_adagrad_ = bounded_adagrad; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.tpu.OptimizationParameters.bounded_adagrad) +} +inline ::tensorflow::tpu::BoundedAdagradParameters* OptimizationParameters::_internal_mutable_bounded_adagrad() { + if (!_internal_has_bounded_adagrad()) { + clear_parameters(); + set_has_bounded_adagrad(); + _impl_.parameters_.bounded_adagrad_ = CreateMaybeMessage< ::tensorflow::tpu::BoundedAdagradParameters >(GetArenaForAllocation()); + } + return _impl_.parameters_.bounded_adagrad_; +} +inline ::tensorflow::tpu::BoundedAdagradParameters* OptimizationParameters::mutable_bounded_adagrad() { + ::tensorflow::tpu::BoundedAdagradParameters* _msg = _internal_mutable_bounded_adagrad(); + // @@protoc_insertion_point(field_mutable:tensorflow.tpu.OptimizationParameters.bounded_adagrad) + return _msg; +} + +// .tensorflow.tpu.StochasticGradientDescentParameters stochastic_gradient_descent = 4; +inline bool OptimizationParameters::_internal_has_stochastic_gradient_descent() const { + return parameters_case() == kStochasticGradientDescent; +} +inline bool OptimizationParameters::has_stochastic_gradient_descent() const { + return _internal_has_stochastic_gradient_descent(); +} +inline void OptimizationParameters::set_has_stochastic_gradient_descent() { + _impl_._oneof_case_[0] = kStochasticGradientDescent; +} +inline void OptimizationParameters::clear_stochastic_gradient_descent() { + if (_internal_has_stochastic_gradient_descent()) { + if (GetArenaForAllocation() == nullptr) { + delete _impl_.parameters_.stochastic_gradient_descent_; + } + clear_has_parameters(); + } +} +inline ::tensorflow::tpu::StochasticGradientDescentParameters* OptimizationParameters::release_stochastic_gradient_descent() { + // @@protoc_insertion_point(field_release:tensorflow.tpu.OptimizationParameters.stochastic_gradient_descent) + if (_internal_has_stochastic_gradient_descent()) { + clear_has_parameters(); + ::tensorflow::tpu::StochasticGradientDescentParameters* temp = _impl_.parameters_.stochastic_gradient_descent_; + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + _impl_.parameters_.stochastic_gradient_descent_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::tensorflow::tpu::StochasticGradientDescentParameters& OptimizationParameters::_internal_stochastic_gradient_descent() const { + return _internal_has_stochastic_gradient_descent() + ? *_impl_.parameters_.stochastic_gradient_descent_ + : reinterpret_cast< ::tensorflow::tpu::StochasticGradientDescentParameters&>(::tensorflow::tpu::_StochasticGradientDescentParameters_default_instance_); +} +inline const ::tensorflow::tpu::StochasticGradientDescentParameters& OptimizationParameters::stochastic_gradient_descent() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.OptimizationParameters.stochastic_gradient_descent) + return _internal_stochastic_gradient_descent(); +} +inline ::tensorflow::tpu::StochasticGradientDescentParameters* OptimizationParameters::unsafe_arena_release_stochastic_gradient_descent() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.tpu.OptimizationParameters.stochastic_gradient_descent) + if (_internal_has_stochastic_gradient_descent()) { + clear_has_parameters(); + ::tensorflow::tpu::StochasticGradientDescentParameters* temp = _impl_.parameters_.stochastic_gradient_descent_; + _impl_.parameters_.stochastic_gradient_descent_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void OptimizationParameters::unsafe_arena_set_allocated_stochastic_gradient_descent(::tensorflow::tpu::StochasticGradientDescentParameters* stochastic_gradient_descent) { + clear_parameters(); + if (stochastic_gradient_descent) { + set_has_stochastic_gradient_descent(); + _impl_.parameters_.stochastic_gradient_descent_ = stochastic_gradient_descent; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.tpu.OptimizationParameters.stochastic_gradient_descent) +} +inline ::tensorflow::tpu::StochasticGradientDescentParameters* OptimizationParameters::_internal_mutable_stochastic_gradient_descent() { + if (!_internal_has_stochastic_gradient_descent()) { + clear_parameters(); + set_has_stochastic_gradient_descent(); + _impl_.parameters_.stochastic_gradient_descent_ = CreateMaybeMessage< ::tensorflow::tpu::StochasticGradientDescentParameters >(GetArenaForAllocation()); + } + return _impl_.parameters_.stochastic_gradient_descent_; +} +inline ::tensorflow::tpu::StochasticGradientDescentParameters* OptimizationParameters::mutable_stochastic_gradient_descent() { + ::tensorflow::tpu::StochasticGradientDescentParameters* _msg = _internal_mutable_stochastic_gradient_descent(); + // @@protoc_insertion_point(field_mutable:tensorflow.tpu.OptimizationParameters.stochastic_gradient_descent) + return _msg; +} + +// .tensorflow.tpu.FtrlParameters ftrl = 5; +inline bool OptimizationParameters::_internal_has_ftrl() const { + return parameters_case() == kFtrl; +} +inline bool OptimizationParameters::has_ftrl() const { + return _internal_has_ftrl(); +} +inline void OptimizationParameters::set_has_ftrl() { + _impl_._oneof_case_[0] = kFtrl; +} +inline void OptimizationParameters::clear_ftrl() { + if (_internal_has_ftrl()) { + if (GetArenaForAllocation() == nullptr) { + delete _impl_.parameters_.ftrl_; + } + clear_has_parameters(); + } +} +inline ::tensorflow::tpu::FtrlParameters* OptimizationParameters::release_ftrl() { + // @@protoc_insertion_point(field_release:tensorflow.tpu.OptimizationParameters.ftrl) + if (_internal_has_ftrl()) { + clear_has_parameters(); + ::tensorflow::tpu::FtrlParameters* temp = _impl_.parameters_.ftrl_; + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + _impl_.parameters_.ftrl_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::tensorflow::tpu::FtrlParameters& OptimizationParameters::_internal_ftrl() const { + return _internal_has_ftrl() + ? *_impl_.parameters_.ftrl_ + : reinterpret_cast< ::tensorflow::tpu::FtrlParameters&>(::tensorflow::tpu::_FtrlParameters_default_instance_); +} +inline const ::tensorflow::tpu::FtrlParameters& OptimizationParameters::ftrl() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.OptimizationParameters.ftrl) + return _internal_ftrl(); +} +inline ::tensorflow::tpu::FtrlParameters* OptimizationParameters::unsafe_arena_release_ftrl() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.tpu.OptimizationParameters.ftrl) + if (_internal_has_ftrl()) { + clear_has_parameters(); + ::tensorflow::tpu::FtrlParameters* temp = _impl_.parameters_.ftrl_; + _impl_.parameters_.ftrl_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void OptimizationParameters::unsafe_arena_set_allocated_ftrl(::tensorflow::tpu::FtrlParameters* ftrl) { + clear_parameters(); + if (ftrl) { + set_has_ftrl(); + _impl_.parameters_.ftrl_ = ftrl; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.tpu.OptimizationParameters.ftrl) +} +inline ::tensorflow::tpu::FtrlParameters* OptimizationParameters::_internal_mutable_ftrl() { + if (!_internal_has_ftrl()) { + clear_parameters(); + set_has_ftrl(); + _impl_.parameters_.ftrl_ = CreateMaybeMessage< ::tensorflow::tpu::FtrlParameters >(GetArenaForAllocation()); + } + return _impl_.parameters_.ftrl_; +} +inline ::tensorflow::tpu::FtrlParameters* OptimizationParameters::mutable_ftrl() { + ::tensorflow::tpu::FtrlParameters* _msg = _internal_mutable_ftrl(); + // @@protoc_insertion_point(field_mutable:tensorflow.tpu.OptimizationParameters.ftrl) + return _msg; +} + +// .tensorflow.tpu.AdamParameters adam = 6; +inline bool OptimizationParameters::_internal_has_adam() const { + return parameters_case() == kAdam; +} +inline bool OptimizationParameters::has_adam() const { + return _internal_has_adam(); +} +inline void OptimizationParameters::set_has_adam() { + _impl_._oneof_case_[0] = kAdam; +} +inline void OptimizationParameters::clear_adam() { + if (_internal_has_adam()) { + if (GetArenaForAllocation() == nullptr) { + delete _impl_.parameters_.adam_; + } + clear_has_parameters(); + } +} +inline ::tensorflow::tpu::AdamParameters* OptimizationParameters::release_adam() { + // @@protoc_insertion_point(field_release:tensorflow.tpu.OptimizationParameters.adam) + if (_internal_has_adam()) { + clear_has_parameters(); + ::tensorflow::tpu::AdamParameters* temp = _impl_.parameters_.adam_; + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + _impl_.parameters_.adam_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::tensorflow::tpu::AdamParameters& OptimizationParameters::_internal_adam() const { + return _internal_has_adam() + ? *_impl_.parameters_.adam_ + : reinterpret_cast< ::tensorflow::tpu::AdamParameters&>(::tensorflow::tpu::_AdamParameters_default_instance_); +} +inline const ::tensorflow::tpu::AdamParameters& OptimizationParameters::adam() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.OptimizationParameters.adam) + return _internal_adam(); +} +inline ::tensorflow::tpu::AdamParameters* OptimizationParameters::unsafe_arena_release_adam() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.tpu.OptimizationParameters.adam) + if (_internal_has_adam()) { + clear_has_parameters(); + ::tensorflow::tpu::AdamParameters* temp = _impl_.parameters_.adam_; + _impl_.parameters_.adam_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void OptimizationParameters::unsafe_arena_set_allocated_adam(::tensorflow::tpu::AdamParameters* adam) { + clear_parameters(); + if (adam) { + set_has_adam(); + _impl_.parameters_.adam_ = adam; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.tpu.OptimizationParameters.adam) +} +inline ::tensorflow::tpu::AdamParameters* OptimizationParameters::_internal_mutable_adam() { + if (!_internal_has_adam()) { + clear_parameters(); + set_has_adam(); + _impl_.parameters_.adam_ = CreateMaybeMessage< ::tensorflow::tpu::AdamParameters >(GetArenaForAllocation()); + } + return _impl_.parameters_.adam_; +} +inline ::tensorflow::tpu::AdamParameters* OptimizationParameters::mutable_adam() { + ::tensorflow::tpu::AdamParameters* _msg = _internal_mutable_adam(); + // @@protoc_insertion_point(field_mutable:tensorflow.tpu.OptimizationParameters.adam) + return _msg; +} + +// .tensorflow.tpu.MomentumParameters momentum = 8; +inline bool OptimizationParameters::_internal_has_momentum() const { + return parameters_case() == kMomentum; +} +inline bool OptimizationParameters::has_momentum() const { + return _internal_has_momentum(); +} +inline void OptimizationParameters::set_has_momentum() { + _impl_._oneof_case_[0] = kMomentum; +} +inline void OptimizationParameters::clear_momentum() { + if (_internal_has_momentum()) { + if (GetArenaForAllocation() == nullptr) { + delete _impl_.parameters_.momentum_; + } + clear_has_parameters(); + } +} +inline ::tensorflow::tpu::MomentumParameters* OptimizationParameters::release_momentum() { + // @@protoc_insertion_point(field_release:tensorflow.tpu.OptimizationParameters.momentum) + if (_internal_has_momentum()) { + clear_has_parameters(); + ::tensorflow::tpu::MomentumParameters* temp = _impl_.parameters_.momentum_; + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + _impl_.parameters_.momentum_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::tensorflow::tpu::MomentumParameters& OptimizationParameters::_internal_momentum() const { + return _internal_has_momentum() + ? *_impl_.parameters_.momentum_ + : reinterpret_cast< ::tensorflow::tpu::MomentumParameters&>(::tensorflow::tpu::_MomentumParameters_default_instance_); +} +inline const ::tensorflow::tpu::MomentumParameters& OptimizationParameters::momentum() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.OptimizationParameters.momentum) + return _internal_momentum(); +} +inline ::tensorflow::tpu::MomentumParameters* OptimizationParameters::unsafe_arena_release_momentum() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.tpu.OptimizationParameters.momentum) + if (_internal_has_momentum()) { + clear_has_parameters(); + ::tensorflow::tpu::MomentumParameters* temp = _impl_.parameters_.momentum_; + _impl_.parameters_.momentum_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void OptimizationParameters::unsafe_arena_set_allocated_momentum(::tensorflow::tpu::MomentumParameters* momentum) { + clear_parameters(); + if (momentum) { + set_has_momentum(); + _impl_.parameters_.momentum_ = momentum; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.tpu.OptimizationParameters.momentum) +} +inline ::tensorflow::tpu::MomentumParameters* OptimizationParameters::_internal_mutable_momentum() { + if (!_internal_has_momentum()) { + clear_parameters(); + set_has_momentum(); + _impl_.parameters_.momentum_ = CreateMaybeMessage< ::tensorflow::tpu::MomentumParameters >(GetArenaForAllocation()); + } + return _impl_.parameters_.momentum_; +} +inline ::tensorflow::tpu::MomentumParameters* OptimizationParameters::mutable_momentum() { + ::tensorflow::tpu::MomentumParameters* _msg = _internal_mutable_momentum(); + // @@protoc_insertion_point(field_mutable:tensorflow.tpu.OptimizationParameters.momentum) + return _msg; +} + +// .tensorflow.tpu.LionParameters lion = 29; +inline bool OptimizationParameters::_internal_has_lion() const { + return parameters_case() == kLion; +} +inline bool OptimizationParameters::has_lion() const { + return _internal_has_lion(); +} +inline void OptimizationParameters::set_has_lion() { + _impl_._oneof_case_[0] = kLion; +} +inline void OptimizationParameters::clear_lion() { + if (_internal_has_lion()) { + if (GetArenaForAllocation() == nullptr) { + delete _impl_.parameters_.lion_; + } + clear_has_parameters(); + } +} +inline ::tensorflow::tpu::LionParameters* OptimizationParameters::release_lion() { + // @@protoc_insertion_point(field_release:tensorflow.tpu.OptimizationParameters.lion) + if (_internal_has_lion()) { + clear_has_parameters(); + ::tensorflow::tpu::LionParameters* temp = _impl_.parameters_.lion_; + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + _impl_.parameters_.lion_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::tensorflow::tpu::LionParameters& OptimizationParameters::_internal_lion() const { + return _internal_has_lion() + ? *_impl_.parameters_.lion_ + : reinterpret_cast< ::tensorflow::tpu::LionParameters&>(::tensorflow::tpu::_LionParameters_default_instance_); +} +inline const ::tensorflow::tpu::LionParameters& OptimizationParameters::lion() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.OptimizationParameters.lion) + return _internal_lion(); +} +inline ::tensorflow::tpu::LionParameters* OptimizationParameters::unsafe_arena_release_lion() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.tpu.OptimizationParameters.lion) + if (_internal_has_lion()) { + clear_has_parameters(); + ::tensorflow::tpu::LionParameters* temp = _impl_.parameters_.lion_; + _impl_.parameters_.lion_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void OptimizationParameters::unsafe_arena_set_allocated_lion(::tensorflow::tpu::LionParameters* lion) { + clear_parameters(); + if (lion) { + set_has_lion(); + _impl_.parameters_.lion_ = lion; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.tpu.OptimizationParameters.lion) +} +inline ::tensorflow::tpu::LionParameters* OptimizationParameters::_internal_mutable_lion() { + if (!_internal_has_lion()) { + clear_parameters(); + set_has_lion(); + _impl_.parameters_.lion_ = CreateMaybeMessage< ::tensorflow::tpu::LionParameters >(GetArenaForAllocation()); + } + return _impl_.parameters_.lion_; +} +inline ::tensorflow::tpu::LionParameters* OptimizationParameters::mutable_lion() { + ::tensorflow::tpu::LionParameters* _msg = _internal_mutable_lion(); + // @@protoc_insertion_point(field_mutable:tensorflow.tpu.OptimizationParameters.lion) + return _msg; +} + +// .tensorflow.tpu.RmsPropParameters rms_prop = 9; +inline bool OptimizationParameters::_internal_has_rms_prop() const { + return parameters_case() == kRmsProp; +} +inline bool OptimizationParameters::has_rms_prop() const { + return _internal_has_rms_prop(); +} +inline void OptimizationParameters::set_has_rms_prop() { + _impl_._oneof_case_[0] = kRmsProp; +} +inline void OptimizationParameters::clear_rms_prop() { + if (_internal_has_rms_prop()) { + if (GetArenaForAllocation() == nullptr) { + delete _impl_.parameters_.rms_prop_; + } + clear_has_parameters(); + } +} +inline ::tensorflow::tpu::RmsPropParameters* OptimizationParameters::release_rms_prop() { + // @@protoc_insertion_point(field_release:tensorflow.tpu.OptimizationParameters.rms_prop) + if (_internal_has_rms_prop()) { + clear_has_parameters(); + ::tensorflow::tpu::RmsPropParameters* temp = _impl_.parameters_.rms_prop_; + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + _impl_.parameters_.rms_prop_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::tensorflow::tpu::RmsPropParameters& OptimizationParameters::_internal_rms_prop() const { + return _internal_has_rms_prop() + ? *_impl_.parameters_.rms_prop_ + : reinterpret_cast< ::tensorflow::tpu::RmsPropParameters&>(::tensorflow::tpu::_RmsPropParameters_default_instance_); +} +inline const ::tensorflow::tpu::RmsPropParameters& OptimizationParameters::rms_prop() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.OptimizationParameters.rms_prop) + return _internal_rms_prop(); +} +inline ::tensorflow::tpu::RmsPropParameters* OptimizationParameters::unsafe_arena_release_rms_prop() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.tpu.OptimizationParameters.rms_prop) + if (_internal_has_rms_prop()) { + clear_has_parameters(); + ::tensorflow::tpu::RmsPropParameters* temp = _impl_.parameters_.rms_prop_; + _impl_.parameters_.rms_prop_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void OptimizationParameters::unsafe_arena_set_allocated_rms_prop(::tensorflow::tpu::RmsPropParameters* rms_prop) { + clear_parameters(); + if (rms_prop) { + set_has_rms_prop(); + _impl_.parameters_.rms_prop_ = rms_prop; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.tpu.OptimizationParameters.rms_prop) +} +inline ::tensorflow::tpu::RmsPropParameters* OptimizationParameters::_internal_mutable_rms_prop() { + if (!_internal_has_rms_prop()) { + clear_parameters(); + set_has_rms_prop(); + _impl_.parameters_.rms_prop_ = CreateMaybeMessage< ::tensorflow::tpu::RmsPropParameters >(GetArenaForAllocation()); + } + return _impl_.parameters_.rms_prop_; +} +inline ::tensorflow::tpu::RmsPropParameters* OptimizationParameters::mutable_rms_prop() { + ::tensorflow::tpu::RmsPropParameters* _msg = _internal_mutable_rms_prop(); + // @@protoc_insertion_point(field_mutable:tensorflow.tpu.OptimizationParameters.rms_prop) + return _msg; +} + +// .tensorflow.tpu.CenteredRmsPropParameters centered_rms_prop = 10; +inline bool OptimizationParameters::_internal_has_centered_rms_prop() const { + return parameters_case() == kCenteredRmsProp; +} +inline bool OptimizationParameters::has_centered_rms_prop() const { + return _internal_has_centered_rms_prop(); +} +inline void OptimizationParameters::set_has_centered_rms_prop() { + _impl_._oneof_case_[0] = kCenteredRmsProp; +} +inline void OptimizationParameters::clear_centered_rms_prop() { + if (_internal_has_centered_rms_prop()) { + if (GetArenaForAllocation() == nullptr) { + delete _impl_.parameters_.centered_rms_prop_; + } + clear_has_parameters(); + } +} +inline ::tensorflow::tpu::CenteredRmsPropParameters* OptimizationParameters::release_centered_rms_prop() { + // @@protoc_insertion_point(field_release:tensorflow.tpu.OptimizationParameters.centered_rms_prop) + if (_internal_has_centered_rms_prop()) { + clear_has_parameters(); + ::tensorflow::tpu::CenteredRmsPropParameters* temp = _impl_.parameters_.centered_rms_prop_; + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + _impl_.parameters_.centered_rms_prop_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::tensorflow::tpu::CenteredRmsPropParameters& OptimizationParameters::_internal_centered_rms_prop() const { + return _internal_has_centered_rms_prop() + ? *_impl_.parameters_.centered_rms_prop_ + : reinterpret_cast< ::tensorflow::tpu::CenteredRmsPropParameters&>(::tensorflow::tpu::_CenteredRmsPropParameters_default_instance_); +} +inline const ::tensorflow::tpu::CenteredRmsPropParameters& OptimizationParameters::centered_rms_prop() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.OptimizationParameters.centered_rms_prop) + return _internal_centered_rms_prop(); +} +inline ::tensorflow::tpu::CenteredRmsPropParameters* OptimizationParameters::unsafe_arena_release_centered_rms_prop() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.tpu.OptimizationParameters.centered_rms_prop) + if (_internal_has_centered_rms_prop()) { + clear_has_parameters(); + ::tensorflow::tpu::CenteredRmsPropParameters* temp = _impl_.parameters_.centered_rms_prop_; + _impl_.parameters_.centered_rms_prop_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void OptimizationParameters::unsafe_arena_set_allocated_centered_rms_prop(::tensorflow::tpu::CenteredRmsPropParameters* centered_rms_prop) { + clear_parameters(); + if (centered_rms_prop) { + set_has_centered_rms_prop(); + _impl_.parameters_.centered_rms_prop_ = centered_rms_prop; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.tpu.OptimizationParameters.centered_rms_prop) +} +inline ::tensorflow::tpu::CenteredRmsPropParameters* OptimizationParameters::_internal_mutable_centered_rms_prop() { + if (!_internal_has_centered_rms_prop()) { + clear_parameters(); + set_has_centered_rms_prop(); + _impl_.parameters_.centered_rms_prop_ = CreateMaybeMessage< ::tensorflow::tpu::CenteredRmsPropParameters >(GetArenaForAllocation()); + } + return _impl_.parameters_.centered_rms_prop_; +} +inline ::tensorflow::tpu::CenteredRmsPropParameters* OptimizationParameters::mutable_centered_rms_prop() { + ::tensorflow::tpu::CenteredRmsPropParameters* _msg = _internal_mutable_centered_rms_prop(); + // @@protoc_insertion_point(field_mutable:tensorflow.tpu.OptimizationParameters.centered_rms_prop) + return _msg; +} + +// .tensorflow.tpu.MdlAdagradLightParameters mdl_adagrad_light = 11; +inline bool OptimizationParameters::_internal_has_mdl_adagrad_light() const { + return parameters_case() == kMdlAdagradLight; +} +inline bool OptimizationParameters::has_mdl_adagrad_light() const { + return _internal_has_mdl_adagrad_light(); +} +inline void OptimizationParameters::set_has_mdl_adagrad_light() { + _impl_._oneof_case_[0] = kMdlAdagradLight; +} +inline void OptimizationParameters::clear_mdl_adagrad_light() { + if (_internal_has_mdl_adagrad_light()) { + if (GetArenaForAllocation() == nullptr) { + delete _impl_.parameters_.mdl_adagrad_light_; + } + clear_has_parameters(); + } +} +inline ::tensorflow::tpu::MdlAdagradLightParameters* OptimizationParameters::release_mdl_adagrad_light() { + // @@protoc_insertion_point(field_release:tensorflow.tpu.OptimizationParameters.mdl_adagrad_light) + if (_internal_has_mdl_adagrad_light()) { + clear_has_parameters(); + ::tensorflow::tpu::MdlAdagradLightParameters* temp = _impl_.parameters_.mdl_adagrad_light_; + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + _impl_.parameters_.mdl_adagrad_light_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::tensorflow::tpu::MdlAdagradLightParameters& OptimizationParameters::_internal_mdl_adagrad_light() const { + return _internal_has_mdl_adagrad_light() + ? *_impl_.parameters_.mdl_adagrad_light_ + : reinterpret_cast< ::tensorflow::tpu::MdlAdagradLightParameters&>(::tensorflow::tpu::_MdlAdagradLightParameters_default_instance_); +} +inline const ::tensorflow::tpu::MdlAdagradLightParameters& OptimizationParameters::mdl_adagrad_light() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.OptimizationParameters.mdl_adagrad_light) + return _internal_mdl_adagrad_light(); +} +inline ::tensorflow::tpu::MdlAdagradLightParameters* OptimizationParameters::unsafe_arena_release_mdl_adagrad_light() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.tpu.OptimizationParameters.mdl_adagrad_light) + if (_internal_has_mdl_adagrad_light()) { + clear_has_parameters(); + ::tensorflow::tpu::MdlAdagradLightParameters* temp = _impl_.parameters_.mdl_adagrad_light_; + _impl_.parameters_.mdl_adagrad_light_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void OptimizationParameters::unsafe_arena_set_allocated_mdl_adagrad_light(::tensorflow::tpu::MdlAdagradLightParameters* mdl_adagrad_light) { + clear_parameters(); + if (mdl_adagrad_light) { + set_has_mdl_adagrad_light(); + _impl_.parameters_.mdl_adagrad_light_ = mdl_adagrad_light; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.tpu.OptimizationParameters.mdl_adagrad_light) +} +inline ::tensorflow::tpu::MdlAdagradLightParameters* OptimizationParameters::_internal_mutable_mdl_adagrad_light() { + if (!_internal_has_mdl_adagrad_light()) { + clear_parameters(); + set_has_mdl_adagrad_light(); + _impl_.parameters_.mdl_adagrad_light_ = CreateMaybeMessage< ::tensorflow::tpu::MdlAdagradLightParameters >(GetArenaForAllocation()); + } + return _impl_.parameters_.mdl_adagrad_light_; +} +inline ::tensorflow::tpu::MdlAdagradLightParameters* OptimizationParameters::mutable_mdl_adagrad_light() { + ::tensorflow::tpu::MdlAdagradLightParameters* _msg = _internal_mutable_mdl_adagrad_light(); + // @@protoc_insertion_point(field_mutable:tensorflow.tpu.OptimizationParameters.mdl_adagrad_light) + return _msg; +} + +// .tensorflow.tpu.AdadeltaParameters adadelta = 12; +inline bool OptimizationParameters::_internal_has_adadelta() const { + return parameters_case() == kAdadelta; +} +inline bool OptimizationParameters::has_adadelta() const { + return _internal_has_adadelta(); +} +inline void OptimizationParameters::set_has_adadelta() { + _impl_._oneof_case_[0] = kAdadelta; +} +inline void OptimizationParameters::clear_adadelta() { + if (_internal_has_adadelta()) { + if (GetArenaForAllocation() == nullptr) { + delete _impl_.parameters_.adadelta_; + } + clear_has_parameters(); + } +} +inline ::tensorflow::tpu::AdadeltaParameters* OptimizationParameters::release_adadelta() { + // @@protoc_insertion_point(field_release:tensorflow.tpu.OptimizationParameters.adadelta) + if (_internal_has_adadelta()) { + clear_has_parameters(); + ::tensorflow::tpu::AdadeltaParameters* temp = _impl_.parameters_.adadelta_; + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + _impl_.parameters_.adadelta_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::tensorflow::tpu::AdadeltaParameters& OptimizationParameters::_internal_adadelta() const { + return _internal_has_adadelta() + ? *_impl_.parameters_.adadelta_ + : reinterpret_cast< ::tensorflow::tpu::AdadeltaParameters&>(::tensorflow::tpu::_AdadeltaParameters_default_instance_); +} +inline const ::tensorflow::tpu::AdadeltaParameters& OptimizationParameters::adadelta() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.OptimizationParameters.adadelta) + return _internal_adadelta(); +} +inline ::tensorflow::tpu::AdadeltaParameters* OptimizationParameters::unsafe_arena_release_adadelta() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.tpu.OptimizationParameters.adadelta) + if (_internal_has_adadelta()) { + clear_has_parameters(); + ::tensorflow::tpu::AdadeltaParameters* temp = _impl_.parameters_.adadelta_; + _impl_.parameters_.adadelta_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void OptimizationParameters::unsafe_arena_set_allocated_adadelta(::tensorflow::tpu::AdadeltaParameters* adadelta) { + clear_parameters(); + if (adadelta) { + set_has_adadelta(); + _impl_.parameters_.adadelta_ = adadelta; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.tpu.OptimizationParameters.adadelta) +} +inline ::tensorflow::tpu::AdadeltaParameters* OptimizationParameters::_internal_mutable_adadelta() { + if (!_internal_has_adadelta()) { + clear_parameters(); + set_has_adadelta(); + _impl_.parameters_.adadelta_ = CreateMaybeMessage< ::tensorflow::tpu::AdadeltaParameters >(GetArenaForAllocation()); + } + return _impl_.parameters_.adadelta_; +} +inline ::tensorflow::tpu::AdadeltaParameters* OptimizationParameters::mutable_adadelta() { + ::tensorflow::tpu::AdadeltaParameters* _msg = _internal_mutable_adadelta(); + // @@protoc_insertion_point(field_mutable:tensorflow.tpu.OptimizationParameters.adadelta) + return _msg; +} + +// .tensorflow.tpu.ProximalAdagradParameters proximal_adagrad = 14; +inline bool OptimizationParameters::_internal_has_proximal_adagrad() const { + return parameters_case() == kProximalAdagrad; +} +inline bool OptimizationParameters::has_proximal_adagrad() const { + return _internal_has_proximal_adagrad(); +} +inline void OptimizationParameters::set_has_proximal_adagrad() { + _impl_._oneof_case_[0] = kProximalAdagrad; +} +inline void OptimizationParameters::clear_proximal_adagrad() { + if (_internal_has_proximal_adagrad()) { + if (GetArenaForAllocation() == nullptr) { + delete _impl_.parameters_.proximal_adagrad_; + } + clear_has_parameters(); + } +} +inline ::tensorflow::tpu::ProximalAdagradParameters* OptimizationParameters::release_proximal_adagrad() { + // @@protoc_insertion_point(field_release:tensorflow.tpu.OptimizationParameters.proximal_adagrad) + if (_internal_has_proximal_adagrad()) { + clear_has_parameters(); + ::tensorflow::tpu::ProximalAdagradParameters* temp = _impl_.parameters_.proximal_adagrad_; + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + _impl_.parameters_.proximal_adagrad_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::tensorflow::tpu::ProximalAdagradParameters& OptimizationParameters::_internal_proximal_adagrad() const { + return _internal_has_proximal_adagrad() + ? *_impl_.parameters_.proximal_adagrad_ + : reinterpret_cast< ::tensorflow::tpu::ProximalAdagradParameters&>(::tensorflow::tpu::_ProximalAdagradParameters_default_instance_); +} +inline const ::tensorflow::tpu::ProximalAdagradParameters& OptimizationParameters::proximal_adagrad() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.OptimizationParameters.proximal_adagrad) + return _internal_proximal_adagrad(); +} +inline ::tensorflow::tpu::ProximalAdagradParameters* OptimizationParameters::unsafe_arena_release_proximal_adagrad() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.tpu.OptimizationParameters.proximal_adagrad) + if (_internal_has_proximal_adagrad()) { + clear_has_parameters(); + ::tensorflow::tpu::ProximalAdagradParameters* temp = _impl_.parameters_.proximal_adagrad_; + _impl_.parameters_.proximal_adagrad_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void OptimizationParameters::unsafe_arena_set_allocated_proximal_adagrad(::tensorflow::tpu::ProximalAdagradParameters* proximal_adagrad) { + clear_parameters(); + if (proximal_adagrad) { + set_has_proximal_adagrad(); + _impl_.parameters_.proximal_adagrad_ = proximal_adagrad; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.tpu.OptimizationParameters.proximal_adagrad) +} +inline ::tensorflow::tpu::ProximalAdagradParameters* OptimizationParameters::_internal_mutable_proximal_adagrad() { + if (!_internal_has_proximal_adagrad()) { + clear_parameters(); + set_has_proximal_adagrad(); + _impl_.parameters_.proximal_adagrad_ = CreateMaybeMessage< ::tensorflow::tpu::ProximalAdagradParameters >(GetArenaForAllocation()); + } + return _impl_.parameters_.proximal_adagrad_; +} +inline ::tensorflow::tpu::ProximalAdagradParameters* OptimizationParameters::mutable_proximal_adagrad() { + ::tensorflow::tpu::ProximalAdagradParameters* _msg = _internal_mutable_proximal_adagrad(); + // @@protoc_insertion_point(field_mutable:tensorflow.tpu.OptimizationParameters.proximal_adagrad) + return _msg; +} + +// .tensorflow.tpu.OnlineYogiParameters online_yogi = 20; +inline bool OptimizationParameters::_internal_has_online_yogi() const { + return parameters_case() == kOnlineYogi; +} +inline bool OptimizationParameters::has_online_yogi() const { + return _internal_has_online_yogi(); +} +inline void OptimizationParameters::set_has_online_yogi() { + _impl_._oneof_case_[0] = kOnlineYogi; +} +inline void OptimizationParameters::clear_online_yogi() { + if (_internal_has_online_yogi()) { + if (GetArenaForAllocation() == nullptr) { + delete _impl_.parameters_.online_yogi_; + } + clear_has_parameters(); + } +} +inline ::tensorflow::tpu::OnlineYogiParameters* OptimizationParameters::release_online_yogi() { + // @@protoc_insertion_point(field_release:tensorflow.tpu.OptimizationParameters.online_yogi) + if (_internal_has_online_yogi()) { + clear_has_parameters(); + ::tensorflow::tpu::OnlineYogiParameters* temp = _impl_.parameters_.online_yogi_; + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + _impl_.parameters_.online_yogi_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::tensorflow::tpu::OnlineYogiParameters& OptimizationParameters::_internal_online_yogi() const { + return _internal_has_online_yogi() + ? *_impl_.parameters_.online_yogi_ + : reinterpret_cast< ::tensorflow::tpu::OnlineYogiParameters&>(::tensorflow::tpu::_OnlineYogiParameters_default_instance_); +} +inline const ::tensorflow::tpu::OnlineYogiParameters& OptimizationParameters::online_yogi() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.OptimizationParameters.online_yogi) + return _internal_online_yogi(); +} +inline ::tensorflow::tpu::OnlineYogiParameters* OptimizationParameters::unsafe_arena_release_online_yogi() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.tpu.OptimizationParameters.online_yogi) + if (_internal_has_online_yogi()) { + clear_has_parameters(); + ::tensorflow::tpu::OnlineYogiParameters* temp = _impl_.parameters_.online_yogi_; + _impl_.parameters_.online_yogi_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void OptimizationParameters::unsafe_arena_set_allocated_online_yogi(::tensorflow::tpu::OnlineYogiParameters* online_yogi) { + clear_parameters(); + if (online_yogi) { + set_has_online_yogi(); + _impl_.parameters_.online_yogi_ = online_yogi; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.tpu.OptimizationParameters.online_yogi) +} +inline ::tensorflow::tpu::OnlineYogiParameters* OptimizationParameters::_internal_mutable_online_yogi() { + if (!_internal_has_online_yogi()) { + clear_parameters(); + set_has_online_yogi(); + _impl_.parameters_.online_yogi_ = CreateMaybeMessage< ::tensorflow::tpu::OnlineYogiParameters >(GetArenaForAllocation()); + } + return _impl_.parameters_.online_yogi_; +} +inline ::tensorflow::tpu::OnlineYogiParameters* OptimizationParameters::mutable_online_yogi() { + ::tensorflow::tpu::OnlineYogiParameters* _msg = _internal_mutable_online_yogi(); + // @@protoc_insertion_point(field_mutable:tensorflow.tpu.OptimizationParameters.online_yogi) + return _msg; +} + +// .tensorflow.tpu.ProximalYogiParameters proximal_yogi = 21; +inline bool OptimizationParameters::_internal_has_proximal_yogi() const { + return parameters_case() == kProximalYogi; +} +inline bool OptimizationParameters::has_proximal_yogi() const { + return _internal_has_proximal_yogi(); +} +inline void OptimizationParameters::set_has_proximal_yogi() { + _impl_._oneof_case_[0] = kProximalYogi; +} +inline void OptimizationParameters::clear_proximal_yogi() { + if (_internal_has_proximal_yogi()) { + if (GetArenaForAllocation() == nullptr) { + delete _impl_.parameters_.proximal_yogi_; + } + clear_has_parameters(); + } +} +inline ::tensorflow::tpu::ProximalYogiParameters* OptimizationParameters::release_proximal_yogi() { + // @@protoc_insertion_point(field_release:tensorflow.tpu.OptimizationParameters.proximal_yogi) + if (_internal_has_proximal_yogi()) { + clear_has_parameters(); + ::tensorflow::tpu::ProximalYogiParameters* temp = _impl_.parameters_.proximal_yogi_; + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + _impl_.parameters_.proximal_yogi_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::tensorflow::tpu::ProximalYogiParameters& OptimizationParameters::_internal_proximal_yogi() const { + return _internal_has_proximal_yogi() + ? *_impl_.parameters_.proximal_yogi_ + : reinterpret_cast< ::tensorflow::tpu::ProximalYogiParameters&>(::tensorflow::tpu::_ProximalYogiParameters_default_instance_); +} +inline const ::tensorflow::tpu::ProximalYogiParameters& OptimizationParameters::proximal_yogi() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.OptimizationParameters.proximal_yogi) + return _internal_proximal_yogi(); +} +inline ::tensorflow::tpu::ProximalYogiParameters* OptimizationParameters::unsafe_arena_release_proximal_yogi() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.tpu.OptimizationParameters.proximal_yogi) + if (_internal_has_proximal_yogi()) { + clear_has_parameters(); + ::tensorflow::tpu::ProximalYogiParameters* temp = _impl_.parameters_.proximal_yogi_; + _impl_.parameters_.proximal_yogi_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void OptimizationParameters::unsafe_arena_set_allocated_proximal_yogi(::tensorflow::tpu::ProximalYogiParameters* proximal_yogi) { + clear_parameters(); + if (proximal_yogi) { + set_has_proximal_yogi(); + _impl_.parameters_.proximal_yogi_ = proximal_yogi; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.tpu.OptimizationParameters.proximal_yogi) +} +inline ::tensorflow::tpu::ProximalYogiParameters* OptimizationParameters::_internal_mutable_proximal_yogi() { + if (!_internal_has_proximal_yogi()) { + clear_parameters(); + set_has_proximal_yogi(); + _impl_.parameters_.proximal_yogi_ = CreateMaybeMessage< ::tensorflow::tpu::ProximalYogiParameters >(GetArenaForAllocation()); + } + return _impl_.parameters_.proximal_yogi_; +} +inline ::tensorflow::tpu::ProximalYogiParameters* OptimizationParameters::mutable_proximal_yogi() { + ::tensorflow::tpu::ProximalYogiParameters* _msg = _internal_mutable_proximal_yogi(); + // @@protoc_insertion_point(field_mutable:tensorflow.tpu.OptimizationParameters.proximal_yogi) + return _msg; +} + +// .tensorflow.tpu.FrequencyEstimatorParameters frequency_estimator = 23; +inline bool OptimizationParameters::_internal_has_frequency_estimator() const { + return parameters_case() == kFrequencyEstimator; +} +inline bool OptimizationParameters::has_frequency_estimator() const { + return _internal_has_frequency_estimator(); +} +inline void OptimizationParameters::set_has_frequency_estimator() { + _impl_._oneof_case_[0] = kFrequencyEstimator; +} +inline void OptimizationParameters::clear_frequency_estimator() { + if (_internal_has_frequency_estimator()) { + if (GetArenaForAllocation() == nullptr) { + delete _impl_.parameters_.frequency_estimator_; + } + clear_has_parameters(); + } +} +inline ::tensorflow::tpu::FrequencyEstimatorParameters* OptimizationParameters::release_frequency_estimator() { + // @@protoc_insertion_point(field_release:tensorflow.tpu.OptimizationParameters.frequency_estimator) + if (_internal_has_frequency_estimator()) { + clear_has_parameters(); + ::tensorflow::tpu::FrequencyEstimatorParameters* temp = _impl_.parameters_.frequency_estimator_; + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + _impl_.parameters_.frequency_estimator_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::tensorflow::tpu::FrequencyEstimatorParameters& OptimizationParameters::_internal_frequency_estimator() const { + return _internal_has_frequency_estimator() + ? *_impl_.parameters_.frequency_estimator_ + : reinterpret_cast< ::tensorflow::tpu::FrequencyEstimatorParameters&>(::tensorflow::tpu::_FrequencyEstimatorParameters_default_instance_); +} +inline const ::tensorflow::tpu::FrequencyEstimatorParameters& OptimizationParameters::frequency_estimator() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.OptimizationParameters.frequency_estimator) + return _internal_frequency_estimator(); +} +inline ::tensorflow::tpu::FrequencyEstimatorParameters* OptimizationParameters::unsafe_arena_release_frequency_estimator() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.tpu.OptimizationParameters.frequency_estimator) + if (_internal_has_frequency_estimator()) { + clear_has_parameters(); + ::tensorflow::tpu::FrequencyEstimatorParameters* temp = _impl_.parameters_.frequency_estimator_; + _impl_.parameters_.frequency_estimator_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void OptimizationParameters::unsafe_arena_set_allocated_frequency_estimator(::tensorflow::tpu::FrequencyEstimatorParameters* frequency_estimator) { + clear_parameters(); + if (frequency_estimator) { + set_has_frequency_estimator(); + _impl_.parameters_.frequency_estimator_ = frequency_estimator; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.tpu.OptimizationParameters.frequency_estimator) +} +inline ::tensorflow::tpu::FrequencyEstimatorParameters* OptimizationParameters::_internal_mutable_frequency_estimator() { + if (!_internal_has_frequency_estimator()) { + clear_parameters(); + set_has_frequency_estimator(); + _impl_.parameters_.frequency_estimator_ = CreateMaybeMessage< ::tensorflow::tpu::FrequencyEstimatorParameters >(GetArenaForAllocation()); + } + return _impl_.parameters_.frequency_estimator_; +} +inline ::tensorflow::tpu::FrequencyEstimatorParameters* OptimizationParameters::mutable_frequency_estimator() { + ::tensorflow::tpu::FrequencyEstimatorParameters* _msg = _internal_mutable_frequency_estimator(); + // @@protoc_insertion_point(field_mutable:tensorflow.tpu.OptimizationParameters.frequency_estimator) + return _msg; +} + +// .tensorflow.tpu.UserDefinedProgramParameters user_defined_program = 24; +inline bool OptimizationParameters::_internal_has_user_defined_program() const { + return parameters_case() == kUserDefinedProgram; +} +inline bool OptimizationParameters::has_user_defined_program() const { + return _internal_has_user_defined_program(); +} +inline void OptimizationParameters::set_has_user_defined_program() { + _impl_._oneof_case_[0] = kUserDefinedProgram; +} +inline void OptimizationParameters::clear_user_defined_program() { + if (_internal_has_user_defined_program()) { + if (GetArenaForAllocation() == nullptr) { + delete _impl_.parameters_.user_defined_program_; + } + clear_has_parameters(); + } +} +inline ::tensorflow::tpu::UserDefinedProgramParameters* OptimizationParameters::release_user_defined_program() { + // @@protoc_insertion_point(field_release:tensorflow.tpu.OptimizationParameters.user_defined_program) + if (_internal_has_user_defined_program()) { + clear_has_parameters(); + ::tensorflow::tpu::UserDefinedProgramParameters* temp = _impl_.parameters_.user_defined_program_; + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + _impl_.parameters_.user_defined_program_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::tensorflow::tpu::UserDefinedProgramParameters& OptimizationParameters::_internal_user_defined_program() const { + return _internal_has_user_defined_program() + ? *_impl_.parameters_.user_defined_program_ + : reinterpret_cast< ::tensorflow::tpu::UserDefinedProgramParameters&>(::tensorflow::tpu::_UserDefinedProgramParameters_default_instance_); +} +inline const ::tensorflow::tpu::UserDefinedProgramParameters& OptimizationParameters::user_defined_program() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.OptimizationParameters.user_defined_program) + return _internal_user_defined_program(); +} +inline ::tensorflow::tpu::UserDefinedProgramParameters* OptimizationParameters::unsafe_arena_release_user_defined_program() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.tpu.OptimizationParameters.user_defined_program) + if (_internal_has_user_defined_program()) { + clear_has_parameters(); + ::tensorflow::tpu::UserDefinedProgramParameters* temp = _impl_.parameters_.user_defined_program_; + _impl_.parameters_.user_defined_program_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void OptimizationParameters::unsafe_arena_set_allocated_user_defined_program(::tensorflow::tpu::UserDefinedProgramParameters* user_defined_program) { + clear_parameters(); + if (user_defined_program) { + set_has_user_defined_program(); + _impl_.parameters_.user_defined_program_ = user_defined_program; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.tpu.OptimizationParameters.user_defined_program) +} +inline ::tensorflow::tpu::UserDefinedProgramParameters* OptimizationParameters::_internal_mutable_user_defined_program() { + if (!_internal_has_user_defined_program()) { + clear_parameters(); + set_has_user_defined_program(); + _impl_.parameters_.user_defined_program_ = CreateMaybeMessage< ::tensorflow::tpu::UserDefinedProgramParameters >(GetArenaForAllocation()); + } + return _impl_.parameters_.user_defined_program_; +} +inline ::tensorflow::tpu::UserDefinedProgramParameters* OptimizationParameters::mutable_user_defined_program() { + ::tensorflow::tpu::UserDefinedProgramParameters* _msg = _internal_mutable_user_defined_program(); + // @@protoc_insertion_point(field_mutable:tensorflow.tpu.OptimizationParameters.user_defined_program) + return _msg; +} + +// .tensorflow.tpu.AssignParameters assign = 25; +inline bool OptimizationParameters::_internal_has_assign() const { + return parameters_case() == kAssign; +} +inline bool OptimizationParameters::has_assign() const { + return _internal_has_assign(); +} +inline void OptimizationParameters::set_has_assign() { + _impl_._oneof_case_[0] = kAssign; +} +inline void OptimizationParameters::clear_assign() { + if (_internal_has_assign()) { + if (GetArenaForAllocation() == nullptr) { + delete _impl_.parameters_.assign_; + } + clear_has_parameters(); + } +} +inline ::tensorflow::tpu::AssignParameters* OptimizationParameters::release_assign() { + // @@protoc_insertion_point(field_release:tensorflow.tpu.OptimizationParameters.assign) + if (_internal_has_assign()) { + clear_has_parameters(); + ::tensorflow::tpu::AssignParameters* temp = _impl_.parameters_.assign_; + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + _impl_.parameters_.assign_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::tensorflow::tpu::AssignParameters& OptimizationParameters::_internal_assign() const { + return _internal_has_assign() + ? *_impl_.parameters_.assign_ + : reinterpret_cast< ::tensorflow::tpu::AssignParameters&>(::tensorflow::tpu::_AssignParameters_default_instance_); +} +inline const ::tensorflow::tpu::AssignParameters& OptimizationParameters::assign() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.OptimizationParameters.assign) + return _internal_assign(); +} +inline ::tensorflow::tpu::AssignParameters* OptimizationParameters::unsafe_arena_release_assign() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.tpu.OptimizationParameters.assign) + if (_internal_has_assign()) { + clear_has_parameters(); + ::tensorflow::tpu::AssignParameters* temp = _impl_.parameters_.assign_; + _impl_.parameters_.assign_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void OptimizationParameters::unsafe_arena_set_allocated_assign(::tensorflow::tpu::AssignParameters* assign) { + clear_parameters(); + if (assign) { + set_has_assign(); + _impl_.parameters_.assign_ = assign; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.tpu.OptimizationParameters.assign) +} +inline ::tensorflow::tpu::AssignParameters* OptimizationParameters::_internal_mutable_assign() { + if (!_internal_has_assign()) { + clear_parameters(); + set_has_assign(); + _impl_.parameters_.assign_ = CreateMaybeMessage< ::tensorflow::tpu::AssignParameters >(GetArenaForAllocation()); + } + return _impl_.parameters_.assign_; +} +inline ::tensorflow::tpu::AssignParameters* OptimizationParameters::mutable_assign() { + ::tensorflow::tpu::AssignParameters* _msg = _internal_mutable_assign(); + // @@protoc_insertion_point(field_mutable:tensorflow.tpu.OptimizationParameters.assign) + return _msg; +} + +inline bool OptimizationParameters::has_parameters() const { + return parameters_case() != PARAMETERS_NOT_SET; +} +inline void OptimizationParameters::clear_has_parameters() { + _impl_._oneof_case_[0] = PARAMETERS_NOT_SET; +} +inline OptimizationParameters::ParametersCase OptimizationParameters::parameters_case() const { + return OptimizationParameters::ParametersCase(_impl_._oneof_case_[0]); +} +// ------------------------------------------------------------------- + +// StateVariableSpecification_UserDefined + +// ------------------------------------------------------------------- + +// StateVariableSpecification_FillWithConstant + +// double initial_value = 1; +inline void StateVariableSpecification_FillWithConstant::clear_initial_value() { + _impl_.initial_value_ = 0; +} +inline double StateVariableSpecification_FillWithConstant::_internal_initial_value() const { + return _impl_.initial_value_; +} +inline double StateVariableSpecification_FillWithConstant::initial_value() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.StateVariableSpecification.FillWithConstant.initial_value) + return _internal_initial_value(); +} +inline void StateVariableSpecification_FillWithConstant::_internal_set_initial_value(double value) { + + _impl_.initial_value_ = value; +} +inline void StateVariableSpecification_FillWithConstant::set_initial_value(double value) { + _internal_set_initial_value(value); + // @@protoc_insertion_point(field_set:tensorflow.tpu.StateVariableSpecification.FillWithConstant.initial_value) +} + +// ------------------------------------------------------------------- + +// StateVariableSpecification + +// string name = 1; +inline void StateVariableSpecification::clear_name() { + _impl_.name_.ClearToEmpty(); +} +inline const std::string& StateVariableSpecification::name() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.StateVariableSpecification.name) + return _internal_name(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void StateVariableSpecification::set_name(ArgT0&& arg0, ArgT... args) { + + _impl_.name_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.tpu.StateVariableSpecification.name) +} +inline std::string* StateVariableSpecification::mutable_name() { + std::string* _s = _internal_mutable_name(); + // @@protoc_insertion_point(field_mutable:tensorflow.tpu.StateVariableSpecification.name) + return _s; +} +inline const std::string& StateVariableSpecification::_internal_name() const { + return _impl_.name_.Get(); +} +inline void StateVariableSpecification::_internal_set_name(const std::string& value) { + + _impl_.name_.Set(value, GetArenaForAllocation()); +} +inline std::string* StateVariableSpecification::_internal_mutable_name() { + + return _impl_.name_.Mutable(GetArenaForAllocation()); +} +inline std::string* StateVariableSpecification::release_name() { + // @@protoc_insertion_point(field_release:tensorflow.tpu.StateVariableSpecification.name) + return _impl_.name_.Release(); +} +inline void StateVariableSpecification::set_allocated_name(std::string* name) { + if (name != nullptr) { + + } else { + + } + _impl_.name_.SetAllocated(name, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.name_.IsDefault()) { + _impl_.name_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.tpu.StateVariableSpecification.name) +} + +// .tensorflow.tpu.StateVariableSpecification.UserDefined user_defined = 2; +inline bool StateVariableSpecification::_internal_has_user_defined() const { + return usage_case() == kUserDefined; +} +inline bool StateVariableSpecification::has_user_defined() const { + return _internal_has_user_defined(); +} +inline void StateVariableSpecification::set_has_user_defined() { + _impl_._oneof_case_[0] = kUserDefined; +} +inline void StateVariableSpecification::clear_user_defined() { + if (_internal_has_user_defined()) { + if (GetArenaForAllocation() == nullptr) { + delete _impl_.usage_.user_defined_; + } + clear_has_usage(); + } +} +inline ::tensorflow::tpu::StateVariableSpecification_UserDefined* StateVariableSpecification::release_user_defined() { + // @@protoc_insertion_point(field_release:tensorflow.tpu.StateVariableSpecification.user_defined) + if (_internal_has_user_defined()) { + clear_has_usage(); + ::tensorflow::tpu::StateVariableSpecification_UserDefined* temp = _impl_.usage_.user_defined_; + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + _impl_.usage_.user_defined_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::tensorflow::tpu::StateVariableSpecification_UserDefined& StateVariableSpecification::_internal_user_defined() const { + return _internal_has_user_defined() + ? *_impl_.usage_.user_defined_ + : reinterpret_cast< ::tensorflow::tpu::StateVariableSpecification_UserDefined&>(::tensorflow::tpu::_StateVariableSpecification_UserDefined_default_instance_); +} +inline const ::tensorflow::tpu::StateVariableSpecification_UserDefined& StateVariableSpecification::user_defined() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.StateVariableSpecification.user_defined) + return _internal_user_defined(); +} +inline ::tensorflow::tpu::StateVariableSpecification_UserDefined* StateVariableSpecification::unsafe_arena_release_user_defined() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.tpu.StateVariableSpecification.user_defined) + if (_internal_has_user_defined()) { + clear_has_usage(); + ::tensorflow::tpu::StateVariableSpecification_UserDefined* temp = _impl_.usage_.user_defined_; + _impl_.usage_.user_defined_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void StateVariableSpecification::unsafe_arena_set_allocated_user_defined(::tensorflow::tpu::StateVariableSpecification_UserDefined* user_defined) { + clear_usage(); + if (user_defined) { + set_has_user_defined(); + _impl_.usage_.user_defined_ = user_defined; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.tpu.StateVariableSpecification.user_defined) +} +inline ::tensorflow::tpu::StateVariableSpecification_UserDefined* StateVariableSpecification::_internal_mutable_user_defined() { + if (!_internal_has_user_defined()) { + clear_usage(); + set_has_user_defined(); + _impl_.usage_.user_defined_ = CreateMaybeMessage< ::tensorflow::tpu::StateVariableSpecification_UserDefined >(GetArenaForAllocation()); + } + return _impl_.usage_.user_defined_; +} +inline ::tensorflow::tpu::StateVariableSpecification_UserDefined* StateVariableSpecification::mutable_user_defined() { + ::tensorflow::tpu::StateVariableSpecification_UserDefined* _msg = _internal_mutable_user_defined(); + // @@protoc_insertion_point(field_mutable:tensorflow.tpu.StateVariableSpecification.user_defined) + return _msg; +} + +// .tensorflow.tpu.StateVariableSpecification.FillWithConstant fill_with_constant = 3; +inline bool StateVariableSpecification::_internal_has_fill_with_constant() const { + return usage_case() == kFillWithConstant; +} +inline bool StateVariableSpecification::has_fill_with_constant() const { + return _internal_has_fill_with_constant(); +} +inline void StateVariableSpecification::set_has_fill_with_constant() { + _impl_._oneof_case_[0] = kFillWithConstant; +} +inline void StateVariableSpecification::clear_fill_with_constant() { + if (_internal_has_fill_with_constant()) { + if (GetArenaForAllocation() == nullptr) { + delete _impl_.usage_.fill_with_constant_; + } + clear_has_usage(); + } +} +inline ::tensorflow::tpu::StateVariableSpecification_FillWithConstant* StateVariableSpecification::release_fill_with_constant() { + // @@protoc_insertion_point(field_release:tensorflow.tpu.StateVariableSpecification.fill_with_constant) + if (_internal_has_fill_with_constant()) { + clear_has_usage(); + ::tensorflow::tpu::StateVariableSpecification_FillWithConstant* temp = _impl_.usage_.fill_with_constant_; + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + _impl_.usage_.fill_with_constant_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::tensorflow::tpu::StateVariableSpecification_FillWithConstant& StateVariableSpecification::_internal_fill_with_constant() const { + return _internal_has_fill_with_constant() + ? *_impl_.usage_.fill_with_constant_ + : reinterpret_cast< ::tensorflow::tpu::StateVariableSpecification_FillWithConstant&>(::tensorflow::tpu::_StateVariableSpecification_FillWithConstant_default_instance_); +} +inline const ::tensorflow::tpu::StateVariableSpecification_FillWithConstant& StateVariableSpecification::fill_with_constant() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.StateVariableSpecification.fill_with_constant) + return _internal_fill_with_constant(); +} +inline ::tensorflow::tpu::StateVariableSpecification_FillWithConstant* StateVariableSpecification::unsafe_arena_release_fill_with_constant() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.tpu.StateVariableSpecification.fill_with_constant) + if (_internal_has_fill_with_constant()) { + clear_has_usage(); + ::tensorflow::tpu::StateVariableSpecification_FillWithConstant* temp = _impl_.usage_.fill_with_constant_; + _impl_.usage_.fill_with_constant_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void StateVariableSpecification::unsafe_arena_set_allocated_fill_with_constant(::tensorflow::tpu::StateVariableSpecification_FillWithConstant* fill_with_constant) { + clear_usage(); + if (fill_with_constant) { + set_has_fill_with_constant(); + _impl_.usage_.fill_with_constant_ = fill_with_constant; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.tpu.StateVariableSpecification.fill_with_constant) +} +inline ::tensorflow::tpu::StateVariableSpecification_FillWithConstant* StateVariableSpecification::_internal_mutable_fill_with_constant() { + if (!_internal_has_fill_with_constant()) { + clear_usage(); + set_has_fill_with_constant(); + _impl_.usage_.fill_with_constant_ = CreateMaybeMessage< ::tensorflow::tpu::StateVariableSpecification_FillWithConstant >(GetArenaForAllocation()); + } + return _impl_.usage_.fill_with_constant_; +} +inline ::tensorflow::tpu::StateVariableSpecification_FillWithConstant* StateVariableSpecification::mutable_fill_with_constant() { + ::tensorflow::tpu::StateVariableSpecification_FillWithConstant* _msg = _internal_mutable_fill_with_constant(); + // @@protoc_insertion_point(field_mutable:tensorflow.tpu.StateVariableSpecification.fill_with_constant) + return _msg; +} + +inline bool StateVariableSpecification::has_usage() const { + return usage_case() != USAGE_NOT_SET; +} +inline void StateVariableSpecification::clear_has_usage() { + _impl_._oneof_case_[0] = USAGE_NOT_SET; +} +inline StateVariableSpecification::UsageCase StateVariableSpecification::usage_case() const { + return StateVariableSpecification::UsageCase(_impl_._oneof_case_[0]); +} +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + + +// @@protoc_insertion_point(namespace_scope) + +} // namespace tpu +} // namespace tensorflow + +PROTOBUF_NAMESPACE_OPEN + +template <> struct is_proto_enum< ::tensorflow::tpu::GradientAccumulationStatus_Status> : ::std::true_type {}; +template <> +inline const EnumDescriptor* GetEnumDescriptor< ::tensorflow::tpu::GradientAccumulationStatus_Status>() { + return ::tensorflow::tpu::GradientAccumulationStatus_Status_descriptor(); +} +template <> struct is_proto_enum< ::tensorflow::tpu::LowDimensionalPackingStatus_Status> : ::std::true_type {}; +template <> +inline const EnumDescriptor* GetEnumDescriptor< ::tensorflow::tpu::LowDimensionalPackingStatus_Status>() { + return ::tensorflow::tpu::LowDimensionalPackingStatus_Status_descriptor(); +} +template <> struct is_proto_enum< ::tensorflow::tpu::HotIdReplicationConfiguration_Status> : ::std::true_type {}; +template <> +inline const EnumDescriptor* GetEnumDescriptor< ::tensorflow::tpu::HotIdReplicationConfiguration_Status>() { + return ::tensorflow::tpu::HotIdReplicationConfiguration_Status_descriptor(); +} + +PROTOBUF_NAMESPACE_CLOSE + +// @@protoc_insertion_point(global_scope) + +#include +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprotobuf_2ftpu_2foptimization_5fparameters_2eproto diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/tpu/topology.pb.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/tpu/topology.pb.h new file mode 100644 index 0000000000000000000000000000000000000000..7f9350a521c80548082a7008d66c05761aac04fb --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/tpu/topology.pb.h @@ -0,0 +1,814 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/tpu/topology.proto + +#ifndef GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprotobuf_2ftpu_2ftopology_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprotobuf_2ftpu_2ftopology_2eproto + +#include +#include + +#include +#if PROTOBUF_VERSION < 3021000 +#error This file was generated by a newer version of protoc which is +#error incompatible with your Protocol Buffer headers. Please update +#error your headers. +#endif +#if 3021009 < PROTOBUF_MIN_PROTOC_VERSION +#error This file was generated by an older version of protoc which is +#error incompatible with your Protocol Buffer headers. Please +#error regenerate this file with a newer version of protoc. +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include // IWYU pragma: export +#include // IWYU pragma: export +#include +#include +// @@protoc_insertion_point(includes) +#include +#define PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2fprotobuf_2ftpu_2ftopology_2eproto +PROTOBUF_NAMESPACE_OPEN +namespace internal { +class AnyMetadata; +} // namespace internal +PROTOBUF_NAMESPACE_CLOSE + +// Internal implementation detail -- do not use these members. +struct TableStruct_tensorflow_2fcore_2fprotobuf_2ftpu_2ftopology_2eproto { + static const uint32_t offsets[]; +}; +extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_tensorflow_2fcore_2fprotobuf_2ftpu_2ftopology_2eproto; +namespace tensorflow { +namespace tpu { +class TPUHardwareFeature; +struct TPUHardwareFeatureDefaultTypeInternal; +extern TPUHardwareFeatureDefaultTypeInternal _TPUHardwareFeature_default_instance_; +class TopologyProto; +struct TopologyProtoDefaultTypeInternal; +extern TopologyProtoDefaultTypeInternal _TopologyProto_default_instance_; +} // namespace tpu +} // namespace tensorflow +PROTOBUF_NAMESPACE_OPEN +template<> ::tensorflow::tpu::TPUHardwareFeature* Arena::CreateMaybeMessage<::tensorflow::tpu::TPUHardwareFeature>(Arena*); +template<> ::tensorflow::tpu::TopologyProto* Arena::CreateMaybeMessage<::tensorflow::tpu::TopologyProto>(Arena*); +PROTOBUF_NAMESPACE_CLOSE +namespace tensorflow { +namespace tpu { + +enum TPUHardwareFeature_EmbeddingFeature : int { + TPUHardwareFeature_EmbeddingFeature_UNSUPPORTED = 0, + TPUHardwareFeature_EmbeddingFeature_V1 = 1, + TPUHardwareFeature_EmbeddingFeature_V2 = 2, + TPUHardwareFeature_EmbeddingFeature_TPUHardwareFeature_EmbeddingFeature_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits::min(), + TPUHardwareFeature_EmbeddingFeature_TPUHardwareFeature_EmbeddingFeature_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits::max() +}; +bool TPUHardwareFeature_EmbeddingFeature_IsValid(int value); +constexpr TPUHardwareFeature_EmbeddingFeature TPUHardwareFeature_EmbeddingFeature_EmbeddingFeature_MIN = TPUHardwareFeature_EmbeddingFeature_UNSUPPORTED; +constexpr TPUHardwareFeature_EmbeddingFeature TPUHardwareFeature_EmbeddingFeature_EmbeddingFeature_MAX = TPUHardwareFeature_EmbeddingFeature_V2; +constexpr int TPUHardwareFeature_EmbeddingFeature_EmbeddingFeature_ARRAYSIZE = TPUHardwareFeature_EmbeddingFeature_EmbeddingFeature_MAX + 1; + +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* TPUHardwareFeature_EmbeddingFeature_descriptor(); +template +inline const std::string& TPUHardwareFeature_EmbeddingFeature_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function TPUHardwareFeature_EmbeddingFeature_Name."); + return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( + TPUHardwareFeature_EmbeddingFeature_descriptor(), enum_t_value); +} +inline bool TPUHardwareFeature_EmbeddingFeature_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, TPUHardwareFeature_EmbeddingFeature* value) { + return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( + TPUHardwareFeature_EmbeddingFeature_descriptor(), name, value); +} +// =================================================================== + +class TPUHardwareFeature final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.tpu.TPUHardwareFeature) */ { + public: + inline TPUHardwareFeature() : TPUHardwareFeature(nullptr) {} + ~TPUHardwareFeature() override; + explicit PROTOBUF_CONSTEXPR TPUHardwareFeature(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + TPUHardwareFeature(const TPUHardwareFeature& from); + TPUHardwareFeature(TPUHardwareFeature&& from) noexcept + : TPUHardwareFeature() { + *this = ::std::move(from); + } + + inline TPUHardwareFeature& operator=(const TPUHardwareFeature& from) { + CopyFrom(from); + return *this; + } + inline TPUHardwareFeature& operator=(TPUHardwareFeature&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const TPUHardwareFeature& default_instance() { + return *internal_default_instance(); + } + static inline const TPUHardwareFeature* internal_default_instance() { + return reinterpret_cast( + &_TPUHardwareFeature_default_instance_); + } + static constexpr int kIndexInFileMessages = + 0; + + friend void swap(TPUHardwareFeature& a, TPUHardwareFeature& b) { + a.Swap(&b); + } + inline void Swap(TPUHardwareFeature* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(TPUHardwareFeature* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + TPUHardwareFeature* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const TPUHardwareFeature& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const TPUHardwareFeature& from) { + TPUHardwareFeature::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(TPUHardwareFeature* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.tpu.TPUHardwareFeature"; + } + protected: + explicit TPUHardwareFeature(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + typedef TPUHardwareFeature_EmbeddingFeature EmbeddingFeature; + static constexpr EmbeddingFeature UNSUPPORTED = + TPUHardwareFeature_EmbeddingFeature_UNSUPPORTED; + static constexpr EmbeddingFeature V1 = + TPUHardwareFeature_EmbeddingFeature_V1; + static constexpr EmbeddingFeature V2 = + TPUHardwareFeature_EmbeddingFeature_V2; + static inline bool EmbeddingFeature_IsValid(int value) { + return TPUHardwareFeature_EmbeddingFeature_IsValid(value); + } + static constexpr EmbeddingFeature EmbeddingFeature_MIN = + TPUHardwareFeature_EmbeddingFeature_EmbeddingFeature_MIN; + static constexpr EmbeddingFeature EmbeddingFeature_MAX = + TPUHardwareFeature_EmbeddingFeature_EmbeddingFeature_MAX; + static constexpr int EmbeddingFeature_ARRAYSIZE = + TPUHardwareFeature_EmbeddingFeature_EmbeddingFeature_ARRAYSIZE; + static inline const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* + EmbeddingFeature_descriptor() { + return TPUHardwareFeature_EmbeddingFeature_descriptor(); + } + template + static inline const std::string& EmbeddingFeature_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function EmbeddingFeature_Name."); + return TPUHardwareFeature_EmbeddingFeature_Name(enum_t_value); + } + static inline bool EmbeddingFeature_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name, + EmbeddingFeature* value) { + return TPUHardwareFeature_EmbeddingFeature_Parse(name, value); + } + + // accessors ------------------------------------------------------- + + enum : int { + kEmbeddingFeatureFieldNumber = 1, + kNumEmbeddingDevicesPerChipFieldNumber = 2, + }; + // .tensorflow.tpu.TPUHardwareFeature.EmbeddingFeature embedding_feature = 1; + void clear_embedding_feature(); + ::tensorflow::tpu::TPUHardwareFeature_EmbeddingFeature embedding_feature() const; + void set_embedding_feature(::tensorflow::tpu::TPUHardwareFeature_EmbeddingFeature value); + private: + ::tensorflow::tpu::TPUHardwareFeature_EmbeddingFeature _internal_embedding_feature() const; + void _internal_set_embedding_feature(::tensorflow::tpu::TPUHardwareFeature_EmbeddingFeature value); + public: + + // int32 num_embedding_devices_per_chip = 2; + void clear_num_embedding_devices_per_chip(); + int32_t num_embedding_devices_per_chip() const; + void set_num_embedding_devices_per_chip(int32_t value); + private: + int32_t _internal_num_embedding_devices_per_chip() const; + void _internal_set_num_embedding_devices_per_chip(int32_t value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.tpu.TPUHardwareFeature) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + int embedding_feature_; + int32_t num_embedding_devices_per_chip_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2ftpu_2ftopology_2eproto; +}; +// ------------------------------------------------------------------- + +class TopologyProto final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.tpu.TopologyProto) */ { + public: + inline TopologyProto() : TopologyProto(nullptr) {} + ~TopologyProto() override; + explicit PROTOBUF_CONSTEXPR TopologyProto(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + TopologyProto(const TopologyProto& from); + TopologyProto(TopologyProto&& from) noexcept + : TopologyProto() { + *this = ::std::move(from); + } + + inline TopologyProto& operator=(const TopologyProto& from) { + CopyFrom(from); + return *this; + } + inline TopologyProto& operator=(TopologyProto&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const TopologyProto& default_instance() { + return *internal_default_instance(); + } + static inline const TopologyProto* internal_default_instance() { + return reinterpret_cast( + &_TopologyProto_default_instance_); + } + static constexpr int kIndexInFileMessages = + 1; + + friend void swap(TopologyProto& a, TopologyProto& b) { + a.Swap(&b); + } + inline void Swap(TopologyProto* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(TopologyProto* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + TopologyProto* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const TopologyProto& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const TopologyProto& from) { + TopologyProto::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(TopologyProto* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.tpu.TopologyProto"; + } + protected: + explicit TopologyProto(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kMeshShapeFieldNumber = 1, + kDeviceCoordinatesFieldNumber = 4, + kTpuHardwareFeatureFieldNumber = 5, + kNumTasksFieldNumber = 2, + kNumTpuDevicesPerTaskFieldNumber = 3, + }; + // repeated int32 mesh_shape = 1; + int mesh_shape_size() const; + private: + int _internal_mesh_shape_size() const; + public: + void clear_mesh_shape(); + private: + int32_t _internal_mesh_shape(int index) const; + const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >& + _internal_mesh_shape() const; + void _internal_add_mesh_shape(int32_t value); + ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >* + _internal_mutable_mesh_shape(); + public: + int32_t mesh_shape(int index) const; + void set_mesh_shape(int index, int32_t value); + void add_mesh_shape(int32_t value); + const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >& + mesh_shape() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >* + mutable_mesh_shape(); + + // repeated int32 device_coordinates = 4; + int device_coordinates_size() const; + private: + int _internal_device_coordinates_size() const; + public: + void clear_device_coordinates(); + private: + int32_t _internal_device_coordinates(int index) const; + const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >& + _internal_device_coordinates() const; + void _internal_add_device_coordinates(int32_t value); + ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >* + _internal_mutable_device_coordinates(); + public: + int32_t device_coordinates(int index) const; + void set_device_coordinates(int index, int32_t value); + void add_device_coordinates(int32_t value); + const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >& + device_coordinates() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >* + mutable_device_coordinates(); + + // .tensorflow.tpu.TPUHardwareFeature tpu_hardware_feature = 5; + bool has_tpu_hardware_feature() const; + private: + bool _internal_has_tpu_hardware_feature() const; + public: + void clear_tpu_hardware_feature(); + const ::tensorflow::tpu::TPUHardwareFeature& tpu_hardware_feature() const; + PROTOBUF_NODISCARD ::tensorflow::tpu::TPUHardwareFeature* release_tpu_hardware_feature(); + ::tensorflow::tpu::TPUHardwareFeature* mutable_tpu_hardware_feature(); + void set_allocated_tpu_hardware_feature(::tensorflow::tpu::TPUHardwareFeature* tpu_hardware_feature); + private: + const ::tensorflow::tpu::TPUHardwareFeature& _internal_tpu_hardware_feature() const; + ::tensorflow::tpu::TPUHardwareFeature* _internal_mutable_tpu_hardware_feature(); + public: + void unsafe_arena_set_allocated_tpu_hardware_feature( + ::tensorflow::tpu::TPUHardwareFeature* tpu_hardware_feature); + ::tensorflow::tpu::TPUHardwareFeature* unsafe_arena_release_tpu_hardware_feature(); + + // int32 num_tasks = 2; + void clear_num_tasks(); + int32_t num_tasks() const; + void set_num_tasks(int32_t value); + private: + int32_t _internal_num_tasks() const; + void _internal_set_num_tasks(int32_t value); + public: + + // int32 num_tpu_devices_per_task = 3; + void clear_num_tpu_devices_per_task(); + int32_t num_tpu_devices_per_task() const; + void set_num_tpu_devices_per_task(int32_t value); + private: + int32_t _internal_num_tpu_devices_per_task() const; + void _internal_set_num_tpu_devices_per_task(int32_t value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.tpu.TopologyProto) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t > mesh_shape_; + mutable std::atomic _mesh_shape_cached_byte_size_; + ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t > device_coordinates_; + mutable std::atomic _device_coordinates_cached_byte_size_; + ::tensorflow::tpu::TPUHardwareFeature* tpu_hardware_feature_; + int32_t num_tasks_; + int32_t num_tpu_devices_per_task_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2ftpu_2ftopology_2eproto; +}; +// =================================================================== + + +// =================================================================== + +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// TPUHardwareFeature + +// .tensorflow.tpu.TPUHardwareFeature.EmbeddingFeature embedding_feature = 1; +inline void TPUHardwareFeature::clear_embedding_feature() { + _impl_.embedding_feature_ = 0; +} +inline ::tensorflow::tpu::TPUHardwareFeature_EmbeddingFeature TPUHardwareFeature::_internal_embedding_feature() const { + return static_cast< ::tensorflow::tpu::TPUHardwareFeature_EmbeddingFeature >(_impl_.embedding_feature_); +} +inline ::tensorflow::tpu::TPUHardwareFeature_EmbeddingFeature TPUHardwareFeature::embedding_feature() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.TPUHardwareFeature.embedding_feature) + return _internal_embedding_feature(); +} +inline void TPUHardwareFeature::_internal_set_embedding_feature(::tensorflow::tpu::TPUHardwareFeature_EmbeddingFeature value) { + + _impl_.embedding_feature_ = value; +} +inline void TPUHardwareFeature::set_embedding_feature(::tensorflow::tpu::TPUHardwareFeature_EmbeddingFeature value) { + _internal_set_embedding_feature(value); + // @@protoc_insertion_point(field_set:tensorflow.tpu.TPUHardwareFeature.embedding_feature) +} + +// int32 num_embedding_devices_per_chip = 2; +inline void TPUHardwareFeature::clear_num_embedding_devices_per_chip() { + _impl_.num_embedding_devices_per_chip_ = 0; +} +inline int32_t TPUHardwareFeature::_internal_num_embedding_devices_per_chip() const { + return _impl_.num_embedding_devices_per_chip_; +} +inline int32_t TPUHardwareFeature::num_embedding_devices_per_chip() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.TPUHardwareFeature.num_embedding_devices_per_chip) + return _internal_num_embedding_devices_per_chip(); +} +inline void TPUHardwareFeature::_internal_set_num_embedding_devices_per_chip(int32_t value) { + + _impl_.num_embedding_devices_per_chip_ = value; +} +inline void TPUHardwareFeature::set_num_embedding_devices_per_chip(int32_t value) { + _internal_set_num_embedding_devices_per_chip(value); + // @@protoc_insertion_point(field_set:tensorflow.tpu.TPUHardwareFeature.num_embedding_devices_per_chip) +} + +// ------------------------------------------------------------------- + +// TopologyProto + +// repeated int32 mesh_shape = 1; +inline int TopologyProto::_internal_mesh_shape_size() const { + return _impl_.mesh_shape_.size(); +} +inline int TopologyProto::mesh_shape_size() const { + return _internal_mesh_shape_size(); +} +inline void TopologyProto::clear_mesh_shape() { + _impl_.mesh_shape_.Clear(); +} +inline int32_t TopologyProto::_internal_mesh_shape(int index) const { + return _impl_.mesh_shape_.Get(index); +} +inline int32_t TopologyProto::mesh_shape(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.TopologyProto.mesh_shape) + return _internal_mesh_shape(index); +} +inline void TopologyProto::set_mesh_shape(int index, int32_t value) { + _impl_.mesh_shape_.Set(index, value); + // @@protoc_insertion_point(field_set:tensorflow.tpu.TopologyProto.mesh_shape) +} +inline void TopologyProto::_internal_add_mesh_shape(int32_t value) { + _impl_.mesh_shape_.Add(value); +} +inline void TopologyProto::add_mesh_shape(int32_t value) { + _internal_add_mesh_shape(value); + // @@protoc_insertion_point(field_add:tensorflow.tpu.TopologyProto.mesh_shape) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >& +TopologyProto::_internal_mesh_shape() const { + return _impl_.mesh_shape_; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >& +TopologyProto::mesh_shape() const { + // @@protoc_insertion_point(field_list:tensorflow.tpu.TopologyProto.mesh_shape) + return _internal_mesh_shape(); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >* +TopologyProto::_internal_mutable_mesh_shape() { + return &_impl_.mesh_shape_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >* +TopologyProto::mutable_mesh_shape() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.tpu.TopologyProto.mesh_shape) + return _internal_mutable_mesh_shape(); +} + +// int32 num_tasks = 2; +inline void TopologyProto::clear_num_tasks() { + _impl_.num_tasks_ = 0; +} +inline int32_t TopologyProto::_internal_num_tasks() const { + return _impl_.num_tasks_; +} +inline int32_t TopologyProto::num_tasks() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.TopologyProto.num_tasks) + return _internal_num_tasks(); +} +inline void TopologyProto::_internal_set_num_tasks(int32_t value) { + + _impl_.num_tasks_ = value; +} +inline void TopologyProto::set_num_tasks(int32_t value) { + _internal_set_num_tasks(value); + // @@protoc_insertion_point(field_set:tensorflow.tpu.TopologyProto.num_tasks) +} + +// int32 num_tpu_devices_per_task = 3; +inline void TopologyProto::clear_num_tpu_devices_per_task() { + _impl_.num_tpu_devices_per_task_ = 0; +} +inline int32_t TopologyProto::_internal_num_tpu_devices_per_task() const { + return _impl_.num_tpu_devices_per_task_; +} +inline int32_t TopologyProto::num_tpu_devices_per_task() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.TopologyProto.num_tpu_devices_per_task) + return _internal_num_tpu_devices_per_task(); +} +inline void TopologyProto::_internal_set_num_tpu_devices_per_task(int32_t value) { + + _impl_.num_tpu_devices_per_task_ = value; +} +inline void TopologyProto::set_num_tpu_devices_per_task(int32_t value) { + _internal_set_num_tpu_devices_per_task(value); + // @@protoc_insertion_point(field_set:tensorflow.tpu.TopologyProto.num_tpu_devices_per_task) +} + +// repeated int32 device_coordinates = 4; +inline int TopologyProto::_internal_device_coordinates_size() const { + return _impl_.device_coordinates_.size(); +} +inline int TopologyProto::device_coordinates_size() const { + return _internal_device_coordinates_size(); +} +inline void TopologyProto::clear_device_coordinates() { + _impl_.device_coordinates_.Clear(); +} +inline int32_t TopologyProto::_internal_device_coordinates(int index) const { + return _impl_.device_coordinates_.Get(index); +} +inline int32_t TopologyProto::device_coordinates(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.TopologyProto.device_coordinates) + return _internal_device_coordinates(index); +} +inline void TopologyProto::set_device_coordinates(int index, int32_t value) { + _impl_.device_coordinates_.Set(index, value); + // @@protoc_insertion_point(field_set:tensorflow.tpu.TopologyProto.device_coordinates) +} +inline void TopologyProto::_internal_add_device_coordinates(int32_t value) { + _impl_.device_coordinates_.Add(value); +} +inline void TopologyProto::add_device_coordinates(int32_t value) { + _internal_add_device_coordinates(value); + // @@protoc_insertion_point(field_add:tensorflow.tpu.TopologyProto.device_coordinates) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >& +TopologyProto::_internal_device_coordinates() const { + return _impl_.device_coordinates_; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >& +TopologyProto::device_coordinates() const { + // @@protoc_insertion_point(field_list:tensorflow.tpu.TopologyProto.device_coordinates) + return _internal_device_coordinates(); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >* +TopologyProto::_internal_mutable_device_coordinates() { + return &_impl_.device_coordinates_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >* +TopologyProto::mutable_device_coordinates() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.tpu.TopologyProto.device_coordinates) + return _internal_mutable_device_coordinates(); +} + +// .tensorflow.tpu.TPUHardwareFeature tpu_hardware_feature = 5; +inline bool TopologyProto::_internal_has_tpu_hardware_feature() const { + return this != internal_default_instance() && _impl_.tpu_hardware_feature_ != nullptr; +} +inline bool TopologyProto::has_tpu_hardware_feature() const { + return _internal_has_tpu_hardware_feature(); +} +inline void TopologyProto::clear_tpu_hardware_feature() { + if (GetArenaForAllocation() == nullptr && _impl_.tpu_hardware_feature_ != nullptr) { + delete _impl_.tpu_hardware_feature_; + } + _impl_.tpu_hardware_feature_ = nullptr; +} +inline const ::tensorflow::tpu::TPUHardwareFeature& TopologyProto::_internal_tpu_hardware_feature() const { + const ::tensorflow::tpu::TPUHardwareFeature* p = _impl_.tpu_hardware_feature_; + return p != nullptr ? *p : reinterpret_cast( + ::tensorflow::tpu::_TPUHardwareFeature_default_instance_); +} +inline const ::tensorflow::tpu::TPUHardwareFeature& TopologyProto::tpu_hardware_feature() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.TopologyProto.tpu_hardware_feature) + return _internal_tpu_hardware_feature(); +} +inline void TopologyProto::unsafe_arena_set_allocated_tpu_hardware_feature( + ::tensorflow::tpu::TPUHardwareFeature* tpu_hardware_feature) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.tpu_hardware_feature_); + } + _impl_.tpu_hardware_feature_ = tpu_hardware_feature; + if (tpu_hardware_feature) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.tpu.TopologyProto.tpu_hardware_feature) +} +inline ::tensorflow::tpu::TPUHardwareFeature* TopologyProto::release_tpu_hardware_feature() { + + ::tensorflow::tpu::TPUHardwareFeature* temp = _impl_.tpu_hardware_feature_; + _impl_.tpu_hardware_feature_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tensorflow::tpu::TPUHardwareFeature* TopologyProto::unsafe_arena_release_tpu_hardware_feature() { + // @@protoc_insertion_point(field_release:tensorflow.tpu.TopologyProto.tpu_hardware_feature) + + ::tensorflow::tpu::TPUHardwareFeature* temp = _impl_.tpu_hardware_feature_; + _impl_.tpu_hardware_feature_ = nullptr; + return temp; +} +inline ::tensorflow::tpu::TPUHardwareFeature* TopologyProto::_internal_mutable_tpu_hardware_feature() { + + if (_impl_.tpu_hardware_feature_ == nullptr) { + auto* p = CreateMaybeMessage<::tensorflow::tpu::TPUHardwareFeature>(GetArenaForAllocation()); + _impl_.tpu_hardware_feature_ = p; + } + return _impl_.tpu_hardware_feature_; +} +inline ::tensorflow::tpu::TPUHardwareFeature* TopologyProto::mutable_tpu_hardware_feature() { + ::tensorflow::tpu::TPUHardwareFeature* _msg = _internal_mutable_tpu_hardware_feature(); + // @@protoc_insertion_point(field_mutable:tensorflow.tpu.TopologyProto.tpu_hardware_feature) + return _msg; +} +inline void TopologyProto::set_allocated_tpu_hardware_feature(::tensorflow::tpu::TPUHardwareFeature* tpu_hardware_feature) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete _impl_.tpu_hardware_feature_; + } + if (tpu_hardware_feature) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(tpu_hardware_feature); + if (message_arena != submessage_arena) { + tpu_hardware_feature = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, tpu_hardware_feature, submessage_arena); + } + + } else { + + } + _impl_.tpu_hardware_feature_ = tpu_hardware_feature; + // @@protoc_insertion_point(field_set_allocated:tensorflow.tpu.TopologyProto.tpu_hardware_feature) +} + +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ +// ------------------------------------------------------------------- + + +// @@protoc_insertion_point(namespace_scope) + +} // namespace tpu +} // namespace tensorflow + +PROTOBUF_NAMESPACE_OPEN + +template <> struct is_proto_enum< ::tensorflow::tpu::TPUHardwareFeature_EmbeddingFeature> : ::std::true_type {}; +template <> +inline const EnumDescriptor* GetEnumDescriptor< ::tensorflow::tpu::TPUHardwareFeature_EmbeddingFeature>() { + return ::tensorflow::tpu::TPUHardwareFeature_EmbeddingFeature_descriptor(); +} + +PROTOBUF_NAMESPACE_CLOSE + +// @@protoc_insertion_point(global_scope) + +#include +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprotobuf_2ftpu_2ftopology_2eproto diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/tpu/tpu_embedding_configuration.pb.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/tpu/tpu_embedding_configuration.pb.h new file mode 100644 index 0000000000000000000000000000000000000000..e499ad30691e91c5f8ca491c1d6c88deb46bea8b --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/tpu/tpu_embedding_configuration.pb.h @@ -0,0 +1,1904 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/tpu/tpu_embedding_configuration.proto + +#ifndef GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprotobuf_2ftpu_2ftpu_5fembedding_5fconfiguration_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprotobuf_2ftpu_2ftpu_5fembedding_5fconfiguration_2eproto + +#include +#include + +#include +#if PROTOBUF_VERSION < 3021000 +#error This file was generated by a newer version of protoc which is +#error incompatible with your Protocol Buffer headers. Please update +#error your headers. +#endif +#if 3021009 < PROTOBUF_MIN_PROTOC_VERSION +#error This file was generated by an older version of protoc which is +#error incompatible with your Protocol Buffer headers. Please +#error regenerate this file with a newer version of protoc. +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include // IWYU pragma: export +#include // IWYU pragma: export +#include +#include +#include "tensorflow/core/protobuf/tpu/optimization_parameters.pb.h" +// @@protoc_insertion_point(includes) +#include +#define PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2fprotobuf_2ftpu_2ftpu_5fembedding_5fconfiguration_2eproto +PROTOBUF_NAMESPACE_OPEN +namespace internal { +class AnyMetadata; +} // namespace internal +PROTOBUF_NAMESPACE_CLOSE + +// Internal implementation detail -- do not use these members. +struct TableStruct_tensorflow_2fcore_2fprotobuf_2ftpu_2ftpu_5fembedding_5fconfiguration_2eproto { + static const uint32_t offsets[]; +}; +extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_tensorflow_2fcore_2fprotobuf_2ftpu_2ftpu_5fembedding_5fconfiguration_2eproto; +namespace tensorflow { +namespace tpu { +class TPUEmbeddingConfiguration; +struct TPUEmbeddingConfigurationDefaultTypeInternal; +extern TPUEmbeddingConfigurationDefaultTypeInternal _TPUEmbeddingConfiguration_default_instance_; +class TPUEmbeddingConfiguration_FeatureDescriptor; +struct TPUEmbeddingConfiguration_FeatureDescriptorDefaultTypeInternal; +extern TPUEmbeddingConfiguration_FeatureDescriptorDefaultTypeInternal _TPUEmbeddingConfiguration_FeatureDescriptor_default_instance_; +class TPUEmbeddingConfiguration_SpmdSharding; +struct TPUEmbeddingConfiguration_SpmdShardingDefaultTypeInternal; +extern TPUEmbeddingConfiguration_SpmdShardingDefaultTypeInternal _TPUEmbeddingConfiguration_SpmdSharding_default_instance_; +class TPUEmbeddingConfiguration_TableDescriptor; +struct TPUEmbeddingConfiguration_TableDescriptorDefaultTypeInternal; +extern TPUEmbeddingConfiguration_TableDescriptorDefaultTypeInternal _TPUEmbeddingConfiguration_TableDescriptor_default_instance_; +class TPUEmbeddingError; +struct TPUEmbeddingErrorDefaultTypeInternal; +extern TPUEmbeddingErrorDefaultTypeInternal _TPUEmbeddingError_default_instance_; +} // namespace tpu +} // namespace tensorflow +PROTOBUF_NAMESPACE_OPEN +template<> ::tensorflow::tpu::TPUEmbeddingConfiguration* Arena::CreateMaybeMessage<::tensorflow::tpu::TPUEmbeddingConfiguration>(Arena*); +template<> ::tensorflow::tpu::TPUEmbeddingConfiguration_FeatureDescriptor* Arena::CreateMaybeMessage<::tensorflow::tpu::TPUEmbeddingConfiguration_FeatureDescriptor>(Arena*); +template<> ::tensorflow::tpu::TPUEmbeddingConfiguration_SpmdSharding* Arena::CreateMaybeMessage<::tensorflow::tpu::TPUEmbeddingConfiguration_SpmdSharding>(Arena*); +template<> ::tensorflow::tpu::TPUEmbeddingConfiguration_TableDescriptor* Arena::CreateMaybeMessage<::tensorflow::tpu::TPUEmbeddingConfiguration_TableDescriptor>(Arena*); +template<> ::tensorflow::tpu::TPUEmbeddingError* Arena::CreateMaybeMessage<::tensorflow::tpu::TPUEmbeddingError>(Arena*); +PROTOBUF_NAMESPACE_CLOSE +namespace tensorflow { +namespace tpu { + +enum TPUEmbeddingConfiguration_Mode : int { + TPUEmbeddingConfiguration_Mode_UNSPECIFIED = 0, + TPUEmbeddingConfiguration_Mode_INFERENCE = 1, + TPUEmbeddingConfiguration_Mode_TRAINING = 2, + TPUEmbeddingConfiguration_Mode_BACKWARD_PASS_ONLY = 3, + TPUEmbeddingConfiguration_Mode_TPUEmbeddingConfiguration_Mode_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits::min(), + TPUEmbeddingConfiguration_Mode_TPUEmbeddingConfiguration_Mode_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits::max() +}; +bool TPUEmbeddingConfiguration_Mode_IsValid(int value); +constexpr TPUEmbeddingConfiguration_Mode TPUEmbeddingConfiguration_Mode_Mode_MIN = TPUEmbeddingConfiguration_Mode_UNSPECIFIED; +constexpr TPUEmbeddingConfiguration_Mode TPUEmbeddingConfiguration_Mode_Mode_MAX = TPUEmbeddingConfiguration_Mode_BACKWARD_PASS_ONLY; +constexpr int TPUEmbeddingConfiguration_Mode_Mode_ARRAYSIZE = TPUEmbeddingConfiguration_Mode_Mode_MAX + 1; + +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* TPUEmbeddingConfiguration_Mode_descriptor(); +template +inline const std::string& TPUEmbeddingConfiguration_Mode_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function TPUEmbeddingConfiguration_Mode_Name."); + return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( + TPUEmbeddingConfiguration_Mode_descriptor(), enum_t_value); +} +inline bool TPUEmbeddingConfiguration_Mode_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, TPUEmbeddingConfiguration_Mode* value) { + return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( + TPUEmbeddingConfiguration_Mode_descriptor(), name, value); +} +enum TPUEmbeddingConfiguration_ShardingStrategy : int { + TPUEmbeddingConfiguration_ShardingStrategy_DIV_DEFAULT = 0, + TPUEmbeddingConfiguration_ShardingStrategy_MOD = 1, + TPUEmbeddingConfiguration_ShardingStrategy_TPUEmbeddingConfiguration_ShardingStrategy_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits::min(), + TPUEmbeddingConfiguration_ShardingStrategy_TPUEmbeddingConfiguration_ShardingStrategy_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits::max() +}; +bool TPUEmbeddingConfiguration_ShardingStrategy_IsValid(int value); +constexpr TPUEmbeddingConfiguration_ShardingStrategy TPUEmbeddingConfiguration_ShardingStrategy_ShardingStrategy_MIN = TPUEmbeddingConfiguration_ShardingStrategy_DIV_DEFAULT; +constexpr TPUEmbeddingConfiguration_ShardingStrategy TPUEmbeddingConfiguration_ShardingStrategy_ShardingStrategy_MAX = TPUEmbeddingConfiguration_ShardingStrategy_MOD; +constexpr int TPUEmbeddingConfiguration_ShardingStrategy_ShardingStrategy_ARRAYSIZE = TPUEmbeddingConfiguration_ShardingStrategy_ShardingStrategy_MAX + 1; + +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* TPUEmbeddingConfiguration_ShardingStrategy_descriptor(); +template +inline const std::string& TPUEmbeddingConfiguration_ShardingStrategy_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function TPUEmbeddingConfiguration_ShardingStrategy_Name."); + return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( + TPUEmbeddingConfiguration_ShardingStrategy_descriptor(), enum_t_value); +} +inline bool TPUEmbeddingConfiguration_ShardingStrategy_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, TPUEmbeddingConfiguration_ShardingStrategy* value) { + return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( + TPUEmbeddingConfiguration_ShardingStrategy_descriptor(), name, value); +} +// =================================================================== + +class TPUEmbeddingConfiguration_TableDescriptor final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.tpu.TPUEmbeddingConfiguration.TableDescriptor) */ { + public: + inline TPUEmbeddingConfiguration_TableDescriptor() : TPUEmbeddingConfiguration_TableDescriptor(nullptr) {} + ~TPUEmbeddingConfiguration_TableDescriptor() override; + explicit PROTOBUF_CONSTEXPR TPUEmbeddingConfiguration_TableDescriptor(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + TPUEmbeddingConfiguration_TableDescriptor(const TPUEmbeddingConfiguration_TableDescriptor& from); + TPUEmbeddingConfiguration_TableDescriptor(TPUEmbeddingConfiguration_TableDescriptor&& from) noexcept + : TPUEmbeddingConfiguration_TableDescriptor() { + *this = ::std::move(from); + } + + inline TPUEmbeddingConfiguration_TableDescriptor& operator=(const TPUEmbeddingConfiguration_TableDescriptor& from) { + CopyFrom(from); + return *this; + } + inline TPUEmbeddingConfiguration_TableDescriptor& operator=(TPUEmbeddingConfiguration_TableDescriptor&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const TPUEmbeddingConfiguration_TableDescriptor& default_instance() { + return *internal_default_instance(); + } + static inline const TPUEmbeddingConfiguration_TableDescriptor* internal_default_instance() { + return reinterpret_cast( + &_TPUEmbeddingConfiguration_TableDescriptor_default_instance_); + } + static constexpr int kIndexInFileMessages = + 0; + + friend void swap(TPUEmbeddingConfiguration_TableDescriptor& a, TPUEmbeddingConfiguration_TableDescriptor& b) { + a.Swap(&b); + } + inline void Swap(TPUEmbeddingConfiguration_TableDescriptor* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(TPUEmbeddingConfiguration_TableDescriptor* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + TPUEmbeddingConfiguration_TableDescriptor* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const TPUEmbeddingConfiguration_TableDescriptor& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const TPUEmbeddingConfiguration_TableDescriptor& from) { + TPUEmbeddingConfiguration_TableDescriptor::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(TPUEmbeddingConfiguration_TableDescriptor* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.tpu.TPUEmbeddingConfiguration.TableDescriptor"; + } + protected: + explicit TPUEmbeddingConfiguration_TableDescriptor(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kNameFieldNumber = 1, + kOptimizationParametersFieldNumber = 5, + kVocabularySizeFieldNumber = 2, + kDimensionFieldNumber = 3, + kNumFeaturesFieldNumber = 4, + }; + // string name = 1; + void clear_name(); + const std::string& name() const; + template + void set_name(ArgT0&& arg0, ArgT... args); + std::string* mutable_name(); + PROTOBUF_NODISCARD std::string* release_name(); + void set_allocated_name(std::string* name); + private: + const std::string& _internal_name() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_name(const std::string& value); + std::string* _internal_mutable_name(); + public: + + // .tensorflow.tpu.OptimizationParameters optimization_parameters = 5; + bool has_optimization_parameters() const; + private: + bool _internal_has_optimization_parameters() const; + public: + void clear_optimization_parameters(); + const ::tensorflow::tpu::OptimizationParameters& optimization_parameters() const; + PROTOBUF_NODISCARD ::tensorflow::tpu::OptimizationParameters* release_optimization_parameters(); + ::tensorflow::tpu::OptimizationParameters* mutable_optimization_parameters(); + void set_allocated_optimization_parameters(::tensorflow::tpu::OptimizationParameters* optimization_parameters); + private: + const ::tensorflow::tpu::OptimizationParameters& _internal_optimization_parameters() const; + ::tensorflow::tpu::OptimizationParameters* _internal_mutable_optimization_parameters(); + public: + void unsafe_arena_set_allocated_optimization_parameters( + ::tensorflow::tpu::OptimizationParameters* optimization_parameters); + ::tensorflow::tpu::OptimizationParameters* unsafe_arena_release_optimization_parameters(); + + // int64 vocabulary_size = 2; + void clear_vocabulary_size(); + int64_t vocabulary_size() const; + void set_vocabulary_size(int64_t value); + private: + int64_t _internal_vocabulary_size() const; + void _internal_set_vocabulary_size(int64_t value); + public: + + // int32 dimension = 3; + void clear_dimension(); + int32_t dimension() const; + void set_dimension(int32_t value); + private: + int32_t _internal_dimension() const; + void _internal_set_dimension(int32_t value); + public: + + // int32 num_features = 4; + void clear_num_features(); + int32_t num_features() const; + void set_num_features(int32_t value); + private: + int32_t _internal_num_features() const; + void _internal_set_num_features(int32_t value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.tpu.TPUEmbeddingConfiguration.TableDescriptor) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_; + ::tensorflow::tpu::OptimizationParameters* optimization_parameters_; + int64_t vocabulary_size_; + int32_t dimension_; + int32_t num_features_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2ftpu_2ftpu_5fembedding_5fconfiguration_2eproto; +}; +// ------------------------------------------------------------------- + +class TPUEmbeddingConfiguration_FeatureDescriptor final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.tpu.TPUEmbeddingConfiguration.FeatureDescriptor) */ { + public: + inline TPUEmbeddingConfiguration_FeatureDescriptor() : TPUEmbeddingConfiguration_FeatureDescriptor(nullptr) {} + ~TPUEmbeddingConfiguration_FeatureDescriptor() override; + explicit PROTOBUF_CONSTEXPR TPUEmbeddingConfiguration_FeatureDescriptor(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + TPUEmbeddingConfiguration_FeatureDescriptor(const TPUEmbeddingConfiguration_FeatureDescriptor& from); + TPUEmbeddingConfiguration_FeatureDescriptor(TPUEmbeddingConfiguration_FeatureDescriptor&& from) noexcept + : TPUEmbeddingConfiguration_FeatureDescriptor() { + *this = ::std::move(from); + } + + inline TPUEmbeddingConfiguration_FeatureDescriptor& operator=(const TPUEmbeddingConfiguration_FeatureDescriptor& from) { + CopyFrom(from); + return *this; + } + inline TPUEmbeddingConfiguration_FeatureDescriptor& operator=(TPUEmbeddingConfiguration_FeatureDescriptor&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const TPUEmbeddingConfiguration_FeatureDescriptor& default_instance() { + return *internal_default_instance(); + } + static inline const TPUEmbeddingConfiguration_FeatureDescriptor* internal_default_instance() { + return reinterpret_cast( + &_TPUEmbeddingConfiguration_FeatureDescriptor_default_instance_); + } + static constexpr int kIndexInFileMessages = + 1; + + friend void swap(TPUEmbeddingConfiguration_FeatureDescriptor& a, TPUEmbeddingConfiguration_FeatureDescriptor& b) { + a.Swap(&b); + } + inline void Swap(TPUEmbeddingConfiguration_FeatureDescriptor* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(TPUEmbeddingConfiguration_FeatureDescriptor* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + TPUEmbeddingConfiguration_FeatureDescriptor* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const TPUEmbeddingConfiguration_FeatureDescriptor& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const TPUEmbeddingConfiguration_FeatureDescriptor& from) { + TPUEmbeddingConfiguration_FeatureDescriptor::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(TPUEmbeddingConfiguration_FeatureDescriptor* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.tpu.TPUEmbeddingConfiguration.FeatureDescriptor"; + } + protected: + explicit TPUEmbeddingConfiguration_FeatureDescriptor(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kInputShapeFieldNumber = 3, + kNameFieldNumber = 1, + kTableIdFieldNumber = 2, + }; + // repeated int32 input_shape = 3; + int input_shape_size() const; + private: + int _internal_input_shape_size() const; + public: + void clear_input_shape(); + private: + int32_t _internal_input_shape(int index) const; + const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >& + _internal_input_shape() const; + void _internal_add_input_shape(int32_t value); + ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >* + _internal_mutable_input_shape(); + public: + int32_t input_shape(int index) const; + void set_input_shape(int index, int32_t value); + void add_input_shape(int32_t value); + const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >& + input_shape() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >* + mutable_input_shape(); + + // string name = 1; + void clear_name(); + const std::string& name() const; + template + void set_name(ArgT0&& arg0, ArgT... args); + std::string* mutable_name(); + PROTOBUF_NODISCARD std::string* release_name(); + void set_allocated_name(std::string* name); + private: + const std::string& _internal_name() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_name(const std::string& value); + std::string* _internal_mutable_name(); + public: + + // int32 table_id = 2; + void clear_table_id(); + int32_t table_id() const; + void set_table_id(int32_t value); + private: + int32_t _internal_table_id() const; + void _internal_set_table_id(int32_t value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.tpu.TPUEmbeddingConfiguration.FeatureDescriptor) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t > input_shape_; + mutable std::atomic _input_shape_cached_byte_size_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_; + int32_t table_id_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2ftpu_2ftpu_5fembedding_5fconfiguration_2eproto; +}; +// ------------------------------------------------------------------- + +class TPUEmbeddingConfiguration_SpmdSharding final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.tpu.TPUEmbeddingConfiguration.SpmdSharding) */ { + public: + inline TPUEmbeddingConfiguration_SpmdSharding() : TPUEmbeddingConfiguration_SpmdSharding(nullptr) {} + ~TPUEmbeddingConfiguration_SpmdSharding() override; + explicit PROTOBUF_CONSTEXPR TPUEmbeddingConfiguration_SpmdSharding(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + TPUEmbeddingConfiguration_SpmdSharding(const TPUEmbeddingConfiguration_SpmdSharding& from); + TPUEmbeddingConfiguration_SpmdSharding(TPUEmbeddingConfiguration_SpmdSharding&& from) noexcept + : TPUEmbeddingConfiguration_SpmdSharding() { + *this = ::std::move(from); + } + + inline TPUEmbeddingConfiguration_SpmdSharding& operator=(const TPUEmbeddingConfiguration_SpmdSharding& from) { + CopyFrom(from); + return *this; + } + inline TPUEmbeddingConfiguration_SpmdSharding& operator=(TPUEmbeddingConfiguration_SpmdSharding&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const TPUEmbeddingConfiguration_SpmdSharding& default_instance() { + return *internal_default_instance(); + } + static inline const TPUEmbeddingConfiguration_SpmdSharding* internal_default_instance() { + return reinterpret_cast( + &_TPUEmbeddingConfiguration_SpmdSharding_default_instance_); + } + static constexpr int kIndexInFileMessages = + 2; + + friend void swap(TPUEmbeddingConfiguration_SpmdSharding& a, TPUEmbeddingConfiguration_SpmdSharding& b) { + a.Swap(&b); + } + inline void Swap(TPUEmbeddingConfiguration_SpmdSharding* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(TPUEmbeddingConfiguration_SpmdSharding* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + TPUEmbeddingConfiguration_SpmdSharding* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const TPUEmbeddingConfiguration_SpmdSharding& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const TPUEmbeddingConfiguration_SpmdSharding& from) { + TPUEmbeddingConfiguration_SpmdSharding::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(TPUEmbeddingConfiguration_SpmdSharding* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.tpu.TPUEmbeddingConfiguration.SpmdSharding"; + } + protected: + explicit TPUEmbeddingConfiguration_SpmdSharding(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kEnabledFieldNumber = 1, + kNumCoresPerReplicaFieldNumber = 2, + }; + // bool enabled = 1; + void clear_enabled(); + bool enabled() const; + void set_enabled(bool value); + private: + bool _internal_enabled() const; + void _internal_set_enabled(bool value); + public: + + // int32 num_cores_per_replica = 2; + void clear_num_cores_per_replica(); + int32_t num_cores_per_replica() const; + void set_num_cores_per_replica(int32_t value); + private: + int32_t _internal_num_cores_per_replica() const; + void _internal_set_num_cores_per_replica(int32_t value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.tpu.TPUEmbeddingConfiguration.SpmdSharding) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + bool enabled_; + int32_t num_cores_per_replica_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2ftpu_2ftpu_5fembedding_5fconfiguration_2eproto; +}; +// ------------------------------------------------------------------- + +class TPUEmbeddingConfiguration final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.tpu.TPUEmbeddingConfiguration) */ { + public: + inline TPUEmbeddingConfiguration() : TPUEmbeddingConfiguration(nullptr) {} + ~TPUEmbeddingConfiguration() override; + explicit PROTOBUF_CONSTEXPR TPUEmbeddingConfiguration(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + TPUEmbeddingConfiguration(const TPUEmbeddingConfiguration& from); + TPUEmbeddingConfiguration(TPUEmbeddingConfiguration&& from) noexcept + : TPUEmbeddingConfiguration() { + *this = ::std::move(from); + } + + inline TPUEmbeddingConfiguration& operator=(const TPUEmbeddingConfiguration& from) { + CopyFrom(from); + return *this; + } + inline TPUEmbeddingConfiguration& operator=(TPUEmbeddingConfiguration&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const TPUEmbeddingConfiguration& default_instance() { + return *internal_default_instance(); + } + static inline const TPUEmbeddingConfiguration* internal_default_instance() { + return reinterpret_cast( + &_TPUEmbeddingConfiguration_default_instance_); + } + static constexpr int kIndexInFileMessages = + 3; + + friend void swap(TPUEmbeddingConfiguration& a, TPUEmbeddingConfiguration& b) { + a.Swap(&b); + } + inline void Swap(TPUEmbeddingConfiguration* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(TPUEmbeddingConfiguration* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + TPUEmbeddingConfiguration* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const TPUEmbeddingConfiguration& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const TPUEmbeddingConfiguration& from) { + TPUEmbeddingConfiguration::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(TPUEmbeddingConfiguration* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.tpu.TPUEmbeddingConfiguration"; + } + protected: + explicit TPUEmbeddingConfiguration(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + typedef TPUEmbeddingConfiguration_TableDescriptor TableDescriptor; + typedef TPUEmbeddingConfiguration_FeatureDescriptor FeatureDescriptor; + typedef TPUEmbeddingConfiguration_SpmdSharding SpmdSharding; + + typedef TPUEmbeddingConfiguration_Mode Mode; + static constexpr Mode UNSPECIFIED = + TPUEmbeddingConfiguration_Mode_UNSPECIFIED; + static constexpr Mode INFERENCE = + TPUEmbeddingConfiguration_Mode_INFERENCE; + static constexpr Mode TRAINING = + TPUEmbeddingConfiguration_Mode_TRAINING; + static constexpr Mode BACKWARD_PASS_ONLY = + TPUEmbeddingConfiguration_Mode_BACKWARD_PASS_ONLY; + static inline bool Mode_IsValid(int value) { + return TPUEmbeddingConfiguration_Mode_IsValid(value); + } + static constexpr Mode Mode_MIN = + TPUEmbeddingConfiguration_Mode_Mode_MIN; + static constexpr Mode Mode_MAX = + TPUEmbeddingConfiguration_Mode_Mode_MAX; + static constexpr int Mode_ARRAYSIZE = + TPUEmbeddingConfiguration_Mode_Mode_ARRAYSIZE; + static inline const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* + Mode_descriptor() { + return TPUEmbeddingConfiguration_Mode_descriptor(); + } + template + static inline const std::string& Mode_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function Mode_Name."); + return TPUEmbeddingConfiguration_Mode_Name(enum_t_value); + } + static inline bool Mode_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name, + Mode* value) { + return TPUEmbeddingConfiguration_Mode_Parse(name, value); + } + + typedef TPUEmbeddingConfiguration_ShardingStrategy ShardingStrategy; + static constexpr ShardingStrategy DIV_DEFAULT = + TPUEmbeddingConfiguration_ShardingStrategy_DIV_DEFAULT; + static constexpr ShardingStrategy MOD = + TPUEmbeddingConfiguration_ShardingStrategy_MOD; + static inline bool ShardingStrategy_IsValid(int value) { + return TPUEmbeddingConfiguration_ShardingStrategy_IsValid(value); + } + static constexpr ShardingStrategy ShardingStrategy_MIN = + TPUEmbeddingConfiguration_ShardingStrategy_ShardingStrategy_MIN; + static constexpr ShardingStrategy ShardingStrategy_MAX = + TPUEmbeddingConfiguration_ShardingStrategy_ShardingStrategy_MAX; + static constexpr int ShardingStrategy_ARRAYSIZE = + TPUEmbeddingConfiguration_ShardingStrategy_ShardingStrategy_ARRAYSIZE; + static inline const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* + ShardingStrategy_descriptor() { + return TPUEmbeddingConfiguration_ShardingStrategy_descriptor(); + } + template + static inline const std::string& ShardingStrategy_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function ShardingStrategy_Name."); + return TPUEmbeddingConfiguration_ShardingStrategy_Name(enum_t_value); + } + static inline bool ShardingStrategy_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name, + ShardingStrategy* value) { + return TPUEmbeddingConfiguration_ShardingStrategy_Parse(name, value); + } + + // accessors ------------------------------------------------------- + + enum : int { + kTableDescriptorFieldNumber = 1, + kFeatureDescriptorFieldNumber = 10, + kProfileDataDirectoryFieldNumber = 9, + kSpmdShardingFieldNumber = 11, + kModeFieldNumber = 2, + kBatchSizePerTensorCoreFieldNumber = 3, + kNumHostsFieldNumber = 4, + kNumTensorCoresFieldNumber = 5, + kShardingStrategyFieldNumber = 6, + kPipelineExecutionWithTensorCoreFieldNumber = 7, + }; + // repeated .tensorflow.tpu.TPUEmbeddingConfiguration.TableDescriptor table_descriptor = 1; + int table_descriptor_size() const; + private: + int _internal_table_descriptor_size() const; + public: + void clear_table_descriptor(); + ::tensorflow::tpu::TPUEmbeddingConfiguration_TableDescriptor* mutable_table_descriptor(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::tpu::TPUEmbeddingConfiguration_TableDescriptor >* + mutable_table_descriptor(); + private: + const ::tensorflow::tpu::TPUEmbeddingConfiguration_TableDescriptor& _internal_table_descriptor(int index) const; + ::tensorflow::tpu::TPUEmbeddingConfiguration_TableDescriptor* _internal_add_table_descriptor(); + public: + const ::tensorflow::tpu::TPUEmbeddingConfiguration_TableDescriptor& table_descriptor(int index) const; + ::tensorflow::tpu::TPUEmbeddingConfiguration_TableDescriptor* add_table_descriptor(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::tpu::TPUEmbeddingConfiguration_TableDescriptor >& + table_descriptor() const; + + // repeated .tensorflow.tpu.TPUEmbeddingConfiguration.FeatureDescriptor feature_descriptor = 10; + int feature_descriptor_size() const; + private: + int _internal_feature_descriptor_size() const; + public: + void clear_feature_descriptor(); + ::tensorflow::tpu::TPUEmbeddingConfiguration_FeatureDescriptor* mutable_feature_descriptor(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::tpu::TPUEmbeddingConfiguration_FeatureDescriptor >* + mutable_feature_descriptor(); + private: + const ::tensorflow::tpu::TPUEmbeddingConfiguration_FeatureDescriptor& _internal_feature_descriptor(int index) const; + ::tensorflow::tpu::TPUEmbeddingConfiguration_FeatureDescriptor* _internal_add_feature_descriptor(); + public: + const ::tensorflow::tpu::TPUEmbeddingConfiguration_FeatureDescriptor& feature_descriptor(int index) const; + ::tensorflow::tpu::TPUEmbeddingConfiguration_FeatureDescriptor* add_feature_descriptor(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::tpu::TPUEmbeddingConfiguration_FeatureDescriptor >& + feature_descriptor() const; + + // string profile_data_directory = 9; + void clear_profile_data_directory(); + const std::string& profile_data_directory() const; + template + void set_profile_data_directory(ArgT0&& arg0, ArgT... args); + std::string* mutable_profile_data_directory(); + PROTOBUF_NODISCARD std::string* release_profile_data_directory(); + void set_allocated_profile_data_directory(std::string* profile_data_directory); + private: + const std::string& _internal_profile_data_directory() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_profile_data_directory(const std::string& value); + std::string* _internal_mutable_profile_data_directory(); + public: + + // .tensorflow.tpu.TPUEmbeddingConfiguration.SpmdSharding spmd_sharding = 11; + bool has_spmd_sharding() const; + private: + bool _internal_has_spmd_sharding() const; + public: + void clear_spmd_sharding(); + const ::tensorflow::tpu::TPUEmbeddingConfiguration_SpmdSharding& spmd_sharding() const; + PROTOBUF_NODISCARD ::tensorflow::tpu::TPUEmbeddingConfiguration_SpmdSharding* release_spmd_sharding(); + ::tensorflow::tpu::TPUEmbeddingConfiguration_SpmdSharding* mutable_spmd_sharding(); + void set_allocated_spmd_sharding(::tensorflow::tpu::TPUEmbeddingConfiguration_SpmdSharding* spmd_sharding); + private: + const ::tensorflow::tpu::TPUEmbeddingConfiguration_SpmdSharding& _internal_spmd_sharding() const; + ::tensorflow::tpu::TPUEmbeddingConfiguration_SpmdSharding* _internal_mutable_spmd_sharding(); + public: + void unsafe_arena_set_allocated_spmd_sharding( + ::tensorflow::tpu::TPUEmbeddingConfiguration_SpmdSharding* spmd_sharding); + ::tensorflow::tpu::TPUEmbeddingConfiguration_SpmdSharding* unsafe_arena_release_spmd_sharding(); + + // .tensorflow.tpu.TPUEmbeddingConfiguration.Mode mode = 2; + void clear_mode(); + ::tensorflow::tpu::TPUEmbeddingConfiguration_Mode mode() const; + void set_mode(::tensorflow::tpu::TPUEmbeddingConfiguration_Mode value); + private: + ::tensorflow::tpu::TPUEmbeddingConfiguration_Mode _internal_mode() const; + void _internal_set_mode(::tensorflow::tpu::TPUEmbeddingConfiguration_Mode value); + public: + + // int32 batch_size_per_tensor_core = 3; + void clear_batch_size_per_tensor_core(); + int32_t batch_size_per_tensor_core() const; + void set_batch_size_per_tensor_core(int32_t value); + private: + int32_t _internal_batch_size_per_tensor_core() const; + void _internal_set_batch_size_per_tensor_core(int32_t value); + public: + + // int32 num_hosts = 4; + void clear_num_hosts(); + int32_t num_hosts() const; + void set_num_hosts(int32_t value); + private: + int32_t _internal_num_hosts() const; + void _internal_set_num_hosts(int32_t value); + public: + + // int32 num_tensor_cores = 5; + void clear_num_tensor_cores(); + int32_t num_tensor_cores() const; + void set_num_tensor_cores(int32_t value); + private: + int32_t _internal_num_tensor_cores() const; + void _internal_set_num_tensor_cores(int32_t value); + public: + + // .tensorflow.tpu.TPUEmbeddingConfiguration.ShardingStrategy sharding_strategy = 6; + void clear_sharding_strategy(); + ::tensorflow::tpu::TPUEmbeddingConfiguration_ShardingStrategy sharding_strategy() const; + void set_sharding_strategy(::tensorflow::tpu::TPUEmbeddingConfiguration_ShardingStrategy value); + private: + ::tensorflow::tpu::TPUEmbeddingConfiguration_ShardingStrategy _internal_sharding_strategy() const; + void _internal_set_sharding_strategy(::tensorflow::tpu::TPUEmbeddingConfiguration_ShardingStrategy value); + public: + + // bool pipeline_execution_with_tensor_core = 7; + void clear_pipeline_execution_with_tensor_core(); + bool pipeline_execution_with_tensor_core() const; + void set_pipeline_execution_with_tensor_core(bool value); + private: + bool _internal_pipeline_execution_with_tensor_core() const; + void _internal_set_pipeline_execution_with_tensor_core(bool value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.tpu.TPUEmbeddingConfiguration) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::tpu::TPUEmbeddingConfiguration_TableDescriptor > table_descriptor_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::tpu::TPUEmbeddingConfiguration_FeatureDescriptor > feature_descriptor_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr profile_data_directory_; + ::tensorflow::tpu::TPUEmbeddingConfiguration_SpmdSharding* spmd_sharding_; + int mode_; + int32_t batch_size_per_tensor_core_; + int32_t num_hosts_; + int32_t num_tensor_cores_; + int sharding_strategy_; + bool pipeline_execution_with_tensor_core_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2ftpu_2ftpu_5fembedding_5fconfiguration_2eproto; +}; +// ------------------------------------------------------------------- + +class TPUEmbeddingError final : + public ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase /* @@protoc_insertion_point(class_definition:tensorflow.tpu.TPUEmbeddingError) */ { + public: + inline TPUEmbeddingError() : TPUEmbeddingError(nullptr) {} + explicit PROTOBUF_CONSTEXPR TPUEmbeddingError(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + TPUEmbeddingError(const TPUEmbeddingError& from); + TPUEmbeddingError(TPUEmbeddingError&& from) noexcept + : TPUEmbeddingError() { + *this = ::std::move(from); + } + + inline TPUEmbeddingError& operator=(const TPUEmbeddingError& from) { + CopyFrom(from); + return *this; + } + inline TPUEmbeddingError& operator=(TPUEmbeddingError&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const TPUEmbeddingError& default_instance() { + return *internal_default_instance(); + } + static inline const TPUEmbeddingError* internal_default_instance() { + return reinterpret_cast( + &_TPUEmbeddingError_default_instance_); + } + static constexpr int kIndexInFileMessages = + 4; + + friend void swap(TPUEmbeddingError& a, TPUEmbeddingError& b) { + a.Swap(&b); + } + inline void Swap(TPUEmbeddingError* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(TPUEmbeddingError* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + TPUEmbeddingError* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::CopyFrom; + inline void CopyFrom(const TPUEmbeddingError& from) { + ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::CopyImpl(*this, from); + } + using ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::MergeFrom; + void MergeFrom(const TPUEmbeddingError& from) { + ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::MergeImpl(*this, from); + } + public: + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.tpu.TPUEmbeddingError"; + } + protected: + explicit TPUEmbeddingError(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // @@protoc_insertion_point(class_scope:tensorflow.tpu.TPUEmbeddingError) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2ftpu_2ftpu_5fembedding_5fconfiguration_2eproto; +}; +// =================================================================== + + +// =================================================================== + +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// TPUEmbeddingConfiguration_TableDescriptor + +// string name = 1; +inline void TPUEmbeddingConfiguration_TableDescriptor::clear_name() { + _impl_.name_.ClearToEmpty(); +} +inline const std::string& TPUEmbeddingConfiguration_TableDescriptor::name() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.TPUEmbeddingConfiguration.TableDescriptor.name) + return _internal_name(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void TPUEmbeddingConfiguration_TableDescriptor::set_name(ArgT0&& arg0, ArgT... args) { + + _impl_.name_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.tpu.TPUEmbeddingConfiguration.TableDescriptor.name) +} +inline std::string* TPUEmbeddingConfiguration_TableDescriptor::mutable_name() { + std::string* _s = _internal_mutable_name(); + // @@protoc_insertion_point(field_mutable:tensorflow.tpu.TPUEmbeddingConfiguration.TableDescriptor.name) + return _s; +} +inline const std::string& TPUEmbeddingConfiguration_TableDescriptor::_internal_name() const { + return _impl_.name_.Get(); +} +inline void TPUEmbeddingConfiguration_TableDescriptor::_internal_set_name(const std::string& value) { + + _impl_.name_.Set(value, GetArenaForAllocation()); +} +inline std::string* TPUEmbeddingConfiguration_TableDescriptor::_internal_mutable_name() { + + return _impl_.name_.Mutable(GetArenaForAllocation()); +} +inline std::string* TPUEmbeddingConfiguration_TableDescriptor::release_name() { + // @@protoc_insertion_point(field_release:tensorflow.tpu.TPUEmbeddingConfiguration.TableDescriptor.name) + return _impl_.name_.Release(); +} +inline void TPUEmbeddingConfiguration_TableDescriptor::set_allocated_name(std::string* name) { + if (name != nullptr) { + + } else { + + } + _impl_.name_.SetAllocated(name, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.name_.IsDefault()) { + _impl_.name_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.tpu.TPUEmbeddingConfiguration.TableDescriptor.name) +} + +// int64 vocabulary_size = 2; +inline void TPUEmbeddingConfiguration_TableDescriptor::clear_vocabulary_size() { + _impl_.vocabulary_size_ = int64_t{0}; +} +inline int64_t TPUEmbeddingConfiguration_TableDescriptor::_internal_vocabulary_size() const { + return _impl_.vocabulary_size_; +} +inline int64_t TPUEmbeddingConfiguration_TableDescriptor::vocabulary_size() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.TPUEmbeddingConfiguration.TableDescriptor.vocabulary_size) + return _internal_vocabulary_size(); +} +inline void TPUEmbeddingConfiguration_TableDescriptor::_internal_set_vocabulary_size(int64_t value) { + + _impl_.vocabulary_size_ = value; +} +inline void TPUEmbeddingConfiguration_TableDescriptor::set_vocabulary_size(int64_t value) { + _internal_set_vocabulary_size(value); + // @@protoc_insertion_point(field_set:tensorflow.tpu.TPUEmbeddingConfiguration.TableDescriptor.vocabulary_size) +} + +// int32 dimension = 3; +inline void TPUEmbeddingConfiguration_TableDescriptor::clear_dimension() { + _impl_.dimension_ = 0; +} +inline int32_t TPUEmbeddingConfiguration_TableDescriptor::_internal_dimension() const { + return _impl_.dimension_; +} +inline int32_t TPUEmbeddingConfiguration_TableDescriptor::dimension() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.TPUEmbeddingConfiguration.TableDescriptor.dimension) + return _internal_dimension(); +} +inline void TPUEmbeddingConfiguration_TableDescriptor::_internal_set_dimension(int32_t value) { + + _impl_.dimension_ = value; +} +inline void TPUEmbeddingConfiguration_TableDescriptor::set_dimension(int32_t value) { + _internal_set_dimension(value); + // @@protoc_insertion_point(field_set:tensorflow.tpu.TPUEmbeddingConfiguration.TableDescriptor.dimension) +} + +// int32 num_features = 4; +inline void TPUEmbeddingConfiguration_TableDescriptor::clear_num_features() { + _impl_.num_features_ = 0; +} +inline int32_t TPUEmbeddingConfiguration_TableDescriptor::_internal_num_features() const { + return _impl_.num_features_; +} +inline int32_t TPUEmbeddingConfiguration_TableDescriptor::num_features() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.TPUEmbeddingConfiguration.TableDescriptor.num_features) + return _internal_num_features(); +} +inline void TPUEmbeddingConfiguration_TableDescriptor::_internal_set_num_features(int32_t value) { + + _impl_.num_features_ = value; +} +inline void TPUEmbeddingConfiguration_TableDescriptor::set_num_features(int32_t value) { + _internal_set_num_features(value); + // @@protoc_insertion_point(field_set:tensorflow.tpu.TPUEmbeddingConfiguration.TableDescriptor.num_features) +} + +// .tensorflow.tpu.OptimizationParameters optimization_parameters = 5; +inline bool TPUEmbeddingConfiguration_TableDescriptor::_internal_has_optimization_parameters() const { + return this != internal_default_instance() && _impl_.optimization_parameters_ != nullptr; +} +inline bool TPUEmbeddingConfiguration_TableDescriptor::has_optimization_parameters() const { + return _internal_has_optimization_parameters(); +} +inline const ::tensorflow::tpu::OptimizationParameters& TPUEmbeddingConfiguration_TableDescriptor::_internal_optimization_parameters() const { + const ::tensorflow::tpu::OptimizationParameters* p = _impl_.optimization_parameters_; + return p != nullptr ? *p : reinterpret_cast( + ::tensorflow::tpu::_OptimizationParameters_default_instance_); +} +inline const ::tensorflow::tpu::OptimizationParameters& TPUEmbeddingConfiguration_TableDescriptor::optimization_parameters() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.TPUEmbeddingConfiguration.TableDescriptor.optimization_parameters) + return _internal_optimization_parameters(); +} +inline void TPUEmbeddingConfiguration_TableDescriptor::unsafe_arena_set_allocated_optimization_parameters( + ::tensorflow::tpu::OptimizationParameters* optimization_parameters) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.optimization_parameters_); + } + _impl_.optimization_parameters_ = optimization_parameters; + if (optimization_parameters) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.tpu.TPUEmbeddingConfiguration.TableDescriptor.optimization_parameters) +} +inline ::tensorflow::tpu::OptimizationParameters* TPUEmbeddingConfiguration_TableDescriptor::release_optimization_parameters() { + + ::tensorflow::tpu::OptimizationParameters* temp = _impl_.optimization_parameters_; + _impl_.optimization_parameters_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tensorflow::tpu::OptimizationParameters* TPUEmbeddingConfiguration_TableDescriptor::unsafe_arena_release_optimization_parameters() { + // @@protoc_insertion_point(field_release:tensorflow.tpu.TPUEmbeddingConfiguration.TableDescriptor.optimization_parameters) + + ::tensorflow::tpu::OptimizationParameters* temp = _impl_.optimization_parameters_; + _impl_.optimization_parameters_ = nullptr; + return temp; +} +inline ::tensorflow::tpu::OptimizationParameters* TPUEmbeddingConfiguration_TableDescriptor::_internal_mutable_optimization_parameters() { + + if (_impl_.optimization_parameters_ == nullptr) { + auto* p = CreateMaybeMessage<::tensorflow::tpu::OptimizationParameters>(GetArenaForAllocation()); + _impl_.optimization_parameters_ = p; + } + return _impl_.optimization_parameters_; +} +inline ::tensorflow::tpu::OptimizationParameters* TPUEmbeddingConfiguration_TableDescriptor::mutable_optimization_parameters() { + ::tensorflow::tpu::OptimizationParameters* _msg = _internal_mutable_optimization_parameters(); + // @@protoc_insertion_point(field_mutable:tensorflow.tpu.TPUEmbeddingConfiguration.TableDescriptor.optimization_parameters) + return _msg; +} +inline void TPUEmbeddingConfiguration_TableDescriptor::set_allocated_optimization_parameters(::tensorflow::tpu::OptimizationParameters* optimization_parameters) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.optimization_parameters_); + } + if (optimization_parameters) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( + reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(optimization_parameters)); + if (message_arena != submessage_arena) { + optimization_parameters = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, optimization_parameters, submessage_arena); + } + + } else { + + } + _impl_.optimization_parameters_ = optimization_parameters; + // @@protoc_insertion_point(field_set_allocated:tensorflow.tpu.TPUEmbeddingConfiguration.TableDescriptor.optimization_parameters) +} + +// ------------------------------------------------------------------- + +// TPUEmbeddingConfiguration_FeatureDescriptor + +// string name = 1; +inline void TPUEmbeddingConfiguration_FeatureDescriptor::clear_name() { + _impl_.name_.ClearToEmpty(); +} +inline const std::string& TPUEmbeddingConfiguration_FeatureDescriptor::name() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.TPUEmbeddingConfiguration.FeatureDescriptor.name) + return _internal_name(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void TPUEmbeddingConfiguration_FeatureDescriptor::set_name(ArgT0&& arg0, ArgT... args) { + + _impl_.name_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.tpu.TPUEmbeddingConfiguration.FeatureDescriptor.name) +} +inline std::string* TPUEmbeddingConfiguration_FeatureDescriptor::mutable_name() { + std::string* _s = _internal_mutable_name(); + // @@protoc_insertion_point(field_mutable:tensorflow.tpu.TPUEmbeddingConfiguration.FeatureDescriptor.name) + return _s; +} +inline const std::string& TPUEmbeddingConfiguration_FeatureDescriptor::_internal_name() const { + return _impl_.name_.Get(); +} +inline void TPUEmbeddingConfiguration_FeatureDescriptor::_internal_set_name(const std::string& value) { + + _impl_.name_.Set(value, GetArenaForAllocation()); +} +inline std::string* TPUEmbeddingConfiguration_FeatureDescriptor::_internal_mutable_name() { + + return _impl_.name_.Mutable(GetArenaForAllocation()); +} +inline std::string* TPUEmbeddingConfiguration_FeatureDescriptor::release_name() { + // @@protoc_insertion_point(field_release:tensorflow.tpu.TPUEmbeddingConfiguration.FeatureDescriptor.name) + return _impl_.name_.Release(); +} +inline void TPUEmbeddingConfiguration_FeatureDescriptor::set_allocated_name(std::string* name) { + if (name != nullptr) { + + } else { + + } + _impl_.name_.SetAllocated(name, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.name_.IsDefault()) { + _impl_.name_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.tpu.TPUEmbeddingConfiguration.FeatureDescriptor.name) +} + +// int32 table_id = 2; +inline void TPUEmbeddingConfiguration_FeatureDescriptor::clear_table_id() { + _impl_.table_id_ = 0; +} +inline int32_t TPUEmbeddingConfiguration_FeatureDescriptor::_internal_table_id() const { + return _impl_.table_id_; +} +inline int32_t TPUEmbeddingConfiguration_FeatureDescriptor::table_id() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.TPUEmbeddingConfiguration.FeatureDescriptor.table_id) + return _internal_table_id(); +} +inline void TPUEmbeddingConfiguration_FeatureDescriptor::_internal_set_table_id(int32_t value) { + + _impl_.table_id_ = value; +} +inline void TPUEmbeddingConfiguration_FeatureDescriptor::set_table_id(int32_t value) { + _internal_set_table_id(value); + // @@protoc_insertion_point(field_set:tensorflow.tpu.TPUEmbeddingConfiguration.FeatureDescriptor.table_id) +} + +// repeated int32 input_shape = 3; +inline int TPUEmbeddingConfiguration_FeatureDescriptor::_internal_input_shape_size() const { + return _impl_.input_shape_.size(); +} +inline int TPUEmbeddingConfiguration_FeatureDescriptor::input_shape_size() const { + return _internal_input_shape_size(); +} +inline void TPUEmbeddingConfiguration_FeatureDescriptor::clear_input_shape() { + _impl_.input_shape_.Clear(); +} +inline int32_t TPUEmbeddingConfiguration_FeatureDescriptor::_internal_input_shape(int index) const { + return _impl_.input_shape_.Get(index); +} +inline int32_t TPUEmbeddingConfiguration_FeatureDescriptor::input_shape(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.TPUEmbeddingConfiguration.FeatureDescriptor.input_shape) + return _internal_input_shape(index); +} +inline void TPUEmbeddingConfiguration_FeatureDescriptor::set_input_shape(int index, int32_t value) { + _impl_.input_shape_.Set(index, value); + // @@protoc_insertion_point(field_set:tensorflow.tpu.TPUEmbeddingConfiguration.FeatureDescriptor.input_shape) +} +inline void TPUEmbeddingConfiguration_FeatureDescriptor::_internal_add_input_shape(int32_t value) { + _impl_.input_shape_.Add(value); +} +inline void TPUEmbeddingConfiguration_FeatureDescriptor::add_input_shape(int32_t value) { + _internal_add_input_shape(value); + // @@protoc_insertion_point(field_add:tensorflow.tpu.TPUEmbeddingConfiguration.FeatureDescriptor.input_shape) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >& +TPUEmbeddingConfiguration_FeatureDescriptor::_internal_input_shape() const { + return _impl_.input_shape_; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >& +TPUEmbeddingConfiguration_FeatureDescriptor::input_shape() const { + // @@protoc_insertion_point(field_list:tensorflow.tpu.TPUEmbeddingConfiguration.FeatureDescriptor.input_shape) + return _internal_input_shape(); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >* +TPUEmbeddingConfiguration_FeatureDescriptor::_internal_mutable_input_shape() { + return &_impl_.input_shape_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >* +TPUEmbeddingConfiguration_FeatureDescriptor::mutable_input_shape() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.tpu.TPUEmbeddingConfiguration.FeatureDescriptor.input_shape) + return _internal_mutable_input_shape(); +} + +// ------------------------------------------------------------------- + +// TPUEmbeddingConfiguration_SpmdSharding + +// bool enabled = 1; +inline void TPUEmbeddingConfiguration_SpmdSharding::clear_enabled() { + _impl_.enabled_ = false; +} +inline bool TPUEmbeddingConfiguration_SpmdSharding::_internal_enabled() const { + return _impl_.enabled_; +} +inline bool TPUEmbeddingConfiguration_SpmdSharding::enabled() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.TPUEmbeddingConfiguration.SpmdSharding.enabled) + return _internal_enabled(); +} +inline void TPUEmbeddingConfiguration_SpmdSharding::_internal_set_enabled(bool value) { + + _impl_.enabled_ = value; +} +inline void TPUEmbeddingConfiguration_SpmdSharding::set_enabled(bool value) { + _internal_set_enabled(value); + // @@protoc_insertion_point(field_set:tensorflow.tpu.TPUEmbeddingConfiguration.SpmdSharding.enabled) +} + +// int32 num_cores_per_replica = 2; +inline void TPUEmbeddingConfiguration_SpmdSharding::clear_num_cores_per_replica() { + _impl_.num_cores_per_replica_ = 0; +} +inline int32_t TPUEmbeddingConfiguration_SpmdSharding::_internal_num_cores_per_replica() const { + return _impl_.num_cores_per_replica_; +} +inline int32_t TPUEmbeddingConfiguration_SpmdSharding::num_cores_per_replica() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.TPUEmbeddingConfiguration.SpmdSharding.num_cores_per_replica) + return _internal_num_cores_per_replica(); +} +inline void TPUEmbeddingConfiguration_SpmdSharding::_internal_set_num_cores_per_replica(int32_t value) { + + _impl_.num_cores_per_replica_ = value; +} +inline void TPUEmbeddingConfiguration_SpmdSharding::set_num_cores_per_replica(int32_t value) { + _internal_set_num_cores_per_replica(value); + // @@protoc_insertion_point(field_set:tensorflow.tpu.TPUEmbeddingConfiguration.SpmdSharding.num_cores_per_replica) +} + +// ------------------------------------------------------------------- + +// TPUEmbeddingConfiguration + +// repeated .tensorflow.tpu.TPUEmbeddingConfiguration.TableDescriptor table_descriptor = 1; +inline int TPUEmbeddingConfiguration::_internal_table_descriptor_size() const { + return _impl_.table_descriptor_.size(); +} +inline int TPUEmbeddingConfiguration::table_descriptor_size() const { + return _internal_table_descriptor_size(); +} +inline void TPUEmbeddingConfiguration::clear_table_descriptor() { + _impl_.table_descriptor_.Clear(); +} +inline ::tensorflow::tpu::TPUEmbeddingConfiguration_TableDescriptor* TPUEmbeddingConfiguration::mutable_table_descriptor(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.tpu.TPUEmbeddingConfiguration.table_descriptor) + return _impl_.table_descriptor_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::tpu::TPUEmbeddingConfiguration_TableDescriptor >* +TPUEmbeddingConfiguration::mutable_table_descriptor() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.tpu.TPUEmbeddingConfiguration.table_descriptor) + return &_impl_.table_descriptor_; +} +inline const ::tensorflow::tpu::TPUEmbeddingConfiguration_TableDescriptor& TPUEmbeddingConfiguration::_internal_table_descriptor(int index) const { + return _impl_.table_descriptor_.Get(index); +} +inline const ::tensorflow::tpu::TPUEmbeddingConfiguration_TableDescriptor& TPUEmbeddingConfiguration::table_descriptor(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.TPUEmbeddingConfiguration.table_descriptor) + return _internal_table_descriptor(index); +} +inline ::tensorflow::tpu::TPUEmbeddingConfiguration_TableDescriptor* TPUEmbeddingConfiguration::_internal_add_table_descriptor() { + return _impl_.table_descriptor_.Add(); +} +inline ::tensorflow::tpu::TPUEmbeddingConfiguration_TableDescriptor* TPUEmbeddingConfiguration::add_table_descriptor() { + ::tensorflow::tpu::TPUEmbeddingConfiguration_TableDescriptor* _add = _internal_add_table_descriptor(); + // @@protoc_insertion_point(field_add:tensorflow.tpu.TPUEmbeddingConfiguration.table_descriptor) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::tpu::TPUEmbeddingConfiguration_TableDescriptor >& +TPUEmbeddingConfiguration::table_descriptor() const { + // @@protoc_insertion_point(field_list:tensorflow.tpu.TPUEmbeddingConfiguration.table_descriptor) + return _impl_.table_descriptor_; +} + +// .tensorflow.tpu.TPUEmbeddingConfiguration.Mode mode = 2; +inline void TPUEmbeddingConfiguration::clear_mode() { + _impl_.mode_ = 0; +} +inline ::tensorflow::tpu::TPUEmbeddingConfiguration_Mode TPUEmbeddingConfiguration::_internal_mode() const { + return static_cast< ::tensorflow::tpu::TPUEmbeddingConfiguration_Mode >(_impl_.mode_); +} +inline ::tensorflow::tpu::TPUEmbeddingConfiguration_Mode TPUEmbeddingConfiguration::mode() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.TPUEmbeddingConfiguration.mode) + return _internal_mode(); +} +inline void TPUEmbeddingConfiguration::_internal_set_mode(::tensorflow::tpu::TPUEmbeddingConfiguration_Mode value) { + + _impl_.mode_ = value; +} +inline void TPUEmbeddingConfiguration::set_mode(::tensorflow::tpu::TPUEmbeddingConfiguration_Mode value) { + _internal_set_mode(value); + // @@protoc_insertion_point(field_set:tensorflow.tpu.TPUEmbeddingConfiguration.mode) +} + +// int32 batch_size_per_tensor_core = 3; +inline void TPUEmbeddingConfiguration::clear_batch_size_per_tensor_core() { + _impl_.batch_size_per_tensor_core_ = 0; +} +inline int32_t TPUEmbeddingConfiguration::_internal_batch_size_per_tensor_core() const { + return _impl_.batch_size_per_tensor_core_; +} +inline int32_t TPUEmbeddingConfiguration::batch_size_per_tensor_core() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.TPUEmbeddingConfiguration.batch_size_per_tensor_core) + return _internal_batch_size_per_tensor_core(); +} +inline void TPUEmbeddingConfiguration::_internal_set_batch_size_per_tensor_core(int32_t value) { + + _impl_.batch_size_per_tensor_core_ = value; +} +inline void TPUEmbeddingConfiguration::set_batch_size_per_tensor_core(int32_t value) { + _internal_set_batch_size_per_tensor_core(value); + // @@protoc_insertion_point(field_set:tensorflow.tpu.TPUEmbeddingConfiguration.batch_size_per_tensor_core) +} + +// int32 num_hosts = 4; +inline void TPUEmbeddingConfiguration::clear_num_hosts() { + _impl_.num_hosts_ = 0; +} +inline int32_t TPUEmbeddingConfiguration::_internal_num_hosts() const { + return _impl_.num_hosts_; +} +inline int32_t TPUEmbeddingConfiguration::num_hosts() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.TPUEmbeddingConfiguration.num_hosts) + return _internal_num_hosts(); +} +inline void TPUEmbeddingConfiguration::_internal_set_num_hosts(int32_t value) { + + _impl_.num_hosts_ = value; +} +inline void TPUEmbeddingConfiguration::set_num_hosts(int32_t value) { + _internal_set_num_hosts(value); + // @@protoc_insertion_point(field_set:tensorflow.tpu.TPUEmbeddingConfiguration.num_hosts) +} + +// int32 num_tensor_cores = 5; +inline void TPUEmbeddingConfiguration::clear_num_tensor_cores() { + _impl_.num_tensor_cores_ = 0; +} +inline int32_t TPUEmbeddingConfiguration::_internal_num_tensor_cores() const { + return _impl_.num_tensor_cores_; +} +inline int32_t TPUEmbeddingConfiguration::num_tensor_cores() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.TPUEmbeddingConfiguration.num_tensor_cores) + return _internal_num_tensor_cores(); +} +inline void TPUEmbeddingConfiguration::_internal_set_num_tensor_cores(int32_t value) { + + _impl_.num_tensor_cores_ = value; +} +inline void TPUEmbeddingConfiguration::set_num_tensor_cores(int32_t value) { + _internal_set_num_tensor_cores(value); + // @@protoc_insertion_point(field_set:tensorflow.tpu.TPUEmbeddingConfiguration.num_tensor_cores) +} + +// .tensorflow.tpu.TPUEmbeddingConfiguration.ShardingStrategy sharding_strategy = 6; +inline void TPUEmbeddingConfiguration::clear_sharding_strategy() { + _impl_.sharding_strategy_ = 0; +} +inline ::tensorflow::tpu::TPUEmbeddingConfiguration_ShardingStrategy TPUEmbeddingConfiguration::_internal_sharding_strategy() const { + return static_cast< ::tensorflow::tpu::TPUEmbeddingConfiguration_ShardingStrategy >(_impl_.sharding_strategy_); +} +inline ::tensorflow::tpu::TPUEmbeddingConfiguration_ShardingStrategy TPUEmbeddingConfiguration::sharding_strategy() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.TPUEmbeddingConfiguration.sharding_strategy) + return _internal_sharding_strategy(); +} +inline void TPUEmbeddingConfiguration::_internal_set_sharding_strategy(::tensorflow::tpu::TPUEmbeddingConfiguration_ShardingStrategy value) { + + _impl_.sharding_strategy_ = value; +} +inline void TPUEmbeddingConfiguration::set_sharding_strategy(::tensorflow::tpu::TPUEmbeddingConfiguration_ShardingStrategy value) { + _internal_set_sharding_strategy(value); + // @@protoc_insertion_point(field_set:tensorflow.tpu.TPUEmbeddingConfiguration.sharding_strategy) +} + +// bool pipeline_execution_with_tensor_core = 7; +inline void TPUEmbeddingConfiguration::clear_pipeline_execution_with_tensor_core() { + _impl_.pipeline_execution_with_tensor_core_ = false; +} +inline bool TPUEmbeddingConfiguration::_internal_pipeline_execution_with_tensor_core() const { + return _impl_.pipeline_execution_with_tensor_core_; +} +inline bool TPUEmbeddingConfiguration::pipeline_execution_with_tensor_core() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.TPUEmbeddingConfiguration.pipeline_execution_with_tensor_core) + return _internal_pipeline_execution_with_tensor_core(); +} +inline void TPUEmbeddingConfiguration::_internal_set_pipeline_execution_with_tensor_core(bool value) { + + _impl_.pipeline_execution_with_tensor_core_ = value; +} +inline void TPUEmbeddingConfiguration::set_pipeline_execution_with_tensor_core(bool value) { + _internal_set_pipeline_execution_with_tensor_core(value); + // @@protoc_insertion_point(field_set:tensorflow.tpu.TPUEmbeddingConfiguration.pipeline_execution_with_tensor_core) +} + +// string profile_data_directory = 9; +inline void TPUEmbeddingConfiguration::clear_profile_data_directory() { + _impl_.profile_data_directory_.ClearToEmpty(); +} +inline const std::string& TPUEmbeddingConfiguration::profile_data_directory() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.TPUEmbeddingConfiguration.profile_data_directory) + return _internal_profile_data_directory(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void TPUEmbeddingConfiguration::set_profile_data_directory(ArgT0&& arg0, ArgT... args) { + + _impl_.profile_data_directory_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.tpu.TPUEmbeddingConfiguration.profile_data_directory) +} +inline std::string* TPUEmbeddingConfiguration::mutable_profile_data_directory() { + std::string* _s = _internal_mutable_profile_data_directory(); + // @@protoc_insertion_point(field_mutable:tensorflow.tpu.TPUEmbeddingConfiguration.profile_data_directory) + return _s; +} +inline const std::string& TPUEmbeddingConfiguration::_internal_profile_data_directory() const { + return _impl_.profile_data_directory_.Get(); +} +inline void TPUEmbeddingConfiguration::_internal_set_profile_data_directory(const std::string& value) { + + _impl_.profile_data_directory_.Set(value, GetArenaForAllocation()); +} +inline std::string* TPUEmbeddingConfiguration::_internal_mutable_profile_data_directory() { + + return _impl_.profile_data_directory_.Mutable(GetArenaForAllocation()); +} +inline std::string* TPUEmbeddingConfiguration::release_profile_data_directory() { + // @@protoc_insertion_point(field_release:tensorflow.tpu.TPUEmbeddingConfiguration.profile_data_directory) + return _impl_.profile_data_directory_.Release(); +} +inline void TPUEmbeddingConfiguration::set_allocated_profile_data_directory(std::string* profile_data_directory) { + if (profile_data_directory != nullptr) { + + } else { + + } + _impl_.profile_data_directory_.SetAllocated(profile_data_directory, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.profile_data_directory_.IsDefault()) { + _impl_.profile_data_directory_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.tpu.TPUEmbeddingConfiguration.profile_data_directory) +} + +// repeated .tensorflow.tpu.TPUEmbeddingConfiguration.FeatureDescriptor feature_descriptor = 10; +inline int TPUEmbeddingConfiguration::_internal_feature_descriptor_size() const { + return _impl_.feature_descriptor_.size(); +} +inline int TPUEmbeddingConfiguration::feature_descriptor_size() const { + return _internal_feature_descriptor_size(); +} +inline void TPUEmbeddingConfiguration::clear_feature_descriptor() { + _impl_.feature_descriptor_.Clear(); +} +inline ::tensorflow::tpu::TPUEmbeddingConfiguration_FeatureDescriptor* TPUEmbeddingConfiguration::mutable_feature_descriptor(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.tpu.TPUEmbeddingConfiguration.feature_descriptor) + return _impl_.feature_descriptor_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::tpu::TPUEmbeddingConfiguration_FeatureDescriptor >* +TPUEmbeddingConfiguration::mutable_feature_descriptor() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.tpu.TPUEmbeddingConfiguration.feature_descriptor) + return &_impl_.feature_descriptor_; +} +inline const ::tensorflow::tpu::TPUEmbeddingConfiguration_FeatureDescriptor& TPUEmbeddingConfiguration::_internal_feature_descriptor(int index) const { + return _impl_.feature_descriptor_.Get(index); +} +inline const ::tensorflow::tpu::TPUEmbeddingConfiguration_FeatureDescriptor& TPUEmbeddingConfiguration::feature_descriptor(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.TPUEmbeddingConfiguration.feature_descriptor) + return _internal_feature_descriptor(index); +} +inline ::tensorflow::tpu::TPUEmbeddingConfiguration_FeatureDescriptor* TPUEmbeddingConfiguration::_internal_add_feature_descriptor() { + return _impl_.feature_descriptor_.Add(); +} +inline ::tensorflow::tpu::TPUEmbeddingConfiguration_FeatureDescriptor* TPUEmbeddingConfiguration::add_feature_descriptor() { + ::tensorflow::tpu::TPUEmbeddingConfiguration_FeatureDescriptor* _add = _internal_add_feature_descriptor(); + // @@protoc_insertion_point(field_add:tensorflow.tpu.TPUEmbeddingConfiguration.feature_descriptor) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::tpu::TPUEmbeddingConfiguration_FeatureDescriptor >& +TPUEmbeddingConfiguration::feature_descriptor() const { + // @@protoc_insertion_point(field_list:tensorflow.tpu.TPUEmbeddingConfiguration.feature_descriptor) + return _impl_.feature_descriptor_; +} + +// .tensorflow.tpu.TPUEmbeddingConfiguration.SpmdSharding spmd_sharding = 11; +inline bool TPUEmbeddingConfiguration::_internal_has_spmd_sharding() const { + return this != internal_default_instance() && _impl_.spmd_sharding_ != nullptr; +} +inline bool TPUEmbeddingConfiguration::has_spmd_sharding() const { + return _internal_has_spmd_sharding(); +} +inline void TPUEmbeddingConfiguration::clear_spmd_sharding() { + if (GetArenaForAllocation() == nullptr && _impl_.spmd_sharding_ != nullptr) { + delete _impl_.spmd_sharding_; + } + _impl_.spmd_sharding_ = nullptr; +} +inline const ::tensorflow::tpu::TPUEmbeddingConfiguration_SpmdSharding& TPUEmbeddingConfiguration::_internal_spmd_sharding() const { + const ::tensorflow::tpu::TPUEmbeddingConfiguration_SpmdSharding* p = _impl_.spmd_sharding_; + return p != nullptr ? *p : reinterpret_cast( + ::tensorflow::tpu::_TPUEmbeddingConfiguration_SpmdSharding_default_instance_); +} +inline const ::tensorflow::tpu::TPUEmbeddingConfiguration_SpmdSharding& TPUEmbeddingConfiguration::spmd_sharding() const { + // @@protoc_insertion_point(field_get:tensorflow.tpu.TPUEmbeddingConfiguration.spmd_sharding) + return _internal_spmd_sharding(); +} +inline void TPUEmbeddingConfiguration::unsafe_arena_set_allocated_spmd_sharding( + ::tensorflow::tpu::TPUEmbeddingConfiguration_SpmdSharding* spmd_sharding) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.spmd_sharding_); + } + _impl_.spmd_sharding_ = spmd_sharding; + if (spmd_sharding) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.tpu.TPUEmbeddingConfiguration.spmd_sharding) +} +inline ::tensorflow::tpu::TPUEmbeddingConfiguration_SpmdSharding* TPUEmbeddingConfiguration::release_spmd_sharding() { + + ::tensorflow::tpu::TPUEmbeddingConfiguration_SpmdSharding* temp = _impl_.spmd_sharding_; + _impl_.spmd_sharding_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tensorflow::tpu::TPUEmbeddingConfiguration_SpmdSharding* TPUEmbeddingConfiguration::unsafe_arena_release_spmd_sharding() { + // @@protoc_insertion_point(field_release:tensorflow.tpu.TPUEmbeddingConfiguration.spmd_sharding) + + ::tensorflow::tpu::TPUEmbeddingConfiguration_SpmdSharding* temp = _impl_.spmd_sharding_; + _impl_.spmd_sharding_ = nullptr; + return temp; +} +inline ::tensorflow::tpu::TPUEmbeddingConfiguration_SpmdSharding* TPUEmbeddingConfiguration::_internal_mutable_spmd_sharding() { + + if (_impl_.spmd_sharding_ == nullptr) { + auto* p = CreateMaybeMessage<::tensorflow::tpu::TPUEmbeddingConfiguration_SpmdSharding>(GetArenaForAllocation()); + _impl_.spmd_sharding_ = p; + } + return _impl_.spmd_sharding_; +} +inline ::tensorflow::tpu::TPUEmbeddingConfiguration_SpmdSharding* TPUEmbeddingConfiguration::mutable_spmd_sharding() { + ::tensorflow::tpu::TPUEmbeddingConfiguration_SpmdSharding* _msg = _internal_mutable_spmd_sharding(); + // @@protoc_insertion_point(field_mutable:tensorflow.tpu.TPUEmbeddingConfiguration.spmd_sharding) + return _msg; +} +inline void TPUEmbeddingConfiguration::set_allocated_spmd_sharding(::tensorflow::tpu::TPUEmbeddingConfiguration_SpmdSharding* spmd_sharding) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete _impl_.spmd_sharding_; + } + if (spmd_sharding) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(spmd_sharding); + if (message_arena != submessage_arena) { + spmd_sharding = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, spmd_sharding, submessage_arena); + } + + } else { + + } + _impl_.spmd_sharding_ = spmd_sharding; + // @@protoc_insertion_point(field_set_allocated:tensorflow.tpu.TPUEmbeddingConfiguration.spmd_sharding) +} + +// ------------------------------------------------------------------- + +// TPUEmbeddingError + +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + + +// @@protoc_insertion_point(namespace_scope) + +} // namespace tpu +} // namespace tensorflow + +PROTOBUF_NAMESPACE_OPEN + +template <> struct is_proto_enum< ::tensorflow::tpu::TPUEmbeddingConfiguration_Mode> : ::std::true_type {}; +template <> +inline const EnumDescriptor* GetEnumDescriptor< ::tensorflow::tpu::TPUEmbeddingConfiguration_Mode>() { + return ::tensorflow::tpu::TPUEmbeddingConfiguration_Mode_descriptor(); +} +template <> struct is_proto_enum< ::tensorflow::tpu::TPUEmbeddingConfiguration_ShardingStrategy> : ::std::true_type {}; +template <> +inline const EnumDescriptor* GetEnumDescriptor< ::tensorflow::tpu::TPUEmbeddingConfiguration_ShardingStrategy>() { + return ::tensorflow::tpu::TPUEmbeddingConfiguration_ShardingStrategy_descriptor(); +} + +PROTOBUF_NAMESPACE_CLOSE + +// @@protoc_insertion_point(global_scope) + +#include +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprotobuf_2ftpu_2ftpu_5fembedding_5fconfiguration_2eproto diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/trackable_object_graph.pb.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/trackable_object_graph.pb.h new file mode 100644 index 0000000000000000000000000000000000000000..0edea54cf79ac7c11b406b642123c24029570d72 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/trackable_object_graph.pb.h @@ -0,0 +1,1968 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/trackable_object_graph.proto + +#ifndef GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprotobuf_2ftrackable_5fobject_5fgraph_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprotobuf_2ftrackable_5fobject_5fgraph_2eproto + +#include +#include + +#include +#if PROTOBUF_VERSION < 3021000 +#error This file was generated by a newer version of protoc which is +#error incompatible with your Protocol Buffer headers. Please update +#error your headers. +#endif +#if 3021009 < PROTOBUF_MIN_PROTOC_VERSION +#error This file was generated by an older version of protoc which is +#error incompatible with your Protocol Buffer headers. Please +#error regenerate this file with a newer version of protoc. +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include // IWYU pragma: export +#include // IWYU pragma: export +#include +#include +// @@protoc_insertion_point(includes) +#include +#define PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2fprotobuf_2ftrackable_5fobject_5fgraph_2eproto +PROTOBUF_NAMESPACE_OPEN +namespace internal { +class AnyMetadata; +} // namespace internal +PROTOBUF_NAMESPACE_CLOSE + +// Internal implementation detail -- do not use these members. +struct TableStruct_tensorflow_2fcore_2fprotobuf_2ftrackable_5fobject_5fgraph_2eproto { + static const uint32_t offsets[]; +}; +extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_tensorflow_2fcore_2fprotobuf_2ftrackable_5fobject_5fgraph_2eproto; +namespace tensorflow { +class RegisteredSaver; +struct RegisteredSaverDefaultTypeInternal; +extern RegisteredSaverDefaultTypeInternal _RegisteredSaver_default_instance_; +class TrackableObjectGraph; +struct TrackableObjectGraphDefaultTypeInternal; +extern TrackableObjectGraphDefaultTypeInternal _TrackableObjectGraph_default_instance_; +class TrackableObjectGraph_TrackableObject; +struct TrackableObjectGraph_TrackableObjectDefaultTypeInternal; +extern TrackableObjectGraph_TrackableObjectDefaultTypeInternal _TrackableObjectGraph_TrackableObject_default_instance_; +class TrackableObjectGraph_TrackableObject_ObjectReference; +struct TrackableObjectGraph_TrackableObject_ObjectReferenceDefaultTypeInternal; +extern TrackableObjectGraph_TrackableObject_ObjectReferenceDefaultTypeInternal _TrackableObjectGraph_TrackableObject_ObjectReference_default_instance_; +class TrackableObjectGraph_TrackableObject_SerializedTensor; +struct TrackableObjectGraph_TrackableObject_SerializedTensorDefaultTypeInternal; +extern TrackableObjectGraph_TrackableObject_SerializedTensorDefaultTypeInternal _TrackableObjectGraph_TrackableObject_SerializedTensor_default_instance_; +class TrackableObjectGraph_TrackableObject_SlotVariableReference; +struct TrackableObjectGraph_TrackableObject_SlotVariableReferenceDefaultTypeInternal; +extern TrackableObjectGraph_TrackableObject_SlotVariableReferenceDefaultTypeInternal _TrackableObjectGraph_TrackableObject_SlotVariableReference_default_instance_; +} // namespace tensorflow +PROTOBUF_NAMESPACE_OPEN +template<> ::tensorflow::RegisteredSaver* Arena::CreateMaybeMessage<::tensorflow::RegisteredSaver>(Arena*); +template<> ::tensorflow::TrackableObjectGraph* Arena::CreateMaybeMessage<::tensorflow::TrackableObjectGraph>(Arena*); +template<> ::tensorflow::TrackableObjectGraph_TrackableObject* Arena::CreateMaybeMessage<::tensorflow::TrackableObjectGraph_TrackableObject>(Arena*); +template<> ::tensorflow::TrackableObjectGraph_TrackableObject_ObjectReference* Arena::CreateMaybeMessage<::tensorflow::TrackableObjectGraph_TrackableObject_ObjectReference>(Arena*); +template<> ::tensorflow::TrackableObjectGraph_TrackableObject_SerializedTensor* Arena::CreateMaybeMessage<::tensorflow::TrackableObjectGraph_TrackableObject_SerializedTensor>(Arena*); +template<> ::tensorflow::TrackableObjectGraph_TrackableObject_SlotVariableReference* Arena::CreateMaybeMessage<::tensorflow::TrackableObjectGraph_TrackableObject_SlotVariableReference>(Arena*); +PROTOBUF_NAMESPACE_CLOSE +namespace tensorflow { + +// =================================================================== + +class TrackableObjectGraph_TrackableObject_ObjectReference final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.TrackableObjectGraph.TrackableObject.ObjectReference) */ { + public: + inline TrackableObjectGraph_TrackableObject_ObjectReference() : TrackableObjectGraph_TrackableObject_ObjectReference(nullptr) {} + ~TrackableObjectGraph_TrackableObject_ObjectReference() override; + explicit PROTOBUF_CONSTEXPR TrackableObjectGraph_TrackableObject_ObjectReference(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + TrackableObjectGraph_TrackableObject_ObjectReference(const TrackableObjectGraph_TrackableObject_ObjectReference& from); + TrackableObjectGraph_TrackableObject_ObjectReference(TrackableObjectGraph_TrackableObject_ObjectReference&& from) noexcept + : TrackableObjectGraph_TrackableObject_ObjectReference() { + *this = ::std::move(from); + } + + inline TrackableObjectGraph_TrackableObject_ObjectReference& operator=(const TrackableObjectGraph_TrackableObject_ObjectReference& from) { + CopyFrom(from); + return *this; + } + inline TrackableObjectGraph_TrackableObject_ObjectReference& operator=(TrackableObjectGraph_TrackableObject_ObjectReference&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const TrackableObjectGraph_TrackableObject_ObjectReference& default_instance() { + return *internal_default_instance(); + } + static inline const TrackableObjectGraph_TrackableObject_ObjectReference* internal_default_instance() { + return reinterpret_cast( + &_TrackableObjectGraph_TrackableObject_ObjectReference_default_instance_); + } + static constexpr int kIndexInFileMessages = + 0; + + friend void swap(TrackableObjectGraph_TrackableObject_ObjectReference& a, TrackableObjectGraph_TrackableObject_ObjectReference& b) { + a.Swap(&b); + } + inline void Swap(TrackableObjectGraph_TrackableObject_ObjectReference* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(TrackableObjectGraph_TrackableObject_ObjectReference* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + TrackableObjectGraph_TrackableObject_ObjectReference* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const TrackableObjectGraph_TrackableObject_ObjectReference& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const TrackableObjectGraph_TrackableObject_ObjectReference& from) { + TrackableObjectGraph_TrackableObject_ObjectReference::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(TrackableObjectGraph_TrackableObject_ObjectReference* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.TrackableObjectGraph.TrackableObject.ObjectReference"; + } + protected: + explicit TrackableObjectGraph_TrackableObject_ObjectReference(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kLocalNameFieldNumber = 2, + kNodeIdFieldNumber = 1, + }; + // string local_name = 2; + void clear_local_name(); + const std::string& local_name() const; + template + void set_local_name(ArgT0&& arg0, ArgT... args); + std::string* mutable_local_name(); + PROTOBUF_NODISCARD std::string* release_local_name(); + void set_allocated_local_name(std::string* local_name); + private: + const std::string& _internal_local_name() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_local_name(const std::string& value); + std::string* _internal_mutable_local_name(); + public: + + // int32 node_id = 1; + void clear_node_id(); + int32_t node_id() const; + void set_node_id(int32_t value); + private: + int32_t _internal_node_id() const; + void _internal_set_node_id(int32_t value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.TrackableObjectGraph.TrackableObject.ObjectReference) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr local_name_; + int32_t node_id_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2ftrackable_5fobject_5fgraph_2eproto; +}; +// ------------------------------------------------------------------- + +class TrackableObjectGraph_TrackableObject_SerializedTensor final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.TrackableObjectGraph.TrackableObject.SerializedTensor) */ { + public: + inline TrackableObjectGraph_TrackableObject_SerializedTensor() : TrackableObjectGraph_TrackableObject_SerializedTensor(nullptr) {} + ~TrackableObjectGraph_TrackableObject_SerializedTensor() override; + explicit PROTOBUF_CONSTEXPR TrackableObjectGraph_TrackableObject_SerializedTensor(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + TrackableObjectGraph_TrackableObject_SerializedTensor(const TrackableObjectGraph_TrackableObject_SerializedTensor& from); + TrackableObjectGraph_TrackableObject_SerializedTensor(TrackableObjectGraph_TrackableObject_SerializedTensor&& from) noexcept + : TrackableObjectGraph_TrackableObject_SerializedTensor() { + *this = ::std::move(from); + } + + inline TrackableObjectGraph_TrackableObject_SerializedTensor& operator=(const TrackableObjectGraph_TrackableObject_SerializedTensor& from) { + CopyFrom(from); + return *this; + } + inline TrackableObjectGraph_TrackableObject_SerializedTensor& operator=(TrackableObjectGraph_TrackableObject_SerializedTensor&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const TrackableObjectGraph_TrackableObject_SerializedTensor& default_instance() { + return *internal_default_instance(); + } + static inline const TrackableObjectGraph_TrackableObject_SerializedTensor* internal_default_instance() { + return reinterpret_cast( + &_TrackableObjectGraph_TrackableObject_SerializedTensor_default_instance_); + } + static constexpr int kIndexInFileMessages = + 1; + + friend void swap(TrackableObjectGraph_TrackableObject_SerializedTensor& a, TrackableObjectGraph_TrackableObject_SerializedTensor& b) { + a.Swap(&b); + } + inline void Swap(TrackableObjectGraph_TrackableObject_SerializedTensor* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(TrackableObjectGraph_TrackableObject_SerializedTensor* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + TrackableObjectGraph_TrackableObject_SerializedTensor* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const TrackableObjectGraph_TrackableObject_SerializedTensor& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const TrackableObjectGraph_TrackableObject_SerializedTensor& from) { + TrackableObjectGraph_TrackableObject_SerializedTensor::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(TrackableObjectGraph_TrackableObject_SerializedTensor* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.TrackableObjectGraph.TrackableObject.SerializedTensor"; + } + protected: + explicit TrackableObjectGraph_TrackableObject_SerializedTensor(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kNameFieldNumber = 1, + kFullNameFieldNumber = 2, + kCheckpointKeyFieldNumber = 3, + }; + // string name = 1; + void clear_name(); + const std::string& name() const; + template + void set_name(ArgT0&& arg0, ArgT... args); + std::string* mutable_name(); + PROTOBUF_NODISCARD std::string* release_name(); + void set_allocated_name(std::string* name); + private: + const std::string& _internal_name() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_name(const std::string& value); + std::string* _internal_mutable_name(); + public: + + // string full_name = 2; + void clear_full_name(); + const std::string& full_name() const; + template + void set_full_name(ArgT0&& arg0, ArgT... args); + std::string* mutable_full_name(); + PROTOBUF_NODISCARD std::string* release_full_name(); + void set_allocated_full_name(std::string* full_name); + private: + const std::string& _internal_full_name() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_full_name(const std::string& value); + std::string* _internal_mutable_full_name(); + public: + + // string checkpoint_key = 3; + void clear_checkpoint_key(); + const std::string& checkpoint_key() const; + template + void set_checkpoint_key(ArgT0&& arg0, ArgT... args); + std::string* mutable_checkpoint_key(); + PROTOBUF_NODISCARD std::string* release_checkpoint_key(); + void set_allocated_checkpoint_key(std::string* checkpoint_key); + private: + const std::string& _internal_checkpoint_key() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_checkpoint_key(const std::string& value); + std::string* _internal_mutable_checkpoint_key(); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.TrackableObjectGraph.TrackableObject.SerializedTensor) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr full_name_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr checkpoint_key_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2ftrackable_5fobject_5fgraph_2eproto; +}; +// ------------------------------------------------------------------- + +class TrackableObjectGraph_TrackableObject_SlotVariableReference final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.TrackableObjectGraph.TrackableObject.SlotVariableReference) */ { + public: + inline TrackableObjectGraph_TrackableObject_SlotVariableReference() : TrackableObjectGraph_TrackableObject_SlotVariableReference(nullptr) {} + ~TrackableObjectGraph_TrackableObject_SlotVariableReference() override; + explicit PROTOBUF_CONSTEXPR TrackableObjectGraph_TrackableObject_SlotVariableReference(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + TrackableObjectGraph_TrackableObject_SlotVariableReference(const TrackableObjectGraph_TrackableObject_SlotVariableReference& from); + TrackableObjectGraph_TrackableObject_SlotVariableReference(TrackableObjectGraph_TrackableObject_SlotVariableReference&& from) noexcept + : TrackableObjectGraph_TrackableObject_SlotVariableReference() { + *this = ::std::move(from); + } + + inline TrackableObjectGraph_TrackableObject_SlotVariableReference& operator=(const TrackableObjectGraph_TrackableObject_SlotVariableReference& from) { + CopyFrom(from); + return *this; + } + inline TrackableObjectGraph_TrackableObject_SlotVariableReference& operator=(TrackableObjectGraph_TrackableObject_SlotVariableReference&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const TrackableObjectGraph_TrackableObject_SlotVariableReference& default_instance() { + return *internal_default_instance(); + } + static inline const TrackableObjectGraph_TrackableObject_SlotVariableReference* internal_default_instance() { + return reinterpret_cast( + &_TrackableObjectGraph_TrackableObject_SlotVariableReference_default_instance_); + } + static constexpr int kIndexInFileMessages = + 2; + + friend void swap(TrackableObjectGraph_TrackableObject_SlotVariableReference& a, TrackableObjectGraph_TrackableObject_SlotVariableReference& b) { + a.Swap(&b); + } + inline void Swap(TrackableObjectGraph_TrackableObject_SlotVariableReference* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(TrackableObjectGraph_TrackableObject_SlotVariableReference* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + TrackableObjectGraph_TrackableObject_SlotVariableReference* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const TrackableObjectGraph_TrackableObject_SlotVariableReference& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const TrackableObjectGraph_TrackableObject_SlotVariableReference& from) { + TrackableObjectGraph_TrackableObject_SlotVariableReference::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(TrackableObjectGraph_TrackableObject_SlotVariableReference* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.TrackableObjectGraph.TrackableObject.SlotVariableReference"; + } + protected: + explicit TrackableObjectGraph_TrackableObject_SlotVariableReference(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kSlotNameFieldNumber = 2, + kOriginalVariableNodeIdFieldNumber = 1, + kSlotVariableNodeIdFieldNumber = 3, + }; + // string slot_name = 2; + void clear_slot_name(); + const std::string& slot_name() const; + template + void set_slot_name(ArgT0&& arg0, ArgT... args); + std::string* mutable_slot_name(); + PROTOBUF_NODISCARD std::string* release_slot_name(); + void set_allocated_slot_name(std::string* slot_name); + private: + const std::string& _internal_slot_name() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_slot_name(const std::string& value); + std::string* _internal_mutable_slot_name(); + public: + + // int32 original_variable_node_id = 1; + void clear_original_variable_node_id(); + int32_t original_variable_node_id() const; + void set_original_variable_node_id(int32_t value); + private: + int32_t _internal_original_variable_node_id() const; + void _internal_set_original_variable_node_id(int32_t value); + public: + + // int32 slot_variable_node_id = 3; + void clear_slot_variable_node_id(); + int32_t slot_variable_node_id() const; + void set_slot_variable_node_id(int32_t value); + private: + int32_t _internal_slot_variable_node_id() const; + void _internal_set_slot_variable_node_id(int32_t value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.TrackableObjectGraph.TrackableObject.SlotVariableReference) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr slot_name_; + int32_t original_variable_node_id_; + int32_t slot_variable_node_id_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2ftrackable_5fobject_5fgraph_2eproto; +}; +// ------------------------------------------------------------------- + +class TrackableObjectGraph_TrackableObject final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.TrackableObjectGraph.TrackableObject) */ { + public: + inline TrackableObjectGraph_TrackableObject() : TrackableObjectGraph_TrackableObject(nullptr) {} + ~TrackableObjectGraph_TrackableObject() override; + explicit PROTOBUF_CONSTEXPR TrackableObjectGraph_TrackableObject(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + TrackableObjectGraph_TrackableObject(const TrackableObjectGraph_TrackableObject& from); + TrackableObjectGraph_TrackableObject(TrackableObjectGraph_TrackableObject&& from) noexcept + : TrackableObjectGraph_TrackableObject() { + *this = ::std::move(from); + } + + inline TrackableObjectGraph_TrackableObject& operator=(const TrackableObjectGraph_TrackableObject& from) { + CopyFrom(from); + return *this; + } + inline TrackableObjectGraph_TrackableObject& operator=(TrackableObjectGraph_TrackableObject&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const TrackableObjectGraph_TrackableObject& default_instance() { + return *internal_default_instance(); + } + static inline const TrackableObjectGraph_TrackableObject* internal_default_instance() { + return reinterpret_cast( + &_TrackableObjectGraph_TrackableObject_default_instance_); + } + static constexpr int kIndexInFileMessages = + 3; + + friend void swap(TrackableObjectGraph_TrackableObject& a, TrackableObjectGraph_TrackableObject& b) { + a.Swap(&b); + } + inline void Swap(TrackableObjectGraph_TrackableObject* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(TrackableObjectGraph_TrackableObject* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + TrackableObjectGraph_TrackableObject* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const TrackableObjectGraph_TrackableObject& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const TrackableObjectGraph_TrackableObject& from) { + TrackableObjectGraph_TrackableObject::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(TrackableObjectGraph_TrackableObject* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.TrackableObjectGraph.TrackableObject"; + } + protected: + explicit TrackableObjectGraph_TrackableObject(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + typedef TrackableObjectGraph_TrackableObject_ObjectReference ObjectReference; + typedef TrackableObjectGraph_TrackableObject_SerializedTensor SerializedTensor; + typedef TrackableObjectGraph_TrackableObject_SlotVariableReference SlotVariableReference; + + // accessors ------------------------------------------------------- + + enum : int { + kChildrenFieldNumber = 1, + kAttributesFieldNumber = 2, + kSlotVariablesFieldNumber = 3, + kRegisteredSaverFieldNumber = 4, + kHasCheckpointValuesFieldNumber = 5, + }; + // repeated .tensorflow.TrackableObjectGraph.TrackableObject.ObjectReference children = 1; + int children_size() const; + private: + int _internal_children_size() const; + public: + void clear_children(); + ::tensorflow::TrackableObjectGraph_TrackableObject_ObjectReference* mutable_children(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::TrackableObjectGraph_TrackableObject_ObjectReference >* + mutable_children(); + private: + const ::tensorflow::TrackableObjectGraph_TrackableObject_ObjectReference& _internal_children(int index) const; + ::tensorflow::TrackableObjectGraph_TrackableObject_ObjectReference* _internal_add_children(); + public: + const ::tensorflow::TrackableObjectGraph_TrackableObject_ObjectReference& children(int index) const; + ::tensorflow::TrackableObjectGraph_TrackableObject_ObjectReference* add_children(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::TrackableObjectGraph_TrackableObject_ObjectReference >& + children() const; + + // repeated .tensorflow.TrackableObjectGraph.TrackableObject.SerializedTensor attributes = 2; + int attributes_size() const; + private: + int _internal_attributes_size() const; + public: + void clear_attributes(); + ::tensorflow::TrackableObjectGraph_TrackableObject_SerializedTensor* mutable_attributes(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::TrackableObjectGraph_TrackableObject_SerializedTensor >* + mutable_attributes(); + private: + const ::tensorflow::TrackableObjectGraph_TrackableObject_SerializedTensor& _internal_attributes(int index) const; + ::tensorflow::TrackableObjectGraph_TrackableObject_SerializedTensor* _internal_add_attributes(); + public: + const ::tensorflow::TrackableObjectGraph_TrackableObject_SerializedTensor& attributes(int index) const; + ::tensorflow::TrackableObjectGraph_TrackableObject_SerializedTensor* add_attributes(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::TrackableObjectGraph_TrackableObject_SerializedTensor >& + attributes() const; + + // repeated .tensorflow.TrackableObjectGraph.TrackableObject.SlotVariableReference slot_variables = 3; + int slot_variables_size() const; + private: + int _internal_slot_variables_size() const; + public: + void clear_slot_variables(); + ::tensorflow::TrackableObjectGraph_TrackableObject_SlotVariableReference* mutable_slot_variables(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::TrackableObjectGraph_TrackableObject_SlotVariableReference >* + mutable_slot_variables(); + private: + const ::tensorflow::TrackableObjectGraph_TrackableObject_SlotVariableReference& _internal_slot_variables(int index) const; + ::tensorflow::TrackableObjectGraph_TrackableObject_SlotVariableReference* _internal_add_slot_variables(); + public: + const ::tensorflow::TrackableObjectGraph_TrackableObject_SlotVariableReference& slot_variables(int index) const; + ::tensorflow::TrackableObjectGraph_TrackableObject_SlotVariableReference* add_slot_variables(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::TrackableObjectGraph_TrackableObject_SlotVariableReference >& + slot_variables() const; + + // .tensorflow.RegisteredSaver registered_saver = 4; + bool has_registered_saver() const; + private: + bool _internal_has_registered_saver() const; + public: + void clear_registered_saver(); + const ::tensorflow::RegisteredSaver& registered_saver() const; + PROTOBUF_NODISCARD ::tensorflow::RegisteredSaver* release_registered_saver(); + ::tensorflow::RegisteredSaver* mutable_registered_saver(); + void set_allocated_registered_saver(::tensorflow::RegisteredSaver* registered_saver); + private: + const ::tensorflow::RegisteredSaver& _internal_registered_saver() const; + ::tensorflow::RegisteredSaver* _internal_mutable_registered_saver(); + public: + void unsafe_arena_set_allocated_registered_saver( + ::tensorflow::RegisteredSaver* registered_saver); + ::tensorflow::RegisteredSaver* unsafe_arena_release_registered_saver(); + + // .google.protobuf.BoolValue has_checkpoint_values = 5; + bool has_has_checkpoint_values() const; + private: + bool _internal_has_has_checkpoint_values() const; + public: + void clear_has_checkpoint_values(); + const ::PROTOBUF_NAMESPACE_ID::BoolValue& has_checkpoint_values() const; + PROTOBUF_NODISCARD ::PROTOBUF_NAMESPACE_ID::BoolValue* release_has_checkpoint_values(); + ::PROTOBUF_NAMESPACE_ID::BoolValue* mutable_has_checkpoint_values(); + void set_allocated_has_checkpoint_values(::PROTOBUF_NAMESPACE_ID::BoolValue* has_checkpoint_values); + private: + const ::PROTOBUF_NAMESPACE_ID::BoolValue& _internal_has_checkpoint_values() const; + ::PROTOBUF_NAMESPACE_ID::BoolValue* _internal_mutable_has_checkpoint_values(); + public: + void unsafe_arena_set_allocated_has_checkpoint_values( + ::PROTOBUF_NAMESPACE_ID::BoolValue* has_checkpoint_values); + ::PROTOBUF_NAMESPACE_ID::BoolValue* unsafe_arena_release_has_checkpoint_values(); + + // @@protoc_insertion_point(class_scope:tensorflow.TrackableObjectGraph.TrackableObject) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::TrackableObjectGraph_TrackableObject_ObjectReference > children_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::TrackableObjectGraph_TrackableObject_SerializedTensor > attributes_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::TrackableObjectGraph_TrackableObject_SlotVariableReference > slot_variables_; + ::tensorflow::RegisteredSaver* registered_saver_; + ::PROTOBUF_NAMESPACE_ID::BoolValue* has_checkpoint_values_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2ftrackable_5fobject_5fgraph_2eproto; +}; +// ------------------------------------------------------------------- + +class TrackableObjectGraph final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.TrackableObjectGraph) */ { + public: + inline TrackableObjectGraph() : TrackableObjectGraph(nullptr) {} + ~TrackableObjectGraph() override; + explicit PROTOBUF_CONSTEXPR TrackableObjectGraph(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + TrackableObjectGraph(const TrackableObjectGraph& from); + TrackableObjectGraph(TrackableObjectGraph&& from) noexcept + : TrackableObjectGraph() { + *this = ::std::move(from); + } + + inline TrackableObjectGraph& operator=(const TrackableObjectGraph& from) { + CopyFrom(from); + return *this; + } + inline TrackableObjectGraph& operator=(TrackableObjectGraph&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const TrackableObjectGraph& default_instance() { + return *internal_default_instance(); + } + static inline const TrackableObjectGraph* internal_default_instance() { + return reinterpret_cast( + &_TrackableObjectGraph_default_instance_); + } + static constexpr int kIndexInFileMessages = + 4; + + friend void swap(TrackableObjectGraph& a, TrackableObjectGraph& b) { + a.Swap(&b); + } + inline void Swap(TrackableObjectGraph* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(TrackableObjectGraph* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + TrackableObjectGraph* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const TrackableObjectGraph& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const TrackableObjectGraph& from) { + TrackableObjectGraph::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(TrackableObjectGraph* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.TrackableObjectGraph"; + } + protected: + explicit TrackableObjectGraph(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + typedef TrackableObjectGraph_TrackableObject TrackableObject; + + // accessors ------------------------------------------------------- + + enum : int { + kNodesFieldNumber = 1, + }; + // repeated .tensorflow.TrackableObjectGraph.TrackableObject nodes = 1; + int nodes_size() const; + private: + int _internal_nodes_size() const; + public: + void clear_nodes(); + ::tensorflow::TrackableObjectGraph_TrackableObject* mutable_nodes(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::TrackableObjectGraph_TrackableObject >* + mutable_nodes(); + private: + const ::tensorflow::TrackableObjectGraph_TrackableObject& _internal_nodes(int index) const; + ::tensorflow::TrackableObjectGraph_TrackableObject* _internal_add_nodes(); + public: + const ::tensorflow::TrackableObjectGraph_TrackableObject& nodes(int index) const; + ::tensorflow::TrackableObjectGraph_TrackableObject* add_nodes(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::TrackableObjectGraph_TrackableObject >& + nodes() const; + + // @@protoc_insertion_point(class_scope:tensorflow.TrackableObjectGraph) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::TrackableObjectGraph_TrackableObject > nodes_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2ftrackable_5fobject_5fgraph_2eproto; +}; +// ------------------------------------------------------------------- + +class RegisteredSaver final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.RegisteredSaver) */ { + public: + inline RegisteredSaver() : RegisteredSaver(nullptr) {} + ~RegisteredSaver() override; + explicit PROTOBUF_CONSTEXPR RegisteredSaver(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + RegisteredSaver(const RegisteredSaver& from); + RegisteredSaver(RegisteredSaver&& from) noexcept + : RegisteredSaver() { + *this = ::std::move(from); + } + + inline RegisteredSaver& operator=(const RegisteredSaver& from) { + CopyFrom(from); + return *this; + } + inline RegisteredSaver& operator=(RegisteredSaver&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const RegisteredSaver& default_instance() { + return *internal_default_instance(); + } + static inline const RegisteredSaver* internal_default_instance() { + return reinterpret_cast( + &_RegisteredSaver_default_instance_); + } + static constexpr int kIndexInFileMessages = + 5; + + friend void swap(RegisteredSaver& a, RegisteredSaver& b) { + a.Swap(&b); + } + inline void Swap(RegisteredSaver* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(RegisteredSaver* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + RegisteredSaver* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const RegisteredSaver& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const RegisteredSaver& from) { + RegisteredSaver::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(RegisteredSaver* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.RegisteredSaver"; + } + protected: + explicit RegisteredSaver(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kNameFieldNumber = 1, + kObjectNameFieldNumber = 2, + }; + // string name = 1; + void clear_name(); + const std::string& name() const; + template + void set_name(ArgT0&& arg0, ArgT... args); + std::string* mutable_name(); + PROTOBUF_NODISCARD std::string* release_name(); + void set_allocated_name(std::string* name); + private: + const std::string& _internal_name() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_name(const std::string& value); + std::string* _internal_mutable_name(); + public: + + // string object_name = 2; + void clear_object_name(); + const std::string& object_name() const; + template + void set_object_name(ArgT0&& arg0, ArgT... args); + std::string* mutable_object_name(); + PROTOBUF_NODISCARD std::string* release_object_name(); + void set_allocated_object_name(std::string* object_name); + private: + const std::string& _internal_object_name() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_object_name(const std::string& value); + std::string* _internal_mutable_object_name(); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.RegisteredSaver) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr object_name_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2ftrackable_5fobject_5fgraph_2eproto; +}; +// =================================================================== + + +// =================================================================== + +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// TrackableObjectGraph_TrackableObject_ObjectReference + +// int32 node_id = 1; +inline void TrackableObjectGraph_TrackableObject_ObjectReference::clear_node_id() { + _impl_.node_id_ = 0; +} +inline int32_t TrackableObjectGraph_TrackableObject_ObjectReference::_internal_node_id() const { + return _impl_.node_id_; +} +inline int32_t TrackableObjectGraph_TrackableObject_ObjectReference::node_id() const { + // @@protoc_insertion_point(field_get:tensorflow.TrackableObjectGraph.TrackableObject.ObjectReference.node_id) + return _internal_node_id(); +} +inline void TrackableObjectGraph_TrackableObject_ObjectReference::_internal_set_node_id(int32_t value) { + + _impl_.node_id_ = value; +} +inline void TrackableObjectGraph_TrackableObject_ObjectReference::set_node_id(int32_t value) { + _internal_set_node_id(value); + // @@protoc_insertion_point(field_set:tensorflow.TrackableObjectGraph.TrackableObject.ObjectReference.node_id) +} + +// string local_name = 2; +inline void TrackableObjectGraph_TrackableObject_ObjectReference::clear_local_name() { + _impl_.local_name_.ClearToEmpty(); +} +inline const std::string& TrackableObjectGraph_TrackableObject_ObjectReference::local_name() const { + // @@protoc_insertion_point(field_get:tensorflow.TrackableObjectGraph.TrackableObject.ObjectReference.local_name) + return _internal_local_name(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void TrackableObjectGraph_TrackableObject_ObjectReference::set_local_name(ArgT0&& arg0, ArgT... args) { + + _impl_.local_name_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.TrackableObjectGraph.TrackableObject.ObjectReference.local_name) +} +inline std::string* TrackableObjectGraph_TrackableObject_ObjectReference::mutable_local_name() { + std::string* _s = _internal_mutable_local_name(); + // @@protoc_insertion_point(field_mutable:tensorflow.TrackableObjectGraph.TrackableObject.ObjectReference.local_name) + return _s; +} +inline const std::string& TrackableObjectGraph_TrackableObject_ObjectReference::_internal_local_name() const { + return _impl_.local_name_.Get(); +} +inline void TrackableObjectGraph_TrackableObject_ObjectReference::_internal_set_local_name(const std::string& value) { + + _impl_.local_name_.Set(value, GetArenaForAllocation()); +} +inline std::string* TrackableObjectGraph_TrackableObject_ObjectReference::_internal_mutable_local_name() { + + return _impl_.local_name_.Mutable(GetArenaForAllocation()); +} +inline std::string* TrackableObjectGraph_TrackableObject_ObjectReference::release_local_name() { + // @@protoc_insertion_point(field_release:tensorflow.TrackableObjectGraph.TrackableObject.ObjectReference.local_name) + return _impl_.local_name_.Release(); +} +inline void TrackableObjectGraph_TrackableObject_ObjectReference::set_allocated_local_name(std::string* local_name) { + if (local_name != nullptr) { + + } else { + + } + _impl_.local_name_.SetAllocated(local_name, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.local_name_.IsDefault()) { + _impl_.local_name_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.TrackableObjectGraph.TrackableObject.ObjectReference.local_name) +} + +// ------------------------------------------------------------------- + +// TrackableObjectGraph_TrackableObject_SerializedTensor + +// string name = 1; +inline void TrackableObjectGraph_TrackableObject_SerializedTensor::clear_name() { + _impl_.name_.ClearToEmpty(); +} +inline const std::string& TrackableObjectGraph_TrackableObject_SerializedTensor::name() const { + // @@protoc_insertion_point(field_get:tensorflow.TrackableObjectGraph.TrackableObject.SerializedTensor.name) + return _internal_name(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void TrackableObjectGraph_TrackableObject_SerializedTensor::set_name(ArgT0&& arg0, ArgT... args) { + + _impl_.name_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.TrackableObjectGraph.TrackableObject.SerializedTensor.name) +} +inline std::string* TrackableObjectGraph_TrackableObject_SerializedTensor::mutable_name() { + std::string* _s = _internal_mutable_name(); + // @@protoc_insertion_point(field_mutable:tensorflow.TrackableObjectGraph.TrackableObject.SerializedTensor.name) + return _s; +} +inline const std::string& TrackableObjectGraph_TrackableObject_SerializedTensor::_internal_name() const { + return _impl_.name_.Get(); +} +inline void TrackableObjectGraph_TrackableObject_SerializedTensor::_internal_set_name(const std::string& value) { + + _impl_.name_.Set(value, GetArenaForAllocation()); +} +inline std::string* TrackableObjectGraph_TrackableObject_SerializedTensor::_internal_mutable_name() { + + return _impl_.name_.Mutable(GetArenaForAllocation()); +} +inline std::string* TrackableObjectGraph_TrackableObject_SerializedTensor::release_name() { + // @@protoc_insertion_point(field_release:tensorflow.TrackableObjectGraph.TrackableObject.SerializedTensor.name) + return _impl_.name_.Release(); +} +inline void TrackableObjectGraph_TrackableObject_SerializedTensor::set_allocated_name(std::string* name) { + if (name != nullptr) { + + } else { + + } + _impl_.name_.SetAllocated(name, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.name_.IsDefault()) { + _impl_.name_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.TrackableObjectGraph.TrackableObject.SerializedTensor.name) +} + +// string full_name = 2; +inline void TrackableObjectGraph_TrackableObject_SerializedTensor::clear_full_name() { + _impl_.full_name_.ClearToEmpty(); +} +inline const std::string& TrackableObjectGraph_TrackableObject_SerializedTensor::full_name() const { + // @@protoc_insertion_point(field_get:tensorflow.TrackableObjectGraph.TrackableObject.SerializedTensor.full_name) + return _internal_full_name(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void TrackableObjectGraph_TrackableObject_SerializedTensor::set_full_name(ArgT0&& arg0, ArgT... args) { + + _impl_.full_name_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.TrackableObjectGraph.TrackableObject.SerializedTensor.full_name) +} +inline std::string* TrackableObjectGraph_TrackableObject_SerializedTensor::mutable_full_name() { + std::string* _s = _internal_mutable_full_name(); + // @@protoc_insertion_point(field_mutable:tensorflow.TrackableObjectGraph.TrackableObject.SerializedTensor.full_name) + return _s; +} +inline const std::string& TrackableObjectGraph_TrackableObject_SerializedTensor::_internal_full_name() const { + return _impl_.full_name_.Get(); +} +inline void TrackableObjectGraph_TrackableObject_SerializedTensor::_internal_set_full_name(const std::string& value) { + + _impl_.full_name_.Set(value, GetArenaForAllocation()); +} +inline std::string* TrackableObjectGraph_TrackableObject_SerializedTensor::_internal_mutable_full_name() { + + return _impl_.full_name_.Mutable(GetArenaForAllocation()); +} +inline std::string* TrackableObjectGraph_TrackableObject_SerializedTensor::release_full_name() { + // @@protoc_insertion_point(field_release:tensorflow.TrackableObjectGraph.TrackableObject.SerializedTensor.full_name) + return _impl_.full_name_.Release(); +} +inline void TrackableObjectGraph_TrackableObject_SerializedTensor::set_allocated_full_name(std::string* full_name) { + if (full_name != nullptr) { + + } else { + + } + _impl_.full_name_.SetAllocated(full_name, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.full_name_.IsDefault()) { + _impl_.full_name_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.TrackableObjectGraph.TrackableObject.SerializedTensor.full_name) +} + +// string checkpoint_key = 3; +inline void TrackableObjectGraph_TrackableObject_SerializedTensor::clear_checkpoint_key() { + _impl_.checkpoint_key_.ClearToEmpty(); +} +inline const std::string& TrackableObjectGraph_TrackableObject_SerializedTensor::checkpoint_key() const { + // @@protoc_insertion_point(field_get:tensorflow.TrackableObjectGraph.TrackableObject.SerializedTensor.checkpoint_key) + return _internal_checkpoint_key(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void TrackableObjectGraph_TrackableObject_SerializedTensor::set_checkpoint_key(ArgT0&& arg0, ArgT... args) { + + _impl_.checkpoint_key_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.TrackableObjectGraph.TrackableObject.SerializedTensor.checkpoint_key) +} +inline std::string* TrackableObjectGraph_TrackableObject_SerializedTensor::mutable_checkpoint_key() { + std::string* _s = _internal_mutable_checkpoint_key(); + // @@protoc_insertion_point(field_mutable:tensorflow.TrackableObjectGraph.TrackableObject.SerializedTensor.checkpoint_key) + return _s; +} +inline const std::string& TrackableObjectGraph_TrackableObject_SerializedTensor::_internal_checkpoint_key() const { + return _impl_.checkpoint_key_.Get(); +} +inline void TrackableObjectGraph_TrackableObject_SerializedTensor::_internal_set_checkpoint_key(const std::string& value) { + + _impl_.checkpoint_key_.Set(value, GetArenaForAllocation()); +} +inline std::string* TrackableObjectGraph_TrackableObject_SerializedTensor::_internal_mutable_checkpoint_key() { + + return _impl_.checkpoint_key_.Mutable(GetArenaForAllocation()); +} +inline std::string* TrackableObjectGraph_TrackableObject_SerializedTensor::release_checkpoint_key() { + // @@protoc_insertion_point(field_release:tensorflow.TrackableObjectGraph.TrackableObject.SerializedTensor.checkpoint_key) + return _impl_.checkpoint_key_.Release(); +} +inline void TrackableObjectGraph_TrackableObject_SerializedTensor::set_allocated_checkpoint_key(std::string* checkpoint_key) { + if (checkpoint_key != nullptr) { + + } else { + + } + _impl_.checkpoint_key_.SetAllocated(checkpoint_key, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.checkpoint_key_.IsDefault()) { + _impl_.checkpoint_key_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.TrackableObjectGraph.TrackableObject.SerializedTensor.checkpoint_key) +} + +// ------------------------------------------------------------------- + +// TrackableObjectGraph_TrackableObject_SlotVariableReference + +// int32 original_variable_node_id = 1; +inline void TrackableObjectGraph_TrackableObject_SlotVariableReference::clear_original_variable_node_id() { + _impl_.original_variable_node_id_ = 0; +} +inline int32_t TrackableObjectGraph_TrackableObject_SlotVariableReference::_internal_original_variable_node_id() const { + return _impl_.original_variable_node_id_; +} +inline int32_t TrackableObjectGraph_TrackableObject_SlotVariableReference::original_variable_node_id() const { + // @@protoc_insertion_point(field_get:tensorflow.TrackableObjectGraph.TrackableObject.SlotVariableReference.original_variable_node_id) + return _internal_original_variable_node_id(); +} +inline void TrackableObjectGraph_TrackableObject_SlotVariableReference::_internal_set_original_variable_node_id(int32_t value) { + + _impl_.original_variable_node_id_ = value; +} +inline void TrackableObjectGraph_TrackableObject_SlotVariableReference::set_original_variable_node_id(int32_t value) { + _internal_set_original_variable_node_id(value); + // @@protoc_insertion_point(field_set:tensorflow.TrackableObjectGraph.TrackableObject.SlotVariableReference.original_variable_node_id) +} + +// string slot_name = 2; +inline void TrackableObjectGraph_TrackableObject_SlotVariableReference::clear_slot_name() { + _impl_.slot_name_.ClearToEmpty(); +} +inline const std::string& TrackableObjectGraph_TrackableObject_SlotVariableReference::slot_name() const { + // @@protoc_insertion_point(field_get:tensorflow.TrackableObjectGraph.TrackableObject.SlotVariableReference.slot_name) + return _internal_slot_name(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void TrackableObjectGraph_TrackableObject_SlotVariableReference::set_slot_name(ArgT0&& arg0, ArgT... args) { + + _impl_.slot_name_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.TrackableObjectGraph.TrackableObject.SlotVariableReference.slot_name) +} +inline std::string* TrackableObjectGraph_TrackableObject_SlotVariableReference::mutable_slot_name() { + std::string* _s = _internal_mutable_slot_name(); + // @@protoc_insertion_point(field_mutable:tensorflow.TrackableObjectGraph.TrackableObject.SlotVariableReference.slot_name) + return _s; +} +inline const std::string& TrackableObjectGraph_TrackableObject_SlotVariableReference::_internal_slot_name() const { + return _impl_.slot_name_.Get(); +} +inline void TrackableObjectGraph_TrackableObject_SlotVariableReference::_internal_set_slot_name(const std::string& value) { + + _impl_.slot_name_.Set(value, GetArenaForAllocation()); +} +inline std::string* TrackableObjectGraph_TrackableObject_SlotVariableReference::_internal_mutable_slot_name() { + + return _impl_.slot_name_.Mutable(GetArenaForAllocation()); +} +inline std::string* TrackableObjectGraph_TrackableObject_SlotVariableReference::release_slot_name() { + // @@protoc_insertion_point(field_release:tensorflow.TrackableObjectGraph.TrackableObject.SlotVariableReference.slot_name) + return _impl_.slot_name_.Release(); +} +inline void TrackableObjectGraph_TrackableObject_SlotVariableReference::set_allocated_slot_name(std::string* slot_name) { + if (slot_name != nullptr) { + + } else { + + } + _impl_.slot_name_.SetAllocated(slot_name, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.slot_name_.IsDefault()) { + _impl_.slot_name_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.TrackableObjectGraph.TrackableObject.SlotVariableReference.slot_name) +} + +// int32 slot_variable_node_id = 3; +inline void TrackableObjectGraph_TrackableObject_SlotVariableReference::clear_slot_variable_node_id() { + _impl_.slot_variable_node_id_ = 0; +} +inline int32_t TrackableObjectGraph_TrackableObject_SlotVariableReference::_internal_slot_variable_node_id() const { + return _impl_.slot_variable_node_id_; +} +inline int32_t TrackableObjectGraph_TrackableObject_SlotVariableReference::slot_variable_node_id() const { + // @@protoc_insertion_point(field_get:tensorflow.TrackableObjectGraph.TrackableObject.SlotVariableReference.slot_variable_node_id) + return _internal_slot_variable_node_id(); +} +inline void TrackableObjectGraph_TrackableObject_SlotVariableReference::_internal_set_slot_variable_node_id(int32_t value) { + + _impl_.slot_variable_node_id_ = value; +} +inline void TrackableObjectGraph_TrackableObject_SlotVariableReference::set_slot_variable_node_id(int32_t value) { + _internal_set_slot_variable_node_id(value); + // @@protoc_insertion_point(field_set:tensorflow.TrackableObjectGraph.TrackableObject.SlotVariableReference.slot_variable_node_id) +} + +// ------------------------------------------------------------------- + +// TrackableObjectGraph_TrackableObject + +// repeated .tensorflow.TrackableObjectGraph.TrackableObject.ObjectReference children = 1; +inline int TrackableObjectGraph_TrackableObject::_internal_children_size() const { + return _impl_.children_.size(); +} +inline int TrackableObjectGraph_TrackableObject::children_size() const { + return _internal_children_size(); +} +inline void TrackableObjectGraph_TrackableObject::clear_children() { + _impl_.children_.Clear(); +} +inline ::tensorflow::TrackableObjectGraph_TrackableObject_ObjectReference* TrackableObjectGraph_TrackableObject::mutable_children(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.TrackableObjectGraph.TrackableObject.children) + return _impl_.children_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::TrackableObjectGraph_TrackableObject_ObjectReference >* +TrackableObjectGraph_TrackableObject::mutable_children() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.TrackableObjectGraph.TrackableObject.children) + return &_impl_.children_; +} +inline const ::tensorflow::TrackableObjectGraph_TrackableObject_ObjectReference& TrackableObjectGraph_TrackableObject::_internal_children(int index) const { + return _impl_.children_.Get(index); +} +inline const ::tensorflow::TrackableObjectGraph_TrackableObject_ObjectReference& TrackableObjectGraph_TrackableObject::children(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.TrackableObjectGraph.TrackableObject.children) + return _internal_children(index); +} +inline ::tensorflow::TrackableObjectGraph_TrackableObject_ObjectReference* TrackableObjectGraph_TrackableObject::_internal_add_children() { + return _impl_.children_.Add(); +} +inline ::tensorflow::TrackableObjectGraph_TrackableObject_ObjectReference* TrackableObjectGraph_TrackableObject::add_children() { + ::tensorflow::TrackableObjectGraph_TrackableObject_ObjectReference* _add = _internal_add_children(); + // @@protoc_insertion_point(field_add:tensorflow.TrackableObjectGraph.TrackableObject.children) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::TrackableObjectGraph_TrackableObject_ObjectReference >& +TrackableObjectGraph_TrackableObject::children() const { + // @@protoc_insertion_point(field_list:tensorflow.TrackableObjectGraph.TrackableObject.children) + return _impl_.children_; +} + +// repeated .tensorflow.TrackableObjectGraph.TrackableObject.SerializedTensor attributes = 2; +inline int TrackableObjectGraph_TrackableObject::_internal_attributes_size() const { + return _impl_.attributes_.size(); +} +inline int TrackableObjectGraph_TrackableObject::attributes_size() const { + return _internal_attributes_size(); +} +inline void TrackableObjectGraph_TrackableObject::clear_attributes() { + _impl_.attributes_.Clear(); +} +inline ::tensorflow::TrackableObjectGraph_TrackableObject_SerializedTensor* TrackableObjectGraph_TrackableObject::mutable_attributes(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.TrackableObjectGraph.TrackableObject.attributes) + return _impl_.attributes_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::TrackableObjectGraph_TrackableObject_SerializedTensor >* +TrackableObjectGraph_TrackableObject::mutable_attributes() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.TrackableObjectGraph.TrackableObject.attributes) + return &_impl_.attributes_; +} +inline const ::tensorflow::TrackableObjectGraph_TrackableObject_SerializedTensor& TrackableObjectGraph_TrackableObject::_internal_attributes(int index) const { + return _impl_.attributes_.Get(index); +} +inline const ::tensorflow::TrackableObjectGraph_TrackableObject_SerializedTensor& TrackableObjectGraph_TrackableObject::attributes(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.TrackableObjectGraph.TrackableObject.attributes) + return _internal_attributes(index); +} +inline ::tensorflow::TrackableObjectGraph_TrackableObject_SerializedTensor* TrackableObjectGraph_TrackableObject::_internal_add_attributes() { + return _impl_.attributes_.Add(); +} +inline ::tensorflow::TrackableObjectGraph_TrackableObject_SerializedTensor* TrackableObjectGraph_TrackableObject::add_attributes() { + ::tensorflow::TrackableObjectGraph_TrackableObject_SerializedTensor* _add = _internal_add_attributes(); + // @@protoc_insertion_point(field_add:tensorflow.TrackableObjectGraph.TrackableObject.attributes) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::TrackableObjectGraph_TrackableObject_SerializedTensor >& +TrackableObjectGraph_TrackableObject::attributes() const { + // @@protoc_insertion_point(field_list:tensorflow.TrackableObjectGraph.TrackableObject.attributes) + return _impl_.attributes_; +} + +// repeated .tensorflow.TrackableObjectGraph.TrackableObject.SlotVariableReference slot_variables = 3; +inline int TrackableObjectGraph_TrackableObject::_internal_slot_variables_size() const { + return _impl_.slot_variables_.size(); +} +inline int TrackableObjectGraph_TrackableObject::slot_variables_size() const { + return _internal_slot_variables_size(); +} +inline void TrackableObjectGraph_TrackableObject::clear_slot_variables() { + _impl_.slot_variables_.Clear(); +} +inline ::tensorflow::TrackableObjectGraph_TrackableObject_SlotVariableReference* TrackableObjectGraph_TrackableObject::mutable_slot_variables(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.TrackableObjectGraph.TrackableObject.slot_variables) + return _impl_.slot_variables_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::TrackableObjectGraph_TrackableObject_SlotVariableReference >* +TrackableObjectGraph_TrackableObject::mutable_slot_variables() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.TrackableObjectGraph.TrackableObject.slot_variables) + return &_impl_.slot_variables_; +} +inline const ::tensorflow::TrackableObjectGraph_TrackableObject_SlotVariableReference& TrackableObjectGraph_TrackableObject::_internal_slot_variables(int index) const { + return _impl_.slot_variables_.Get(index); +} +inline const ::tensorflow::TrackableObjectGraph_TrackableObject_SlotVariableReference& TrackableObjectGraph_TrackableObject::slot_variables(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.TrackableObjectGraph.TrackableObject.slot_variables) + return _internal_slot_variables(index); +} +inline ::tensorflow::TrackableObjectGraph_TrackableObject_SlotVariableReference* TrackableObjectGraph_TrackableObject::_internal_add_slot_variables() { + return _impl_.slot_variables_.Add(); +} +inline ::tensorflow::TrackableObjectGraph_TrackableObject_SlotVariableReference* TrackableObjectGraph_TrackableObject::add_slot_variables() { + ::tensorflow::TrackableObjectGraph_TrackableObject_SlotVariableReference* _add = _internal_add_slot_variables(); + // @@protoc_insertion_point(field_add:tensorflow.TrackableObjectGraph.TrackableObject.slot_variables) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::TrackableObjectGraph_TrackableObject_SlotVariableReference >& +TrackableObjectGraph_TrackableObject::slot_variables() const { + // @@protoc_insertion_point(field_list:tensorflow.TrackableObjectGraph.TrackableObject.slot_variables) + return _impl_.slot_variables_; +} + +// .tensorflow.RegisteredSaver registered_saver = 4; +inline bool TrackableObjectGraph_TrackableObject::_internal_has_registered_saver() const { + return this != internal_default_instance() && _impl_.registered_saver_ != nullptr; +} +inline bool TrackableObjectGraph_TrackableObject::has_registered_saver() const { + return _internal_has_registered_saver(); +} +inline void TrackableObjectGraph_TrackableObject::clear_registered_saver() { + if (GetArenaForAllocation() == nullptr && _impl_.registered_saver_ != nullptr) { + delete _impl_.registered_saver_; + } + _impl_.registered_saver_ = nullptr; +} +inline const ::tensorflow::RegisteredSaver& TrackableObjectGraph_TrackableObject::_internal_registered_saver() const { + const ::tensorflow::RegisteredSaver* p = _impl_.registered_saver_; + return p != nullptr ? *p : reinterpret_cast( + ::tensorflow::_RegisteredSaver_default_instance_); +} +inline const ::tensorflow::RegisteredSaver& TrackableObjectGraph_TrackableObject::registered_saver() const { + // @@protoc_insertion_point(field_get:tensorflow.TrackableObjectGraph.TrackableObject.registered_saver) + return _internal_registered_saver(); +} +inline void TrackableObjectGraph_TrackableObject::unsafe_arena_set_allocated_registered_saver( + ::tensorflow::RegisteredSaver* registered_saver) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.registered_saver_); + } + _impl_.registered_saver_ = registered_saver; + if (registered_saver) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.TrackableObjectGraph.TrackableObject.registered_saver) +} +inline ::tensorflow::RegisteredSaver* TrackableObjectGraph_TrackableObject::release_registered_saver() { + + ::tensorflow::RegisteredSaver* temp = _impl_.registered_saver_; + _impl_.registered_saver_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tensorflow::RegisteredSaver* TrackableObjectGraph_TrackableObject::unsafe_arena_release_registered_saver() { + // @@protoc_insertion_point(field_release:tensorflow.TrackableObjectGraph.TrackableObject.registered_saver) + + ::tensorflow::RegisteredSaver* temp = _impl_.registered_saver_; + _impl_.registered_saver_ = nullptr; + return temp; +} +inline ::tensorflow::RegisteredSaver* TrackableObjectGraph_TrackableObject::_internal_mutable_registered_saver() { + + if (_impl_.registered_saver_ == nullptr) { + auto* p = CreateMaybeMessage<::tensorflow::RegisteredSaver>(GetArenaForAllocation()); + _impl_.registered_saver_ = p; + } + return _impl_.registered_saver_; +} +inline ::tensorflow::RegisteredSaver* TrackableObjectGraph_TrackableObject::mutable_registered_saver() { + ::tensorflow::RegisteredSaver* _msg = _internal_mutable_registered_saver(); + // @@protoc_insertion_point(field_mutable:tensorflow.TrackableObjectGraph.TrackableObject.registered_saver) + return _msg; +} +inline void TrackableObjectGraph_TrackableObject::set_allocated_registered_saver(::tensorflow::RegisteredSaver* registered_saver) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete _impl_.registered_saver_; + } + if (registered_saver) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(registered_saver); + if (message_arena != submessage_arena) { + registered_saver = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, registered_saver, submessage_arena); + } + + } else { + + } + _impl_.registered_saver_ = registered_saver; + // @@protoc_insertion_point(field_set_allocated:tensorflow.TrackableObjectGraph.TrackableObject.registered_saver) +} + +// .google.protobuf.BoolValue has_checkpoint_values = 5; +inline bool TrackableObjectGraph_TrackableObject::_internal_has_has_checkpoint_values() const { + return this != internal_default_instance() && _impl_.has_checkpoint_values_ != nullptr; +} +inline bool TrackableObjectGraph_TrackableObject::has_has_checkpoint_values() const { + return _internal_has_has_checkpoint_values(); +} +inline const ::PROTOBUF_NAMESPACE_ID::BoolValue& TrackableObjectGraph_TrackableObject::_internal_has_checkpoint_values() const { + const ::PROTOBUF_NAMESPACE_ID::BoolValue* p = _impl_.has_checkpoint_values_; + return p != nullptr ? *p : reinterpret_cast( + ::PROTOBUF_NAMESPACE_ID::_BoolValue_default_instance_); +} +inline const ::PROTOBUF_NAMESPACE_ID::BoolValue& TrackableObjectGraph_TrackableObject::has_checkpoint_values() const { + // @@protoc_insertion_point(field_get:tensorflow.TrackableObjectGraph.TrackableObject.has_checkpoint_values) + return _internal_has_checkpoint_values(); +} +inline void TrackableObjectGraph_TrackableObject::unsafe_arena_set_allocated_has_checkpoint_values( + ::PROTOBUF_NAMESPACE_ID::BoolValue* has_checkpoint_values) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.has_checkpoint_values_); + } + _impl_.has_checkpoint_values_ = has_checkpoint_values; + if (has_checkpoint_values) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.TrackableObjectGraph.TrackableObject.has_checkpoint_values) +} +inline ::PROTOBUF_NAMESPACE_ID::BoolValue* TrackableObjectGraph_TrackableObject::release_has_checkpoint_values() { + + ::PROTOBUF_NAMESPACE_ID::BoolValue* temp = _impl_.has_checkpoint_values_; + _impl_.has_checkpoint_values_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::PROTOBUF_NAMESPACE_ID::BoolValue* TrackableObjectGraph_TrackableObject::unsafe_arena_release_has_checkpoint_values() { + // @@protoc_insertion_point(field_release:tensorflow.TrackableObjectGraph.TrackableObject.has_checkpoint_values) + + ::PROTOBUF_NAMESPACE_ID::BoolValue* temp = _impl_.has_checkpoint_values_; + _impl_.has_checkpoint_values_ = nullptr; + return temp; +} +inline ::PROTOBUF_NAMESPACE_ID::BoolValue* TrackableObjectGraph_TrackableObject::_internal_mutable_has_checkpoint_values() { + + if (_impl_.has_checkpoint_values_ == nullptr) { + auto* p = CreateMaybeMessage<::PROTOBUF_NAMESPACE_ID::BoolValue>(GetArenaForAllocation()); + _impl_.has_checkpoint_values_ = p; + } + return _impl_.has_checkpoint_values_; +} +inline ::PROTOBUF_NAMESPACE_ID::BoolValue* TrackableObjectGraph_TrackableObject::mutable_has_checkpoint_values() { + ::PROTOBUF_NAMESPACE_ID::BoolValue* _msg = _internal_mutable_has_checkpoint_values(); + // @@protoc_insertion_point(field_mutable:tensorflow.TrackableObjectGraph.TrackableObject.has_checkpoint_values) + return _msg; +} +inline void TrackableObjectGraph_TrackableObject::set_allocated_has_checkpoint_values(::PROTOBUF_NAMESPACE_ID::BoolValue* has_checkpoint_values) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.has_checkpoint_values_); + } + if (has_checkpoint_values) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( + reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(has_checkpoint_values)); + if (message_arena != submessage_arena) { + has_checkpoint_values = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, has_checkpoint_values, submessage_arena); + } + + } else { + + } + _impl_.has_checkpoint_values_ = has_checkpoint_values; + // @@protoc_insertion_point(field_set_allocated:tensorflow.TrackableObjectGraph.TrackableObject.has_checkpoint_values) +} + +// ------------------------------------------------------------------- + +// TrackableObjectGraph + +// repeated .tensorflow.TrackableObjectGraph.TrackableObject nodes = 1; +inline int TrackableObjectGraph::_internal_nodes_size() const { + return _impl_.nodes_.size(); +} +inline int TrackableObjectGraph::nodes_size() const { + return _internal_nodes_size(); +} +inline void TrackableObjectGraph::clear_nodes() { + _impl_.nodes_.Clear(); +} +inline ::tensorflow::TrackableObjectGraph_TrackableObject* TrackableObjectGraph::mutable_nodes(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.TrackableObjectGraph.nodes) + return _impl_.nodes_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::TrackableObjectGraph_TrackableObject >* +TrackableObjectGraph::mutable_nodes() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.TrackableObjectGraph.nodes) + return &_impl_.nodes_; +} +inline const ::tensorflow::TrackableObjectGraph_TrackableObject& TrackableObjectGraph::_internal_nodes(int index) const { + return _impl_.nodes_.Get(index); +} +inline const ::tensorflow::TrackableObjectGraph_TrackableObject& TrackableObjectGraph::nodes(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.TrackableObjectGraph.nodes) + return _internal_nodes(index); +} +inline ::tensorflow::TrackableObjectGraph_TrackableObject* TrackableObjectGraph::_internal_add_nodes() { + return _impl_.nodes_.Add(); +} +inline ::tensorflow::TrackableObjectGraph_TrackableObject* TrackableObjectGraph::add_nodes() { + ::tensorflow::TrackableObjectGraph_TrackableObject* _add = _internal_add_nodes(); + // @@protoc_insertion_point(field_add:tensorflow.TrackableObjectGraph.nodes) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::TrackableObjectGraph_TrackableObject >& +TrackableObjectGraph::nodes() const { + // @@protoc_insertion_point(field_list:tensorflow.TrackableObjectGraph.nodes) + return _impl_.nodes_; +} + +// ------------------------------------------------------------------- + +// RegisteredSaver + +// string name = 1; +inline void RegisteredSaver::clear_name() { + _impl_.name_.ClearToEmpty(); +} +inline const std::string& RegisteredSaver::name() const { + // @@protoc_insertion_point(field_get:tensorflow.RegisteredSaver.name) + return _internal_name(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void RegisteredSaver::set_name(ArgT0&& arg0, ArgT... args) { + + _impl_.name_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.RegisteredSaver.name) +} +inline std::string* RegisteredSaver::mutable_name() { + std::string* _s = _internal_mutable_name(); + // @@protoc_insertion_point(field_mutable:tensorflow.RegisteredSaver.name) + return _s; +} +inline const std::string& RegisteredSaver::_internal_name() const { + return _impl_.name_.Get(); +} +inline void RegisteredSaver::_internal_set_name(const std::string& value) { + + _impl_.name_.Set(value, GetArenaForAllocation()); +} +inline std::string* RegisteredSaver::_internal_mutable_name() { + + return _impl_.name_.Mutable(GetArenaForAllocation()); +} +inline std::string* RegisteredSaver::release_name() { + // @@protoc_insertion_point(field_release:tensorflow.RegisteredSaver.name) + return _impl_.name_.Release(); +} +inline void RegisteredSaver::set_allocated_name(std::string* name) { + if (name != nullptr) { + + } else { + + } + _impl_.name_.SetAllocated(name, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.name_.IsDefault()) { + _impl_.name_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.RegisteredSaver.name) +} + +// string object_name = 2; +inline void RegisteredSaver::clear_object_name() { + _impl_.object_name_.ClearToEmpty(); +} +inline const std::string& RegisteredSaver::object_name() const { + // @@protoc_insertion_point(field_get:tensorflow.RegisteredSaver.object_name) + return _internal_object_name(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void RegisteredSaver::set_object_name(ArgT0&& arg0, ArgT... args) { + + _impl_.object_name_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.RegisteredSaver.object_name) +} +inline std::string* RegisteredSaver::mutable_object_name() { + std::string* _s = _internal_mutable_object_name(); + // @@protoc_insertion_point(field_mutable:tensorflow.RegisteredSaver.object_name) + return _s; +} +inline const std::string& RegisteredSaver::_internal_object_name() const { + return _impl_.object_name_.Get(); +} +inline void RegisteredSaver::_internal_set_object_name(const std::string& value) { + + _impl_.object_name_.Set(value, GetArenaForAllocation()); +} +inline std::string* RegisteredSaver::_internal_mutable_object_name() { + + return _impl_.object_name_.Mutable(GetArenaForAllocation()); +} +inline std::string* RegisteredSaver::release_object_name() { + // @@protoc_insertion_point(field_release:tensorflow.RegisteredSaver.object_name) + return _impl_.object_name_.Release(); +} +inline void RegisteredSaver::set_allocated_object_name(std::string* object_name) { + if (object_name != nullptr) { + + } else { + + } + _impl_.object_name_.SetAllocated(object_name, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.object_name_.IsDefault()) { + _impl_.object_name_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.RegisteredSaver.object_name) +} + +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + + +// @@protoc_insertion_point(namespace_scope) + +} // namespace tensorflow + +// @@protoc_insertion_point(global_scope) + +#include +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprotobuf_2ftrackable_5fobject_5fgraph_2eproto diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/trackable_object_graph.proto b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/trackable_object_graph.proto new file mode 100644 index 0000000000000000000000000000000000000000..2fe4fad6b3fb87c1c01ae3770e346d3d1c95ee9c --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/trackable_object_graph.proto @@ -0,0 +1,80 @@ +syntax = "proto3"; + +package tensorflow; + +import "google/protobuf/wrappers.proto"; + +option cc_enable_arenas = true; +option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/protobuf/for_core_protos_go_proto"; + +// A TensorBundle addition which saves extra information about the objects which +// own variables, allowing for more robust checkpoint loading into modified +// programs. + +message TrackableObjectGraph { + message TrackableObject { + message ObjectReference { + // An index into `TrackableObjectGraph.nodes`, indicating the object + // being referenced. + int32 node_id = 1; + // A user-provided name for the edge. + string local_name = 2; + } + + message SerializedTensor { + // A name for the Tensor. Simple variables have only one + // `SerializedTensor` named "VARIABLE_VALUE" by convention. This value may + // be restored on object creation as an optimization. + string name = 1; + // The full name of the variable/tensor, if applicable. Used to allow + // name-based loading of checkpoints which were saved using an + // object-based API. Should match the checkpoint key which would have been + // assigned by tf.train.Saver. + string full_name = 2; + // The generated name of the Tensor in the checkpoint. + string checkpoint_key = 3; + // Deprecated bool field for optional restore. This field has never been + // set to True. + reserved "optional_restore"; + reserved 4; + } + + message SlotVariableReference { + // An index into `TrackableObjectGraph.nodes`, indicating the + // variable object this slot was created for. + int32 original_variable_node_id = 1; + // The name of the slot (e.g. "m"/"v"). + string slot_name = 2; + // An index into `TrackableObjectGraph.nodes`, indicating the + // `Object` with the value of the slot variable. + int32 slot_variable_node_id = 3; + } + + // Objects which this object depends on. + repeated ObjectReference children = 1; + // Serialized data specific to this object. + repeated SerializedTensor attributes = 2; + // Slot variables owned by this object. + repeated SlotVariableReference slot_variables = 3; + + // The registered saver used to save this object. If this saver is not + // present when loading the checkpoint, then loading will fail. + RegisteredSaver registered_saver = 4; + + // Whether this object has checkpoint values or descendants with checkpoint + // values. This is computed at save time to avoid traversing the entire + // object graph proto when restoring (which also has to traverse the live + // object graph). + google.protobuf.BoolValue has_checkpoint_values = 5; + } + + repeated TrackableObject nodes = 1; +} + +message RegisteredSaver { + // The name of the registered saver/restore function. + string name = 1; + + // Unique auto-generated name of the object. + string object_name = 2; +} diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/transport_options.pb.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/transport_options.pb.h new file mode 100644 index 0000000000000000000000000000000000000000..64089a2bb1a2218e5e11e8a0836dfb680ade4879 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/transport_options.pb.h @@ -0,0 +1,317 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/transport_options.proto + +#ifndef GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprotobuf_2ftransport_5foptions_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprotobuf_2ftransport_5foptions_2eproto + +#include +#include + +#include +#if PROTOBUF_VERSION < 3021000 +#error This file was generated by a newer version of protoc which is +#error incompatible with your Protocol Buffer headers. Please update +#error your headers. +#endif +#if 3021009 < PROTOBUF_MIN_PROTOC_VERSION +#error This file was generated by an older version of protoc which is +#error incompatible with your Protocol Buffer headers. Please +#error regenerate this file with a newer version of protoc. +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include // IWYU pragma: export +#include // IWYU pragma: export +#include +// @@protoc_insertion_point(includes) +#include +#define PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2fprotobuf_2ftransport_5foptions_2eproto +PROTOBUF_NAMESPACE_OPEN +namespace internal { +class AnyMetadata; +} // namespace internal +PROTOBUF_NAMESPACE_CLOSE + +// Internal implementation detail -- do not use these members. +struct TableStruct_tensorflow_2fcore_2fprotobuf_2ftransport_5foptions_2eproto { + static const uint32_t offsets[]; +}; +extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_tensorflow_2fcore_2fprotobuf_2ftransport_5foptions_2eproto; +namespace tensorflow { +class RecvBufRespExtra; +struct RecvBufRespExtraDefaultTypeInternal; +extern RecvBufRespExtraDefaultTypeInternal _RecvBufRespExtra_default_instance_; +} // namespace tensorflow +PROTOBUF_NAMESPACE_OPEN +template<> ::tensorflow::RecvBufRespExtra* Arena::CreateMaybeMessage<::tensorflow::RecvBufRespExtra>(Arena*); +PROTOBUF_NAMESPACE_CLOSE +namespace tensorflow { + +// =================================================================== + +class RecvBufRespExtra final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.RecvBufRespExtra) */ { + public: + inline RecvBufRespExtra() : RecvBufRespExtra(nullptr) {} + ~RecvBufRespExtra() override; + explicit PROTOBUF_CONSTEXPR RecvBufRespExtra(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + RecvBufRespExtra(const RecvBufRespExtra& from); + RecvBufRespExtra(RecvBufRespExtra&& from) noexcept + : RecvBufRespExtra() { + *this = ::std::move(from); + } + + inline RecvBufRespExtra& operator=(const RecvBufRespExtra& from) { + CopyFrom(from); + return *this; + } + inline RecvBufRespExtra& operator=(RecvBufRespExtra&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const RecvBufRespExtra& default_instance() { + return *internal_default_instance(); + } + static inline const RecvBufRespExtra* internal_default_instance() { + return reinterpret_cast( + &_RecvBufRespExtra_default_instance_); + } + static constexpr int kIndexInFileMessages = + 0; + + friend void swap(RecvBufRespExtra& a, RecvBufRespExtra& b) { + a.Swap(&b); + } + inline void Swap(RecvBufRespExtra* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(RecvBufRespExtra* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + RecvBufRespExtra* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const RecvBufRespExtra& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const RecvBufRespExtra& from) { + RecvBufRespExtra::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(RecvBufRespExtra* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.RecvBufRespExtra"; + } + protected: + explicit RecvBufRespExtra(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kTensorContentFieldNumber = 1, + }; + // repeated bytes tensor_content = 1; + int tensor_content_size() const; + private: + int _internal_tensor_content_size() const; + public: + void clear_tensor_content(); + const std::string& tensor_content(int index) const; + std::string* mutable_tensor_content(int index); + void set_tensor_content(int index, const std::string& value); + void set_tensor_content(int index, std::string&& value); + void set_tensor_content(int index, const char* value); + void set_tensor_content(int index, const void* value, size_t size); + std::string* add_tensor_content(); + void add_tensor_content(const std::string& value); + void add_tensor_content(std::string&& value); + void add_tensor_content(const char* value); + void add_tensor_content(const void* value, size_t size); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& tensor_content() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* mutable_tensor_content(); + private: + const std::string& _internal_tensor_content(int index) const; + std::string* _internal_add_tensor_content(); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.RecvBufRespExtra) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField tensor_content_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2ftransport_5foptions_2eproto; +}; +// =================================================================== + + +// =================================================================== + +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// RecvBufRespExtra + +// repeated bytes tensor_content = 1; +inline int RecvBufRespExtra::_internal_tensor_content_size() const { + return _impl_.tensor_content_.size(); +} +inline int RecvBufRespExtra::tensor_content_size() const { + return _internal_tensor_content_size(); +} +inline void RecvBufRespExtra::clear_tensor_content() { + _impl_.tensor_content_.Clear(); +} +inline std::string* RecvBufRespExtra::add_tensor_content() { + std::string* _s = _internal_add_tensor_content(); + // @@protoc_insertion_point(field_add_mutable:tensorflow.RecvBufRespExtra.tensor_content) + return _s; +} +inline const std::string& RecvBufRespExtra::_internal_tensor_content(int index) const { + return _impl_.tensor_content_.Get(index); +} +inline const std::string& RecvBufRespExtra::tensor_content(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.RecvBufRespExtra.tensor_content) + return _internal_tensor_content(index); +} +inline std::string* RecvBufRespExtra::mutable_tensor_content(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.RecvBufRespExtra.tensor_content) + return _impl_.tensor_content_.Mutable(index); +} +inline void RecvBufRespExtra::set_tensor_content(int index, const std::string& value) { + _impl_.tensor_content_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set:tensorflow.RecvBufRespExtra.tensor_content) +} +inline void RecvBufRespExtra::set_tensor_content(int index, std::string&& value) { + _impl_.tensor_content_.Mutable(index)->assign(std::move(value)); + // @@protoc_insertion_point(field_set:tensorflow.RecvBufRespExtra.tensor_content) +} +inline void RecvBufRespExtra::set_tensor_content(int index, const char* value) { + GOOGLE_DCHECK(value != nullptr); + _impl_.tensor_content_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set_char:tensorflow.RecvBufRespExtra.tensor_content) +} +inline void RecvBufRespExtra::set_tensor_content(int index, const void* value, size_t size) { + _impl_.tensor_content_.Mutable(index)->assign( + reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:tensorflow.RecvBufRespExtra.tensor_content) +} +inline std::string* RecvBufRespExtra::_internal_add_tensor_content() { + return _impl_.tensor_content_.Add(); +} +inline void RecvBufRespExtra::add_tensor_content(const std::string& value) { + _impl_.tensor_content_.Add()->assign(value); + // @@protoc_insertion_point(field_add:tensorflow.RecvBufRespExtra.tensor_content) +} +inline void RecvBufRespExtra::add_tensor_content(std::string&& value) { + _impl_.tensor_content_.Add(std::move(value)); + // @@protoc_insertion_point(field_add:tensorflow.RecvBufRespExtra.tensor_content) +} +inline void RecvBufRespExtra::add_tensor_content(const char* value) { + GOOGLE_DCHECK(value != nullptr); + _impl_.tensor_content_.Add()->assign(value); + // @@protoc_insertion_point(field_add_char:tensorflow.RecvBufRespExtra.tensor_content) +} +inline void RecvBufRespExtra::add_tensor_content(const void* value, size_t size) { + _impl_.tensor_content_.Add()->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_add_pointer:tensorflow.RecvBufRespExtra.tensor_content) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& +RecvBufRespExtra::tensor_content() const { + // @@protoc_insertion_point(field_list:tensorflow.RecvBufRespExtra.tensor_content) + return _impl_.tensor_content_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* +RecvBufRespExtra::mutable_tensor_content() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.RecvBufRespExtra.tensor_content) + return &_impl_.tensor_content_; +} + +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ + +// @@protoc_insertion_point(namespace_scope) + +} // namespace tensorflow + +// @@protoc_insertion_point(global_scope) + +#include +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprotobuf_2ftransport_5foptions_2eproto diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/transport_options.proto b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/transport_options.proto new file mode 100644 index 0000000000000000000000000000000000000000..8d540315e0618e747a8270f265ed89a02c5a2dc1 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/transport_options.proto @@ -0,0 +1,10 @@ +syntax = "proto3"; + +package tensorflow; + +option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/protobuf/for_core_protos_go_proto"; + +// Extra data needed on a non-RDMA RecvBufResponse. +message RecvBufRespExtra { + repeated bytes tensor_content = 1; +} diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/verifier_config.pb.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/verifier_config.pb.h new file mode 100644 index 0000000000000000000000000000000000000000..e7454940668b7350b1de6e544cc9f9e17bf1d8cc --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/verifier_config.pb.h @@ -0,0 +1,347 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/verifier_config.proto + +#ifndef GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprotobuf_2fverifier_5fconfig_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprotobuf_2fverifier_5fconfig_2eproto + +#include +#include + +#include +#if PROTOBUF_VERSION < 3021000 +#error This file was generated by a newer version of protoc which is +#error incompatible with your Protocol Buffer headers. Please update +#error your headers. +#endif +#if 3021009 < PROTOBUF_MIN_PROTOC_VERSION +#error This file was generated by an older version of protoc which is +#error incompatible with your Protocol Buffer headers. Please +#error regenerate this file with a newer version of protoc. +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include // IWYU pragma: export +#include // IWYU pragma: export +#include +#include +// @@protoc_insertion_point(includes) +#include +#define PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2fprotobuf_2fverifier_5fconfig_2eproto +PROTOBUF_NAMESPACE_OPEN +namespace internal { +class AnyMetadata; +} // namespace internal +PROTOBUF_NAMESPACE_CLOSE + +// Internal implementation detail -- do not use these members. +struct TableStruct_tensorflow_2fcore_2fprotobuf_2fverifier_5fconfig_2eproto { + static const uint32_t offsets[]; +}; +extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_tensorflow_2fcore_2fprotobuf_2fverifier_5fconfig_2eproto; +namespace tensorflow { +class VerifierConfig; +struct VerifierConfigDefaultTypeInternal; +extern VerifierConfigDefaultTypeInternal _VerifierConfig_default_instance_; +} // namespace tensorflow +PROTOBUF_NAMESPACE_OPEN +template<> ::tensorflow::VerifierConfig* Arena::CreateMaybeMessage<::tensorflow::VerifierConfig>(Arena*); +PROTOBUF_NAMESPACE_CLOSE +namespace tensorflow { + +enum VerifierConfig_Toggle : int { + VerifierConfig_Toggle_DEFAULT = 0, + VerifierConfig_Toggle_ON = 1, + VerifierConfig_Toggle_OFF = 2, + VerifierConfig_Toggle_VerifierConfig_Toggle_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits::min(), + VerifierConfig_Toggle_VerifierConfig_Toggle_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits::max() +}; +bool VerifierConfig_Toggle_IsValid(int value); +constexpr VerifierConfig_Toggle VerifierConfig_Toggle_Toggle_MIN = VerifierConfig_Toggle_DEFAULT; +constexpr VerifierConfig_Toggle VerifierConfig_Toggle_Toggle_MAX = VerifierConfig_Toggle_OFF; +constexpr int VerifierConfig_Toggle_Toggle_ARRAYSIZE = VerifierConfig_Toggle_Toggle_MAX + 1; + +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* VerifierConfig_Toggle_descriptor(); +template +inline const std::string& VerifierConfig_Toggle_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function VerifierConfig_Toggle_Name."); + return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( + VerifierConfig_Toggle_descriptor(), enum_t_value); +} +inline bool VerifierConfig_Toggle_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, VerifierConfig_Toggle* value) { + return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( + VerifierConfig_Toggle_descriptor(), name, value); +} +// =================================================================== + +class VerifierConfig final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.VerifierConfig) */ { + public: + inline VerifierConfig() : VerifierConfig(nullptr) {} + ~VerifierConfig() override; + explicit PROTOBUF_CONSTEXPR VerifierConfig(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + VerifierConfig(const VerifierConfig& from); + VerifierConfig(VerifierConfig&& from) noexcept + : VerifierConfig() { + *this = ::std::move(from); + } + + inline VerifierConfig& operator=(const VerifierConfig& from) { + CopyFrom(from); + return *this; + } + inline VerifierConfig& operator=(VerifierConfig&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const VerifierConfig& default_instance() { + return *internal_default_instance(); + } + static inline const VerifierConfig* internal_default_instance() { + return reinterpret_cast( + &_VerifierConfig_default_instance_); + } + static constexpr int kIndexInFileMessages = + 0; + + friend void swap(VerifierConfig& a, VerifierConfig& b) { + a.Swap(&b); + } + inline void Swap(VerifierConfig* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(VerifierConfig* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + VerifierConfig* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const VerifierConfig& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const VerifierConfig& from) { + VerifierConfig::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(VerifierConfig* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.VerifierConfig"; + } + protected: + explicit VerifierConfig(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + typedef VerifierConfig_Toggle Toggle; + static constexpr Toggle DEFAULT = + VerifierConfig_Toggle_DEFAULT; + static constexpr Toggle ON = + VerifierConfig_Toggle_ON; + static constexpr Toggle OFF = + VerifierConfig_Toggle_OFF; + static inline bool Toggle_IsValid(int value) { + return VerifierConfig_Toggle_IsValid(value); + } + static constexpr Toggle Toggle_MIN = + VerifierConfig_Toggle_Toggle_MIN; + static constexpr Toggle Toggle_MAX = + VerifierConfig_Toggle_Toggle_MAX; + static constexpr int Toggle_ARRAYSIZE = + VerifierConfig_Toggle_Toggle_ARRAYSIZE; + static inline const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* + Toggle_descriptor() { + return VerifierConfig_Toggle_descriptor(); + } + template + static inline const std::string& Toggle_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function Toggle_Name."); + return VerifierConfig_Toggle_Name(enum_t_value); + } + static inline bool Toggle_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name, + Toggle* value) { + return VerifierConfig_Toggle_Parse(name, value); + } + + // accessors ------------------------------------------------------- + + enum : int { + kVerificationTimeoutInMsFieldNumber = 1, + kStructureVerifierFieldNumber = 2, + }; + // int64 verification_timeout_in_ms = 1; + void clear_verification_timeout_in_ms(); + int64_t verification_timeout_in_ms() const; + void set_verification_timeout_in_ms(int64_t value); + private: + int64_t _internal_verification_timeout_in_ms() const; + void _internal_set_verification_timeout_in_ms(int64_t value); + public: + + // .tensorflow.VerifierConfig.Toggle structure_verifier = 2; + void clear_structure_verifier(); + ::tensorflow::VerifierConfig_Toggle structure_verifier() const; + void set_structure_verifier(::tensorflow::VerifierConfig_Toggle value); + private: + ::tensorflow::VerifierConfig_Toggle _internal_structure_verifier() const; + void _internal_set_structure_verifier(::tensorflow::VerifierConfig_Toggle value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.VerifierConfig) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + int64_t verification_timeout_in_ms_; + int structure_verifier_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fverifier_5fconfig_2eproto; +}; +// =================================================================== + + +// =================================================================== + +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// VerifierConfig + +// int64 verification_timeout_in_ms = 1; +inline void VerifierConfig::clear_verification_timeout_in_ms() { + _impl_.verification_timeout_in_ms_ = int64_t{0}; +} +inline int64_t VerifierConfig::_internal_verification_timeout_in_ms() const { + return _impl_.verification_timeout_in_ms_; +} +inline int64_t VerifierConfig::verification_timeout_in_ms() const { + // @@protoc_insertion_point(field_get:tensorflow.VerifierConfig.verification_timeout_in_ms) + return _internal_verification_timeout_in_ms(); +} +inline void VerifierConfig::_internal_set_verification_timeout_in_ms(int64_t value) { + + _impl_.verification_timeout_in_ms_ = value; +} +inline void VerifierConfig::set_verification_timeout_in_ms(int64_t value) { + _internal_set_verification_timeout_in_ms(value); + // @@protoc_insertion_point(field_set:tensorflow.VerifierConfig.verification_timeout_in_ms) +} + +// .tensorflow.VerifierConfig.Toggle structure_verifier = 2; +inline void VerifierConfig::clear_structure_verifier() { + _impl_.structure_verifier_ = 0; +} +inline ::tensorflow::VerifierConfig_Toggle VerifierConfig::_internal_structure_verifier() const { + return static_cast< ::tensorflow::VerifierConfig_Toggle >(_impl_.structure_verifier_); +} +inline ::tensorflow::VerifierConfig_Toggle VerifierConfig::structure_verifier() const { + // @@protoc_insertion_point(field_get:tensorflow.VerifierConfig.structure_verifier) + return _internal_structure_verifier(); +} +inline void VerifierConfig::_internal_set_structure_verifier(::tensorflow::VerifierConfig_Toggle value) { + + _impl_.structure_verifier_ = value; +} +inline void VerifierConfig::set_structure_verifier(::tensorflow::VerifierConfig_Toggle value) { + _internal_set_structure_verifier(value); + // @@protoc_insertion_point(field_set:tensorflow.VerifierConfig.structure_verifier) +} + +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ + +// @@protoc_insertion_point(namespace_scope) + +} // namespace tensorflow + +PROTOBUF_NAMESPACE_OPEN + +template <> struct is_proto_enum< ::tensorflow::VerifierConfig_Toggle> : ::std::true_type {}; +template <> +inline const EnumDescriptor* GetEnumDescriptor< ::tensorflow::VerifierConfig_Toggle>() { + return ::tensorflow::VerifierConfig_Toggle_descriptor(); +} + +PROTOBUF_NAMESPACE_CLOSE + +// @@protoc_insertion_point(global_scope) + +#include +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprotobuf_2fverifier_5fconfig_2eproto diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/verifier_config.proto b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/verifier_config.proto new file mode 100644 index 0000000000000000000000000000000000000000..21885ffef83ffd252227c649c947ee7d1b289fa1 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/verifier_config.proto @@ -0,0 +1,27 @@ +syntax = "proto3"; + +package tensorflow; + +option cc_enable_arenas = true; +option java_outer_classname = "VerifierConfigProtos"; +option java_multiple_files = true; +option java_package = "org.tensorflow.framework"; +option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/protobuf/for_core_protos_go_proto"; + +// The config for graph verifiers. +message VerifierConfig { + enum Toggle { + DEFAULT = 0; + ON = 1; + OFF = 2; + } + + // Deadline for completion of all verification i.e. all the Toggle ON + // verifiers must complete execution within this time. + int64 verification_timeout_in_ms = 1; + + // Perform structural validation on a tensorflow graph. Default is OFF. + Toggle structure_verifier = 2; + + // Next tag: 3 +} diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/worker.pb.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/worker.pb.h new file mode 100644 index 0000000000000000000000000000000000000000..e861c0a3a668565948cc203a858f37e8c863b410 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/protobuf/worker.pb.h @@ -0,0 +1,11560 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/worker.proto + +#ifndef GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprotobuf_2fworker_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprotobuf_2fworker_2eproto + +#include +#include + +#include +#if PROTOBUF_VERSION < 3021000 +#error This file was generated by a newer version of protoc which is +#error incompatible with your Protocol Buffer headers. Please update +#error your headers. +#endif +#if 3021009 < PROTOBUF_MIN_PROTOC_VERSION +#error This file was generated by an older version of protoc which is +#error incompatible with your Protocol Buffer headers. Please +#error regenerate this file with a newer version of protoc. +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include // IWYU pragma: export +#include // IWYU pragma: export +#include +#include +#include "tensorflow/core/framework/cost_graph.pb.h" +#include "tensorflow/core/framework/device_attributes.pb.h" +#include "tensorflow/core/framework/graph.pb.h" +#include "tensorflow/core/framework/step_stats.pb.h" +#include "tensorflow/core/framework/tensor.pb.h" +#include "tensorflow/core/framework/tensor_shape.pb.h" +#include "tensorflow/core/framework/types.pb.h" +#include "tensorflow/core/protobuf/config.pb.h" +#include "tensorflow/core/protobuf/debug.pb.h" +#include "tensorflow/core/protobuf/error_codes.pb.h" +#include "tensorflow/core/protobuf/named_tensor.pb.h" +#include "tensorflow/core/protobuf/tensorflow_server.pb.h" +// @@protoc_insertion_point(includes) +#include +#define PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2fprotobuf_2fworker_2eproto +PROTOBUF_NAMESPACE_OPEN +namespace internal { +class AnyMetadata; +} // namespace internal +PROTOBUF_NAMESPACE_CLOSE + +// Internal implementation detail -- do not use these members. +struct TableStruct_tensorflow_2fcore_2fprotobuf_2fworker_2eproto { + static const uint32_t offsets[]; +}; +extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_tensorflow_2fcore_2fprotobuf_2fworker_2eproto; +namespace tensorflow { +class CleanupAllRequest; +struct CleanupAllRequestDefaultTypeInternal; +extern CleanupAllRequestDefaultTypeInternal _CleanupAllRequest_default_instance_; +class CleanupAllResponse; +struct CleanupAllResponseDefaultTypeInternal; +extern CleanupAllResponseDefaultTypeInternal _CleanupAllResponse_default_instance_; +class CleanupGraphRequest; +struct CleanupGraphRequestDefaultTypeInternal; +extern CleanupGraphRequestDefaultTypeInternal _CleanupGraphRequest_default_instance_; +class CleanupGraphResponse; +struct CleanupGraphResponseDefaultTypeInternal; +extern CleanupGraphResponseDefaultTypeInternal _CleanupGraphResponse_default_instance_; +class CompleteGroupRequest; +struct CompleteGroupRequestDefaultTypeInternal; +extern CompleteGroupRequestDefaultTypeInternal _CompleteGroupRequest_default_instance_; +class CompleteGroupResponse; +struct CompleteGroupResponseDefaultTypeInternal; +extern CompleteGroupResponseDefaultTypeInternal _CompleteGroupResponse_default_instance_; +class CompleteInstanceRequest; +struct CompleteInstanceRequestDefaultTypeInternal; +extern CompleteInstanceRequestDefaultTypeInternal _CompleteInstanceRequest_default_instance_; +class CompleteInstanceResponse; +struct CompleteInstanceResponseDefaultTypeInternal; +extern CompleteInstanceResponseDefaultTypeInternal _CompleteInstanceResponse_default_instance_; +class CreateWorkerSessionRequest; +struct CreateWorkerSessionRequestDefaultTypeInternal; +extern CreateWorkerSessionRequestDefaultTypeInternal _CreateWorkerSessionRequest_default_instance_; +class CreateWorkerSessionResponse; +struct CreateWorkerSessionResponseDefaultTypeInternal; +extern CreateWorkerSessionResponseDefaultTypeInternal _CreateWorkerSessionResponse_default_instance_; +class DeleteWorkerSessionRequest; +struct DeleteWorkerSessionRequestDefaultTypeInternal; +extern DeleteWorkerSessionRequestDefaultTypeInternal _DeleteWorkerSessionRequest_default_instance_; +class DeleteWorkerSessionResponse; +struct DeleteWorkerSessionResponseDefaultTypeInternal; +extern DeleteWorkerSessionResponseDefaultTypeInternal _DeleteWorkerSessionResponse_default_instance_; +class DeregisterGraphRequest; +struct DeregisterGraphRequestDefaultTypeInternal; +extern DeregisterGraphRequestDefaultTypeInternal _DeregisterGraphRequest_default_instance_; +class DeregisterGraphResponse; +struct DeregisterGraphResponseDefaultTypeInternal; +extern DeregisterGraphResponseDefaultTypeInternal _DeregisterGraphResponse_default_instance_; +class ExecutorOpts; +struct ExecutorOptsDefaultTypeInternal; +extern ExecutorOptsDefaultTypeInternal _ExecutorOpts_default_instance_; +class GetStatusRequest; +struct GetStatusRequestDefaultTypeInternal; +extern GetStatusRequestDefaultTypeInternal _GetStatusRequest_default_instance_; +class GetStatusResponse; +struct GetStatusResponseDefaultTypeInternal; +extern GetStatusResponseDefaultTypeInternal _GetStatusResponse_default_instance_; +class GetStepSequenceRequest; +struct GetStepSequenceRequestDefaultTypeInternal; +extern GetStepSequenceRequestDefaultTypeInternal _GetStepSequenceRequest_default_instance_; +class GetStepSequenceResponse; +struct GetStepSequenceResponseDefaultTypeInternal; +extern GetStepSequenceResponseDefaultTypeInternal _GetStepSequenceResponse_default_instance_; +class LabeledStepStats; +struct LabeledStepStatsDefaultTypeInternal; +extern LabeledStepStatsDefaultTypeInternal _LabeledStepStats_default_instance_; +class LoggingRequest; +struct LoggingRequestDefaultTypeInternal; +extern LoggingRequestDefaultTypeInternal _LoggingRequest_default_instance_; +class LoggingResponse; +struct LoggingResponseDefaultTypeInternal; +extern LoggingResponseDefaultTypeInternal _LoggingResponse_default_instance_; +class MarkRecvFinishedRequest; +struct MarkRecvFinishedRequestDefaultTypeInternal; +extern MarkRecvFinishedRequestDefaultTypeInternal _MarkRecvFinishedRequest_default_instance_; +class MarkRecvFinishedResponse; +struct MarkRecvFinishedResponseDefaultTypeInternal; +extern MarkRecvFinishedResponseDefaultTypeInternal _MarkRecvFinishedResponse_default_instance_; +class RecvBufRequest; +struct RecvBufRequestDefaultTypeInternal; +extern RecvBufRequestDefaultTypeInternal _RecvBufRequest_default_instance_; +class RecvBufResponse; +struct RecvBufResponseDefaultTypeInternal; +extern RecvBufResponseDefaultTypeInternal _RecvBufResponse_default_instance_; +class RecvTensorRequest; +struct RecvTensorRequestDefaultTypeInternal; +extern RecvTensorRequestDefaultTypeInternal _RecvTensorRequest_default_instance_; +class RecvTensorResponse; +struct RecvTensorResponseDefaultTypeInternal; +extern RecvTensorResponseDefaultTypeInternal _RecvTensorResponse_default_instance_; +class RegisterGraphRequest; +struct RegisterGraphRequestDefaultTypeInternal; +extern RegisterGraphRequestDefaultTypeInternal _RegisterGraphRequest_default_instance_; +class RegisterGraphResponse; +struct RegisterGraphResponseDefaultTypeInternal; +extern RegisterGraphResponseDefaultTypeInternal _RegisterGraphResponse_default_instance_; +class RunGraphRequest; +struct RunGraphRequestDefaultTypeInternal; +extern RunGraphRequestDefaultTypeInternal _RunGraphRequest_default_instance_; +class RunGraphResponse; +struct RunGraphResponseDefaultTypeInternal; +extern RunGraphResponseDefaultTypeInternal _RunGraphResponse_default_instance_; +class StepSequence; +struct StepSequenceDefaultTypeInternal; +extern StepSequenceDefaultTypeInternal _StepSequence_default_instance_; +class TraceOpts; +struct TraceOptsDefaultTypeInternal; +extern TraceOptsDefaultTypeInternal _TraceOpts_default_instance_; +class TracingRequest; +struct TracingRequestDefaultTypeInternal; +extern TracingRequestDefaultTypeInternal _TracingRequest_default_instance_; +class TracingResponse; +struct TracingResponseDefaultTypeInternal; +extern TracingResponseDefaultTypeInternal _TracingResponse_default_instance_; +} // namespace tensorflow +PROTOBUF_NAMESPACE_OPEN +template<> ::tensorflow::CleanupAllRequest* Arena::CreateMaybeMessage<::tensorflow::CleanupAllRequest>(Arena*); +template<> ::tensorflow::CleanupAllResponse* Arena::CreateMaybeMessage<::tensorflow::CleanupAllResponse>(Arena*); +template<> ::tensorflow::CleanupGraphRequest* Arena::CreateMaybeMessage<::tensorflow::CleanupGraphRequest>(Arena*); +template<> ::tensorflow::CleanupGraphResponse* Arena::CreateMaybeMessage<::tensorflow::CleanupGraphResponse>(Arena*); +template<> ::tensorflow::CompleteGroupRequest* Arena::CreateMaybeMessage<::tensorflow::CompleteGroupRequest>(Arena*); +template<> ::tensorflow::CompleteGroupResponse* Arena::CreateMaybeMessage<::tensorflow::CompleteGroupResponse>(Arena*); +template<> ::tensorflow::CompleteInstanceRequest* Arena::CreateMaybeMessage<::tensorflow::CompleteInstanceRequest>(Arena*); +template<> ::tensorflow::CompleteInstanceResponse* Arena::CreateMaybeMessage<::tensorflow::CompleteInstanceResponse>(Arena*); +template<> ::tensorflow::CreateWorkerSessionRequest* Arena::CreateMaybeMessage<::tensorflow::CreateWorkerSessionRequest>(Arena*); +template<> ::tensorflow::CreateWorkerSessionResponse* Arena::CreateMaybeMessage<::tensorflow::CreateWorkerSessionResponse>(Arena*); +template<> ::tensorflow::DeleteWorkerSessionRequest* Arena::CreateMaybeMessage<::tensorflow::DeleteWorkerSessionRequest>(Arena*); +template<> ::tensorflow::DeleteWorkerSessionResponse* Arena::CreateMaybeMessage<::tensorflow::DeleteWorkerSessionResponse>(Arena*); +template<> ::tensorflow::DeregisterGraphRequest* Arena::CreateMaybeMessage<::tensorflow::DeregisterGraphRequest>(Arena*); +template<> ::tensorflow::DeregisterGraphResponse* Arena::CreateMaybeMessage<::tensorflow::DeregisterGraphResponse>(Arena*); +template<> ::tensorflow::ExecutorOpts* Arena::CreateMaybeMessage<::tensorflow::ExecutorOpts>(Arena*); +template<> ::tensorflow::GetStatusRequest* Arena::CreateMaybeMessage<::tensorflow::GetStatusRequest>(Arena*); +template<> ::tensorflow::GetStatusResponse* Arena::CreateMaybeMessage<::tensorflow::GetStatusResponse>(Arena*); +template<> ::tensorflow::GetStepSequenceRequest* Arena::CreateMaybeMessage<::tensorflow::GetStepSequenceRequest>(Arena*); +template<> ::tensorflow::GetStepSequenceResponse* Arena::CreateMaybeMessage<::tensorflow::GetStepSequenceResponse>(Arena*); +template<> ::tensorflow::LabeledStepStats* Arena::CreateMaybeMessage<::tensorflow::LabeledStepStats>(Arena*); +template<> ::tensorflow::LoggingRequest* Arena::CreateMaybeMessage<::tensorflow::LoggingRequest>(Arena*); +template<> ::tensorflow::LoggingResponse* Arena::CreateMaybeMessage<::tensorflow::LoggingResponse>(Arena*); +template<> ::tensorflow::MarkRecvFinishedRequest* Arena::CreateMaybeMessage<::tensorflow::MarkRecvFinishedRequest>(Arena*); +template<> ::tensorflow::MarkRecvFinishedResponse* Arena::CreateMaybeMessage<::tensorflow::MarkRecvFinishedResponse>(Arena*); +template<> ::tensorflow::RecvBufRequest* Arena::CreateMaybeMessage<::tensorflow::RecvBufRequest>(Arena*); +template<> ::tensorflow::RecvBufResponse* Arena::CreateMaybeMessage<::tensorflow::RecvBufResponse>(Arena*); +template<> ::tensorflow::RecvTensorRequest* Arena::CreateMaybeMessage<::tensorflow::RecvTensorRequest>(Arena*); +template<> ::tensorflow::RecvTensorResponse* Arena::CreateMaybeMessage<::tensorflow::RecvTensorResponse>(Arena*); +template<> ::tensorflow::RegisterGraphRequest* Arena::CreateMaybeMessage<::tensorflow::RegisterGraphRequest>(Arena*); +template<> ::tensorflow::RegisterGraphResponse* Arena::CreateMaybeMessage<::tensorflow::RegisterGraphResponse>(Arena*); +template<> ::tensorflow::RunGraphRequest* Arena::CreateMaybeMessage<::tensorflow::RunGraphRequest>(Arena*); +template<> ::tensorflow::RunGraphResponse* Arena::CreateMaybeMessage<::tensorflow::RunGraphResponse>(Arena*); +template<> ::tensorflow::StepSequence* Arena::CreateMaybeMessage<::tensorflow::StepSequence>(Arena*); +template<> ::tensorflow::TraceOpts* Arena::CreateMaybeMessage<::tensorflow::TraceOpts>(Arena*); +template<> ::tensorflow::TracingRequest* Arena::CreateMaybeMessage<::tensorflow::TracingRequest>(Arena*); +template<> ::tensorflow::TracingResponse* Arena::CreateMaybeMessage<::tensorflow::TracingResponse>(Arena*); +PROTOBUF_NAMESPACE_CLOSE +namespace tensorflow { + +// =================================================================== + +class GetStatusRequest final : + public ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase /* @@protoc_insertion_point(class_definition:tensorflow.GetStatusRequest) */ { + public: + inline GetStatusRequest() : GetStatusRequest(nullptr) {} + explicit PROTOBUF_CONSTEXPR GetStatusRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + GetStatusRequest(const GetStatusRequest& from); + GetStatusRequest(GetStatusRequest&& from) noexcept + : GetStatusRequest() { + *this = ::std::move(from); + } + + inline GetStatusRequest& operator=(const GetStatusRequest& from) { + CopyFrom(from); + return *this; + } + inline GetStatusRequest& operator=(GetStatusRequest&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const GetStatusRequest& default_instance() { + return *internal_default_instance(); + } + static inline const GetStatusRequest* internal_default_instance() { + return reinterpret_cast( + &_GetStatusRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 0; + + friend void swap(GetStatusRequest& a, GetStatusRequest& b) { + a.Swap(&b); + } + inline void Swap(GetStatusRequest* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(GetStatusRequest* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + GetStatusRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::CopyFrom; + inline void CopyFrom(const GetStatusRequest& from) { + ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::CopyImpl(*this, from); + } + using ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::MergeFrom; + void MergeFrom(const GetStatusRequest& from) { + ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::MergeImpl(*this, from); + } + public: + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.GetStatusRequest"; + } + protected: + explicit GetStatusRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // @@protoc_insertion_point(class_scope:tensorflow.GetStatusRequest) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fworker_2eproto; +}; +// ------------------------------------------------------------------- + +class GetStatusResponse final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.GetStatusResponse) */ { + public: + inline GetStatusResponse() : GetStatusResponse(nullptr) {} + ~GetStatusResponse() override; + explicit PROTOBUF_CONSTEXPR GetStatusResponse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + GetStatusResponse(const GetStatusResponse& from); + GetStatusResponse(GetStatusResponse&& from) noexcept + : GetStatusResponse() { + *this = ::std::move(from); + } + + inline GetStatusResponse& operator=(const GetStatusResponse& from) { + CopyFrom(from); + return *this; + } + inline GetStatusResponse& operator=(GetStatusResponse&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const GetStatusResponse& default_instance() { + return *internal_default_instance(); + } + static inline const GetStatusResponse* internal_default_instance() { + return reinterpret_cast( + &_GetStatusResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = + 1; + + friend void swap(GetStatusResponse& a, GetStatusResponse& b) { + a.Swap(&b); + } + inline void Swap(GetStatusResponse* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(GetStatusResponse* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + GetStatusResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const GetStatusResponse& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const GetStatusResponse& from) { + GetStatusResponse::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(GetStatusResponse* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.GetStatusResponse"; + } + protected: + explicit GetStatusResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kDeviceAttributesFieldNumber = 1, + }; + // repeated .tensorflow.DeviceAttributes device_attributes = 1; + int device_attributes_size() const; + private: + int _internal_device_attributes_size() const; + public: + void clear_device_attributes(); + ::tensorflow::DeviceAttributes* mutable_device_attributes(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::DeviceAttributes >* + mutable_device_attributes(); + private: + const ::tensorflow::DeviceAttributes& _internal_device_attributes(int index) const; + ::tensorflow::DeviceAttributes* _internal_add_device_attributes(); + public: + const ::tensorflow::DeviceAttributes& device_attributes(int index) const; + ::tensorflow::DeviceAttributes* add_device_attributes(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::DeviceAttributes >& + device_attributes() const; + + // @@protoc_insertion_point(class_scope:tensorflow.GetStatusResponse) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::DeviceAttributes > device_attributes_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fworker_2eproto; +}; +// ------------------------------------------------------------------- + +class CreateWorkerSessionRequest final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.CreateWorkerSessionRequest) */ { + public: + inline CreateWorkerSessionRequest() : CreateWorkerSessionRequest(nullptr) {} + ~CreateWorkerSessionRequest() override; + explicit PROTOBUF_CONSTEXPR CreateWorkerSessionRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + CreateWorkerSessionRequest(const CreateWorkerSessionRequest& from); + CreateWorkerSessionRequest(CreateWorkerSessionRequest&& from) noexcept + : CreateWorkerSessionRequest() { + *this = ::std::move(from); + } + + inline CreateWorkerSessionRequest& operator=(const CreateWorkerSessionRequest& from) { + CopyFrom(from); + return *this; + } + inline CreateWorkerSessionRequest& operator=(CreateWorkerSessionRequest&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const CreateWorkerSessionRequest& default_instance() { + return *internal_default_instance(); + } + static inline const CreateWorkerSessionRequest* internal_default_instance() { + return reinterpret_cast( + &_CreateWorkerSessionRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 2; + + friend void swap(CreateWorkerSessionRequest& a, CreateWorkerSessionRequest& b) { + a.Swap(&b); + } + inline void Swap(CreateWorkerSessionRequest* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(CreateWorkerSessionRequest* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + CreateWorkerSessionRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const CreateWorkerSessionRequest& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const CreateWorkerSessionRequest& from) { + CreateWorkerSessionRequest::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(CreateWorkerSessionRequest* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.CreateWorkerSessionRequest"; + } + protected: + explicit CreateWorkerSessionRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kClusterDeviceAttributesFieldNumber = 4, + kSessionHandleFieldNumber = 1, + kMasterTaskFieldNumber = 5, + kServerDefFieldNumber = 2, + kMasterIncarnationFieldNumber = 6, + kIsolateSessionStateFieldNumber = 3, + }; + // repeated .tensorflow.DeviceAttributes cluster_device_attributes = 4; + int cluster_device_attributes_size() const; + private: + int _internal_cluster_device_attributes_size() const; + public: + void clear_cluster_device_attributes(); + ::tensorflow::DeviceAttributes* mutable_cluster_device_attributes(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::DeviceAttributes >* + mutable_cluster_device_attributes(); + private: + const ::tensorflow::DeviceAttributes& _internal_cluster_device_attributes(int index) const; + ::tensorflow::DeviceAttributes* _internal_add_cluster_device_attributes(); + public: + const ::tensorflow::DeviceAttributes& cluster_device_attributes(int index) const; + ::tensorflow::DeviceAttributes* add_cluster_device_attributes(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::DeviceAttributes >& + cluster_device_attributes() const; + + // string session_handle = 1; + void clear_session_handle(); + const std::string& session_handle() const; + template + void set_session_handle(ArgT0&& arg0, ArgT... args); + std::string* mutable_session_handle(); + PROTOBUF_NODISCARD std::string* release_session_handle(); + void set_allocated_session_handle(std::string* session_handle); + private: + const std::string& _internal_session_handle() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_session_handle(const std::string& value); + std::string* _internal_mutable_session_handle(); + public: + + // string master_task = 5; + void clear_master_task(); + const std::string& master_task() const; + template + void set_master_task(ArgT0&& arg0, ArgT... args); + std::string* mutable_master_task(); + PROTOBUF_NODISCARD std::string* release_master_task(); + void set_allocated_master_task(std::string* master_task); + private: + const std::string& _internal_master_task() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_master_task(const std::string& value); + std::string* _internal_mutable_master_task(); + public: + + // .tensorflow.ServerDef server_def = 2; + bool has_server_def() const; + private: + bool _internal_has_server_def() const; + public: + void clear_server_def(); + const ::tensorflow::ServerDef& server_def() const; + PROTOBUF_NODISCARD ::tensorflow::ServerDef* release_server_def(); + ::tensorflow::ServerDef* mutable_server_def(); + void set_allocated_server_def(::tensorflow::ServerDef* server_def); + private: + const ::tensorflow::ServerDef& _internal_server_def() const; + ::tensorflow::ServerDef* _internal_mutable_server_def(); + public: + void unsafe_arena_set_allocated_server_def( + ::tensorflow::ServerDef* server_def); + ::tensorflow::ServerDef* unsafe_arena_release_server_def(); + + // int64 master_incarnation = 6; + void clear_master_incarnation(); + int64_t master_incarnation() const; + void set_master_incarnation(int64_t value); + private: + int64_t _internal_master_incarnation() const; + void _internal_set_master_incarnation(int64_t value); + public: + + // bool isolate_session_state = 3; + void clear_isolate_session_state(); + bool isolate_session_state() const; + void set_isolate_session_state(bool value); + private: + bool _internal_isolate_session_state() const; + void _internal_set_isolate_session_state(bool value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.CreateWorkerSessionRequest) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::DeviceAttributes > cluster_device_attributes_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr session_handle_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr master_task_; + ::tensorflow::ServerDef* server_def_; + int64_t master_incarnation_; + bool isolate_session_state_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fworker_2eproto; +}; +// ------------------------------------------------------------------- + +class CreateWorkerSessionResponse final : + public ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase /* @@protoc_insertion_point(class_definition:tensorflow.CreateWorkerSessionResponse) */ { + public: + inline CreateWorkerSessionResponse() : CreateWorkerSessionResponse(nullptr) {} + explicit PROTOBUF_CONSTEXPR CreateWorkerSessionResponse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + CreateWorkerSessionResponse(const CreateWorkerSessionResponse& from); + CreateWorkerSessionResponse(CreateWorkerSessionResponse&& from) noexcept + : CreateWorkerSessionResponse() { + *this = ::std::move(from); + } + + inline CreateWorkerSessionResponse& operator=(const CreateWorkerSessionResponse& from) { + CopyFrom(from); + return *this; + } + inline CreateWorkerSessionResponse& operator=(CreateWorkerSessionResponse&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const CreateWorkerSessionResponse& default_instance() { + return *internal_default_instance(); + } + static inline const CreateWorkerSessionResponse* internal_default_instance() { + return reinterpret_cast( + &_CreateWorkerSessionResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = + 3; + + friend void swap(CreateWorkerSessionResponse& a, CreateWorkerSessionResponse& b) { + a.Swap(&b); + } + inline void Swap(CreateWorkerSessionResponse* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(CreateWorkerSessionResponse* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + CreateWorkerSessionResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::CopyFrom; + inline void CopyFrom(const CreateWorkerSessionResponse& from) { + ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::CopyImpl(*this, from); + } + using ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::MergeFrom; + void MergeFrom(const CreateWorkerSessionResponse& from) { + ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::MergeImpl(*this, from); + } + public: + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.CreateWorkerSessionResponse"; + } + protected: + explicit CreateWorkerSessionResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // @@protoc_insertion_point(class_scope:tensorflow.CreateWorkerSessionResponse) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fworker_2eproto; +}; +// ------------------------------------------------------------------- + +class DeleteWorkerSessionRequest final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.DeleteWorkerSessionRequest) */ { + public: + inline DeleteWorkerSessionRequest() : DeleteWorkerSessionRequest(nullptr) {} + ~DeleteWorkerSessionRequest() override; + explicit PROTOBUF_CONSTEXPR DeleteWorkerSessionRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + DeleteWorkerSessionRequest(const DeleteWorkerSessionRequest& from); + DeleteWorkerSessionRequest(DeleteWorkerSessionRequest&& from) noexcept + : DeleteWorkerSessionRequest() { + *this = ::std::move(from); + } + + inline DeleteWorkerSessionRequest& operator=(const DeleteWorkerSessionRequest& from) { + CopyFrom(from); + return *this; + } + inline DeleteWorkerSessionRequest& operator=(DeleteWorkerSessionRequest&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const DeleteWorkerSessionRequest& default_instance() { + return *internal_default_instance(); + } + static inline const DeleteWorkerSessionRequest* internal_default_instance() { + return reinterpret_cast( + &_DeleteWorkerSessionRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 4; + + friend void swap(DeleteWorkerSessionRequest& a, DeleteWorkerSessionRequest& b) { + a.Swap(&b); + } + inline void Swap(DeleteWorkerSessionRequest* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(DeleteWorkerSessionRequest* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + DeleteWorkerSessionRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const DeleteWorkerSessionRequest& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const DeleteWorkerSessionRequest& from) { + DeleteWorkerSessionRequest::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(DeleteWorkerSessionRequest* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.DeleteWorkerSessionRequest"; + } + protected: + explicit DeleteWorkerSessionRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kSessionHandleFieldNumber = 1, + }; + // string session_handle = 1; + void clear_session_handle(); + const std::string& session_handle() const; + template + void set_session_handle(ArgT0&& arg0, ArgT... args); + std::string* mutable_session_handle(); + PROTOBUF_NODISCARD std::string* release_session_handle(); + void set_allocated_session_handle(std::string* session_handle); + private: + const std::string& _internal_session_handle() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_session_handle(const std::string& value); + std::string* _internal_mutable_session_handle(); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.DeleteWorkerSessionRequest) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr session_handle_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fworker_2eproto; +}; +// ------------------------------------------------------------------- + +class DeleteWorkerSessionResponse final : + public ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase /* @@protoc_insertion_point(class_definition:tensorflow.DeleteWorkerSessionResponse) */ { + public: + inline DeleteWorkerSessionResponse() : DeleteWorkerSessionResponse(nullptr) {} + explicit PROTOBUF_CONSTEXPR DeleteWorkerSessionResponse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + DeleteWorkerSessionResponse(const DeleteWorkerSessionResponse& from); + DeleteWorkerSessionResponse(DeleteWorkerSessionResponse&& from) noexcept + : DeleteWorkerSessionResponse() { + *this = ::std::move(from); + } + + inline DeleteWorkerSessionResponse& operator=(const DeleteWorkerSessionResponse& from) { + CopyFrom(from); + return *this; + } + inline DeleteWorkerSessionResponse& operator=(DeleteWorkerSessionResponse&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const DeleteWorkerSessionResponse& default_instance() { + return *internal_default_instance(); + } + static inline const DeleteWorkerSessionResponse* internal_default_instance() { + return reinterpret_cast( + &_DeleteWorkerSessionResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = + 5; + + friend void swap(DeleteWorkerSessionResponse& a, DeleteWorkerSessionResponse& b) { + a.Swap(&b); + } + inline void Swap(DeleteWorkerSessionResponse* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(DeleteWorkerSessionResponse* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + DeleteWorkerSessionResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::CopyFrom; + inline void CopyFrom(const DeleteWorkerSessionResponse& from) { + ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::CopyImpl(*this, from); + } + using ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::MergeFrom; + void MergeFrom(const DeleteWorkerSessionResponse& from) { + ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::MergeImpl(*this, from); + } + public: + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.DeleteWorkerSessionResponse"; + } + protected: + explicit DeleteWorkerSessionResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // @@protoc_insertion_point(class_scope:tensorflow.DeleteWorkerSessionResponse) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fworker_2eproto; +}; +// ------------------------------------------------------------------- + +class RegisterGraphRequest final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.RegisterGraphRequest) */ { + public: + inline RegisterGraphRequest() : RegisterGraphRequest(nullptr) {} + ~RegisterGraphRequest() override; + explicit PROTOBUF_CONSTEXPR RegisterGraphRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + RegisterGraphRequest(const RegisterGraphRequest& from); + RegisterGraphRequest(RegisterGraphRequest&& from) noexcept + : RegisterGraphRequest() { + *this = ::std::move(from); + } + + inline RegisterGraphRequest& operator=(const RegisterGraphRequest& from) { + CopyFrom(from); + return *this; + } + inline RegisterGraphRequest& operator=(RegisterGraphRequest&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const RegisterGraphRequest& default_instance() { + return *internal_default_instance(); + } + static inline const RegisterGraphRequest* internal_default_instance() { + return reinterpret_cast( + &_RegisterGraphRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 6; + + friend void swap(RegisterGraphRequest& a, RegisterGraphRequest& b) { + a.Swap(&b); + } + inline void Swap(RegisterGraphRequest* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(RegisterGraphRequest* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + RegisterGraphRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const RegisterGraphRequest& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const RegisterGraphRequest& from) { + RegisterGraphRequest::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(RegisterGraphRequest* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.RegisterGraphRequest"; + } + protected: + explicit RegisterGraphRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kSessionHandleFieldNumber = 1, + kGraphDefFieldNumber = 2, + kGraphOptionsFieldNumber = 4, + kDebugOptionsFieldNumber = 5, + kConfigProtoFieldNumber = 8, + kCollectiveGraphKeyFieldNumber = 7, + kCreateWorkerSessionCalledFieldNumber = 6, + kHasControlFlowFieldNumber = 3, + }; + // string session_handle = 1; + void clear_session_handle(); + const std::string& session_handle() const; + template + void set_session_handle(ArgT0&& arg0, ArgT... args); + std::string* mutable_session_handle(); + PROTOBUF_NODISCARD std::string* release_session_handle(); + void set_allocated_session_handle(std::string* session_handle); + private: + const std::string& _internal_session_handle() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_session_handle(const std::string& value); + std::string* _internal_mutable_session_handle(); + public: + + // .tensorflow.GraphDef graph_def = 2; + bool has_graph_def() const; + private: + bool _internal_has_graph_def() const; + public: + void clear_graph_def(); + const ::tensorflow::GraphDef& graph_def() const; + PROTOBUF_NODISCARD ::tensorflow::GraphDef* release_graph_def(); + ::tensorflow::GraphDef* mutable_graph_def(); + void set_allocated_graph_def(::tensorflow::GraphDef* graph_def); + private: + const ::tensorflow::GraphDef& _internal_graph_def() const; + ::tensorflow::GraphDef* _internal_mutable_graph_def(); + public: + void unsafe_arena_set_allocated_graph_def( + ::tensorflow::GraphDef* graph_def); + ::tensorflow::GraphDef* unsafe_arena_release_graph_def(); + + // .tensorflow.GraphOptions graph_options = 4; + bool has_graph_options() const; + private: + bool _internal_has_graph_options() const; + public: + void clear_graph_options(); + const ::tensorflow::GraphOptions& graph_options() const; + PROTOBUF_NODISCARD ::tensorflow::GraphOptions* release_graph_options(); + ::tensorflow::GraphOptions* mutable_graph_options(); + void set_allocated_graph_options(::tensorflow::GraphOptions* graph_options); + private: + const ::tensorflow::GraphOptions& _internal_graph_options() const; + ::tensorflow::GraphOptions* _internal_mutable_graph_options(); + public: + void unsafe_arena_set_allocated_graph_options( + ::tensorflow::GraphOptions* graph_options); + ::tensorflow::GraphOptions* unsafe_arena_release_graph_options(); + + // .tensorflow.DebugOptions debug_options = 5; + bool has_debug_options() const; + private: + bool _internal_has_debug_options() const; + public: + void clear_debug_options(); + const ::tensorflow::DebugOptions& debug_options() const; + PROTOBUF_NODISCARD ::tensorflow::DebugOptions* release_debug_options(); + ::tensorflow::DebugOptions* mutable_debug_options(); + void set_allocated_debug_options(::tensorflow::DebugOptions* debug_options); + private: + const ::tensorflow::DebugOptions& _internal_debug_options() const; + ::tensorflow::DebugOptions* _internal_mutable_debug_options(); + public: + void unsafe_arena_set_allocated_debug_options( + ::tensorflow::DebugOptions* debug_options); + ::tensorflow::DebugOptions* unsafe_arena_release_debug_options(); + + // .tensorflow.ConfigProto config_proto = 8; + bool has_config_proto() const; + private: + bool _internal_has_config_proto() const; + public: + void clear_config_proto(); + const ::tensorflow::ConfigProto& config_proto() const; + PROTOBUF_NODISCARD ::tensorflow::ConfigProto* release_config_proto(); + ::tensorflow::ConfigProto* mutable_config_proto(); + void set_allocated_config_proto(::tensorflow::ConfigProto* config_proto); + private: + const ::tensorflow::ConfigProto& _internal_config_proto() const; + ::tensorflow::ConfigProto* _internal_mutable_config_proto(); + public: + void unsafe_arena_set_allocated_config_proto( + ::tensorflow::ConfigProto* config_proto); + ::tensorflow::ConfigProto* unsafe_arena_release_config_proto(); + + // int64 collective_graph_key = 7; + void clear_collective_graph_key(); + int64_t collective_graph_key() const; + void set_collective_graph_key(int64_t value); + private: + int64_t _internal_collective_graph_key() const; + void _internal_set_collective_graph_key(int64_t value); + public: + + // bool create_worker_session_called = 6; + void clear_create_worker_session_called(); + bool create_worker_session_called() const; + void set_create_worker_session_called(bool value); + private: + bool _internal_create_worker_session_called() const; + void _internal_set_create_worker_session_called(bool value); + public: + + // bool has_control_flow = 3 [deprecated = true]; + PROTOBUF_DEPRECATED void clear_has_control_flow(); + PROTOBUF_DEPRECATED bool has_control_flow() const; + PROTOBUF_DEPRECATED void set_has_control_flow(bool value); + private: + bool _internal_has_control_flow() const; + void _internal_set_has_control_flow(bool value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.RegisterGraphRequest) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr session_handle_; + ::tensorflow::GraphDef* graph_def_; + ::tensorflow::GraphOptions* graph_options_; + ::tensorflow::DebugOptions* debug_options_; + ::tensorflow::ConfigProto* config_proto_; + int64_t collective_graph_key_; + bool create_worker_session_called_; + bool has_control_flow_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fworker_2eproto; +}; +// ------------------------------------------------------------------- + +class RegisterGraphResponse final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.RegisterGraphResponse) */ { + public: + inline RegisterGraphResponse() : RegisterGraphResponse(nullptr) {} + ~RegisterGraphResponse() override; + explicit PROTOBUF_CONSTEXPR RegisterGraphResponse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + RegisterGraphResponse(const RegisterGraphResponse& from); + RegisterGraphResponse(RegisterGraphResponse&& from) noexcept + : RegisterGraphResponse() { + *this = ::std::move(from); + } + + inline RegisterGraphResponse& operator=(const RegisterGraphResponse& from) { + CopyFrom(from); + return *this; + } + inline RegisterGraphResponse& operator=(RegisterGraphResponse&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const RegisterGraphResponse& default_instance() { + return *internal_default_instance(); + } + static inline const RegisterGraphResponse* internal_default_instance() { + return reinterpret_cast( + &_RegisterGraphResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = + 7; + + friend void swap(RegisterGraphResponse& a, RegisterGraphResponse& b) { + a.Swap(&b); + } + inline void Swap(RegisterGraphResponse* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(RegisterGraphResponse* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + RegisterGraphResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const RegisterGraphResponse& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const RegisterGraphResponse& from) { + RegisterGraphResponse::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(RegisterGraphResponse* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.RegisterGraphResponse"; + } + protected: + explicit RegisterGraphResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kGraphHandleFieldNumber = 1, + }; + // string graph_handle = 1; + void clear_graph_handle(); + const std::string& graph_handle() const; + template + void set_graph_handle(ArgT0&& arg0, ArgT... args); + std::string* mutable_graph_handle(); + PROTOBUF_NODISCARD std::string* release_graph_handle(); + void set_allocated_graph_handle(std::string* graph_handle); + private: + const std::string& _internal_graph_handle() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_graph_handle(const std::string& value); + std::string* _internal_mutable_graph_handle(); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.RegisterGraphResponse) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr graph_handle_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fworker_2eproto; +}; +// ------------------------------------------------------------------- + +class DeregisterGraphRequest final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.DeregisterGraphRequest) */ { + public: + inline DeregisterGraphRequest() : DeregisterGraphRequest(nullptr) {} + ~DeregisterGraphRequest() override; + explicit PROTOBUF_CONSTEXPR DeregisterGraphRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + DeregisterGraphRequest(const DeregisterGraphRequest& from); + DeregisterGraphRequest(DeregisterGraphRequest&& from) noexcept + : DeregisterGraphRequest() { + *this = ::std::move(from); + } + + inline DeregisterGraphRequest& operator=(const DeregisterGraphRequest& from) { + CopyFrom(from); + return *this; + } + inline DeregisterGraphRequest& operator=(DeregisterGraphRequest&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const DeregisterGraphRequest& default_instance() { + return *internal_default_instance(); + } + static inline const DeregisterGraphRequest* internal_default_instance() { + return reinterpret_cast( + &_DeregisterGraphRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 8; + + friend void swap(DeregisterGraphRequest& a, DeregisterGraphRequest& b) { + a.Swap(&b); + } + inline void Swap(DeregisterGraphRequest* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(DeregisterGraphRequest* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + DeregisterGraphRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const DeregisterGraphRequest& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const DeregisterGraphRequest& from) { + DeregisterGraphRequest::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(DeregisterGraphRequest* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.DeregisterGraphRequest"; + } + protected: + explicit DeregisterGraphRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kGraphHandleFieldNumber = 1, + kSessionHandleFieldNumber = 2, + kCreateWorkerSessionCalledFieldNumber = 3, + }; + // string graph_handle = 1; + void clear_graph_handle(); + const std::string& graph_handle() const; + template + void set_graph_handle(ArgT0&& arg0, ArgT... args); + std::string* mutable_graph_handle(); + PROTOBUF_NODISCARD std::string* release_graph_handle(); + void set_allocated_graph_handle(std::string* graph_handle); + private: + const std::string& _internal_graph_handle() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_graph_handle(const std::string& value); + std::string* _internal_mutable_graph_handle(); + public: + + // string session_handle = 2; + void clear_session_handle(); + const std::string& session_handle() const; + template + void set_session_handle(ArgT0&& arg0, ArgT... args); + std::string* mutable_session_handle(); + PROTOBUF_NODISCARD std::string* release_session_handle(); + void set_allocated_session_handle(std::string* session_handle); + private: + const std::string& _internal_session_handle() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_session_handle(const std::string& value); + std::string* _internal_mutable_session_handle(); + public: + + // bool create_worker_session_called = 3; + void clear_create_worker_session_called(); + bool create_worker_session_called() const; + void set_create_worker_session_called(bool value); + private: + bool _internal_create_worker_session_called() const; + void _internal_set_create_worker_session_called(bool value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.DeregisterGraphRequest) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr graph_handle_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr session_handle_; + bool create_worker_session_called_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fworker_2eproto; +}; +// ------------------------------------------------------------------- + +class DeregisterGraphResponse final : + public ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase /* @@protoc_insertion_point(class_definition:tensorflow.DeregisterGraphResponse) */ { + public: + inline DeregisterGraphResponse() : DeregisterGraphResponse(nullptr) {} + explicit PROTOBUF_CONSTEXPR DeregisterGraphResponse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + DeregisterGraphResponse(const DeregisterGraphResponse& from); + DeregisterGraphResponse(DeregisterGraphResponse&& from) noexcept + : DeregisterGraphResponse() { + *this = ::std::move(from); + } + + inline DeregisterGraphResponse& operator=(const DeregisterGraphResponse& from) { + CopyFrom(from); + return *this; + } + inline DeregisterGraphResponse& operator=(DeregisterGraphResponse&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const DeregisterGraphResponse& default_instance() { + return *internal_default_instance(); + } + static inline const DeregisterGraphResponse* internal_default_instance() { + return reinterpret_cast( + &_DeregisterGraphResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = + 9; + + friend void swap(DeregisterGraphResponse& a, DeregisterGraphResponse& b) { + a.Swap(&b); + } + inline void Swap(DeregisterGraphResponse* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(DeregisterGraphResponse* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + DeregisterGraphResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::CopyFrom; + inline void CopyFrom(const DeregisterGraphResponse& from) { + ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::CopyImpl(*this, from); + } + using ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::MergeFrom; + void MergeFrom(const DeregisterGraphResponse& from) { + ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::MergeImpl(*this, from); + } + public: + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.DeregisterGraphResponse"; + } + protected: + explicit DeregisterGraphResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // @@protoc_insertion_point(class_scope:tensorflow.DeregisterGraphResponse) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fworker_2eproto; +}; +// ------------------------------------------------------------------- + +class CleanupAllRequest final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.CleanupAllRequest) */ { + public: + inline CleanupAllRequest() : CleanupAllRequest(nullptr) {} + ~CleanupAllRequest() override; + explicit PROTOBUF_CONSTEXPR CleanupAllRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + CleanupAllRequest(const CleanupAllRequest& from); + CleanupAllRequest(CleanupAllRequest&& from) noexcept + : CleanupAllRequest() { + *this = ::std::move(from); + } + + inline CleanupAllRequest& operator=(const CleanupAllRequest& from) { + CopyFrom(from); + return *this; + } + inline CleanupAllRequest& operator=(CleanupAllRequest&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const CleanupAllRequest& default_instance() { + return *internal_default_instance(); + } + static inline const CleanupAllRequest* internal_default_instance() { + return reinterpret_cast( + &_CleanupAllRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 10; + + friend void swap(CleanupAllRequest& a, CleanupAllRequest& b) { + a.Swap(&b); + } + inline void Swap(CleanupAllRequest* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(CleanupAllRequest* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + CleanupAllRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const CleanupAllRequest& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const CleanupAllRequest& from) { + CleanupAllRequest::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(CleanupAllRequest* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.CleanupAllRequest"; + } + protected: + explicit CleanupAllRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kContainerFieldNumber = 1, + }; + // repeated string container = 1; + int container_size() const; + private: + int _internal_container_size() const; + public: + void clear_container(); + const std::string& container(int index) const; + std::string* mutable_container(int index); + void set_container(int index, const std::string& value); + void set_container(int index, std::string&& value); + void set_container(int index, const char* value); + void set_container(int index, const char* value, size_t size); + std::string* add_container(); + void add_container(const std::string& value); + void add_container(std::string&& value); + void add_container(const char* value); + void add_container(const char* value, size_t size); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& container() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* mutable_container(); + private: + const std::string& _internal_container(int index) const; + std::string* _internal_add_container(); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.CleanupAllRequest) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField container_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fworker_2eproto; +}; +// ------------------------------------------------------------------- + +class CleanupAllResponse final : + public ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase /* @@protoc_insertion_point(class_definition:tensorflow.CleanupAllResponse) */ { + public: + inline CleanupAllResponse() : CleanupAllResponse(nullptr) {} + explicit PROTOBUF_CONSTEXPR CleanupAllResponse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + CleanupAllResponse(const CleanupAllResponse& from); + CleanupAllResponse(CleanupAllResponse&& from) noexcept + : CleanupAllResponse() { + *this = ::std::move(from); + } + + inline CleanupAllResponse& operator=(const CleanupAllResponse& from) { + CopyFrom(from); + return *this; + } + inline CleanupAllResponse& operator=(CleanupAllResponse&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const CleanupAllResponse& default_instance() { + return *internal_default_instance(); + } + static inline const CleanupAllResponse* internal_default_instance() { + return reinterpret_cast( + &_CleanupAllResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = + 11; + + friend void swap(CleanupAllResponse& a, CleanupAllResponse& b) { + a.Swap(&b); + } + inline void Swap(CleanupAllResponse* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(CleanupAllResponse* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + CleanupAllResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::CopyFrom; + inline void CopyFrom(const CleanupAllResponse& from) { + ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::CopyImpl(*this, from); + } + using ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::MergeFrom; + void MergeFrom(const CleanupAllResponse& from) { + ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::MergeImpl(*this, from); + } + public: + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.CleanupAllResponse"; + } + protected: + explicit CleanupAllResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // @@protoc_insertion_point(class_scope:tensorflow.CleanupAllResponse) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fworker_2eproto; +}; +// ------------------------------------------------------------------- + +class ExecutorOpts final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.ExecutorOpts) */ { + public: + inline ExecutorOpts() : ExecutorOpts(nullptr) {} + ~ExecutorOpts() override; + explicit PROTOBUF_CONSTEXPR ExecutorOpts(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + ExecutorOpts(const ExecutorOpts& from); + ExecutorOpts(ExecutorOpts&& from) noexcept + : ExecutorOpts() { + *this = ::std::move(from); + } + + inline ExecutorOpts& operator=(const ExecutorOpts& from) { + CopyFrom(from); + return *this; + } + inline ExecutorOpts& operator=(ExecutorOpts&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const ExecutorOpts& default_instance() { + return *internal_default_instance(); + } + static inline const ExecutorOpts* internal_default_instance() { + return reinterpret_cast( + &_ExecutorOpts_default_instance_); + } + static constexpr int kIndexInFileMessages = + 12; + + friend void swap(ExecutorOpts& a, ExecutorOpts& b) { + a.Swap(&b); + } + inline void Swap(ExecutorOpts* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(ExecutorOpts* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + ExecutorOpts* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const ExecutorOpts& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const ExecutorOpts& from) { + ExecutorOpts::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(ExecutorOpts* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.ExecutorOpts"; + } + protected: + explicit ExecutorOpts(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kRecordCostsFieldNumber = 1, + kRecordTimelineFieldNumber = 3, + kRecordPartitionGraphsFieldNumber = 4, + kReportTensorAllocationsUponOomFieldNumber = 5, + }; + // bool record_costs = 1; + void clear_record_costs(); + bool record_costs() const; + void set_record_costs(bool value); + private: + bool _internal_record_costs() const; + void _internal_set_record_costs(bool value); + public: + + // bool record_timeline = 3; + void clear_record_timeline(); + bool record_timeline() const; + void set_record_timeline(bool value); + private: + bool _internal_record_timeline() const; + void _internal_set_record_timeline(bool value); + public: + + // bool record_partition_graphs = 4; + void clear_record_partition_graphs(); + bool record_partition_graphs() const; + void set_record_partition_graphs(bool value); + private: + bool _internal_record_partition_graphs() const; + void _internal_set_record_partition_graphs(bool value); + public: + + // bool report_tensor_allocations_upon_oom = 5; + void clear_report_tensor_allocations_upon_oom(); + bool report_tensor_allocations_upon_oom() const; + void set_report_tensor_allocations_upon_oom(bool value); + private: + bool _internal_report_tensor_allocations_upon_oom() const; + void _internal_set_report_tensor_allocations_upon_oom(bool value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.ExecutorOpts) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + bool record_costs_; + bool record_timeline_; + bool record_partition_graphs_; + bool report_tensor_allocations_upon_oom_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fworker_2eproto; +}; +// ------------------------------------------------------------------- + +class RunGraphRequest final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.RunGraphRequest) */ { + public: + inline RunGraphRequest() : RunGraphRequest(nullptr) {} + ~RunGraphRequest() override; + explicit PROTOBUF_CONSTEXPR RunGraphRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + RunGraphRequest(const RunGraphRequest& from); + RunGraphRequest(RunGraphRequest&& from) noexcept + : RunGraphRequest() { + *this = ::std::move(from); + } + + inline RunGraphRequest& operator=(const RunGraphRequest& from) { + CopyFrom(from); + return *this; + } + inline RunGraphRequest& operator=(RunGraphRequest&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const RunGraphRequest& default_instance() { + return *internal_default_instance(); + } + static inline const RunGraphRequest* internal_default_instance() { + return reinterpret_cast( + &_RunGraphRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 13; + + friend void swap(RunGraphRequest& a, RunGraphRequest& b) { + a.Swap(&b); + } + inline void Swap(RunGraphRequest* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(RunGraphRequest* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + RunGraphRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const RunGraphRequest& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const RunGraphRequest& from) { + RunGraphRequest::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(RunGraphRequest* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.RunGraphRequest"; + } + protected: + explicit RunGraphRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kSendFieldNumber = 3, + kRecvKeyFieldNumber = 4, + kGraphHandleFieldNumber = 1, + kSessionHandleFieldNumber = 8, + kExecOptsFieldNumber = 5, + kStepIdFieldNumber = 2, + kRequestIdFieldNumber = 11, + kCreateWorkerSessionCalledFieldNumber = 10, + kIsPartialFieldNumber = 6, + kIsLastPartialRunFieldNumber = 7, + kStoreErrorsInResponseBodyFieldNumber = 9, + }; + // repeated .tensorflow.NamedTensorProto send = 3; + int send_size() const; + private: + int _internal_send_size() const; + public: + void clear_send(); + ::tensorflow::NamedTensorProto* mutable_send(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::NamedTensorProto >* + mutable_send(); + private: + const ::tensorflow::NamedTensorProto& _internal_send(int index) const; + ::tensorflow::NamedTensorProto* _internal_add_send(); + public: + const ::tensorflow::NamedTensorProto& send(int index) const; + ::tensorflow::NamedTensorProto* add_send(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::NamedTensorProto >& + send() const; + + // repeated string recv_key = 4; + int recv_key_size() const; + private: + int _internal_recv_key_size() const; + public: + void clear_recv_key(); + const std::string& recv_key(int index) const; + std::string* mutable_recv_key(int index); + void set_recv_key(int index, const std::string& value); + void set_recv_key(int index, std::string&& value); + void set_recv_key(int index, const char* value); + void set_recv_key(int index, const char* value, size_t size); + std::string* add_recv_key(); + void add_recv_key(const std::string& value); + void add_recv_key(std::string&& value); + void add_recv_key(const char* value); + void add_recv_key(const char* value, size_t size); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& recv_key() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* mutable_recv_key(); + private: + const std::string& _internal_recv_key(int index) const; + std::string* _internal_add_recv_key(); + public: + + // string graph_handle = 1; + void clear_graph_handle(); + const std::string& graph_handle() const; + template + void set_graph_handle(ArgT0&& arg0, ArgT... args); + std::string* mutable_graph_handle(); + PROTOBUF_NODISCARD std::string* release_graph_handle(); + void set_allocated_graph_handle(std::string* graph_handle); + private: + const std::string& _internal_graph_handle() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_graph_handle(const std::string& value); + std::string* _internal_mutable_graph_handle(); + public: + + // string session_handle = 8; + void clear_session_handle(); + const std::string& session_handle() const; + template + void set_session_handle(ArgT0&& arg0, ArgT... args); + std::string* mutable_session_handle(); + PROTOBUF_NODISCARD std::string* release_session_handle(); + void set_allocated_session_handle(std::string* session_handle); + private: + const std::string& _internal_session_handle() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_session_handle(const std::string& value); + std::string* _internal_mutable_session_handle(); + public: + + // .tensorflow.ExecutorOpts exec_opts = 5; + bool has_exec_opts() const; + private: + bool _internal_has_exec_opts() const; + public: + void clear_exec_opts(); + const ::tensorflow::ExecutorOpts& exec_opts() const; + PROTOBUF_NODISCARD ::tensorflow::ExecutorOpts* release_exec_opts(); + ::tensorflow::ExecutorOpts* mutable_exec_opts(); + void set_allocated_exec_opts(::tensorflow::ExecutorOpts* exec_opts); + private: + const ::tensorflow::ExecutorOpts& _internal_exec_opts() const; + ::tensorflow::ExecutorOpts* _internal_mutable_exec_opts(); + public: + void unsafe_arena_set_allocated_exec_opts( + ::tensorflow::ExecutorOpts* exec_opts); + ::tensorflow::ExecutorOpts* unsafe_arena_release_exec_opts(); + + // int64 step_id = 2; + void clear_step_id(); + int64_t step_id() const; + void set_step_id(int64_t value); + private: + int64_t _internal_step_id() const; + void _internal_set_step_id(int64_t value); + public: + + // int64 request_id = 11; + void clear_request_id(); + int64_t request_id() const; + void set_request_id(int64_t value); + private: + int64_t _internal_request_id() const; + void _internal_set_request_id(int64_t value); + public: + + // bool create_worker_session_called = 10; + void clear_create_worker_session_called(); + bool create_worker_session_called() const; + void set_create_worker_session_called(bool value); + private: + bool _internal_create_worker_session_called() const; + void _internal_set_create_worker_session_called(bool value); + public: + + // bool is_partial = 6; + void clear_is_partial(); + bool is_partial() const; + void set_is_partial(bool value); + private: + bool _internal_is_partial() const; + void _internal_set_is_partial(bool value); + public: + + // bool is_last_partial_run = 7; + void clear_is_last_partial_run(); + bool is_last_partial_run() const; + void set_is_last_partial_run(bool value); + private: + bool _internal_is_last_partial_run() const; + void _internal_set_is_last_partial_run(bool value); + public: + + // bool store_errors_in_response_body = 9; + void clear_store_errors_in_response_body(); + bool store_errors_in_response_body() const; + void set_store_errors_in_response_body(bool value); + private: + bool _internal_store_errors_in_response_body() const; + void _internal_set_store_errors_in_response_body(bool value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.RunGraphRequest) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::NamedTensorProto > send_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField recv_key_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr graph_handle_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr session_handle_; + ::tensorflow::ExecutorOpts* exec_opts_; + int64_t step_id_; + int64_t request_id_; + bool create_worker_session_called_; + bool is_partial_; + bool is_last_partial_run_; + bool store_errors_in_response_body_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fworker_2eproto; +}; +// ------------------------------------------------------------------- + +class RunGraphResponse final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.RunGraphResponse) */ { + public: + inline RunGraphResponse() : RunGraphResponse(nullptr) {} + ~RunGraphResponse() override; + explicit PROTOBUF_CONSTEXPR RunGraphResponse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + RunGraphResponse(const RunGraphResponse& from); + RunGraphResponse(RunGraphResponse&& from) noexcept + : RunGraphResponse() { + *this = ::std::move(from); + } + + inline RunGraphResponse& operator=(const RunGraphResponse& from) { + CopyFrom(from); + return *this; + } + inline RunGraphResponse& operator=(RunGraphResponse&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const RunGraphResponse& default_instance() { + return *internal_default_instance(); + } + static inline const RunGraphResponse* internal_default_instance() { + return reinterpret_cast( + &_RunGraphResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = + 14; + + friend void swap(RunGraphResponse& a, RunGraphResponse& b) { + a.Swap(&b); + } + inline void Swap(RunGraphResponse* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(RunGraphResponse* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + RunGraphResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const RunGraphResponse& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const RunGraphResponse& from) { + RunGraphResponse::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(RunGraphResponse* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.RunGraphResponse"; + } + protected: + explicit RunGraphResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kRecvFieldNumber = 1, + kPartitionGraphFieldNumber = 4, + kStatusErrorMessageFieldNumber = 6, + kStepStatsFieldNumber = 2, + kCostGraphFieldNumber = 3, + kStatusCodeFieldNumber = 5, + }; + // repeated .tensorflow.NamedTensorProto recv = 1; + int recv_size() const; + private: + int _internal_recv_size() const; + public: + void clear_recv(); + ::tensorflow::NamedTensorProto* mutable_recv(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::NamedTensorProto >* + mutable_recv(); + private: + const ::tensorflow::NamedTensorProto& _internal_recv(int index) const; + ::tensorflow::NamedTensorProto* _internal_add_recv(); + public: + const ::tensorflow::NamedTensorProto& recv(int index) const; + ::tensorflow::NamedTensorProto* add_recv(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::NamedTensorProto >& + recv() const; + + // repeated .tensorflow.GraphDef partition_graph = 4; + int partition_graph_size() const; + private: + int _internal_partition_graph_size() const; + public: + void clear_partition_graph(); + ::tensorflow::GraphDef* mutable_partition_graph(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::GraphDef >* + mutable_partition_graph(); + private: + const ::tensorflow::GraphDef& _internal_partition_graph(int index) const; + ::tensorflow::GraphDef* _internal_add_partition_graph(); + public: + const ::tensorflow::GraphDef& partition_graph(int index) const; + ::tensorflow::GraphDef* add_partition_graph(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::GraphDef >& + partition_graph() const; + + // string status_error_message = 6; + void clear_status_error_message(); + const std::string& status_error_message() const; + template + void set_status_error_message(ArgT0&& arg0, ArgT... args); + std::string* mutable_status_error_message(); + PROTOBUF_NODISCARD std::string* release_status_error_message(); + void set_allocated_status_error_message(std::string* status_error_message); + private: + const std::string& _internal_status_error_message() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_status_error_message(const std::string& value); + std::string* _internal_mutable_status_error_message(); + public: + + // .tensorflow.StepStats step_stats = 2; + bool has_step_stats() const; + private: + bool _internal_has_step_stats() const; + public: + void clear_step_stats(); + const ::tensorflow::StepStats& step_stats() const; + PROTOBUF_NODISCARD ::tensorflow::StepStats* release_step_stats(); + ::tensorflow::StepStats* mutable_step_stats(); + void set_allocated_step_stats(::tensorflow::StepStats* step_stats); + private: + const ::tensorflow::StepStats& _internal_step_stats() const; + ::tensorflow::StepStats* _internal_mutable_step_stats(); + public: + void unsafe_arena_set_allocated_step_stats( + ::tensorflow::StepStats* step_stats); + ::tensorflow::StepStats* unsafe_arena_release_step_stats(); + + // .tensorflow.CostGraphDef cost_graph = 3; + bool has_cost_graph() const; + private: + bool _internal_has_cost_graph() const; + public: + void clear_cost_graph(); + const ::tensorflow::CostGraphDef& cost_graph() const; + PROTOBUF_NODISCARD ::tensorflow::CostGraphDef* release_cost_graph(); + ::tensorflow::CostGraphDef* mutable_cost_graph(); + void set_allocated_cost_graph(::tensorflow::CostGraphDef* cost_graph); + private: + const ::tensorflow::CostGraphDef& _internal_cost_graph() const; + ::tensorflow::CostGraphDef* _internal_mutable_cost_graph(); + public: + void unsafe_arena_set_allocated_cost_graph( + ::tensorflow::CostGraphDef* cost_graph); + ::tensorflow::CostGraphDef* unsafe_arena_release_cost_graph(); + + // .tensorflow.error.Code status_code = 5; + void clear_status_code(); + ::tensorflow::error::Code status_code() const; + void set_status_code(::tensorflow::error::Code value); + private: + ::tensorflow::error::Code _internal_status_code() const; + void _internal_set_status_code(::tensorflow::error::Code value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.RunGraphResponse) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::NamedTensorProto > recv_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::GraphDef > partition_graph_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr status_error_message_; + ::tensorflow::StepStats* step_stats_; + ::tensorflow::CostGraphDef* cost_graph_; + int status_code_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fworker_2eproto; +}; +// ------------------------------------------------------------------- + +class CleanupGraphRequest final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.CleanupGraphRequest) */ { + public: + inline CleanupGraphRequest() : CleanupGraphRequest(nullptr) {} + ~CleanupGraphRequest() override; + explicit PROTOBUF_CONSTEXPR CleanupGraphRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + CleanupGraphRequest(const CleanupGraphRequest& from); + CleanupGraphRequest(CleanupGraphRequest&& from) noexcept + : CleanupGraphRequest() { + *this = ::std::move(from); + } + + inline CleanupGraphRequest& operator=(const CleanupGraphRequest& from) { + CopyFrom(from); + return *this; + } + inline CleanupGraphRequest& operator=(CleanupGraphRequest&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const CleanupGraphRequest& default_instance() { + return *internal_default_instance(); + } + static inline const CleanupGraphRequest* internal_default_instance() { + return reinterpret_cast( + &_CleanupGraphRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 15; + + friend void swap(CleanupGraphRequest& a, CleanupGraphRequest& b) { + a.Swap(&b); + } + inline void Swap(CleanupGraphRequest* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(CleanupGraphRequest* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + CleanupGraphRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const CleanupGraphRequest& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const CleanupGraphRequest& from) { + CleanupGraphRequest::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(CleanupGraphRequest* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.CleanupGraphRequest"; + } + protected: + explicit CleanupGraphRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kStepIdFieldNumber = 1, + }; + // int64 step_id = 1; + void clear_step_id(); + int64_t step_id() const; + void set_step_id(int64_t value); + private: + int64_t _internal_step_id() const; + void _internal_set_step_id(int64_t value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.CleanupGraphRequest) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + int64_t step_id_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fworker_2eproto; +}; +// ------------------------------------------------------------------- + +class CleanupGraphResponse final : + public ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase /* @@protoc_insertion_point(class_definition:tensorflow.CleanupGraphResponse) */ { + public: + inline CleanupGraphResponse() : CleanupGraphResponse(nullptr) {} + explicit PROTOBUF_CONSTEXPR CleanupGraphResponse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + CleanupGraphResponse(const CleanupGraphResponse& from); + CleanupGraphResponse(CleanupGraphResponse&& from) noexcept + : CleanupGraphResponse() { + *this = ::std::move(from); + } + + inline CleanupGraphResponse& operator=(const CleanupGraphResponse& from) { + CopyFrom(from); + return *this; + } + inline CleanupGraphResponse& operator=(CleanupGraphResponse&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const CleanupGraphResponse& default_instance() { + return *internal_default_instance(); + } + static inline const CleanupGraphResponse* internal_default_instance() { + return reinterpret_cast( + &_CleanupGraphResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = + 16; + + friend void swap(CleanupGraphResponse& a, CleanupGraphResponse& b) { + a.Swap(&b); + } + inline void Swap(CleanupGraphResponse* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(CleanupGraphResponse* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + CleanupGraphResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::CopyFrom; + inline void CopyFrom(const CleanupGraphResponse& from) { + ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::CopyImpl(*this, from); + } + using ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::MergeFrom; + void MergeFrom(const CleanupGraphResponse& from) { + ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::MergeImpl(*this, from); + } + public: + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.CleanupGraphResponse"; + } + protected: + explicit CleanupGraphResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // @@protoc_insertion_point(class_scope:tensorflow.CleanupGraphResponse) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fworker_2eproto; +}; +// ------------------------------------------------------------------- + +class RecvTensorRequest final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.RecvTensorRequest) */ { + public: + inline RecvTensorRequest() : RecvTensorRequest(nullptr) {} + ~RecvTensorRequest() override; + explicit PROTOBUF_CONSTEXPR RecvTensorRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + RecvTensorRequest(const RecvTensorRequest& from); + RecvTensorRequest(RecvTensorRequest&& from) noexcept + : RecvTensorRequest() { + *this = ::std::move(from); + } + + inline RecvTensorRequest& operator=(const RecvTensorRequest& from) { + CopyFrom(from); + return *this; + } + inline RecvTensorRequest& operator=(RecvTensorRequest&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const RecvTensorRequest& default_instance() { + return *internal_default_instance(); + } + static inline const RecvTensorRequest* internal_default_instance() { + return reinterpret_cast( + &_RecvTensorRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 17; + + friend void swap(RecvTensorRequest& a, RecvTensorRequest& b) { + a.Swap(&b); + } + inline void Swap(RecvTensorRequest* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(RecvTensorRequest* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + RecvTensorRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const RecvTensorRequest& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const RecvTensorRequest& from) { + RecvTensorRequest::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(RecvTensorRequest* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.RecvTensorRequest"; + } + protected: + explicit RecvTensorRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kRendezvousKeyFieldNumber = 2, + kClientLocalityFieldNumber = 4, + kServerLocalityFieldNumber = 5, + kTransportOptionsFieldNumber = 6, + kStepIdFieldNumber = 1, + kRequestIdFieldNumber = 7, + kDmaOkFieldNumber = 3, + }; + // string rendezvous_key = 2; + void clear_rendezvous_key(); + const std::string& rendezvous_key() const; + template + void set_rendezvous_key(ArgT0&& arg0, ArgT... args); + std::string* mutable_rendezvous_key(); + PROTOBUF_NODISCARD std::string* release_rendezvous_key(); + void set_allocated_rendezvous_key(std::string* rendezvous_key); + private: + const std::string& _internal_rendezvous_key() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_rendezvous_key(const std::string& value); + std::string* _internal_mutable_rendezvous_key(); + public: + + // .tensorflow.DeviceLocality client_locality = 4; + bool has_client_locality() const; + private: + bool _internal_has_client_locality() const; + public: + void clear_client_locality(); + const ::tensorflow::DeviceLocality& client_locality() const; + PROTOBUF_NODISCARD ::tensorflow::DeviceLocality* release_client_locality(); + ::tensorflow::DeviceLocality* mutable_client_locality(); + void set_allocated_client_locality(::tensorflow::DeviceLocality* client_locality); + private: + const ::tensorflow::DeviceLocality& _internal_client_locality() const; + ::tensorflow::DeviceLocality* _internal_mutable_client_locality(); + public: + void unsafe_arena_set_allocated_client_locality( + ::tensorflow::DeviceLocality* client_locality); + ::tensorflow::DeviceLocality* unsafe_arena_release_client_locality(); + + // .tensorflow.DeviceLocality server_locality = 5; + bool has_server_locality() const; + private: + bool _internal_has_server_locality() const; + public: + void clear_server_locality(); + const ::tensorflow::DeviceLocality& server_locality() const; + PROTOBUF_NODISCARD ::tensorflow::DeviceLocality* release_server_locality(); + ::tensorflow::DeviceLocality* mutable_server_locality(); + void set_allocated_server_locality(::tensorflow::DeviceLocality* server_locality); + private: + const ::tensorflow::DeviceLocality& _internal_server_locality() const; + ::tensorflow::DeviceLocality* _internal_mutable_server_locality(); + public: + void unsafe_arena_set_allocated_server_locality( + ::tensorflow::DeviceLocality* server_locality); + ::tensorflow::DeviceLocality* unsafe_arena_release_server_locality(); + + // .google.protobuf.Any transport_options = 6; + bool has_transport_options() const; + private: + bool _internal_has_transport_options() const; + public: + void clear_transport_options(); + const ::PROTOBUF_NAMESPACE_ID::Any& transport_options() const; + PROTOBUF_NODISCARD ::PROTOBUF_NAMESPACE_ID::Any* release_transport_options(); + ::PROTOBUF_NAMESPACE_ID::Any* mutable_transport_options(); + void set_allocated_transport_options(::PROTOBUF_NAMESPACE_ID::Any* transport_options); + private: + const ::PROTOBUF_NAMESPACE_ID::Any& _internal_transport_options() const; + ::PROTOBUF_NAMESPACE_ID::Any* _internal_mutable_transport_options(); + public: + void unsafe_arena_set_allocated_transport_options( + ::PROTOBUF_NAMESPACE_ID::Any* transport_options); + ::PROTOBUF_NAMESPACE_ID::Any* unsafe_arena_release_transport_options(); + + // int64 step_id = 1; + void clear_step_id(); + int64_t step_id() const; + void set_step_id(int64_t value); + private: + int64_t _internal_step_id() const; + void _internal_set_step_id(int64_t value); + public: + + // int64 request_id = 7; + void clear_request_id(); + int64_t request_id() const; + void set_request_id(int64_t value); + private: + int64_t _internal_request_id() const; + void _internal_set_request_id(int64_t value); + public: + + // bool dma_ok = 3; + void clear_dma_ok(); + bool dma_ok() const; + void set_dma_ok(bool value); + private: + bool _internal_dma_ok() const; + void _internal_set_dma_ok(bool value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.RecvTensorRequest) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr rendezvous_key_; + ::tensorflow::DeviceLocality* client_locality_; + ::tensorflow::DeviceLocality* server_locality_; + ::PROTOBUF_NAMESPACE_ID::Any* transport_options_; + int64_t step_id_; + int64_t request_id_; + bool dma_ok_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fworker_2eproto; +}; +// ------------------------------------------------------------------- + +class RecvTensorResponse final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.RecvTensorResponse) */ { + public: + inline RecvTensorResponse() : RecvTensorResponse(nullptr) {} + ~RecvTensorResponse() override; + explicit PROTOBUF_CONSTEXPR RecvTensorResponse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + RecvTensorResponse(const RecvTensorResponse& from); + RecvTensorResponse(RecvTensorResponse&& from) noexcept + : RecvTensorResponse() { + *this = ::std::move(from); + } + + inline RecvTensorResponse& operator=(const RecvTensorResponse& from) { + CopyFrom(from); + return *this; + } + inline RecvTensorResponse& operator=(RecvTensorResponse&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const RecvTensorResponse& default_instance() { + return *internal_default_instance(); + } + static inline const RecvTensorResponse* internal_default_instance() { + return reinterpret_cast( + &_RecvTensorResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = + 18; + + friend void swap(RecvTensorResponse& a, RecvTensorResponse& b) { + a.Swap(&b); + } + inline void Swap(RecvTensorResponse* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(RecvTensorResponse* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + RecvTensorResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const RecvTensorResponse& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const RecvTensorResponse& from) { + RecvTensorResponse::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(RecvTensorResponse* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.RecvTensorResponse"; + } + protected: + explicit RecvTensorResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kTensorFieldNumber = 1, + kTransportOptionsFieldNumber = 4, + kSendStartMicrosFieldNumber = 3, + kIsDeadFieldNumber = 2, + kRequireAckFieldNumber = 5, + }; + // .tensorflow.TensorProto tensor = 1; + bool has_tensor() const; + private: + bool _internal_has_tensor() const; + public: + void clear_tensor(); + const ::tensorflow::TensorProto& tensor() const; + PROTOBUF_NODISCARD ::tensorflow::TensorProto* release_tensor(); + ::tensorflow::TensorProto* mutable_tensor(); + void set_allocated_tensor(::tensorflow::TensorProto* tensor); + private: + const ::tensorflow::TensorProto& _internal_tensor() const; + ::tensorflow::TensorProto* _internal_mutable_tensor(); + public: + void unsafe_arena_set_allocated_tensor( + ::tensorflow::TensorProto* tensor); + ::tensorflow::TensorProto* unsafe_arena_release_tensor(); + + // .google.protobuf.Any transport_options = 4; + bool has_transport_options() const; + private: + bool _internal_has_transport_options() const; + public: + void clear_transport_options(); + const ::PROTOBUF_NAMESPACE_ID::Any& transport_options() const; + PROTOBUF_NODISCARD ::PROTOBUF_NAMESPACE_ID::Any* release_transport_options(); + ::PROTOBUF_NAMESPACE_ID::Any* mutable_transport_options(); + void set_allocated_transport_options(::PROTOBUF_NAMESPACE_ID::Any* transport_options); + private: + const ::PROTOBUF_NAMESPACE_ID::Any& _internal_transport_options() const; + ::PROTOBUF_NAMESPACE_ID::Any* _internal_mutable_transport_options(); + public: + void unsafe_arena_set_allocated_transport_options( + ::PROTOBUF_NAMESPACE_ID::Any* transport_options); + ::PROTOBUF_NAMESPACE_ID::Any* unsafe_arena_release_transport_options(); + + // int64 send_start_micros = 3; + void clear_send_start_micros(); + int64_t send_start_micros() const; + void set_send_start_micros(int64_t value); + private: + int64_t _internal_send_start_micros() const; + void _internal_set_send_start_micros(int64_t value); + public: + + // bool is_dead = 2; + void clear_is_dead(); + bool is_dead() const; + void set_is_dead(bool value); + private: + bool _internal_is_dead() const; + void _internal_set_is_dead(bool value); + public: + + // bool require_ack = 5; + void clear_require_ack(); + bool require_ack() const; + void set_require_ack(bool value); + private: + bool _internal_require_ack() const; + void _internal_set_require_ack(bool value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.RecvTensorResponse) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::tensorflow::TensorProto* tensor_; + ::PROTOBUF_NAMESPACE_ID::Any* transport_options_; + int64_t send_start_micros_; + bool is_dead_; + bool require_ack_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fworker_2eproto; +}; +// ------------------------------------------------------------------- + +class MarkRecvFinishedRequest final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.MarkRecvFinishedRequest) */ { + public: + inline MarkRecvFinishedRequest() : MarkRecvFinishedRequest(nullptr) {} + ~MarkRecvFinishedRequest() override; + explicit PROTOBUF_CONSTEXPR MarkRecvFinishedRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + MarkRecvFinishedRequest(const MarkRecvFinishedRequest& from); + MarkRecvFinishedRequest(MarkRecvFinishedRequest&& from) noexcept + : MarkRecvFinishedRequest() { + *this = ::std::move(from); + } + + inline MarkRecvFinishedRequest& operator=(const MarkRecvFinishedRequest& from) { + CopyFrom(from); + return *this; + } + inline MarkRecvFinishedRequest& operator=(MarkRecvFinishedRequest&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const MarkRecvFinishedRequest& default_instance() { + return *internal_default_instance(); + } + static inline const MarkRecvFinishedRequest* internal_default_instance() { + return reinterpret_cast( + &_MarkRecvFinishedRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 19; + + friend void swap(MarkRecvFinishedRequest& a, MarkRecvFinishedRequest& b) { + a.Swap(&b); + } + inline void Swap(MarkRecvFinishedRequest* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(MarkRecvFinishedRequest* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + MarkRecvFinishedRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const MarkRecvFinishedRequest& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const MarkRecvFinishedRequest& from) { + MarkRecvFinishedRequest::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(MarkRecvFinishedRequest* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.MarkRecvFinishedRequest"; + } + protected: + explicit MarkRecvFinishedRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kRequestIdFieldNumber = 1, + }; + // int64 request_id = 1; + void clear_request_id(); + int64_t request_id() const; + void set_request_id(int64_t value); + private: + int64_t _internal_request_id() const; + void _internal_set_request_id(int64_t value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.MarkRecvFinishedRequest) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + int64_t request_id_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fworker_2eproto; +}; +// ------------------------------------------------------------------- + +class MarkRecvFinishedResponse final : + public ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase /* @@protoc_insertion_point(class_definition:tensorflow.MarkRecvFinishedResponse) */ { + public: + inline MarkRecvFinishedResponse() : MarkRecvFinishedResponse(nullptr) {} + explicit PROTOBUF_CONSTEXPR MarkRecvFinishedResponse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + MarkRecvFinishedResponse(const MarkRecvFinishedResponse& from); + MarkRecvFinishedResponse(MarkRecvFinishedResponse&& from) noexcept + : MarkRecvFinishedResponse() { + *this = ::std::move(from); + } + + inline MarkRecvFinishedResponse& operator=(const MarkRecvFinishedResponse& from) { + CopyFrom(from); + return *this; + } + inline MarkRecvFinishedResponse& operator=(MarkRecvFinishedResponse&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const MarkRecvFinishedResponse& default_instance() { + return *internal_default_instance(); + } + static inline const MarkRecvFinishedResponse* internal_default_instance() { + return reinterpret_cast( + &_MarkRecvFinishedResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = + 20; + + friend void swap(MarkRecvFinishedResponse& a, MarkRecvFinishedResponse& b) { + a.Swap(&b); + } + inline void Swap(MarkRecvFinishedResponse* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(MarkRecvFinishedResponse* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + MarkRecvFinishedResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::CopyFrom; + inline void CopyFrom(const MarkRecvFinishedResponse& from) { + ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::CopyImpl(*this, from); + } + using ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::MergeFrom; + void MergeFrom(const MarkRecvFinishedResponse& from) { + ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::MergeImpl(*this, from); + } + public: + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.MarkRecvFinishedResponse"; + } + protected: + explicit MarkRecvFinishedResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // @@protoc_insertion_point(class_scope:tensorflow.MarkRecvFinishedResponse) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fworker_2eproto; +}; +// ------------------------------------------------------------------- + +class LoggingRequest final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.LoggingRequest) */ { + public: + inline LoggingRequest() : LoggingRequest(nullptr) {} + ~LoggingRequest() override; + explicit PROTOBUF_CONSTEXPR LoggingRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + LoggingRequest(const LoggingRequest& from); + LoggingRequest(LoggingRequest&& from) noexcept + : LoggingRequest() { + *this = ::std::move(from); + } + + inline LoggingRequest& operator=(const LoggingRequest& from) { + CopyFrom(from); + return *this; + } + inline LoggingRequest& operator=(LoggingRequest&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const LoggingRequest& default_instance() { + return *internal_default_instance(); + } + static inline const LoggingRequest* internal_default_instance() { + return reinterpret_cast( + &_LoggingRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 21; + + friend void swap(LoggingRequest& a, LoggingRequest& b) { + a.Swap(&b); + } + inline void Swap(LoggingRequest* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(LoggingRequest* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + LoggingRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const LoggingRequest& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const LoggingRequest& from) { + LoggingRequest::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(LoggingRequest* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.LoggingRequest"; + } + protected: + explicit LoggingRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kFetchStepIdFieldNumber = 3, + kEnableRpcLoggingFieldNumber = 1, + kDisableRpcLoggingFieldNumber = 4, + kClearFieldNumber = 2, + }; + // repeated int64 fetch_step_id = 3; + int fetch_step_id_size() const; + private: + int _internal_fetch_step_id_size() const; + public: + void clear_fetch_step_id(); + private: + int64_t _internal_fetch_step_id(int index) const; + const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >& + _internal_fetch_step_id() const; + void _internal_add_fetch_step_id(int64_t value); + ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >* + _internal_mutable_fetch_step_id(); + public: + int64_t fetch_step_id(int index) const; + void set_fetch_step_id(int index, int64_t value); + void add_fetch_step_id(int64_t value); + const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >& + fetch_step_id() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >* + mutable_fetch_step_id(); + + // bool enable_rpc_logging = 1; + void clear_enable_rpc_logging(); + bool enable_rpc_logging() const; + void set_enable_rpc_logging(bool value); + private: + bool _internal_enable_rpc_logging() const; + void _internal_set_enable_rpc_logging(bool value); + public: + + // bool disable_rpc_logging = 4; + void clear_disable_rpc_logging(); + bool disable_rpc_logging() const; + void set_disable_rpc_logging(bool value); + private: + bool _internal_disable_rpc_logging() const; + void _internal_set_disable_rpc_logging(bool value); + public: + + // bool clear = 2; + void clear_clear(); + bool clear() const; + void set_clear(bool value); + private: + bool _internal_clear() const; + void _internal_set_clear(bool value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.LoggingRequest) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t > fetch_step_id_; + mutable std::atomic _fetch_step_id_cached_byte_size_; + bool enable_rpc_logging_; + bool disable_rpc_logging_; + bool clear_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fworker_2eproto; +}; +// ------------------------------------------------------------------- + +class LabeledStepStats final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.LabeledStepStats) */ { + public: + inline LabeledStepStats() : LabeledStepStats(nullptr) {} + ~LabeledStepStats() override; + explicit PROTOBUF_CONSTEXPR LabeledStepStats(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + LabeledStepStats(const LabeledStepStats& from); + LabeledStepStats(LabeledStepStats&& from) noexcept + : LabeledStepStats() { + *this = ::std::move(from); + } + + inline LabeledStepStats& operator=(const LabeledStepStats& from) { + CopyFrom(from); + return *this; + } + inline LabeledStepStats& operator=(LabeledStepStats&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const LabeledStepStats& default_instance() { + return *internal_default_instance(); + } + static inline const LabeledStepStats* internal_default_instance() { + return reinterpret_cast( + &_LabeledStepStats_default_instance_); + } + static constexpr int kIndexInFileMessages = + 22; + + friend void swap(LabeledStepStats& a, LabeledStepStats& b) { + a.Swap(&b); + } + inline void Swap(LabeledStepStats* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(LabeledStepStats* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + LabeledStepStats* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const LabeledStepStats& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const LabeledStepStats& from) { + LabeledStepStats::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(LabeledStepStats* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.LabeledStepStats"; + } + protected: + explicit LabeledStepStats(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kStepStatsFieldNumber = 2, + kStepIdFieldNumber = 1, + }; + // .tensorflow.StepStats step_stats = 2; + bool has_step_stats() const; + private: + bool _internal_has_step_stats() const; + public: + void clear_step_stats(); + const ::tensorflow::StepStats& step_stats() const; + PROTOBUF_NODISCARD ::tensorflow::StepStats* release_step_stats(); + ::tensorflow::StepStats* mutable_step_stats(); + void set_allocated_step_stats(::tensorflow::StepStats* step_stats); + private: + const ::tensorflow::StepStats& _internal_step_stats() const; + ::tensorflow::StepStats* _internal_mutable_step_stats(); + public: + void unsafe_arena_set_allocated_step_stats( + ::tensorflow::StepStats* step_stats); + ::tensorflow::StepStats* unsafe_arena_release_step_stats(); + + // int64 step_id = 1; + void clear_step_id(); + int64_t step_id() const; + void set_step_id(int64_t value); + private: + int64_t _internal_step_id() const; + void _internal_set_step_id(int64_t value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.LabeledStepStats) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::tensorflow::StepStats* step_stats_; + int64_t step_id_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fworker_2eproto; +}; +// ------------------------------------------------------------------- + +class LoggingResponse final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.LoggingResponse) */ { + public: + inline LoggingResponse() : LoggingResponse(nullptr) {} + ~LoggingResponse() override; + explicit PROTOBUF_CONSTEXPR LoggingResponse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + LoggingResponse(const LoggingResponse& from); + LoggingResponse(LoggingResponse&& from) noexcept + : LoggingResponse() { + *this = ::std::move(from); + } + + inline LoggingResponse& operator=(const LoggingResponse& from) { + CopyFrom(from); + return *this; + } + inline LoggingResponse& operator=(LoggingResponse&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const LoggingResponse& default_instance() { + return *internal_default_instance(); + } + static inline const LoggingResponse* internal_default_instance() { + return reinterpret_cast( + &_LoggingResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = + 23; + + friend void swap(LoggingResponse& a, LoggingResponse& b) { + a.Swap(&b); + } + inline void Swap(LoggingResponse* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(LoggingResponse* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + LoggingResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const LoggingResponse& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const LoggingResponse& from) { + LoggingResponse::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(LoggingResponse* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.LoggingResponse"; + } + protected: + explicit LoggingResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kStepFieldNumber = 1, + }; + // repeated .tensorflow.LabeledStepStats step = 1; + int step_size() const; + private: + int _internal_step_size() const; + public: + void clear_step(); + ::tensorflow::LabeledStepStats* mutable_step(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::LabeledStepStats >* + mutable_step(); + private: + const ::tensorflow::LabeledStepStats& _internal_step(int index) const; + ::tensorflow::LabeledStepStats* _internal_add_step(); + public: + const ::tensorflow::LabeledStepStats& step(int index) const; + ::tensorflow::LabeledStepStats* add_step(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::LabeledStepStats >& + step() const; + + // @@protoc_insertion_point(class_scope:tensorflow.LoggingResponse) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::LabeledStepStats > step_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fworker_2eproto; +}; +// ------------------------------------------------------------------- + +class TraceOpts final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.TraceOpts) */ { + public: + inline TraceOpts() : TraceOpts(nullptr) {} + ~TraceOpts() override; + explicit PROTOBUF_CONSTEXPR TraceOpts(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + TraceOpts(const TraceOpts& from); + TraceOpts(TraceOpts&& from) noexcept + : TraceOpts() { + *this = ::std::move(from); + } + + inline TraceOpts& operator=(const TraceOpts& from) { + CopyFrom(from); + return *this; + } + inline TraceOpts& operator=(TraceOpts&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const TraceOpts& default_instance() { + return *internal_default_instance(); + } + static inline const TraceOpts* internal_default_instance() { + return reinterpret_cast( + &_TraceOpts_default_instance_); + } + static constexpr int kIndexInFileMessages = + 24; + + friend void swap(TraceOpts& a, TraceOpts& b) { + a.Swap(&b); + } + inline void Swap(TraceOpts* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(TraceOpts* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + TraceOpts* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const TraceOpts& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const TraceOpts& from) { + TraceOpts::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(TraceOpts* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.TraceOpts"; + } + protected: + explicit TraceOpts(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kDurationFieldNumber = 1, + kUseStepProfilerFieldNumber = 2, + kUseKernelProfilerFieldNumber = 3, + kUseExtendedProfilerFieldNumber = 4, + kUseGpuProfilerFieldNumber = 5, + kUseSampleProfilerFieldNumber = 6, + }; + // double duration = 1; + void clear_duration(); + double duration() const; + void set_duration(double value); + private: + double _internal_duration() const; + void _internal_set_duration(double value); + public: + + // bool use_step_profiler = 2; + void clear_use_step_profiler(); + bool use_step_profiler() const; + void set_use_step_profiler(bool value); + private: + bool _internal_use_step_profiler() const; + void _internal_set_use_step_profiler(bool value); + public: + + // bool use_kernel_profiler = 3; + void clear_use_kernel_profiler(); + bool use_kernel_profiler() const; + void set_use_kernel_profiler(bool value); + private: + bool _internal_use_kernel_profiler() const; + void _internal_set_use_kernel_profiler(bool value); + public: + + // bool use_extended_profiler = 4; + void clear_use_extended_profiler(); + bool use_extended_profiler() const; + void set_use_extended_profiler(bool value); + private: + bool _internal_use_extended_profiler() const; + void _internal_set_use_extended_profiler(bool value); + public: + + // bool use_gpu_profiler = 5; + void clear_use_gpu_profiler(); + bool use_gpu_profiler() const; + void set_use_gpu_profiler(bool value); + private: + bool _internal_use_gpu_profiler() const; + void _internal_set_use_gpu_profiler(bool value); + public: + + // bool use_sample_profiler = 6; + void clear_use_sample_profiler(); + bool use_sample_profiler() const; + void set_use_sample_profiler(bool value); + private: + bool _internal_use_sample_profiler() const; + void _internal_set_use_sample_profiler(bool value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.TraceOpts) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + double duration_; + bool use_step_profiler_; + bool use_kernel_profiler_; + bool use_extended_profiler_; + bool use_gpu_profiler_; + bool use_sample_profiler_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fworker_2eproto; +}; +// ------------------------------------------------------------------- + +class TracingRequest final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.TracingRequest) */ { + public: + inline TracingRequest() : TracingRequest(nullptr) {} + ~TracingRequest() override; + explicit PROTOBUF_CONSTEXPR TracingRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + TracingRequest(const TracingRequest& from); + TracingRequest(TracingRequest&& from) noexcept + : TracingRequest() { + *this = ::std::move(from); + } + + inline TracingRequest& operator=(const TracingRequest& from) { + CopyFrom(from); + return *this; + } + inline TracingRequest& operator=(TracingRequest&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const TracingRequest& default_instance() { + return *internal_default_instance(); + } + static inline const TracingRequest* internal_default_instance() { + return reinterpret_cast( + &_TracingRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 25; + + friend void swap(TracingRequest& a, TracingRequest& b) { + a.Swap(&b); + } + inline void Swap(TracingRequest* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(TracingRequest* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + TracingRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const TracingRequest& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const TracingRequest& from) { + TracingRequest::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(TracingRequest* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.TracingRequest"; + } + protected: + explicit TracingRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kOptionsFieldNumber = 1, + }; + // .tensorflow.TraceOpts options = 1; + bool has_options() const; + private: + bool _internal_has_options() const; + public: + void clear_options(); + const ::tensorflow::TraceOpts& options() const; + PROTOBUF_NODISCARD ::tensorflow::TraceOpts* release_options(); + ::tensorflow::TraceOpts* mutable_options(); + void set_allocated_options(::tensorflow::TraceOpts* options); + private: + const ::tensorflow::TraceOpts& _internal_options() const; + ::tensorflow::TraceOpts* _internal_mutable_options(); + public: + void unsafe_arena_set_allocated_options( + ::tensorflow::TraceOpts* options); + ::tensorflow::TraceOpts* unsafe_arena_release_options(); + + // @@protoc_insertion_point(class_scope:tensorflow.TracingRequest) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::tensorflow::TraceOpts* options_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fworker_2eproto; +}; +// ------------------------------------------------------------------- + +class TracingResponse final : + public ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase /* @@protoc_insertion_point(class_definition:tensorflow.TracingResponse) */ { + public: + inline TracingResponse() : TracingResponse(nullptr) {} + explicit PROTOBUF_CONSTEXPR TracingResponse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + TracingResponse(const TracingResponse& from); + TracingResponse(TracingResponse&& from) noexcept + : TracingResponse() { + *this = ::std::move(from); + } + + inline TracingResponse& operator=(const TracingResponse& from) { + CopyFrom(from); + return *this; + } + inline TracingResponse& operator=(TracingResponse&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const TracingResponse& default_instance() { + return *internal_default_instance(); + } + static inline const TracingResponse* internal_default_instance() { + return reinterpret_cast( + &_TracingResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = + 26; + + friend void swap(TracingResponse& a, TracingResponse& b) { + a.Swap(&b); + } + inline void Swap(TracingResponse* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(TracingResponse* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + TracingResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::CopyFrom; + inline void CopyFrom(const TracingResponse& from) { + ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::CopyImpl(*this, from); + } + using ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::MergeFrom; + void MergeFrom(const TracingResponse& from) { + ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::MergeImpl(*this, from); + } + public: + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.TracingResponse"; + } + protected: + explicit TracingResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // @@protoc_insertion_point(class_scope:tensorflow.TracingResponse) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fworker_2eproto; +}; +// ------------------------------------------------------------------- + +class RecvBufRequest final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.RecvBufRequest) */ { + public: + inline RecvBufRequest() : RecvBufRequest(nullptr) {} + ~RecvBufRequest() override; + explicit PROTOBUF_CONSTEXPR RecvBufRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + RecvBufRequest(const RecvBufRequest& from); + RecvBufRequest(RecvBufRequest&& from) noexcept + : RecvBufRequest() { + *this = ::std::move(from); + } + + inline RecvBufRequest& operator=(const RecvBufRequest& from) { + CopyFrom(from); + return *this; + } + inline RecvBufRequest& operator=(RecvBufRequest&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const RecvBufRequest& default_instance() { + return *internal_default_instance(); + } + static inline const RecvBufRequest* internal_default_instance() { + return reinterpret_cast( + &_RecvBufRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 27; + + friend void swap(RecvBufRequest& a, RecvBufRequest& b) { + a.Swap(&b); + } + inline void Swap(RecvBufRequest* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(RecvBufRequest* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + RecvBufRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const RecvBufRequest& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const RecvBufRequest& from) { + RecvBufRequest::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(RecvBufRequest* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.RecvBufRequest"; + } + protected: + explicit RecvBufRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kBufRendezvousKeyFieldNumber = 2, + kSrcDeviceFieldNumber = 8, + kDstDeviceFieldNumber = 9, + kClientLocalityFieldNumber = 5, + kServerLocalityFieldNumber = 6, + kTransportOptionsFieldNumber = 7, + kStepIdFieldNumber = 1, + kNumBytesFieldNumber = 3, + kBufPtrFieldNumber = 4, + kRequestIdFieldNumber = 10, + kSrcIncarnationFieldNumber = 11, + }; + // string buf_rendezvous_key = 2; + void clear_buf_rendezvous_key(); + const std::string& buf_rendezvous_key() const; + template + void set_buf_rendezvous_key(ArgT0&& arg0, ArgT... args); + std::string* mutable_buf_rendezvous_key(); + PROTOBUF_NODISCARD std::string* release_buf_rendezvous_key(); + void set_allocated_buf_rendezvous_key(std::string* buf_rendezvous_key); + private: + const std::string& _internal_buf_rendezvous_key() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_buf_rendezvous_key(const std::string& value); + std::string* _internal_mutable_buf_rendezvous_key(); + public: + + // string src_device = 8; + void clear_src_device(); + const std::string& src_device() const; + template + void set_src_device(ArgT0&& arg0, ArgT... args); + std::string* mutable_src_device(); + PROTOBUF_NODISCARD std::string* release_src_device(); + void set_allocated_src_device(std::string* src_device); + private: + const std::string& _internal_src_device() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_src_device(const std::string& value); + std::string* _internal_mutable_src_device(); + public: + + // string dst_device = 9; + void clear_dst_device(); + const std::string& dst_device() const; + template + void set_dst_device(ArgT0&& arg0, ArgT... args); + std::string* mutable_dst_device(); + PROTOBUF_NODISCARD std::string* release_dst_device(); + void set_allocated_dst_device(std::string* dst_device); + private: + const std::string& _internal_dst_device() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_dst_device(const std::string& value); + std::string* _internal_mutable_dst_device(); + public: + + // .tensorflow.DeviceLocality client_locality = 5; + bool has_client_locality() const; + private: + bool _internal_has_client_locality() const; + public: + void clear_client_locality(); + const ::tensorflow::DeviceLocality& client_locality() const; + PROTOBUF_NODISCARD ::tensorflow::DeviceLocality* release_client_locality(); + ::tensorflow::DeviceLocality* mutable_client_locality(); + void set_allocated_client_locality(::tensorflow::DeviceLocality* client_locality); + private: + const ::tensorflow::DeviceLocality& _internal_client_locality() const; + ::tensorflow::DeviceLocality* _internal_mutable_client_locality(); + public: + void unsafe_arena_set_allocated_client_locality( + ::tensorflow::DeviceLocality* client_locality); + ::tensorflow::DeviceLocality* unsafe_arena_release_client_locality(); + + // .tensorflow.DeviceLocality server_locality = 6; + bool has_server_locality() const; + private: + bool _internal_has_server_locality() const; + public: + void clear_server_locality(); + const ::tensorflow::DeviceLocality& server_locality() const; + PROTOBUF_NODISCARD ::tensorflow::DeviceLocality* release_server_locality(); + ::tensorflow::DeviceLocality* mutable_server_locality(); + void set_allocated_server_locality(::tensorflow::DeviceLocality* server_locality); + private: + const ::tensorflow::DeviceLocality& _internal_server_locality() const; + ::tensorflow::DeviceLocality* _internal_mutable_server_locality(); + public: + void unsafe_arena_set_allocated_server_locality( + ::tensorflow::DeviceLocality* server_locality); + ::tensorflow::DeviceLocality* unsafe_arena_release_server_locality(); + + // .google.protobuf.Any transport_options = 7; + bool has_transport_options() const; + private: + bool _internal_has_transport_options() const; + public: + void clear_transport_options(); + const ::PROTOBUF_NAMESPACE_ID::Any& transport_options() const; + PROTOBUF_NODISCARD ::PROTOBUF_NAMESPACE_ID::Any* release_transport_options(); + ::PROTOBUF_NAMESPACE_ID::Any* mutable_transport_options(); + void set_allocated_transport_options(::PROTOBUF_NAMESPACE_ID::Any* transport_options); + private: + const ::PROTOBUF_NAMESPACE_ID::Any& _internal_transport_options() const; + ::PROTOBUF_NAMESPACE_ID::Any* _internal_mutable_transport_options(); + public: + void unsafe_arena_set_allocated_transport_options( + ::PROTOBUF_NAMESPACE_ID::Any* transport_options); + ::PROTOBUF_NAMESPACE_ID::Any* unsafe_arena_release_transport_options(); + + // int64 step_id = 1; + void clear_step_id(); + int64_t step_id() const; + void set_step_id(int64_t value); + private: + int64_t _internal_step_id() const; + void _internal_set_step_id(int64_t value); + public: + + // int64 num_bytes = 3; + void clear_num_bytes(); + int64_t num_bytes() const; + void set_num_bytes(int64_t value); + private: + int64_t _internal_num_bytes() const; + void _internal_set_num_bytes(int64_t value); + public: + + // fixed64 buf_ptr = 4; + void clear_buf_ptr(); + uint64_t buf_ptr() const; + void set_buf_ptr(uint64_t value); + private: + uint64_t _internal_buf_ptr() const; + void _internal_set_buf_ptr(uint64_t value); + public: + + // int64 request_id = 10; + void clear_request_id(); + int64_t request_id() const; + void set_request_id(int64_t value); + private: + int64_t _internal_request_id() const; + void _internal_set_request_id(int64_t value); + public: + + // uint64 src_incarnation = 11; + void clear_src_incarnation(); + uint64_t src_incarnation() const; + void set_src_incarnation(uint64_t value); + private: + uint64_t _internal_src_incarnation() const; + void _internal_set_src_incarnation(uint64_t value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.RecvBufRequest) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr buf_rendezvous_key_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr src_device_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr dst_device_; + ::tensorflow::DeviceLocality* client_locality_; + ::tensorflow::DeviceLocality* server_locality_; + ::PROTOBUF_NAMESPACE_ID::Any* transport_options_; + int64_t step_id_; + int64_t num_bytes_; + uint64_t buf_ptr_; + int64_t request_id_; + uint64_t src_incarnation_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fworker_2eproto; +}; +// ------------------------------------------------------------------- + +class RecvBufResponse final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.RecvBufResponse) */ { + public: + inline RecvBufResponse() : RecvBufResponse(nullptr) {} + ~RecvBufResponse() override; + explicit PROTOBUF_CONSTEXPR RecvBufResponse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + RecvBufResponse(const RecvBufResponse& from); + RecvBufResponse(RecvBufResponse&& from) noexcept + : RecvBufResponse() { + *this = ::std::move(from); + } + + inline RecvBufResponse& operator=(const RecvBufResponse& from) { + CopyFrom(from); + return *this; + } + inline RecvBufResponse& operator=(RecvBufResponse&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const RecvBufResponse& default_instance() { + return *internal_default_instance(); + } + static inline const RecvBufResponse* internal_default_instance() { + return reinterpret_cast( + &_RecvBufResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = + 28; + + friend void swap(RecvBufResponse& a, RecvBufResponse& b) { + a.Swap(&b); + } + inline void Swap(RecvBufResponse* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(RecvBufResponse* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + RecvBufResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const RecvBufResponse& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const RecvBufResponse& from) { + RecvBufResponse::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(RecvBufResponse* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.RecvBufResponse"; + } + protected: + explicit RecvBufResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kTransportOptionsFieldNumber = 4, + kBufPtrFieldNumber = 1, + kNumBytesFieldNumber = 2, + kSendStartMicrosFieldNumber = 5, + kIsDeadFieldNumber = 3, + kRequireAckFieldNumber = 6, + }; + // .google.protobuf.Any transport_options = 4; + bool has_transport_options() const; + private: + bool _internal_has_transport_options() const; + public: + void clear_transport_options(); + const ::PROTOBUF_NAMESPACE_ID::Any& transport_options() const; + PROTOBUF_NODISCARD ::PROTOBUF_NAMESPACE_ID::Any* release_transport_options(); + ::PROTOBUF_NAMESPACE_ID::Any* mutable_transport_options(); + void set_allocated_transport_options(::PROTOBUF_NAMESPACE_ID::Any* transport_options); + private: + const ::PROTOBUF_NAMESPACE_ID::Any& _internal_transport_options() const; + ::PROTOBUF_NAMESPACE_ID::Any* _internal_mutable_transport_options(); + public: + void unsafe_arena_set_allocated_transport_options( + ::PROTOBUF_NAMESPACE_ID::Any* transport_options); + ::PROTOBUF_NAMESPACE_ID::Any* unsafe_arena_release_transport_options(); + + // fixed64 buf_ptr = 1; + void clear_buf_ptr(); + uint64_t buf_ptr() const; + void set_buf_ptr(uint64_t value); + private: + uint64_t _internal_buf_ptr() const; + void _internal_set_buf_ptr(uint64_t value); + public: + + // int64 num_bytes = 2; + void clear_num_bytes(); + int64_t num_bytes() const; + void set_num_bytes(int64_t value); + private: + int64_t _internal_num_bytes() const; + void _internal_set_num_bytes(int64_t value); + public: + + // int64 send_start_micros = 5; + void clear_send_start_micros(); + int64_t send_start_micros() const; + void set_send_start_micros(int64_t value); + private: + int64_t _internal_send_start_micros() const; + void _internal_set_send_start_micros(int64_t value); + public: + + // bool is_dead = 3; + void clear_is_dead(); + bool is_dead() const; + void set_is_dead(bool value); + private: + bool _internal_is_dead() const; + void _internal_set_is_dead(bool value); + public: + + // bool require_ack = 6; + void clear_require_ack(); + bool require_ack() const; + void set_require_ack(bool value); + private: + bool _internal_require_ack() const; + void _internal_set_require_ack(bool value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.RecvBufResponse) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::Any* transport_options_; + uint64_t buf_ptr_; + int64_t num_bytes_; + int64_t send_start_micros_; + bool is_dead_; + bool require_ack_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fworker_2eproto; +}; +// ------------------------------------------------------------------- + +class CompleteGroupRequest final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.CompleteGroupRequest) */ { + public: + inline CompleteGroupRequest() : CompleteGroupRequest(nullptr) {} + ~CompleteGroupRequest() override; + explicit PROTOBUF_CONSTEXPR CompleteGroupRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + CompleteGroupRequest(const CompleteGroupRequest& from); + CompleteGroupRequest(CompleteGroupRequest&& from) noexcept + : CompleteGroupRequest() { + *this = ::std::move(from); + } + + inline CompleteGroupRequest& operator=(const CompleteGroupRequest& from) { + CopyFrom(from); + return *this; + } + inline CompleteGroupRequest& operator=(CompleteGroupRequest&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const CompleteGroupRequest& default_instance() { + return *internal_default_instance(); + } + static inline const CompleteGroupRequest* internal_default_instance() { + return reinterpret_cast( + &_CompleteGroupRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 29; + + friend void swap(CompleteGroupRequest& a, CompleteGroupRequest& b) { + a.Swap(&b); + } + inline void Swap(CompleteGroupRequest* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(CompleteGroupRequest* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + CompleteGroupRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const CompleteGroupRequest& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const CompleteGroupRequest& from) { + CompleteGroupRequest::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(CompleteGroupRequest* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.CompleteGroupRequest"; + } + protected: + explicit CompleteGroupRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kDeviceTypeFieldNumber = 3, + kDeviceAttributesFieldNumber = 6, + kGroupKeyFieldNumber = 1, + kGroupSizeFieldNumber = 2, + kCollectiveTypeFieldNumber = 5, + }; + // string device_type = 3; + void clear_device_type(); + const std::string& device_type() const; + template + void set_device_type(ArgT0&& arg0, ArgT... args); + std::string* mutable_device_type(); + PROTOBUF_NODISCARD std::string* release_device_type(); + void set_allocated_device_type(std::string* device_type); + private: + const std::string& _internal_device_type() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_device_type(const std::string& value); + std::string* _internal_mutable_device_type(); + public: + + // .tensorflow.DeviceAttributes device_attributes = 6; + bool has_device_attributes() const; + private: + bool _internal_has_device_attributes() const; + public: + void clear_device_attributes(); + const ::tensorflow::DeviceAttributes& device_attributes() const; + PROTOBUF_NODISCARD ::tensorflow::DeviceAttributes* release_device_attributes(); + ::tensorflow::DeviceAttributes* mutable_device_attributes(); + void set_allocated_device_attributes(::tensorflow::DeviceAttributes* device_attributes); + private: + const ::tensorflow::DeviceAttributes& _internal_device_attributes() const; + ::tensorflow::DeviceAttributes* _internal_mutable_device_attributes(); + public: + void unsafe_arena_set_allocated_device_attributes( + ::tensorflow::DeviceAttributes* device_attributes); + ::tensorflow::DeviceAttributes* unsafe_arena_release_device_attributes(); + + // int32 group_key = 1; + void clear_group_key(); + int32_t group_key() const; + void set_group_key(int32_t value); + private: + int32_t _internal_group_key() const; + void _internal_set_group_key(int32_t value); + public: + + // int32 group_size = 2; + void clear_group_size(); + int32_t group_size() const; + void set_group_size(int32_t value); + private: + int32_t _internal_group_size() const; + void _internal_set_group_size(int32_t value); + public: + + // int32 collective_type = 5; + void clear_collective_type(); + int32_t collective_type() const; + void set_collective_type(int32_t value); + private: + int32_t _internal_collective_type() const; + void _internal_set_collective_type(int32_t value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.CompleteGroupRequest) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr device_type_; + ::tensorflow::DeviceAttributes* device_attributes_; + int32_t group_key_; + int32_t group_size_; + int32_t collective_type_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fworker_2eproto; +}; +// ------------------------------------------------------------------- + +class CompleteGroupResponse final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.CompleteGroupResponse) */ { + public: + inline CompleteGroupResponse() : CompleteGroupResponse(nullptr) {} + ~CompleteGroupResponse() override; + explicit PROTOBUF_CONSTEXPR CompleteGroupResponse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + CompleteGroupResponse(const CompleteGroupResponse& from); + CompleteGroupResponse(CompleteGroupResponse&& from) noexcept + : CompleteGroupResponse() { + *this = ::std::move(from); + } + + inline CompleteGroupResponse& operator=(const CompleteGroupResponse& from) { + CopyFrom(from); + return *this; + } + inline CompleteGroupResponse& operator=(CompleteGroupResponse&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const CompleteGroupResponse& default_instance() { + return *internal_default_instance(); + } + static inline const CompleteGroupResponse* internal_default_instance() { + return reinterpret_cast( + &_CompleteGroupResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = + 30; + + friend void swap(CompleteGroupResponse& a, CompleteGroupResponse& b) { + a.Swap(&b); + } + inline void Swap(CompleteGroupResponse* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(CompleteGroupResponse* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + CompleteGroupResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const CompleteGroupResponse& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const CompleteGroupResponse& from) { + CompleteGroupResponse::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(CompleteGroupResponse* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.CompleteGroupResponse"; + } + protected: + explicit CompleteGroupResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kDeviceAttributesFieldNumber = 8, + kDeviceTypeFieldNumber = 3, + kCommunicatorKeyFieldNumber = 7, + kGroupKeyFieldNumber = 1, + kGroupSizeFieldNumber = 2, + kNumTasksFieldNumber = 4, + }; + // repeated .tensorflow.DeviceAttributes device_attributes = 8; + int device_attributes_size() const; + private: + int _internal_device_attributes_size() const; + public: + void clear_device_attributes(); + ::tensorflow::DeviceAttributes* mutable_device_attributes(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::DeviceAttributes >* + mutable_device_attributes(); + private: + const ::tensorflow::DeviceAttributes& _internal_device_attributes(int index) const; + ::tensorflow::DeviceAttributes* _internal_add_device_attributes(); + public: + const ::tensorflow::DeviceAttributes& device_attributes(int index) const; + ::tensorflow::DeviceAttributes* add_device_attributes(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::DeviceAttributes >& + device_attributes() const; + + // string device_type = 3; + void clear_device_type(); + const std::string& device_type() const; + template + void set_device_type(ArgT0&& arg0, ArgT... args); + std::string* mutable_device_type(); + PROTOBUF_NODISCARD std::string* release_device_type(); + void set_allocated_device_type(std::string* device_type); + private: + const std::string& _internal_device_type() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_device_type(const std::string& value); + std::string* _internal_mutable_device_type(); + public: + + // bytes communicator_key = 7; + void clear_communicator_key(); + const std::string& communicator_key() const; + template + void set_communicator_key(ArgT0&& arg0, ArgT... args); + std::string* mutable_communicator_key(); + PROTOBUF_NODISCARD std::string* release_communicator_key(); + void set_allocated_communicator_key(std::string* communicator_key); + private: + const std::string& _internal_communicator_key() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_communicator_key(const std::string& value); + std::string* _internal_mutable_communicator_key(); + public: + + // int32 group_key = 1; + void clear_group_key(); + int32_t group_key() const; + void set_group_key(int32_t value); + private: + int32_t _internal_group_key() const; + void _internal_set_group_key(int32_t value); + public: + + // int32 group_size = 2; + void clear_group_size(); + int32_t group_size() const; + void set_group_size(int32_t value); + private: + int32_t _internal_group_size() const; + void _internal_set_group_size(int32_t value); + public: + + // int32 num_tasks = 4; + void clear_num_tasks(); + int32_t num_tasks() const; + void set_num_tasks(int32_t value); + private: + int32_t _internal_num_tasks() const; + void _internal_set_num_tasks(int32_t value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.CompleteGroupResponse) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::DeviceAttributes > device_attributes_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr device_type_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr communicator_key_; + int32_t group_key_; + int32_t group_size_; + int32_t num_tasks_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fworker_2eproto; +}; +// ------------------------------------------------------------------- + +class CompleteInstanceRequest final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.CompleteInstanceRequest) */ { + public: + inline CompleteInstanceRequest() : CompleteInstanceRequest(nullptr) {} + ~CompleteInstanceRequest() override; + explicit PROTOBUF_CONSTEXPR CompleteInstanceRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + CompleteInstanceRequest(const CompleteInstanceRequest& from); + CompleteInstanceRequest(CompleteInstanceRequest&& from) noexcept + : CompleteInstanceRequest() { + *this = ::std::move(from); + } + + inline CompleteInstanceRequest& operator=(const CompleteInstanceRequest& from) { + CopyFrom(from); + return *this; + } + inline CompleteInstanceRequest& operator=(CompleteInstanceRequest&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const CompleteInstanceRequest& default_instance() { + return *internal_default_instance(); + } + static inline const CompleteInstanceRequest* internal_default_instance() { + return reinterpret_cast( + &_CompleteInstanceRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 31; + + friend void swap(CompleteInstanceRequest& a, CompleteInstanceRequest& b) { + a.Swap(&b); + } + inline void Swap(CompleteInstanceRequest* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(CompleteInstanceRequest* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + CompleteInstanceRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const CompleteInstanceRequest& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const CompleteInstanceRequest& from) { + CompleteInstanceRequest::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(CompleteInstanceRequest* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.CompleteInstanceRequest"; + } + protected: + explicit CompleteInstanceRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kSubdivOffsetFieldNumber = 9, + kNameFieldNumber = 1, + kDeviceTypeFieldNumber = 8, + kDeviceFieldNumber = 10, + kShapeFieldNumber = 4, + kTypeFieldNumber = 2, + kDataTypeFieldNumber = 3, + kGroupKeyFieldNumber = 5, + kGroupSizeFieldNumber = 6, + kInstanceKeyFieldNumber = 7, + kIsSourceFieldNumber = 11, + kStepIdFieldNumber = 12, + }; + // repeated int32 subdiv_offset = 9; + int subdiv_offset_size() const; + private: + int _internal_subdiv_offset_size() const; + public: + void clear_subdiv_offset(); + private: + int32_t _internal_subdiv_offset(int index) const; + const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >& + _internal_subdiv_offset() const; + void _internal_add_subdiv_offset(int32_t value); + ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >* + _internal_mutable_subdiv_offset(); + public: + int32_t subdiv_offset(int index) const; + void set_subdiv_offset(int index, int32_t value); + void add_subdiv_offset(int32_t value); + const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >& + subdiv_offset() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >* + mutable_subdiv_offset(); + + // string name = 1; + void clear_name(); + const std::string& name() const; + template + void set_name(ArgT0&& arg0, ArgT... args); + std::string* mutable_name(); + PROTOBUF_NODISCARD std::string* release_name(); + void set_allocated_name(std::string* name); + private: + const std::string& _internal_name() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_name(const std::string& value); + std::string* _internal_mutable_name(); + public: + + // string device_type = 8; + void clear_device_type(); + const std::string& device_type() const; + template + void set_device_type(ArgT0&& arg0, ArgT... args); + std::string* mutable_device_type(); + PROTOBUF_NODISCARD std::string* release_device_type(); + void set_allocated_device_type(std::string* device_type); + private: + const std::string& _internal_device_type() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_device_type(const std::string& value); + std::string* _internal_mutable_device_type(); + public: + + // string device = 10; + void clear_device(); + const std::string& device() const; + template + void set_device(ArgT0&& arg0, ArgT... args); + std::string* mutable_device(); + PROTOBUF_NODISCARD std::string* release_device(); + void set_allocated_device(std::string* device); + private: + const std::string& _internal_device() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_device(const std::string& value); + std::string* _internal_mutable_device(); + public: + + // .tensorflow.TensorShapeProto shape = 4; + bool has_shape() const; + private: + bool _internal_has_shape() const; + public: + void clear_shape(); + const ::tensorflow::TensorShapeProto& shape() const; + PROTOBUF_NODISCARD ::tensorflow::TensorShapeProto* release_shape(); + ::tensorflow::TensorShapeProto* mutable_shape(); + void set_allocated_shape(::tensorflow::TensorShapeProto* shape); + private: + const ::tensorflow::TensorShapeProto& _internal_shape() const; + ::tensorflow::TensorShapeProto* _internal_mutable_shape(); + public: + void unsafe_arena_set_allocated_shape( + ::tensorflow::TensorShapeProto* shape); + ::tensorflow::TensorShapeProto* unsafe_arena_release_shape(); + + // int32 type = 2; + void clear_type(); + int32_t type() const; + void set_type(int32_t value); + private: + int32_t _internal_type() const; + void _internal_set_type(int32_t value); + public: + + // .tensorflow.DataType data_type = 3; + void clear_data_type(); + ::tensorflow::DataType data_type() const; + void set_data_type(::tensorflow::DataType value); + private: + ::tensorflow::DataType _internal_data_type() const; + void _internal_set_data_type(::tensorflow::DataType value); + public: + + // int32 group_key = 5; + void clear_group_key(); + int32_t group_key() const; + void set_group_key(int32_t value); + private: + int32_t _internal_group_key() const; + void _internal_set_group_key(int32_t value); + public: + + // int32 group_size = 6; + void clear_group_size(); + int32_t group_size() const; + void set_group_size(int32_t value); + private: + int32_t _internal_group_size() const; + void _internal_set_group_size(int32_t value); + public: + + // int32 instance_key = 7; + void clear_instance_key(); + int32_t instance_key() const; + void set_instance_key(int32_t value); + private: + int32_t _internal_instance_key() const; + void _internal_set_instance_key(int32_t value); + public: + + // bool is_source = 11; + void clear_is_source(); + bool is_source() const; + void set_is_source(bool value); + private: + bool _internal_is_source() const; + void _internal_set_is_source(bool value); + public: + + // int64 step_id = 12; + void clear_step_id(); + int64_t step_id() const; + void set_step_id(int64_t value); + private: + int64_t _internal_step_id() const; + void _internal_set_step_id(int64_t value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.CompleteInstanceRequest) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t > subdiv_offset_; + mutable std::atomic _subdiv_offset_cached_byte_size_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr device_type_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr device_; + ::tensorflow::TensorShapeProto* shape_; + int32_t type_; + int data_type_; + int32_t group_key_; + int32_t group_size_; + int32_t instance_key_; + bool is_source_; + int64_t step_id_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fworker_2eproto; +}; +// ------------------------------------------------------------------- + +class CompleteInstanceResponse final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.CompleteInstanceResponse) */ { + public: + inline CompleteInstanceResponse() : CompleteInstanceResponse(nullptr) {} + ~CompleteInstanceResponse() override; + explicit PROTOBUF_CONSTEXPR CompleteInstanceResponse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + CompleteInstanceResponse(const CompleteInstanceResponse& from); + CompleteInstanceResponse(CompleteInstanceResponse&& from) noexcept + : CompleteInstanceResponse() { + *this = ::std::move(from); + } + + inline CompleteInstanceResponse& operator=(const CompleteInstanceResponse& from) { + CopyFrom(from); + return *this; + } + inline CompleteInstanceResponse& operator=(CompleteInstanceResponse&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const CompleteInstanceResponse& default_instance() { + return *internal_default_instance(); + } + static inline const CompleteInstanceResponse* internal_default_instance() { + return reinterpret_cast( + &_CompleteInstanceResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = + 32; + + friend void swap(CompleteInstanceResponse& a, CompleteInstanceResponse& b) { + a.Swap(&b); + } + inline void Swap(CompleteInstanceResponse* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(CompleteInstanceResponse* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + CompleteInstanceResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const CompleteInstanceResponse& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const CompleteInstanceResponse& from) { + CompleteInstanceResponse::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(CompleteInstanceResponse* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.CompleteInstanceResponse"; + } + protected: + explicit CompleteInstanceResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kInstanceKeyFieldNumber = 1, + kSourceRankFieldNumber = 2, + }; + // int32 instance_key = 1; + void clear_instance_key(); + int32_t instance_key() const; + void set_instance_key(int32_t value); + private: + int32_t _internal_instance_key() const; + void _internal_set_instance_key(int32_t value); + public: + + // int32 source_rank = 2; + void clear_source_rank(); + int32_t source_rank() const; + void set_source_rank(int32_t value); + private: + int32_t _internal_source_rank() const; + void _internal_set_source_rank(int32_t value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.CompleteInstanceResponse) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + int32_t instance_key_; + int32_t source_rank_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fworker_2eproto; +}; +// ------------------------------------------------------------------- + +class GetStepSequenceRequest final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.GetStepSequenceRequest) */ { + public: + inline GetStepSequenceRequest() : GetStepSequenceRequest(nullptr) {} + ~GetStepSequenceRequest() override; + explicit PROTOBUF_CONSTEXPR GetStepSequenceRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + GetStepSequenceRequest(const GetStepSequenceRequest& from); + GetStepSequenceRequest(GetStepSequenceRequest&& from) noexcept + : GetStepSequenceRequest() { + *this = ::std::move(from); + } + + inline GetStepSequenceRequest& operator=(const GetStepSequenceRequest& from) { + CopyFrom(from); + return *this; + } + inline GetStepSequenceRequest& operator=(GetStepSequenceRequest&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const GetStepSequenceRequest& default_instance() { + return *internal_default_instance(); + } + static inline const GetStepSequenceRequest* internal_default_instance() { + return reinterpret_cast( + &_GetStepSequenceRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 33; + + friend void swap(GetStepSequenceRequest& a, GetStepSequenceRequest& b) { + a.Swap(&b); + } + inline void Swap(GetStepSequenceRequest* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(GetStepSequenceRequest* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + GetStepSequenceRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const GetStepSequenceRequest& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const GetStepSequenceRequest& from) { + GetStepSequenceRequest::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(GetStepSequenceRequest* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.GetStepSequenceRequest"; + } + protected: + explicit GetStepSequenceRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kGraphKeyFieldNumber = 1, + }; + // repeated int64 graph_key = 1; + int graph_key_size() const; + private: + int _internal_graph_key_size() const; + public: + void clear_graph_key(); + private: + int64_t _internal_graph_key(int index) const; + const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >& + _internal_graph_key() const; + void _internal_add_graph_key(int64_t value); + ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >* + _internal_mutable_graph_key(); + public: + int64_t graph_key(int index) const; + void set_graph_key(int index, int64_t value); + void add_graph_key(int64_t value); + const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >& + graph_key() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >* + mutable_graph_key(); + + // @@protoc_insertion_point(class_scope:tensorflow.GetStepSequenceRequest) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t > graph_key_; + mutable std::atomic _graph_key_cached_byte_size_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fworker_2eproto; +}; +// ------------------------------------------------------------------- + +class StepSequence final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.StepSequence) */ { + public: + inline StepSequence() : StepSequence(nullptr) {} + ~StepSequence() override; + explicit PROTOBUF_CONSTEXPR StepSequence(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + StepSequence(const StepSequence& from); + StepSequence(StepSequence&& from) noexcept + : StepSequence() { + *this = ::std::move(from); + } + + inline StepSequence& operator=(const StepSequence& from) { + CopyFrom(from); + return *this; + } + inline StepSequence& operator=(StepSequence&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const StepSequence& default_instance() { + return *internal_default_instance(); + } + static inline const StepSequence* internal_default_instance() { + return reinterpret_cast( + &_StepSequence_default_instance_); + } + static constexpr int kIndexInFileMessages = + 34; + + friend void swap(StepSequence& a, StepSequence& b) { + a.Swap(&b); + } + inline void Swap(StepSequence* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(StepSequence* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + StepSequence* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const StepSequence& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const StepSequence& from) { + StepSequence::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(StepSequence* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.StepSequence"; + } + protected: + explicit StepSequence(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kGraphKeyFieldNumber = 1, + kNextStepIdFieldNumber = 2, + }; + // int64 graph_key = 1; + void clear_graph_key(); + int64_t graph_key() const; + void set_graph_key(int64_t value); + private: + int64_t _internal_graph_key() const; + void _internal_set_graph_key(int64_t value); + public: + + // int64 next_step_id = 2; + void clear_next_step_id(); + int64_t next_step_id() const; + void set_next_step_id(int64_t value); + private: + int64_t _internal_next_step_id() const; + void _internal_set_next_step_id(int64_t value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.StepSequence) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + int64_t graph_key_; + int64_t next_step_id_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fworker_2eproto; +}; +// ------------------------------------------------------------------- + +class GetStepSequenceResponse final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.GetStepSequenceResponse) */ { + public: + inline GetStepSequenceResponse() : GetStepSequenceResponse(nullptr) {} + ~GetStepSequenceResponse() override; + explicit PROTOBUF_CONSTEXPR GetStepSequenceResponse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + GetStepSequenceResponse(const GetStepSequenceResponse& from); + GetStepSequenceResponse(GetStepSequenceResponse&& from) noexcept + : GetStepSequenceResponse() { + *this = ::std::move(from); + } + + inline GetStepSequenceResponse& operator=(const GetStepSequenceResponse& from) { + CopyFrom(from); + return *this; + } + inline GetStepSequenceResponse& operator=(GetStepSequenceResponse&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const GetStepSequenceResponse& default_instance() { + return *internal_default_instance(); + } + static inline const GetStepSequenceResponse* internal_default_instance() { + return reinterpret_cast( + &_GetStepSequenceResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = + 35; + + friend void swap(GetStepSequenceResponse& a, GetStepSequenceResponse& b) { + a.Swap(&b); + } + inline void Swap(GetStepSequenceResponse* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(GetStepSequenceResponse* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + GetStepSequenceResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const GetStepSequenceResponse& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const GetStepSequenceResponse& from) { + GetStepSequenceResponse::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(GetStepSequenceResponse* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.GetStepSequenceResponse"; + } + protected: + explicit GetStepSequenceResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kStepSequenceFieldNumber = 1, + }; + // repeated .tensorflow.StepSequence step_sequence = 1; + int step_sequence_size() const; + private: + int _internal_step_sequence_size() const; + public: + void clear_step_sequence(); + ::tensorflow::StepSequence* mutable_step_sequence(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::StepSequence >* + mutable_step_sequence(); + private: + const ::tensorflow::StepSequence& _internal_step_sequence(int index) const; + ::tensorflow::StepSequence* _internal_add_step_sequence(); + public: + const ::tensorflow::StepSequence& step_sequence(int index) const; + ::tensorflow::StepSequence* add_step_sequence(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::StepSequence >& + step_sequence() const; + + // @@protoc_insertion_point(class_scope:tensorflow.GetStepSequenceResponse) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::StepSequence > step_sequence_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fworker_2eproto; +}; +// =================================================================== + + +// =================================================================== + +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// GetStatusRequest + +// ------------------------------------------------------------------- + +// GetStatusResponse + +// repeated .tensorflow.DeviceAttributes device_attributes = 1; +inline int GetStatusResponse::_internal_device_attributes_size() const { + return _impl_.device_attributes_.size(); +} +inline int GetStatusResponse::device_attributes_size() const { + return _internal_device_attributes_size(); +} +inline ::tensorflow::DeviceAttributes* GetStatusResponse::mutable_device_attributes(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.GetStatusResponse.device_attributes) + return _impl_.device_attributes_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::DeviceAttributes >* +GetStatusResponse::mutable_device_attributes() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.GetStatusResponse.device_attributes) + return &_impl_.device_attributes_; +} +inline const ::tensorflow::DeviceAttributes& GetStatusResponse::_internal_device_attributes(int index) const { + return _impl_.device_attributes_.Get(index); +} +inline const ::tensorflow::DeviceAttributes& GetStatusResponse::device_attributes(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.GetStatusResponse.device_attributes) + return _internal_device_attributes(index); +} +inline ::tensorflow::DeviceAttributes* GetStatusResponse::_internal_add_device_attributes() { + return _impl_.device_attributes_.Add(); +} +inline ::tensorflow::DeviceAttributes* GetStatusResponse::add_device_attributes() { + ::tensorflow::DeviceAttributes* _add = _internal_add_device_attributes(); + // @@protoc_insertion_point(field_add:tensorflow.GetStatusResponse.device_attributes) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::DeviceAttributes >& +GetStatusResponse::device_attributes() const { + // @@protoc_insertion_point(field_list:tensorflow.GetStatusResponse.device_attributes) + return _impl_.device_attributes_; +} + +// ------------------------------------------------------------------- + +// CreateWorkerSessionRequest + +// string session_handle = 1; +inline void CreateWorkerSessionRequest::clear_session_handle() { + _impl_.session_handle_.ClearToEmpty(); +} +inline const std::string& CreateWorkerSessionRequest::session_handle() const { + // @@protoc_insertion_point(field_get:tensorflow.CreateWorkerSessionRequest.session_handle) + return _internal_session_handle(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void CreateWorkerSessionRequest::set_session_handle(ArgT0&& arg0, ArgT... args) { + + _impl_.session_handle_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.CreateWorkerSessionRequest.session_handle) +} +inline std::string* CreateWorkerSessionRequest::mutable_session_handle() { + std::string* _s = _internal_mutable_session_handle(); + // @@protoc_insertion_point(field_mutable:tensorflow.CreateWorkerSessionRequest.session_handle) + return _s; +} +inline const std::string& CreateWorkerSessionRequest::_internal_session_handle() const { + return _impl_.session_handle_.Get(); +} +inline void CreateWorkerSessionRequest::_internal_set_session_handle(const std::string& value) { + + _impl_.session_handle_.Set(value, GetArenaForAllocation()); +} +inline std::string* CreateWorkerSessionRequest::_internal_mutable_session_handle() { + + return _impl_.session_handle_.Mutable(GetArenaForAllocation()); +} +inline std::string* CreateWorkerSessionRequest::release_session_handle() { + // @@protoc_insertion_point(field_release:tensorflow.CreateWorkerSessionRequest.session_handle) + return _impl_.session_handle_.Release(); +} +inline void CreateWorkerSessionRequest::set_allocated_session_handle(std::string* session_handle) { + if (session_handle != nullptr) { + + } else { + + } + _impl_.session_handle_.SetAllocated(session_handle, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.session_handle_.IsDefault()) { + _impl_.session_handle_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.CreateWorkerSessionRequest.session_handle) +} + +// .tensorflow.ServerDef server_def = 2; +inline bool CreateWorkerSessionRequest::_internal_has_server_def() const { + return this != internal_default_instance() && _impl_.server_def_ != nullptr; +} +inline bool CreateWorkerSessionRequest::has_server_def() const { + return _internal_has_server_def(); +} +inline const ::tensorflow::ServerDef& CreateWorkerSessionRequest::_internal_server_def() const { + const ::tensorflow::ServerDef* p = _impl_.server_def_; + return p != nullptr ? *p : reinterpret_cast( + ::tensorflow::_ServerDef_default_instance_); +} +inline const ::tensorflow::ServerDef& CreateWorkerSessionRequest::server_def() const { + // @@protoc_insertion_point(field_get:tensorflow.CreateWorkerSessionRequest.server_def) + return _internal_server_def(); +} +inline void CreateWorkerSessionRequest::unsafe_arena_set_allocated_server_def( + ::tensorflow::ServerDef* server_def) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.server_def_); + } + _impl_.server_def_ = server_def; + if (server_def) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.CreateWorkerSessionRequest.server_def) +} +inline ::tensorflow::ServerDef* CreateWorkerSessionRequest::release_server_def() { + + ::tensorflow::ServerDef* temp = _impl_.server_def_; + _impl_.server_def_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tensorflow::ServerDef* CreateWorkerSessionRequest::unsafe_arena_release_server_def() { + // @@protoc_insertion_point(field_release:tensorflow.CreateWorkerSessionRequest.server_def) + + ::tensorflow::ServerDef* temp = _impl_.server_def_; + _impl_.server_def_ = nullptr; + return temp; +} +inline ::tensorflow::ServerDef* CreateWorkerSessionRequest::_internal_mutable_server_def() { + + if (_impl_.server_def_ == nullptr) { + auto* p = CreateMaybeMessage<::tensorflow::ServerDef>(GetArenaForAllocation()); + _impl_.server_def_ = p; + } + return _impl_.server_def_; +} +inline ::tensorflow::ServerDef* CreateWorkerSessionRequest::mutable_server_def() { + ::tensorflow::ServerDef* _msg = _internal_mutable_server_def(); + // @@protoc_insertion_point(field_mutable:tensorflow.CreateWorkerSessionRequest.server_def) + return _msg; +} +inline void CreateWorkerSessionRequest::set_allocated_server_def(::tensorflow::ServerDef* server_def) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.server_def_); + } + if (server_def) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( + reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(server_def)); + if (message_arena != submessage_arena) { + server_def = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, server_def, submessage_arena); + } + + } else { + + } + _impl_.server_def_ = server_def; + // @@protoc_insertion_point(field_set_allocated:tensorflow.CreateWorkerSessionRequest.server_def) +} + +// bool isolate_session_state = 3; +inline void CreateWorkerSessionRequest::clear_isolate_session_state() { + _impl_.isolate_session_state_ = false; +} +inline bool CreateWorkerSessionRequest::_internal_isolate_session_state() const { + return _impl_.isolate_session_state_; +} +inline bool CreateWorkerSessionRequest::isolate_session_state() const { + // @@protoc_insertion_point(field_get:tensorflow.CreateWorkerSessionRequest.isolate_session_state) + return _internal_isolate_session_state(); +} +inline void CreateWorkerSessionRequest::_internal_set_isolate_session_state(bool value) { + + _impl_.isolate_session_state_ = value; +} +inline void CreateWorkerSessionRequest::set_isolate_session_state(bool value) { + _internal_set_isolate_session_state(value); + // @@protoc_insertion_point(field_set:tensorflow.CreateWorkerSessionRequest.isolate_session_state) +} + +// repeated .tensorflow.DeviceAttributes cluster_device_attributes = 4; +inline int CreateWorkerSessionRequest::_internal_cluster_device_attributes_size() const { + return _impl_.cluster_device_attributes_.size(); +} +inline int CreateWorkerSessionRequest::cluster_device_attributes_size() const { + return _internal_cluster_device_attributes_size(); +} +inline ::tensorflow::DeviceAttributes* CreateWorkerSessionRequest::mutable_cluster_device_attributes(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.CreateWorkerSessionRequest.cluster_device_attributes) + return _impl_.cluster_device_attributes_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::DeviceAttributes >* +CreateWorkerSessionRequest::mutable_cluster_device_attributes() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.CreateWorkerSessionRequest.cluster_device_attributes) + return &_impl_.cluster_device_attributes_; +} +inline const ::tensorflow::DeviceAttributes& CreateWorkerSessionRequest::_internal_cluster_device_attributes(int index) const { + return _impl_.cluster_device_attributes_.Get(index); +} +inline const ::tensorflow::DeviceAttributes& CreateWorkerSessionRequest::cluster_device_attributes(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.CreateWorkerSessionRequest.cluster_device_attributes) + return _internal_cluster_device_attributes(index); +} +inline ::tensorflow::DeviceAttributes* CreateWorkerSessionRequest::_internal_add_cluster_device_attributes() { + return _impl_.cluster_device_attributes_.Add(); +} +inline ::tensorflow::DeviceAttributes* CreateWorkerSessionRequest::add_cluster_device_attributes() { + ::tensorflow::DeviceAttributes* _add = _internal_add_cluster_device_attributes(); + // @@protoc_insertion_point(field_add:tensorflow.CreateWorkerSessionRequest.cluster_device_attributes) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::DeviceAttributes >& +CreateWorkerSessionRequest::cluster_device_attributes() const { + // @@protoc_insertion_point(field_list:tensorflow.CreateWorkerSessionRequest.cluster_device_attributes) + return _impl_.cluster_device_attributes_; +} + +// string master_task = 5; +inline void CreateWorkerSessionRequest::clear_master_task() { + _impl_.master_task_.ClearToEmpty(); +} +inline const std::string& CreateWorkerSessionRequest::master_task() const { + // @@protoc_insertion_point(field_get:tensorflow.CreateWorkerSessionRequest.master_task) + return _internal_master_task(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void CreateWorkerSessionRequest::set_master_task(ArgT0&& arg0, ArgT... args) { + + _impl_.master_task_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.CreateWorkerSessionRequest.master_task) +} +inline std::string* CreateWorkerSessionRequest::mutable_master_task() { + std::string* _s = _internal_mutable_master_task(); + // @@protoc_insertion_point(field_mutable:tensorflow.CreateWorkerSessionRequest.master_task) + return _s; +} +inline const std::string& CreateWorkerSessionRequest::_internal_master_task() const { + return _impl_.master_task_.Get(); +} +inline void CreateWorkerSessionRequest::_internal_set_master_task(const std::string& value) { + + _impl_.master_task_.Set(value, GetArenaForAllocation()); +} +inline std::string* CreateWorkerSessionRequest::_internal_mutable_master_task() { + + return _impl_.master_task_.Mutable(GetArenaForAllocation()); +} +inline std::string* CreateWorkerSessionRequest::release_master_task() { + // @@protoc_insertion_point(field_release:tensorflow.CreateWorkerSessionRequest.master_task) + return _impl_.master_task_.Release(); +} +inline void CreateWorkerSessionRequest::set_allocated_master_task(std::string* master_task) { + if (master_task != nullptr) { + + } else { + + } + _impl_.master_task_.SetAllocated(master_task, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.master_task_.IsDefault()) { + _impl_.master_task_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.CreateWorkerSessionRequest.master_task) +} + +// int64 master_incarnation = 6; +inline void CreateWorkerSessionRequest::clear_master_incarnation() { + _impl_.master_incarnation_ = int64_t{0}; +} +inline int64_t CreateWorkerSessionRequest::_internal_master_incarnation() const { + return _impl_.master_incarnation_; +} +inline int64_t CreateWorkerSessionRequest::master_incarnation() const { + // @@protoc_insertion_point(field_get:tensorflow.CreateWorkerSessionRequest.master_incarnation) + return _internal_master_incarnation(); +} +inline void CreateWorkerSessionRequest::_internal_set_master_incarnation(int64_t value) { + + _impl_.master_incarnation_ = value; +} +inline void CreateWorkerSessionRequest::set_master_incarnation(int64_t value) { + _internal_set_master_incarnation(value); + // @@protoc_insertion_point(field_set:tensorflow.CreateWorkerSessionRequest.master_incarnation) +} + +// ------------------------------------------------------------------- + +// CreateWorkerSessionResponse + +// ------------------------------------------------------------------- + +// DeleteWorkerSessionRequest + +// string session_handle = 1; +inline void DeleteWorkerSessionRequest::clear_session_handle() { + _impl_.session_handle_.ClearToEmpty(); +} +inline const std::string& DeleteWorkerSessionRequest::session_handle() const { + // @@protoc_insertion_point(field_get:tensorflow.DeleteWorkerSessionRequest.session_handle) + return _internal_session_handle(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void DeleteWorkerSessionRequest::set_session_handle(ArgT0&& arg0, ArgT... args) { + + _impl_.session_handle_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.DeleteWorkerSessionRequest.session_handle) +} +inline std::string* DeleteWorkerSessionRequest::mutable_session_handle() { + std::string* _s = _internal_mutable_session_handle(); + // @@protoc_insertion_point(field_mutable:tensorflow.DeleteWorkerSessionRequest.session_handle) + return _s; +} +inline const std::string& DeleteWorkerSessionRequest::_internal_session_handle() const { + return _impl_.session_handle_.Get(); +} +inline void DeleteWorkerSessionRequest::_internal_set_session_handle(const std::string& value) { + + _impl_.session_handle_.Set(value, GetArenaForAllocation()); +} +inline std::string* DeleteWorkerSessionRequest::_internal_mutable_session_handle() { + + return _impl_.session_handle_.Mutable(GetArenaForAllocation()); +} +inline std::string* DeleteWorkerSessionRequest::release_session_handle() { + // @@protoc_insertion_point(field_release:tensorflow.DeleteWorkerSessionRequest.session_handle) + return _impl_.session_handle_.Release(); +} +inline void DeleteWorkerSessionRequest::set_allocated_session_handle(std::string* session_handle) { + if (session_handle != nullptr) { + + } else { + + } + _impl_.session_handle_.SetAllocated(session_handle, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.session_handle_.IsDefault()) { + _impl_.session_handle_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.DeleteWorkerSessionRequest.session_handle) +} + +// ------------------------------------------------------------------- + +// DeleteWorkerSessionResponse + +// ------------------------------------------------------------------- + +// RegisterGraphRequest + +// string session_handle = 1; +inline void RegisterGraphRequest::clear_session_handle() { + _impl_.session_handle_.ClearToEmpty(); +} +inline const std::string& RegisterGraphRequest::session_handle() const { + // @@protoc_insertion_point(field_get:tensorflow.RegisterGraphRequest.session_handle) + return _internal_session_handle(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void RegisterGraphRequest::set_session_handle(ArgT0&& arg0, ArgT... args) { + + _impl_.session_handle_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.RegisterGraphRequest.session_handle) +} +inline std::string* RegisterGraphRequest::mutable_session_handle() { + std::string* _s = _internal_mutable_session_handle(); + // @@protoc_insertion_point(field_mutable:tensorflow.RegisterGraphRequest.session_handle) + return _s; +} +inline const std::string& RegisterGraphRequest::_internal_session_handle() const { + return _impl_.session_handle_.Get(); +} +inline void RegisterGraphRequest::_internal_set_session_handle(const std::string& value) { + + _impl_.session_handle_.Set(value, GetArenaForAllocation()); +} +inline std::string* RegisterGraphRequest::_internal_mutable_session_handle() { + + return _impl_.session_handle_.Mutable(GetArenaForAllocation()); +} +inline std::string* RegisterGraphRequest::release_session_handle() { + // @@protoc_insertion_point(field_release:tensorflow.RegisterGraphRequest.session_handle) + return _impl_.session_handle_.Release(); +} +inline void RegisterGraphRequest::set_allocated_session_handle(std::string* session_handle) { + if (session_handle != nullptr) { + + } else { + + } + _impl_.session_handle_.SetAllocated(session_handle, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.session_handle_.IsDefault()) { + _impl_.session_handle_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.RegisterGraphRequest.session_handle) +} + +// bool create_worker_session_called = 6; +inline void RegisterGraphRequest::clear_create_worker_session_called() { + _impl_.create_worker_session_called_ = false; +} +inline bool RegisterGraphRequest::_internal_create_worker_session_called() const { + return _impl_.create_worker_session_called_; +} +inline bool RegisterGraphRequest::create_worker_session_called() const { + // @@protoc_insertion_point(field_get:tensorflow.RegisterGraphRequest.create_worker_session_called) + return _internal_create_worker_session_called(); +} +inline void RegisterGraphRequest::_internal_set_create_worker_session_called(bool value) { + + _impl_.create_worker_session_called_ = value; +} +inline void RegisterGraphRequest::set_create_worker_session_called(bool value) { + _internal_set_create_worker_session_called(value); + // @@protoc_insertion_point(field_set:tensorflow.RegisterGraphRequest.create_worker_session_called) +} + +// .tensorflow.GraphDef graph_def = 2; +inline bool RegisterGraphRequest::_internal_has_graph_def() const { + return this != internal_default_instance() && _impl_.graph_def_ != nullptr; +} +inline bool RegisterGraphRequest::has_graph_def() const { + return _internal_has_graph_def(); +} +inline const ::tensorflow::GraphDef& RegisterGraphRequest::_internal_graph_def() const { + const ::tensorflow::GraphDef* p = _impl_.graph_def_; + return p != nullptr ? *p : reinterpret_cast( + ::tensorflow::_GraphDef_default_instance_); +} +inline const ::tensorflow::GraphDef& RegisterGraphRequest::graph_def() const { + // @@protoc_insertion_point(field_get:tensorflow.RegisterGraphRequest.graph_def) + return _internal_graph_def(); +} +inline void RegisterGraphRequest::unsafe_arena_set_allocated_graph_def( + ::tensorflow::GraphDef* graph_def) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.graph_def_); + } + _impl_.graph_def_ = graph_def; + if (graph_def) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.RegisterGraphRequest.graph_def) +} +inline ::tensorflow::GraphDef* RegisterGraphRequest::release_graph_def() { + + ::tensorflow::GraphDef* temp = _impl_.graph_def_; + _impl_.graph_def_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tensorflow::GraphDef* RegisterGraphRequest::unsafe_arena_release_graph_def() { + // @@protoc_insertion_point(field_release:tensorflow.RegisterGraphRequest.graph_def) + + ::tensorflow::GraphDef* temp = _impl_.graph_def_; + _impl_.graph_def_ = nullptr; + return temp; +} +inline ::tensorflow::GraphDef* RegisterGraphRequest::_internal_mutable_graph_def() { + + if (_impl_.graph_def_ == nullptr) { + auto* p = CreateMaybeMessage<::tensorflow::GraphDef>(GetArenaForAllocation()); + _impl_.graph_def_ = p; + } + return _impl_.graph_def_; +} +inline ::tensorflow::GraphDef* RegisterGraphRequest::mutable_graph_def() { + ::tensorflow::GraphDef* _msg = _internal_mutable_graph_def(); + // @@protoc_insertion_point(field_mutable:tensorflow.RegisterGraphRequest.graph_def) + return _msg; +} +inline void RegisterGraphRequest::set_allocated_graph_def(::tensorflow::GraphDef* graph_def) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.graph_def_); + } + if (graph_def) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( + reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(graph_def)); + if (message_arena != submessage_arena) { + graph_def = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, graph_def, submessage_arena); + } + + } else { + + } + _impl_.graph_def_ = graph_def; + // @@protoc_insertion_point(field_set_allocated:tensorflow.RegisterGraphRequest.graph_def) +} + +// bool has_control_flow = 3 [deprecated = true]; +inline void RegisterGraphRequest::clear_has_control_flow() { + _impl_.has_control_flow_ = false; +} +inline bool RegisterGraphRequest::_internal_has_control_flow() const { + return _impl_.has_control_flow_; +} +inline bool RegisterGraphRequest::has_control_flow() const { + // @@protoc_insertion_point(field_get:tensorflow.RegisterGraphRequest.has_control_flow) + return _internal_has_control_flow(); +} +inline void RegisterGraphRequest::_internal_set_has_control_flow(bool value) { + + _impl_.has_control_flow_ = value; +} +inline void RegisterGraphRequest::set_has_control_flow(bool value) { + _internal_set_has_control_flow(value); + // @@protoc_insertion_point(field_set:tensorflow.RegisterGraphRequest.has_control_flow) +} + +// .tensorflow.GraphOptions graph_options = 4; +inline bool RegisterGraphRequest::_internal_has_graph_options() const { + return this != internal_default_instance() && _impl_.graph_options_ != nullptr; +} +inline bool RegisterGraphRequest::has_graph_options() const { + return _internal_has_graph_options(); +} +inline const ::tensorflow::GraphOptions& RegisterGraphRequest::_internal_graph_options() const { + const ::tensorflow::GraphOptions* p = _impl_.graph_options_; + return p != nullptr ? *p : reinterpret_cast( + ::tensorflow::_GraphOptions_default_instance_); +} +inline const ::tensorflow::GraphOptions& RegisterGraphRequest::graph_options() const { + // @@protoc_insertion_point(field_get:tensorflow.RegisterGraphRequest.graph_options) + return _internal_graph_options(); +} +inline void RegisterGraphRequest::unsafe_arena_set_allocated_graph_options( + ::tensorflow::GraphOptions* graph_options) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.graph_options_); + } + _impl_.graph_options_ = graph_options; + if (graph_options) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.RegisterGraphRequest.graph_options) +} +inline ::tensorflow::GraphOptions* RegisterGraphRequest::release_graph_options() { + + ::tensorflow::GraphOptions* temp = _impl_.graph_options_; + _impl_.graph_options_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tensorflow::GraphOptions* RegisterGraphRequest::unsafe_arena_release_graph_options() { + // @@protoc_insertion_point(field_release:tensorflow.RegisterGraphRequest.graph_options) + + ::tensorflow::GraphOptions* temp = _impl_.graph_options_; + _impl_.graph_options_ = nullptr; + return temp; +} +inline ::tensorflow::GraphOptions* RegisterGraphRequest::_internal_mutable_graph_options() { + + if (_impl_.graph_options_ == nullptr) { + auto* p = CreateMaybeMessage<::tensorflow::GraphOptions>(GetArenaForAllocation()); + _impl_.graph_options_ = p; + } + return _impl_.graph_options_; +} +inline ::tensorflow::GraphOptions* RegisterGraphRequest::mutable_graph_options() { + ::tensorflow::GraphOptions* _msg = _internal_mutable_graph_options(); + // @@protoc_insertion_point(field_mutable:tensorflow.RegisterGraphRequest.graph_options) + return _msg; +} +inline void RegisterGraphRequest::set_allocated_graph_options(::tensorflow::GraphOptions* graph_options) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.graph_options_); + } + if (graph_options) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( + reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(graph_options)); + if (message_arena != submessage_arena) { + graph_options = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, graph_options, submessage_arena); + } + + } else { + + } + _impl_.graph_options_ = graph_options; + // @@protoc_insertion_point(field_set_allocated:tensorflow.RegisterGraphRequest.graph_options) +} + +// .tensorflow.DebugOptions debug_options = 5; +inline bool RegisterGraphRequest::_internal_has_debug_options() const { + return this != internal_default_instance() && _impl_.debug_options_ != nullptr; +} +inline bool RegisterGraphRequest::has_debug_options() const { + return _internal_has_debug_options(); +} +inline const ::tensorflow::DebugOptions& RegisterGraphRequest::_internal_debug_options() const { + const ::tensorflow::DebugOptions* p = _impl_.debug_options_; + return p != nullptr ? *p : reinterpret_cast( + ::tensorflow::_DebugOptions_default_instance_); +} +inline const ::tensorflow::DebugOptions& RegisterGraphRequest::debug_options() const { + // @@protoc_insertion_point(field_get:tensorflow.RegisterGraphRequest.debug_options) + return _internal_debug_options(); +} +inline void RegisterGraphRequest::unsafe_arena_set_allocated_debug_options( + ::tensorflow::DebugOptions* debug_options) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.debug_options_); + } + _impl_.debug_options_ = debug_options; + if (debug_options) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.RegisterGraphRequest.debug_options) +} +inline ::tensorflow::DebugOptions* RegisterGraphRequest::release_debug_options() { + + ::tensorflow::DebugOptions* temp = _impl_.debug_options_; + _impl_.debug_options_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tensorflow::DebugOptions* RegisterGraphRequest::unsafe_arena_release_debug_options() { + // @@protoc_insertion_point(field_release:tensorflow.RegisterGraphRequest.debug_options) + + ::tensorflow::DebugOptions* temp = _impl_.debug_options_; + _impl_.debug_options_ = nullptr; + return temp; +} +inline ::tensorflow::DebugOptions* RegisterGraphRequest::_internal_mutable_debug_options() { + + if (_impl_.debug_options_ == nullptr) { + auto* p = CreateMaybeMessage<::tensorflow::DebugOptions>(GetArenaForAllocation()); + _impl_.debug_options_ = p; + } + return _impl_.debug_options_; +} +inline ::tensorflow::DebugOptions* RegisterGraphRequest::mutable_debug_options() { + ::tensorflow::DebugOptions* _msg = _internal_mutable_debug_options(); + // @@protoc_insertion_point(field_mutable:tensorflow.RegisterGraphRequest.debug_options) + return _msg; +} +inline void RegisterGraphRequest::set_allocated_debug_options(::tensorflow::DebugOptions* debug_options) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.debug_options_); + } + if (debug_options) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( + reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(debug_options)); + if (message_arena != submessage_arena) { + debug_options = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, debug_options, submessage_arena); + } + + } else { + + } + _impl_.debug_options_ = debug_options; + // @@protoc_insertion_point(field_set_allocated:tensorflow.RegisterGraphRequest.debug_options) +} + +// int64 collective_graph_key = 7; +inline void RegisterGraphRequest::clear_collective_graph_key() { + _impl_.collective_graph_key_ = int64_t{0}; +} +inline int64_t RegisterGraphRequest::_internal_collective_graph_key() const { + return _impl_.collective_graph_key_; +} +inline int64_t RegisterGraphRequest::collective_graph_key() const { + // @@protoc_insertion_point(field_get:tensorflow.RegisterGraphRequest.collective_graph_key) + return _internal_collective_graph_key(); +} +inline void RegisterGraphRequest::_internal_set_collective_graph_key(int64_t value) { + + _impl_.collective_graph_key_ = value; +} +inline void RegisterGraphRequest::set_collective_graph_key(int64_t value) { + _internal_set_collective_graph_key(value); + // @@protoc_insertion_point(field_set:tensorflow.RegisterGraphRequest.collective_graph_key) +} + +// .tensorflow.ConfigProto config_proto = 8; +inline bool RegisterGraphRequest::_internal_has_config_proto() const { + return this != internal_default_instance() && _impl_.config_proto_ != nullptr; +} +inline bool RegisterGraphRequest::has_config_proto() const { + return _internal_has_config_proto(); +} +inline const ::tensorflow::ConfigProto& RegisterGraphRequest::_internal_config_proto() const { + const ::tensorflow::ConfigProto* p = _impl_.config_proto_; + return p != nullptr ? *p : reinterpret_cast( + ::tensorflow::_ConfigProto_default_instance_); +} +inline const ::tensorflow::ConfigProto& RegisterGraphRequest::config_proto() const { + // @@protoc_insertion_point(field_get:tensorflow.RegisterGraphRequest.config_proto) + return _internal_config_proto(); +} +inline void RegisterGraphRequest::unsafe_arena_set_allocated_config_proto( + ::tensorflow::ConfigProto* config_proto) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.config_proto_); + } + _impl_.config_proto_ = config_proto; + if (config_proto) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.RegisterGraphRequest.config_proto) +} +inline ::tensorflow::ConfigProto* RegisterGraphRequest::release_config_proto() { + + ::tensorflow::ConfigProto* temp = _impl_.config_proto_; + _impl_.config_proto_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tensorflow::ConfigProto* RegisterGraphRequest::unsafe_arena_release_config_proto() { + // @@protoc_insertion_point(field_release:tensorflow.RegisterGraphRequest.config_proto) + + ::tensorflow::ConfigProto* temp = _impl_.config_proto_; + _impl_.config_proto_ = nullptr; + return temp; +} +inline ::tensorflow::ConfigProto* RegisterGraphRequest::_internal_mutable_config_proto() { + + if (_impl_.config_proto_ == nullptr) { + auto* p = CreateMaybeMessage<::tensorflow::ConfigProto>(GetArenaForAllocation()); + _impl_.config_proto_ = p; + } + return _impl_.config_proto_; +} +inline ::tensorflow::ConfigProto* RegisterGraphRequest::mutable_config_proto() { + ::tensorflow::ConfigProto* _msg = _internal_mutable_config_proto(); + // @@protoc_insertion_point(field_mutable:tensorflow.RegisterGraphRequest.config_proto) + return _msg; +} +inline void RegisterGraphRequest::set_allocated_config_proto(::tensorflow::ConfigProto* config_proto) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.config_proto_); + } + if (config_proto) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( + reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(config_proto)); + if (message_arena != submessage_arena) { + config_proto = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, config_proto, submessage_arena); + } + + } else { + + } + _impl_.config_proto_ = config_proto; + // @@protoc_insertion_point(field_set_allocated:tensorflow.RegisterGraphRequest.config_proto) +} + +// ------------------------------------------------------------------- + +// RegisterGraphResponse + +// string graph_handle = 1; +inline void RegisterGraphResponse::clear_graph_handle() { + _impl_.graph_handle_.ClearToEmpty(); +} +inline const std::string& RegisterGraphResponse::graph_handle() const { + // @@protoc_insertion_point(field_get:tensorflow.RegisterGraphResponse.graph_handle) + return _internal_graph_handle(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void RegisterGraphResponse::set_graph_handle(ArgT0&& arg0, ArgT... args) { + + _impl_.graph_handle_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.RegisterGraphResponse.graph_handle) +} +inline std::string* RegisterGraphResponse::mutable_graph_handle() { + std::string* _s = _internal_mutable_graph_handle(); + // @@protoc_insertion_point(field_mutable:tensorflow.RegisterGraphResponse.graph_handle) + return _s; +} +inline const std::string& RegisterGraphResponse::_internal_graph_handle() const { + return _impl_.graph_handle_.Get(); +} +inline void RegisterGraphResponse::_internal_set_graph_handle(const std::string& value) { + + _impl_.graph_handle_.Set(value, GetArenaForAllocation()); +} +inline std::string* RegisterGraphResponse::_internal_mutable_graph_handle() { + + return _impl_.graph_handle_.Mutable(GetArenaForAllocation()); +} +inline std::string* RegisterGraphResponse::release_graph_handle() { + // @@protoc_insertion_point(field_release:tensorflow.RegisterGraphResponse.graph_handle) + return _impl_.graph_handle_.Release(); +} +inline void RegisterGraphResponse::set_allocated_graph_handle(std::string* graph_handle) { + if (graph_handle != nullptr) { + + } else { + + } + _impl_.graph_handle_.SetAllocated(graph_handle, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.graph_handle_.IsDefault()) { + _impl_.graph_handle_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.RegisterGraphResponse.graph_handle) +} + +// ------------------------------------------------------------------- + +// DeregisterGraphRequest + +// string session_handle = 2; +inline void DeregisterGraphRequest::clear_session_handle() { + _impl_.session_handle_.ClearToEmpty(); +} +inline const std::string& DeregisterGraphRequest::session_handle() const { + // @@protoc_insertion_point(field_get:tensorflow.DeregisterGraphRequest.session_handle) + return _internal_session_handle(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void DeregisterGraphRequest::set_session_handle(ArgT0&& arg0, ArgT... args) { + + _impl_.session_handle_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.DeregisterGraphRequest.session_handle) +} +inline std::string* DeregisterGraphRequest::mutable_session_handle() { + std::string* _s = _internal_mutable_session_handle(); + // @@protoc_insertion_point(field_mutable:tensorflow.DeregisterGraphRequest.session_handle) + return _s; +} +inline const std::string& DeregisterGraphRequest::_internal_session_handle() const { + return _impl_.session_handle_.Get(); +} +inline void DeregisterGraphRequest::_internal_set_session_handle(const std::string& value) { + + _impl_.session_handle_.Set(value, GetArenaForAllocation()); +} +inline std::string* DeregisterGraphRequest::_internal_mutable_session_handle() { + + return _impl_.session_handle_.Mutable(GetArenaForAllocation()); +} +inline std::string* DeregisterGraphRequest::release_session_handle() { + // @@protoc_insertion_point(field_release:tensorflow.DeregisterGraphRequest.session_handle) + return _impl_.session_handle_.Release(); +} +inline void DeregisterGraphRequest::set_allocated_session_handle(std::string* session_handle) { + if (session_handle != nullptr) { + + } else { + + } + _impl_.session_handle_.SetAllocated(session_handle, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.session_handle_.IsDefault()) { + _impl_.session_handle_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.DeregisterGraphRequest.session_handle) +} + +// bool create_worker_session_called = 3; +inline void DeregisterGraphRequest::clear_create_worker_session_called() { + _impl_.create_worker_session_called_ = false; +} +inline bool DeregisterGraphRequest::_internal_create_worker_session_called() const { + return _impl_.create_worker_session_called_; +} +inline bool DeregisterGraphRequest::create_worker_session_called() const { + // @@protoc_insertion_point(field_get:tensorflow.DeregisterGraphRequest.create_worker_session_called) + return _internal_create_worker_session_called(); +} +inline void DeregisterGraphRequest::_internal_set_create_worker_session_called(bool value) { + + _impl_.create_worker_session_called_ = value; +} +inline void DeregisterGraphRequest::set_create_worker_session_called(bool value) { + _internal_set_create_worker_session_called(value); + // @@protoc_insertion_point(field_set:tensorflow.DeregisterGraphRequest.create_worker_session_called) +} + +// string graph_handle = 1; +inline void DeregisterGraphRequest::clear_graph_handle() { + _impl_.graph_handle_.ClearToEmpty(); +} +inline const std::string& DeregisterGraphRequest::graph_handle() const { + // @@protoc_insertion_point(field_get:tensorflow.DeregisterGraphRequest.graph_handle) + return _internal_graph_handle(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void DeregisterGraphRequest::set_graph_handle(ArgT0&& arg0, ArgT... args) { + + _impl_.graph_handle_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.DeregisterGraphRequest.graph_handle) +} +inline std::string* DeregisterGraphRequest::mutable_graph_handle() { + std::string* _s = _internal_mutable_graph_handle(); + // @@protoc_insertion_point(field_mutable:tensorflow.DeregisterGraphRequest.graph_handle) + return _s; +} +inline const std::string& DeregisterGraphRequest::_internal_graph_handle() const { + return _impl_.graph_handle_.Get(); +} +inline void DeregisterGraphRequest::_internal_set_graph_handle(const std::string& value) { + + _impl_.graph_handle_.Set(value, GetArenaForAllocation()); +} +inline std::string* DeregisterGraphRequest::_internal_mutable_graph_handle() { + + return _impl_.graph_handle_.Mutable(GetArenaForAllocation()); +} +inline std::string* DeregisterGraphRequest::release_graph_handle() { + // @@protoc_insertion_point(field_release:tensorflow.DeregisterGraphRequest.graph_handle) + return _impl_.graph_handle_.Release(); +} +inline void DeregisterGraphRequest::set_allocated_graph_handle(std::string* graph_handle) { + if (graph_handle != nullptr) { + + } else { + + } + _impl_.graph_handle_.SetAllocated(graph_handle, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.graph_handle_.IsDefault()) { + _impl_.graph_handle_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.DeregisterGraphRequest.graph_handle) +} + +// ------------------------------------------------------------------- + +// DeregisterGraphResponse + +// ------------------------------------------------------------------- + +// CleanupAllRequest + +// repeated string container = 1; +inline int CleanupAllRequest::_internal_container_size() const { + return _impl_.container_.size(); +} +inline int CleanupAllRequest::container_size() const { + return _internal_container_size(); +} +inline void CleanupAllRequest::clear_container() { + _impl_.container_.Clear(); +} +inline std::string* CleanupAllRequest::add_container() { + std::string* _s = _internal_add_container(); + // @@protoc_insertion_point(field_add_mutable:tensorflow.CleanupAllRequest.container) + return _s; +} +inline const std::string& CleanupAllRequest::_internal_container(int index) const { + return _impl_.container_.Get(index); +} +inline const std::string& CleanupAllRequest::container(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.CleanupAllRequest.container) + return _internal_container(index); +} +inline std::string* CleanupAllRequest::mutable_container(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.CleanupAllRequest.container) + return _impl_.container_.Mutable(index); +} +inline void CleanupAllRequest::set_container(int index, const std::string& value) { + _impl_.container_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set:tensorflow.CleanupAllRequest.container) +} +inline void CleanupAllRequest::set_container(int index, std::string&& value) { + _impl_.container_.Mutable(index)->assign(std::move(value)); + // @@protoc_insertion_point(field_set:tensorflow.CleanupAllRequest.container) +} +inline void CleanupAllRequest::set_container(int index, const char* value) { + GOOGLE_DCHECK(value != nullptr); + _impl_.container_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set_char:tensorflow.CleanupAllRequest.container) +} +inline void CleanupAllRequest::set_container(int index, const char* value, size_t size) { + _impl_.container_.Mutable(index)->assign( + reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:tensorflow.CleanupAllRequest.container) +} +inline std::string* CleanupAllRequest::_internal_add_container() { + return _impl_.container_.Add(); +} +inline void CleanupAllRequest::add_container(const std::string& value) { + _impl_.container_.Add()->assign(value); + // @@protoc_insertion_point(field_add:tensorflow.CleanupAllRequest.container) +} +inline void CleanupAllRequest::add_container(std::string&& value) { + _impl_.container_.Add(std::move(value)); + // @@protoc_insertion_point(field_add:tensorflow.CleanupAllRequest.container) +} +inline void CleanupAllRequest::add_container(const char* value) { + GOOGLE_DCHECK(value != nullptr); + _impl_.container_.Add()->assign(value); + // @@protoc_insertion_point(field_add_char:tensorflow.CleanupAllRequest.container) +} +inline void CleanupAllRequest::add_container(const char* value, size_t size) { + _impl_.container_.Add()->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_add_pointer:tensorflow.CleanupAllRequest.container) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& +CleanupAllRequest::container() const { + // @@protoc_insertion_point(field_list:tensorflow.CleanupAllRequest.container) + return _impl_.container_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* +CleanupAllRequest::mutable_container() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.CleanupAllRequest.container) + return &_impl_.container_; +} + +// ------------------------------------------------------------------- + +// CleanupAllResponse + +// ------------------------------------------------------------------- + +// ExecutorOpts + +// bool record_costs = 1; +inline void ExecutorOpts::clear_record_costs() { + _impl_.record_costs_ = false; +} +inline bool ExecutorOpts::_internal_record_costs() const { + return _impl_.record_costs_; +} +inline bool ExecutorOpts::record_costs() const { + // @@protoc_insertion_point(field_get:tensorflow.ExecutorOpts.record_costs) + return _internal_record_costs(); +} +inline void ExecutorOpts::_internal_set_record_costs(bool value) { + + _impl_.record_costs_ = value; +} +inline void ExecutorOpts::set_record_costs(bool value) { + _internal_set_record_costs(value); + // @@protoc_insertion_point(field_set:tensorflow.ExecutorOpts.record_costs) +} + +// bool record_timeline = 3; +inline void ExecutorOpts::clear_record_timeline() { + _impl_.record_timeline_ = false; +} +inline bool ExecutorOpts::_internal_record_timeline() const { + return _impl_.record_timeline_; +} +inline bool ExecutorOpts::record_timeline() const { + // @@protoc_insertion_point(field_get:tensorflow.ExecutorOpts.record_timeline) + return _internal_record_timeline(); +} +inline void ExecutorOpts::_internal_set_record_timeline(bool value) { + + _impl_.record_timeline_ = value; +} +inline void ExecutorOpts::set_record_timeline(bool value) { + _internal_set_record_timeline(value); + // @@protoc_insertion_point(field_set:tensorflow.ExecutorOpts.record_timeline) +} + +// bool record_partition_graphs = 4; +inline void ExecutorOpts::clear_record_partition_graphs() { + _impl_.record_partition_graphs_ = false; +} +inline bool ExecutorOpts::_internal_record_partition_graphs() const { + return _impl_.record_partition_graphs_; +} +inline bool ExecutorOpts::record_partition_graphs() const { + // @@protoc_insertion_point(field_get:tensorflow.ExecutorOpts.record_partition_graphs) + return _internal_record_partition_graphs(); +} +inline void ExecutorOpts::_internal_set_record_partition_graphs(bool value) { + + _impl_.record_partition_graphs_ = value; +} +inline void ExecutorOpts::set_record_partition_graphs(bool value) { + _internal_set_record_partition_graphs(value); + // @@protoc_insertion_point(field_set:tensorflow.ExecutorOpts.record_partition_graphs) +} + +// bool report_tensor_allocations_upon_oom = 5; +inline void ExecutorOpts::clear_report_tensor_allocations_upon_oom() { + _impl_.report_tensor_allocations_upon_oom_ = false; +} +inline bool ExecutorOpts::_internal_report_tensor_allocations_upon_oom() const { + return _impl_.report_tensor_allocations_upon_oom_; +} +inline bool ExecutorOpts::report_tensor_allocations_upon_oom() const { + // @@protoc_insertion_point(field_get:tensorflow.ExecutorOpts.report_tensor_allocations_upon_oom) + return _internal_report_tensor_allocations_upon_oom(); +} +inline void ExecutorOpts::_internal_set_report_tensor_allocations_upon_oom(bool value) { + + _impl_.report_tensor_allocations_upon_oom_ = value; +} +inline void ExecutorOpts::set_report_tensor_allocations_upon_oom(bool value) { + _internal_set_report_tensor_allocations_upon_oom(value); + // @@protoc_insertion_point(field_set:tensorflow.ExecutorOpts.report_tensor_allocations_upon_oom) +} + +// ------------------------------------------------------------------- + +// RunGraphRequest + +// string session_handle = 8; +inline void RunGraphRequest::clear_session_handle() { + _impl_.session_handle_.ClearToEmpty(); +} +inline const std::string& RunGraphRequest::session_handle() const { + // @@protoc_insertion_point(field_get:tensorflow.RunGraphRequest.session_handle) + return _internal_session_handle(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void RunGraphRequest::set_session_handle(ArgT0&& arg0, ArgT... args) { + + _impl_.session_handle_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.RunGraphRequest.session_handle) +} +inline std::string* RunGraphRequest::mutable_session_handle() { + std::string* _s = _internal_mutable_session_handle(); + // @@protoc_insertion_point(field_mutable:tensorflow.RunGraphRequest.session_handle) + return _s; +} +inline const std::string& RunGraphRequest::_internal_session_handle() const { + return _impl_.session_handle_.Get(); +} +inline void RunGraphRequest::_internal_set_session_handle(const std::string& value) { + + _impl_.session_handle_.Set(value, GetArenaForAllocation()); +} +inline std::string* RunGraphRequest::_internal_mutable_session_handle() { + + return _impl_.session_handle_.Mutable(GetArenaForAllocation()); +} +inline std::string* RunGraphRequest::release_session_handle() { + // @@protoc_insertion_point(field_release:tensorflow.RunGraphRequest.session_handle) + return _impl_.session_handle_.Release(); +} +inline void RunGraphRequest::set_allocated_session_handle(std::string* session_handle) { + if (session_handle != nullptr) { + + } else { + + } + _impl_.session_handle_.SetAllocated(session_handle, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.session_handle_.IsDefault()) { + _impl_.session_handle_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.RunGraphRequest.session_handle) +} + +// bool create_worker_session_called = 10; +inline void RunGraphRequest::clear_create_worker_session_called() { + _impl_.create_worker_session_called_ = false; +} +inline bool RunGraphRequest::_internal_create_worker_session_called() const { + return _impl_.create_worker_session_called_; +} +inline bool RunGraphRequest::create_worker_session_called() const { + // @@protoc_insertion_point(field_get:tensorflow.RunGraphRequest.create_worker_session_called) + return _internal_create_worker_session_called(); +} +inline void RunGraphRequest::_internal_set_create_worker_session_called(bool value) { + + _impl_.create_worker_session_called_ = value; +} +inline void RunGraphRequest::set_create_worker_session_called(bool value) { + _internal_set_create_worker_session_called(value); + // @@protoc_insertion_point(field_set:tensorflow.RunGraphRequest.create_worker_session_called) +} + +// string graph_handle = 1; +inline void RunGraphRequest::clear_graph_handle() { + _impl_.graph_handle_.ClearToEmpty(); +} +inline const std::string& RunGraphRequest::graph_handle() const { + // @@protoc_insertion_point(field_get:tensorflow.RunGraphRequest.graph_handle) + return _internal_graph_handle(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void RunGraphRequest::set_graph_handle(ArgT0&& arg0, ArgT... args) { + + _impl_.graph_handle_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.RunGraphRequest.graph_handle) +} +inline std::string* RunGraphRequest::mutable_graph_handle() { + std::string* _s = _internal_mutable_graph_handle(); + // @@protoc_insertion_point(field_mutable:tensorflow.RunGraphRequest.graph_handle) + return _s; +} +inline const std::string& RunGraphRequest::_internal_graph_handle() const { + return _impl_.graph_handle_.Get(); +} +inline void RunGraphRequest::_internal_set_graph_handle(const std::string& value) { + + _impl_.graph_handle_.Set(value, GetArenaForAllocation()); +} +inline std::string* RunGraphRequest::_internal_mutable_graph_handle() { + + return _impl_.graph_handle_.Mutable(GetArenaForAllocation()); +} +inline std::string* RunGraphRequest::release_graph_handle() { + // @@protoc_insertion_point(field_release:tensorflow.RunGraphRequest.graph_handle) + return _impl_.graph_handle_.Release(); +} +inline void RunGraphRequest::set_allocated_graph_handle(std::string* graph_handle) { + if (graph_handle != nullptr) { + + } else { + + } + _impl_.graph_handle_.SetAllocated(graph_handle, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.graph_handle_.IsDefault()) { + _impl_.graph_handle_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.RunGraphRequest.graph_handle) +} + +// int64 step_id = 2; +inline void RunGraphRequest::clear_step_id() { + _impl_.step_id_ = int64_t{0}; +} +inline int64_t RunGraphRequest::_internal_step_id() const { + return _impl_.step_id_; +} +inline int64_t RunGraphRequest::step_id() const { + // @@protoc_insertion_point(field_get:tensorflow.RunGraphRequest.step_id) + return _internal_step_id(); +} +inline void RunGraphRequest::_internal_set_step_id(int64_t value) { + + _impl_.step_id_ = value; +} +inline void RunGraphRequest::set_step_id(int64_t value) { + _internal_set_step_id(value); + // @@protoc_insertion_point(field_set:tensorflow.RunGraphRequest.step_id) +} + +// .tensorflow.ExecutorOpts exec_opts = 5; +inline bool RunGraphRequest::_internal_has_exec_opts() const { + return this != internal_default_instance() && _impl_.exec_opts_ != nullptr; +} +inline bool RunGraphRequest::has_exec_opts() const { + return _internal_has_exec_opts(); +} +inline void RunGraphRequest::clear_exec_opts() { + if (GetArenaForAllocation() == nullptr && _impl_.exec_opts_ != nullptr) { + delete _impl_.exec_opts_; + } + _impl_.exec_opts_ = nullptr; +} +inline const ::tensorflow::ExecutorOpts& RunGraphRequest::_internal_exec_opts() const { + const ::tensorflow::ExecutorOpts* p = _impl_.exec_opts_; + return p != nullptr ? *p : reinterpret_cast( + ::tensorflow::_ExecutorOpts_default_instance_); +} +inline const ::tensorflow::ExecutorOpts& RunGraphRequest::exec_opts() const { + // @@protoc_insertion_point(field_get:tensorflow.RunGraphRequest.exec_opts) + return _internal_exec_opts(); +} +inline void RunGraphRequest::unsafe_arena_set_allocated_exec_opts( + ::tensorflow::ExecutorOpts* exec_opts) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.exec_opts_); + } + _impl_.exec_opts_ = exec_opts; + if (exec_opts) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.RunGraphRequest.exec_opts) +} +inline ::tensorflow::ExecutorOpts* RunGraphRequest::release_exec_opts() { + + ::tensorflow::ExecutorOpts* temp = _impl_.exec_opts_; + _impl_.exec_opts_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tensorflow::ExecutorOpts* RunGraphRequest::unsafe_arena_release_exec_opts() { + // @@protoc_insertion_point(field_release:tensorflow.RunGraphRequest.exec_opts) + + ::tensorflow::ExecutorOpts* temp = _impl_.exec_opts_; + _impl_.exec_opts_ = nullptr; + return temp; +} +inline ::tensorflow::ExecutorOpts* RunGraphRequest::_internal_mutable_exec_opts() { + + if (_impl_.exec_opts_ == nullptr) { + auto* p = CreateMaybeMessage<::tensorflow::ExecutorOpts>(GetArenaForAllocation()); + _impl_.exec_opts_ = p; + } + return _impl_.exec_opts_; +} +inline ::tensorflow::ExecutorOpts* RunGraphRequest::mutable_exec_opts() { + ::tensorflow::ExecutorOpts* _msg = _internal_mutable_exec_opts(); + // @@protoc_insertion_point(field_mutable:tensorflow.RunGraphRequest.exec_opts) + return _msg; +} +inline void RunGraphRequest::set_allocated_exec_opts(::tensorflow::ExecutorOpts* exec_opts) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete _impl_.exec_opts_; + } + if (exec_opts) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(exec_opts); + if (message_arena != submessage_arena) { + exec_opts = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, exec_opts, submessage_arena); + } + + } else { + + } + _impl_.exec_opts_ = exec_opts; + // @@protoc_insertion_point(field_set_allocated:tensorflow.RunGraphRequest.exec_opts) +} + +// repeated .tensorflow.NamedTensorProto send = 3; +inline int RunGraphRequest::_internal_send_size() const { + return _impl_.send_.size(); +} +inline int RunGraphRequest::send_size() const { + return _internal_send_size(); +} +inline ::tensorflow::NamedTensorProto* RunGraphRequest::mutable_send(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.RunGraphRequest.send) + return _impl_.send_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::NamedTensorProto >* +RunGraphRequest::mutable_send() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.RunGraphRequest.send) + return &_impl_.send_; +} +inline const ::tensorflow::NamedTensorProto& RunGraphRequest::_internal_send(int index) const { + return _impl_.send_.Get(index); +} +inline const ::tensorflow::NamedTensorProto& RunGraphRequest::send(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.RunGraphRequest.send) + return _internal_send(index); +} +inline ::tensorflow::NamedTensorProto* RunGraphRequest::_internal_add_send() { + return _impl_.send_.Add(); +} +inline ::tensorflow::NamedTensorProto* RunGraphRequest::add_send() { + ::tensorflow::NamedTensorProto* _add = _internal_add_send(); + // @@protoc_insertion_point(field_add:tensorflow.RunGraphRequest.send) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::NamedTensorProto >& +RunGraphRequest::send() const { + // @@protoc_insertion_point(field_list:tensorflow.RunGraphRequest.send) + return _impl_.send_; +} + +// repeated string recv_key = 4; +inline int RunGraphRequest::_internal_recv_key_size() const { + return _impl_.recv_key_.size(); +} +inline int RunGraphRequest::recv_key_size() const { + return _internal_recv_key_size(); +} +inline void RunGraphRequest::clear_recv_key() { + _impl_.recv_key_.Clear(); +} +inline std::string* RunGraphRequest::add_recv_key() { + std::string* _s = _internal_add_recv_key(); + // @@protoc_insertion_point(field_add_mutable:tensorflow.RunGraphRequest.recv_key) + return _s; +} +inline const std::string& RunGraphRequest::_internal_recv_key(int index) const { + return _impl_.recv_key_.Get(index); +} +inline const std::string& RunGraphRequest::recv_key(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.RunGraphRequest.recv_key) + return _internal_recv_key(index); +} +inline std::string* RunGraphRequest::mutable_recv_key(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.RunGraphRequest.recv_key) + return _impl_.recv_key_.Mutable(index); +} +inline void RunGraphRequest::set_recv_key(int index, const std::string& value) { + _impl_.recv_key_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set:tensorflow.RunGraphRequest.recv_key) +} +inline void RunGraphRequest::set_recv_key(int index, std::string&& value) { + _impl_.recv_key_.Mutable(index)->assign(std::move(value)); + // @@protoc_insertion_point(field_set:tensorflow.RunGraphRequest.recv_key) +} +inline void RunGraphRequest::set_recv_key(int index, const char* value) { + GOOGLE_DCHECK(value != nullptr); + _impl_.recv_key_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set_char:tensorflow.RunGraphRequest.recv_key) +} +inline void RunGraphRequest::set_recv_key(int index, const char* value, size_t size) { + _impl_.recv_key_.Mutable(index)->assign( + reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:tensorflow.RunGraphRequest.recv_key) +} +inline std::string* RunGraphRequest::_internal_add_recv_key() { + return _impl_.recv_key_.Add(); +} +inline void RunGraphRequest::add_recv_key(const std::string& value) { + _impl_.recv_key_.Add()->assign(value); + // @@protoc_insertion_point(field_add:tensorflow.RunGraphRequest.recv_key) +} +inline void RunGraphRequest::add_recv_key(std::string&& value) { + _impl_.recv_key_.Add(std::move(value)); + // @@protoc_insertion_point(field_add:tensorflow.RunGraphRequest.recv_key) +} +inline void RunGraphRequest::add_recv_key(const char* value) { + GOOGLE_DCHECK(value != nullptr); + _impl_.recv_key_.Add()->assign(value); + // @@protoc_insertion_point(field_add_char:tensorflow.RunGraphRequest.recv_key) +} +inline void RunGraphRequest::add_recv_key(const char* value, size_t size) { + _impl_.recv_key_.Add()->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_add_pointer:tensorflow.RunGraphRequest.recv_key) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& +RunGraphRequest::recv_key() const { + // @@protoc_insertion_point(field_list:tensorflow.RunGraphRequest.recv_key) + return _impl_.recv_key_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* +RunGraphRequest::mutable_recv_key() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.RunGraphRequest.recv_key) + return &_impl_.recv_key_; +} + +// bool is_partial = 6; +inline void RunGraphRequest::clear_is_partial() { + _impl_.is_partial_ = false; +} +inline bool RunGraphRequest::_internal_is_partial() const { + return _impl_.is_partial_; +} +inline bool RunGraphRequest::is_partial() const { + // @@protoc_insertion_point(field_get:tensorflow.RunGraphRequest.is_partial) + return _internal_is_partial(); +} +inline void RunGraphRequest::_internal_set_is_partial(bool value) { + + _impl_.is_partial_ = value; +} +inline void RunGraphRequest::set_is_partial(bool value) { + _internal_set_is_partial(value); + // @@protoc_insertion_point(field_set:tensorflow.RunGraphRequest.is_partial) +} + +// bool is_last_partial_run = 7; +inline void RunGraphRequest::clear_is_last_partial_run() { + _impl_.is_last_partial_run_ = false; +} +inline bool RunGraphRequest::_internal_is_last_partial_run() const { + return _impl_.is_last_partial_run_; +} +inline bool RunGraphRequest::is_last_partial_run() const { + // @@protoc_insertion_point(field_get:tensorflow.RunGraphRequest.is_last_partial_run) + return _internal_is_last_partial_run(); +} +inline void RunGraphRequest::_internal_set_is_last_partial_run(bool value) { + + _impl_.is_last_partial_run_ = value; +} +inline void RunGraphRequest::set_is_last_partial_run(bool value) { + _internal_set_is_last_partial_run(value); + // @@protoc_insertion_point(field_set:tensorflow.RunGraphRequest.is_last_partial_run) +} + +// bool store_errors_in_response_body = 9; +inline void RunGraphRequest::clear_store_errors_in_response_body() { + _impl_.store_errors_in_response_body_ = false; +} +inline bool RunGraphRequest::_internal_store_errors_in_response_body() const { + return _impl_.store_errors_in_response_body_; +} +inline bool RunGraphRequest::store_errors_in_response_body() const { + // @@protoc_insertion_point(field_get:tensorflow.RunGraphRequest.store_errors_in_response_body) + return _internal_store_errors_in_response_body(); +} +inline void RunGraphRequest::_internal_set_store_errors_in_response_body(bool value) { + + _impl_.store_errors_in_response_body_ = value; +} +inline void RunGraphRequest::set_store_errors_in_response_body(bool value) { + _internal_set_store_errors_in_response_body(value); + // @@protoc_insertion_point(field_set:tensorflow.RunGraphRequest.store_errors_in_response_body) +} + +// int64 request_id = 11; +inline void RunGraphRequest::clear_request_id() { + _impl_.request_id_ = int64_t{0}; +} +inline int64_t RunGraphRequest::_internal_request_id() const { + return _impl_.request_id_; +} +inline int64_t RunGraphRequest::request_id() const { + // @@protoc_insertion_point(field_get:tensorflow.RunGraphRequest.request_id) + return _internal_request_id(); +} +inline void RunGraphRequest::_internal_set_request_id(int64_t value) { + + _impl_.request_id_ = value; +} +inline void RunGraphRequest::set_request_id(int64_t value) { + _internal_set_request_id(value); + // @@protoc_insertion_point(field_set:tensorflow.RunGraphRequest.request_id) +} + +// ------------------------------------------------------------------- + +// RunGraphResponse + +// repeated .tensorflow.NamedTensorProto recv = 1; +inline int RunGraphResponse::_internal_recv_size() const { + return _impl_.recv_.size(); +} +inline int RunGraphResponse::recv_size() const { + return _internal_recv_size(); +} +inline ::tensorflow::NamedTensorProto* RunGraphResponse::mutable_recv(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.RunGraphResponse.recv) + return _impl_.recv_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::NamedTensorProto >* +RunGraphResponse::mutable_recv() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.RunGraphResponse.recv) + return &_impl_.recv_; +} +inline const ::tensorflow::NamedTensorProto& RunGraphResponse::_internal_recv(int index) const { + return _impl_.recv_.Get(index); +} +inline const ::tensorflow::NamedTensorProto& RunGraphResponse::recv(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.RunGraphResponse.recv) + return _internal_recv(index); +} +inline ::tensorflow::NamedTensorProto* RunGraphResponse::_internal_add_recv() { + return _impl_.recv_.Add(); +} +inline ::tensorflow::NamedTensorProto* RunGraphResponse::add_recv() { + ::tensorflow::NamedTensorProto* _add = _internal_add_recv(); + // @@protoc_insertion_point(field_add:tensorflow.RunGraphResponse.recv) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::NamedTensorProto >& +RunGraphResponse::recv() const { + // @@protoc_insertion_point(field_list:tensorflow.RunGraphResponse.recv) + return _impl_.recv_; +} + +// .tensorflow.StepStats step_stats = 2; +inline bool RunGraphResponse::_internal_has_step_stats() const { + return this != internal_default_instance() && _impl_.step_stats_ != nullptr; +} +inline bool RunGraphResponse::has_step_stats() const { + return _internal_has_step_stats(); +} +inline const ::tensorflow::StepStats& RunGraphResponse::_internal_step_stats() const { + const ::tensorflow::StepStats* p = _impl_.step_stats_; + return p != nullptr ? *p : reinterpret_cast( + ::tensorflow::_StepStats_default_instance_); +} +inline const ::tensorflow::StepStats& RunGraphResponse::step_stats() const { + // @@protoc_insertion_point(field_get:tensorflow.RunGraphResponse.step_stats) + return _internal_step_stats(); +} +inline void RunGraphResponse::unsafe_arena_set_allocated_step_stats( + ::tensorflow::StepStats* step_stats) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.step_stats_); + } + _impl_.step_stats_ = step_stats; + if (step_stats) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.RunGraphResponse.step_stats) +} +inline ::tensorflow::StepStats* RunGraphResponse::release_step_stats() { + + ::tensorflow::StepStats* temp = _impl_.step_stats_; + _impl_.step_stats_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tensorflow::StepStats* RunGraphResponse::unsafe_arena_release_step_stats() { + // @@protoc_insertion_point(field_release:tensorflow.RunGraphResponse.step_stats) + + ::tensorflow::StepStats* temp = _impl_.step_stats_; + _impl_.step_stats_ = nullptr; + return temp; +} +inline ::tensorflow::StepStats* RunGraphResponse::_internal_mutable_step_stats() { + + if (_impl_.step_stats_ == nullptr) { + auto* p = CreateMaybeMessage<::tensorflow::StepStats>(GetArenaForAllocation()); + _impl_.step_stats_ = p; + } + return _impl_.step_stats_; +} +inline ::tensorflow::StepStats* RunGraphResponse::mutable_step_stats() { + ::tensorflow::StepStats* _msg = _internal_mutable_step_stats(); + // @@protoc_insertion_point(field_mutable:tensorflow.RunGraphResponse.step_stats) + return _msg; +} +inline void RunGraphResponse::set_allocated_step_stats(::tensorflow::StepStats* step_stats) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.step_stats_); + } + if (step_stats) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( + reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(step_stats)); + if (message_arena != submessage_arena) { + step_stats = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, step_stats, submessage_arena); + } + + } else { + + } + _impl_.step_stats_ = step_stats; + // @@protoc_insertion_point(field_set_allocated:tensorflow.RunGraphResponse.step_stats) +} + +// .tensorflow.CostGraphDef cost_graph = 3; +inline bool RunGraphResponse::_internal_has_cost_graph() const { + return this != internal_default_instance() && _impl_.cost_graph_ != nullptr; +} +inline bool RunGraphResponse::has_cost_graph() const { + return _internal_has_cost_graph(); +} +inline const ::tensorflow::CostGraphDef& RunGraphResponse::_internal_cost_graph() const { + const ::tensorflow::CostGraphDef* p = _impl_.cost_graph_; + return p != nullptr ? *p : reinterpret_cast( + ::tensorflow::_CostGraphDef_default_instance_); +} +inline const ::tensorflow::CostGraphDef& RunGraphResponse::cost_graph() const { + // @@protoc_insertion_point(field_get:tensorflow.RunGraphResponse.cost_graph) + return _internal_cost_graph(); +} +inline void RunGraphResponse::unsafe_arena_set_allocated_cost_graph( + ::tensorflow::CostGraphDef* cost_graph) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.cost_graph_); + } + _impl_.cost_graph_ = cost_graph; + if (cost_graph) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.RunGraphResponse.cost_graph) +} +inline ::tensorflow::CostGraphDef* RunGraphResponse::release_cost_graph() { + + ::tensorflow::CostGraphDef* temp = _impl_.cost_graph_; + _impl_.cost_graph_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tensorflow::CostGraphDef* RunGraphResponse::unsafe_arena_release_cost_graph() { + // @@protoc_insertion_point(field_release:tensorflow.RunGraphResponse.cost_graph) + + ::tensorflow::CostGraphDef* temp = _impl_.cost_graph_; + _impl_.cost_graph_ = nullptr; + return temp; +} +inline ::tensorflow::CostGraphDef* RunGraphResponse::_internal_mutable_cost_graph() { + + if (_impl_.cost_graph_ == nullptr) { + auto* p = CreateMaybeMessage<::tensorflow::CostGraphDef>(GetArenaForAllocation()); + _impl_.cost_graph_ = p; + } + return _impl_.cost_graph_; +} +inline ::tensorflow::CostGraphDef* RunGraphResponse::mutable_cost_graph() { + ::tensorflow::CostGraphDef* _msg = _internal_mutable_cost_graph(); + // @@protoc_insertion_point(field_mutable:tensorflow.RunGraphResponse.cost_graph) + return _msg; +} +inline void RunGraphResponse::set_allocated_cost_graph(::tensorflow::CostGraphDef* cost_graph) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.cost_graph_); + } + if (cost_graph) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( + reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(cost_graph)); + if (message_arena != submessage_arena) { + cost_graph = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, cost_graph, submessage_arena); + } + + } else { + + } + _impl_.cost_graph_ = cost_graph; + // @@protoc_insertion_point(field_set_allocated:tensorflow.RunGraphResponse.cost_graph) +} + +// repeated .tensorflow.GraphDef partition_graph = 4; +inline int RunGraphResponse::_internal_partition_graph_size() const { + return _impl_.partition_graph_.size(); +} +inline int RunGraphResponse::partition_graph_size() const { + return _internal_partition_graph_size(); +} +inline ::tensorflow::GraphDef* RunGraphResponse::mutable_partition_graph(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.RunGraphResponse.partition_graph) + return _impl_.partition_graph_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::GraphDef >* +RunGraphResponse::mutable_partition_graph() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.RunGraphResponse.partition_graph) + return &_impl_.partition_graph_; +} +inline const ::tensorflow::GraphDef& RunGraphResponse::_internal_partition_graph(int index) const { + return _impl_.partition_graph_.Get(index); +} +inline const ::tensorflow::GraphDef& RunGraphResponse::partition_graph(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.RunGraphResponse.partition_graph) + return _internal_partition_graph(index); +} +inline ::tensorflow::GraphDef* RunGraphResponse::_internal_add_partition_graph() { + return _impl_.partition_graph_.Add(); +} +inline ::tensorflow::GraphDef* RunGraphResponse::add_partition_graph() { + ::tensorflow::GraphDef* _add = _internal_add_partition_graph(); + // @@protoc_insertion_point(field_add:tensorflow.RunGraphResponse.partition_graph) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::GraphDef >& +RunGraphResponse::partition_graph() const { + // @@protoc_insertion_point(field_list:tensorflow.RunGraphResponse.partition_graph) + return _impl_.partition_graph_; +} + +// .tensorflow.error.Code status_code = 5; +inline void RunGraphResponse::clear_status_code() { + _impl_.status_code_ = 0; +} +inline ::tensorflow::error::Code RunGraphResponse::_internal_status_code() const { + return static_cast< ::tensorflow::error::Code >(_impl_.status_code_); +} +inline ::tensorflow::error::Code RunGraphResponse::status_code() const { + // @@protoc_insertion_point(field_get:tensorflow.RunGraphResponse.status_code) + return _internal_status_code(); +} +inline void RunGraphResponse::_internal_set_status_code(::tensorflow::error::Code value) { + + _impl_.status_code_ = value; +} +inline void RunGraphResponse::set_status_code(::tensorflow::error::Code value) { + _internal_set_status_code(value); + // @@protoc_insertion_point(field_set:tensorflow.RunGraphResponse.status_code) +} + +// string status_error_message = 6; +inline void RunGraphResponse::clear_status_error_message() { + _impl_.status_error_message_.ClearToEmpty(); +} +inline const std::string& RunGraphResponse::status_error_message() const { + // @@protoc_insertion_point(field_get:tensorflow.RunGraphResponse.status_error_message) + return _internal_status_error_message(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void RunGraphResponse::set_status_error_message(ArgT0&& arg0, ArgT... args) { + + _impl_.status_error_message_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.RunGraphResponse.status_error_message) +} +inline std::string* RunGraphResponse::mutable_status_error_message() { + std::string* _s = _internal_mutable_status_error_message(); + // @@protoc_insertion_point(field_mutable:tensorflow.RunGraphResponse.status_error_message) + return _s; +} +inline const std::string& RunGraphResponse::_internal_status_error_message() const { + return _impl_.status_error_message_.Get(); +} +inline void RunGraphResponse::_internal_set_status_error_message(const std::string& value) { + + _impl_.status_error_message_.Set(value, GetArenaForAllocation()); +} +inline std::string* RunGraphResponse::_internal_mutable_status_error_message() { + + return _impl_.status_error_message_.Mutable(GetArenaForAllocation()); +} +inline std::string* RunGraphResponse::release_status_error_message() { + // @@protoc_insertion_point(field_release:tensorflow.RunGraphResponse.status_error_message) + return _impl_.status_error_message_.Release(); +} +inline void RunGraphResponse::set_allocated_status_error_message(std::string* status_error_message) { + if (status_error_message != nullptr) { + + } else { + + } + _impl_.status_error_message_.SetAllocated(status_error_message, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.status_error_message_.IsDefault()) { + _impl_.status_error_message_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.RunGraphResponse.status_error_message) +} + +// ------------------------------------------------------------------- + +// CleanupGraphRequest + +// int64 step_id = 1; +inline void CleanupGraphRequest::clear_step_id() { + _impl_.step_id_ = int64_t{0}; +} +inline int64_t CleanupGraphRequest::_internal_step_id() const { + return _impl_.step_id_; +} +inline int64_t CleanupGraphRequest::step_id() const { + // @@protoc_insertion_point(field_get:tensorflow.CleanupGraphRequest.step_id) + return _internal_step_id(); +} +inline void CleanupGraphRequest::_internal_set_step_id(int64_t value) { + + _impl_.step_id_ = value; +} +inline void CleanupGraphRequest::set_step_id(int64_t value) { + _internal_set_step_id(value); + // @@protoc_insertion_point(field_set:tensorflow.CleanupGraphRequest.step_id) +} + +// ------------------------------------------------------------------- + +// CleanupGraphResponse + +// ------------------------------------------------------------------- + +// RecvTensorRequest + +// int64 step_id = 1; +inline void RecvTensorRequest::clear_step_id() { + _impl_.step_id_ = int64_t{0}; +} +inline int64_t RecvTensorRequest::_internal_step_id() const { + return _impl_.step_id_; +} +inline int64_t RecvTensorRequest::step_id() const { + // @@protoc_insertion_point(field_get:tensorflow.RecvTensorRequest.step_id) + return _internal_step_id(); +} +inline void RecvTensorRequest::_internal_set_step_id(int64_t value) { + + _impl_.step_id_ = value; +} +inline void RecvTensorRequest::set_step_id(int64_t value) { + _internal_set_step_id(value); + // @@protoc_insertion_point(field_set:tensorflow.RecvTensorRequest.step_id) +} + +// string rendezvous_key = 2; +inline void RecvTensorRequest::clear_rendezvous_key() { + _impl_.rendezvous_key_.ClearToEmpty(); +} +inline const std::string& RecvTensorRequest::rendezvous_key() const { + // @@protoc_insertion_point(field_get:tensorflow.RecvTensorRequest.rendezvous_key) + return _internal_rendezvous_key(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void RecvTensorRequest::set_rendezvous_key(ArgT0&& arg0, ArgT... args) { + + _impl_.rendezvous_key_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.RecvTensorRequest.rendezvous_key) +} +inline std::string* RecvTensorRequest::mutable_rendezvous_key() { + std::string* _s = _internal_mutable_rendezvous_key(); + // @@protoc_insertion_point(field_mutable:tensorflow.RecvTensorRequest.rendezvous_key) + return _s; +} +inline const std::string& RecvTensorRequest::_internal_rendezvous_key() const { + return _impl_.rendezvous_key_.Get(); +} +inline void RecvTensorRequest::_internal_set_rendezvous_key(const std::string& value) { + + _impl_.rendezvous_key_.Set(value, GetArenaForAllocation()); +} +inline std::string* RecvTensorRequest::_internal_mutable_rendezvous_key() { + + return _impl_.rendezvous_key_.Mutable(GetArenaForAllocation()); +} +inline std::string* RecvTensorRequest::release_rendezvous_key() { + // @@protoc_insertion_point(field_release:tensorflow.RecvTensorRequest.rendezvous_key) + return _impl_.rendezvous_key_.Release(); +} +inline void RecvTensorRequest::set_allocated_rendezvous_key(std::string* rendezvous_key) { + if (rendezvous_key != nullptr) { + + } else { + + } + _impl_.rendezvous_key_.SetAllocated(rendezvous_key, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.rendezvous_key_.IsDefault()) { + _impl_.rendezvous_key_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.RecvTensorRequest.rendezvous_key) +} + +// bool dma_ok = 3; +inline void RecvTensorRequest::clear_dma_ok() { + _impl_.dma_ok_ = false; +} +inline bool RecvTensorRequest::_internal_dma_ok() const { + return _impl_.dma_ok_; +} +inline bool RecvTensorRequest::dma_ok() const { + // @@protoc_insertion_point(field_get:tensorflow.RecvTensorRequest.dma_ok) + return _internal_dma_ok(); +} +inline void RecvTensorRequest::_internal_set_dma_ok(bool value) { + + _impl_.dma_ok_ = value; +} +inline void RecvTensorRequest::set_dma_ok(bool value) { + _internal_set_dma_ok(value); + // @@protoc_insertion_point(field_set:tensorflow.RecvTensorRequest.dma_ok) +} + +// .tensorflow.DeviceLocality client_locality = 4; +inline bool RecvTensorRequest::_internal_has_client_locality() const { + return this != internal_default_instance() && _impl_.client_locality_ != nullptr; +} +inline bool RecvTensorRequest::has_client_locality() const { + return _internal_has_client_locality(); +} +inline const ::tensorflow::DeviceLocality& RecvTensorRequest::_internal_client_locality() const { + const ::tensorflow::DeviceLocality* p = _impl_.client_locality_; + return p != nullptr ? *p : reinterpret_cast( + ::tensorflow::_DeviceLocality_default_instance_); +} +inline const ::tensorflow::DeviceLocality& RecvTensorRequest::client_locality() const { + // @@protoc_insertion_point(field_get:tensorflow.RecvTensorRequest.client_locality) + return _internal_client_locality(); +} +inline void RecvTensorRequest::unsafe_arena_set_allocated_client_locality( + ::tensorflow::DeviceLocality* client_locality) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.client_locality_); + } + _impl_.client_locality_ = client_locality; + if (client_locality) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.RecvTensorRequest.client_locality) +} +inline ::tensorflow::DeviceLocality* RecvTensorRequest::release_client_locality() { + + ::tensorflow::DeviceLocality* temp = _impl_.client_locality_; + _impl_.client_locality_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tensorflow::DeviceLocality* RecvTensorRequest::unsafe_arena_release_client_locality() { + // @@protoc_insertion_point(field_release:tensorflow.RecvTensorRequest.client_locality) + + ::tensorflow::DeviceLocality* temp = _impl_.client_locality_; + _impl_.client_locality_ = nullptr; + return temp; +} +inline ::tensorflow::DeviceLocality* RecvTensorRequest::_internal_mutable_client_locality() { + + if (_impl_.client_locality_ == nullptr) { + auto* p = CreateMaybeMessage<::tensorflow::DeviceLocality>(GetArenaForAllocation()); + _impl_.client_locality_ = p; + } + return _impl_.client_locality_; +} +inline ::tensorflow::DeviceLocality* RecvTensorRequest::mutable_client_locality() { + ::tensorflow::DeviceLocality* _msg = _internal_mutable_client_locality(); + // @@protoc_insertion_point(field_mutable:tensorflow.RecvTensorRequest.client_locality) + return _msg; +} +inline void RecvTensorRequest::set_allocated_client_locality(::tensorflow::DeviceLocality* client_locality) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.client_locality_); + } + if (client_locality) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( + reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(client_locality)); + if (message_arena != submessage_arena) { + client_locality = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, client_locality, submessage_arena); + } + + } else { + + } + _impl_.client_locality_ = client_locality; + // @@protoc_insertion_point(field_set_allocated:tensorflow.RecvTensorRequest.client_locality) +} + +// .tensorflow.DeviceLocality server_locality = 5; +inline bool RecvTensorRequest::_internal_has_server_locality() const { + return this != internal_default_instance() && _impl_.server_locality_ != nullptr; +} +inline bool RecvTensorRequest::has_server_locality() const { + return _internal_has_server_locality(); +} +inline const ::tensorflow::DeviceLocality& RecvTensorRequest::_internal_server_locality() const { + const ::tensorflow::DeviceLocality* p = _impl_.server_locality_; + return p != nullptr ? *p : reinterpret_cast( + ::tensorflow::_DeviceLocality_default_instance_); +} +inline const ::tensorflow::DeviceLocality& RecvTensorRequest::server_locality() const { + // @@protoc_insertion_point(field_get:tensorflow.RecvTensorRequest.server_locality) + return _internal_server_locality(); +} +inline void RecvTensorRequest::unsafe_arena_set_allocated_server_locality( + ::tensorflow::DeviceLocality* server_locality) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.server_locality_); + } + _impl_.server_locality_ = server_locality; + if (server_locality) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.RecvTensorRequest.server_locality) +} +inline ::tensorflow::DeviceLocality* RecvTensorRequest::release_server_locality() { + + ::tensorflow::DeviceLocality* temp = _impl_.server_locality_; + _impl_.server_locality_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tensorflow::DeviceLocality* RecvTensorRequest::unsafe_arena_release_server_locality() { + // @@protoc_insertion_point(field_release:tensorflow.RecvTensorRequest.server_locality) + + ::tensorflow::DeviceLocality* temp = _impl_.server_locality_; + _impl_.server_locality_ = nullptr; + return temp; +} +inline ::tensorflow::DeviceLocality* RecvTensorRequest::_internal_mutable_server_locality() { + + if (_impl_.server_locality_ == nullptr) { + auto* p = CreateMaybeMessage<::tensorflow::DeviceLocality>(GetArenaForAllocation()); + _impl_.server_locality_ = p; + } + return _impl_.server_locality_; +} +inline ::tensorflow::DeviceLocality* RecvTensorRequest::mutable_server_locality() { + ::tensorflow::DeviceLocality* _msg = _internal_mutable_server_locality(); + // @@protoc_insertion_point(field_mutable:tensorflow.RecvTensorRequest.server_locality) + return _msg; +} +inline void RecvTensorRequest::set_allocated_server_locality(::tensorflow::DeviceLocality* server_locality) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.server_locality_); + } + if (server_locality) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( + reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(server_locality)); + if (message_arena != submessage_arena) { + server_locality = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, server_locality, submessage_arena); + } + + } else { + + } + _impl_.server_locality_ = server_locality; + // @@protoc_insertion_point(field_set_allocated:tensorflow.RecvTensorRequest.server_locality) +} + +// .google.protobuf.Any transport_options = 6; +inline bool RecvTensorRequest::_internal_has_transport_options() const { + return this != internal_default_instance() && _impl_.transport_options_ != nullptr; +} +inline bool RecvTensorRequest::has_transport_options() const { + return _internal_has_transport_options(); +} +inline const ::PROTOBUF_NAMESPACE_ID::Any& RecvTensorRequest::_internal_transport_options() const { + const ::PROTOBUF_NAMESPACE_ID::Any* p = _impl_.transport_options_; + return p != nullptr ? *p : reinterpret_cast( + ::PROTOBUF_NAMESPACE_ID::_Any_default_instance_); +} +inline const ::PROTOBUF_NAMESPACE_ID::Any& RecvTensorRequest::transport_options() const { + // @@protoc_insertion_point(field_get:tensorflow.RecvTensorRequest.transport_options) + return _internal_transport_options(); +} +inline void RecvTensorRequest::unsafe_arena_set_allocated_transport_options( + ::PROTOBUF_NAMESPACE_ID::Any* transport_options) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.transport_options_); + } + _impl_.transport_options_ = transport_options; + if (transport_options) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.RecvTensorRequest.transport_options) +} +inline ::PROTOBUF_NAMESPACE_ID::Any* RecvTensorRequest::release_transport_options() { + + ::PROTOBUF_NAMESPACE_ID::Any* temp = _impl_.transport_options_; + _impl_.transport_options_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::PROTOBUF_NAMESPACE_ID::Any* RecvTensorRequest::unsafe_arena_release_transport_options() { + // @@protoc_insertion_point(field_release:tensorflow.RecvTensorRequest.transport_options) + + ::PROTOBUF_NAMESPACE_ID::Any* temp = _impl_.transport_options_; + _impl_.transport_options_ = nullptr; + return temp; +} +inline ::PROTOBUF_NAMESPACE_ID::Any* RecvTensorRequest::_internal_mutable_transport_options() { + + if (_impl_.transport_options_ == nullptr) { + auto* p = CreateMaybeMessage<::PROTOBUF_NAMESPACE_ID::Any>(GetArenaForAllocation()); + _impl_.transport_options_ = p; + } + return _impl_.transport_options_; +} +inline ::PROTOBUF_NAMESPACE_ID::Any* RecvTensorRequest::mutable_transport_options() { + ::PROTOBUF_NAMESPACE_ID::Any* _msg = _internal_mutable_transport_options(); + // @@protoc_insertion_point(field_mutable:tensorflow.RecvTensorRequest.transport_options) + return _msg; +} +inline void RecvTensorRequest::set_allocated_transport_options(::PROTOBUF_NAMESPACE_ID::Any* transport_options) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.transport_options_); + } + if (transport_options) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( + reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(transport_options)); + if (message_arena != submessage_arena) { + transport_options = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, transport_options, submessage_arena); + } + + } else { + + } + _impl_.transport_options_ = transport_options; + // @@protoc_insertion_point(field_set_allocated:tensorflow.RecvTensorRequest.transport_options) +} + +// int64 request_id = 7; +inline void RecvTensorRequest::clear_request_id() { + _impl_.request_id_ = int64_t{0}; +} +inline int64_t RecvTensorRequest::_internal_request_id() const { + return _impl_.request_id_; +} +inline int64_t RecvTensorRequest::request_id() const { + // @@protoc_insertion_point(field_get:tensorflow.RecvTensorRequest.request_id) + return _internal_request_id(); +} +inline void RecvTensorRequest::_internal_set_request_id(int64_t value) { + + _impl_.request_id_ = value; +} +inline void RecvTensorRequest::set_request_id(int64_t value) { + _internal_set_request_id(value); + // @@protoc_insertion_point(field_set:tensorflow.RecvTensorRequest.request_id) +} + +// ------------------------------------------------------------------- + +// RecvTensorResponse + +// .tensorflow.TensorProto tensor = 1; +inline bool RecvTensorResponse::_internal_has_tensor() const { + return this != internal_default_instance() && _impl_.tensor_ != nullptr; +} +inline bool RecvTensorResponse::has_tensor() const { + return _internal_has_tensor(); +} +inline const ::tensorflow::TensorProto& RecvTensorResponse::_internal_tensor() const { + const ::tensorflow::TensorProto* p = _impl_.tensor_; + return p != nullptr ? *p : reinterpret_cast( + ::tensorflow::_TensorProto_default_instance_); +} +inline const ::tensorflow::TensorProto& RecvTensorResponse::tensor() const { + // @@protoc_insertion_point(field_get:tensorflow.RecvTensorResponse.tensor) + return _internal_tensor(); +} +inline void RecvTensorResponse::unsafe_arena_set_allocated_tensor( + ::tensorflow::TensorProto* tensor) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.tensor_); + } + _impl_.tensor_ = tensor; + if (tensor) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.RecvTensorResponse.tensor) +} +inline ::tensorflow::TensorProto* RecvTensorResponse::release_tensor() { + + ::tensorflow::TensorProto* temp = _impl_.tensor_; + _impl_.tensor_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tensorflow::TensorProto* RecvTensorResponse::unsafe_arena_release_tensor() { + // @@protoc_insertion_point(field_release:tensorflow.RecvTensorResponse.tensor) + + ::tensorflow::TensorProto* temp = _impl_.tensor_; + _impl_.tensor_ = nullptr; + return temp; +} +inline ::tensorflow::TensorProto* RecvTensorResponse::_internal_mutable_tensor() { + + if (_impl_.tensor_ == nullptr) { + auto* p = CreateMaybeMessage<::tensorflow::TensorProto>(GetArenaForAllocation()); + _impl_.tensor_ = p; + } + return _impl_.tensor_; +} +inline ::tensorflow::TensorProto* RecvTensorResponse::mutable_tensor() { + ::tensorflow::TensorProto* _msg = _internal_mutable_tensor(); + // @@protoc_insertion_point(field_mutable:tensorflow.RecvTensorResponse.tensor) + return _msg; +} +inline void RecvTensorResponse::set_allocated_tensor(::tensorflow::TensorProto* tensor) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.tensor_); + } + if (tensor) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( + reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(tensor)); + if (message_arena != submessage_arena) { + tensor = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, tensor, submessage_arena); + } + + } else { + + } + _impl_.tensor_ = tensor; + // @@protoc_insertion_point(field_set_allocated:tensorflow.RecvTensorResponse.tensor) +} + +// bool is_dead = 2; +inline void RecvTensorResponse::clear_is_dead() { + _impl_.is_dead_ = false; +} +inline bool RecvTensorResponse::_internal_is_dead() const { + return _impl_.is_dead_; +} +inline bool RecvTensorResponse::is_dead() const { + // @@protoc_insertion_point(field_get:tensorflow.RecvTensorResponse.is_dead) + return _internal_is_dead(); +} +inline void RecvTensorResponse::_internal_set_is_dead(bool value) { + + _impl_.is_dead_ = value; +} +inline void RecvTensorResponse::set_is_dead(bool value) { + _internal_set_is_dead(value); + // @@protoc_insertion_point(field_set:tensorflow.RecvTensorResponse.is_dead) +} + +// int64 send_start_micros = 3; +inline void RecvTensorResponse::clear_send_start_micros() { + _impl_.send_start_micros_ = int64_t{0}; +} +inline int64_t RecvTensorResponse::_internal_send_start_micros() const { + return _impl_.send_start_micros_; +} +inline int64_t RecvTensorResponse::send_start_micros() const { + // @@protoc_insertion_point(field_get:tensorflow.RecvTensorResponse.send_start_micros) + return _internal_send_start_micros(); +} +inline void RecvTensorResponse::_internal_set_send_start_micros(int64_t value) { + + _impl_.send_start_micros_ = value; +} +inline void RecvTensorResponse::set_send_start_micros(int64_t value) { + _internal_set_send_start_micros(value); + // @@protoc_insertion_point(field_set:tensorflow.RecvTensorResponse.send_start_micros) +} + +// .google.protobuf.Any transport_options = 4; +inline bool RecvTensorResponse::_internal_has_transport_options() const { + return this != internal_default_instance() && _impl_.transport_options_ != nullptr; +} +inline bool RecvTensorResponse::has_transport_options() const { + return _internal_has_transport_options(); +} +inline const ::PROTOBUF_NAMESPACE_ID::Any& RecvTensorResponse::_internal_transport_options() const { + const ::PROTOBUF_NAMESPACE_ID::Any* p = _impl_.transport_options_; + return p != nullptr ? *p : reinterpret_cast( + ::PROTOBUF_NAMESPACE_ID::_Any_default_instance_); +} +inline const ::PROTOBUF_NAMESPACE_ID::Any& RecvTensorResponse::transport_options() const { + // @@protoc_insertion_point(field_get:tensorflow.RecvTensorResponse.transport_options) + return _internal_transport_options(); +} +inline void RecvTensorResponse::unsafe_arena_set_allocated_transport_options( + ::PROTOBUF_NAMESPACE_ID::Any* transport_options) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.transport_options_); + } + _impl_.transport_options_ = transport_options; + if (transport_options) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.RecvTensorResponse.transport_options) +} +inline ::PROTOBUF_NAMESPACE_ID::Any* RecvTensorResponse::release_transport_options() { + + ::PROTOBUF_NAMESPACE_ID::Any* temp = _impl_.transport_options_; + _impl_.transport_options_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::PROTOBUF_NAMESPACE_ID::Any* RecvTensorResponse::unsafe_arena_release_transport_options() { + // @@protoc_insertion_point(field_release:tensorflow.RecvTensorResponse.transport_options) + + ::PROTOBUF_NAMESPACE_ID::Any* temp = _impl_.transport_options_; + _impl_.transport_options_ = nullptr; + return temp; +} +inline ::PROTOBUF_NAMESPACE_ID::Any* RecvTensorResponse::_internal_mutable_transport_options() { + + if (_impl_.transport_options_ == nullptr) { + auto* p = CreateMaybeMessage<::PROTOBUF_NAMESPACE_ID::Any>(GetArenaForAllocation()); + _impl_.transport_options_ = p; + } + return _impl_.transport_options_; +} +inline ::PROTOBUF_NAMESPACE_ID::Any* RecvTensorResponse::mutable_transport_options() { + ::PROTOBUF_NAMESPACE_ID::Any* _msg = _internal_mutable_transport_options(); + // @@protoc_insertion_point(field_mutable:tensorflow.RecvTensorResponse.transport_options) + return _msg; +} +inline void RecvTensorResponse::set_allocated_transport_options(::PROTOBUF_NAMESPACE_ID::Any* transport_options) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.transport_options_); + } + if (transport_options) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( + reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(transport_options)); + if (message_arena != submessage_arena) { + transport_options = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, transport_options, submessage_arena); + } + + } else { + + } + _impl_.transport_options_ = transport_options; + // @@protoc_insertion_point(field_set_allocated:tensorflow.RecvTensorResponse.transport_options) +} + +// bool require_ack = 5; +inline void RecvTensorResponse::clear_require_ack() { + _impl_.require_ack_ = false; +} +inline bool RecvTensorResponse::_internal_require_ack() const { + return _impl_.require_ack_; +} +inline bool RecvTensorResponse::require_ack() const { + // @@protoc_insertion_point(field_get:tensorflow.RecvTensorResponse.require_ack) + return _internal_require_ack(); +} +inline void RecvTensorResponse::_internal_set_require_ack(bool value) { + + _impl_.require_ack_ = value; +} +inline void RecvTensorResponse::set_require_ack(bool value) { + _internal_set_require_ack(value); + // @@protoc_insertion_point(field_set:tensorflow.RecvTensorResponse.require_ack) +} + +// ------------------------------------------------------------------- + +// MarkRecvFinishedRequest + +// int64 request_id = 1; +inline void MarkRecvFinishedRequest::clear_request_id() { + _impl_.request_id_ = int64_t{0}; +} +inline int64_t MarkRecvFinishedRequest::_internal_request_id() const { + return _impl_.request_id_; +} +inline int64_t MarkRecvFinishedRequest::request_id() const { + // @@protoc_insertion_point(field_get:tensorflow.MarkRecvFinishedRequest.request_id) + return _internal_request_id(); +} +inline void MarkRecvFinishedRequest::_internal_set_request_id(int64_t value) { + + _impl_.request_id_ = value; +} +inline void MarkRecvFinishedRequest::set_request_id(int64_t value) { + _internal_set_request_id(value); + // @@protoc_insertion_point(field_set:tensorflow.MarkRecvFinishedRequest.request_id) +} + +// ------------------------------------------------------------------- + +// MarkRecvFinishedResponse + +// ------------------------------------------------------------------- + +// LoggingRequest + +// bool enable_rpc_logging = 1; +inline void LoggingRequest::clear_enable_rpc_logging() { + _impl_.enable_rpc_logging_ = false; +} +inline bool LoggingRequest::_internal_enable_rpc_logging() const { + return _impl_.enable_rpc_logging_; +} +inline bool LoggingRequest::enable_rpc_logging() const { + // @@protoc_insertion_point(field_get:tensorflow.LoggingRequest.enable_rpc_logging) + return _internal_enable_rpc_logging(); +} +inline void LoggingRequest::_internal_set_enable_rpc_logging(bool value) { + + _impl_.enable_rpc_logging_ = value; +} +inline void LoggingRequest::set_enable_rpc_logging(bool value) { + _internal_set_enable_rpc_logging(value); + // @@protoc_insertion_point(field_set:tensorflow.LoggingRequest.enable_rpc_logging) +} + +// bool disable_rpc_logging = 4; +inline void LoggingRequest::clear_disable_rpc_logging() { + _impl_.disable_rpc_logging_ = false; +} +inline bool LoggingRequest::_internal_disable_rpc_logging() const { + return _impl_.disable_rpc_logging_; +} +inline bool LoggingRequest::disable_rpc_logging() const { + // @@protoc_insertion_point(field_get:tensorflow.LoggingRequest.disable_rpc_logging) + return _internal_disable_rpc_logging(); +} +inline void LoggingRequest::_internal_set_disable_rpc_logging(bool value) { + + _impl_.disable_rpc_logging_ = value; +} +inline void LoggingRequest::set_disable_rpc_logging(bool value) { + _internal_set_disable_rpc_logging(value); + // @@protoc_insertion_point(field_set:tensorflow.LoggingRequest.disable_rpc_logging) +} + +// bool clear = 2; +inline void LoggingRequest::clear_clear() { + _impl_.clear_ = false; +} +inline bool LoggingRequest::_internal_clear() const { + return _impl_.clear_; +} +inline bool LoggingRequest::clear() const { + // @@protoc_insertion_point(field_get:tensorflow.LoggingRequest.clear) + return _internal_clear(); +} +inline void LoggingRequest::_internal_set_clear(bool value) { + + _impl_.clear_ = value; +} +inline void LoggingRequest::set_clear(bool value) { + _internal_set_clear(value); + // @@protoc_insertion_point(field_set:tensorflow.LoggingRequest.clear) +} + +// repeated int64 fetch_step_id = 3; +inline int LoggingRequest::_internal_fetch_step_id_size() const { + return _impl_.fetch_step_id_.size(); +} +inline int LoggingRequest::fetch_step_id_size() const { + return _internal_fetch_step_id_size(); +} +inline void LoggingRequest::clear_fetch_step_id() { + _impl_.fetch_step_id_.Clear(); +} +inline int64_t LoggingRequest::_internal_fetch_step_id(int index) const { + return _impl_.fetch_step_id_.Get(index); +} +inline int64_t LoggingRequest::fetch_step_id(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.LoggingRequest.fetch_step_id) + return _internal_fetch_step_id(index); +} +inline void LoggingRequest::set_fetch_step_id(int index, int64_t value) { + _impl_.fetch_step_id_.Set(index, value); + // @@protoc_insertion_point(field_set:tensorflow.LoggingRequest.fetch_step_id) +} +inline void LoggingRequest::_internal_add_fetch_step_id(int64_t value) { + _impl_.fetch_step_id_.Add(value); +} +inline void LoggingRequest::add_fetch_step_id(int64_t value) { + _internal_add_fetch_step_id(value); + // @@protoc_insertion_point(field_add:tensorflow.LoggingRequest.fetch_step_id) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >& +LoggingRequest::_internal_fetch_step_id() const { + return _impl_.fetch_step_id_; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >& +LoggingRequest::fetch_step_id() const { + // @@protoc_insertion_point(field_list:tensorflow.LoggingRequest.fetch_step_id) + return _internal_fetch_step_id(); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >* +LoggingRequest::_internal_mutable_fetch_step_id() { + return &_impl_.fetch_step_id_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >* +LoggingRequest::mutable_fetch_step_id() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.LoggingRequest.fetch_step_id) + return _internal_mutable_fetch_step_id(); +} + +// ------------------------------------------------------------------- + +// LabeledStepStats + +// int64 step_id = 1; +inline void LabeledStepStats::clear_step_id() { + _impl_.step_id_ = int64_t{0}; +} +inline int64_t LabeledStepStats::_internal_step_id() const { + return _impl_.step_id_; +} +inline int64_t LabeledStepStats::step_id() const { + // @@protoc_insertion_point(field_get:tensorflow.LabeledStepStats.step_id) + return _internal_step_id(); +} +inline void LabeledStepStats::_internal_set_step_id(int64_t value) { + + _impl_.step_id_ = value; +} +inline void LabeledStepStats::set_step_id(int64_t value) { + _internal_set_step_id(value); + // @@protoc_insertion_point(field_set:tensorflow.LabeledStepStats.step_id) +} + +// .tensorflow.StepStats step_stats = 2; +inline bool LabeledStepStats::_internal_has_step_stats() const { + return this != internal_default_instance() && _impl_.step_stats_ != nullptr; +} +inline bool LabeledStepStats::has_step_stats() const { + return _internal_has_step_stats(); +} +inline const ::tensorflow::StepStats& LabeledStepStats::_internal_step_stats() const { + const ::tensorflow::StepStats* p = _impl_.step_stats_; + return p != nullptr ? *p : reinterpret_cast( + ::tensorflow::_StepStats_default_instance_); +} +inline const ::tensorflow::StepStats& LabeledStepStats::step_stats() const { + // @@protoc_insertion_point(field_get:tensorflow.LabeledStepStats.step_stats) + return _internal_step_stats(); +} +inline void LabeledStepStats::unsafe_arena_set_allocated_step_stats( + ::tensorflow::StepStats* step_stats) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.step_stats_); + } + _impl_.step_stats_ = step_stats; + if (step_stats) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.LabeledStepStats.step_stats) +} +inline ::tensorflow::StepStats* LabeledStepStats::release_step_stats() { + + ::tensorflow::StepStats* temp = _impl_.step_stats_; + _impl_.step_stats_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tensorflow::StepStats* LabeledStepStats::unsafe_arena_release_step_stats() { + // @@protoc_insertion_point(field_release:tensorflow.LabeledStepStats.step_stats) + + ::tensorflow::StepStats* temp = _impl_.step_stats_; + _impl_.step_stats_ = nullptr; + return temp; +} +inline ::tensorflow::StepStats* LabeledStepStats::_internal_mutable_step_stats() { + + if (_impl_.step_stats_ == nullptr) { + auto* p = CreateMaybeMessage<::tensorflow::StepStats>(GetArenaForAllocation()); + _impl_.step_stats_ = p; + } + return _impl_.step_stats_; +} +inline ::tensorflow::StepStats* LabeledStepStats::mutable_step_stats() { + ::tensorflow::StepStats* _msg = _internal_mutable_step_stats(); + // @@protoc_insertion_point(field_mutable:tensorflow.LabeledStepStats.step_stats) + return _msg; +} +inline void LabeledStepStats::set_allocated_step_stats(::tensorflow::StepStats* step_stats) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.step_stats_); + } + if (step_stats) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( + reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(step_stats)); + if (message_arena != submessage_arena) { + step_stats = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, step_stats, submessage_arena); + } + + } else { + + } + _impl_.step_stats_ = step_stats; + // @@protoc_insertion_point(field_set_allocated:tensorflow.LabeledStepStats.step_stats) +} + +// ------------------------------------------------------------------- + +// LoggingResponse + +// repeated .tensorflow.LabeledStepStats step = 1; +inline int LoggingResponse::_internal_step_size() const { + return _impl_.step_.size(); +} +inline int LoggingResponse::step_size() const { + return _internal_step_size(); +} +inline void LoggingResponse::clear_step() { + _impl_.step_.Clear(); +} +inline ::tensorflow::LabeledStepStats* LoggingResponse::mutable_step(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.LoggingResponse.step) + return _impl_.step_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::LabeledStepStats >* +LoggingResponse::mutable_step() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.LoggingResponse.step) + return &_impl_.step_; +} +inline const ::tensorflow::LabeledStepStats& LoggingResponse::_internal_step(int index) const { + return _impl_.step_.Get(index); +} +inline const ::tensorflow::LabeledStepStats& LoggingResponse::step(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.LoggingResponse.step) + return _internal_step(index); +} +inline ::tensorflow::LabeledStepStats* LoggingResponse::_internal_add_step() { + return _impl_.step_.Add(); +} +inline ::tensorflow::LabeledStepStats* LoggingResponse::add_step() { + ::tensorflow::LabeledStepStats* _add = _internal_add_step(); + // @@protoc_insertion_point(field_add:tensorflow.LoggingResponse.step) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::LabeledStepStats >& +LoggingResponse::step() const { + // @@protoc_insertion_point(field_list:tensorflow.LoggingResponse.step) + return _impl_.step_; +} + +// ------------------------------------------------------------------- + +// TraceOpts + +// double duration = 1; +inline void TraceOpts::clear_duration() { + _impl_.duration_ = 0; +} +inline double TraceOpts::_internal_duration() const { + return _impl_.duration_; +} +inline double TraceOpts::duration() const { + // @@protoc_insertion_point(field_get:tensorflow.TraceOpts.duration) + return _internal_duration(); +} +inline void TraceOpts::_internal_set_duration(double value) { + + _impl_.duration_ = value; +} +inline void TraceOpts::set_duration(double value) { + _internal_set_duration(value); + // @@protoc_insertion_point(field_set:tensorflow.TraceOpts.duration) +} + +// bool use_step_profiler = 2; +inline void TraceOpts::clear_use_step_profiler() { + _impl_.use_step_profiler_ = false; +} +inline bool TraceOpts::_internal_use_step_profiler() const { + return _impl_.use_step_profiler_; +} +inline bool TraceOpts::use_step_profiler() const { + // @@protoc_insertion_point(field_get:tensorflow.TraceOpts.use_step_profiler) + return _internal_use_step_profiler(); +} +inline void TraceOpts::_internal_set_use_step_profiler(bool value) { + + _impl_.use_step_profiler_ = value; +} +inline void TraceOpts::set_use_step_profiler(bool value) { + _internal_set_use_step_profiler(value); + // @@protoc_insertion_point(field_set:tensorflow.TraceOpts.use_step_profiler) +} + +// bool use_kernel_profiler = 3; +inline void TraceOpts::clear_use_kernel_profiler() { + _impl_.use_kernel_profiler_ = false; +} +inline bool TraceOpts::_internal_use_kernel_profiler() const { + return _impl_.use_kernel_profiler_; +} +inline bool TraceOpts::use_kernel_profiler() const { + // @@protoc_insertion_point(field_get:tensorflow.TraceOpts.use_kernel_profiler) + return _internal_use_kernel_profiler(); +} +inline void TraceOpts::_internal_set_use_kernel_profiler(bool value) { + + _impl_.use_kernel_profiler_ = value; +} +inline void TraceOpts::set_use_kernel_profiler(bool value) { + _internal_set_use_kernel_profiler(value); + // @@protoc_insertion_point(field_set:tensorflow.TraceOpts.use_kernel_profiler) +} + +// bool use_extended_profiler = 4; +inline void TraceOpts::clear_use_extended_profiler() { + _impl_.use_extended_profiler_ = false; +} +inline bool TraceOpts::_internal_use_extended_profiler() const { + return _impl_.use_extended_profiler_; +} +inline bool TraceOpts::use_extended_profiler() const { + // @@protoc_insertion_point(field_get:tensorflow.TraceOpts.use_extended_profiler) + return _internal_use_extended_profiler(); +} +inline void TraceOpts::_internal_set_use_extended_profiler(bool value) { + + _impl_.use_extended_profiler_ = value; +} +inline void TraceOpts::set_use_extended_profiler(bool value) { + _internal_set_use_extended_profiler(value); + // @@protoc_insertion_point(field_set:tensorflow.TraceOpts.use_extended_profiler) +} + +// bool use_gpu_profiler = 5; +inline void TraceOpts::clear_use_gpu_profiler() { + _impl_.use_gpu_profiler_ = false; +} +inline bool TraceOpts::_internal_use_gpu_profiler() const { + return _impl_.use_gpu_profiler_; +} +inline bool TraceOpts::use_gpu_profiler() const { + // @@protoc_insertion_point(field_get:tensorflow.TraceOpts.use_gpu_profiler) + return _internal_use_gpu_profiler(); +} +inline void TraceOpts::_internal_set_use_gpu_profiler(bool value) { + + _impl_.use_gpu_profiler_ = value; +} +inline void TraceOpts::set_use_gpu_profiler(bool value) { + _internal_set_use_gpu_profiler(value); + // @@protoc_insertion_point(field_set:tensorflow.TraceOpts.use_gpu_profiler) +} + +// bool use_sample_profiler = 6; +inline void TraceOpts::clear_use_sample_profiler() { + _impl_.use_sample_profiler_ = false; +} +inline bool TraceOpts::_internal_use_sample_profiler() const { + return _impl_.use_sample_profiler_; +} +inline bool TraceOpts::use_sample_profiler() const { + // @@protoc_insertion_point(field_get:tensorflow.TraceOpts.use_sample_profiler) + return _internal_use_sample_profiler(); +} +inline void TraceOpts::_internal_set_use_sample_profiler(bool value) { + + _impl_.use_sample_profiler_ = value; +} +inline void TraceOpts::set_use_sample_profiler(bool value) { + _internal_set_use_sample_profiler(value); + // @@protoc_insertion_point(field_set:tensorflow.TraceOpts.use_sample_profiler) +} + +// ------------------------------------------------------------------- + +// TracingRequest + +// .tensorflow.TraceOpts options = 1; +inline bool TracingRequest::_internal_has_options() const { + return this != internal_default_instance() && _impl_.options_ != nullptr; +} +inline bool TracingRequest::has_options() const { + return _internal_has_options(); +} +inline void TracingRequest::clear_options() { + if (GetArenaForAllocation() == nullptr && _impl_.options_ != nullptr) { + delete _impl_.options_; + } + _impl_.options_ = nullptr; +} +inline const ::tensorflow::TraceOpts& TracingRequest::_internal_options() const { + const ::tensorflow::TraceOpts* p = _impl_.options_; + return p != nullptr ? *p : reinterpret_cast( + ::tensorflow::_TraceOpts_default_instance_); +} +inline const ::tensorflow::TraceOpts& TracingRequest::options() const { + // @@protoc_insertion_point(field_get:tensorflow.TracingRequest.options) + return _internal_options(); +} +inline void TracingRequest::unsafe_arena_set_allocated_options( + ::tensorflow::TraceOpts* options) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.options_); + } + _impl_.options_ = options; + if (options) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.TracingRequest.options) +} +inline ::tensorflow::TraceOpts* TracingRequest::release_options() { + + ::tensorflow::TraceOpts* temp = _impl_.options_; + _impl_.options_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tensorflow::TraceOpts* TracingRequest::unsafe_arena_release_options() { + // @@protoc_insertion_point(field_release:tensorflow.TracingRequest.options) + + ::tensorflow::TraceOpts* temp = _impl_.options_; + _impl_.options_ = nullptr; + return temp; +} +inline ::tensorflow::TraceOpts* TracingRequest::_internal_mutable_options() { + + if (_impl_.options_ == nullptr) { + auto* p = CreateMaybeMessage<::tensorflow::TraceOpts>(GetArenaForAllocation()); + _impl_.options_ = p; + } + return _impl_.options_; +} +inline ::tensorflow::TraceOpts* TracingRequest::mutable_options() { + ::tensorflow::TraceOpts* _msg = _internal_mutable_options(); + // @@protoc_insertion_point(field_mutable:tensorflow.TracingRequest.options) + return _msg; +} +inline void TracingRequest::set_allocated_options(::tensorflow::TraceOpts* options) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete _impl_.options_; + } + if (options) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(options); + if (message_arena != submessage_arena) { + options = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, options, submessage_arena); + } + + } else { + + } + _impl_.options_ = options; + // @@protoc_insertion_point(field_set_allocated:tensorflow.TracingRequest.options) +} + +// ------------------------------------------------------------------- + +// TracingResponse + +// ------------------------------------------------------------------- + +// RecvBufRequest + +// int64 step_id = 1; +inline void RecvBufRequest::clear_step_id() { + _impl_.step_id_ = int64_t{0}; +} +inline int64_t RecvBufRequest::_internal_step_id() const { + return _impl_.step_id_; +} +inline int64_t RecvBufRequest::step_id() const { + // @@protoc_insertion_point(field_get:tensorflow.RecvBufRequest.step_id) + return _internal_step_id(); +} +inline void RecvBufRequest::_internal_set_step_id(int64_t value) { + + _impl_.step_id_ = value; +} +inline void RecvBufRequest::set_step_id(int64_t value) { + _internal_set_step_id(value); + // @@protoc_insertion_point(field_set:tensorflow.RecvBufRequest.step_id) +} + +// string buf_rendezvous_key = 2; +inline void RecvBufRequest::clear_buf_rendezvous_key() { + _impl_.buf_rendezvous_key_.ClearToEmpty(); +} +inline const std::string& RecvBufRequest::buf_rendezvous_key() const { + // @@protoc_insertion_point(field_get:tensorflow.RecvBufRequest.buf_rendezvous_key) + return _internal_buf_rendezvous_key(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void RecvBufRequest::set_buf_rendezvous_key(ArgT0&& arg0, ArgT... args) { + + _impl_.buf_rendezvous_key_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.RecvBufRequest.buf_rendezvous_key) +} +inline std::string* RecvBufRequest::mutable_buf_rendezvous_key() { + std::string* _s = _internal_mutable_buf_rendezvous_key(); + // @@protoc_insertion_point(field_mutable:tensorflow.RecvBufRequest.buf_rendezvous_key) + return _s; +} +inline const std::string& RecvBufRequest::_internal_buf_rendezvous_key() const { + return _impl_.buf_rendezvous_key_.Get(); +} +inline void RecvBufRequest::_internal_set_buf_rendezvous_key(const std::string& value) { + + _impl_.buf_rendezvous_key_.Set(value, GetArenaForAllocation()); +} +inline std::string* RecvBufRequest::_internal_mutable_buf_rendezvous_key() { + + return _impl_.buf_rendezvous_key_.Mutable(GetArenaForAllocation()); +} +inline std::string* RecvBufRequest::release_buf_rendezvous_key() { + // @@protoc_insertion_point(field_release:tensorflow.RecvBufRequest.buf_rendezvous_key) + return _impl_.buf_rendezvous_key_.Release(); +} +inline void RecvBufRequest::set_allocated_buf_rendezvous_key(std::string* buf_rendezvous_key) { + if (buf_rendezvous_key != nullptr) { + + } else { + + } + _impl_.buf_rendezvous_key_.SetAllocated(buf_rendezvous_key, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.buf_rendezvous_key_.IsDefault()) { + _impl_.buf_rendezvous_key_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.RecvBufRequest.buf_rendezvous_key) +} + +// int64 num_bytes = 3; +inline void RecvBufRequest::clear_num_bytes() { + _impl_.num_bytes_ = int64_t{0}; +} +inline int64_t RecvBufRequest::_internal_num_bytes() const { + return _impl_.num_bytes_; +} +inline int64_t RecvBufRequest::num_bytes() const { + // @@protoc_insertion_point(field_get:tensorflow.RecvBufRequest.num_bytes) + return _internal_num_bytes(); +} +inline void RecvBufRequest::_internal_set_num_bytes(int64_t value) { + + _impl_.num_bytes_ = value; +} +inline void RecvBufRequest::set_num_bytes(int64_t value) { + _internal_set_num_bytes(value); + // @@protoc_insertion_point(field_set:tensorflow.RecvBufRequest.num_bytes) +} + +// fixed64 buf_ptr = 4; +inline void RecvBufRequest::clear_buf_ptr() { + _impl_.buf_ptr_ = uint64_t{0u}; +} +inline uint64_t RecvBufRequest::_internal_buf_ptr() const { + return _impl_.buf_ptr_; +} +inline uint64_t RecvBufRequest::buf_ptr() const { + // @@protoc_insertion_point(field_get:tensorflow.RecvBufRequest.buf_ptr) + return _internal_buf_ptr(); +} +inline void RecvBufRequest::_internal_set_buf_ptr(uint64_t value) { + + _impl_.buf_ptr_ = value; +} +inline void RecvBufRequest::set_buf_ptr(uint64_t value) { + _internal_set_buf_ptr(value); + // @@protoc_insertion_point(field_set:tensorflow.RecvBufRequest.buf_ptr) +} + +// .tensorflow.DeviceLocality client_locality = 5; +inline bool RecvBufRequest::_internal_has_client_locality() const { + return this != internal_default_instance() && _impl_.client_locality_ != nullptr; +} +inline bool RecvBufRequest::has_client_locality() const { + return _internal_has_client_locality(); +} +inline const ::tensorflow::DeviceLocality& RecvBufRequest::_internal_client_locality() const { + const ::tensorflow::DeviceLocality* p = _impl_.client_locality_; + return p != nullptr ? *p : reinterpret_cast( + ::tensorflow::_DeviceLocality_default_instance_); +} +inline const ::tensorflow::DeviceLocality& RecvBufRequest::client_locality() const { + // @@protoc_insertion_point(field_get:tensorflow.RecvBufRequest.client_locality) + return _internal_client_locality(); +} +inline void RecvBufRequest::unsafe_arena_set_allocated_client_locality( + ::tensorflow::DeviceLocality* client_locality) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.client_locality_); + } + _impl_.client_locality_ = client_locality; + if (client_locality) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.RecvBufRequest.client_locality) +} +inline ::tensorflow::DeviceLocality* RecvBufRequest::release_client_locality() { + + ::tensorflow::DeviceLocality* temp = _impl_.client_locality_; + _impl_.client_locality_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tensorflow::DeviceLocality* RecvBufRequest::unsafe_arena_release_client_locality() { + // @@protoc_insertion_point(field_release:tensorflow.RecvBufRequest.client_locality) + + ::tensorflow::DeviceLocality* temp = _impl_.client_locality_; + _impl_.client_locality_ = nullptr; + return temp; +} +inline ::tensorflow::DeviceLocality* RecvBufRequest::_internal_mutable_client_locality() { + + if (_impl_.client_locality_ == nullptr) { + auto* p = CreateMaybeMessage<::tensorflow::DeviceLocality>(GetArenaForAllocation()); + _impl_.client_locality_ = p; + } + return _impl_.client_locality_; +} +inline ::tensorflow::DeviceLocality* RecvBufRequest::mutable_client_locality() { + ::tensorflow::DeviceLocality* _msg = _internal_mutable_client_locality(); + // @@protoc_insertion_point(field_mutable:tensorflow.RecvBufRequest.client_locality) + return _msg; +} +inline void RecvBufRequest::set_allocated_client_locality(::tensorflow::DeviceLocality* client_locality) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.client_locality_); + } + if (client_locality) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( + reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(client_locality)); + if (message_arena != submessage_arena) { + client_locality = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, client_locality, submessage_arena); + } + + } else { + + } + _impl_.client_locality_ = client_locality; + // @@protoc_insertion_point(field_set_allocated:tensorflow.RecvBufRequest.client_locality) +} + +// .tensorflow.DeviceLocality server_locality = 6; +inline bool RecvBufRequest::_internal_has_server_locality() const { + return this != internal_default_instance() && _impl_.server_locality_ != nullptr; +} +inline bool RecvBufRequest::has_server_locality() const { + return _internal_has_server_locality(); +} +inline const ::tensorflow::DeviceLocality& RecvBufRequest::_internal_server_locality() const { + const ::tensorflow::DeviceLocality* p = _impl_.server_locality_; + return p != nullptr ? *p : reinterpret_cast( + ::tensorflow::_DeviceLocality_default_instance_); +} +inline const ::tensorflow::DeviceLocality& RecvBufRequest::server_locality() const { + // @@protoc_insertion_point(field_get:tensorflow.RecvBufRequest.server_locality) + return _internal_server_locality(); +} +inline void RecvBufRequest::unsafe_arena_set_allocated_server_locality( + ::tensorflow::DeviceLocality* server_locality) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.server_locality_); + } + _impl_.server_locality_ = server_locality; + if (server_locality) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.RecvBufRequest.server_locality) +} +inline ::tensorflow::DeviceLocality* RecvBufRequest::release_server_locality() { + + ::tensorflow::DeviceLocality* temp = _impl_.server_locality_; + _impl_.server_locality_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tensorflow::DeviceLocality* RecvBufRequest::unsafe_arena_release_server_locality() { + // @@protoc_insertion_point(field_release:tensorflow.RecvBufRequest.server_locality) + + ::tensorflow::DeviceLocality* temp = _impl_.server_locality_; + _impl_.server_locality_ = nullptr; + return temp; +} +inline ::tensorflow::DeviceLocality* RecvBufRequest::_internal_mutable_server_locality() { + + if (_impl_.server_locality_ == nullptr) { + auto* p = CreateMaybeMessage<::tensorflow::DeviceLocality>(GetArenaForAllocation()); + _impl_.server_locality_ = p; + } + return _impl_.server_locality_; +} +inline ::tensorflow::DeviceLocality* RecvBufRequest::mutable_server_locality() { + ::tensorflow::DeviceLocality* _msg = _internal_mutable_server_locality(); + // @@protoc_insertion_point(field_mutable:tensorflow.RecvBufRequest.server_locality) + return _msg; +} +inline void RecvBufRequest::set_allocated_server_locality(::tensorflow::DeviceLocality* server_locality) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.server_locality_); + } + if (server_locality) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( + reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(server_locality)); + if (message_arena != submessage_arena) { + server_locality = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, server_locality, submessage_arena); + } + + } else { + + } + _impl_.server_locality_ = server_locality; + // @@protoc_insertion_point(field_set_allocated:tensorflow.RecvBufRequest.server_locality) +} + +// .google.protobuf.Any transport_options = 7; +inline bool RecvBufRequest::_internal_has_transport_options() const { + return this != internal_default_instance() && _impl_.transport_options_ != nullptr; +} +inline bool RecvBufRequest::has_transport_options() const { + return _internal_has_transport_options(); +} +inline const ::PROTOBUF_NAMESPACE_ID::Any& RecvBufRequest::_internal_transport_options() const { + const ::PROTOBUF_NAMESPACE_ID::Any* p = _impl_.transport_options_; + return p != nullptr ? *p : reinterpret_cast( + ::PROTOBUF_NAMESPACE_ID::_Any_default_instance_); +} +inline const ::PROTOBUF_NAMESPACE_ID::Any& RecvBufRequest::transport_options() const { + // @@protoc_insertion_point(field_get:tensorflow.RecvBufRequest.transport_options) + return _internal_transport_options(); +} +inline void RecvBufRequest::unsafe_arena_set_allocated_transport_options( + ::PROTOBUF_NAMESPACE_ID::Any* transport_options) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.transport_options_); + } + _impl_.transport_options_ = transport_options; + if (transport_options) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.RecvBufRequest.transport_options) +} +inline ::PROTOBUF_NAMESPACE_ID::Any* RecvBufRequest::release_transport_options() { + + ::PROTOBUF_NAMESPACE_ID::Any* temp = _impl_.transport_options_; + _impl_.transport_options_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::PROTOBUF_NAMESPACE_ID::Any* RecvBufRequest::unsafe_arena_release_transport_options() { + // @@protoc_insertion_point(field_release:tensorflow.RecvBufRequest.transport_options) + + ::PROTOBUF_NAMESPACE_ID::Any* temp = _impl_.transport_options_; + _impl_.transport_options_ = nullptr; + return temp; +} +inline ::PROTOBUF_NAMESPACE_ID::Any* RecvBufRequest::_internal_mutable_transport_options() { + + if (_impl_.transport_options_ == nullptr) { + auto* p = CreateMaybeMessage<::PROTOBUF_NAMESPACE_ID::Any>(GetArenaForAllocation()); + _impl_.transport_options_ = p; + } + return _impl_.transport_options_; +} +inline ::PROTOBUF_NAMESPACE_ID::Any* RecvBufRequest::mutable_transport_options() { + ::PROTOBUF_NAMESPACE_ID::Any* _msg = _internal_mutable_transport_options(); + // @@protoc_insertion_point(field_mutable:tensorflow.RecvBufRequest.transport_options) + return _msg; +} +inline void RecvBufRequest::set_allocated_transport_options(::PROTOBUF_NAMESPACE_ID::Any* transport_options) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.transport_options_); + } + if (transport_options) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( + reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(transport_options)); + if (message_arena != submessage_arena) { + transport_options = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, transport_options, submessage_arena); + } + + } else { + + } + _impl_.transport_options_ = transport_options; + // @@protoc_insertion_point(field_set_allocated:tensorflow.RecvBufRequest.transport_options) +} + +// string src_device = 8; +inline void RecvBufRequest::clear_src_device() { + _impl_.src_device_.ClearToEmpty(); +} +inline const std::string& RecvBufRequest::src_device() const { + // @@protoc_insertion_point(field_get:tensorflow.RecvBufRequest.src_device) + return _internal_src_device(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void RecvBufRequest::set_src_device(ArgT0&& arg0, ArgT... args) { + + _impl_.src_device_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.RecvBufRequest.src_device) +} +inline std::string* RecvBufRequest::mutable_src_device() { + std::string* _s = _internal_mutable_src_device(); + // @@protoc_insertion_point(field_mutable:tensorflow.RecvBufRequest.src_device) + return _s; +} +inline const std::string& RecvBufRequest::_internal_src_device() const { + return _impl_.src_device_.Get(); +} +inline void RecvBufRequest::_internal_set_src_device(const std::string& value) { + + _impl_.src_device_.Set(value, GetArenaForAllocation()); +} +inline std::string* RecvBufRequest::_internal_mutable_src_device() { + + return _impl_.src_device_.Mutable(GetArenaForAllocation()); +} +inline std::string* RecvBufRequest::release_src_device() { + // @@protoc_insertion_point(field_release:tensorflow.RecvBufRequest.src_device) + return _impl_.src_device_.Release(); +} +inline void RecvBufRequest::set_allocated_src_device(std::string* src_device) { + if (src_device != nullptr) { + + } else { + + } + _impl_.src_device_.SetAllocated(src_device, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.src_device_.IsDefault()) { + _impl_.src_device_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.RecvBufRequest.src_device) +} + +// string dst_device = 9; +inline void RecvBufRequest::clear_dst_device() { + _impl_.dst_device_.ClearToEmpty(); +} +inline const std::string& RecvBufRequest::dst_device() const { + // @@protoc_insertion_point(field_get:tensorflow.RecvBufRequest.dst_device) + return _internal_dst_device(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void RecvBufRequest::set_dst_device(ArgT0&& arg0, ArgT... args) { + + _impl_.dst_device_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.RecvBufRequest.dst_device) +} +inline std::string* RecvBufRequest::mutable_dst_device() { + std::string* _s = _internal_mutable_dst_device(); + // @@protoc_insertion_point(field_mutable:tensorflow.RecvBufRequest.dst_device) + return _s; +} +inline const std::string& RecvBufRequest::_internal_dst_device() const { + return _impl_.dst_device_.Get(); +} +inline void RecvBufRequest::_internal_set_dst_device(const std::string& value) { + + _impl_.dst_device_.Set(value, GetArenaForAllocation()); +} +inline std::string* RecvBufRequest::_internal_mutable_dst_device() { + + return _impl_.dst_device_.Mutable(GetArenaForAllocation()); +} +inline std::string* RecvBufRequest::release_dst_device() { + // @@protoc_insertion_point(field_release:tensorflow.RecvBufRequest.dst_device) + return _impl_.dst_device_.Release(); +} +inline void RecvBufRequest::set_allocated_dst_device(std::string* dst_device) { + if (dst_device != nullptr) { + + } else { + + } + _impl_.dst_device_.SetAllocated(dst_device, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.dst_device_.IsDefault()) { + _impl_.dst_device_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.RecvBufRequest.dst_device) +} + +// int64 request_id = 10; +inline void RecvBufRequest::clear_request_id() { + _impl_.request_id_ = int64_t{0}; +} +inline int64_t RecvBufRequest::_internal_request_id() const { + return _impl_.request_id_; +} +inline int64_t RecvBufRequest::request_id() const { + // @@protoc_insertion_point(field_get:tensorflow.RecvBufRequest.request_id) + return _internal_request_id(); +} +inline void RecvBufRequest::_internal_set_request_id(int64_t value) { + + _impl_.request_id_ = value; +} +inline void RecvBufRequest::set_request_id(int64_t value) { + _internal_set_request_id(value); + // @@protoc_insertion_point(field_set:tensorflow.RecvBufRequest.request_id) +} + +// uint64 src_incarnation = 11; +inline void RecvBufRequest::clear_src_incarnation() { + _impl_.src_incarnation_ = uint64_t{0u}; +} +inline uint64_t RecvBufRequest::_internal_src_incarnation() const { + return _impl_.src_incarnation_; +} +inline uint64_t RecvBufRequest::src_incarnation() const { + // @@protoc_insertion_point(field_get:tensorflow.RecvBufRequest.src_incarnation) + return _internal_src_incarnation(); +} +inline void RecvBufRequest::_internal_set_src_incarnation(uint64_t value) { + + _impl_.src_incarnation_ = value; +} +inline void RecvBufRequest::set_src_incarnation(uint64_t value) { + _internal_set_src_incarnation(value); + // @@protoc_insertion_point(field_set:tensorflow.RecvBufRequest.src_incarnation) +} + +// ------------------------------------------------------------------- + +// RecvBufResponse + +// fixed64 buf_ptr = 1; +inline void RecvBufResponse::clear_buf_ptr() { + _impl_.buf_ptr_ = uint64_t{0u}; +} +inline uint64_t RecvBufResponse::_internal_buf_ptr() const { + return _impl_.buf_ptr_; +} +inline uint64_t RecvBufResponse::buf_ptr() const { + // @@protoc_insertion_point(field_get:tensorflow.RecvBufResponse.buf_ptr) + return _internal_buf_ptr(); +} +inline void RecvBufResponse::_internal_set_buf_ptr(uint64_t value) { + + _impl_.buf_ptr_ = value; +} +inline void RecvBufResponse::set_buf_ptr(uint64_t value) { + _internal_set_buf_ptr(value); + // @@protoc_insertion_point(field_set:tensorflow.RecvBufResponse.buf_ptr) +} + +// int64 num_bytes = 2; +inline void RecvBufResponse::clear_num_bytes() { + _impl_.num_bytes_ = int64_t{0}; +} +inline int64_t RecvBufResponse::_internal_num_bytes() const { + return _impl_.num_bytes_; +} +inline int64_t RecvBufResponse::num_bytes() const { + // @@protoc_insertion_point(field_get:tensorflow.RecvBufResponse.num_bytes) + return _internal_num_bytes(); +} +inline void RecvBufResponse::_internal_set_num_bytes(int64_t value) { + + _impl_.num_bytes_ = value; +} +inline void RecvBufResponse::set_num_bytes(int64_t value) { + _internal_set_num_bytes(value); + // @@protoc_insertion_point(field_set:tensorflow.RecvBufResponse.num_bytes) +} + +// bool is_dead = 3; +inline void RecvBufResponse::clear_is_dead() { + _impl_.is_dead_ = false; +} +inline bool RecvBufResponse::_internal_is_dead() const { + return _impl_.is_dead_; +} +inline bool RecvBufResponse::is_dead() const { + // @@protoc_insertion_point(field_get:tensorflow.RecvBufResponse.is_dead) + return _internal_is_dead(); +} +inline void RecvBufResponse::_internal_set_is_dead(bool value) { + + _impl_.is_dead_ = value; +} +inline void RecvBufResponse::set_is_dead(bool value) { + _internal_set_is_dead(value); + // @@protoc_insertion_point(field_set:tensorflow.RecvBufResponse.is_dead) +} + +// .google.protobuf.Any transport_options = 4; +inline bool RecvBufResponse::_internal_has_transport_options() const { + return this != internal_default_instance() && _impl_.transport_options_ != nullptr; +} +inline bool RecvBufResponse::has_transport_options() const { + return _internal_has_transport_options(); +} +inline const ::PROTOBUF_NAMESPACE_ID::Any& RecvBufResponse::_internal_transport_options() const { + const ::PROTOBUF_NAMESPACE_ID::Any* p = _impl_.transport_options_; + return p != nullptr ? *p : reinterpret_cast( + ::PROTOBUF_NAMESPACE_ID::_Any_default_instance_); +} +inline const ::PROTOBUF_NAMESPACE_ID::Any& RecvBufResponse::transport_options() const { + // @@protoc_insertion_point(field_get:tensorflow.RecvBufResponse.transport_options) + return _internal_transport_options(); +} +inline void RecvBufResponse::unsafe_arena_set_allocated_transport_options( + ::PROTOBUF_NAMESPACE_ID::Any* transport_options) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.transport_options_); + } + _impl_.transport_options_ = transport_options; + if (transport_options) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.RecvBufResponse.transport_options) +} +inline ::PROTOBUF_NAMESPACE_ID::Any* RecvBufResponse::release_transport_options() { + + ::PROTOBUF_NAMESPACE_ID::Any* temp = _impl_.transport_options_; + _impl_.transport_options_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::PROTOBUF_NAMESPACE_ID::Any* RecvBufResponse::unsafe_arena_release_transport_options() { + // @@protoc_insertion_point(field_release:tensorflow.RecvBufResponse.transport_options) + + ::PROTOBUF_NAMESPACE_ID::Any* temp = _impl_.transport_options_; + _impl_.transport_options_ = nullptr; + return temp; +} +inline ::PROTOBUF_NAMESPACE_ID::Any* RecvBufResponse::_internal_mutable_transport_options() { + + if (_impl_.transport_options_ == nullptr) { + auto* p = CreateMaybeMessage<::PROTOBUF_NAMESPACE_ID::Any>(GetArenaForAllocation()); + _impl_.transport_options_ = p; + } + return _impl_.transport_options_; +} +inline ::PROTOBUF_NAMESPACE_ID::Any* RecvBufResponse::mutable_transport_options() { + ::PROTOBUF_NAMESPACE_ID::Any* _msg = _internal_mutable_transport_options(); + // @@protoc_insertion_point(field_mutable:tensorflow.RecvBufResponse.transport_options) + return _msg; +} +inline void RecvBufResponse::set_allocated_transport_options(::PROTOBUF_NAMESPACE_ID::Any* transport_options) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.transport_options_); + } + if (transport_options) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( + reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(transport_options)); + if (message_arena != submessage_arena) { + transport_options = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, transport_options, submessage_arena); + } + + } else { + + } + _impl_.transport_options_ = transport_options; + // @@protoc_insertion_point(field_set_allocated:tensorflow.RecvBufResponse.transport_options) +} + +// int64 send_start_micros = 5; +inline void RecvBufResponse::clear_send_start_micros() { + _impl_.send_start_micros_ = int64_t{0}; +} +inline int64_t RecvBufResponse::_internal_send_start_micros() const { + return _impl_.send_start_micros_; +} +inline int64_t RecvBufResponse::send_start_micros() const { + // @@protoc_insertion_point(field_get:tensorflow.RecvBufResponse.send_start_micros) + return _internal_send_start_micros(); +} +inline void RecvBufResponse::_internal_set_send_start_micros(int64_t value) { + + _impl_.send_start_micros_ = value; +} +inline void RecvBufResponse::set_send_start_micros(int64_t value) { + _internal_set_send_start_micros(value); + // @@protoc_insertion_point(field_set:tensorflow.RecvBufResponse.send_start_micros) +} + +// bool require_ack = 6; +inline void RecvBufResponse::clear_require_ack() { + _impl_.require_ack_ = false; +} +inline bool RecvBufResponse::_internal_require_ack() const { + return _impl_.require_ack_; +} +inline bool RecvBufResponse::require_ack() const { + // @@protoc_insertion_point(field_get:tensorflow.RecvBufResponse.require_ack) + return _internal_require_ack(); +} +inline void RecvBufResponse::_internal_set_require_ack(bool value) { + + _impl_.require_ack_ = value; +} +inline void RecvBufResponse::set_require_ack(bool value) { + _internal_set_require_ack(value); + // @@protoc_insertion_point(field_set:tensorflow.RecvBufResponse.require_ack) +} + +// ------------------------------------------------------------------- + +// CompleteGroupRequest + +// int32 group_key = 1; +inline void CompleteGroupRequest::clear_group_key() { + _impl_.group_key_ = 0; +} +inline int32_t CompleteGroupRequest::_internal_group_key() const { + return _impl_.group_key_; +} +inline int32_t CompleteGroupRequest::group_key() const { + // @@protoc_insertion_point(field_get:tensorflow.CompleteGroupRequest.group_key) + return _internal_group_key(); +} +inline void CompleteGroupRequest::_internal_set_group_key(int32_t value) { + + _impl_.group_key_ = value; +} +inline void CompleteGroupRequest::set_group_key(int32_t value) { + _internal_set_group_key(value); + // @@protoc_insertion_point(field_set:tensorflow.CompleteGroupRequest.group_key) +} + +// int32 group_size = 2; +inline void CompleteGroupRequest::clear_group_size() { + _impl_.group_size_ = 0; +} +inline int32_t CompleteGroupRequest::_internal_group_size() const { + return _impl_.group_size_; +} +inline int32_t CompleteGroupRequest::group_size() const { + // @@protoc_insertion_point(field_get:tensorflow.CompleteGroupRequest.group_size) + return _internal_group_size(); +} +inline void CompleteGroupRequest::_internal_set_group_size(int32_t value) { + + _impl_.group_size_ = value; +} +inline void CompleteGroupRequest::set_group_size(int32_t value) { + _internal_set_group_size(value); + // @@protoc_insertion_point(field_set:tensorflow.CompleteGroupRequest.group_size) +} + +// string device_type = 3; +inline void CompleteGroupRequest::clear_device_type() { + _impl_.device_type_.ClearToEmpty(); +} +inline const std::string& CompleteGroupRequest::device_type() const { + // @@protoc_insertion_point(field_get:tensorflow.CompleteGroupRequest.device_type) + return _internal_device_type(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void CompleteGroupRequest::set_device_type(ArgT0&& arg0, ArgT... args) { + + _impl_.device_type_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.CompleteGroupRequest.device_type) +} +inline std::string* CompleteGroupRequest::mutable_device_type() { + std::string* _s = _internal_mutable_device_type(); + // @@protoc_insertion_point(field_mutable:tensorflow.CompleteGroupRequest.device_type) + return _s; +} +inline const std::string& CompleteGroupRequest::_internal_device_type() const { + return _impl_.device_type_.Get(); +} +inline void CompleteGroupRequest::_internal_set_device_type(const std::string& value) { + + _impl_.device_type_.Set(value, GetArenaForAllocation()); +} +inline std::string* CompleteGroupRequest::_internal_mutable_device_type() { + + return _impl_.device_type_.Mutable(GetArenaForAllocation()); +} +inline std::string* CompleteGroupRequest::release_device_type() { + // @@protoc_insertion_point(field_release:tensorflow.CompleteGroupRequest.device_type) + return _impl_.device_type_.Release(); +} +inline void CompleteGroupRequest::set_allocated_device_type(std::string* device_type) { + if (device_type != nullptr) { + + } else { + + } + _impl_.device_type_.SetAllocated(device_type, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.device_type_.IsDefault()) { + _impl_.device_type_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.CompleteGroupRequest.device_type) +} + +// int32 collective_type = 5; +inline void CompleteGroupRequest::clear_collective_type() { + _impl_.collective_type_ = 0; +} +inline int32_t CompleteGroupRequest::_internal_collective_type() const { + return _impl_.collective_type_; +} +inline int32_t CompleteGroupRequest::collective_type() const { + // @@protoc_insertion_point(field_get:tensorflow.CompleteGroupRequest.collective_type) + return _internal_collective_type(); +} +inline void CompleteGroupRequest::_internal_set_collective_type(int32_t value) { + + _impl_.collective_type_ = value; +} +inline void CompleteGroupRequest::set_collective_type(int32_t value) { + _internal_set_collective_type(value); + // @@protoc_insertion_point(field_set:tensorflow.CompleteGroupRequest.collective_type) +} + +// .tensorflow.DeviceAttributes device_attributes = 6; +inline bool CompleteGroupRequest::_internal_has_device_attributes() const { + return this != internal_default_instance() && _impl_.device_attributes_ != nullptr; +} +inline bool CompleteGroupRequest::has_device_attributes() const { + return _internal_has_device_attributes(); +} +inline const ::tensorflow::DeviceAttributes& CompleteGroupRequest::_internal_device_attributes() const { + const ::tensorflow::DeviceAttributes* p = _impl_.device_attributes_; + return p != nullptr ? *p : reinterpret_cast( + ::tensorflow::_DeviceAttributes_default_instance_); +} +inline const ::tensorflow::DeviceAttributes& CompleteGroupRequest::device_attributes() const { + // @@protoc_insertion_point(field_get:tensorflow.CompleteGroupRequest.device_attributes) + return _internal_device_attributes(); +} +inline void CompleteGroupRequest::unsafe_arena_set_allocated_device_attributes( + ::tensorflow::DeviceAttributes* device_attributes) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.device_attributes_); + } + _impl_.device_attributes_ = device_attributes; + if (device_attributes) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.CompleteGroupRequest.device_attributes) +} +inline ::tensorflow::DeviceAttributes* CompleteGroupRequest::release_device_attributes() { + + ::tensorflow::DeviceAttributes* temp = _impl_.device_attributes_; + _impl_.device_attributes_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tensorflow::DeviceAttributes* CompleteGroupRequest::unsafe_arena_release_device_attributes() { + // @@protoc_insertion_point(field_release:tensorflow.CompleteGroupRequest.device_attributes) + + ::tensorflow::DeviceAttributes* temp = _impl_.device_attributes_; + _impl_.device_attributes_ = nullptr; + return temp; +} +inline ::tensorflow::DeviceAttributes* CompleteGroupRequest::_internal_mutable_device_attributes() { + + if (_impl_.device_attributes_ == nullptr) { + auto* p = CreateMaybeMessage<::tensorflow::DeviceAttributes>(GetArenaForAllocation()); + _impl_.device_attributes_ = p; + } + return _impl_.device_attributes_; +} +inline ::tensorflow::DeviceAttributes* CompleteGroupRequest::mutable_device_attributes() { + ::tensorflow::DeviceAttributes* _msg = _internal_mutable_device_attributes(); + // @@protoc_insertion_point(field_mutable:tensorflow.CompleteGroupRequest.device_attributes) + return _msg; +} +inline void CompleteGroupRequest::set_allocated_device_attributes(::tensorflow::DeviceAttributes* device_attributes) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.device_attributes_); + } + if (device_attributes) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( + reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(device_attributes)); + if (message_arena != submessage_arena) { + device_attributes = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, device_attributes, submessage_arena); + } + + } else { + + } + _impl_.device_attributes_ = device_attributes; + // @@protoc_insertion_point(field_set_allocated:tensorflow.CompleteGroupRequest.device_attributes) +} + +// ------------------------------------------------------------------- + +// CompleteGroupResponse + +// int32 group_key = 1; +inline void CompleteGroupResponse::clear_group_key() { + _impl_.group_key_ = 0; +} +inline int32_t CompleteGroupResponse::_internal_group_key() const { + return _impl_.group_key_; +} +inline int32_t CompleteGroupResponse::group_key() const { + // @@protoc_insertion_point(field_get:tensorflow.CompleteGroupResponse.group_key) + return _internal_group_key(); +} +inline void CompleteGroupResponse::_internal_set_group_key(int32_t value) { + + _impl_.group_key_ = value; +} +inline void CompleteGroupResponse::set_group_key(int32_t value) { + _internal_set_group_key(value); + // @@protoc_insertion_point(field_set:tensorflow.CompleteGroupResponse.group_key) +} + +// int32 group_size = 2; +inline void CompleteGroupResponse::clear_group_size() { + _impl_.group_size_ = 0; +} +inline int32_t CompleteGroupResponse::_internal_group_size() const { + return _impl_.group_size_; +} +inline int32_t CompleteGroupResponse::group_size() const { + // @@protoc_insertion_point(field_get:tensorflow.CompleteGroupResponse.group_size) + return _internal_group_size(); +} +inline void CompleteGroupResponse::_internal_set_group_size(int32_t value) { + + _impl_.group_size_ = value; +} +inline void CompleteGroupResponse::set_group_size(int32_t value) { + _internal_set_group_size(value); + // @@protoc_insertion_point(field_set:tensorflow.CompleteGroupResponse.group_size) +} + +// string device_type = 3; +inline void CompleteGroupResponse::clear_device_type() { + _impl_.device_type_.ClearToEmpty(); +} +inline const std::string& CompleteGroupResponse::device_type() const { + // @@protoc_insertion_point(field_get:tensorflow.CompleteGroupResponse.device_type) + return _internal_device_type(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void CompleteGroupResponse::set_device_type(ArgT0&& arg0, ArgT... args) { + + _impl_.device_type_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.CompleteGroupResponse.device_type) +} +inline std::string* CompleteGroupResponse::mutable_device_type() { + std::string* _s = _internal_mutable_device_type(); + // @@protoc_insertion_point(field_mutable:tensorflow.CompleteGroupResponse.device_type) + return _s; +} +inline const std::string& CompleteGroupResponse::_internal_device_type() const { + return _impl_.device_type_.Get(); +} +inline void CompleteGroupResponse::_internal_set_device_type(const std::string& value) { + + _impl_.device_type_.Set(value, GetArenaForAllocation()); +} +inline std::string* CompleteGroupResponse::_internal_mutable_device_type() { + + return _impl_.device_type_.Mutable(GetArenaForAllocation()); +} +inline std::string* CompleteGroupResponse::release_device_type() { + // @@protoc_insertion_point(field_release:tensorflow.CompleteGroupResponse.device_type) + return _impl_.device_type_.Release(); +} +inline void CompleteGroupResponse::set_allocated_device_type(std::string* device_type) { + if (device_type != nullptr) { + + } else { + + } + _impl_.device_type_.SetAllocated(device_type, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.device_type_.IsDefault()) { + _impl_.device_type_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.CompleteGroupResponse.device_type) +} + +// int32 num_tasks = 4; +inline void CompleteGroupResponse::clear_num_tasks() { + _impl_.num_tasks_ = 0; +} +inline int32_t CompleteGroupResponse::_internal_num_tasks() const { + return _impl_.num_tasks_; +} +inline int32_t CompleteGroupResponse::num_tasks() const { + // @@protoc_insertion_point(field_get:tensorflow.CompleteGroupResponse.num_tasks) + return _internal_num_tasks(); +} +inline void CompleteGroupResponse::_internal_set_num_tasks(int32_t value) { + + _impl_.num_tasks_ = value; +} +inline void CompleteGroupResponse::set_num_tasks(int32_t value) { + _internal_set_num_tasks(value); + // @@protoc_insertion_point(field_set:tensorflow.CompleteGroupResponse.num_tasks) +} + +// bytes communicator_key = 7; +inline void CompleteGroupResponse::clear_communicator_key() { + _impl_.communicator_key_.ClearToEmpty(); +} +inline const std::string& CompleteGroupResponse::communicator_key() const { + // @@protoc_insertion_point(field_get:tensorflow.CompleteGroupResponse.communicator_key) + return _internal_communicator_key(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void CompleteGroupResponse::set_communicator_key(ArgT0&& arg0, ArgT... args) { + + _impl_.communicator_key_.SetBytes(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.CompleteGroupResponse.communicator_key) +} +inline std::string* CompleteGroupResponse::mutable_communicator_key() { + std::string* _s = _internal_mutable_communicator_key(); + // @@protoc_insertion_point(field_mutable:tensorflow.CompleteGroupResponse.communicator_key) + return _s; +} +inline const std::string& CompleteGroupResponse::_internal_communicator_key() const { + return _impl_.communicator_key_.Get(); +} +inline void CompleteGroupResponse::_internal_set_communicator_key(const std::string& value) { + + _impl_.communicator_key_.Set(value, GetArenaForAllocation()); +} +inline std::string* CompleteGroupResponse::_internal_mutable_communicator_key() { + + return _impl_.communicator_key_.Mutable(GetArenaForAllocation()); +} +inline std::string* CompleteGroupResponse::release_communicator_key() { + // @@protoc_insertion_point(field_release:tensorflow.CompleteGroupResponse.communicator_key) + return _impl_.communicator_key_.Release(); +} +inline void CompleteGroupResponse::set_allocated_communicator_key(std::string* communicator_key) { + if (communicator_key != nullptr) { + + } else { + + } + _impl_.communicator_key_.SetAllocated(communicator_key, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.communicator_key_.IsDefault()) { + _impl_.communicator_key_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.CompleteGroupResponse.communicator_key) +} + +// repeated .tensorflow.DeviceAttributes device_attributes = 8; +inline int CompleteGroupResponse::_internal_device_attributes_size() const { + return _impl_.device_attributes_.size(); +} +inline int CompleteGroupResponse::device_attributes_size() const { + return _internal_device_attributes_size(); +} +inline ::tensorflow::DeviceAttributes* CompleteGroupResponse::mutable_device_attributes(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.CompleteGroupResponse.device_attributes) + return _impl_.device_attributes_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::DeviceAttributes >* +CompleteGroupResponse::mutable_device_attributes() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.CompleteGroupResponse.device_attributes) + return &_impl_.device_attributes_; +} +inline const ::tensorflow::DeviceAttributes& CompleteGroupResponse::_internal_device_attributes(int index) const { + return _impl_.device_attributes_.Get(index); +} +inline const ::tensorflow::DeviceAttributes& CompleteGroupResponse::device_attributes(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.CompleteGroupResponse.device_attributes) + return _internal_device_attributes(index); +} +inline ::tensorflow::DeviceAttributes* CompleteGroupResponse::_internal_add_device_attributes() { + return _impl_.device_attributes_.Add(); +} +inline ::tensorflow::DeviceAttributes* CompleteGroupResponse::add_device_attributes() { + ::tensorflow::DeviceAttributes* _add = _internal_add_device_attributes(); + // @@protoc_insertion_point(field_add:tensorflow.CompleteGroupResponse.device_attributes) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::DeviceAttributes >& +CompleteGroupResponse::device_attributes() const { + // @@protoc_insertion_point(field_list:tensorflow.CompleteGroupResponse.device_attributes) + return _impl_.device_attributes_; +} + +// ------------------------------------------------------------------- + +// CompleteInstanceRequest + +// string name = 1; +inline void CompleteInstanceRequest::clear_name() { + _impl_.name_.ClearToEmpty(); +} +inline const std::string& CompleteInstanceRequest::name() const { + // @@protoc_insertion_point(field_get:tensorflow.CompleteInstanceRequest.name) + return _internal_name(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void CompleteInstanceRequest::set_name(ArgT0&& arg0, ArgT... args) { + + _impl_.name_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.CompleteInstanceRequest.name) +} +inline std::string* CompleteInstanceRequest::mutable_name() { + std::string* _s = _internal_mutable_name(); + // @@protoc_insertion_point(field_mutable:tensorflow.CompleteInstanceRequest.name) + return _s; +} +inline const std::string& CompleteInstanceRequest::_internal_name() const { + return _impl_.name_.Get(); +} +inline void CompleteInstanceRequest::_internal_set_name(const std::string& value) { + + _impl_.name_.Set(value, GetArenaForAllocation()); +} +inline std::string* CompleteInstanceRequest::_internal_mutable_name() { + + return _impl_.name_.Mutable(GetArenaForAllocation()); +} +inline std::string* CompleteInstanceRequest::release_name() { + // @@protoc_insertion_point(field_release:tensorflow.CompleteInstanceRequest.name) + return _impl_.name_.Release(); +} +inline void CompleteInstanceRequest::set_allocated_name(std::string* name) { + if (name != nullptr) { + + } else { + + } + _impl_.name_.SetAllocated(name, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.name_.IsDefault()) { + _impl_.name_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.CompleteInstanceRequest.name) +} + +// int32 type = 2; +inline void CompleteInstanceRequest::clear_type() { + _impl_.type_ = 0; +} +inline int32_t CompleteInstanceRequest::_internal_type() const { + return _impl_.type_; +} +inline int32_t CompleteInstanceRequest::type() const { + // @@protoc_insertion_point(field_get:tensorflow.CompleteInstanceRequest.type) + return _internal_type(); +} +inline void CompleteInstanceRequest::_internal_set_type(int32_t value) { + + _impl_.type_ = value; +} +inline void CompleteInstanceRequest::set_type(int32_t value) { + _internal_set_type(value); + // @@protoc_insertion_point(field_set:tensorflow.CompleteInstanceRequest.type) +} + +// .tensorflow.DataType data_type = 3; +inline void CompleteInstanceRequest::clear_data_type() { + _impl_.data_type_ = 0; +} +inline ::tensorflow::DataType CompleteInstanceRequest::_internal_data_type() const { + return static_cast< ::tensorflow::DataType >(_impl_.data_type_); +} +inline ::tensorflow::DataType CompleteInstanceRequest::data_type() const { + // @@protoc_insertion_point(field_get:tensorflow.CompleteInstanceRequest.data_type) + return _internal_data_type(); +} +inline void CompleteInstanceRequest::_internal_set_data_type(::tensorflow::DataType value) { + + _impl_.data_type_ = value; +} +inline void CompleteInstanceRequest::set_data_type(::tensorflow::DataType value) { + _internal_set_data_type(value); + // @@protoc_insertion_point(field_set:tensorflow.CompleteInstanceRequest.data_type) +} + +// .tensorflow.TensorShapeProto shape = 4; +inline bool CompleteInstanceRequest::_internal_has_shape() const { + return this != internal_default_instance() && _impl_.shape_ != nullptr; +} +inline bool CompleteInstanceRequest::has_shape() const { + return _internal_has_shape(); +} +inline const ::tensorflow::TensorShapeProto& CompleteInstanceRequest::_internal_shape() const { + const ::tensorflow::TensorShapeProto* p = _impl_.shape_; + return p != nullptr ? *p : reinterpret_cast( + ::tensorflow::_TensorShapeProto_default_instance_); +} +inline const ::tensorflow::TensorShapeProto& CompleteInstanceRequest::shape() const { + // @@protoc_insertion_point(field_get:tensorflow.CompleteInstanceRequest.shape) + return _internal_shape(); +} +inline void CompleteInstanceRequest::unsafe_arena_set_allocated_shape( + ::tensorflow::TensorShapeProto* shape) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.shape_); + } + _impl_.shape_ = shape; + if (shape) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.CompleteInstanceRequest.shape) +} +inline ::tensorflow::TensorShapeProto* CompleteInstanceRequest::release_shape() { + + ::tensorflow::TensorShapeProto* temp = _impl_.shape_; + _impl_.shape_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tensorflow::TensorShapeProto* CompleteInstanceRequest::unsafe_arena_release_shape() { + // @@protoc_insertion_point(field_release:tensorflow.CompleteInstanceRequest.shape) + + ::tensorflow::TensorShapeProto* temp = _impl_.shape_; + _impl_.shape_ = nullptr; + return temp; +} +inline ::tensorflow::TensorShapeProto* CompleteInstanceRequest::_internal_mutable_shape() { + + if (_impl_.shape_ == nullptr) { + auto* p = CreateMaybeMessage<::tensorflow::TensorShapeProto>(GetArenaForAllocation()); + _impl_.shape_ = p; + } + return _impl_.shape_; +} +inline ::tensorflow::TensorShapeProto* CompleteInstanceRequest::mutable_shape() { + ::tensorflow::TensorShapeProto* _msg = _internal_mutable_shape(); + // @@protoc_insertion_point(field_mutable:tensorflow.CompleteInstanceRequest.shape) + return _msg; +} +inline void CompleteInstanceRequest::set_allocated_shape(::tensorflow::TensorShapeProto* shape) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.shape_); + } + if (shape) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( + reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(shape)); + if (message_arena != submessage_arena) { + shape = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, shape, submessage_arena); + } + + } else { + + } + _impl_.shape_ = shape; + // @@protoc_insertion_point(field_set_allocated:tensorflow.CompleteInstanceRequest.shape) +} + +// int32 group_key = 5; +inline void CompleteInstanceRequest::clear_group_key() { + _impl_.group_key_ = 0; +} +inline int32_t CompleteInstanceRequest::_internal_group_key() const { + return _impl_.group_key_; +} +inline int32_t CompleteInstanceRequest::group_key() const { + // @@protoc_insertion_point(field_get:tensorflow.CompleteInstanceRequest.group_key) + return _internal_group_key(); +} +inline void CompleteInstanceRequest::_internal_set_group_key(int32_t value) { + + _impl_.group_key_ = value; +} +inline void CompleteInstanceRequest::set_group_key(int32_t value) { + _internal_set_group_key(value); + // @@protoc_insertion_point(field_set:tensorflow.CompleteInstanceRequest.group_key) +} + +// int32 group_size = 6; +inline void CompleteInstanceRequest::clear_group_size() { + _impl_.group_size_ = 0; +} +inline int32_t CompleteInstanceRequest::_internal_group_size() const { + return _impl_.group_size_; +} +inline int32_t CompleteInstanceRequest::group_size() const { + // @@protoc_insertion_point(field_get:tensorflow.CompleteInstanceRequest.group_size) + return _internal_group_size(); +} +inline void CompleteInstanceRequest::_internal_set_group_size(int32_t value) { + + _impl_.group_size_ = value; +} +inline void CompleteInstanceRequest::set_group_size(int32_t value) { + _internal_set_group_size(value); + // @@protoc_insertion_point(field_set:tensorflow.CompleteInstanceRequest.group_size) +} + +// int32 instance_key = 7; +inline void CompleteInstanceRequest::clear_instance_key() { + _impl_.instance_key_ = 0; +} +inline int32_t CompleteInstanceRequest::_internal_instance_key() const { + return _impl_.instance_key_; +} +inline int32_t CompleteInstanceRequest::instance_key() const { + // @@protoc_insertion_point(field_get:tensorflow.CompleteInstanceRequest.instance_key) + return _internal_instance_key(); +} +inline void CompleteInstanceRequest::_internal_set_instance_key(int32_t value) { + + _impl_.instance_key_ = value; +} +inline void CompleteInstanceRequest::set_instance_key(int32_t value) { + _internal_set_instance_key(value); + // @@protoc_insertion_point(field_set:tensorflow.CompleteInstanceRequest.instance_key) +} + +// string device_type = 8; +inline void CompleteInstanceRequest::clear_device_type() { + _impl_.device_type_.ClearToEmpty(); +} +inline const std::string& CompleteInstanceRequest::device_type() const { + // @@protoc_insertion_point(field_get:tensorflow.CompleteInstanceRequest.device_type) + return _internal_device_type(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void CompleteInstanceRequest::set_device_type(ArgT0&& arg0, ArgT... args) { + + _impl_.device_type_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.CompleteInstanceRequest.device_type) +} +inline std::string* CompleteInstanceRequest::mutable_device_type() { + std::string* _s = _internal_mutable_device_type(); + // @@protoc_insertion_point(field_mutable:tensorflow.CompleteInstanceRequest.device_type) + return _s; +} +inline const std::string& CompleteInstanceRequest::_internal_device_type() const { + return _impl_.device_type_.Get(); +} +inline void CompleteInstanceRequest::_internal_set_device_type(const std::string& value) { + + _impl_.device_type_.Set(value, GetArenaForAllocation()); +} +inline std::string* CompleteInstanceRequest::_internal_mutable_device_type() { + + return _impl_.device_type_.Mutable(GetArenaForAllocation()); +} +inline std::string* CompleteInstanceRequest::release_device_type() { + // @@protoc_insertion_point(field_release:tensorflow.CompleteInstanceRequest.device_type) + return _impl_.device_type_.Release(); +} +inline void CompleteInstanceRequest::set_allocated_device_type(std::string* device_type) { + if (device_type != nullptr) { + + } else { + + } + _impl_.device_type_.SetAllocated(device_type, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.device_type_.IsDefault()) { + _impl_.device_type_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.CompleteInstanceRequest.device_type) +} + +// repeated int32 subdiv_offset = 9; +inline int CompleteInstanceRequest::_internal_subdiv_offset_size() const { + return _impl_.subdiv_offset_.size(); +} +inline int CompleteInstanceRequest::subdiv_offset_size() const { + return _internal_subdiv_offset_size(); +} +inline void CompleteInstanceRequest::clear_subdiv_offset() { + _impl_.subdiv_offset_.Clear(); +} +inline int32_t CompleteInstanceRequest::_internal_subdiv_offset(int index) const { + return _impl_.subdiv_offset_.Get(index); +} +inline int32_t CompleteInstanceRequest::subdiv_offset(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.CompleteInstanceRequest.subdiv_offset) + return _internal_subdiv_offset(index); +} +inline void CompleteInstanceRequest::set_subdiv_offset(int index, int32_t value) { + _impl_.subdiv_offset_.Set(index, value); + // @@protoc_insertion_point(field_set:tensorflow.CompleteInstanceRequest.subdiv_offset) +} +inline void CompleteInstanceRequest::_internal_add_subdiv_offset(int32_t value) { + _impl_.subdiv_offset_.Add(value); +} +inline void CompleteInstanceRequest::add_subdiv_offset(int32_t value) { + _internal_add_subdiv_offset(value); + // @@protoc_insertion_point(field_add:tensorflow.CompleteInstanceRequest.subdiv_offset) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >& +CompleteInstanceRequest::_internal_subdiv_offset() const { + return _impl_.subdiv_offset_; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >& +CompleteInstanceRequest::subdiv_offset() const { + // @@protoc_insertion_point(field_list:tensorflow.CompleteInstanceRequest.subdiv_offset) + return _internal_subdiv_offset(); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >* +CompleteInstanceRequest::_internal_mutable_subdiv_offset() { + return &_impl_.subdiv_offset_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >* +CompleteInstanceRequest::mutable_subdiv_offset() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.CompleteInstanceRequest.subdiv_offset) + return _internal_mutable_subdiv_offset(); +} + +// string device = 10; +inline void CompleteInstanceRequest::clear_device() { + _impl_.device_.ClearToEmpty(); +} +inline const std::string& CompleteInstanceRequest::device() const { + // @@protoc_insertion_point(field_get:tensorflow.CompleteInstanceRequest.device) + return _internal_device(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void CompleteInstanceRequest::set_device(ArgT0&& arg0, ArgT... args) { + + _impl_.device_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.CompleteInstanceRequest.device) +} +inline std::string* CompleteInstanceRequest::mutable_device() { + std::string* _s = _internal_mutable_device(); + // @@protoc_insertion_point(field_mutable:tensorflow.CompleteInstanceRequest.device) + return _s; +} +inline const std::string& CompleteInstanceRequest::_internal_device() const { + return _impl_.device_.Get(); +} +inline void CompleteInstanceRequest::_internal_set_device(const std::string& value) { + + _impl_.device_.Set(value, GetArenaForAllocation()); +} +inline std::string* CompleteInstanceRequest::_internal_mutable_device() { + + return _impl_.device_.Mutable(GetArenaForAllocation()); +} +inline std::string* CompleteInstanceRequest::release_device() { + // @@protoc_insertion_point(field_release:tensorflow.CompleteInstanceRequest.device) + return _impl_.device_.Release(); +} +inline void CompleteInstanceRequest::set_allocated_device(std::string* device) { + if (device != nullptr) { + + } else { + + } + _impl_.device_.SetAllocated(device, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.device_.IsDefault()) { + _impl_.device_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.CompleteInstanceRequest.device) +} + +// bool is_source = 11; +inline void CompleteInstanceRequest::clear_is_source() { + _impl_.is_source_ = false; +} +inline bool CompleteInstanceRequest::_internal_is_source() const { + return _impl_.is_source_; +} +inline bool CompleteInstanceRequest::is_source() const { + // @@protoc_insertion_point(field_get:tensorflow.CompleteInstanceRequest.is_source) + return _internal_is_source(); +} +inline void CompleteInstanceRequest::_internal_set_is_source(bool value) { + + _impl_.is_source_ = value; +} +inline void CompleteInstanceRequest::set_is_source(bool value) { + _internal_set_is_source(value); + // @@protoc_insertion_point(field_set:tensorflow.CompleteInstanceRequest.is_source) +} + +// int64 step_id = 12; +inline void CompleteInstanceRequest::clear_step_id() { + _impl_.step_id_ = int64_t{0}; +} +inline int64_t CompleteInstanceRequest::_internal_step_id() const { + return _impl_.step_id_; +} +inline int64_t CompleteInstanceRequest::step_id() const { + // @@protoc_insertion_point(field_get:tensorflow.CompleteInstanceRequest.step_id) + return _internal_step_id(); +} +inline void CompleteInstanceRequest::_internal_set_step_id(int64_t value) { + + _impl_.step_id_ = value; +} +inline void CompleteInstanceRequest::set_step_id(int64_t value) { + _internal_set_step_id(value); + // @@protoc_insertion_point(field_set:tensorflow.CompleteInstanceRequest.step_id) +} + +// ------------------------------------------------------------------- + +// CompleteInstanceResponse + +// int32 instance_key = 1; +inline void CompleteInstanceResponse::clear_instance_key() { + _impl_.instance_key_ = 0; +} +inline int32_t CompleteInstanceResponse::_internal_instance_key() const { + return _impl_.instance_key_; +} +inline int32_t CompleteInstanceResponse::instance_key() const { + // @@protoc_insertion_point(field_get:tensorflow.CompleteInstanceResponse.instance_key) + return _internal_instance_key(); +} +inline void CompleteInstanceResponse::_internal_set_instance_key(int32_t value) { + + _impl_.instance_key_ = value; +} +inline void CompleteInstanceResponse::set_instance_key(int32_t value) { + _internal_set_instance_key(value); + // @@protoc_insertion_point(field_set:tensorflow.CompleteInstanceResponse.instance_key) +} + +// int32 source_rank = 2; +inline void CompleteInstanceResponse::clear_source_rank() { + _impl_.source_rank_ = 0; +} +inline int32_t CompleteInstanceResponse::_internal_source_rank() const { + return _impl_.source_rank_; +} +inline int32_t CompleteInstanceResponse::source_rank() const { + // @@protoc_insertion_point(field_get:tensorflow.CompleteInstanceResponse.source_rank) + return _internal_source_rank(); +} +inline void CompleteInstanceResponse::_internal_set_source_rank(int32_t value) { + + _impl_.source_rank_ = value; +} +inline void CompleteInstanceResponse::set_source_rank(int32_t value) { + _internal_set_source_rank(value); + // @@protoc_insertion_point(field_set:tensorflow.CompleteInstanceResponse.source_rank) +} + +// ------------------------------------------------------------------- + +// GetStepSequenceRequest + +// repeated int64 graph_key = 1; +inline int GetStepSequenceRequest::_internal_graph_key_size() const { + return _impl_.graph_key_.size(); +} +inline int GetStepSequenceRequest::graph_key_size() const { + return _internal_graph_key_size(); +} +inline void GetStepSequenceRequest::clear_graph_key() { + _impl_.graph_key_.Clear(); +} +inline int64_t GetStepSequenceRequest::_internal_graph_key(int index) const { + return _impl_.graph_key_.Get(index); +} +inline int64_t GetStepSequenceRequest::graph_key(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.GetStepSequenceRequest.graph_key) + return _internal_graph_key(index); +} +inline void GetStepSequenceRequest::set_graph_key(int index, int64_t value) { + _impl_.graph_key_.Set(index, value); + // @@protoc_insertion_point(field_set:tensorflow.GetStepSequenceRequest.graph_key) +} +inline void GetStepSequenceRequest::_internal_add_graph_key(int64_t value) { + _impl_.graph_key_.Add(value); +} +inline void GetStepSequenceRequest::add_graph_key(int64_t value) { + _internal_add_graph_key(value); + // @@protoc_insertion_point(field_add:tensorflow.GetStepSequenceRequest.graph_key) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >& +GetStepSequenceRequest::_internal_graph_key() const { + return _impl_.graph_key_; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >& +GetStepSequenceRequest::graph_key() const { + // @@protoc_insertion_point(field_list:tensorflow.GetStepSequenceRequest.graph_key) + return _internal_graph_key(); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >* +GetStepSequenceRequest::_internal_mutable_graph_key() { + return &_impl_.graph_key_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >* +GetStepSequenceRequest::mutable_graph_key() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.GetStepSequenceRequest.graph_key) + return _internal_mutable_graph_key(); +} + +// ------------------------------------------------------------------- + +// StepSequence + +// int64 graph_key = 1; +inline void StepSequence::clear_graph_key() { + _impl_.graph_key_ = int64_t{0}; +} +inline int64_t StepSequence::_internal_graph_key() const { + return _impl_.graph_key_; +} +inline int64_t StepSequence::graph_key() const { + // @@protoc_insertion_point(field_get:tensorflow.StepSequence.graph_key) + return _internal_graph_key(); +} +inline void StepSequence::_internal_set_graph_key(int64_t value) { + + _impl_.graph_key_ = value; +} +inline void StepSequence::set_graph_key(int64_t value) { + _internal_set_graph_key(value); + // @@protoc_insertion_point(field_set:tensorflow.StepSequence.graph_key) +} + +// int64 next_step_id = 2; +inline void StepSequence::clear_next_step_id() { + _impl_.next_step_id_ = int64_t{0}; +} +inline int64_t StepSequence::_internal_next_step_id() const { + return _impl_.next_step_id_; +} +inline int64_t StepSequence::next_step_id() const { + // @@protoc_insertion_point(field_get:tensorflow.StepSequence.next_step_id) + return _internal_next_step_id(); +} +inline void StepSequence::_internal_set_next_step_id(int64_t value) { + + _impl_.next_step_id_ = value; +} +inline void StepSequence::set_next_step_id(int64_t value) { + _internal_set_next_step_id(value); + // @@protoc_insertion_point(field_set:tensorflow.StepSequence.next_step_id) +} + +// ------------------------------------------------------------------- + +// GetStepSequenceResponse + +// repeated .tensorflow.StepSequence step_sequence = 1; +inline int GetStepSequenceResponse::_internal_step_sequence_size() const { + return _impl_.step_sequence_.size(); +} +inline int GetStepSequenceResponse::step_sequence_size() const { + return _internal_step_sequence_size(); +} +inline void GetStepSequenceResponse::clear_step_sequence() { + _impl_.step_sequence_.Clear(); +} +inline ::tensorflow::StepSequence* GetStepSequenceResponse::mutable_step_sequence(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.GetStepSequenceResponse.step_sequence) + return _impl_.step_sequence_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::StepSequence >* +GetStepSequenceResponse::mutable_step_sequence() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.GetStepSequenceResponse.step_sequence) + return &_impl_.step_sequence_; +} +inline const ::tensorflow::StepSequence& GetStepSequenceResponse::_internal_step_sequence(int index) const { + return _impl_.step_sequence_.Get(index); +} +inline const ::tensorflow::StepSequence& GetStepSequenceResponse::step_sequence(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.GetStepSequenceResponse.step_sequence) + return _internal_step_sequence(index); +} +inline ::tensorflow::StepSequence* GetStepSequenceResponse::_internal_add_step_sequence() { + return _impl_.step_sequence_.Add(); +} +inline ::tensorflow::StepSequence* GetStepSequenceResponse::add_step_sequence() { + ::tensorflow::StepSequence* _add = _internal_add_step_sequence(); + // @@protoc_insertion_point(field_add:tensorflow.GetStepSequenceResponse.step_sequence) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::StepSequence >& +GetStepSequenceResponse::step_sequence() const { + // @@protoc_insertion_point(field_list:tensorflow.GetStepSequenceResponse.step_sequence) + return _impl_.step_sequence_; +} + +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + + +// @@protoc_insertion_point(namespace_scope) + +} // namespace tensorflow + +// @@protoc_insertion_point(global_scope) + +#include +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprotobuf_2fworker_2eproto diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/public/session.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/public/session.h new file mode 100644 index 0000000000000000000000000000000000000000..701f86dc11b0e99a9d3a6e3285682e2a46ea9e9d --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/public/session.h @@ -0,0 +1,366 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_PUBLIC_SESSION_H_ +#define TENSORFLOW_CORE_PUBLIC_SESSION_H_ + +#include +#include +#include + +#include "absl/status/status.h" +#include "tensorflow/core/framework/device_attributes.pb.h" +#include "tensorflow/core/framework/graph.pb.h" +#include "tensorflow/core/framework/tensor.h" +#include "tensorflow/core/lib/core/errors.h" +#include "tensorflow/core/lib/core/status.h" +#include "tensorflow/core/platform/env.h" +#include "tensorflow/core/protobuf/config.pb.h" +#include "tensorflow/core/public/session_options.h" + +namespace tsl { +namespace thread { +struct ThreadPoolOptions; +} +} // namespace tsl + +namespace tensorflow { + +class DeviceMgr; + +namespace thread { +using tsl::thread::ThreadPoolOptions; +} + +/// \brief A Session instance lets a caller drive a TensorFlow graph +/// computation. +/// +/// When a Session is created with a given target, a new Session object +/// is bound to the universe of resources specified by that target. +/// Those resources are available to this session to perform +/// computation described in the GraphDef. After extending the session +/// with a graph, the caller uses the Run() API to perform the +/// computation and potentially fetch outputs as Tensors. +/// +/// Example: +/// +/// ```c++ +/// +/// tensorflow::GraphDef graph; +/// // ... Create or load graph into "graph". +/// +/// // This example uses the default options which connects +/// // to a local runtime. +/// tensorflow::SessionOptions options; +/// std::unique_ptr +/// session(tensorflow::NewSession(options)); +/// +/// // Create the session with this graph. +/// tensorflow::Status s = session->Create(graph); +/// if (!s.ok()) { ... } +/// +/// // Run the graph and fetch the first output of the "output" +/// // operation, and also run to but do not return anything +/// // for the "update_state" operation. +/// std::vector outputs; +/// s = session->Run({}, {"output:0"}, {"update_state"}, &outputs); +/// if (!s.ok()) { ... } +/// +/// // Map the output as a flattened float tensor, and do something +/// // with it. +/// auto output_tensor = outputs[0].flat(); +/// if (output_tensor(0) > 0.5) { ... } +/// +/// // Close the session to release the resources associated with +/// // this session. +/// session->Close(); +/// +/// ``` +/// +/// A Session allows concurrent calls to Run(), though a Session must +/// be created / extended by a single thread. +/// +/// Only one thread must call Close(), and Close() must only be called +/// after all other calls to Run() have returned. +class Session { + public: + Session(); + virtual ~Session(); + + /// \brief Create the graph to be used for the session. + /// + /// Returns an error if this session has already been created with a + /// graph. To re-use the session with a different graph, the caller + /// must Close() the session first. + virtual Status Create(const GraphDef& graph) = 0; +#ifndef SWIG + virtual Status Create(GraphDef&& graph) { return Create(graph); } +#endif + + /// \brief Adds operations to the graph that is already registered with the + /// Session. + /// + /// The names of new operations in "graph" must not exist in the + /// graph that is already registered. + virtual Status Extend(const GraphDef& graph) = 0; +#ifndef SWIG + virtual Status Extend(GraphDef&& graph) { return Extend(graph); } +#endif + + /// \brief Runs the graph with the provided input tensors and fills + /// `outputs` for the endpoints specified in `output_tensor_names`. + /// Runs to but does not return Tensors for the nodes in + /// `target_tensor_names`. + /// + /// The order of tensors in `outputs` will match the order provided + /// by `output_tensor_names`. + /// + /// If `Run` returns `OK()`, then `outputs->size()` will be equal to + /// `output_tensor_names.size()`. If `Run` does not return `OK()`, the + /// state of `outputs` is undefined. + /// + /// REQUIRES: The name of each Tensor of the input or output must + /// match a "Tensor endpoint" in the `GraphDef` passed to `Create()`. + /// + /// REQUIRES: At least one of `output_tensor_names` and + /// `target_tensor_names` must be non-empty. + /// + /// REQUIRES: outputs is not nullptr if `output_tensor_names` is non-empty. + virtual Status Run(const std::vector >& inputs, + const std::vector& output_tensor_names, + const std::vector& target_tensor_names, + std::vector* outputs) = 0; + + /// \brief Implementations which support `RunOptions`. + // + /// NOTE: This API is still experimental and may change. + virtual Status Create(const RunOptions& run_options, const GraphDef& graph) { + return absl::UnimplementedError( + "Create(const RunOptions& run_options, const GraphDef& graph) is not " + "supported for this session."); + } + virtual Status Extend(const RunOptions& run_options, const GraphDef& graph) { + return absl::UnimplementedError( + "Extend(const RunOptions& run_options, const GraphDef& graph) is not " + "supported for this session."); + } +#ifndef SWIG + virtual Status Create(const RunOptions& run_options, GraphDef&& graph) { + return Create(run_options, graph); + } + virtual Status Extend(const RunOptions& run_options, GraphDef&& graph) { + return Extend(run_options, graph); + } +#endif + virtual Status Close(const RunOptions& run_options) { + return absl::UnimplementedError( + "Close(const RunOptions& run_options) is not supported for this " + "session."); + } + + /// \brief Like `Run`, but allows users to pass in a `RunOptions` proto and + /// to retrieve non-Tensor metadata output via a `RunMetadata` proto for this + /// step. `run_metadata` may be nullptr, in which case any metadata output is + /// discarded. + /// NOTE: This API is still experimental and may change. + virtual Status Run(const RunOptions& run_options, + const std::vector >& inputs, + const std::vector& output_tensor_names, + const std::vector& target_tensor_names, + std::vector* outputs, RunMetadata* run_metadata); + + /// \brief Like `Run` with `RunOptions` proto, but allows user to provide + /// custom threadpool implementation via ThreadPoolOptions. + /// NOTE: This API is still experimental and may change. + virtual Status Run(const RunOptions& run_options, + const std::vector >& inputs, + const std::vector& output_tensor_names, + const std::vector& target_tensor_names, + std::vector* outputs, RunMetadata* run_metadata, + const thread::ThreadPoolOptions& threadpool_options) { + return absl::UnimplementedError( + "Run with threadpool is not supported for this session."); + } + + /// \brief Sets up a graph for partial execution. All future feeds and + /// fetches are specified by `input_names` and `output_names`. Returns + /// `handle` that can be used to perform a sequence of partial feeds and + /// fetches. + /// NOTE: This API is still experimental and may change. + virtual Status PRunSetup(const std::vector& input_names, + const std::vector& output_names, + const std::vector& target_nodes, + std::string* handle); + + /// \brief Continues the pending execution specified by `handle` with the + /// provided input tensors and fills `outputs` for the endpoints specified + /// in `output_names`. + /// NOTE: This API is still experimental and may change. + virtual Status PRun( + const std::string& handle, + const std::vector >& inputs, + const std::vector& output_names, + std::vector* outputs); + + /// \brief List devices in the session. + /// + /// Retrieves the list of available devices within the session, and populates + /// *response. This API is optional. If it is unimplemented, Status will + /// return a corresponding error message, and *response will be unmodified. + virtual Status ListDevices(std::vector* response) = 0; + + /// \brief Closes this session. + /// + /// Closing a session releases the resources used by this session + /// on the TensorFlow runtime (specified during session creation by + /// the `SessionOptions::target` field). + virtual Status Close() = 0; + + // NOTE(ashankar): As of July 2017, this method was added to facilitate some + // experimentation. Reconsider/re-evaluate after September 2017. + // + // Sets `*output` to the `DeviceMgr` that owns accessible devices in the + // address-space of the caller. + virtual Status LocalDeviceManager(const DeviceMgr** output) { + return absl::UnimplementedError( + "LocalDeviceManager is not supported for this session."); + } + + /// \brief A handle to a subgraph, created with `Session::MakeCallable()`. + typedef int64_t CallableHandle; + + /// \brief Creates a `handle` for invoking the subgraph defined by + /// `callable_options`. + /// NOTE: This API is still experimental and may change. + virtual Status MakeCallable(const CallableOptions& callable_options, + CallableHandle* out_handle) { + return absl::UnimplementedError( + "MakeCallable is not supported for this session."); + } + + /// \brief Invokes the subgraph named by `handle` with the given options and + /// input tensors. + /// + /// The order of tensors in `feed_tensors` must and `fetch_tensors` will + /// match the order of names in `CallableOptions::feed()` and + /// `CallableOptions::fetch()` when this subgraph was created. + /// NOTE: This API is still experimental and may change. + virtual Status RunCallable(CallableHandle handle, + const std::vector& feed_tensors, + std::vector* fetch_tensors, + RunMetadata* run_metadata) { + return absl::UnimplementedError( + "RunCallable is not supported for this session."); + } + + /// \brief Invokes the subgraph named by `handle` with the given options and + /// input tensors. User can provide custom threadpool implementation via + /// threadpool_options. + /// + /// The order of tensors in `feed_tensors` must and `fetch_tensors` will + /// match the order of names in `CallableOptions::feed()` and + /// `CallableOptions::fetch()` when this subgraph was created. + /// NOTE: This API is still experimental and may change. + virtual Status RunCallable( + CallableHandle handle, const std::vector& feed_tensors, + std::vector* fetch_tensors, RunMetadata* run_metadata, + const thread::ThreadPoolOptions& threadpool_options) { + return absl::UnimplementedError( + "RunCallable with threadpool is not supported for this session."); + } + + /// \brief Releases resources associated with the given `handle` in this + /// session. + /// NOTE: This API is still experimental and may change. + virtual Status ReleaseCallable(CallableHandle handle) { + return absl::UnimplementedError( + "ReleaseCallable is not supported for this session."); + } + + /// \brief Release global graph-related state in this session. + /// + /// After calling `this->Finalize()`, calls to `this->Run()` with previously + /// unseen feeds and fetches, and calls to `this->MakeCallable()` will fail. + /// Using `MakeCallable()` and `RunCallable()` is recommended, because + /// explicit callable creation makes it clearer where the `Finalize()` call + /// should be placed. + /// + /// This API can be used in conjunction with a "warmup" phase to reduce the + /// memory consumed by the session: + /// + /// 1. Call `Session::Create()`. + /// 2. Call `Session::MakeCallable()` for all subgraphs that you will execute + /// in the session. + /// 3. Call `Session::Finalize()` to release global graph-related state. + /// 4. Call `Session::RunCallable()` with the handle(s) created in step 2. + /// + /// NOTE: This API is still experimental and may change. + virtual Status Finalize() { + return absl::UnimplementedError( + "Finalize is not supported for this session."); + } +}; + +/// \brief Create a new session with the given options. +/// +/// If session creation succeeds, the new `Session` will be stored in +/// `*out_session`, the caller will take ownership of the returned +/// `*out_session`, and this function will return `OK()`. Otherwise, this +/// function will return an error status and set *out_session to nullptr. +Status NewSession(const SessionOptions& options, Session** out_session); + +/// \brief Resets resource containers associated with a target. +/// +/// Reset() allows misbehaving or slow sessions to be aborted and closed, and +/// causes their resources eventually to be released. Reset() does not wait +/// for the computations in old sessions to cease; it merely starts the +/// process of tearing them down. However, if a new session is started after +/// a Reset(), the new session is isolated from changes that old sessions +/// (started prior to the Reset()) may continue to make to resources, provided +/// all those resources are in containers listed in "containers". +/// +/// Old sessions may continue to have side-effects on resources not in +/// containers listed in "containers", and thus may affect future +/// sessions' results in ways that are hard to predict. Thus, if well-defined +/// behavior is desired, it is recommended that all containers be listed in +/// "containers". +/// +/// `containers` is a vector of string representation of resource container +/// names. When a resource container is reset, the resources held by the +/// container will be released. In particular, all Variables in the container +/// will become undefined. If the "containers" vector is empty, the default +/// container is assumed. If the "containers" vector is non-empty, the +/// default container should be listed explicitly. +/// +/// If Reset succeeds, this function will return `OK()`. Otherwise, this +/// function will return an error status. +Status Reset(const SessionOptions& options, + const std::vector& containers); + +/// \brief Create a new session with the given options. +/// +/// If a new `Session` object could not be created, this function will +/// return nullptr. +/// +/// *Strongly prefer* the version of NewSession that returns Status, +/// which contains more helpful error information. +Session* NewSession(const SessionOptions& options); + +/// \brief Export the metric that indicates the session is created. +void SetSessionCreatedMetric(); + +} // end namespace tensorflow + +#endif // TENSORFLOW_CORE_PUBLIC_SESSION_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/public/session_options.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/public/session_options.h new file mode 100644 index 0000000000000000000000000000000000000000..92134528dbf975a28183188398ceda38acd250fd --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/public/session_options.h @@ -0,0 +1,67 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_PUBLIC_SESSION_OPTIONS_H_ +#define TENSORFLOW_CORE_PUBLIC_SESSION_OPTIONS_H_ + +#include + +#include "tensorflow/core/platform/types.h" +#include "tensorflow/core/protobuf/config.pb.h" + +namespace tsl { +class Env; +} // namespace tsl +namespace tensorflow { + +/// Configuration information for a Session. +struct SessionOptions { + /// The environment to use. + tsl::Env* env; + + /// \brief The TensorFlow runtime to connect to. + /// + /// If 'target' is empty or unspecified, the local TensorFlow runtime + /// implementation will be used. Otherwise, the TensorFlow engine + /// defined by 'target' will be used to perform all computations. + /// + /// "target" can be either a single entry or a comma separated list + /// of entries. Each entry is a resolvable address of the + /// following format: + /// local + /// ip:port + /// host:port + /// ... other system-specific formats to identify tasks and jobs ... + /// + /// NOTE: at the moment 'local' maps to an in-process service-based + /// runtime. + /// + /// Upon creation, a single session affines itself to one of the + /// remote processes, with possible load balancing choices when the + /// "target" resolves to a list of possible processes. + /// + /// If the session disconnects from the remote process during its + /// lifetime, session calls may fail immediately. + std::string target; + + /// Configuration options. + ConfigProto config; + + SessionOptions(); +}; + +} // end namespace tensorflow + +#endif // TENSORFLOW_CORE_PUBLIC_SESSION_OPTIONS_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/public/version.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/public/version.h new file mode 100644 index 0000000000000000000000000000000000000000..769a2065080fed81b553f6128964ad11d6de8127 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/public/version.h @@ -0,0 +1,127 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_PUBLIC_VERSION_H_ +#define TENSORFLOW_CORE_PUBLIC_VERSION_H_ + +// TensorFlow uses semantic versioning, see http://semver.org/. + +// Also update tensorflow/tensorflow.bzl and +// tensorflow/tools/pip_package/setup.py +#define TF_MAJOR_VERSION 2 +#define TF_MINOR_VERSION 15 +#define TF_PATCH_VERSION 1 + +// TF_VERSION_SUFFIX is non-empty for pre-releases (e.g. "-alpha", "-alpha.1", +// "-beta", "-rc", "-rc.1") +#define TF_VERSION_SUFFIX "" + +#define TF_STR_HELPER(x) #x +#define TF_STR(x) TF_STR_HELPER(x) + +// e.g. "0.5.0" or "0.6.0-alpha". +#define TF_VERSION_STRING \ + (TF_STR(TF_MAJOR_VERSION) "." TF_STR(TF_MINOR_VERSION) "." TF_STR( \ + TF_PATCH_VERSION) TF_VERSION_SUFFIX) + +// GraphDef compatibility versions (the versions field in graph.proto). +// +// Each graph has producer and min_consumer versions, and each +// consumer has its own version and a min_producer. In addition, graphs can +// mark specific consumer versions as bad (to prevent bugs from executing). +// A consumer will execute a graph if the consumer's version is at least the +// graph's min_consumer, the graph's producer version is at least the consumer's +// min_producer, and the consumer version isn't specifically disallowed by the +// graph. +// +// By default, newly created graphs have producer version TF_GRAPH_DEF_VERSION +// min_consumer TF_GRAPH_DEF_MIN_CONSUMER, and no other bad consumer versions. +// +// Version history: +// +// 0. Graphs created before GraphDef versioning +// 1. First real version (2dec2015) +// 2. adjust_contrast only takes float, doesn't perform clamping (11dec2015) +// 3. Remove TileGrad, since it was equivalent to reduce_sum (30dec2015) +// 4. When support for this version is removed, we can safely make AttrValue +// parsing more strict with respect to empty list values (see +// 111635679, 7jan2016). +// 5. Graphs are wholly-validated during Session::Create() (7jan2016). +// 6. TensorFlow is scalar strict within Google (27jan2016). +// 7. Remove TopK in favor of TopKV2 (5feb2016). +// 8. Replace RandomCrop from C++ with pure Python (5feb2016). +// 9. Deprecate batch_norm_with_global_normalization (16feb2016). +// 10. Deprecate conv3d_backprop_{filter,input} (10jun2016). +// 11. Deprecate {batch}_self_adjoint_eig (3aug2016). +// 12. Graph consumers understand the node_def field of FunctionDef (22aug2016). +// 13. Deprecate multiple batch linear algebra ops (9sep2016). +// 14. Deprecate batch_matrix_* ops. (10sep2016). +// 15. Deprecate batch_fft_* ops. (14sep2016). +// 16. Deprecate tensor_array (v1) ops in favor of v2 (10nov2016). +// 17. Deprecate inv (11nov2016). +// 17. Expose reverse_v2 (10nov2016) +// 18. Add VariableV2 (30nov2016) +// 19. Deprecated ops created by models moved out of core SkipGram, NegTrain. +// (08dec2016) +// 20. Catch all version 1.0 changes to Python API generation. SplitV is now +// used for tf.split, ReverseV2 is now used by tf.reverse, ConcatV2 is +// now used by tf.concat. Graphs use flooring +// division and mod semantics. TensorArrayV3. (12dec2016) +// Also considered the version for when it is required for reduction +// ops' indices to be scalar or vector, and not higher rank. +// Some earlier graph def versions allowed this. +// 21. Dropped FunctionDef.Node support, switched to node_def introduced +// in version 12. (11jan2017) +// 22. Placeholder now can specify and enforce scalar and partial +// shapes, particularly when restoring a graph from GraphDef +// produced at version 22 or later. (04/10/2016) +// 23. Remove NonMaxSuppression in favor of NonMaxSuppressionV2. +// 24. Deprecate lookup ops (v1) ops in favor of v2 (30may2017) +// 25. Deprecate stack (v1) ops in favor of v2 (2017/6/15). +// 25. Deprecate RandomPoisson (v1) ops in favor of v2 (2017/10/25). +// 26. Add a bool 'stripped_default_attrs' to MetaInfoDef indicating +// whether default-valued attrs have been stripped from the nodes in the +// GraphDef. (7dec2017) +// 27. Deprecate TensorArray ops v2 in favor of v3 and deprecated io_ops +// deprecated in favor of V2 ops. (2018/01/23) +// 28. Deprecate MatrixExponential op in favor of Python implementation. +// (2018/08/21). +// (2019/02/15). Added `control_ret` field to FunctionDef proto, and +// `control_output` field to OpDef proto. +// 29. Deprecate StatefulStandardNormal op in favor of StatefulStandardNormalV2. +// (2019/03/25). +// (2019/04/17). Added `arg_attr` field to FunctionDefProto. +// 30. (2019/05/09) First date based GraphDef version. GraphDef +// versions advance by 1 each day after this point. + +#define TF_GRAPH_DEF_VERSION_MIN_PRODUCER 0 +#define TF_GRAPH_DEF_VERSION_MIN_CONSUMER 0 +#define TF_GRAPH_DEF_VERSION 1645 // Updated: 2023/10/10 + +// Checkpoint compatibility versions (the versions field in SavedSliceMeta). +// +// The checkpoint versions have the same semantics as GraphDef versions, but the +// numbering scheme is separate. We have no plans to ever deprecate checkpoint +// versions, but it's good to have this in place in case we ever need to. +// +// Version history: +// +// 0. Checkpoints saved before checkpoint versioning. +// 1. First real version (10feb2015). +#define TF_CHECKPOINT_VERSION_MIN_PRODUCER 0 +#define TF_CHECKPOINT_VERSION_MIN_CONSUMER 0 +#define TF_CHECKPOINT_VERSION 1 + +#endif // TENSORFLOW_CORE_PUBLIC_VERSION_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/summary/schema.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/summary/schema.h new file mode 100644 index 0000000000000000000000000000000000000000..6305f8eabd7cacb9dca8922b694e92ca4596d777 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/summary/schema.h @@ -0,0 +1,33 @@ +/* Copyright 2017 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ +#ifndef TENSORFLOW_CORE_SUMMARY_SCHEMA_H_ +#define TENSORFLOW_CORE_SUMMARY_SCHEMA_H_ + +#include "tensorflow/core/lib/core/status.h" +#include "tensorflow/core/lib/db/sqlite.h" + +namespace tensorflow { + +constexpr uint32 kTensorboardSqliteApplicationId = 0xfeedabee; + +/// \brief Creates TensorBoard SQLite tables and indexes. +/// +/// If they are already created, this has no effect. If schema +/// migrations are necessary, they will be performed with logging. +Status SetupTensorboardSqliteDb(Sqlite* db); + +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_SUMMARY_SCHEMA_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/summary/summary_converter.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/summary/summary_converter.h new file mode 100644 index 0000000000000000000000000000000000000000..dc005d2604ff1687e765341ebdb9e86c62c78f3a --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/summary/summary_converter.h @@ -0,0 +1,38 @@ +/* Copyright 2017 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ +#ifndef TENSORFLOW_CORE_SUMMARY_SUMMARY_CONVERTER_H_ +#define TENSORFLOW_CORE_SUMMARY_SUMMARY_CONVERTER_H_ + +#include "tensorflow/core/framework/summary.pb.h" +#include "tensorflow/core/framework/tensor.h" +#include "tensorflow/core/lib/core/status.h" + +namespace tensorflow { + +// TODO(jart): Delete these methods in favor of new Python implementation. +Status AddTensorAsScalarToSummary(const Tensor& t, const string& tag, + Summary* s); +Status AddTensorAsHistogramToSummary(const Tensor& t, const string& tag, + Summary* s); +Status AddTensorAsImageToSummary(const Tensor& tensor, const string& tag, + int max_images, const Tensor& bad_color, + Summary* s); +Status AddTensorAsAudioToSummary(const Tensor& tensor, const string& tag, + int max_outputs, float sample_rate, + Summary* s); + +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_SUMMARY_SUMMARY_CONVERTER_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/summary/summary_db_writer.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/summary/summary_db_writer.h new file mode 100644 index 0000000000000000000000000000000000000000..5669afe7f67e1019d3d62d45ea99a64f1a31c82e --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/summary/summary_db_writer.h @@ -0,0 +1,42 @@ +/* Copyright 2017 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ +#ifndef TENSORFLOW_CORE_SUMMARY_SUMMARY_DB_WRITER_H_ +#define TENSORFLOW_CORE_SUMMARY_SUMMARY_DB_WRITER_H_ + +#include "tensorflow/core/kernels/summary_interface.h" +#include "tensorflow/core/lib/core/status.h" +#include "tensorflow/core/lib/db/sqlite.h" +#include "tensorflow/core/platform/env.h" + +namespace tensorflow { + +/// \brief Creates SQLite SummaryWriterInterface. +/// +/// This can be used to write tensors from the execution graph directly +/// to a database. The schema must be created beforehand. Entries in +/// Users, Experiments, and Runs tables will be created automatically +/// if they don't already exist. +/// +/// Please note that the type signature of this function may change in +/// the future if support for other DBs is added to core. +/// +/// The result holds a new reference to db. +Status CreateSummaryDbWriter(Sqlite* db, const string& experiment_name, + const string& run_name, const string& user_name, + Env* env, SummaryWriterInterface** result); + +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_SUMMARY_SUMMARY_DB_WRITER_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/summary/summary_file_writer.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/summary/summary_file_writer.h new file mode 100644 index 0000000000000000000000000000000000000000..7d964516da3ceecdc4cdedae000ba873ec92e1e9 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/summary/summary_file_writer.h @@ -0,0 +1,43 @@ +/* Copyright 2017 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ +#ifndef TENSORFLOW_CORE_SUMMARY_SUMMARY_FILE_WRITER_H_ +#define TENSORFLOW_CORE_SUMMARY_SUMMARY_FILE_WRITER_H_ + +#include "tensorflow/core/kernels/summary_interface.h" +#include "tensorflow/core/lib/core/status.h" +#include "tensorflow/core/platform/env.h" +#include "tensorflow/core/platform/types.h" + +namespace tensorflow { + +/// \brief Creates SummaryWriterInterface which writes to a file. +/// +/// The file is an append-only records file of tf.Event protos. That +/// makes this summary writer suitable for file systems like GCS. +/// +/// It will enqueue up to max_queue summaries, and flush at least every +/// flush_millis milliseconds. The summaries will be written to the +/// directory specified by logdir and with the filename suffixed by +/// filename_suffix. The caller owns a reference to result if the +/// returned status is ok. The Env object must not be destroyed until +/// after the returned writer. +Status CreateSummaryFileWriter(int max_queue, int flush_millis, + const string& logdir, + const string& filename_suffix, Env* env, + SummaryWriterInterface** result); + +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_SUMMARY_SUMMARY_FILE_WRITER_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/tfrt/common/async_value_tensor.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/tfrt/common/async_value_tensor.h new file mode 100644 index 0000000000000000000000000000000000000000..25ce153b5162987fbb6f4bcbc8e8c9a15874c379 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/tfrt/common/async_value_tensor.h @@ -0,0 +1,69 @@ +/* Copyright 2022 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ +#ifndef TENSORFLOW_CORE_TFRT_COMMON_ASYNC_VALUE_TENSOR_H_ +#define TENSORFLOW_CORE_TFRT_COMMON_ASYNC_VALUE_TENSOR_H_ + +#include + +#include "xla/pjrt/pjrt_client.h" +#include "tensorflow/core/framework/tensor.h" +#include "tfrt/support/forward_decls.h" // from @tf_runtime +#include "tfrt/support/ref_count.h" // from @tf_runtime + +namespace tensorflow { + +// The implementation of a Tensor for an AsyncValue and PjRtBuffer. We used it +// to integrate TF with TFRT. +// TODO(b/243983834) After the migration of using PjRt for data transfer is +// completed, GetAsyncRef and SetAsyncRef will be removed and this class will be +// renamed to PjRtBufferTensor. +class AsyncValueTensor { + public: + // Downcast from a Tensor to an AsyncValueTensor. Return nullptr if the + // downcast fails. + static AsyncValueTensor* FromTensor(const Tensor* tensor); + + const tfrt::RCReference& GetAsyncRef(); + + void SetAsyncRef(tfrt::RCReference av_ref); + + std::shared_ptr GetBuffer(); + + void SetBuffer(std::shared_ptr buffer); + + // Convert from a raw pointer to an AsyncValueTensor, removing the pointer + // tag. + static AsyncValueTensor* FromOpaquePointer(void* ptr); + + // Convert to a raw pointer from an AsyncValueTensor, adding the pointer tag. + static void* ToOpaquePointer(AsyncValueTensor* tensor); + + private: + tfrt::RCReference av_ref_; + std::shared_ptr buffer_; +}; + +class AsyncValueAllocator : public Allocator { + public: + void* AllocateRaw(size_t alignment, size_t num_bytes) override; + void DeallocateRaw(void* ptr) override; + + bool AllocatesOpaqueHandle() const override { return true; } + string Name() override { return "async-value"; } +}; + +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_TFRT_COMMON_ASYNC_VALUE_TENSOR_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/tfrt/common/create_pjrt_client_util.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/tfrt/common/create_pjrt_client_util.h new file mode 100644 index 0000000000000000000000000000000000000000..6d3f0db1a76aed23dc32103feaf24c327bf20860 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/tfrt/common/create_pjrt_client_util.h @@ -0,0 +1,45 @@ +/* Copyright 2023 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ +#ifndef TENSORFLOW_CORE_TFRT_COMMON_CREATE_PJRT_CLIENT_UTIL_H_ +#define TENSORFLOW_CORE_TFRT_COMMON_CREATE_PJRT_CLIENT_UTIL_H_ + +#include +#include +#include + +#include "xla/pjrt/pjrt_client.h" +#include "tensorflow/core/framework/types.h" + +namespace tensorflow { + +// Gets PJRT client from TFGlobalResourceManager. If it is not found, creates a +// PJRT client and adds it to TFGlobalResourceManager. Different `DeviceType` +// can choose to create the PJRT client explicitly (e.g. in ops) and add it to +// TFGlobalResourceManager, or create a PJRT client on the first use implicitly +// in this method. +// The inputs are the device_type of the caller, and an optional +// set of device IDs `allowed_devices` for which the stream executor will be +// created. `allowed_devices` is only used for GPU. +// TODO(b/260802979): consider passing `XlaPlatformInfo` for the options to +// create a client, or creating a class similar to `LocalClientOptions`. +// TODO(b/280111106): make PjrtClientFactoryOptions an input of +// GetOrCreatePjRtClient. +StatusOr GetOrCreatePjRtClient( + const DeviceType& device_type, + std::optional> allowed_devices = std::nullopt); + +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_TFRT_COMMON_CREATE_PJRT_CLIENT_UTIL_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/tfrt/common/global_state.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/tfrt/common/global_state.h new file mode 100644 index 0000000000000000000000000000000000000000..117a4365816d0b6ff59d2629089d6ae31d553d97 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/tfrt/common/global_state.h @@ -0,0 +1,40 @@ +/* Copyright 2021 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ +#ifndef TENSORFLOW_CORE_TFRT_COMMON_GLOBAL_STATE_H_ +#define TENSORFLOW_CORE_TFRT_COMMON_GLOBAL_STATE_H_ + +#include "tensorflow/core/framework/resource_mgr.h" +#include "tfrt/host_context/host_context.h" // from @tf_runtime + +namespace tensorflow { +namespace tfrt_global { + +class GlobalHostContext { + public: + static void Set(::tfrt::HostContext* host_ctx); + static ::tfrt::HostContext* Get(); + + private: + static ::tfrt::HostContext* host_ctx_; +}; + +// A global resource manager in TF core framework. It can be used to store +// resources that are per host. +ResourceMgr* GetTFGlobalResourceMgr(); + +} // namespace tfrt_global +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_TFRT_COMMON_GLOBAL_STATE_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/tfrt/common/pjrt_client_factory_options.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/tfrt/common/pjrt_client_factory_options.h new file mode 100644 index 0000000000000000000000000000000000000000..47caf2116af6b75c8b6396b4f1e7a9111be955ab --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/tfrt/common/pjrt_client_factory_options.h @@ -0,0 +1,44 @@ +/* Copyright 2023 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ +#ifndef TENSORFLOW_CORE_TFRT_COMMON_PJRT_CLIENT_FACTORY_OPTIONS_H_ +#define TENSORFLOW_CORE_TFRT_COMMON_PJRT_CLIENT_FACTORY_OPTIONS_H_ + +#include +#include +#include +#include +#include + +namespace xla { +// PjrtClientFactoryOptions store arguments to create PJRT client. +// Caller is responsible to set option value for corresponding PJRT client +// factory. +struct PjrtClientFactoryOptions { + struct GpuClientCreateOptions { + bool asynchronous = false; + int node_id = 0; + std::optional> allowed_devices = std::nullopt; + std::optional platform_name = std::nullopt; + }; + + struct CpuClientCreateOptions { + bool asynchronous = false; + }; + GpuClientCreateOptions gpu_options; + CpuClientCreateOptions cpu_options; +}; +} // namespace xla + +#endif // TENSORFLOW_CORE_TFRT_COMMON_PJRT_CLIENT_FACTORY_OPTIONS_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/tfrt/common/pjrt_client_factory_registry.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/tfrt/common/pjrt_client_factory_registry.h new file mode 100644 index 0000000000000000000000000000000000000000..92fd86055717b8c9cf9cfc9eaf6b0913edb6e3ed --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/tfrt/common/pjrt_client_factory_registry.h @@ -0,0 +1,71 @@ +/* Copyright 2023 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ +#ifndef TENSORFLOW_CORE_TFRT_COMMON_PJRT_CLIENT_FACTORY_REGISTRY_H_ +#define TENSORFLOW_CORE_TFRT_COMMON_PJRT_CLIENT_FACTORY_REGISTRY_H_ + +#include +#include +#include + +#include "xla/pjrt/pjrt_client.h" +#include "xla/statusor.h" +#include "tensorflow/core/framework/registration/registration.h" +#include "tensorflow/core/platform/mutex.h" +#include "tensorflow/core/tfrt/common/pjrt_client_factory_options.h" +#include "tsl/framework/device_type.h" +#include "tsl/platform/thread_annotations.h" + +namespace xla { + +using PjrtClientFactory = std::function>( + const PjrtClientFactoryOptions&)>; + +// The Pjrt client factory registry holds all the registered client factories. +class PjrtClientFactoryRegistry { + public: + explicit PjrtClientFactoryRegistry() = default; + + // Registers PjrtClientFactory with DeviceType as key. + tensorflow::InitOnStartupMarker RegisterPjrtClientFactory( + const tsl::DeviceType& device_type, + const PjrtClientFactory& client_factory); + + // Given the device type, finds related PjrtClientFactory function which takes + // factory option and returns PjrtClient if succeeds. + StatusOr> GetPjrtClient( + const tsl::DeviceType& device_type, + const PjrtClientFactoryOptions& options); + + // Returns singleton instance of PjrtClientFactoryRegistry class. + static PjrtClientFactoryRegistry& Get(); + + private: + absl::flat_hash_map registry_ + TF_GUARDED_BY(mu_); + + mutable ::tensorflow::mutex mu_; +}; + +// The `REGISTER_PJRT_CLIENT_FACTORY()` calls RegisterPjrtClientFactory on +// program startup. +#define REGISTER_PJRT_CLIENT_FACTORY(pjrt_client, device_type, client_factory) \ + static ::tensorflow::InitOnStartupMarker const register_##pjrt_client = \ + ::tensorflow::InitOnStartupMarker{} \ + << ::xla::PjrtClientFactoryRegistry::Get().RegisterPjrtClientFactory( \ + tsl::DeviceType(device_type), client_factory) + +} // namespace xla + +#endif // TENSORFLOW_CORE_TFRT_COMMON_PJRT_CLIENT_FACTORY_REGISTRY_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/tfrt/common/pjrt_state.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/tfrt/common/pjrt_state.h new file mode 100644 index 0000000000000000000000000000000000000000..1eebe0c9a352159ac597a01642d0b8af9479c322 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/tfrt/common/pjrt_state.h @@ -0,0 +1,57 @@ +/* Copyright 2022 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ +#ifndef TENSORFLOW_CORE_TFRT_COMMON_PJRT_STATE_H_ +#define TENSORFLOW_CORE_TFRT_COMMON_PJRT_STATE_H_ + +#include +#include +#include + +#include "xla/pjrt/pjrt_client.h" +#include "tensorflow/core/framework/types.h" +#include "tensorflow/core/platform/status.h" + +namespace tensorflow { + +const char kPjRtStateResourceName[] = "pjrt_state"; +using PjRtClientsMap = std::map>; + +// The class for the state related to PjRt. It contains a map from `DeviceType` +// to `PjRtClient`. It will be stored in the global `ResourceManager`. +class PjRtState : public ResourceBase { + public: + static PjRtState* Create(); + StatusOr GetPjRtClient(const DeviceType& device_type); + StatusOr GetOrCreatePjRtClient( + const DeviceType& device_type); + Status SetPjRtClient(const DeviceType& device_type, + std::unique_ptr client); + // Moves PJRT client to `unused_`. The PJRT client moved to `unused_` will not + // be returned by `GetPjRtClient`. + Status MovePjRtClientToUnused(const DeviceType& device_type); + string DebugString() const override; + + private: + explicit PjRtState() {} + absl::Mutex mu_; + PjRtClientsMap clients_ ABSL_GUARDED_BY(mu_); + // Store the PJRT clients that are no longer used to guarantee that PJRT + // clients outlive PJRT buffers. + std::vector> unused_ ABSL_GUARDED_BY(mu_); +}; + +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_TFRT_COMMON_PJRT_STATE_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/tfrt/common/pjrt_util.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/tfrt/common/pjrt_util.h new file mode 100644 index 0000000000000000000000000000000000000000..a6d526466916cf66866e938f6df8a4d32880830f --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/tfrt/common/pjrt_util.h @@ -0,0 +1,41 @@ +/* Copyright 2022 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ +#ifndef TENSORFLOW_CORE_TFRT_COMMON_PJRT_UTIL_H_ +#define TENSORFLOW_CORE_TFRT_COMMON_PJRT_UTIL_H_ + +#include +#include +#include + +#include "xla/pjrt/pjrt_client.h" +#include "tensorflow/core/framework/types.h" +#include "tensorflow/core/platform/status.h" + +namespace tensorflow { + +// Sets PJRT client for device_type in TFGlobalResourceManager. If a PJRT client +// for this device_type already exists, the existing PJRT client will not be +// destroyed, and will be kept alive in an "unused client" vector. PJRT API +// semantics require the PJRT client to outlive PJRT buffers. +Status SetPjRtClientInTFGlobalResourceManager( + const DeviceType& device_type, std::unique_ptr client); + +// Gets (the most recent) PJRT client for device_type from +// TFGlobalResourceManager. +StatusOr GetPjRtClient(const DeviceType& device_type); + +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_TFRT_COMMON_PJRT_UTIL_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/tpu/kernels/sparse_core_xla_flags_defaults.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/tpu/kernels/sparse_core_xla_flags_defaults.h new file mode 100644 index 0000000000000000000000000000000000000000..42a258363a0bc5192df99f156f32772e8b927155 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/tpu/kernels/sparse_core_xla_flags_defaults.h @@ -0,0 +1,30 @@ +/* Copyright 2023 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_TPU_KERNELS_SPARSE_CORE_XLA_FLAGS_DEFAULTS_H_ +#define TENSORFLOW_CORE_TPU_KERNELS_SPARSE_CORE_XLA_FLAGS_DEFAULTS_H_ + +#include + +namespace tensorflow { + +constexpr int kDefaultSparseCoreMinibatchMaxDivisionLevel = 6; +constexpr bool kDefaultDisableTableStacking = false; +constexpr int64_t kDefaultXlaSparseCoreStackingMemLimit = 2097152; +constexpr int64_t kDefaultXlaSparseCoreStackingTableShardLimit = 2147483648; + +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_TPU_KERNELS_SPARSE_CORE_XLA_FLAGS_DEFAULTS_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/tpu/ops/tpu_embedding_ops.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/tpu/ops/tpu_embedding_ops.h new file mode 100644 index 0000000000000000000000000000000000000000..324f2b4e1024c1ee9e26f69fcd58df448e2d6f15 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/tpu/ops/tpu_embedding_ops.h @@ -0,0 +1,37 @@ +/* Copyright 2021 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_TPU_OPS_TPU_EMBEDDING_OPS_H_ +#define TENSORFLOW_CORE_TPU_OPS_TPU_EMBEDDING_OPS_H_ + +#include +#include + +namespace tensorflow { +// Get the names of the LoadTPUEmbedding*Parameters ops. +std::vector GetPerTableLoadOptimizationParametersOps(); + +// Get the names of the RetrieveTPUEmbedding*Parameters ops. +std::vector GetPerTableRetrieveOptimizationParametersOps(); + +// Type enum of elements in deduplication data tuple. +enum DedupTupleElementType { + kInteger = 0, + kFloat = 1, +}; + +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_TPU_OPS_TPU_EMBEDDING_OPS_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/tpu/ops/tpu_embedding_shape_util.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/tpu/ops/tpu_embedding_shape_util.h new file mode 100644 index 0000000000000000000000000000000000000000..8d0bf104a48d4702f861836f365d1edfed324f9d --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/tpu/ops/tpu_embedding_shape_util.h @@ -0,0 +1,68 @@ +/* Copyright 2021 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ +#ifndef TENSORFLOW_CORE_TPU_OPS_TPU_EMBEDDING_SHAPE_UTIL_H_ +#define TENSORFLOW_CORE_TPU_OPS_TPU_EMBEDDING_SHAPE_UTIL_H_ + +#include +#include + +#include "absl/status/statusor.h" +#include "absl/types/span.h" +#include "tensorflow/core/framework/tensor_shape.pb.h" +#include "tensorflow/core/platform/status.h" +#include "tensorflow/core/protobuf/tpu/tpu_embedding_configuration.pb.h" + +namespace tensorflow { +namespace tpu { + +// Utility class for inferring TpuEmbedding shape information. +class TpuEmbeddingShapeUtil { + public: + // Compute the shape of one embedding table stored on the + // TpuEmbeddingEngine. The table descriptor from the TpuEmbedding + // configuration is supplied in config. On success, shape is populated with + // the shape of the embedding table that will be loaded or retrieved using + // Ops such as {Load,Retrieve}TpuEmbedding*Parameters. + static Status ComputeOneTableShape(int64_t vocabulary_size, + int table_dimension, int shard_id, + int num_shards, TensorShapeProto* shape); + + // Compute the shapes of the embedding tables stored on the + // TpuEmbeddingEngine. The TpuEmbedding configuration is supplied in + // config. On success, shapes is populated with the shape of each embedding + // table that will be loaded or retrieved using Ops such as + // {Load,Retrieve}AllTpuEmbeddingParameters. + static Status ComputeTableShapes(absl::Span vocabulary_sizes, + absl::Span table_dimensions, + int shard_id, int num_shards, + std::vector* shapes); + + static Status ComputeTableShapes( + const tensorflow::tpu::TPUEmbeddingConfiguration& config, int shard_id, + int num_shards, std::vector* shapes); + + static TensorShapeProto MakeEmpty2DShape(); + + private: + // Compute the number of embedding IDs per embedding table shard. + // There are as many shards as the number of hosts in the job. + static absl::StatusOr ComputeNumEmbeddingIdsPerShard( + int64_t vocabulary_size, int shard_id, int num_shards); +}; + +} // namespace tpu +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_TPU_OPS_TPU_EMBEDDING_SHAPE_UTIL_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/tpu/tpu_defs.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/tpu/tpu_defs.h new file mode 100644 index 0000000000000000000000000000000000000000..b5c3668067c3b5f661f0d6330ffb4c2d2d42e3c3 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/tpu/tpu_defs.h @@ -0,0 +1,63 @@ +/* Copyright 2020 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +// Common definitions related to TPUs. + +#ifndef TENSORFLOW_CORE_TPU_TPU_DEFS_H_ +#define TENSORFLOW_CORE_TPU_TPU_DEFS_H_ + +#include + +#include "tensorflow/core/framework/types.pb.h" + +namespace tensorflow { + +// Name of the TPU device, which corresponds to a single core. +extern const char* const DEVICE_TPU_NODE; // "TPU"; + +// The TPU_REPLICATED_CORE device is a virtual device corresponding to one core +// of a replicated TPU computation. Only valid within the body of a +// TPUReplicate computation. +extern const char* const DEVICE_TPU_REPLICATED_CORE; + +// DEVICE_TPU_SYSTEM is now defined in tensorflow/core/framework/types.h/.cc + +// Name of the XLA_TPU_JIT compilation device, which is an internal device to +// compile graphs for TPU. Not registered as a device; no operators can be +// assigned to this device by a user. +extern const char* const DEVICE_TPU_XLA_JIT; // "XLA_TPU_JIT"; + +// Attribute used internally to pass "is_mirrored_variable" attribute on +// TPUReplicatedInput nodes to _TPUReplicate. +extern const char* const TPUREPLICATE_MIRRORED_VAR_INDICES_ATTR; + +// Attribute used internally to annotate ops which might consume TPU FastMem +// variable. +extern const char* const TPU_FAST_MEM_ATTR; // "_TPU_FAST_MEM" + +extern const char* const kTPUReplicateAttr; +extern const char* const kOutsideCompilationAttr; + +// Supported types for TPUs. +inline constexpr std::array kTpuAllTypes = { + {DT_INT32, DT_UINT32, DT_FLOAT8_E4M3FN, DT_FLOAT8_E5M2, DT_HALF, + DT_BFLOAT16, DT_FLOAT, DT_DOUBLE, DT_BOOL, DT_COMPLEX64, + DT_INT64, DT_UINT64, DT_QINT8, DT_QUINT8, DT_QINT32, + DT_INT8, DT_UINT8, DT_INT16, DT_UINT16, DT_INT4, + DT_UINT4}}; + +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_TPU_TPU_DEFS_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/tpu/tpu_embedding_optimization_parameters_utils.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/tpu/tpu_embedding_optimization_parameters_utils.h new file mode 100644 index 0000000000000000000000000000000000000000..3956852fdf753adcd3dc4fe2d13ad3dfe10441ea --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/tpu/tpu_embedding_optimization_parameters_utils.h @@ -0,0 +1,118 @@ +/* Copyright 2017 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_TPU_TPU_EMBEDDING_OPTIMIZATION_PARAMETERS_UTILS_H_ +#define TENSORFLOW_CORE_TPU_TPU_EMBEDDING_OPTIMIZATION_PARAMETERS_UTILS_H_ + +#include +#include +#include + +#include "absl/base/casts.h" +#include "tensorflow/core/framework/op_def_builder.h" +#include "tensorflow/core/platform/status.h" +#include "tensorflow/core/protobuf/tpu/optimization_parameters.pb.h" + +namespace tensorflow { +namespace tpu { + +using OptimizationAlgorithm = OptimizationParameters::ParametersCase; + +// Returns the name of the optimization algorithm. +std::string GetOptimizationAlgorithmName(OptimizationAlgorithm alg); + +// Returns a user-friendly name for the optimization algorithm. +std::string GetOptimizationAlgorithmFriendlyName(OptimizationAlgorithm alg); + +// Returns all supported optimization algorithms. +std::vector GetOptimizationAlgorithms(); + +enum class GradientAccumulationSupport { + // Accumulation cannot be used with this optimizer. + kNotSupported, + + // Accumulation is allowed and changes optimizer behavior. + kSupported, +}; + +// Returns the number of optimization parameter vectors used by the optimization +// algorithm, excluding the weights themselves and assuming no gradient +// accumulation. +Status GetBaseAuxiliaryParameterCount(const OptimizationParameters ¶ms, + int *count); + +// Returns whether (and how) an optimization algorithm supports gradient +// accumulation. +Status GetGradientAccumulationSupport(const OptimizationParameters ¶ms, + GradientAccumulationSupport *support); + +// Returns whether both the given set of optimization parameters has gradient +// accumulation turned on and that the algorithm used supports it or should +// ignore that setting. Returns an error if gradient accumulation is enabled and +// the algorithm does not support it. +Status UseGradientAccumulation(const OptimizationParameters ¶ms, + bool *use_gradient_accumulation); + +// Returns the parameter specifications for the optimization algorithm (the main +// parameters first, followed by any auxiliary parameters such as Adagrad +// accumulators). +Status GetOptimizationAlgorithmStateVariables( + const OptimizationParameters ¶ms, + std::vector *state_variables); + +// Maximum value of auxiliary_parametery_count for any optimization algorithm. +// This count is used by TPU embedding load/retrieve and needs to be independent +// of any particular TPU version and hence, we take the maximum across all TPU +// versions. +static constexpr int kMaxAuxiliaryParameterCount = 7; + +// Fill value for gradient accumulators. This is a denormal so that it will be +// flushed to zero on the current TPU platforms and needs to continue to have +// the following properties in the future: +// +// 1. Does not have the same bit pattern as a zero and can be distinguished from +// it using integer operations. +// 2. Treated as zero by floating-point arithmetic operations (at least addition +// and subtraction). +// 3. Cannot be produced by any floating-point arithmetic operation, including +// those involving itself. +// +// It does not need to compare equal or not equal to zero in floating point. We +// need to use a non-zero value here because some optimization algorithms are +// not no-ops on zero gradients, so we need to distinguish an accumulated +// gradient of zero from one that has been cleared after its gradients have +// already been applied to the parameters and accumulators. +inline float GradientAccumulatorInitialValue() { + return absl::bit_cast(1); +} + +// Generic shape function for per-optimization-algorithm load ops. +class LoadOpShapeFunction { + public: + // Computes resulting shape and does parameter checking. + Status operator()(shape_inference::InferenceContext *c) const; +}; + +// Generic shape function for per-optimization-algorithm retrieve ops. +class RetrieveOpShapeFunction { + public: + // Computes resulting shape and does parameter checking. + Status operator()(shape_inference::InferenceContext *c) const; +}; + +} // namespace tpu +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_TPU_TPU_EMBEDDING_OPTIMIZATION_PARAMETERS_UTILS_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/tpu/tpu_embedding_output_layout_utils.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/tpu/tpu_embedding_output_layout_utils.h new file mode 100644 index 0000000000000000000000000000000000000000..2e7a2d332b7b15f2d48dbefc5c2b94d7ff2c89e3 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/tpu/tpu_embedding_output_layout_utils.h @@ -0,0 +1,36 @@ +/* Copyright 2017 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_TPU_TPU_EMBEDDING_OUTPUT_LAYOUT_UTILS_H_ +#define TENSORFLOW_CORE_TPU_TPU_EMBEDDING_OUTPUT_LAYOUT_UTILS_H_ + +#include + +#include "tensorflow/core/framework/tensor_shape.pb.h" +#include "tensorflow/core/platform/status.h" +#include "tensorflow/core/protobuf/tpu/tpu_embedding_configuration.pb.h" + +namespace tensorflow { +namespace tpu { + +// Computes the shape of the output tensors from an embedding configuration. +Status ComputeOutputTensorShapes( + const tensorflow::tpu::TPUEmbeddingConfiguration& config, + std::vector* shapes); + +} // namespace tpu +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_TPU_TPU_EMBEDDING_OUTPUT_LAYOUT_UTILS_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/transforms/cf_sink/pass.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/transforms/cf_sink/pass.h new file mode 100644 index 0000000000000000000000000000000000000000..6db168c525916e1d610407888b03218f69405356 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/transforms/cf_sink/pass.h @@ -0,0 +1,31 @@ +/* Copyright 2021 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_TRANSFORMS_CF_SINK_PASS_H_ +#define TENSORFLOW_CORE_TRANSFORMS_CF_SINK_PASS_H_ + +#include + +namespace mlir { +class Pass; + +namespace tfg { + +std::unique_ptr CreateControlFlowSinkPass(); + +} // namespace tfg +} // namespace mlir + +#endif // TENSORFLOW_CORE_TRANSFORMS_CF_SINK_PASS_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/transforms/consolidate_attrs/pass.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/transforms/consolidate_attrs/pass.h new file mode 100644 index 0000000000000000000000000000000000000000..e945c18a763adf645c5d4459a656084da8444550 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/transforms/consolidate_attrs/pass.h @@ -0,0 +1,29 @@ +/* Copyright 2022 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_TRANSFORMS_CONSOLIDATE_ATTRS_PASS_H_ +#define TENSORFLOW_CORE_TRANSFORMS_CONSOLIDATE_ATTRS_PASS_H_ + +#include + +namespace mlir { +class Pass; +namespace tfg { +std::unique_ptr CreateConsolidateAttributesPass(); +std::unique_ptr CreatePrepareAttributesForExportPass(); +} // namespace tfg +} // namespace mlir + +#endif // TENSORFLOW_CORE_TRANSFORMS_CONSOLIDATE_ATTRS_PASS_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/transforms/const_dedupe_hoist/pass.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/transforms/const_dedupe_hoist/pass.h new file mode 100644 index 0000000000000000000000000000000000000000..4b9b813375494f8dc0d11b566a627d124143618e --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/transforms/const_dedupe_hoist/pass.h @@ -0,0 +1,34 @@ +/* Copyright 2022 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_TRANSFORMS_CONST_DEDUPE_HOIST_PASS_H_ +#define TENSORFLOW_CORE_TRANSFORMS_CONST_DEDUPE_HOIST_PASS_H_ + +#include + +#include "mlir/Pass/Pass.h" // from @llvm-project + +namespace mlir { +namespace tfg { + +#define GEN_PASS_DECL_DEDUPEANDHOISTCONSTANT +#include "tensorflow/core/transforms/passes.h.inc" + +std::unique_ptr CreateDedupeAndHoistConstantPass(); + +} // namespace tfg +} // namespace mlir + +#endif // TENSORFLOW_CORE_TRANSFORMS_CONST_DEDUPE_HOIST_PASS_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/transforms/constant_folding/pass.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/transforms/constant_folding/pass.h new file mode 100644 index 0000000000000000000000000000000000000000..99603d4f90ca644fcd9223dc653625aaf751df05 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/transforms/constant_folding/pass.h @@ -0,0 +1,34 @@ +/* Copyright 2022 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ +#ifndef TENSORFLOW_CORE_TRANSFORMS_CONSTANT_FOLDING_PASS_H_ +#define TENSORFLOW_CORE_TRANSFORMS_CONSTANT_FOLDING_PASS_H_ + +#include + +#include "mlir/Pass/Pass.h" // from @llvm-project + +namespace mlir { +namespace tfg { + +#define GEN_PASS_DECL_CONSTANTFOLDINGPASS +#include "tensorflow/core/transforms/passes.h.inc" + +// Create a constant folding pass. +std::unique_ptr CreateConstantFoldingPass(); + +} // namespace tfg +} // namespace mlir + +#endif // TENSORFLOW_CORE_TRANSFORMS_CONSTANT_FOLDING_PASS_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/transforms/cse/pass.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/transforms/cse/pass.h new file mode 100644 index 0000000000000000000000000000000000000000..65f1d24b2c5022d7b26a474a0a77a1d2ede0631b --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/transforms/cse/pass.h @@ -0,0 +1,29 @@ +/* Copyright 2022 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_TRANSFORMS_CSE_PASS_H_ +#define TENSORFLOW_CORE_TRANSFORMS_CSE_PASS_H_ + +#include + +#include "mlir/Pass/Pass.h" // from @llvm-project + +namespace mlir { +namespace tfg { +std::unique_ptr CreateCSEPass(); +} // namespace tfg +} // namespace mlir + +#endif // TENSORFLOW_CORE_TRANSFORMS_CSE_PASS_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/transforms/drop_unregistered_attribute/pass.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/transforms/drop_unregistered_attribute/pass.h new file mode 100644 index 0000000000000000000000000000000000000000..b0b46bca96b2af73bf36313b7b1b376b18f657bc --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/transforms/drop_unregistered_attribute/pass.h @@ -0,0 +1,34 @@ +/* Copyright 2021 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_TRANSFORMS_DROP_UNREGISTERED_ATTRIBUTE_PASS_H_ +#define TENSORFLOW_CORE_TRANSFORMS_DROP_UNREGISTERED_ATTRIBUTE_PASS_H_ + +#include + +#include "mlir/Pass/Pass.h" // from @llvm-project + +namespace mlir { +namespace tfg { + +#define GEN_PASS_DECL_DROPOUTPUTSHAPESATTR +#include "tensorflow/core/transforms/passes.h.inc" + +std::unique_ptr CreateDropOutputShapesAttrPass(); + +} // namespace tfg +} // namespace mlir + +#endif // TENSORFLOW_CORE_TRANSFORMS_DROP_UNREGISTERED_ATTRIBUTE_PASS_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/transforms/eliminate_passthrough_iter_args/pass.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/transforms/eliminate_passthrough_iter_args/pass.h new file mode 100644 index 0000000000000000000000000000000000000000..186ab2d51c492fc56e1053cf144d40a536d51c01 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/transforms/eliminate_passthrough_iter_args/pass.h @@ -0,0 +1,34 @@ +/* Copyright 2022 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +// This file defines the constructor for the eliminate passthrough iteration +// arguments pass. + +#ifndef TENSORFLOW_CORE_TRANSFORMS_ELIMINATE_PASSTHROUGH_ITER_ARGS_PASS_H_ +#define TENSORFLOW_CORE_TRANSFORMS_ELIMINATE_PASSTHROUGH_ITER_ARGS_PASS_H_ + +#include + +#include "mlir/Pass/Pass.h" // from @llvm-project + +namespace mlir { +namespace tfg { +// Creates a pass that eliminates passthrough iteration arguments from +// region-based loop operations. +std::unique_ptr CreateEliminatePassthroughIterArgsPass(); +} // namespace tfg +} // namespace mlir + +#endif // TENSORFLOW_CORE_TRANSFORMS_ELIMINATE_PASSTHROUGH_ITER_ARGS_PASS_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/transforms/func_to_graph/func_to_graph.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/transforms/func_to_graph/func_to_graph.h new file mode 100644 index 0000000000000000000000000000000000000000..abe97eee71490edb3688f2b9765acbb84cb04520 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/transforms/func_to_graph/func_to_graph.h @@ -0,0 +1,33 @@ +/* Copyright 2022 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_TRANSFORMS_FUNC_TO_GRAPH_FUNC_TO_GRAPH_H_ +#define TENSORFLOW_CORE_TRANSFORMS_FUNC_TO_GRAPH_FUNC_TO_GRAPH_H_ + +#include "tensorflow/core/ir/ops.h" +#include "tensorflow/core/platform/status.h" + +namespace mlir { +namespace tfg { + +// Lowers a lifted graph func back to the graph. The uses of function arguments +// will be replaced with the associated value according to +// `tfg.lifted_value_attr` attribute. +tensorflow::Status FuncToGraph(GraphFuncOp func); + +} // namespace tfg +} // namespace mlir + +#endif // TENSORFLOW_CORE_TRANSFORMS_FUNC_TO_GRAPH_FUNC_TO_GRAPH_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/transforms/func_to_graph/pass.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/transforms/func_to_graph/pass.h new file mode 100644 index 0000000000000000000000000000000000000000..498aabc63caa1105363941d2cec90a8b49c64f34 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/transforms/func_to_graph/pass.h @@ -0,0 +1,33 @@ +/* Copyright 2022 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_TRANSFORMS_FUNC_TO_GRAPH_PASS_H_ +#define TENSORFLOW_CORE_TRANSFORMS_FUNC_TO_GRAPH_PASS_H_ + +#include + +#include "mlir/Pass/Pass.h" // from @llvm-project + +namespace mlir { +namespace tfg { + +// Creates a pass which turns the function to a graph. Note that only the +// function which is lifted from graph is valid. +std::unique_ptr CreateFuncToGraphPass(); + +} // namespace tfg +} // namespace mlir + +#endif // TENSORFLOW_CORE_TRANSFORMS_FUNC_TO_GRAPH_PASS_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/transforms/functional_to_region/impl.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/transforms/functional_to_region/impl.h new file mode 100644 index 0000000000000000000000000000000000000000..023843d4d17336ea968e42160168453f1d24f542 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/transforms/functional_to_region/impl.h @@ -0,0 +1,31 @@ +/* Copyright 2022 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_TRANSFORMS_FUNCTIONAL_TO_REGION_IMPL_H_ +#define TENSORFLOW_CORE_TRANSFORMS_FUNCTIONAL_TO_REGION_IMPL_H_ + +#include "mlir/IR/PatternMatch.h" // from @llvm-project +#include "mlir/IR/SymbolTable.h" // from @llvm-project + +namespace mlir { +namespace tfg { + +void PopulateFunctionalToRegionPatterns(RewritePatternSet &patterns, + SymbolTable &table); + +} // namespace tfg +} // namespace mlir + +#endif // TENSORFLOW_CORE_TRANSFORMS_FUNCTIONAL_TO_REGION_IMPL_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/transforms/functional_to_region/pass.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/transforms/functional_to_region/pass.h new file mode 100644 index 0000000000000000000000000000000000000000..362f11b8d170ac782f7ebc3cf97b4aaa6f684fb5 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/transforms/functional_to_region/pass.h @@ -0,0 +1,31 @@ +/* Copyright 2022 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_TRANSFORMS_FUNCTIONAL_TO_REGION_PASS_H_ +#define TENSORFLOW_CORE_TRANSFORMS_FUNCTIONAL_TO_REGION_PASS_H_ + +#include + +namespace mlir { +class Pass; + +namespace tfg { + +std::unique_ptr CreateFunctionalToRegionPass(); + +} // namespace tfg +} // namespace mlir + +#endif // TENSORFLOW_CORE_TRANSFORMS_FUNCTIONAL_TO_REGION_PASS_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/transforms/graph_compactor/pass.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/transforms/graph_compactor/pass.h new file mode 100644 index 0000000000000000000000000000000000000000..6767bb59991cfe14a25e3afc4f7e56083301e713 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/transforms/graph_compactor/pass.h @@ -0,0 +1,31 @@ +/* Copyright 2022 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_TRANSFORMS_GRAPH_COMPACTOR_PASS_H_ +#define TENSORFLOW_CORE_TRANSFORMS_GRAPH_COMPACTOR_PASS_H_ + +#include + +#include "mlir/Pass/Pass.h" // from @llvm-project + +namespace mlir { +namespace tfg { +std::unique_ptr CreateNameCompressPass(); +std::unique_ptr CreateStripDefaultAttrsPass(); +std::unique_ptr CreateAddDefaultAttrsPass(); +} // namespace tfg +} // namespace mlir + +#endif // TENSORFLOW_CORE_TRANSFORMS_GRAPH_COMPACTOR_PASS_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/transforms/graph_to_func/graph_to_func.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/transforms/graph_to_func/graph_to_func.h new file mode 100644 index 0000000000000000000000000000000000000000..efcaed5f9ff7bd81087f29d3e4c3b93a7d060454 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/transforms/graph_to_func/graph_to_func.h @@ -0,0 +1,44 @@ +/* Copyright 2021 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_TRANSFORMS_GRAPH_TO_FUNC_GRAPH_TO_FUNC_H_ +#define TENSORFLOW_CORE_TRANSFORMS_GRAPH_TO_FUNC_GRAPH_TO_FUNC_H_ + +#include "tensorflow/core/ir/ops.h" +#include "tensorflow/core/platform/status.h" + +namespace mlir { +namespace tfg { + +// Lifts a graph into a function, using the provided array of `feeds` for +// function arguments, `fetches` for function returned values, and +// `control_rets` for returned control values. The Graph op is replaced in-place +// by a GraphFuncOp with a name defined in the dialect. +tensorflow::Status GraphToFunc(GraphOp graph, ArrayRef feeds, + ArrayRef fetches, + ArrayRef control_rets); + +// Lifts a graph into a function, using the provided array of `feeds` for +// function arguments, `fetches` for function returned values, and +// `control_rets` for returned control values. The Graph op is replaced in-place +// by a GraphFuncOp with a name defined in the dialect. +tensorflow::Status GraphToFunc(GraphOp graph, ArrayRef feeds_names, + ArrayRef fetches_names, + ArrayRef control_rets); + +} // namespace tfg +} // namespace mlir + +#endif // TENSORFLOW_CORE_TRANSFORMS_GRAPH_TO_FUNC_GRAPH_TO_FUNC_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/transforms/graph_to_func/pass.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/transforms/graph_to_func/pass.h new file mode 100644 index 0000000000000000000000000000000000000000..798f5c95040e0195246b32b8ebc82c3ff636dad2 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/transforms/graph_to_func/pass.h @@ -0,0 +1,41 @@ +/* Copyright 2021 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_TRANSFORMS_GRAPH_TO_FUNC_PASS_H_ +#define TENSORFLOW_CORE_TRANSFORMS_GRAPH_TO_FUNC_PASS_H_ + +#include +#include + +#include "mlir/Pass/Pass.h" // from @llvm-project +#include "mlir/Support/LLVM.h" // from @llvm-project + +namespace mlir { +namespace tfg { + +#define GEN_PASS_DECL_GRAPHTOFUNC +#include "tensorflow/core/transforms/passes.h.inc" + +// Returns a pass that runs on a Module and expects to find a single GraphOp +// to transform into a function. The provided feeds and fetches are used to form +// the function arguments and returned values. +std::unique_ptr CreateGraphToFuncPass( + ArrayRef feeds = {}, ArrayRef fetches = {}, + ArrayRef control_rets = {}); + +} // namespace tfg +} // namespace mlir + +#endif // TENSORFLOW_CORE_TRANSFORMS_GRAPH_TO_FUNC_PASS_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/transforms/legacy_call/pass.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/transforms/legacy_call/pass.h new file mode 100644 index 0000000000000000000000000000000000000000..95faae4d4674ca6a81ee7162c395b3b11e01f465 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/transforms/legacy_call/pass.h @@ -0,0 +1,29 @@ +/* Copyright 2022 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_TRANSFORMS_LEGACY_CALL_PASS_H_ +#define TENSORFLOW_CORE_TRANSFORMS_LEGACY_CALL_PASS_H_ + +#include + +#include "mlir/Pass/Pass.h" // from @llvm-project + +namespace mlir { +namespace tfg { +std::unique_ptr CreateLiftLegacyCallPass(); +} // namespace tfg +} // namespace mlir + +#endif // TENSORFLOW_CORE_TRANSFORMS_LEGACY_CALL_PASS_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/transforms/pass_registration.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/transforms/pass_registration.h new file mode 100644 index 0000000000000000000000000000000000000000..55aa88ed2a70128628828752183c82ba23e6c7a7 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/transforms/pass_registration.h @@ -0,0 +1,48 @@ +/* Copyright 2021 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_TRANSFORMS_PASS_REGISTRATION_H_ +#define TENSORFLOW_CORE_TRANSFORMS_PASS_REGISTRATION_H_ + +#include + +#include "tensorflow/core/transforms/cf_sink/pass.h" +#include "tensorflow/core/transforms/consolidate_attrs/pass.h" +#include "tensorflow/core/transforms/const_dedupe_hoist/pass.h" +#include "tensorflow/core/transforms/constant_folding/pass.h" +#include "tensorflow/core/transforms/cse/pass.h" +#include "tensorflow/core/transforms/drop_unregistered_attribute/pass.h" +#include "tensorflow/core/transforms/eliminate_passthrough_iter_args/pass.h" +#include "tensorflow/core/transforms/func_to_graph/pass.h" +#include "tensorflow/core/transforms/functional_to_region/pass.h" +#include "tensorflow/core/transforms/graph_compactor/pass.h" +#include "tensorflow/core/transforms/graph_to_func/pass.h" +#include "tensorflow/core/transforms/legacy_call/pass.h" +#include "tensorflow/core/transforms/region_to_functional/pass.h" +#include "tensorflow/core/transforms/remapper/pass.h" +#include "tensorflow/core/transforms/shape_inference/pass.h" +#include "tensorflow/core/transforms/toposort/pass.h" + +namespace mlir { +namespace tfg { + +// Generate the code for registering passes for command-line parsing. +#define GEN_PASS_REGISTRATION +#include "tensorflow/core/transforms/passes.h.inc" + +} // namespace tfg +} // namespace mlir + +#endif // TENSORFLOW_CORE_TRANSFORMS_PASS_REGISTRATION_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/transforms/region_to_functional/impl.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/transforms/region_to_functional/impl.h new file mode 100644 index 0000000000000000000000000000000000000000..77c3ec9111476e9b78b438b6a723e05dd186a327 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/transforms/region_to_functional/impl.h @@ -0,0 +1,34 @@ +/* Copyright 2022 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_TRANSFORMS_REGION_TO_FUNCTIONAL_IMPL_H_ +#define TENSORFLOW_CORE_TRANSFORMS_REGION_TO_FUNCTIONAL_IMPL_H_ + +#include "mlir/IR/PatternMatch.h" // from @llvm-project +#include "mlir/IR/SymbolTable.h" // from @llvm-project + +namespace mlir { +namespace tfg { + +// Populate the patterns to convert region ops to functional ops. Please refer +// to `tfg-region-to-functional` pass description. +void PopulateRegionToFunctionalPatterns(RewritePatternSet &patterns, + SymbolTable &table, + bool force_control_capture = false); + +} // namespace tfg +} // namespace mlir + +#endif // TENSORFLOW_CORE_TRANSFORMS_REGION_TO_FUNCTIONAL_IMPL_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/transforms/region_to_functional/pass.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/transforms/region_to_functional/pass.h new file mode 100644 index 0000000000000000000000000000000000000000..e1dc6fc5f7fd5e972301010eaf9ce707856c1162 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/transforms/region_to_functional/pass.h @@ -0,0 +1,38 @@ +/* Copyright 2022 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_TRANSFORMS_REGION_TO_FUNCTIONAL_PASS_H_ +#define TENSORFLOW_CORE_TRANSFORMS_REGION_TO_FUNCTIONAL_PASS_H_ + +#include + +#include "mlir/Pass/Pass.h" // from @llvm-project + +namespace mlir { +namespace tfg { + +#define GEN_PASS_DECL_REGIONTOFUNCTIONAL +#include "tensorflow/core/transforms/passes.h.inc" + +// Creates a conversion pass from region control-flow to functional +// control-flow. If `force_control_capture` is set, then all region control-flow +// ops are guaranteed to be converted to functional form by capturing implicit +// control tokens using a `Const` node. +std::unique_ptr CreateRegionToFunctionalPass( + bool force_control_capture = false); +} // namespace tfg +} // namespace mlir + +#endif // TENSORFLOW_CORE_TRANSFORMS_REGION_TO_FUNCTIONAL_PASS_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/transforms/remapper/pass.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/transforms/remapper/pass.h new file mode 100644 index 0000000000000000000000000000000000000000..aadb124a3e2bda1158e02b67963f820c1417c9e9 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/transforms/remapper/pass.h @@ -0,0 +1,37 @@ +/* Copyright 2022 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_TRANSFORMS_REMAPPER_PASS_H_ +#define TENSORFLOW_CORE_TRANSFORMS_REMAPPER_PASS_H_ + +#include + +#include "mlir/Pass/Pass.h" // from @llvm-project + +namespace mlir { +namespace tfg { + +#define GEN_PASS_DECL_REMAPPER +#include "tensorflow/core/transforms/passes.h.inc" + +// Creates a remapper pass to remap the operations onto other opreations which +// decrease the amount of operations to perform a computation. +std::unique_ptr CreateRemapperPass(bool enable_onednn_patterns = false, + bool xla_auto_clustering = false); + +} // namespace tfg +} // namespace mlir + +#endif // TENSORFLOW_CORE_TRANSFORMS_REMAPPER_PASS_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/transforms/remapper/remapping_helper.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/transforms/remapper/remapping_helper.h new file mode 100644 index 0000000000000000000000000000000000000000..0e751f3d5506292a804b50b977cffa9bb7e8ca96 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/transforms/remapper/remapping_helper.h @@ -0,0 +1,244 @@ +/* Copyright 2022 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ +#ifndef TENSORFLOW_CORE_TRANSFORMS_REMAPPER_REMAPPING_HELPER_H_ +#define TENSORFLOW_CORE_TRANSFORMS_REMAPPER_REMAPPING_HELPER_H_ + +#include + +#include "tensorflow/core/framework/types.h" +#include "tensorflow/core/transforms/utils/op_cat_helper.h" +#include "tensorflow/core/transforms/utils/utils.h" + +namespace mlir { +namespace tfg { + +// The following structures store info of the operations to be fused. These +// are mainly used for combining operands info and attributes for a fused +// operation. They are also used for some predicate functions like +// `IsCpuCompatible` and `IsGpuCompatible` to check if the relevant fusion is +// supported on CPU and GPU, respectively. Another reason to keep these +// structures is to follow similar logics in current grappler-remapper. +// TODO(intel-tf): Remove redundancies once the similar functionality is +// achieved by tfg-remapper. +struct ContractionBiasAdd { + Operation* contraction; + Operation* bias_add; +}; + +struct ContractionBiasAddActivation { + Operation* contraction; + Operation* bias_add; + Operation* activation; +}; + +struct ContractionBiasAddAdd { + Operation* contraction; + Operation* bias_add; + Operation* add; +}; + +struct ContractionBiasAddAddActivation { + Operation* contraction; + Operation* bias_add; + Operation* add; + Operation* activation; +}; + +struct FusedBatchNormEx { + Operation* fused_batch_norm; + Value side_input; + Operation* activation; +}; + +class OpPropertyHelper : public OpCatHelper { + public: + OpPropertyHelper() = default; + explicit OpPropertyHelper(TFGraphDialect* dialect, + bool onednn_enabled = false, + bool xla_auto_clustering = false) + : OpCatHelper(dialect), + is_onednn_enabled_(onednn_enabled), + is_xla_auto_clustering_enabled_(xla_auto_clustering) {} + + bool HasControlOperandsOrResultUsers(Operation* op) const { + TFOp wrapper_op(op); + bool has_ctl_operands = !(wrapper_op.getControlOperands().empty()); + bool has_ctl_ret_users = !(wrapper_op.controlRet().getUsers().empty()); + if (has_ctl_operands || has_ctl_ret_users) + return true; + else + return false; + } + + // This function is to be used for an operation that has at least 1 + // non-control result. + bool HasAtMostOneUserOfResult0(Operation* op) const { + // All tfg operation has 1 control result. When the operation has at least 1 + // non-control result, the number of results should be at least 2. + return op->getNumResults() > 1 && + (op->getResult(0).hasOneUse() || op->getResult(0).use_empty()); + } + + bool IsContraction(Operation* op) const { + return dialect_->IsConv2D(op) || dialect_->IsConv3D(op) || + dialect_->IsDepthwiseConv2dNative(op) || dialect_->IsMatMul(op); + } + + bool HaveSameDataType(Operation* lhs_op, Operation* rhs_op, + StringRef attr_name = "T") const { + auto lhs_attr = lhs_op->getAttrOfType(attr_name); + auto rhs_attr = rhs_op->getAttrOfType(attr_name); + if (!lhs_attr || !rhs_attr) return false; + return lhs_attr == rhs_attr; + } + + // This function is currently used by contraction ops. + bool IsGpuCompatibleDataType(Operation* contraction_op, + StringRef attr_name = "T") const { + auto attr = contraction_op->getAttrOfType(attr_name); + if (!attr) return false; + Type dtype = attr.getValue(); + if (dialect_->IsConv2D(contraction_op)) { + return dtype.isa(); + } else if (dialect_->IsMatMul(contraction_op)) { + return dtype.isa(); + } else { + return false; + } + } + + // This function is currently used by contraction ops. + bool IsCpuCompatibleDataType(Operation* contraction_op, + StringRef attr_name = "T") const { + auto attr = contraction_op->getAttrOfType(attr_name); + if (!attr) return false; + Type dtype = attr.getValue(); + if (is_onednn_enabled_) { + // Only contraction ops (MatMul, Conv2D, Conv3D, and + // DepthwiseConv2dNative) and BatchMatMul are supported. BatchMatMul + // fusions are handled differently than contraction ops. + bool is_supported = IsContraction(contraction_op) || + dialect_->IsAnyBatchMatMul(contraction_op); + return is_supported && dtype.isa(); + } + + if (dialect_->IsConv2D(contraction_op)) { + return dtype.isa(); + } else if (dialect_->IsMatMul(contraction_op)) { + return dtype.isa(); + } else { + return false; + } + } + + // This function is currently used by convolution type op + bool IsGpuCompatibleDataFormat(Operation* conv_op, + StringRef attr_name = "data_format") const { + StringRef data_format; + if (auto attr = conv_op->getAttrOfType(attr_name)) { + data_format = attr.getValue(); + } else { + return false; + } + if (dialect_->IsConv2D(conv_op)) { + return data_format == "NHWC" || data_format == "NCHW"; + } else { + return false; + } + } + + // This function is currently used by convolution type op + bool IsCpuCompatibleDataFormat(Operation* conv_op, + StringRef attr_name = "data_format") const { + StringRef data_format; + if (auto attr = conv_op->getAttrOfType(attr_name)) { + data_format = attr.getValue(); + } else { + return false; + } + if (dialect_->IsConv2D(conv_op)) { + return data_format == "NHWC" || + (is_onednn_enabled_ && data_format == "NCHW"); + } else if (dialect_->IsConv3D(conv_op)) { + return data_format == "NDHWC" || + (is_onednn_enabled_ && data_format == "NCDHW"); + } else { + return false; + } + } + + bool IsGpuCompatible(const ContractionBiasAddActivation& pattern) const { +#if TENSORFLOW_USE_ROCM + // ROCm does not support _FusedConv2D. Does it suppport _FusedMatMul? + return false; +#endif + // The TF->XLA bridge does not support `_FusedMatMul` so we avoid creating + // this op. Furthermore, XLA already does this fusion internally so there + // is no true benefit from doing this optimization if XLA is going to + // compile the unfused operations anyway. + if (is_xla_auto_clustering_enabled_) return false; + if (!util::OpHasDevice(pattern.contraction, tensorflow::DEVICE_GPU)) + return false; + if (!dialect_->IsRelu(pattern.activation)) return false; + if (dialect_->IsMatMul(pattern.contraction)) { + return IsGpuCompatibleDataType(pattern.contraction); + } else { + // TODO(intel-tf): Add spatial convolution support on GPU + return false; + } + } + + // Currently GPU does not supprt contraction + bias_add + bool IsGpuCompatible(const ContractionBiasAdd&) const { return false; } + + bool IsCpuCompatible(Operation* contraction_op) const { + if (!util::OpHasDevice(contraction_op, tensorflow::DEVICE_CPU)) + return false; + if (dialect_->IsConv2D(contraction_op) || + dialect_->IsConv3D(contraction_op)) { + return IsCpuCompatibleDataType(contraction_op) && + IsCpuCompatibleDataFormat(contraction_op); + } else if (dialect_->IsMatMul(contraction_op) || + dialect_->IsAnyBatchMatMul(contraction_op) || + dialect_->IsDepthwiseConv2dNative(contraction_op)) { + return IsCpuCompatibleDataType(contraction_op); + } else { + return false; + } + } + + template + bool IsDeviceCompatible(const Pattern& pattern) const { + // Currently, this function is used by contraction based fussion. + if constexpr (!std::is_same::value && + !std::is_same::value && + !std::is_same::value && + !std::is_same::value) { + return false; + } + return IsGpuCompatible(pattern) || IsCpuCompatible(pattern.contraction); + } + + bool isOneDNNEnabled() const { return is_onednn_enabled_; } + + private: + bool is_onednn_enabled_; + bool is_xla_auto_clustering_enabled_; +}; + +} // namespace tfg +} // namespace mlir + +#endif // TENSORFLOW_CORE_TRANSFORMS_REMAPPER_REMAPPING_HELPER_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/transforms/shape_inference/pass.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/transforms/shape_inference/pass.h new file mode 100644 index 0000000000000000000000000000000000000000..046d6556c39e151a405aa1d9d7ed2cc2b722bf5c --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/transforms/shape_inference/pass.h @@ -0,0 +1,35 @@ +/* Copyright 2022 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_TRANSFORMS_SHAPE_INFERENCE_PASS_H_ +#define TENSORFLOW_CORE_TRANSFORMS_SHAPE_INFERENCE_PASS_H_ + +#include + +#include "mlir/Pass/Pass.h" // from @llvm-project + +namespace mlir { +namespace tfg { + +#define GEN_PASS_DECL_SHAPEINFERENCE +#include "tensorflow/core/transforms/passes.h.inc" + +// Pass that infers the output shape of operations. +std::unique_ptr CreateShapeInferencePass(); + +} // namespace tfg +} // namespace mlir + +#endif // TENSORFLOW_CORE_TRANSFORMS_SHAPE_INFERENCE_PASS_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/transforms/toposort/pass.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/transforms/toposort/pass.h new file mode 100644 index 0000000000000000000000000000000000000000..84760adbdd56b05a61aed74fc2dbb15657179ed3 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/transforms/toposort/pass.h @@ -0,0 +1,38 @@ +/* Copyright 2021 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_TRANSFORMS_TOPOSORT_PASS_H_ +#define TENSORFLOW_CORE_TRANSFORMS_TOPOSORT_PASS_H_ + +#include + +#include "mlir/Pass/Pass.h" // from @llvm-project +#include "tensorflow/core/ir/dialect.h" + +namespace mlir { +namespace tfg { + +// Sort topologically (following SSA defs-uses edges) the given block. +// The sort is stable. Optionally accepts an instance of the TFG dialect for +// virtually breaking NextIteration -> Merge cycles. +void SortTopologically(Block *block, TFGraphDialect *dialect = nullptr); + +// Programmatically create a pass that topologically sort graphs. +std::unique_ptr CreateTopoSortPass(); + +} // namespace tfg +} // namespace mlir + +#endif // TENSORFLOW_CORE_TRANSFORMS_TOPOSORT_PASS_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/transforms/utils/eval_utils.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/transforms/utils/eval_utils.h new file mode 100644 index 0000000000000000000000000000000000000000..d11e022d3787733f9622a01fa76ef279e80957c9 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/transforms/utils/eval_utils.h @@ -0,0 +1,69 @@ +/* Copyright 2022 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_TRANSFORMS_UTILS_EVAL_UTILS_H_ +#define TENSORFLOW_CORE_TRANSFORMS_UTILS_EVAL_UTILS_H_ + +#include + +#include "llvm/ADT/ArrayRef.h" +#include "llvm/ADT/SmallVector.h" +#include "mlir/Support/LLVM.h" // from @llvm-project +#include "mlir/Support/LogicalResult.h" // from @llvm-project +#include "tensorflow/core/framework/device_base.h" +#include "tensorflow/core/framework/resource_mgr.h" +#include "tensorflow/core/framework/tensor.h" +#include "tensorflow/core/ir/tf_op_wrapper.h" + +namespace Eigen { +class ThreadPoolDevice; +} // namespace Eigen + +namespace mlir { +namespace tfg { +namespace util { + +// A simple CPU device for operation evaluation. +class SimpleDevice : public tensorflow::DeviceBase { + public: + SimpleDevice(); + ~SimpleDevice() override; + + tensorflow::Status MakeTensorFromProto( + const tensorflow::TensorProto& tensor_proto, + const tensorflow::AllocatorAttributes alloc_attrs, + tensorflow::Tensor* tensor) override; + + tensorflow::Allocator* GetAllocator( + tensorflow::AllocatorAttributes attr) override; + + private: + std::unique_ptr eigen_worker_; + tensorflow::DeviceBase::CpuWorkerThreads eigen_worker_threads_; + std::unique_ptr eigen_device_; +}; + +// Attempts to evaluates an MLIR Operation with the op registered kernel. The op +// is always executed on the local host CPU irrespective of the device attribute +// of the given op. The results will be filled in the results vector. +LogicalResult EvaluateOperation(tensorflow::DeviceBase* cpu_device, + tensorflow::ResourceMgr* resource_mgr, TFOp op, + ArrayRef operands, + SmallVectorImpl& results); +} // namespace util +} // namespace tfg +} // namespace mlir + +#endif // TENSORFLOW_CORE_TRANSFORMS_UTILS_EVAL_UTILS_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/transforms/utils/op_cat_helper.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/transforms/utils/op_cat_helper.h new file mode 100644 index 0000000000000000000000000000000000000000..8cb212bd4b301187a9e95283e9dac7004f5aa331 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/transforms/utils/op_cat_helper.h @@ -0,0 +1,54 @@ +/* Copyright 2022 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ +#ifndef TENSORFLOW_CORE_TRANSFORMS_UTILS_OP_CAT_HELPER_H_ +#define TENSORFLOW_CORE_TRANSFORMS_UTILS_OP_CAT_HELPER_H_ + +#include "mlir/IR/MLIRContext.h" // from @llvm-project +#include "mlir/IR/Operation.h" // from @llvm-project +#include "tensorflow/core/ir/dialect.h" +#include "tensorflow/core/ir/tf_op_wrapper.h" + +namespace mlir { +namespace tfg { +// A Helper class to identify if an op belongs to certain op category. +class OpCatHelper { + public: + OpCatHelper() = default; + explicit OpCatHelper(TFGraphDialect *dialect) : dialect_(dialect) {} + + bool IsAggregate(TFOp op); + bool IsCommutative(TFOp op); + + // Returns true if it's a splat tensor type and has the splat value 1. + bool IsOnes(TFOp op); + // Returns true if it's a splat tensor type and has the splat value 0. + bool IsZeros(TFOp op); + + // Returns true if the op is known to use persistent memory to store its + // value. + bool IsPersistent(TFOp op); + + // Returns true if the op belongs to the NC_DATASET class (see graph/graph.h). + bool IsDataset(TFOp op); + + TFGraphDialect *getDialect() const { return dialect_; } + + protected: + TFGraphDialect *dialect_; +}; +} // namespace tfg +} // namespace mlir + +#endif // TENSORFLOW_CORE_TRANSFORMS_UTILS_OP_CAT_HELPER_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/transforms/utils/pdll/utils.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/transforms/utils/pdll/utils.h new file mode 100644 index 0000000000000000000000000000000000000000..75f33509fc88edd01430ae55157f10f5a09b9299 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/transforms/utils/pdll/utils.h @@ -0,0 +1,30 @@ +/* Copyright 2022 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_TRANSFORMS_UTILS_PDLL_UTILS_H_ +#define TENSORFLOW_CORE_TRANSFORMS_UTILS_PDLL_UTILS_H_ + +#include "mlir/IR/PatternMatch.h" // from @llvm-project + +namespace mlir { +namespace tfg { + +// Register the common utils. +void RegisterPDLLUtils(RewritePatternSet &patterns); + +} // namespace tfg +} // namespace mlir + +#endif // TENSORFLOW_CORE_TRANSFORMS_UTILS_PDLL_UTILS_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/transforms/utils/utils.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/transforms/utils/utils.h new file mode 100644 index 0000000000000000000000000000000000000000..9b4b2e2a87eaa7ee6f7bbc01500ab89941b0d0bd --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/transforms/utils/utils.h @@ -0,0 +1,82 @@ +/* Copyright 2022 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_TRANSFORMS_UTILS_UTILS_H_ +#define TENSORFLOW_CORE_TRANSFORMS_UTILS_UTILS_H_ + +#include "mlir/IR/Types.h" // from @llvm-project +#include "mlir/IR/Value.h" // from @llvm-project +#include "tensorflow/core/ir/dialect.h" + +namespace mlir { + +class Operation; +class NamedAttrList; + +namespace tfg { +namespace util { + +// Returns true if the op has the requested device attribute. +bool OpHasDevice(Operation *op, const char *device_name); + +// Erase the attribute starts with "_". +void EraseRegularNodeAttributes(NamedAttrList &attr_list); + +// When rewriting an operation 1-to-1, intrinsic attributes are manually +// forwarded, modified, or dropped. For example, when `If` is rewritten to +// `IfRegion`, +// +// 1. `Tout` is forwarded as is, +// 2. `then_branch` is changed to `then_attrs` which contain the attribute +// dictionary part of the `#tf_type.func`, and +// 3. `Tin` is dropped. +// +// Non-intrinsic attributes, e.g. `_tpu_cluster`, are blindly forwarded to the +// new operation. +void ForwardNonIntrinsicAttributes(Operation *src, Operation *dst); + +// Add an argument to a loop region. This inserts the new data argument and +// control argument at the correct positions and returns them. Also, this +// function updates any preserved argument attributes by inserting a null. +struct LoopRegionArgumentUpdate { + BlockArgument data, ctl; +}; +LoopRegionArgumentUpdate LoopRegionAddArgument(Region ®ion, Type type); + +// Erase an argument from a loop region. This erases the corresponding control +// argument. Also, this function updates any preserved argument attributes by +// deleting them. +void LoopRegionEraseArgument(Region ®ion, unsigned index); + +// Indicate that a result has been added to a loop region. Call this function to +// update the preserved result attributes. +void LoopRegionResultAdded(Region ®ion, unsigned num = 1); + +// Indicate that a result has been erased from a loop region. Call this function +// to update the preserved result attributes. +void LoopRegionResultErased(Region ®ion, unsigned index); + +// Erase operands from an op that might have an `operand_segment_sizes` , +// updating the attribute in-place if present. +void SizedOperandSegmentsEraseOperands(Operation *op, + ArrayRef indices); +void SizedOperandSegmentsEraseOperands(Operation *op, + const llvm::BitVector &erase); + +} // namespace util +} // namespace tfg +} // namespace mlir + +#endif // TENSORFLOW_CORE_TRANSFORMS_UTILS_UTILS_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/util/activation_mode.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/util/activation_mode.h new file mode 100644 index 0000000000000000000000000000000000000000..9bc5099b4fc24917919e81a6f1c217832ab2951c --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/util/activation_mode.h @@ -0,0 +1,65 @@ +/* Copyright 2017 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_UTIL_ACTIVATION_MODE_H_ +#define TENSORFLOW_CORE_UTIL_ACTIVATION_MODE_H_ + +// This file contains helper routines to deal with activation mode in various +// ops and kernels. + +#include + +#include "tensorflow/core/framework/graph.pb.h" +#include "tensorflow/core/lib/core/status.h" + +namespace tensorflow { + +// ActivationMode: the activation function we apply to the input tensor: +enum ActivationMode { + NONE = 0, + SIGMOID = 1, + RELU = 2, + RELU6 = 3, + RELUX = 4, + TANH = 5, + BANDPASS = 6, +}; + +// Specialization to parse an attribute directly into a ActivationMode enum. +Status GetActivationModeFromString(const string& str_value, + ActivationMode* value); + +inline absl::string_view ToString(ActivationMode mode) { + switch (mode) { + case NONE: + return "NONE"; + case SIGMOID: + return "SIGMOID"; + case RELU: + return "RELU"; + case RELU6: + return "RELU6"; + case RELUX: + return "RELUX"; + case TANH: + return "TANH"; + case BANDPASS: + return "BANDPASS"; + } +} + +} // end namespace tensorflow + +#endif // TENSORFLOW_CORE_UTIL_ACTIVATION_MODE_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/util/batch_util.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/util/batch_util.h new file mode 100644 index 0000000000000000000000000000000000000000..39b7f467fa24d40766724df564cb79b89f939909 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/util/batch_util.h @@ -0,0 +1,66 @@ +/* Copyright 2017 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ +#ifndef TENSORFLOW_CORE_UTIL_BATCH_UTIL_H_ +#define TENSORFLOW_CORE_UTIL_BATCH_UTIL_H_ + +#include "tensorflow/core/framework/tensor.h" +#include "tensorflow/core/lib/core/status.h" + +namespace tensorflow { +namespace batch_util { + +// Copies element into the index^th slice of parent (in the 0th dimension). +// +// NOTE(mrry): The `element` argument is taken by value. Use `std::move()` +// to move the `element` argument into this function, and the implementation +// may be able to optimize the copy to a move. This is particularly important +// for DT_STRING tensors. +Status CopyElementToSlice(Tensor element, Tensor* parent, int64_t index); + +// Copies the index^th slice of parent (in the 0th dimension) into element. +Status CopySliceToElement(const Tensor& parent, Tensor* element, int64_t index); + +// Copies 'num_slices' contiguous slices from 'src' tensor starting from index +// 'src_offset' into target tensor 'dst', and places them into slices +// starting from 'dst_offset'. +// +// This function requires 'src' and 'dst' to have compatible shapes. That is it +// requires cum_prod(src.shape[1:] == cum_prod(dst->shape[1:]). For example if +// source is of shape [x, 2, 1] and dst is a tensor of shape [y, 1, 2], this +// function can still proceed successfully. +Status CopyContiguousSlices(const Tensor& src, int64_t src_offset, + int64_t dst_offset, int64_t num_slices, + Tensor* dst); + +// Copies the index^th slice of parent (in the 0th dimension) into element. +// +// NOTE(mrry): The implementation may be able to optimize the copy to a move. +// This is particularly important for DT_STRING tensors. +Status MaybeMoveSliceToElement(Tensor* parent, Tensor* element, int64_t index); + +// Zero-initializes the tensor `element` using the scalar stored in `padding`. +// Both `element` and `padding` must have matching `dtype`. +Status SetElementZero(Tensor* element, const Tensor& padding); + +// Copies `element` into a (0th dimension) slice of `parent`, assuming +// the shape of `element` is strictly not larger along any axis than a +// slice. +Status CopyElementToLargerSlice(const Tensor& element, Tensor* parent, + int index); + +} // namespace batch_util +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_UTIL_BATCH_UTIL_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/util/bcast.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/util/bcast.h new file mode 100644 index 0000000000000000000000000000000000000000..e5fa5c1311482a10fc4b61b11ba1241bb1dcd483 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/util/bcast.h @@ -0,0 +1,427 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_UTIL_BCAST_H_ +#define TENSORFLOW_CORE_UTIL_BCAST_H_ + +#include +#include + +#include "tensorflow/core/framework/tensor_shape.h" +#include "tensorflow/core/lib/gtl/inlined_vector.h" +#include "tensorflow/core/platform/macros.h" +#include "tensorflow/core/platform/types.h" + +namespace tensorflow { + +// Returns the mapping from the output batch indices to the corresponding +// input's batch indices, given the input's "reshape" and "bcast" shapes as +// returned by the BCastList helper class. The i'th element denotes the +// (flattened) batch index of the input that must be used to compute the i'th +// batch output. +// +inline void ComputeBatchIndices(const int64_t output_batch_size, + const gtl::InlinedVector& reshape, + const gtl::InlinedVector& bcast, + std::vector* out_indices) { + // Populates the mapping in out_indices. This algorithm is identical to + // the following steps: + // - Reshape {0, 1, ..., input_batch_size - 1} to the input shape. + // - Broadcast to the output shape. + // - Reshape back to a flat 1D vector. + out_indices->resize(output_batch_size); + int64_t num_output_elements = 1; + int64_t num_input_elements = 1; + for (int64_t i = reshape.size() - 1; i >= 0; --i) { + // Replicate the already populated mapping an additional (dim - 1) times. + // If we are broadcasting, just copy the existing mapping. + // Otherwise, add another dimension from the input shape. + const int64_t dim = std::max(reshape[i], bcast[i]); + const int64_t incr = bcast[i] > 1 ? 0 : num_input_elements; + for (int64_t k = 0; k < (dim - 1) * num_output_elements; ++k) { + (*out_indices)[num_output_elements + k] = (*out_indices)[k] + incr; + } + num_output_elements *= dim; + num_input_elements *= reshape[i]; + } +} + +template +class BCastList { + public: + // A vector of int64 representing the shape of tensor. The 0-th + // element is the outer-most dimension and the last element is the + // inner-most dimension. Note that we do not use TensorShape since + // it's more convenient to manipulate Vec directly for this module. + typedef gtl::InlinedVector Vec; + + // Constructs all helper shapes, following the aforementioned rules. + // + // If "fewer_dims_optimization" is set to true (the default), the + // implementation tries to reduce intermediate dimensions needed to be more + // efficient. This is transparent to the caller. + // + // If false, all intermediate shapes (except for grad_{x,y}_reduce_idx()) have + // the same number of dimensions as the larger of the two inputs. + // + // If return_flattened_batch_indices is true, the implementation will compute + // for each output member of the flattened output, which batch indices of + // each input correspond to it. This is disabled by default. + explicit BCastList(const Vec (&x)[N], bool fewer_dims_optimization = true, + bool return_flattened_batch_indices = false); + ~BCastList() = default; + + // Returns true iff two operands are compatible according to the + // broadcasting rule. + bool IsValid() const { return valid_; } + bool IsBroadcastingRequired() const { return broadcasting_required_; } + + // If and only if IsValid(), the following fields can be used in + // implementing a broadcasted binary tensor operation according to + // the broadcasting rule. + const Vec& reshape(int i) const { return reshape_[i]; } + const Vec& bcast(int i) const { return bcast_[i]; } + const Vec& result_shape() const { return result_; } + const Vec& output_shape() const { return output_; } + const Vec& grad_reduce_idx(int i) const { return grad_reduce_idx_[i]; } + int64_t output_batch_size() const { return output_batch_size_; } + + // Returns the mapping from the flattened output batch indices to x's + // flattened batch indices. The result is a vector of length + // output_batch_size(). To compute the i'th batch output, a binary matmul-like + // operation should use the `x_batch_indices()[i]`th batch index of `x`. + // Note: Returns an empty vector if broadcasting is not required. Callers + // should only use this when IsBroadcastingRequired() returns true. + const std::vector& batch_indices(int i) const { + return batch_indices_[i]; + } + + protected: + bool valid_ = true; + bool broadcasting_required_ = true; + Vec reshape_[N]; + Vec bcast_[N]; + Vec result_; + Vec output_; + Vec grad_reduce_idx_[N]; + + int64_t output_batch_size_; + std::vector batch_indices_[N]; + + static void Reverse(Vec* shape) { + std::reverse(shape->begin(), shape->end()); + } + + BCastList(const BCastList&) = delete; + void operator=(const BCastList&) = delete; +}; + +template +BCastList::BCastList(const BCastList::Vec (&x)[N], + const bool fewer_dims_optimization, + const bool return_flattened_batch_indices) { + typedef BCastList::Vec Vec; + + // Safely multiplies dimensions taking into account symbolic shapes. + auto mul_dims = [](int64_t dim1, int64_t dim2) -> int64_t { + return dim1 != 0 && dim2 != 0 && (dim1 < 0 || dim2 < 0) ? -1 : dim1 * dim2; + }; + + bool all_equal = true; + size_t largest_rank = 0; + output_batch_size_ = 1; + for (int i = 0; i < N; ++i) { + if (x[i] != x[0]) { + all_equal = false; + } + if (x[i].size() > largest_rank) { + largest_rank = x[i].size(); + } + } + if (all_equal) { + broadcasting_required_ = false; + } + if (all_equal && TF_PREDICT_TRUE(fewer_dims_optimization)) { + // Fast path for common case of identical shapes. + int64_t elements = 1; + const int rank = x[0].size(); + output_.resize(rank); + for (int i = 0; i < rank; i++) { + const int64_t dim = x[0][i]; + elements = mul_dims(elements, dim); + output_[i] = dim; + } + result_.push_back(elements); + output_batch_size_ = elements; + for (int i = 0; i < N; ++i) { + reshape_[i].push_back(elements); + bcast_[i].push_back(1); + } + // grad_reduce_ is left as empty + return; + } + + // Reverse all the shapes for convenience + // After the reverse, 0-th is the inner-most dimension. + Vec copy[N]; + for (int i = 0; i < N; ++i) { + copy[i] = x[i]; + Reverse(©[i]); + } + + // 1-extend and align all vectors. + for (int i = 0; i < N; ++i) { + if (copy[i].size() < largest_rank) { + copy[i].resize(largest_rank, 1); + } + } + // Going through each dimension starting from the inner-most + // dimension, compares dimension of x and y. They are compatible if + // they are equal or either is 1. + + // indices of j-th component of each input. + bool prev_is_one[N]; + bool current_is_one[N]; + for (int i = 0; i < N; ++i) { + prev_is_one[i] = false; + current_is_one[i] = false; + } + Vec output; + bool output_dim_set = false; + int64_t output_dim = -1; + bool none_is_one = true; + bool set_one = false; + for (int j = 0; j < largest_rank; ++j) { + output_dim = -1; + output_dim_set = false; + none_is_one = true; + // Find which indices are 1. + for (int i = 0; i < N; ++i) { + // Keep track of which indices are 1. + if (copy[i][j] == 1) { + current_is_one[i] = true; + none_is_one = false; + } else { + current_is_one[i] = false; + if (!output_dim_set || copy[i][j] == output_dim) { + output_dim = copy[i][j]; + output_dim_set = true; + } else { + valid_ = false; + return; + } + } + } + output_.push_back(output_dim_set ? output_dim : 1); + output_batch_size_ = mul_dims(output_batch_size_, output_.back()); + // All dimensions are 1. + if (!output_dim_set) { + if (!TF_PREDICT_TRUE(fewer_dims_optimization)) { + for (int i = 0; i < N; ++i) { + bcast_[i].push_back(1); + reshape_[i].push_back(1); + } + result_.push_back(1); + } + for (int i = 0; i < N; ++i) { + grad_reduce_idx_[i].push_back(largest_rank - 1 - j); + } + // This will skip updating the previous state to the current one. We'll + // explain why this is safe below. + // Consider the previous state P, current state C and the next state N. + // In the case where N also is all ones (N == C), we'll do the same + // optimization here (push back one dimensions if we need to), which is + // safe and is expected. + // + // When N != C, we'll continue as usual. However, we might trigger the + // next block if N == P (because we didn't update the previous state). + // We trigger the next block if `fewer_dims_optimization` is true. + // This means that we did not modify and broadcast / reshapes in this + // block (we skipped updating, since the one dimensions can be ignored). + // In essence, we only need to check whether the previous non-one state is + // equal to the current non-one state. + + continue; + } else if (TF_PREDICT_TRUE(fewer_dims_optimization) && + std::equal(current_is_one, current_is_one + N, prev_is_one) && + set_one) { + // It is a run of the same broadcasting case as last time. + // We can reshape the input so that fewer dimensions + // are involved in the intermediate computation. + result_.back() = mul_dims(result_.back(), output_dim); + for (int i = 0; i < N; ++i) { + reshape_[i].back() = mul_dims(reshape_[i].back(), copy[i][j]); + bcast_[i].back() = + mul_dims(bcast_[i].back(), current_is_one[i] ? output_dim : 1); + if (current_is_one[i] && !none_is_one) { + grad_reduce_idx_[i].push_back(largest_rank - 1 - j); + } + } + } else { + result_.push_back(output_dim); + for (int i = 0; i < N; ++i) { + reshape_[i].push_back(copy[i][j]); + bcast_[i].push_back(current_is_one[i] ? output_dim : 1); + if (current_is_one[i] && !none_is_one) { + grad_reduce_idx_[i].push_back(largest_rank - 1 - j); + } + } + } + set_one = true; + for (int i = 0; i < N; ++i) { + prev_is_one[i] = current_is_one[i]; + } + } + if (result_.empty()) { + result_.push_back(1); + for (int i = 0; i < N; ++i) { + reshape_[i].push_back(1); + bcast_[i].push_back(1); + } + } + // Do something about batches. + for (int i = 0; i < N; ++i) { + Reverse(&reshape_[i]); + Reverse(&bcast_[i]); + Reverse(&grad_reduce_idx_[i]); + } + Reverse(&result_); + Reverse(&output_); + // Only compute batch indices when we need broadcasting, and we aren't doing + // needless work (when the output size is 0 or the + // return_flattened_batch_indices isn't enabled). + if (return_flattened_batch_indices && broadcasting_required_ && + output_batch_size_ > 0) { + for (int i = 0; i < N; ++i) { + ComputeBatchIndices(output_batch_size_, reshape_[i], bcast_[i], + &batch_indices_[i]); + } + } +} + +// BCast is a helper for broadcasting binary tensor operation. +// TensorFlow's broadcasting rule follows that of numpy (See +// http://docs.scipy.org/doc/numpy/user/basics.broadcasting.html). +// +// The rule has the following properties: +// +// 1. suffix matching: the rule starts with the right-most +// dimension, and works towards the left-most dimension. Since +// TensorFlow is row-major, the right-most dimension (the last +// element in the shape of a tensor) is the inner-most, a.k.a. +// the fastest changing, dimension. +// +// 2. Two dimensions are compatible for broadcasting if both are the +// same or either is 1. +// +// BCast takes the shape of two tensors and computes a few vectors of +// int32 that are useful for the caller to reshape the tensors, apply +// the right broadcasts to them, compute the broadcasted operation, +// and possibly the gradients. In a nutshell, the caller is expected +// to compute the broadcasted operation as following: +// +// BCast b(x.shape(), y.shape()); +// output = x.reshape(b.x_reshape()).broadcast(b.x_bcast()) +// _op_ +// y.reshape(b.y_reshape()).broadcast(b.y_bcast()) +// +// For the gradient computation, +// grad_x = sum(grad * backprop_x(x, y), grad_x_reduce_idx) +// .reshape(x.shape()) +// grad_y = sum(grad * backprop_y(x, y), grad_y_reduce_idx) +// .reshape(y.shape()) +// backprop_x and backprop_y are functionals of the binary function "op", +// e.g., +// for +, backprop_x(x, y) = backprop_y(x, y) = 1; +// for *, backprop_x(x, y) = y, backprop_y(x, y) = x; +// for /, backprop_x(x, y) = 1/y, backprop_y(x, y) = -x/y^2; +// +// The multiplication in the grad * backprop_x itself is also +// broadcasting following the same rule. +class BCast : public BCastList<2> { + public: + // Constructs all helper shapes, following the aforementioned rules. + // + // If "fewer_dims_optimization" is set to true (the default), the + // implementation tries to reduce intermediate dimensions needed to be more + // efficient. This is transparent to the caller. + // + // If false, all intermediate shapes (except for grad_{x,y}_reduce_idx()) have + // the same number of dimensions as the larger of the two inputs. + typedef gtl::InlinedVector Vec; + + BCast(const Vec& x, const Vec& y, const bool fewer_dims_optimization = true, + const bool return_flattened_batch_indices = false) + : BCastList<2>({x, y}, fewer_dims_optimization, + return_flattened_batch_indices) {} + + ~BCast() = default; + + // If and only if IsValid(), the following fields can be used in + // implementing a broadcasted binary tensor operation according to + // the broadcasting rule. + const Vec& x_reshape() const { return reshape_[0]; } + const Vec& x_bcast() const { return bcast_[0]; } + const Vec& y_reshape() const { return reshape_[1]; } + const Vec& y_bcast() const { return bcast_[1]; } + const Vec& result_shape() const { return result_; } + const Vec& output_shape() const { return output_; } + const Vec& grad_x_reduce_idx() const { return grad_reduce_idx_[0]; } + const Vec& grad_y_reduce_idx() const { return grad_reduce_idx_[1]; } + + // Returns the mapping from the flattened output batch indices to x's + // flattened batch indices. The result is a vector of length + // output_batch_size(). To compute the i'th batch output, a binary matmul-like + // operation should use the `x_batch_indices()[i]`th batch index of `x`. + // Note: Returns an empty vector if broadcasting is not required. Callers + // should only use this when IsBroadcastingRequired() returns true. + const std::vector& x_batch_indices() const { + return batch_indices_[0]; + } + // Returns the mapping from the flattened output batch indices to y's + // flattened batch indices. Similar to x_batch_indices(). + // Note: Returns an empty vector if broadcasting is not required. Callers + // should only use this when IsBroadcastingRequired() returns true. + const std::vector& y_batch_indices() const { + return batch_indices_[1]; + } + + template + static Eigen::array ToIndexArrayType( + const BCast::Vec& vec) { + CHECK_EQ(vec.size(), NDIMS); + Eigen::array ret; + for (int i = 0; i < NDIMS; ++i) ret[i] = vec[i]; + return ret; + } + + template + static Eigen::array ToIndexArray( + const BCast::Vec& vec) { + return ToIndexArrayType(vec); + } + + // Static helpers. + static Vec FromShape(const TensorShape& shape); + static TensorShape ToShape(const Vec& vec); + + private: + BCast(const BCast&) = delete; + void operator=(const BCast&) = delete; +}; + +} // end namespace tensorflow + +#endif // TENSORFLOW_CORE_UTIL_BCAST_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/util/command_line_flags.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/util/command_line_flags.h new file mode 100644 index 0000000000000000000000000000000000000000..cc8ca1b8f119b4c70d9e5afaf350d817014d7164 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/util/command_line_flags.h @@ -0,0 +1,31 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_UTIL_COMMAND_LINE_FLAGS_H_ +#define TENSORFLOW_CORE_UTIL_COMMAND_LINE_FLAGS_H_ + +#include +#include +#include + +#include "tensorflow/core/platform/types.h" +#include "tsl/util/command_line_flags.h" + +namespace tensorflow { +using tsl::Flag; // NOLINT +using tsl::Flags; // NOLINT +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_UTIL_COMMAND_LINE_FLAGS_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/util/cuda_sparse.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/util/cuda_sparse.h new file mode 100644 index 0000000000000000000000000000000000000000..ca3ac8ffa76961f94bad5a480ebd23f49714475b --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/util/cuda_sparse.h @@ -0,0 +1,722 @@ +/* Copyright 2019 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_UTIL_CUDA_SPARSE_H_ +#define TENSORFLOW_CORE_UTIL_CUDA_SPARSE_H_ + +// This header declares the class GpuSparse, which contains wrappers of +// cuSparse libraries for use in TensorFlow kernels. + +#if GOOGLE_CUDA || TENSORFLOW_USE_ROCM + +#include +#include + +#if GOOGLE_CUDA + +#include "third_party/gpus/cuda/include/cuda.h" +#include "third_party/gpus/cuda/include/cusparse.h" + +using gpusparseStatus_t = cusparseStatus_t; +using gpusparseOperation_t = cusparseOperation_t; +using gpusparseMatDescr_t = cusparseMatDescr_t; +using gpusparseAction_t = cusparseAction_t; +using gpusparseHandle_t = cusparseHandle_t; +using gpuStream_t = cudaStream_t; +#if CUDA_VERSION >= 10020 +using gpusparseDnMatDescr_t = cusparseDnMatDescr_t; +using gpusparseSpMatDescr_t = cusparseSpMatDescr_t; +using gpusparseSpMMAlg_t = cusparseSpMMAlg_t; +#endif + +#define GPUSPARSE(postfix) CUSPARSE_##postfix +#define gpusparse(postfix) cusparse##postfix + +#elif TENSORFLOW_USE_ROCM + +#include "rocm/rocm_config.h" +#include "xla/stream_executor/rocm/hipsparse_wrapper.h" + +using gpusparseStatus_t = hipsparseStatus_t; +using gpusparseOperation_t = hipsparseOperation_t; +using gpusparseMatDescr_t = hipsparseMatDescr_t; +using gpusparseAction_t = hipsparseAction_t; +using gpusparseHandle_t = hipsparseHandle_t; +using gpuStream_t = hipStream_t; +#if TF_ROCM_VERSION >= 40200 +using gpusparseDnMatDescr_t = hipsparseDnMatDescr_t; +using gpusparseSpMatDescr_t = hipsparseSpMatDescr_t; +using gpusparseSpMMAlg_t = hipsparseSpMMAlg_t; +#endif +#define GPUSPARSE(postfix) HIPSPARSE_##postfix +#define gpusparse(postfix) hipsparse##postfix + +#endif + +#include "xla/stream_executor/data_type.h" +#include "tensorflow/core/framework/op_kernel.h" +#include "tensorflow/core/framework/tensor.h" +#include "tensorflow/core/framework/tensor_types.h" +#include "tensorflow/core/lib/core/status.h" +#include "tensorflow/core/platform/stream_executor.h" +#include "tensorflow/core/public/version.h" + +#if GOOGLE_CUDA +#include "xla/stream_executor/cuda/cuda_blas_utils.h" +#endif + +// Macro that specializes a sparse method for all 4 standard +// numeric types. +// TODO: reuse with cuda_solvers +#define TF_CALL_LAPACK_TYPES(m) \ + m(float, S) m(double, D) m(std::complex, C) m(std::complex, Z) + +namespace tensorflow { + +inline std::string ConvertGPUSparseErrorToString( + const gpusparseStatus_t status) { + switch (status) { +#define STRINGIZE(q) #q +#define RETURN_IF_STATUS(err) \ + case err: \ + return STRINGIZE(err); + +#if GOOGLE_CUDA + + RETURN_IF_STATUS(CUSPARSE_STATUS_SUCCESS) + RETURN_IF_STATUS(CUSPARSE_STATUS_NOT_INITIALIZED) + RETURN_IF_STATUS(CUSPARSE_STATUS_ALLOC_FAILED) + RETURN_IF_STATUS(CUSPARSE_STATUS_INVALID_VALUE) + RETURN_IF_STATUS(CUSPARSE_STATUS_ARCH_MISMATCH) + RETURN_IF_STATUS(CUSPARSE_STATUS_MAPPING_ERROR) + RETURN_IF_STATUS(CUSPARSE_STATUS_EXECUTION_FAILED) + RETURN_IF_STATUS(CUSPARSE_STATUS_INTERNAL_ERROR) + RETURN_IF_STATUS(CUSPARSE_STATUS_MATRIX_TYPE_NOT_SUPPORTED) + + default: + return strings::StrCat("Unknown CUSPARSE error: ", + static_cast(status)); +#elif TENSORFLOW_USE_ROCM + + RETURN_IF_STATUS(HIPSPARSE_STATUS_SUCCESS) + RETURN_IF_STATUS(HIPSPARSE_STATUS_NOT_INITIALIZED) + RETURN_IF_STATUS(HIPSPARSE_STATUS_ALLOC_FAILED) + RETURN_IF_STATUS(HIPSPARSE_STATUS_INVALID_VALUE) + RETURN_IF_STATUS(HIPSPARSE_STATUS_ARCH_MISMATCH) + RETURN_IF_STATUS(HIPSPARSE_STATUS_MAPPING_ERROR) + RETURN_IF_STATUS(HIPSPARSE_STATUS_EXECUTION_FAILED) + RETURN_IF_STATUS(HIPSPARSE_STATUS_INTERNAL_ERROR) + RETURN_IF_STATUS(HIPSPARSE_STATUS_MATRIX_TYPE_NOT_SUPPORTED) + RETURN_IF_STATUS(HIPSPARSE_STATUS_ZERO_PIVOT) + + default: + return strings::StrCat("Unknown hipSPARSE error: ", + static_cast(status)); +#endif + +#undef RETURN_IF_STATUS +#undef STRINGIZE + } +} + +#if GOOGLE_CUDA + +#define TF_RETURN_IF_GPUSPARSE_ERROR(expr) \ + do { \ + auto status = (expr); \ + if (TF_PREDICT_FALSE(status != CUSPARSE_STATUS_SUCCESS)) { \ + return errors::Internal(__FILE__, ":", __LINE__, " (", TF_STR(expr), \ + "): cuSparse call failed with status ", \ + ConvertGPUSparseErrorToString(status)); \ + } \ + } while (0) + +#elif TENSORFLOW_USE_ROCM + +#define TF_RETURN_IF_GPUSPARSE_ERROR(expr) \ + do { \ + auto status = (expr); \ + if (TF_PREDICT_FALSE(status != HIPSPARSE_STATUS_SUCCESS)) { \ + return errors::Internal(__FILE__, ":", __LINE__, " (", TF_STR(expr), \ + "): hipSPARSE call failed with status ", \ + ConvertGPUSparseErrorToString(status)); \ + } \ + } while (0) + +#endif + +inline gpusparseOperation_t TransposeAndConjugateToGpuSparseOp(bool transpose, + bool conjugate, + Status* status) { +#if GOOGLE_CUDA + if (transpose) { + return conjugate ? CUSPARSE_OPERATION_CONJUGATE_TRANSPOSE + : CUSPARSE_OPERATION_TRANSPOSE; + } else { + if (conjugate) { + DCHECK(status != nullptr); + *status = errors::InvalidArgument( + "Conjugate == True and transpose == False is not supported."); + } + return CUSPARSE_OPERATION_NON_TRANSPOSE; + } +#elif TENSORFLOW_USE_ROCM + if (transpose) { + return conjugate ? HIPSPARSE_OPERATION_CONJUGATE_TRANSPOSE + : HIPSPARSE_OPERATION_TRANSPOSE; + } else { + if (conjugate) { + DCHECK(status != nullptr); + *status = errors::InvalidArgument( + "Conjugate == True and transpose == False is not supported."); + } + return HIPSPARSE_OPERATION_NON_TRANSPOSE; + } +#endif +} + +#if GOOGLE_CUDA && (CUDA_VERSION >= 12000) + +template +struct ToGpuSparseIndexType; +template <> +struct ToGpuSparseIndexType { + static constexpr cusparseIndexType_t value = CUSPARSE_INDEX_32I; +}; +template <> +struct ToGpuSparseIndexType { + static constexpr cusparseIndexType_t value = CUSPARSE_INDEX_64I; +}; + +class GpuSparseSpGEMMDescr { + public: + GpuSparseSpGEMMDescr() : initialized_(false) {} + ~GpuSparseSpGEMMDescr() { + if (initialized_) { + cusparseSpGEMM_destroyDescr(descr_); + } + } + Status Initialize() { + if (initialized_) { + return errors::Internal("Double initializion of GpuSparseSpGEMMDescr."); + } + TF_RETURN_IF_GPUSPARSE_ERROR(cusparseSpGEMM_createDescr(&descr_)); + initialized_ = true; + return OkStatus(); + } + cusparseSpGEMMDescr_t& get() { return descr_; } + + private: + bool initialized_; + cusparseSpGEMMDescr_t descr_; + + GpuSparseSpGEMMDescr(const GpuSparseSpGEMMDescr&) = delete; + void operator=(const GpuSparseSpGEMMDescr&) = delete; +}; + +class GpuSparseSpMatDescr { + public: + GpuSparseSpMatDescr() : initialized_(false) {} + ~GpuSparseSpMatDescr() { + if (initialized_) { + cusparseDestroySpMat(descr_); + } + } + template + Status InitializeCsr(int64_t rows, int64_t cols, int64_t nnz, + IndexType* csrRowOffsets, IndexType* csrColInd, + FloatType* csrValues) { + if (initialized_) { + return errors::Internal("Double initializion of gpusparseSpMatDescr."); + } + using stream_executor::cuda::AsCudaDataType; + using stream_executor::dnn::ToDataType; + TF_RETURN_IF_GPUSPARSE_ERROR(cusparseCreateCsr( + &descr_, rows, cols, nnz, csrRowOffsets, csrColInd, csrValues, + ToGpuSparseIndexType::value, + ToGpuSparseIndexType::value, CUSPARSE_INDEX_BASE_ZERO, + AsCudaDataType(ToDataType::value))); + initialized_ = true; + return OkStatus(); + } + gpusparseSpMatDescr_t& get() { return descr_; } + + private: + bool initialized_; + cusparseSpMatDescr_t descr_; + GpuSparseSpMatDescr(const GpuSparseSpMatDescr&) = delete; + void operator=(const GpuSparseSpMatDescr&) = delete; +}; + +class GpuSparseConstSpMatDescr { + public: + GpuSparseConstSpMatDescr() : initialized_(false) {} + ~GpuSparseConstSpMatDescr() { + if (initialized_) { + cusparseDestroySpMat(descr_); + } + } + template + Status InitializeCsr(int64_t rows, int64_t cols, int64_t nnz, + const IndexType* csrRowOffsets, + const IndexType* csrColInd, const FloatType* csrValues) { + if (initialized_) { + return errors::Internal("Double initializion of gpusparseSpMatDescr."); + } + using stream_executor::cuda::AsCudaDataType; + using stream_executor::dnn::ToDataType; + TF_RETURN_IF_GPUSPARSE_ERROR(cusparseCreateConstCsr( + &descr_, rows, cols, nnz, csrRowOffsets, csrColInd, csrValues, + ToGpuSparseIndexType::value, + ToGpuSparseIndexType::value, CUSPARSE_INDEX_BASE_ZERO, + AsCudaDataType(ToDataType::value))); + initialized_ = true; + return OkStatus(); + } + cusparseConstSpMatDescr_t& get() { return descr_; } + + private: + bool initialized_; + cusparseConstSpMatDescr_t descr_; + GpuSparseConstSpMatDescr(const GpuSparseConstSpMatDescr&) = delete; + void operator=(const GpuSparseConstSpMatDescr&) = delete; +}; + +#endif + +// The GpuSparse class provides a simplified templated API for cuSparse +// (http://docs.nvidia.com/cuda/cusparse/index.html). +// An object of this class wraps static cuSparse instances, +// and will launch Cuda kernels on the stream wrapped by the GPU device +// in the OpKernelContext provided to the constructor. +// +// Notice: All the computational member functions are asynchronous and simply +// launch one or more Cuda kernels on the Cuda stream wrapped by the GpuSparse +// object. + +class GpuSparse { + public: + // This object stores a pointer to context, which must outlive it. + explicit GpuSparse(OpKernelContext* context); + virtual ~GpuSparse() {} + + // This initializes the GpuSparse class if it hasn't + // been initialized yet. All following public methods require the + // class has been initialized. Can be run multiple times; all + // subsequent calls after the first have no effect. + Status Initialize(); // Move to constructor? + + // ==================================================================== + // Wrappers for cuSparse start here. + // + + // Solves tridiagonal system of equations. + // See: https://docs.nvidia.com/cuda/cusparse/index.html#gtsv2 + template + Status Gtsv2(int m, int n, const Scalar* dl, const Scalar* d, + const Scalar* du, Scalar* B, int ldb, void* pBuffer) const; + + // Computes the size of a temporary buffer used by Gtsv2. + // See: https://docs.nvidia.com/cuda/cusparse/index.html#gtsv2_bufferSize + template + Status Gtsv2BufferSizeExt(int m, int n, const Scalar* dl, const Scalar* d, + const Scalar* du, const Scalar* B, int ldb, + size_t* bufferSizeInBytes) const; + + // Solves tridiagonal system of equations without partial pivoting. + // See: https://docs.nvidia.com/cuda/cusparse/index.html#gtsv2_nopivot + template + Status Gtsv2NoPivot(int m, int n, const Scalar* dl, const Scalar* d, + const Scalar* du, Scalar* B, int ldb, + void* pBuffer) const; + + // Computes the size of a temporary buffer used by Gtsv2NoPivot. + // See: + // https://docs.nvidia.com/cuda/cusparse/index.html#gtsv2_nopivot_bufferSize + template + Status Gtsv2NoPivotBufferSizeExt(int m, int n, const Scalar* dl, + const Scalar* d, const Scalar* du, + const Scalar* B, int ldb, + size_t* bufferSizeInBytes) const; + + // Solves a batch of tridiagonal systems of equations. Doesn't support + // multiple right-hand sides per each system. Doesn't do pivoting. + // See: https://docs.nvidia.com/cuda/cusparse/index.html#gtsv2stridedbatch + template + Status Gtsv2StridedBatch(int m, const Scalar* dl, const Scalar* d, + const Scalar* du, Scalar* x, int batchCount, + int batchStride, void* pBuffer) const; + + // Computes the size of a temporary buffer used by Gtsv2StridedBatch. + // See: + // https://docs.nvidia.com/cuda/cusparse/index.html#gtsv2stridedbatch_bufferSize + template + Status Gtsv2StridedBatchBufferSizeExt(int m, const Scalar* dl, + const Scalar* d, const Scalar* du, + const Scalar* x, int batchCount, + int batchStride, + size_t* bufferSizeInBytes) const; + + // Compresses the indices of rows or columns. It can be interpreted as a + // conversion from COO to CSR sparse storage format. See: + // http://docs.nvidia.com/cuda/cusparse/index.html#cusparse-lt-t-gt-csr2coo. + Status Csr2coo(const int* CsrRowPtr, int nnz, int m, int* cooRowInd) const; + + // Uncompresses the indices of rows or columns. It can be interpreted as a + // conversion from CSR to COO sparse storage format. See: + // http://docs.nvidia.com/cuda/cusparse/index.html#cusparse-lt-t-gt-coo2csr. + Status Coo2csr(const int* cooRowInd, int nnz, int m, int* csrRowPtr) const; + +#if (GOOGLE_CUDA && (CUDA_VERSION < 10020)) || \ + (TENSORFLOW_USE_ROCM && TF_ROCM_VERSION < 40200) + // Sparse-dense matrix multiplication C = alpha * op(A) * op(B) + beta * C, + // where A is a sparse matrix in CSR format, B and C are dense tall + // matrices. This routine allows transposition of matrix B, which + // may improve performance. See: + // http://docs.nvidia.com/cuda/cusparse/index.html#cusparse-lt-t-gt-csrmm2 + // + // **NOTE** Matrices B and C are expected to be in column-major + // order; to make them consistent with TensorFlow they + // must be transposed (or the matmul op's pre/post-processing must take this + // into account). + // + // **NOTE** This is an in-place operation for data in C. + template + Status Csrmm(gpusparseOperation_t transA, gpusparseOperation_t transB, int m, + int n, int k, int nnz, const Scalar* alpha_host, + const gpusparseMatDescr_t descrA, const Scalar* csrSortedValA, + const int* csrSortedRowPtrA, const int* csrSortedColIndA, + const Scalar* B, int ldb, const Scalar* beta_host, Scalar* C, + int ldc) const; +#else // CUDA_VERSION >=10200 || TF_ROCM_VERSION >= 40200 + // Workspace size query for sparse-dense matrix multiplication. Helper + // function for SpMM which computes y = alpha * op(A) * op(B) + beta * C, + // where A is a sparse matrix in CSR format, B and C are dense matricies in + // column-major format. Returns needed workspace size in bytes. + template + Status SpMMBufferSize(gpusparseOperation_t transA, + gpusparseOperation_t transB, const Scalar* alpha, + const gpusparseSpMatDescr_t matA, + const gpusparseDnMatDescr_t matB, const Scalar* beta, + gpusparseDnMatDescr_t matC, gpusparseSpMMAlg_t alg, + size_t* bufferSize) const; + + // Sparse-dense matrix multiplication y = alpha * op(A) * op(B) + beta * C, + // where A is a sparse matrix in CSR format, B and C are dense matricies in + // column-major format. Buffer is assumed to be at least as large as the + // workspace size returned by SpMMBufferSize(). + // + // **NOTE** This is an in-place operation for data in C. + template + Status SpMM(gpusparseOperation_t transA, gpusparseOperation_t transB, + const Scalar* alpha, const gpusparseSpMatDescr_t matA, + const gpusparseDnMatDescr_t matB, const Scalar* beta, + gpusparseDnMatDescr_t matC, gpusparseSpMMAlg_t alg, + int8* buffer) const; +#endif + + // Sparse-dense vector multiplication y = alpha * op(A) * x + beta * y, + // where A is a sparse matrix in CSR format, x and y are dense vectors. See: + // http://docs.nvidia.com/cuda/cusparse/index.html#cusparse-lt-t-gt-csrmv_mergepath + // + // **NOTE** This is an in-place operation for data in y. +#if (GOOGLE_CUDA && (CUDA_VERSION < 10020)) || TENSORFLOW_USE_ROCM + template + Status Csrmv(gpusparseOperation_t transA, int m, int n, int nnz, + const Scalar* alpha_host, const gpusparseMatDescr_t descrA, + const Scalar* csrSortedValA, const int* csrSortedRowPtrA, + const int* csrSortedColIndA, const Scalar* x, + const Scalar* beta_host, Scalar* y) const; +#else + template + Status Csrmv(gpusparseOperation_t transA, int m, int n, int nnz, + const Scalar* alpha_host, const Scalar* csrSortedValA, + const int* csrSortedRowPtrA, const int* csrSortedColIndA, + const Scalar* x, const Scalar* beta_host, Scalar* y) const; +#endif // CUDA_VERSION < 10020 + + // Computes workspace size for sparse - sparse matrix addition of matrices + // stored in CSR format. + template + Status CsrgeamBufferSizeExt( + int m, int n, const Scalar* alpha, const gpusparseMatDescr_t descrA, + int nnzA, const Scalar* csrSortedValA, const int* csrSortedRowPtrA, + const int* csrSortedColIndA, const Scalar* beta, + const gpusparseMatDescr_t descrB, int nnzB, const Scalar* csrSortedValB, + const int* csrSortedRowPtrB, const int* csrSortedColIndB, + const gpusparseMatDescr_t descrC, Scalar* csrSortedValC, + int* csrSortedRowPtrC, int* csrSortedColIndC, size_t* bufferSize); + + // Computes sparse-sparse matrix addition of matrices + // stored in CSR format. This is part one: calculate nnz of the + // output. csrSortedRowPtrC must be preallocated on device with + // m + 1 entries. See: + // http://docs.nvidia.com/cuda/cusparse/index.html#cusparse-lt-t-gt-csrgeam. + Status CsrgeamNnz(int m, int n, const gpusparseMatDescr_t descrA, int nnzA, + const int* csrSortedRowPtrA, const int* csrSortedColIndA, + const gpusparseMatDescr_t descrB, int nnzB, + const int* csrSortedRowPtrB, const int* csrSortedColIndB, + const gpusparseMatDescr_t descrC, int* csrSortedRowPtrC, + int* nnzTotalDevHostPtr, void* workspace); + + // Computes sparse - sparse matrix addition of matrices + // stored in CSR format. This is part two: perform sparse-sparse + // addition. csrValC and csrColIndC must be allocated on the device + // with nnzTotalDevHostPtr entries (as calculated by CsrgeamNnz). See: + // http://docs.nvidia.com/cuda/cusparse/index.html#cusparse-lt-t-gt-csrgeam. + template + Status Csrgeam(int m, int n, const Scalar* alpha, + const gpusparseMatDescr_t descrA, int nnzA, + const Scalar* csrSortedValA, const int* csrSortedRowPtrA, + const int* csrSortedColIndA, const Scalar* beta, + const gpusparseMatDescr_t descrB, int nnzB, + const Scalar* csrSortedValB, const int* csrSortedRowPtrB, + const int* csrSortedColIndB, const gpusparseMatDescr_t descrC, + Scalar* csrSortedValC, int* csrSortedRowPtrC, + int* csrSortedColIndC, void* workspace); + + // Computes sparse-sparse matrix multiplication of matrices + // stored in CSR format. +#if TENSORFLOW_USE_ROCM + // Part one: calculate nnz of the output. + // csrSortedRowPtrC must be preallocated on device with m + 1 entries. + Status CsrgemmNnz(gpusparseOperation_t transA, gpusparseOperation_t transB, + int m, int k, int n, const gpusparseMatDescr_t descrA, + int nnzA, const int* csrSortedRowPtrA, + const int* csrSortedColIndA, + const gpusparseMatDescr_t descrB, int nnzB, + const int* csrSortedRowPtrB, const int* csrSortedColIndB, + const gpusparseMatDescr_t descrC, int* csrSortedRowPtrC, + int* nnzTotalDevHostPtr); + // Part two: perform sparse-sparse matmul. + // csrValC and csrColIndC must be allocated on the device with + // nnzTotalDevHostPtr entries (as calculated by CsrgemmNnz). + template + Status Csrgemm(gpusparseOperation_t transA, gpusparseOperation_t transB, + int m, int k, int n, const gpusparseMatDescr_t descrA, + int nnzA, const Scalar* csrSortedValA, + const int* csrSortedRowPtrA, const int* csrSortedColIndA, + const gpusparseMatDescr_t descrB, int nnzB, + const Scalar* csrSortedValB, const int* csrSortedRowPtrB, + const int* csrSortedColIndB, const gpusparseMatDescr_t descrC, + Scalar* csrSortedValC, int* csrSortedRowPtrC, + int* csrSortedColIndC); +#elif CUDA_VERSION < 12000 + // Part zero: calculate required workspace size. + template + Status CsrgemmBufferSize( + int m, int n, int k, const gpusparseMatDescr_t descrA, int nnzA, + const int* csrSortedRowPtrA, const int* csrSortedColIndA, + const gpusparseMatDescr_t descrB, int nnzB, const int* csrSortedRowPtrB, + const int* csrSortedColIndB, csrgemm2Info_t info, size_t* workspaceBytes); + // Part one: calculate nnz of the output. + // csrSortedRowPtrC must be preallocated on device with m + 1 entries. + Status CsrgemmNnz(int m, int n, int k, const gpusparseMatDescr_t descrA, + int nnzA, const int* csrSortedRowPtrA, + const int* csrSortedColIndA, + const gpusparseMatDescr_t descrB, int nnzB, + const int* csrSortedRowPtrB, const int* csrSortedColIndB, + const gpusparseMatDescr_t descrC, int* csrSortedRowPtrC, + int* nnzTotalDevHostPtr, csrgemm2Info_t info, + void* workspace); + // Part two: perform sparse-sparse matmul. + // csrValC and csrColIndC must be allocated on the device with + // nnzTotalDevHostPtr entries (as calculated by CsrgemmNnz). + template + Status Csrgemm(int m, int n, int k, const gpusparseMatDescr_t descrA, + int nnzA, const Scalar* csrSortedValA, + const int* csrSortedRowPtrA, const int* csrSortedColIndA, + const gpusparseMatDescr_t descrB, int nnzB, + const Scalar* csrSortedValB, const int* csrSortedRowPtrB, + const int* csrSortedColIndB, const gpusparseMatDescr_t descrC, + Scalar* csrSortedValC, int* csrSortedRowPtrC, + int* csrSortedColIndC, const csrgemm2Info_t info, + void* workspace); +#else // CUDA_VERSION >= 12000 + template + Status SpGEMM_workEstimation(GpuSparseConstSpMatDescr& matA, + GpuSparseConstSpMatDescr& matB, + GpuSparseSpMatDescr& matC, + GpuSparseSpGEMMDescr& spgemmDescr, + size_t* bufferSize1, void* externalBuffer1); + template + Status SpGEMM_compute(GpuSparseConstSpMatDescr& matA, + GpuSparseConstSpMatDescr& matB, + GpuSparseSpMatDescr& matC, + GpuSparseSpGEMMDescr& spgemmDescr, size_t* bufferSize2, + void* externalBuffer2); + template + Status SpGEMM_copy(GpuSparseConstSpMatDescr& matA, + GpuSparseConstSpMatDescr& matB, GpuSparseSpMatDescr& matC, + GpuSparseSpGEMMDescr& spgemmDescr); +#endif + + // In-place reordering of unsorted CSR to sorted CSR. + // http://docs.nvidia.com/cuda/cusparse/index.html#cusparse-lt-t-gt-csru2csr + template + Status Csru2csr(int m, int n, int nnz, const gpusparseMatDescr_t descrA, + Scalar* csrVal, const int* csrRowPtr, int* csrColInd); + + // Converts from CSR to CSC format (equivalently, transpose). + // http://docs.nvidia.com/cuda/cusparse/index.html#cusparse-csr2cscEx + template + Status Csr2csc(int m, int n, int nnz, const Scalar* csrVal, + const int* csrRowPtr, const int* csrColInd, Scalar* cscVal, + int* cscRowInd, int* cscColPtr, + const gpusparseAction_t copyValues); + + private: + bool initialized_; + OpKernelContext* context_; // not owned. + gpuStream_t gpu_stream_; + gpusparseHandle_t* gpusparse_handle_; // not owned. + + GpuSparse(const GpuSparse&) = delete; + void operator=(const GpuSparse&) = delete; +}; + +// A wrapper class to ensure that a CUDA sparse matrix descriptor is initialized +// only once. For more details on the descriptor (gpusparseMatDescr_t), see: +// https://docs.nvidia.com/cuda/cusparse/index.html#cusparsematdescrt +class GpuSparseMatrixDescriptor { + public: + explicit GpuSparseMatrixDescriptor() : initialized_(false) {} + + GpuSparseMatrixDescriptor(GpuSparseMatrixDescriptor&& rhs) + : initialized_(rhs.initialized_), descr_(std::move(rhs.descr_)) { + rhs.initialized_ = false; + } + + GpuSparseMatrixDescriptor& operator=(GpuSparseMatrixDescriptor&& rhs) { + if (this == &rhs) return *this; + Release(); + initialized_ = rhs.initialized_; + descr_ = std::move(rhs.descr_); + rhs.initialized_ = false; + return *this; + } + + ~GpuSparseMatrixDescriptor() { Release(); } + + // Initializes the underlying descriptor. Will fail on the second call if + // called more than once. + Status Initialize() { + DCHECK(!initialized_); +#if GOOGLE_CUDA + TF_RETURN_IF_GPUSPARSE_ERROR(cusparseCreateMatDescr(&descr_)); +#elif TENSORFLOW_USE_ROCM + TF_RETURN_IF_GPUSPARSE_ERROR(se::wrap::hipsparseCreateMatDescr(&descr_)); +#endif + initialized_ = true; + return OkStatus(); + } + + gpusparseMatDescr_t& descr() { + DCHECK(initialized_); + return descr_; + } + + const gpusparseMatDescr_t& descr() const { + DCHECK(initialized_); + return descr_; + } + + private: + void Release() { + if (initialized_) { +#if GOOGLE_CUDA + cusparseDestroyMatDescr(descr_); +#elif TENSORFLOW_USE_ROCM + se::wrap::hipsparseDestroyMatDescr(descr_); +#endif + initialized_ = false; + } + } + + bool initialized_; + gpusparseMatDescr_t descr_; + + GpuSparseMatrixDescriptor(const GpuSparseMatrixDescriptor&) = delete; + void operator=(const GpuSparseMatrixDescriptor&) = delete; +}; + +#if GOOGLE_CUDA + +// A wrapper class to ensure that an unsorted/sorted CSR conversion information +// struct (csru2csrInfo_t) is initialized only once. See: +// https://docs.nvidia.com/cuda/cusparse/index.html#csru2csr +class GpuSparseCsrSortingConversionInfo { + public: + explicit GpuSparseCsrSortingConversionInfo() : initialized_(false) {} + + GpuSparseCsrSortingConversionInfo(GpuSparseCsrSortingConversionInfo&& rhs) + : initialized_(rhs.initialized_), info_(std::move(rhs.info_)) { + rhs.initialized_ = false; + } + + GpuSparseCsrSortingConversionInfo& operator=( + GpuSparseCsrSortingConversionInfo&& rhs) { + if (this == &rhs) return *this; + Release(); + initialized_ = rhs.initialized_; + info_ = std::move(rhs.info_); + rhs.initialized_ = false; + return *this; + } + + ~GpuSparseCsrSortingConversionInfo() { Release(); } + + // Initializes the underlying info. Will fail on the second call if called + // more than once. + Status Initialize() { + DCHECK(!initialized_); + TF_RETURN_IF_GPUSPARSE_ERROR(cusparseCreateCsru2csrInfo(&info_)); + initialized_ = true; + return OkStatus(); + } + + csru2csrInfo_t& info() { + DCHECK(initialized_); + return info_; + } + + const csru2csrInfo_t& info() const { + DCHECK(initialized_); + return info_; + } + + private: + void Release() { + if (initialized_) { + cusparseDestroyCsru2csrInfo(info_); + initialized_ = false; + } + } + + bool initialized_; + csru2csrInfo_t info_; + + GpuSparseCsrSortingConversionInfo(const GpuSparseCsrSortingConversionInfo&) = + delete; + void operator=(const GpuSparseCsrSortingConversionInfo&) = delete; +}; + +#endif // GOOGLE_CUDA + +} // namespace tensorflow + +#endif // GOOGLE_CUDA || TENSORFLOW_USE_ROCM + +#endif // TENSORFLOW_CORE_UTIL_CUDA_SPARSE_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/util/debug_data_dumper.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/util/debug_data_dumper.h new file mode 100644 index 0000000000000000000000000000000000000000..44eee52c5b37a26d888efbef8f6b3badf20c93d5 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/util/debug_data_dumper.h @@ -0,0 +1,138 @@ +/* Copyright 2018 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_UTIL_DEBUG_DATA_DUMPER_H_ +#define TENSORFLOW_CORE_UTIL_DEBUG_DATA_DUMPER_H_ + +#include +#include +#include + +#include "absl/container/flat_hash_map.h" +#include "tensorflow/core/platform/mutex.h" + +#define DEBUG_DATA_DUMPER() ::tensorflow::DebugDataDumper::Global() + +inline constexpr const char* kDebugGroupMain = "main"; +inline constexpr const char* kDebugGroupOpStacktrace = "op_stacktrace"; +inline constexpr const char* kDebugGroupGraphOptPass = "graph_opt_pass"; +inline constexpr const char* kDebugGroupBridgePhase1Clustering = + "bridge_phase1_clustering"; +inline constexpr const char* kDebugGroupRuntimeLowering = "runtime_lowering"; +inline constexpr const char* kDebugGroupBridgePhase1ExecutorExport = + "bridge_phase1_executor_export"; +inline constexpr const char* kDebugGroupBridgePhase2 = "bridge_phase2"; +inline constexpr const char* kDebugGroupDTensorMlir = "dtensor_mlir"; +inline constexpr const char* kDebugGroupDTensorGraph = "dtensor_graph"; +inline constexpr const char* kDebugGroupDTensorLayout = "dtensor_layout"; + +namespace tensorflow { + +class FunctionLibraryDefinition; +class Graph; + +//////////////////////////////////////////////////////////////////////////////// +// This class is responsible for dumping debugging data (e.g., GraphDef, MLIR). +// +// To dump GraphDef/MLIRs, take the following steps: +// * Set envvar TF_DUMP_GRAPH_PREFIX to your target dump directory. +// * Set envvar TF_DUMP_GRAPH_NAME_FILTER to '*' to dump all graphs, +// or a name filter to dump graphs with a name containing it. +// * Set envvar TF_DUMP_GRAPH_GROUPS to your dump groups (comma-separated). +// +// The dumped graphs then can be found in your target dump directory. +// The filename of the dump looks like this: +// ... +// +// This is what each field means: +// * : The name of your dump. +// * : The order of dumps of a specific name. +// Lower orders are executed before higher orders. +// * : The group of your dump, e.g., main. +// * : The tag of your dump, e.g., your pass name. +// +// Example dump files are: +// __inference_train_step_441.0.main.before_pre_placement_passes.pbtxt +// __inference_train_step_441.1.main.before_placer.pbtxt +// __inference_train_step_441.2.main.before_post_placement_passes.pbtxt +// __inference_train_step_441.3.main.before_graph_optimization.pbtxt +// __inference_train_step_441.4.main.after_graph_optimization.pbtxt +// __inference_train_step_441.5.main.before_post_rewrite_for_exec_passes.pbtxt +//////////////////////////////////////////////////////////////////////////////// +class DebugDataDumper { + public: + // Get the singleton instance. + static DebugDataDumper* Global(); + + // Initialize the debug data dumper. + void LoadEnvvars(); + + // Check if we should dump debug data. + // We should dump debug data only if the followings are true: + // 1. Envvar TF_DUMP_GRAPH_PREFIX is set to your target dump directory. + // 2. This condition is true if one of the followings is true. + // 2.1. TF_DUMP_GRAPH_NAME_FILTER is set to '*' + // 2.2. TF_DUMP_GRAPH_NAME_FILTER is set to a name filter + // which is a substr of name. + // 3. The group is defined in TF_DUMP_GRAPH_GROUPS. + bool ShouldDump(const std::string& name, const std::string& group) const; + + // Dump op creation callstacks, if ShouldDump returns true. + void DumpOpCreationStackTraces(const std::string& name, + const std::string& group, + const std::string& tag, const Graph* graph); + + // Dump a graph, if ShouldDump returns true. + void DumpGraph(const std::string& name, const std::string& group, + const std::string& tag, const Graph* graph, + const FunctionLibraryDefinition* func_lib_def, + bool bypass_filter = false); + + // Get the dump file basename. Dump file basenames are in this format: + // ... + // + // What each field means is explained on the class level comment. + std::string GetDumpFilename(const std::string& name, const std::string& group, + const std::string& tag); + + private: + DebugDataDumper(); + + // Get next dump id for a name. + int GetNextDumpId(const std::string& name) { + // Use a lock to make sure this is thread safe. + const mutex_lock lock(lock_); + return dump_order_ids_[name]++; + } + + // A dict to maintain the mapping from dump name to its current dump id. + absl::flat_hash_map dump_order_ids_; + + // A mutex to make sure this is thread safe. + tensorflow::mutex lock_; + + // The name filter. + std::optional name_filter_; + + // The groups filter. + std::set groups_filter_; + + // A flag indicating whether to dump wrapped graphs. + bool dump_wrapped_; +}; + +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_UTIL_DEBUG_DATA_DUMPER_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/util/debug_events_writer.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/util/debug_events_writer.h new file mode 100644 index 0000000000000000000000000000000000000000..79aad9488c94383fd3a79d951122e575faf2b518 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/util/debug_events_writer.h @@ -0,0 +1,275 @@ +/* Copyright 2019 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_UTIL_DEBUG_EVENTS_WRITER_H_ +#define TENSORFLOW_CORE_UTIL_DEBUG_EVENTS_WRITER_H_ + +#include +#include +#include +#include + +#include "absl/container/flat_hash_map.h" +#include "tensorflow/core/framework/tensor.h" +#include "tensorflow/core/lib/core/status.h" +#include "tensorflow/core/lib/io/record_writer.h" +#include "tensorflow/core/platform/env.h" +#include "tensorflow/core/platform/macros.h" +#include "tensorflow/core/platform/types.h" +#include "tensorflow/core/protobuf/debug_event.pb.h" + +namespace tensorflow { +namespace tfdbg { + +// The set of files generated by a debugged TensorFlow program. +enum DebugEventFileType { + METADATA, + SOURCE_FILES, + STACK_FRAMES, + GRAPHS, + EXECUTION, + GRAPH_EXECUTION_TRACES, +}; + +// Helper class for DebugEventsWriter. +// This class manages the writing of data to a single TFRecord file. +// Each object of the DebugEventsWriter class below involves multiple +// TFRecord files, and hence utilizes multiple objects of this helper class. +class SingleDebugEventFileWriter { + public: + explicit SingleDebugEventFileWriter(const string& file_path); + + Status Init(); + + void WriteSerializedDebugEvent(tensorflow::StringPiece debug_event_str); + + Status Flush(); + Status Close(); + + const string FileName(); + + private: + Env* env_; + const string file_path_; + std::atomic_int_fast32_t num_outstanding_events_; + + std::unique_ptr writable_file_; + std::unique_ptr record_writer_ TF_PT_GUARDED_BY(writer_mu_); + mutex writer_mu_; +}; + +// The DebugEvents writer class. +class DebugEventsWriter { + public: +#ifndef SWIG + // Prefix of version string present in the first entry of every event file. + // Default size of each circular buffer (unit: number of DebugEvent protos). + static constexpr const int64_t kDefaultCyclicBufferSize = 1000; + + static constexpr const char* kFileNamePrefix = "tfdbg_events"; + static constexpr const char* kMetadataSuffix = "metadata"; + static constexpr const char* kSourceFilesSuffix = "source_files"; + static constexpr const char* kStackFramesSuffix = "stack_frames"; + static constexpr const char* kGraphsSuffix = "graphs"; + static constexpr const char* kExecutionSuffix = "execution"; + static constexpr const char* kGraphExecutionTracesSuffix = + "graph_execution_traces"; + + static constexpr const char* kVersionPrefix = "debug.Event:"; + static constexpr const int kCurrentFormatVersion = 1; +#endif + + // Get the DebugEventsWriter for the given dump_root. + // For a given dump_root value, it is a singleton. tfdbg event files come in + // sets of six. The singleton pattern avoids storing multiple sets in a single + // folder, which might cause confusion. + // + // If an instance of DebugEventsWriter has already been created at a + // `dump_root`, calling this method with the same `dump_root` will return + // the existing instance. + // + // Args: + // dump_root: Dump root directory. If it doesn't exist, will be created. + // tfdbg_run_id: Debugging run ID of the writer. + // circular_buffer_size: Circular buffer size (in number of DebugEvent + // protos). If set to a value <=0, will abolish the circular-buffer + // behavior. + // Returns: + // A pointer to a DebugEventsWriter object: a per-dump_root singleton. + static DebugEventsWriter* GetDebugEventsWriter(const string& dump_root, + const string& tfdbg_run_id, + int64_t circular_buffer_size); + // Look up existing events writer by dump_root. + // If no DebugEventsWriter has been created at the dump_root, a non-OK + // Status will be returned. Else an OK status will be returned, with + // the pointer to the existing instance provided by reference. + static Status LookUpDebugEventsWriter( + const string& dump_root, DebugEventsWriter** debug_events_writer); + ~DebugEventsWriter(); + + // Sets the debug event filenames and opens file for writing. + // All files (see the DebugEventFileType enum) share the same prefix and + // differ only in their suffixes. If not called by user, will be invoked + // automatically by a call to FileName() or any of the Write*() methods(). + // Idempotent: if the metadata file exists and is open, this is a no-op. + // If on the other hand the file was opened, but has since disappeared (e.g. + // deleted by another process), this will open a new file. + Status Init(); + + // The four DebugEvent fields below are written _without_ the circular + // buffer. Source file contents are written to the *.source_files file. + // Takes ownership of source_file. + Status WriteSourceFile(SourceFile* source_file); + // Stack frames are written to the *.code_locations file. + // Takes ownership of stack_frame_with_id. + Status WriteStackFrameWithId(StackFrameWithId* stack_frame_with_id); + // Graph op creation events are written to the *.graphs file. + // Takes ownership of graph_op_creation. + Status WriteGraphOpCreation(GraphOpCreation* graph_op_creation); + // Debugged graphs are written to the *.graphs file. + // Takes ownership of debugged_graph. + Status WriteDebuggedGraph(DebuggedGraph* debugged_graph); + + // The two DebugEvent fields below are written to the circular buffer + // and saved to disk only at the FlushExecutionFiles() call. + // Execution events (eager execution of an op or a tf.function) are written + // to the *.execution file. Takes ownership of execution. + Status WriteExecution(Execution* execution); + // Graph execution traces (graph-internal tensor values or their summaries) + // are written to the *.graph_execution_traces file. + // Takes ownership of graph_execution_trace. + Status WriteGraphExecutionTrace(GraphExecutionTrace* graph_execution_trace); + + // Write a graph execution trace without using a protocol buffer. + // Instead, pass the raw values related to the graph execution trace. + // Args: + // tfdbg_context_id: A unique ID for the context of interest, e.g., a + // concreted compiled tf.function that the op of interest belongs to. + // op_name: Name of the op that this graph execution trace is concerned + // with. Applicable only to the single-tensor trace case. For cases in + // which the trace concerns multiple tensors, this is an empty string. + // output_slot: Output slot index of the op that this trace is concerned + // with. + // tensor_debug_mode: An integer that represents the tensor-debug mode + // enum. tensor_value: The value of the tensor that describes the + // tensor(s) + // that this trace is concerned with. The semantics of this tensor value + // depends on the value of `tensor_debug_mode`. + Status WriteGraphExecutionTrace(const string& tfdbg_context_id, + const string& device_name, + const string& op_name, int32_t output_slot, + int32_t tensor_debug_mode, + const Tensor& tensor_value); + + // Writes a serialized DebugEvent to one of the debug-events files + // concerned with the non-execution events: the SOURCE_FILES, STACK_FRAMES + // and GRAPHS files. + // NOTE: Actually used in the Python binding, to avoid overhead of + // serializing and parsing protos at the language interface. + void WriteSerializedNonExecutionDebugEvent(const string& debug_event_str, + DebugEventFileType type); + + // Writes a serialized DebugEvent to one of the debug-events files + // concerned with the execution-related events: the EXECUTION and + // GRAPH_EXECUTION_TRACES files. This involves the cyclic-buffer behavior if + // circular_buffer_size is configured to be >0. + // NOTE: Actually used in the Python binding, to avoid overhead of + // serializing and parsing protos at the language interface. + void WriteSerializedExecutionDebugEvent(const string& debug_event_str, + DebugEventFileType type); + + // Given name of the device, retrieve a unique integer ID. As a side effect, + // if this is the first time this object encounters the device name, + // writes a DebuggedDevice proto to the .graphs file in the file set. + int RegisterDeviceAndGetId(const string& device_name); + + // EventWriter automatically flushes and closes on destruction, but + // this method is provided for users who want to write to disk sooner + // and/or check for success. + // FlushNonExecutionFiles() pushes outstanding DebugEvents not written + // events to the circular buffer to their respective files. + Status FlushNonExecutionFiles(); + + // Writes current contents of the circular buffers to their respective + // debug event files and clears the circular buffers. + Status FlushExecutionFiles(); + + // Close() calls FlushNonExecutionFiles() and FlushExecutionFiles() + // and then closes the current debug events files. + Status Close(); + + private: + static std::unordered_map>* + + // Get a static map from dump-root path to DebugEventsWriter objects. + // This helps the per-dump-root singletone pattern. + GetDebugEventsWriterMap(); + + // Guards calls to the GetDebugEventsWriter() method. + static mutex factory_mu_; + + DebugEventsWriter(const string& dump_root, const string& tfdbg_run_id, + int64_t circular_buffer_size); + + // Get the path prefix. The same for all files, which differ only in the + // suffix. + string FileName(DebugEventFileType type); + + // Initialize the TFRecord writer for non-metadata file type. + Status InitNonMetadataFile(DebugEventFileType type); + + Status SerializeAndWriteDebugEvent(DebugEvent* debug_event, + DebugEventFileType type); + + void SelectWriter(DebugEventFileType type, + std::unique_ptr** writer); + const string GetSuffix(DebugEventFileType type); + string GetFileNameInternal(DebugEventFileType type); + + Env* env_; + const string dump_root_; + const string tfdbg_run_id_; + + string file_prefix_; + bool is_initialized_ TF_GUARDED_BY(initialization_mu_); + mutex initialization_mu_; + + const int64_t circular_buffer_size_; + std::deque execution_buffer_ TF_GUARDED_BY(execution_buffer_mu_); + mutex execution_buffer_mu_; + std::deque graph_execution_trace_buffer_ + TF_GUARDED_BY(graph_execution_trace_buffer_mu_); + mutex graph_execution_trace_buffer_mu_; + + absl::flat_hash_map device_name_to_id_ TF_GUARDED_BY(device_mu_); + mutex device_mu_; + + std::unique_ptr metadata_writer_; + std::unique_ptr source_files_writer_; + std::unique_ptr stack_frames_writer_; + std::unique_ptr graphs_writer_; + std::unique_ptr execution_writer_; + std::unique_ptr graph_execution_traces_writer_; + + DebugEventsWriter(const DebugEventsWriter&) = delete; + void operator=(const DebugEventsWriter&) = delete; + + friend class DebugEventsWriterTest; +}; + +} // namespace tfdbg +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_UTIL_DEBUG_EVENTS_WRITER_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/util/determinism.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/util/determinism.h new file mode 100644 index 0000000000000000000000000000000000000000..e42fb71d42b0bc9be782b3f7db6dba1fcd19a2a9 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/util/determinism.h @@ -0,0 +1,29 @@ +/* Copyright 2021 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_UTIL_DETERMINISM_H_ +#define TENSORFLOW_CORE_UTIL_DETERMINISM_H_ + +#include "tsl/util/determinism.h" + +namespace tensorflow { + +using tsl::EnableOpDeterminism; +using tsl::OpDeterminismRequired; +using tsl::OpOrderDeterminismRequired; + +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_UTIL_DETERMINISM_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/util/device_name_utils.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/util/device_name_utils.h new file mode 100644 index 0000000000000000000000000000000000000000..20b1f21786b2f023b11a7230d5deea981628015a --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/util/device_name_utils.h @@ -0,0 +1,27 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_UTIL_DEVICE_NAME_UTILS_H_ +#define TENSORFLOW_CORE_UTIL_DEVICE_NAME_UTILS_H_ + +#include "tsl/util/device_name_utils.h" + +namespace tensorflow { +// NOLINTBEGIN(misc-unused-using-decls) +using tsl::DeviceNameUtils; +// NOLINTEND(misc-unused-using-decls) +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_UTIL_DEVICE_NAME_UTILS_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/util/dump_graph.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/util/dump_graph.h new file mode 100644 index 0000000000000000000000000000000000000000..0a13bf2186740fe3fb7270bc05a9c4df253981b9 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/util/dump_graph.h @@ -0,0 +1,80 @@ +/* Copyright 2018 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +// Helper functions for dumping Graphs, GraphDefs, and FunctionDefs to files for +// debugging. + +#ifndef TENSORFLOW_CORE_UTIL_DUMP_GRAPH_H_ +#define TENSORFLOW_CORE_UTIL_DUMP_GRAPH_H_ + +#include +#include + +#include "tensorflow/core/framework/cost_graph.pb.h" +#include "tensorflow/core/framework/function.h" +#include "tensorflow/core/framework/graph.pb.h" +#include "tensorflow/core/graph/graph.h" + +namespace tensorflow { + +// Dumps 'graph_def' to a file, as a GraphDef text proto. Returns the file name +// chosen. +// +// If the TF_DUMP_GRAPH_PREFIX environment variable is "-", then instead the +// GraphDef will be logged (using the LOG() macro). +// +// Automatically picks a file name. Prefixes 'name' with the value of the +// TF_DUMP_GRAPH_PREFIX environment variable if 'dirname' is empty, and suffixes +// 'name' with ".pbtxt" to form a name. If a graph has already been dumped by +// this process with the same name, suffixes with "_n.pbtxt", where 'n' is a +// sequence number. +string DumpGraphDefToFile(const string& name, GraphDef const& graph_def, + const string& dirname = ""); + +// Similar to DumpGraphDefToFile, use CostGraphDef instead of GraphDef. +string DumpCostGraphDefToFile(const string& name, CostGraphDef const& graph_def, + const string& dirname = ""); + +// Similar to DumpGraphDefToFile, but builds the GraphDef to dump from a 'graph' +// and an optional function library 'flib_def'. Returns the file name chosen. +string DumpGraphToFile(const string& name, Graph const& graph, + const FunctionLibraryDefinition* flib_def = nullptr, + const string& dirname = ""); + +// Similar to DumpGraphDefToFile, but dumps a function as a FunctionDef text +// proto. Returns the file name chosen. +string DumpFunctionDefToFile(const string& name, FunctionDef const& fdef, + const string& dirname = ""); + +// Sets a custom Graph dumper. If set, this dumper will be used to dump graphs +// instead via DumpGraphToFile. As the custom dumper may not produce protobufs, +// allow specifying a file suffix/extension too. +void SetGraphDumper( + std::function + dumper, + string suffix = ".pbtxt"); + +// Dump data to a file. +// This function will create a WritableFile and pass it to the dumper. +// The dumper callback will be responsible for writing data to the file. +string DumpToFile(const string& name, const string& dirname, + const string& suffix, const string& type_name, + std::function dumper); + +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_UTIL_DUMP_GRAPH_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/util/einsum_op_util.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/util/einsum_op_util.h new file mode 100644 index 0000000000000000000000000000000000000000..2d99dd2cad5a35b7bd78bf1e9f8edb64e527ad42 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/util/einsum_op_util.h @@ -0,0 +1,73 @@ +/* Copyright 2019 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ +#ifndef TENSORFLOW_CORE_UTIL_EINSUM_OP_UTIL_H_ +#define TENSORFLOW_CORE_UTIL_EINSUM_OP_UTIL_H_ + +#include + +#include "tensorflow/core/lib/core/status.h" +#include "tensorflow/core/lib/gtl/inlined_vector.h" + +namespace tensorflow { + +using Labels = gtl::InlinedVector; +using OperandLabels = gtl::InlinedVector; +using LabelCounts = gtl::InlinedVector; +using OperandLabelCounts = gtl::InlinedVector; + +// Dummy axis label used to denote an ellipsis in an input or output subscript. +constexpr int kEllipsisLabel = -1; + +// Each dimension is categorized into exactly one of five types based on +// whether its corresponding label is present in the input and/or the output +// subscripts. +enum EinsumDimensionType { + // Batch dimensions are those present in two inputs as well as the output. + // They are part of the batch dimensions during Tensor contraction. Such + // dimensions may be broadcasting dimensions (those mapping to ellipsis) + // or explicit batch dimensions corresponding to named axis labels. + kBroadcasting = 0, + kBatch = 1, + // Free dimensions are present in exactly one of the inputs, and also the + // output. These are non-contracted axes in the Tensor contraction. + kFree = 2, + // Contract dimensions are present in two inputs, but not the output. These + // dimensions are contracted in Tensor contraction. + kContract = 3, + // Reduce dimensions are present in exactly one input; and not in the output + // and are summed over prior to Tensor contraction. + kReduce = 4, +}; + +// Parses and validates an einsum equation in explicit form. +Status ValidateEinsumEquation(const string& equation, + gtl::InlinedVector* input_subscripts, + string* output_subscript); + +// Parses and validates the equation and the input shapes. Single character +// labels are integerized and we populate input and output label subscripts +// and corresponding counts. Also create the mapping from (named) labels to +// their EinsumDimensionType. +Status ParseEinsumEquation(const string& equation, OperandLabels* input_labels, + Labels* output_labels, + std::vector* label_types, + OperandLabelCounts* input_label_counts, + LabelCounts* output_label_counts, + gtl::InlinedVector* input_has_ellipsis, + bool* output_has_ellipsis); + +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_UTIL_EINSUM_OP_UTIL_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/util/env_var.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/util/env_var.h new file mode 100644 index 0000000000000000000000000000000000000000..fac0e2373ad1453fe38c0128be28229fe7c55590 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/util/env_var.h @@ -0,0 +1,34 @@ +/* Copyright 2016 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_UTIL_ENV_VAR_H_ +#define TENSORFLOW_CORE_UTIL_ENV_VAR_H_ + +#include "tensorflow/core/platform/status.h" +#include "tensorflow/core/platform/stringpiece.h" +#include "tensorflow/core/platform/types.h" +#include "tsl/util/env_var.h" + +namespace tensorflow { + +using tsl::ReadBoolFromEnvVar; +using tsl::ReadFloatFromEnvVar; +using tsl::ReadInt64FromEnvVar; +using tsl::ReadStringFromEnvVar; +using tsl::ReadStringsFromEnvVar; + +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_UTIL_ENV_VAR_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/util/equal_graph_def.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/util/equal_graph_def.h new file mode 100644 index 0000000000000000000000000000000000000000..9803b2dba60452c28b37ac799692827c1af0d0fa --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/util/equal_graph_def.h @@ -0,0 +1,100 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_UTIL_EQUAL_GRAPH_DEF_H_ +#define TENSORFLOW_CORE_UTIL_EQUAL_GRAPH_DEF_H_ + +#include "tensorflow/core/framework/graph_def_util.h" +#include "tensorflow/core/platform/protobuf.h" +#include "tensorflow/core/platform/types.h" + +namespace tensorflow { + +class GraphDef; +class NodeDef; + +struct EqualGraphDefOptions { + // Should internal attributes (attribute names that start with '_') be + // ignored? + bool ignore_internal_attrs = true; +}; + +// Determines if actual and expected are equal, ignoring versions and ordering +// of nodes, attrs, and control inputs. If the GraphDefs are different and +// diff != nullptr, *diff is set to an explanation of the difference. Note that +// we use node names to match up nodes between the graphs, and so the naming of +// nodes must be consistent. +bool EqualGraphDef(const GraphDef& actual, const GraphDef& expected, + string* diff, const EqualGraphDefOptions& options = {}); + +// Returns a hash of `gdef` that is consistent with EqualGraphDef. In other +// words, if two graph defs compare equal according to EqualGraphDef, +// GraphDefHash will return the same value for both of them when called +// with the same `options` that was used in the call to EqualGraphDef. +// Similarly to protobuf deterministic serialization, hash value is +// guaranteed to be stable only for a given binary. In particular, one should +// probably not persist the returned value. +uint64 GraphDefHash(const GraphDef& gdef, + const EqualGraphDefOptions& options = {}); + +// Determines if actual and expected are equal, ignoring: ordering of +// attrs, internal attributes (if set in `options`), and control inputs. +// +// If the NodeDefs are different and +// diff != nullptr, *diff is set to an explanation of the difference. +bool EqualNodeDef(const NodeDef& actual, const NodeDef& expected, string* diff, + const EqualGraphDefOptions& options = {}); + +// Returns a hash of `ndef` that is consistent with EqualNodeDef. In other +// words, if two node defs compare equal according to EqualNodeDef, NodeDefHash +// will return the same value for both of them when called with the same +// `options` that was used in the call to EqualNodeDef. +// Similarly to protobuf deterministic serialization, hash value is +// guaranteed to be stable only for a given binary. In particular, one should +// probably not persist the returned value. +uint64 NodeDefHash(const NodeDef& ndef, + const EqualGraphDefOptions& options = {}); + +// Determines if actual and expected are equal, ignoring ordering. If they're +// different and diff != nullptr, *diff is set to an explanation of the +// difference. +bool EqualRepeatedNodeDef(const protobuf::RepeatedPtrField& actual, + const protobuf::RepeatedPtrField& expected, + string* diff, + const EqualGraphDefOptions& options = {}); + +// Returns a hash of `ndefs` that is consistent with EqualRepeatedNodeDef. +// In other words, if two ndefs compare equal according to +// EqualRepeatedNodeDef, RepeatedNodeDefHash will return the same value for +// both of them when called with the same `options` that was used in +// the call to EqualRepeatedNodeDef. +// Similarly to protobuf deterministic serialization, hash value is +// guaranteed to be stable only for a given binary. In particular, one should +// probably not persist the returned value. +uint64 RepeatedNodeDefHash(const protobuf::RepeatedPtrField& ndefs, + const EqualGraphDefOptions& options = {}); + +#define TF_EXPECT_GRAPH_EQ(expected, actual) \ + do { \ + string diff; \ + EXPECT_TRUE(EqualGraphDef(actual, expected, &diff)) \ + << diff << "\nExpected:\n" \ + << SummarizeGraphDef(expected) << "\nActual:\n" \ + << SummarizeGraphDef(actual); \ + } while (false) + +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_UTIL_EQUAL_GRAPH_DEF_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/util/event.pb.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/util/event.pb.h new file mode 100644 index 0000000000000000000000000000000000000000..67527e725204910c42023d1e2f0188a9d72a042e --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/util/event.pb.h @@ -0,0 +1,3398 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/util/event.proto + +#ifndef GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2futil_2fevent_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2futil_2fevent_2eproto + +#include +#include + +#include +#if PROTOBUF_VERSION < 3021000 +#error This file was generated by a newer version of protoc which is +#error incompatible with your Protocol Buffer headers. Please update +#error your headers. +#endif +#if 3021009 < PROTOBUF_MIN_PROTOC_VERSION +#error This file was generated by an older version of protoc which is +#error incompatible with your Protocol Buffer headers. Please +#error regenerate this file with a newer version of protoc. +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include // IWYU pragma: export +#include // IWYU pragma: export +#include +#include +#include "tensorflow/core/framework/summary.pb.h" +// @@protoc_insertion_point(includes) +#include +#define PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2futil_2fevent_2eproto +PROTOBUF_NAMESPACE_OPEN +namespace internal { +class AnyMetadata; +} // namespace internal +PROTOBUF_NAMESPACE_CLOSE + +// Internal implementation detail -- do not use these members. +struct TableStruct_tensorflow_2fcore_2futil_2fevent_2eproto { + static const uint32_t offsets[]; +}; +extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_tensorflow_2fcore_2futil_2fevent_2eproto; +namespace tensorflow { +class Event; +struct EventDefaultTypeInternal; +extern EventDefaultTypeInternal _Event_default_instance_; +class LogMessage; +struct LogMessageDefaultTypeInternal; +extern LogMessageDefaultTypeInternal _LogMessage_default_instance_; +class RequestedExitCode; +struct RequestedExitCodeDefaultTypeInternal; +extern RequestedExitCodeDefaultTypeInternal _RequestedExitCode_default_instance_; +class SessionLog; +struct SessionLogDefaultTypeInternal; +extern SessionLogDefaultTypeInternal _SessionLog_default_instance_; +class SourceMetadata; +struct SourceMetadataDefaultTypeInternal; +extern SourceMetadataDefaultTypeInternal _SourceMetadata_default_instance_; +class TaggedRunMetadata; +struct TaggedRunMetadataDefaultTypeInternal; +extern TaggedRunMetadataDefaultTypeInternal _TaggedRunMetadata_default_instance_; +class WatchdogConfig; +struct WatchdogConfigDefaultTypeInternal; +extern WatchdogConfigDefaultTypeInternal _WatchdogConfig_default_instance_; +class WorkerHeartbeatRequest; +struct WorkerHeartbeatRequestDefaultTypeInternal; +extern WorkerHeartbeatRequestDefaultTypeInternal _WorkerHeartbeatRequest_default_instance_; +class WorkerHeartbeatResponse; +struct WorkerHeartbeatResponseDefaultTypeInternal; +extern WorkerHeartbeatResponseDefaultTypeInternal _WorkerHeartbeatResponse_default_instance_; +} // namespace tensorflow +PROTOBUF_NAMESPACE_OPEN +template<> ::tensorflow::Event* Arena::CreateMaybeMessage<::tensorflow::Event>(Arena*); +template<> ::tensorflow::LogMessage* Arena::CreateMaybeMessage<::tensorflow::LogMessage>(Arena*); +template<> ::tensorflow::RequestedExitCode* Arena::CreateMaybeMessage<::tensorflow::RequestedExitCode>(Arena*); +template<> ::tensorflow::SessionLog* Arena::CreateMaybeMessage<::tensorflow::SessionLog>(Arena*); +template<> ::tensorflow::SourceMetadata* Arena::CreateMaybeMessage<::tensorflow::SourceMetadata>(Arena*); +template<> ::tensorflow::TaggedRunMetadata* Arena::CreateMaybeMessage<::tensorflow::TaggedRunMetadata>(Arena*); +template<> ::tensorflow::WatchdogConfig* Arena::CreateMaybeMessage<::tensorflow::WatchdogConfig>(Arena*); +template<> ::tensorflow::WorkerHeartbeatRequest* Arena::CreateMaybeMessage<::tensorflow::WorkerHeartbeatRequest>(Arena*); +template<> ::tensorflow::WorkerHeartbeatResponse* Arena::CreateMaybeMessage<::tensorflow::WorkerHeartbeatResponse>(Arena*); +PROTOBUF_NAMESPACE_CLOSE +namespace tensorflow { + +enum LogMessage_Level : int { + LogMessage_Level_UNKNOWN = 0, + LogMessage_Level_DEBUGGING = 10, + LogMessage_Level_INFO = 20, + LogMessage_Level_WARN = 30, + LogMessage_Level_ERROR = 40, + LogMessage_Level_FATAL = 50, + LogMessage_Level_LogMessage_Level_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits::min(), + LogMessage_Level_LogMessage_Level_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits::max() +}; +bool LogMessage_Level_IsValid(int value); +constexpr LogMessage_Level LogMessage_Level_Level_MIN = LogMessage_Level_UNKNOWN; +constexpr LogMessage_Level LogMessage_Level_Level_MAX = LogMessage_Level_FATAL; +constexpr int LogMessage_Level_Level_ARRAYSIZE = LogMessage_Level_Level_MAX + 1; + +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* LogMessage_Level_descriptor(); +template +inline const std::string& LogMessage_Level_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function LogMessage_Level_Name."); + return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( + LogMessage_Level_descriptor(), enum_t_value); +} +inline bool LogMessage_Level_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, LogMessage_Level* value) { + return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( + LogMessage_Level_descriptor(), name, value); +} +enum SessionLog_SessionStatus : int { + SessionLog_SessionStatus_STATUS_UNSPECIFIED = 0, + SessionLog_SessionStatus_START = 1, + SessionLog_SessionStatus_STOP = 2, + SessionLog_SessionStatus_CHECKPOINT = 3, + SessionLog_SessionStatus_SessionLog_SessionStatus_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits::min(), + SessionLog_SessionStatus_SessionLog_SessionStatus_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits::max() +}; +bool SessionLog_SessionStatus_IsValid(int value); +constexpr SessionLog_SessionStatus SessionLog_SessionStatus_SessionStatus_MIN = SessionLog_SessionStatus_STATUS_UNSPECIFIED; +constexpr SessionLog_SessionStatus SessionLog_SessionStatus_SessionStatus_MAX = SessionLog_SessionStatus_CHECKPOINT; +constexpr int SessionLog_SessionStatus_SessionStatus_ARRAYSIZE = SessionLog_SessionStatus_SessionStatus_MAX + 1; + +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* SessionLog_SessionStatus_descriptor(); +template +inline const std::string& SessionLog_SessionStatus_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function SessionLog_SessionStatus_Name."); + return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( + SessionLog_SessionStatus_descriptor(), enum_t_value); +} +inline bool SessionLog_SessionStatus_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, SessionLog_SessionStatus* value) { + return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( + SessionLog_SessionStatus_descriptor(), name, value); +} +enum WorkerHealth : int { + OK = 0, + RECEIVED_SHUTDOWN_SIGNAL = 1, + INTERNAL_ERROR = 2, + SHUTTING_DOWN = 3, + WorkerHealth_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits::min(), + WorkerHealth_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits::max() +}; +bool WorkerHealth_IsValid(int value); +constexpr WorkerHealth WorkerHealth_MIN = OK; +constexpr WorkerHealth WorkerHealth_MAX = SHUTTING_DOWN; +constexpr int WorkerHealth_ARRAYSIZE = WorkerHealth_MAX + 1; + +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* WorkerHealth_descriptor(); +template +inline const std::string& WorkerHealth_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function WorkerHealth_Name."); + return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( + WorkerHealth_descriptor(), enum_t_value); +} +inline bool WorkerHealth_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, WorkerHealth* value) { + return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( + WorkerHealth_descriptor(), name, value); +} +enum WorkerShutdownMode : int { + DEFAULT = 0, + NOT_CONFIGURED = 1, + WAIT_FOR_COORDINATOR = 2, + SHUTDOWN_AFTER_TIMEOUT = 3, + WorkerShutdownMode_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits::min(), + WorkerShutdownMode_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits::max() +}; +bool WorkerShutdownMode_IsValid(int value); +constexpr WorkerShutdownMode WorkerShutdownMode_MIN = DEFAULT; +constexpr WorkerShutdownMode WorkerShutdownMode_MAX = SHUTDOWN_AFTER_TIMEOUT; +constexpr int WorkerShutdownMode_ARRAYSIZE = WorkerShutdownMode_MAX + 1; + +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* WorkerShutdownMode_descriptor(); +template +inline const std::string& WorkerShutdownMode_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function WorkerShutdownMode_Name."); + return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( + WorkerShutdownMode_descriptor(), enum_t_value); +} +inline bool WorkerShutdownMode_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, WorkerShutdownMode* value) { + return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( + WorkerShutdownMode_descriptor(), name, value); +} +// =================================================================== + +class Event final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.Event) */ { + public: + inline Event() : Event(nullptr) {} + ~Event() override; + explicit PROTOBUF_CONSTEXPR Event(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + Event(const Event& from); + Event(Event&& from) noexcept + : Event() { + *this = ::std::move(from); + } + + inline Event& operator=(const Event& from) { + CopyFrom(from); + return *this; + } + inline Event& operator=(Event&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const Event& default_instance() { + return *internal_default_instance(); + } + enum WhatCase { + kFileVersion = 3, + kGraphDef = 4, + kSummary = 5, + kLogMessage = 6, + kSessionLog = 7, + kTaggedRunMetadata = 8, + kMetaGraphDef = 9, + WHAT_NOT_SET = 0, + }; + + static inline const Event* internal_default_instance() { + return reinterpret_cast( + &_Event_default_instance_); + } + static constexpr int kIndexInFileMessages = + 0; + + friend void swap(Event& a, Event& b) { + a.Swap(&b); + } + inline void Swap(Event* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(Event* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + Event* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const Event& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const Event& from) { + Event::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(Event* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.Event"; + } + protected: + explicit Event(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kSourceMetadataFieldNumber = 10, + kWallTimeFieldNumber = 1, + kStepFieldNumber = 2, + kFileVersionFieldNumber = 3, + kGraphDefFieldNumber = 4, + kSummaryFieldNumber = 5, + kLogMessageFieldNumber = 6, + kSessionLogFieldNumber = 7, + kTaggedRunMetadataFieldNumber = 8, + kMetaGraphDefFieldNumber = 9, + }; + // .tensorflow.SourceMetadata source_metadata = 10; + bool has_source_metadata() const; + private: + bool _internal_has_source_metadata() const; + public: + void clear_source_metadata(); + const ::tensorflow::SourceMetadata& source_metadata() const; + PROTOBUF_NODISCARD ::tensorflow::SourceMetadata* release_source_metadata(); + ::tensorflow::SourceMetadata* mutable_source_metadata(); + void set_allocated_source_metadata(::tensorflow::SourceMetadata* source_metadata); + private: + const ::tensorflow::SourceMetadata& _internal_source_metadata() const; + ::tensorflow::SourceMetadata* _internal_mutable_source_metadata(); + public: + void unsafe_arena_set_allocated_source_metadata( + ::tensorflow::SourceMetadata* source_metadata); + ::tensorflow::SourceMetadata* unsafe_arena_release_source_metadata(); + + // double wall_time = 1; + void clear_wall_time(); + double wall_time() const; + void set_wall_time(double value); + private: + double _internal_wall_time() const; + void _internal_set_wall_time(double value); + public: + + // int64 step = 2; + void clear_step(); + int64_t step() const; + void set_step(int64_t value); + private: + int64_t _internal_step() const; + void _internal_set_step(int64_t value); + public: + + // string file_version = 3; + bool has_file_version() const; + private: + bool _internal_has_file_version() const; + public: + void clear_file_version(); + const std::string& file_version() const; + template + void set_file_version(ArgT0&& arg0, ArgT... args); + std::string* mutable_file_version(); + PROTOBUF_NODISCARD std::string* release_file_version(); + void set_allocated_file_version(std::string* file_version); + private: + const std::string& _internal_file_version() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_file_version(const std::string& value); + std::string* _internal_mutable_file_version(); + public: + + // bytes graph_def = 4; + bool has_graph_def() const; + private: + bool _internal_has_graph_def() const; + public: + void clear_graph_def(); + const std::string& graph_def() const; + template + void set_graph_def(ArgT0&& arg0, ArgT... args); + std::string* mutable_graph_def(); + PROTOBUF_NODISCARD std::string* release_graph_def(); + void set_allocated_graph_def(std::string* graph_def); + private: + const std::string& _internal_graph_def() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_graph_def(const std::string& value); + std::string* _internal_mutable_graph_def(); + public: + + // .tensorflow.Summary summary = 5; + bool has_summary() const; + private: + bool _internal_has_summary() const; + public: + void clear_summary(); + const ::tensorflow::Summary& summary() const; + PROTOBUF_NODISCARD ::tensorflow::Summary* release_summary(); + ::tensorflow::Summary* mutable_summary(); + void set_allocated_summary(::tensorflow::Summary* summary); + private: + const ::tensorflow::Summary& _internal_summary() const; + ::tensorflow::Summary* _internal_mutable_summary(); + public: + void unsafe_arena_set_allocated_summary( + ::tensorflow::Summary* summary); + ::tensorflow::Summary* unsafe_arena_release_summary(); + + // .tensorflow.LogMessage log_message = 6 [deprecated = true]; + PROTOBUF_DEPRECATED bool has_log_message() const; + private: + bool _internal_has_log_message() const; + public: + PROTOBUF_DEPRECATED void clear_log_message(); + PROTOBUF_DEPRECATED const ::tensorflow::LogMessage& log_message() const; + PROTOBUF_NODISCARD PROTOBUF_DEPRECATED ::tensorflow::LogMessage* release_log_message(); + PROTOBUF_DEPRECATED ::tensorflow::LogMessage* mutable_log_message(); + PROTOBUF_DEPRECATED void set_allocated_log_message(::tensorflow::LogMessage* log_message); + private: + const ::tensorflow::LogMessage& _internal_log_message() const; + ::tensorflow::LogMessage* _internal_mutable_log_message(); + public: + PROTOBUF_DEPRECATED void unsafe_arena_set_allocated_log_message( + ::tensorflow::LogMessage* log_message); + PROTOBUF_DEPRECATED ::tensorflow::LogMessage* unsafe_arena_release_log_message(); + + // .tensorflow.SessionLog session_log = 7; + bool has_session_log() const; + private: + bool _internal_has_session_log() const; + public: + void clear_session_log(); + const ::tensorflow::SessionLog& session_log() const; + PROTOBUF_NODISCARD ::tensorflow::SessionLog* release_session_log(); + ::tensorflow::SessionLog* mutable_session_log(); + void set_allocated_session_log(::tensorflow::SessionLog* session_log); + private: + const ::tensorflow::SessionLog& _internal_session_log() const; + ::tensorflow::SessionLog* _internal_mutable_session_log(); + public: + void unsafe_arena_set_allocated_session_log( + ::tensorflow::SessionLog* session_log); + ::tensorflow::SessionLog* unsafe_arena_release_session_log(); + + // .tensorflow.TaggedRunMetadata tagged_run_metadata = 8; + bool has_tagged_run_metadata() const; + private: + bool _internal_has_tagged_run_metadata() const; + public: + void clear_tagged_run_metadata(); + const ::tensorflow::TaggedRunMetadata& tagged_run_metadata() const; + PROTOBUF_NODISCARD ::tensorflow::TaggedRunMetadata* release_tagged_run_metadata(); + ::tensorflow::TaggedRunMetadata* mutable_tagged_run_metadata(); + void set_allocated_tagged_run_metadata(::tensorflow::TaggedRunMetadata* tagged_run_metadata); + private: + const ::tensorflow::TaggedRunMetadata& _internal_tagged_run_metadata() const; + ::tensorflow::TaggedRunMetadata* _internal_mutable_tagged_run_metadata(); + public: + void unsafe_arena_set_allocated_tagged_run_metadata( + ::tensorflow::TaggedRunMetadata* tagged_run_metadata); + ::tensorflow::TaggedRunMetadata* unsafe_arena_release_tagged_run_metadata(); + + // bytes meta_graph_def = 9; + bool has_meta_graph_def() const; + private: + bool _internal_has_meta_graph_def() const; + public: + void clear_meta_graph_def(); + const std::string& meta_graph_def() const; + template + void set_meta_graph_def(ArgT0&& arg0, ArgT... args); + std::string* mutable_meta_graph_def(); + PROTOBUF_NODISCARD std::string* release_meta_graph_def(); + void set_allocated_meta_graph_def(std::string* meta_graph_def); + private: + const std::string& _internal_meta_graph_def() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_meta_graph_def(const std::string& value); + std::string* _internal_mutable_meta_graph_def(); + public: + + void clear_what(); + WhatCase what_case() const; + // @@protoc_insertion_point(class_scope:tensorflow.Event) + private: + class _Internal; + void set_has_file_version(); + void set_has_graph_def(); + void set_has_summary(); + void set_has_log_message(); + void set_has_session_log(); + void set_has_tagged_run_metadata(); + void set_has_meta_graph_def(); + + inline bool has_what() const; + inline void clear_has_what(); + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::tensorflow::SourceMetadata* source_metadata_; + double wall_time_; + int64_t step_; + union WhatUnion { + constexpr WhatUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr file_version_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr graph_def_; + ::tensorflow::Summary* summary_; + ::tensorflow::LogMessage* log_message_; + ::tensorflow::SessionLog* session_log_; + ::tensorflow::TaggedRunMetadata* tagged_run_metadata_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr meta_graph_def_; + } what_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + uint32_t _oneof_case_[1]; + + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2futil_2fevent_2eproto; +}; +// ------------------------------------------------------------------- + +class SourceMetadata final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.SourceMetadata) */ { + public: + inline SourceMetadata() : SourceMetadata(nullptr) {} + ~SourceMetadata() override; + explicit PROTOBUF_CONSTEXPR SourceMetadata(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + SourceMetadata(const SourceMetadata& from); + SourceMetadata(SourceMetadata&& from) noexcept + : SourceMetadata() { + *this = ::std::move(from); + } + + inline SourceMetadata& operator=(const SourceMetadata& from) { + CopyFrom(from); + return *this; + } + inline SourceMetadata& operator=(SourceMetadata&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const SourceMetadata& default_instance() { + return *internal_default_instance(); + } + static inline const SourceMetadata* internal_default_instance() { + return reinterpret_cast( + &_SourceMetadata_default_instance_); + } + static constexpr int kIndexInFileMessages = + 1; + + friend void swap(SourceMetadata& a, SourceMetadata& b) { + a.Swap(&b); + } + inline void Swap(SourceMetadata* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(SourceMetadata* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + SourceMetadata* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const SourceMetadata& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const SourceMetadata& from) { + SourceMetadata::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(SourceMetadata* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.SourceMetadata"; + } + protected: + explicit SourceMetadata(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kWriterFieldNumber = 1, + }; + // string writer = 1; + void clear_writer(); + const std::string& writer() const; + template + void set_writer(ArgT0&& arg0, ArgT... args); + std::string* mutable_writer(); + PROTOBUF_NODISCARD std::string* release_writer(); + void set_allocated_writer(std::string* writer); + private: + const std::string& _internal_writer() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_writer(const std::string& value); + std::string* _internal_mutable_writer(); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.SourceMetadata) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr writer_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2futil_2fevent_2eproto; +}; +// ------------------------------------------------------------------- + +class LogMessage final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.LogMessage) */ { + public: + inline LogMessage() : LogMessage(nullptr) {} + ~LogMessage() override; + explicit PROTOBUF_CONSTEXPR LogMessage(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + LogMessage(const LogMessage& from); + LogMessage(LogMessage&& from) noexcept + : LogMessage() { + *this = ::std::move(from); + } + + inline LogMessage& operator=(const LogMessage& from) { + CopyFrom(from); + return *this; + } + inline LogMessage& operator=(LogMessage&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const LogMessage& default_instance() { + return *internal_default_instance(); + } + static inline const LogMessage* internal_default_instance() { + return reinterpret_cast( + &_LogMessage_default_instance_); + } + static constexpr int kIndexInFileMessages = + 2; + + friend void swap(LogMessage& a, LogMessage& b) { + a.Swap(&b); + } + inline void Swap(LogMessage* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(LogMessage* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + LogMessage* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const LogMessage& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const LogMessage& from) { + LogMessage::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(LogMessage* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.LogMessage"; + } + protected: + explicit LogMessage(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + typedef LogMessage_Level Level; + static constexpr Level UNKNOWN = + LogMessage_Level_UNKNOWN; + static constexpr Level DEBUGGING = + LogMessage_Level_DEBUGGING; + static constexpr Level INFO = + LogMessage_Level_INFO; + static constexpr Level WARN = + LogMessage_Level_WARN; + static constexpr Level ERROR = + LogMessage_Level_ERROR; + static constexpr Level FATAL = + LogMessage_Level_FATAL; + static inline bool Level_IsValid(int value) { + return LogMessage_Level_IsValid(value); + } + static constexpr Level Level_MIN = + LogMessage_Level_Level_MIN; + static constexpr Level Level_MAX = + LogMessage_Level_Level_MAX; + static constexpr int Level_ARRAYSIZE = + LogMessage_Level_Level_ARRAYSIZE; + static inline const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* + Level_descriptor() { + return LogMessage_Level_descriptor(); + } + template + static inline const std::string& Level_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function Level_Name."); + return LogMessage_Level_Name(enum_t_value); + } + static inline bool Level_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name, + Level* value) { + return LogMessage_Level_Parse(name, value); + } + + // accessors ------------------------------------------------------- + + enum : int { + kMessageFieldNumber = 2, + kLevelFieldNumber = 1, + }; + // string message = 2; + void clear_message(); + const std::string& message() const; + template + void set_message(ArgT0&& arg0, ArgT... args); + std::string* mutable_message(); + PROTOBUF_NODISCARD std::string* release_message(); + void set_allocated_message(std::string* message); + private: + const std::string& _internal_message() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_message(const std::string& value); + std::string* _internal_mutable_message(); + public: + + // .tensorflow.LogMessage.Level level = 1; + void clear_level(); + ::tensorflow::LogMessage_Level level() const; + void set_level(::tensorflow::LogMessage_Level value); + private: + ::tensorflow::LogMessage_Level _internal_level() const; + void _internal_set_level(::tensorflow::LogMessage_Level value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.LogMessage) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr message_; + int level_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2futil_2fevent_2eproto; +}; +// ------------------------------------------------------------------- + +class SessionLog final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.SessionLog) */ { + public: + inline SessionLog() : SessionLog(nullptr) {} + ~SessionLog() override; + explicit PROTOBUF_CONSTEXPR SessionLog(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + SessionLog(const SessionLog& from); + SessionLog(SessionLog&& from) noexcept + : SessionLog() { + *this = ::std::move(from); + } + + inline SessionLog& operator=(const SessionLog& from) { + CopyFrom(from); + return *this; + } + inline SessionLog& operator=(SessionLog&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const SessionLog& default_instance() { + return *internal_default_instance(); + } + static inline const SessionLog* internal_default_instance() { + return reinterpret_cast( + &_SessionLog_default_instance_); + } + static constexpr int kIndexInFileMessages = + 3; + + friend void swap(SessionLog& a, SessionLog& b) { + a.Swap(&b); + } + inline void Swap(SessionLog* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(SessionLog* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + SessionLog* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const SessionLog& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const SessionLog& from) { + SessionLog::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(SessionLog* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.SessionLog"; + } + protected: + explicit SessionLog(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + typedef SessionLog_SessionStatus SessionStatus; + static constexpr SessionStatus STATUS_UNSPECIFIED = + SessionLog_SessionStatus_STATUS_UNSPECIFIED; + static constexpr SessionStatus START = + SessionLog_SessionStatus_START; + static constexpr SessionStatus STOP = + SessionLog_SessionStatus_STOP; + static constexpr SessionStatus CHECKPOINT = + SessionLog_SessionStatus_CHECKPOINT; + static inline bool SessionStatus_IsValid(int value) { + return SessionLog_SessionStatus_IsValid(value); + } + static constexpr SessionStatus SessionStatus_MIN = + SessionLog_SessionStatus_SessionStatus_MIN; + static constexpr SessionStatus SessionStatus_MAX = + SessionLog_SessionStatus_SessionStatus_MAX; + static constexpr int SessionStatus_ARRAYSIZE = + SessionLog_SessionStatus_SessionStatus_ARRAYSIZE; + static inline const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* + SessionStatus_descriptor() { + return SessionLog_SessionStatus_descriptor(); + } + template + static inline const std::string& SessionStatus_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function SessionStatus_Name."); + return SessionLog_SessionStatus_Name(enum_t_value); + } + static inline bool SessionStatus_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name, + SessionStatus* value) { + return SessionLog_SessionStatus_Parse(name, value); + } + + // accessors ------------------------------------------------------- + + enum : int { + kCheckpointPathFieldNumber = 2, + kMsgFieldNumber = 3, + kStatusFieldNumber = 1, + }; + // string checkpoint_path = 2; + void clear_checkpoint_path(); + const std::string& checkpoint_path() const; + template + void set_checkpoint_path(ArgT0&& arg0, ArgT... args); + std::string* mutable_checkpoint_path(); + PROTOBUF_NODISCARD std::string* release_checkpoint_path(); + void set_allocated_checkpoint_path(std::string* checkpoint_path); + private: + const std::string& _internal_checkpoint_path() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_checkpoint_path(const std::string& value); + std::string* _internal_mutable_checkpoint_path(); + public: + + // string msg = 3; + void clear_msg(); + const std::string& msg() const; + template + void set_msg(ArgT0&& arg0, ArgT... args); + std::string* mutable_msg(); + PROTOBUF_NODISCARD std::string* release_msg(); + void set_allocated_msg(std::string* msg); + private: + const std::string& _internal_msg() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_msg(const std::string& value); + std::string* _internal_mutable_msg(); + public: + + // .tensorflow.SessionLog.SessionStatus status = 1; + void clear_status(); + ::tensorflow::SessionLog_SessionStatus status() const; + void set_status(::tensorflow::SessionLog_SessionStatus value); + private: + ::tensorflow::SessionLog_SessionStatus _internal_status() const; + void _internal_set_status(::tensorflow::SessionLog_SessionStatus value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.SessionLog) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr checkpoint_path_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr msg_; + int status_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2futil_2fevent_2eproto; +}; +// ------------------------------------------------------------------- + +class TaggedRunMetadata final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.TaggedRunMetadata) */ { + public: + inline TaggedRunMetadata() : TaggedRunMetadata(nullptr) {} + ~TaggedRunMetadata() override; + explicit PROTOBUF_CONSTEXPR TaggedRunMetadata(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + TaggedRunMetadata(const TaggedRunMetadata& from); + TaggedRunMetadata(TaggedRunMetadata&& from) noexcept + : TaggedRunMetadata() { + *this = ::std::move(from); + } + + inline TaggedRunMetadata& operator=(const TaggedRunMetadata& from) { + CopyFrom(from); + return *this; + } + inline TaggedRunMetadata& operator=(TaggedRunMetadata&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const TaggedRunMetadata& default_instance() { + return *internal_default_instance(); + } + static inline const TaggedRunMetadata* internal_default_instance() { + return reinterpret_cast( + &_TaggedRunMetadata_default_instance_); + } + static constexpr int kIndexInFileMessages = + 4; + + friend void swap(TaggedRunMetadata& a, TaggedRunMetadata& b) { + a.Swap(&b); + } + inline void Swap(TaggedRunMetadata* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(TaggedRunMetadata* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + TaggedRunMetadata* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const TaggedRunMetadata& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const TaggedRunMetadata& from) { + TaggedRunMetadata::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(TaggedRunMetadata* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.TaggedRunMetadata"; + } + protected: + explicit TaggedRunMetadata(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kTagFieldNumber = 1, + kRunMetadataFieldNumber = 2, + }; + // string tag = 1; + void clear_tag(); + const std::string& tag() const; + template + void set_tag(ArgT0&& arg0, ArgT... args); + std::string* mutable_tag(); + PROTOBUF_NODISCARD std::string* release_tag(); + void set_allocated_tag(std::string* tag); + private: + const std::string& _internal_tag() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_tag(const std::string& value); + std::string* _internal_mutable_tag(); + public: + + // bytes run_metadata = 2; + void clear_run_metadata(); + const std::string& run_metadata() const; + template + void set_run_metadata(ArgT0&& arg0, ArgT... args); + std::string* mutable_run_metadata(); + PROTOBUF_NODISCARD std::string* release_run_metadata(); + void set_allocated_run_metadata(std::string* run_metadata); + private: + const std::string& _internal_run_metadata() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_run_metadata(const std::string& value); + std::string* _internal_mutable_run_metadata(); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.TaggedRunMetadata) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr tag_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr run_metadata_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2futil_2fevent_2eproto; +}; +// ------------------------------------------------------------------- + +class WatchdogConfig final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.WatchdogConfig) */ { + public: + inline WatchdogConfig() : WatchdogConfig(nullptr) {} + ~WatchdogConfig() override; + explicit PROTOBUF_CONSTEXPR WatchdogConfig(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + WatchdogConfig(const WatchdogConfig& from); + WatchdogConfig(WatchdogConfig&& from) noexcept + : WatchdogConfig() { + *this = ::std::move(from); + } + + inline WatchdogConfig& operator=(const WatchdogConfig& from) { + CopyFrom(from); + return *this; + } + inline WatchdogConfig& operator=(WatchdogConfig&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const WatchdogConfig& default_instance() { + return *internal_default_instance(); + } + static inline const WatchdogConfig* internal_default_instance() { + return reinterpret_cast( + &_WatchdogConfig_default_instance_); + } + static constexpr int kIndexInFileMessages = + 5; + + friend void swap(WatchdogConfig& a, WatchdogConfig& b) { + a.Swap(&b); + } + inline void Swap(WatchdogConfig* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(WatchdogConfig* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + WatchdogConfig* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const WatchdogConfig& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const WatchdogConfig& from) { + WatchdogConfig::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(WatchdogConfig* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.WatchdogConfig"; + } + protected: + explicit WatchdogConfig(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kTimeoutMsFieldNumber = 1, + }; + // int64 timeout_ms = 1; + void clear_timeout_ms(); + int64_t timeout_ms() const; + void set_timeout_ms(int64_t value); + private: + int64_t _internal_timeout_ms() const; + void _internal_set_timeout_ms(int64_t value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.WatchdogConfig) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + int64_t timeout_ms_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2futil_2fevent_2eproto; +}; +// ------------------------------------------------------------------- + +class RequestedExitCode final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.RequestedExitCode) */ { + public: + inline RequestedExitCode() : RequestedExitCode(nullptr) {} + ~RequestedExitCode() override; + explicit PROTOBUF_CONSTEXPR RequestedExitCode(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + RequestedExitCode(const RequestedExitCode& from); + RequestedExitCode(RequestedExitCode&& from) noexcept + : RequestedExitCode() { + *this = ::std::move(from); + } + + inline RequestedExitCode& operator=(const RequestedExitCode& from) { + CopyFrom(from); + return *this; + } + inline RequestedExitCode& operator=(RequestedExitCode&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const RequestedExitCode& default_instance() { + return *internal_default_instance(); + } + static inline const RequestedExitCode* internal_default_instance() { + return reinterpret_cast( + &_RequestedExitCode_default_instance_); + } + static constexpr int kIndexInFileMessages = + 6; + + friend void swap(RequestedExitCode& a, RequestedExitCode& b) { + a.Swap(&b); + } + inline void Swap(RequestedExitCode* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(RequestedExitCode* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + RequestedExitCode* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const RequestedExitCode& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const RequestedExitCode& from) { + RequestedExitCode::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(RequestedExitCode* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.RequestedExitCode"; + } + protected: + explicit RequestedExitCode(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kExitCodeFieldNumber = 1, + }; + // int32 exit_code = 1; + void clear_exit_code(); + int32_t exit_code() const; + void set_exit_code(int32_t value); + private: + int32_t _internal_exit_code() const; + void _internal_set_exit_code(int32_t value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.RequestedExitCode) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + int32_t exit_code_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2futil_2fevent_2eproto; +}; +// ------------------------------------------------------------------- + +class WorkerHeartbeatRequest final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.WorkerHeartbeatRequest) */ { + public: + inline WorkerHeartbeatRequest() : WorkerHeartbeatRequest(nullptr) {} + ~WorkerHeartbeatRequest() override; + explicit PROTOBUF_CONSTEXPR WorkerHeartbeatRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + WorkerHeartbeatRequest(const WorkerHeartbeatRequest& from); + WorkerHeartbeatRequest(WorkerHeartbeatRequest&& from) noexcept + : WorkerHeartbeatRequest() { + *this = ::std::move(from); + } + + inline WorkerHeartbeatRequest& operator=(const WorkerHeartbeatRequest& from) { + CopyFrom(from); + return *this; + } + inline WorkerHeartbeatRequest& operator=(WorkerHeartbeatRequest&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const WorkerHeartbeatRequest& default_instance() { + return *internal_default_instance(); + } + static inline const WorkerHeartbeatRequest* internal_default_instance() { + return reinterpret_cast( + &_WorkerHeartbeatRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 7; + + friend void swap(WorkerHeartbeatRequest& a, WorkerHeartbeatRequest& b) { + a.Swap(&b); + } + inline void Swap(WorkerHeartbeatRequest* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(WorkerHeartbeatRequest* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + WorkerHeartbeatRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const WorkerHeartbeatRequest& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const WorkerHeartbeatRequest& from) { + WorkerHeartbeatRequest::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(WorkerHeartbeatRequest* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.WorkerHeartbeatRequest"; + } + protected: + explicit WorkerHeartbeatRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kWatchdogConfigFieldNumber = 2, + kExitCodeFieldNumber = 3, + kShutdownModeFieldNumber = 1, + }; + // .tensorflow.WatchdogConfig watchdog_config = 2; + bool has_watchdog_config() const; + private: + bool _internal_has_watchdog_config() const; + public: + void clear_watchdog_config(); + const ::tensorflow::WatchdogConfig& watchdog_config() const; + PROTOBUF_NODISCARD ::tensorflow::WatchdogConfig* release_watchdog_config(); + ::tensorflow::WatchdogConfig* mutable_watchdog_config(); + void set_allocated_watchdog_config(::tensorflow::WatchdogConfig* watchdog_config); + private: + const ::tensorflow::WatchdogConfig& _internal_watchdog_config() const; + ::tensorflow::WatchdogConfig* _internal_mutable_watchdog_config(); + public: + void unsafe_arena_set_allocated_watchdog_config( + ::tensorflow::WatchdogConfig* watchdog_config); + ::tensorflow::WatchdogConfig* unsafe_arena_release_watchdog_config(); + + // .tensorflow.RequestedExitCode exit_code = 3; + bool has_exit_code() const; + private: + bool _internal_has_exit_code() const; + public: + void clear_exit_code(); + const ::tensorflow::RequestedExitCode& exit_code() const; + PROTOBUF_NODISCARD ::tensorflow::RequestedExitCode* release_exit_code(); + ::tensorflow::RequestedExitCode* mutable_exit_code(); + void set_allocated_exit_code(::tensorflow::RequestedExitCode* exit_code); + private: + const ::tensorflow::RequestedExitCode& _internal_exit_code() const; + ::tensorflow::RequestedExitCode* _internal_mutable_exit_code(); + public: + void unsafe_arena_set_allocated_exit_code( + ::tensorflow::RequestedExitCode* exit_code); + ::tensorflow::RequestedExitCode* unsafe_arena_release_exit_code(); + + // .tensorflow.WorkerShutdownMode shutdown_mode = 1; + void clear_shutdown_mode(); + ::tensorflow::WorkerShutdownMode shutdown_mode() const; + void set_shutdown_mode(::tensorflow::WorkerShutdownMode value); + private: + ::tensorflow::WorkerShutdownMode _internal_shutdown_mode() const; + void _internal_set_shutdown_mode(::tensorflow::WorkerShutdownMode value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.WorkerHeartbeatRequest) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::tensorflow::WatchdogConfig* watchdog_config_; + ::tensorflow::RequestedExitCode* exit_code_; + int shutdown_mode_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2futil_2fevent_2eproto; +}; +// ------------------------------------------------------------------- + +class WorkerHeartbeatResponse final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.WorkerHeartbeatResponse) */ { + public: + inline WorkerHeartbeatResponse() : WorkerHeartbeatResponse(nullptr) {} + ~WorkerHeartbeatResponse() override; + explicit PROTOBUF_CONSTEXPR WorkerHeartbeatResponse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + WorkerHeartbeatResponse(const WorkerHeartbeatResponse& from); + WorkerHeartbeatResponse(WorkerHeartbeatResponse&& from) noexcept + : WorkerHeartbeatResponse() { + *this = ::std::move(from); + } + + inline WorkerHeartbeatResponse& operator=(const WorkerHeartbeatResponse& from) { + CopyFrom(from); + return *this; + } + inline WorkerHeartbeatResponse& operator=(WorkerHeartbeatResponse&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const WorkerHeartbeatResponse& default_instance() { + return *internal_default_instance(); + } + static inline const WorkerHeartbeatResponse* internal_default_instance() { + return reinterpret_cast( + &_WorkerHeartbeatResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = + 8; + + friend void swap(WorkerHeartbeatResponse& a, WorkerHeartbeatResponse& b) { + a.Swap(&b); + } + inline void Swap(WorkerHeartbeatResponse* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(WorkerHeartbeatResponse* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + WorkerHeartbeatResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const WorkerHeartbeatResponse& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const WorkerHeartbeatResponse& from) { + WorkerHeartbeatResponse::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(WorkerHeartbeatResponse* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.WorkerHeartbeatResponse"; + } + protected: + explicit WorkerHeartbeatResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kWorkerLogFieldNumber = 2, + kHostnameFieldNumber = 3, + kHealthStatusFieldNumber = 1, + }; + // repeated .tensorflow.Event worker_log = 2; + int worker_log_size() const; + private: + int _internal_worker_log_size() const; + public: + void clear_worker_log(); + ::tensorflow::Event* mutable_worker_log(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::Event >* + mutable_worker_log(); + private: + const ::tensorflow::Event& _internal_worker_log(int index) const; + ::tensorflow::Event* _internal_add_worker_log(); + public: + const ::tensorflow::Event& worker_log(int index) const; + ::tensorflow::Event* add_worker_log(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::Event >& + worker_log() const; + + // string hostname = 3; + void clear_hostname(); + const std::string& hostname() const; + template + void set_hostname(ArgT0&& arg0, ArgT... args); + std::string* mutable_hostname(); + PROTOBUF_NODISCARD std::string* release_hostname(); + void set_allocated_hostname(std::string* hostname); + private: + const std::string& _internal_hostname() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_hostname(const std::string& value); + std::string* _internal_mutable_hostname(); + public: + + // .tensorflow.WorkerHealth health_status = 1; + void clear_health_status(); + ::tensorflow::WorkerHealth health_status() const; + void set_health_status(::tensorflow::WorkerHealth value); + private: + ::tensorflow::WorkerHealth _internal_health_status() const; + void _internal_set_health_status(::tensorflow::WorkerHealth value); + public: + + // @@protoc_insertion_point(class_scope:tensorflow.WorkerHeartbeatResponse) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::Event > worker_log_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr hostname_; + int health_status_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_tensorflow_2fcore_2futil_2fevent_2eproto; +}; +// =================================================================== + + +// =================================================================== + +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// Event + +// double wall_time = 1; +inline void Event::clear_wall_time() { + _impl_.wall_time_ = 0; +} +inline double Event::_internal_wall_time() const { + return _impl_.wall_time_; +} +inline double Event::wall_time() const { + // @@protoc_insertion_point(field_get:tensorflow.Event.wall_time) + return _internal_wall_time(); +} +inline void Event::_internal_set_wall_time(double value) { + + _impl_.wall_time_ = value; +} +inline void Event::set_wall_time(double value) { + _internal_set_wall_time(value); + // @@protoc_insertion_point(field_set:tensorflow.Event.wall_time) +} + +// int64 step = 2; +inline void Event::clear_step() { + _impl_.step_ = int64_t{0}; +} +inline int64_t Event::_internal_step() const { + return _impl_.step_; +} +inline int64_t Event::step() const { + // @@protoc_insertion_point(field_get:tensorflow.Event.step) + return _internal_step(); +} +inline void Event::_internal_set_step(int64_t value) { + + _impl_.step_ = value; +} +inline void Event::set_step(int64_t value) { + _internal_set_step(value); + // @@protoc_insertion_point(field_set:tensorflow.Event.step) +} + +// string file_version = 3; +inline bool Event::_internal_has_file_version() const { + return what_case() == kFileVersion; +} +inline bool Event::has_file_version() const { + return _internal_has_file_version(); +} +inline void Event::set_has_file_version() { + _impl_._oneof_case_[0] = kFileVersion; +} +inline void Event::clear_file_version() { + if (_internal_has_file_version()) { + _impl_.what_.file_version_.Destroy(); + clear_has_what(); + } +} +inline const std::string& Event::file_version() const { + // @@protoc_insertion_point(field_get:tensorflow.Event.file_version) + return _internal_file_version(); +} +template +inline void Event::set_file_version(ArgT0&& arg0, ArgT... args) { + if (!_internal_has_file_version()) { + clear_what(); + set_has_file_version(); + _impl_.what_.file_version_.InitDefault(); + } + _impl_.what_.file_version_.Set( static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.Event.file_version) +} +inline std::string* Event::mutable_file_version() { + std::string* _s = _internal_mutable_file_version(); + // @@protoc_insertion_point(field_mutable:tensorflow.Event.file_version) + return _s; +} +inline const std::string& Event::_internal_file_version() const { + if (_internal_has_file_version()) { + return _impl_.what_.file_version_.Get(); + } + return ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(); +} +inline void Event::_internal_set_file_version(const std::string& value) { + if (!_internal_has_file_version()) { + clear_what(); + set_has_file_version(); + _impl_.what_.file_version_.InitDefault(); + } + _impl_.what_.file_version_.Set(value, GetArenaForAllocation()); +} +inline std::string* Event::_internal_mutable_file_version() { + if (!_internal_has_file_version()) { + clear_what(); + set_has_file_version(); + _impl_.what_.file_version_.InitDefault(); + } + return _impl_.what_.file_version_.Mutable( GetArenaForAllocation()); +} +inline std::string* Event::release_file_version() { + // @@protoc_insertion_point(field_release:tensorflow.Event.file_version) + if (_internal_has_file_version()) { + clear_has_what(); + return _impl_.what_.file_version_.Release(); + } else { + return nullptr; + } +} +inline void Event::set_allocated_file_version(std::string* file_version) { + if (has_what()) { + clear_what(); + } + if (file_version != nullptr) { + set_has_file_version(); + _impl_.what_.file_version_.InitAllocated(file_version, GetArenaForAllocation()); + } + // @@protoc_insertion_point(field_set_allocated:tensorflow.Event.file_version) +} + +// bytes graph_def = 4; +inline bool Event::_internal_has_graph_def() const { + return what_case() == kGraphDef; +} +inline bool Event::has_graph_def() const { + return _internal_has_graph_def(); +} +inline void Event::set_has_graph_def() { + _impl_._oneof_case_[0] = kGraphDef; +} +inline void Event::clear_graph_def() { + if (_internal_has_graph_def()) { + _impl_.what_.graph_def_.Destroy(); + clear_has_what(); + } +} +inline const std::string& Event::graph_def() const { + // @@protoc_insertion_point(field_get:tensorflow.Event.graph_def) + return _internal_graph_def(); +} +template +inline void Event::set_graph_def(ArgT0&& arg0, ArgT... args) { + if (!_internal_has_graph_def()) { + clear_what(); + set_has_graph_def(); + _impl_.what_.graph_def_.InitDefault(); + } + _impl_.what_.graph_def_.SetBytes( static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.Event.graph_def) +} +inline std::string* Event::mutable_graph_def() { + std::string* _s = _internal_mutable_graph_def(); + // @@protoc_insertion_point(field_mutable:tensorflow.Event.graph_def) + return _s; +} +inline const std::string& Event::_internal_graph_def() const { + if (_internal_has_graph_def()) { + return _impl_.what_.graph_def_.Get(); + } + return ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(); +} +inline void Event::_internal_set_graph_def(const std::string& value) { + if (!_internal_has_graph_def()) { + clear_what(); + set_has_graph_def(); + _impl_.what_.graph_def_.InitDefault(); + } + _impl_.what_.graph_def_.Set(value, GetArenaForAllocation()); +} +inline std::string* Event::_internal_mutable_graph_def() { + if (!_internal_has_graph_def()) { + clear_what(); + set_has_graph_def(); + _impl_.what_.graph_def_.InitDefault(); + } + return _impl_.what_.graph_def_.Mutable( GetArenaForAllocation()); +} +inline std::string* Event::release_graph_def() { + // @@protoc_insertion_point(field_release:tensorflow.Event.graph_def) + if (_internal_has_graph_def()) { + clear_has_what(); + return _impl_.what_.graph_def_.Release(); + } else { + return nullptr; + } +} +inline void Event::set_allocated_graph_def(std::string* graph_def) { + if (has_what()) { + clear_what(); + } + if (graph_def != nullptr) { + set_has_graph_def(); + _impl_.what_.graph_def_.InitAllocated(graph_def, GetArenaForAllocation()); + } + // @@protoc_insertion_point(field_set_allocated:tensorflow.Event.graph_def) +} + +// .tensorflow.Summary summary = 5; +inline bool Event::_internal_has_summary() const { + return what_case() == kSummary; +} +inline bool Event::has_summary() const { + return _internal_has_summary(); +} +inline void Event::set_has_summary() { + _impl_._oneof_case_[0] = kSummary; +} +inline ::tensorflow::Summary* Event::release_summary() { + // @@protoc_insertion_point(field_release:tensorflow.Event.summary) + if (_internal_has_summary()) { + clear_has_what(); + ::tensorflow::Summary* temp = _impl_.what_.summary_; + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + _impl_.what_.summary_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::tensorflow::Summary& Event::_internal_summary() const { + return _internal_has_summary() + ? *_impl_.what_.summary_ + : reinterpret_cast< ::tensorflow::Summary&>(::tensorflow::_Summary_default_instance_); +} +inline const ::tensorflow::Summary& Event::summary() const { + // @@protoc_insertion_point(field_get:tensorflow.Event.summary) + return _internal_summary(); +} +inline ::tensorflow::Summary* Event::unsafe_arena_release_summary() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.Event.summary) + if (_internal_has_summary()) { + clear_has_what(); + ::tensorflow::Summary* temp = _impl_.what_.summary_; + _impl_.what_.summary_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void Event::unsafe_arena_set_allocated_summary(::tensorflow::Summary* summary) { + clear_what(); + if (summary) { + set_has_summary(); + _impl_.what_.summary_ = summary; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.Event.summary) +} +inline ::tensorflow::Summary* Event::_internal_mutable_summary() { + if (!_internal_has_summary()) { + clear_what(); + set_has_summary(); + _impl_.what_.summary_ = CreateMaybeMessage< ::tensorflow::Summary >(GetArenaForAllocation()); + } + return _impl_.what_.summary_; +} +inline ::tensorflow::Summary* Event::mutable_summary() { + ::tensorflow::Summary* _msg = _internal_mutable_summary(); + // @@protoc_insertion_point(field_mutable:tensorflow.Event.summary) + return _msg; +} + +// .tensorflow.LogMessage log_message = 6 [deprecated = true]; +inline bool Event::_internal_has_log_message() const { + return what_case() == kLogMessage; +} +inline bool Event::has_log_message() const { + return _internal_has_log_message(); +} +inline void Event::set_has_log_message() { + _impl_._oneof_case_[0] = kLogMessage; +} +inline void Event::clear_log_message() { + if (_internal_has_log_message()) { + if (GetArenaForAllocation() == nullptr) { + delete _impl_.what_.log_message_; + } + clear_has_what(); + } +} +inline ::tensorflow::LogMessage* Event::release_log_message() { + // @@protoc_insertion_point(field_release:tensorflow.Event.log_message) + if (_internal_has_log_message()) { + clear_has_what(); + ::tensorflow::LogMessage* temp = _impl_.what_.log_message_; + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + _impl_.what_.log_message_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::tensorflow::LogMessage& Event::_internal_log_message() const { + return _internal_has_log_message() + ? *_impl_.what_.log_message_ + : reinterpret_cast< ::tensorflow::LogMessage&>(::tensorflow::_LogMessage_default_instance_); +} +inline const ::tensorflow::LogMessage& Event::log_message() const { + // @@protoc_insertion_point(field_get:tensorflow.Event.log_message) + return _internal_log_message(); +} +inline ::tensorflow::LogMessage* Event::unsafe_arena_release_log_message() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.Event.log_message) + if (_internal_has_log_message()) { + clear_has_what(); + ::tensorflow::LogMessage* temp = _impl_.what_.log_message_; + _impl_.what_.log_message_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void Event::unsafe_arena_set_allocated_log_message(::tensorflow::LogMessage* log_message) { + clear_what(); + if (log_message) { + set_has_log_message(); + _impl_.what_.log_message_ = log_message; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.Event.log_message) +} +inline ::tensorflow::LogMessage* Event::_internal_mutable_log_message() { + if (!_internal_has_log_message()) { + clear_what(); + set_has_log_message(); + _impl_.what_.log_message_ = CreateMaybeMessage< ::tensorflow::LogMessage >(GetArenaForAllocation()); + } + return _impl_.what_.log_message_; +} +inline ::tensorflow::LogMessage* Event::mutable_log_message() { + ::tensorflow::LogMessage* _msg = _internal_mutable_log_message(); + // @@protoc_insertion_point(field_mutable:tensorflow.Event.log_message) + return _msg; +} + +// .tensorflow.SessionLog session_log = 7; +inline bool Event::_internal_has_session_log() const { + return what_case() == kSessionLog; +} +inline bool Event::has_session_log() const { + return _internal_has_session_log(); +} +inline void Event::set_has_session_log() { + _impl_._oneof_case_[0] = kSessionLog; +} +inline void Event::clear_session_log() { + if (_internal_has_session_log()) { + if (GetArenaForAllocation() == nullptr) { + delete _impl_.what_.session_log_; + } + clear_has_what(); + } +} +inline ::tensorflow::SessionLog* Event::release_session_log() { + // @@protoc_insertion_point(field_release:tensorflow.Event.session_log) + if (_internal_has_session_log()) { + clear_has_what(); + ::tensorflow::SessionLog* temp = _impl_.what_.session_log_; + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + _impl_.what_.session_log_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::tensorflow::SessionLog& Event::_internal_session_log() const { + return _internal_has_session_log() + ? *_impl_.what_.session_log_ + : reinterpret_cast< ::tensorflow::SessionLog&>(::tensorflow::_SessionLog_default_instance_); +} +inline const ::tensorflow::SessionLog& Event::session_log() const { + // @@protoc_insertion_point(field_get:tensorflow.Event.session_log) + return _internal_session_log(); +} +inline ::tensorflow::SessionLog* Event::unsafe_arena_release_session_log() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.Event.session_log) + if (_internal_has_session_log()) { + clear_has_what(); + ::tensorflow::SessionLog* temp = _impl_.what_.session_log_; + _impl_.what_.session_log_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void Event::unsafe_arena_set_allocated_session_log(::tensorflow::SessionLog* session_log) { + clear_what(); + if (session_log) { + set_has_session_log(); + _impl_.what_.session_log_ = session_log; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.Event.session_log) +} +inline ::tensorflow::SessionLog* Event::_internal_mutable_session_log() { + if (!_internal_has_session_log()) { + clear_what(); + set_has_session_log(); + _impl_.what_.session_log_ = CreateMaybeMessage< ::tensorflow::SessionLog >(GetArenaForAllocation()); + } + return _impl_.what_.session_log_; +} +inline ::tensorflow::SessionLog* Event::mutable_session_log() { + ::tensorflow::SessionLog* _msg = _internal_mutable_session_log(); + // @@protoc_insertion_point(field_mutable:tensorflow.Event.session_log) + return _msg; +} + +// .tensorflow.TaggedRunMetadata tagged_run_metadata = 8; +inline bool Event::_internal_has_tagged_run_metadata() const { + return what_case() == kTaggedRunMetadata; +} +inline bool Event::has_tagged_run_metadata() const { + return _internal_has_tagged_run_metadata(); +} +inline void Event::set_has_tagged_run_metadata() { + _impl_._oneof_case_[0] = kTaggedRunMetadata; +} +inline void Event::clear_tagged_run_metadata() { + if (_internal_has_tagged_run_metadata()) { + if (GetArenaForAllocation() == nullptr) { + delete _impl_.what_.tagged_run_metadata_; + } + clear_has_what(); + } +} +inline ::tensorflow::TaggedRunMetadata* Event::release_tagged_run_metadata() { + // @@protoc_insertion_point(field_release:tensorflow.Event.tagged_run_metadata) + if (_internal_has_tagged_run_metadata()) { + clear_has_what(); + ::tensorflow::TaggedRunMetadata* temp = _impl_.what_.tagged_run_metadata_; + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + _impl_.what_.tagged_run_metadata_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::tensorflow::TaggedRunMetadata& Event::_internal_tagged_run_metadata() const { + return _internal_has_tagged_run_metadata() + ? *_impl_.what_.tagged_run_metadata_ + : reinterpret_cast< ::tensorflow::TaggedRunMetadata&>(::tensorflow::_TaggedRunMetadata_default_instance_); +} +inline const ::tensorflow::TaggedRunMetadata& Event::tagged_run_metadata() const { + // @@protoc_insertion_point(field_get:tensorflow.Event.tagged_run_metadata) + return _internal_tagged_run_metadata(); +} +inline ::tensorflow::TaggedRunMetadata* Event::unsafe_arena_release_tagged_run_metadata() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.Event.tagged_run_metadata) + if (_internal_has_tagged_run_metadata()) { + clear_has_what(); + ::tensorflow::TaggedRunMetadata* temp = _impl_.what_.tagged_run_metadata_; + _impl_.what_.tagged_run_metadata_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void Event::unsafe_arena_set_allocated_tagged_run_metadata(::tensorflow::TaggedRunMetadata* tagged_run_metadata) { + clear_what(); + if (tagged_run_metadata) { + set_has_tagged_run_metadata(); + _impl_.what_.tagged_run_metadata_ = tagged_run_metadata; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.Event.tagged_run_metadata) +} +inline ::tensorflow::TaggedRunMetadata* Event::_internal_mutable_tagged_run_metadata() { + if (!_internal_has_tagged_run_metadata()) { + clear_what(); + set_has_tagged_run_metadata(); + _impl_.what_.tagged_run_metadata_ = CreateMaybeMessage< ::tensorflow::TaggedRunMetadata >(GetArenaForAllocation()); + } + return _impl_.what_.tagged_run_metadata_; +} +inline ::tensorflow::TaggedRunMetadata* Event::mutable_tagged_run_metadata() { + ::tensorflow::TaggedRunMetadata* _msg = _internal_mutable_tagged_run_metadata(); + // @@protoc_insertion_point(field_mutable:tensorflow.Event.tagged_run_metadata) + return _msg; +} + +// bytes meta_graph_def = 9; +inline bool Event::_internal_has_meta_graph_def() const { + return what_case() == kMetaGraphDef; +} +inline bool Event::has_meta_graph_def() const { + return _internal_has_meta_graph_def(); +} +inline void Event::set_has_meta_graph_def() { + _impl_._oneof_case_[0] = kMetaGraphDef; +} +inline void Event::clear_meta_graph_def() { + if (_internal_has_meta_graph_def()) { + _impl_.what_.meta_graph_def_.Destroy(); + clear_has_what(); + } +} +inline const std::string& Event::meta_graph_def() const { + // @@protoc_insertion_point(field_get:tensorflow.Event.meta_graph_def) + return _internal_meta_graph_def(); +} +template +inline void Event::set_meta_graph_def(ArgT0&& arg0, ArgT... args) { + if (!_internal_has_meta_graph_def()) { + clear_what(); + set_has_meta_graph_def(); + _impl_.what_.meta_graph_def_.InitDefault(); + } + _impl_.what_.meta_graph_def_.SetBytes( static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.Event.meta_graph_def) +} +inline std::string* Event::mutable_meta_graph_def() { + std::string* _s = _internal_mutable_meta_graph_def(); + // @@protoc_insertion_point(field_mutable:tensorflow.Event.meta_graph_def) + return _s; +} +inline const std::string& Event::_internal_meta_graph_def() const { + if (_internal_has_meta_graph_def()) { + return _impl_.what_.meta_graph_def_.Get(); + } + return ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(); +} +inline void Event::_internal_set_meta_graph_def(const std::string& value) { + if (!_internal_has_meta_graph_def()) { + clear_what(); + set_has_meta_graph_def(); + _impl_.what_.meta_graph_def_.InitDefault(); + } + _impl_.what_.meta_graph_def_.Set(value, GetArenaForAllocation()); +} +inline std::string* Event::_internal_mutable_meta_graph_def() { + if (!_internal_has_meta_graph_def()) { + clear_what(); + set_has_meta_graph_def(); + _impl_.what_.meta_graph_def_.InitDefault(); + } + return _impl_.what_.meta_graph_def_.Mutable( GetArenaForAllocation()); +} +inline std::string* Event::release_meta_graph_def() { + // @@protoc_insertion_point(field_release:tensorflow.Event.meta_graph_def) + if (_internal_has_meta_graph_def()) { + clear_has_what(); + return _impl_.what_.meta_graph_def_.Release(); + } else { + return nullptr; + } +} +inline void Event::set_allocated_meta_graph_def(std::string* meta_graph_def) { + if (has_what()) { + clear_what(); + } + if (meta_graph_def != nullptr) { + set_has_meta_graph_def(); + _impl_.what_.meta_graph_def_.InitAllocated(meta_graph_def, GetArenaForAllocation()); + } + // @@protoc_insertion_point(field_set_allocated:tensorflow.Event.meta_graph_def) +} + +// .tensorflow.SourceMetadata source_metadata = 10; +inline bool Event::_internal_has_source_metadata() const { + return this != internal_default_instance() && _impl_.source_metadata_ != nullptr; +} +inline bool Event::has_source_metadata() const { + return _internal_has_source_metadata(); +} +inline void Event::clear_source_metadata() { + if (GetArenaForAllocation() == nullptr && _impl_.source_metadata_ != nullptr) { + delete _impl_.source_metadata_; + } + _impl_.source_metadata_ = nullptr; +} +inline const ::tensorflow::SourceMetadata& Event::_internal_source_metadata() const { + const ::tensorflow::SourceMetadata* p = _impl_.source_metadata_; + return p != nullptr ? *p : reinterpret_cast( + ::tensorflow::_SourceMetadata_default_instance_); +} +inline const ::tensorflow::SourceMetadata& Event::source_metadata() const { + // @@protoc_insertion_point(field_get:tensorflow.Event.source_metadata) + return _internal_source_metadata(); +} +inline void Event::unsafe_arena_set_allocated_source_metadata( + ::tensorflow::SourceMetadata* source_metadata) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.source_metadata_); + } + _impl_.source_metadata_ = source_metadata; + if (source_metadata) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.Event.source_metadata) +} +inline ::tensorflow::SourceMetadata* Event::release_source_metadata() { + + ::tensorflow::SourceMetadata* temp = _impl_.source_metadata_; + _impl_.source_metadata_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tensorflow::SourceMetadata* Event::unsafe_arena_release_source_metadata() { + // @@protoc_insertion_point(field_release:tensorflow.Event.source_metadata) + + ::tensorflow::SourceMetadata* temp = _impl_.source_metadata_; + _impl_.source_metadata_ = nullptr; + return temp; +} +inline ::tensorflow::SourceMetadata* Event::_internal_mutable_source_metadata() { + + if (_impl_.source_metadata_ == nullptr) { + auto* p = CreateMaybeMessage<::tensorflow::SourceMetadata>(GetArenaForAllocation()); + _impl_.source_metadata_ = p; + } + return _impl_.source_metadata_; +} +inline ::tensorflow::SourceMetadata* Event::mutable_source_metadata() { + ::tensorflow::SourceMetadata* _msg = _internal_mutable_source_metadata(); + // @@protoc_insertion_point(field_mutable:tensorflow.Event.source_metadata) + return _msg; +} +inline void Event::set_allocated_source_metadata(::tensorflow::SourceMetadata* source_metadata) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete _impl_.source_metadata_; + } + if (source_metadata) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(source_metadata); + if (message_arena != submessage_arena) { + source_metadata = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, source_metadata, submessage_arena); + } + + } else { + + } + _impl_.source_metadata_ = source_metadata; + // @@protoc_insertion_point(field_set_allocated:tensorflow.Event.source_metadata) +} + +inline bool Event::has_what() const { + return what_case() != WHAT_NOT_SET; +} +inline void Event::clear_has_what() { + _impl_._oneof_case_[0] = WHAT_NOT_SET; +} +inline Event::WhatCase Event::what_case() const { + return Event::WhatCase(_impl_._oneof_case_[0]); +} +// ------------------------------------------------------------------- + +// SourceMetadata + +// string writer = 1; +inline void SourceMetadata::clear_writer() { + _impl_.writer_.ClearToEmpty(); +} +inline const std::string& SourceMetadata::writer() const { + // @@protoc_insertion_point(field_get:tensorflow.SourceMetadata.writer) + return _internal_writer(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void SourceMetadata::set_writer(ArgT0&& arg0, ArgT... args) { + + _impl_.writer_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.SourceMetadata.writer) +} +inline std::string* SourceMetadata::mutable_writer() { + std::string* _s = _internal_mutable_writer(); + // @@protoc_insertion_point(field_mutable:tensorflow.SourceMetadata.writer) + return _s; +} +inline const std::string& SourceMetadata::_internal_writer() const { + return _impl_.writer_.Get(); +} +inline void SourceMetadata::_internal_set_writer(const std::string& value) { + + _impl_.writer_.Set(value, GetArenaForAllocation()); +} +inline std::string* SourceMetadata::_internal_mutable_writer() { + + return _impl_.writer_.Mutable(GetArenaForAllocation()); +} +inline std::string* SourceMetadata::release_writer() { + // @@protoc_insertion_point(field_release:tensorflow.SourceMetadata.writer) + return _impl_.writer_.Release(); +} +inline void SourceMetadata::set_allocated_writer(std::string* writer) { + if (writer != nullptr) { + + } else { + + } + _impl_.writer_.SetAllocated(writer, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.writer_.IsDefault()) { + _impl_.writer_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.SourceMetadata.writer) +} + +// ------------------------------------------------------------------- + +// LogMessage + +// .tensorflow.LogMessage.Level level = 1; +inline void LogMessage::clear_level() { + _impl_.level_ = 0; +} +inline ::tensorflow::LogMessage_Level LogMessage::_internal_level() const { + return static_cast< ::tensorflow::LogMessage_Level >(_impl_.level_); +} +inline ::tensorflow::LogMessage_Level LogMessage::level() const { + // @@protoc_insertion_point(field_get:tensorflow.LogMessage.level) + return _internal_level(); +} +inline void LogMessage::_internal_set_level(::tensorflow::LogMessage_Level value) { + + _impl_.level_ = value; +} +inline void LogMessage::set_level(::tensorflow::LogMessage_Level value) { + _internal_set_level(value); + // @@protoc_insertion_point(field_set:tensorflow.LogMessage.level) +} + +// string message = 2; +inline void LogMessage::clear_message() { + _impl_.message_.ClearToEmpty(); +} +inline const std::string& LogMessage::message() const { + // @@protoc_insertion_point(field_get:tensorflow.LogMessage.message) + return _internal_message(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void LogMessage::set_message(ArgT0&& arg0, ArgT... args) { + + _impl_.message_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.LogMessage.message) +} +inline std::string* LogMessage::mutable_message() { + std::string* _s = _internal_mutable_message(); + // @@protoc_insertion_point(field_mutable:tensorflow.LogMessage.message) + return _s; +} +inline const std::string& LogMessage::_internal_message() const { + return _impl_.message_.Get(); +} +inline void LogMessage::_internal_set_message(const std::string& value) { + + _impl_.message_.Set(value, GetArenaForAllocation()); +} +inline std::string* LogMessage::_internal_mutable_message() { + + return _impl_.message_.Mutable(GetArenaForAllocation()); +} +inline std::string* LogMessage::release_message() { + // @@protoc_insertion_point(field_release:tensorflow.LogMessage.message) + return _impl_.message_.Release(); +} +inline void LogMessage::set_allocated_message(std::string* message) { + if (message != nullptr) { + + } else { + + } + _impl_.message_.SetAllocated(message, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.message_.IsDefault()) { + _impl_.message_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.LogMessage.message) +} + +// ------------------------------------------------------------------- + +// SessionLog + +// .tensorflow.SessionLog.SessionStatus status = 1; +inline void SessionLog::clear_status() { + _impl_.status_ = 0; +} +inline ::tensorflow::SessionLog_SessionStatus SessionLog::_internal_status() const { + return static_cast< ::tensorflow::SessionLog_SessionStatus >(_impl_.status_); +} +inline ::tensorflow::SessionLog_SessionStatus SessionLog::status() const { + // @@protoc_insertion_point(field_get:tensorflow.SessionLog.status) + return _internal_status(); +} +inline void SessionLog::_internal_set_status(::tensorflow::SessionLog_SessionStatus value) { + + _impl_.status_ = value; +} +inline void SessionLog::set_status(::tensorflow::SessionLog_SessionStatus value) { + _internal_set_status(value); + // @@protoc_insertion_point(field_set:tensorflow.SessionLog.status) +} + +// string checkpoint_path = 2; +inline void SessionLog::clear_checkpoint_path() { + _impl_.checkpoint_path_.ClearToEmpty(); +} +inline const std::string& SessionLog::checkpoint_path() const { + // @@protoc_insertion_point(field_get:tensorflow.SessionLog.checkpoint_path) + return _internal_checkpoint_path(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void SessionLog::set_checkpoint_path(ArgT0&& arg0, ArgT... args) { + + _impl_.checkpoint_path_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.SessionLog.checkpoint_path) +} +inline std::string* SessionLog::mutable_checkpoint_path() { + std::string* _s = _internal_mutable_checkpoint_path(); + // @@protoc_insertion_point(field_mutable:tensorflow.SessionLog.checkpoint_path) + return _s; +} +inline const std::string& SessionLog::_internal_checkpoint_path() const { + return _impl_.checkpoint_path_.Get(); +} +inline void SessionLog::_internal_set_checkpoint_path(const std::string& value) { + + _impl_.checkpoint_path_.Set(value, GetArenaForAllocation()); +} +inline std::string* SessionLog::_internal_mutable_checkpoint_path() { + + return _impl_.checkpoint_path_.Mutable(GetArenaForAllocation()); +} +inline std::string* SessionLog::release_checkpoint_path() { + // @@protoc_insertion_point(field_release:tensorflow.SessionLog.checkpoint_path) + return _impl_.checkpoint_path_.Release(); +} +inline void SessionLog::set_allocated_checkpoint_path(std::string* checkpoint_path) { + if (checkpoint_path != nullptr) { + + } else { + + } + _impl_.checkpoint_path_.SetAllocated(checkpoint_path, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.checkpoint_path_.IsDefault()) { + _impl_.checkpoint_path_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.SessionLog.checkpoint_path) +} + +// string msg = 3; +inline void SessionLog::clear_msg() { + _impl_.msg_.ClearToEmpty(); +} +inline const std::string& SessionLog::msg() const { + // @@protoc_insertion_point(field_get:tensorflow.SessionLog.msg) + return _internal_msg(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void SessionLog::set_msg(ArgT0&& arg0, ArgT... args) { + + _impl_.msg_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.SessionLog.msg) +} +inline std::string* SessionLog::mutable_msg() { + std::string* _s = _internal_mutable_msg(); + // @@protoc_insertion_point(field_mutable:tensorflow.SessionLog.msg) + return _s; +} +inline const std::string& SessionLog::_internal_msg() const { + return _impl_.msg_.Get(); +} +inline void SessionLog::_internal_set_msg(const std::string& value) { + + _impl_.msg_.Set(value, GetArenaForAllocation()); +} +inline std::string* SessionLog::_internal_mutable_msg() { + + return _impl_.msg_.Mutable(GetArenaForAllocation()); +} +inline std::string* SessionLog::release_msg() { + // @@protoc_insertion_point(field_release:tensorflow.SessionLog.msg) + return _impl_.msg_.Release(); +} +inline void SessionLog::set_allocated_msg(std::string* msg) { + if (msg != nullptr) { + + } else { + + } + _impl_.msg_.SetAllocated(msg, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.msg_.IsDefault()) { + _impl_.msg_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.SessionLog.msg) +} + +// ------------------------------------------------------------------- + +// TaggedRunMetadata + +// string tag = 1; +inline void TaggedRunMetadata::clear_tag() { + _impl_.tag_.ClearToEmpty(); +} +inline const std::string& TaggedRunMetadata::tag() const { + // @@protoc_insertion_point(field_get:tensorflow.TaggedRunMetadata.tag) + return _internal_tag(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void TaggedRunMetadata::set_tag(ArgT0&& arg0, ArgT... args) { + + _impl_.tag_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.TaggedRunMetadata.tag) +} +inline std::string* TaggedRunMetadata::mutable_tag() { + std::string* _s = _internal_mutable_tag(); + // @@protoc_insertion_point(field_mutable:tensorflow.TaggedRunMetadata.tag) + return _s; +} +inline const std::string& TaggedRunMetadata::_internal_tag() const { + return _impl_.tag_.Get(); +} +inline void TaggedRunMetadata::_internal_set_tag(const std::string& value) { + + _impl_.tag_.Set(value, GetArenaForAllocation()); +} +inline std::string* TaggedRunMetadata::_internal_mutable_tag() { + + return _impl_.tag_.Mutable(GetArenaForAllocation()); +} +inline std::string* TaggedRunMetadata::release_tag() { + // @@protoc_insertion_point(field_release:tensorflow.TaggedRunMetadata.tag) + return _impl_.tag_.Release(); +} +inline void TaggedRunMetadata::set_allocated_tag(std::string* tag) { + if (tag != nullptr) { + + } else { + + } + _impl_.tag_.SetAllocated(tag, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.tag_.IsDefault()) { + _impl_.tag_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.TaggedRunMetadata.tag) +} + +// bytes run_metadata = 2; +inline void TaggedRunMetadata::clear_run_metadata() { + _impl_.run_metadata_.ClearToEmpty(); +} +inline const std::string& TaggedRunMetadata::run_metadata() const { + // @@protoc_insertion_point(field_get:tensorflow.TaggedRunMetadata.run_metadata) + return _internal_run_metadata(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void TaggedRunMetadata::set_run_metadata(ArgT0&& arg0, ArgT... args) { + + _impl_.run_metadata_.SetBytes(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.TaggedRunMetadata.run_metadata) +} +inline std::string* TaggedRunMetadata::mutable_run_metadata() { + std::string* _s = _internal_mutable_run_metadata(); + // @@protoc_insertion_point(field_mutable:tensorflow.TaggedRunMetadata.run_metadata) + return _s; +} +inline const std::string& TaggedRunMetadata::_internal_run_metadata() const { + return _impl_.run_metadata_.Get(); +} +inline void TaggedRunMetadata::_internal_set_run_metadata(const std::string& value) { + + _impl_.run_metadata_.Set(value, GetArenaForAllocation()); +} +inline std::string* TaggedRunMetadata::_internal_mutable_run_metadata() { + + return _impl_.run_metadata_.Mutable(GetArenaForAllocation()); +} +inline std::string* TaggedRunMetadata::release_run_metadata() { + // @@protoc_insertion_point(field_release:tensorflow.TaggedRunMetadata.run_metadata) + return _impl_.run_metadata_.Release(); +} +inline void TaggedRunMetadata::set_allocated_run_metadata(std::string* run_metadata) { + if (run_metadata != nullptr) { + + } else { + + } + _impl_.run_metadata_.SetAllocated(run_metadata, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.run_metadata_.IsDefault()) { + _impl_.run_metadata_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.TaggedRunMetadata.run_metadata) +} + +// ------------------------------------------------------------------- + +// WatchdogConfig + +// int64 timeout_ms = 1; +inline void WatchdogConfig::clear_timeout_ms() { + _impl_.timeout_ms_ = int64_t{0}; +} +inline int64_t WatchdogConfig::_internal_timeout_ms() const { + return _impl_.timeout_ms_; +} +inline int64_t WatchdogConfig::timeout_ms() const { + // @@protoc_insertion_point(field_get:tensorflow.WatchdogConfig.timeout_ms) + return _internal_timeout_ms(); +} +inline void WatchdogConfig::_internal_set_timeout_ms(int64_t value) { + + _impl_.timeout_ms_ = value; +} +inline void WatchdogConfig::set_timeout_ms(int64_t value) { + _internal_set_timeout_ms(value); + // @@protoc_insertion_point(field_set:tensorflow.WatchdogConfig.timeout_ms) +} + +// ------------------------------------------------------------------- + +// RequestedExitCode + +// int32 exit_code = 1; +inline void RequestedExitCode::clear_exit_code() { + _impl_.exit_code_ = 0; +} +inline int32_t RequestedExitCode::_internal_exit_code() const { + return _impl_.exit_code_; +} +inline int32_t RequestedExitCode::exit_code() const { + // @@protoc_insertion_point(field_get:tensorflow.RequestedExitCode.exit_code) + return _internal_exit_code(); +} +inline void RequestedExitCode::_internal_set_exit_code(int32_t value) { + + _impl_.exit_code_ = value; +} +inline void RequestedExitCode::set_exit_code(int32_t value) { + _internal_set_exit_code(value); + // @@protoc_insertion_point(field_set:tensorflow.RequestedExitCode.exit_code) +} + +// ------------------------------------------------------------------- + +// WorkerHeartbeatRequest + +// .tensorflow.WorkerShutdownMode shutdown_mode = 1; +inline void WorkerHeartbeatRequest::clear_shutdown_mode() { + _impl_.shutdown_mode_ = 0; +} +inline ::tensorflow::WorkerShutdownMode WorkerHeartbeatRequest::_internal_shutdown_mode() const { + return static_cast< ::tensorflow::WorkerShutdownMode >(_impl_.shutdown_mode_); +} +inline ::tensorflow::WorkerShutdownMode WorkerHeartbeatRequest::shutdown_mode() const { + // @@protoc_insertion_point(field_get:tensorflow.WorkerHeartbeatRequest.shutdown_mode) + return _internal_shutdown_mode(); +} +inline void WorkerHeartbeatRequest::_internal_set_shutdown_mode(::tensorflow::WorkerShutdownMode value) { + + _impl_.shutdown_mode_ = value; +} +inline void WorkerHeartbeatRequest::set_shutdown_mode(::tensorflow::WorkerShutdownMode value) { + _internal_set_shutdown_mode(value); + // @@protoc_insertion_point(field_set:tensorflow.WorkerHeartbeatRequest.shutdown_mode) +} + +// .tensorflow.WatchdogConfig watchdog_config = 2; +inline bool WorkerHeartbeatRequest::_internal_has_watchdog_config() const { + return this != internal_default_instance() && _impl_.watchdog_config_ != nullptr; +} +inline bool WorkerHeartbeatRequest::has_watchdog_config() const { + return _internal_has_watchdog_config(); +} +inline void WorkerHeartbeatRequest::clear_watchdog_config() { + if (GetArenaForAllocation() == nullptr && _impl_.watchdog_config_ != nullptr) { + delete _impl_.watchdog_config_; + } + _impl_.watchdog_config_ = nullptr; +} +inline const ::tensorflow::WatchdogConfig& WorkerHeartbeatRequest::_internal_watchdog_config() const { + const ::tensorflow::WatchdogConfig* p = _impl_.watchdog_config_; + return p != nullptr ? *p : reinterpret_cast( + ::tensorflow::_WatchdogConfig_default_instance_); +} +inline const ::tensorflow::WatchdogConfig& WorkerHeartbeatRequest::watchdog_config() const { + // @@protoc_insertion_point(field_get:tensorflow.WorkerHeartbeatRequest.watchdog_config) + return _internal_watchdog_config(); +} +inline void WorkerHeartbeatRequest::unsafe_arena_set_allocated_watchdog_config( + ::tensorflow::WatchdogConfig* watchdog_config) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.watchdog_config_); + } + _impl_.watchdog_config_ = watchdog_config; + if (watchdog_config) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.WorkerHeartbeatRequest.watchdog_config) +} +inline ::tensorflow::WatchdogConfig* WorkerHeartbeatRequest::release_watchdog_config() { + + ::tensorflow::WatchdogConfig* temp = _impl_.watchdog_config_; + _impl_.watchdog_config_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tensorflow::WatchdogConfig* WorkerHeartbeatRequest::unsafe_arena_release_watchdog_config() { + // @@protoc_insertion_point(field_release:tensorflow.WorkerHeartbeatRequest.watchdog_config) + + ::tensorflow::WatchdogConfig* temp = _impl_.watchdog_config_; + _impl_.watchdog_config_ = nullptr; + return temp; +} +inline ::tensorflow::WatchdogConfig* WorkerHeartbeatRequest::_internal_mutable_watchdog_config() { + + if (_impl_.watchdog_config_ == nullptr) { + auto* p = CreateMaybeMessage<::tensorflow::WatchdogConfig>(GetArenaForAllocation()); + _impl_.watchdog_config_ = p; + } + return _impl_.watchdog_config_; +} +inline ::tensorflow::WatchdogConfig* WorkerHeartbeatRequest::mutable_watchdog_config() { + ::tensorflow::WatchdogConfig* _msg = _internal_mutable_watchdog_config(); + // @@protoc_insertion_point(field_mutable:tensorflow.WorkerHeartbeatRequest.watchdog_config) + return _msg; +} +inline void WorkerHeartbeatRequest::set_allocated_watchdog_config(::tensorflow::WatchdogConfig* watchdog_config) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete _impl_.watchdog_config_; + } + if (watchdog_config) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(watchdog_config); + if (message_arena != submessage_arena) { + watchdog_config = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, watchdog_config, submessage_arena); + } + + } else { + + } + _impl_.watchdog_config_ = watchdog_config; + // @@protoc_insertion_point(field_set_allocated:tensorflow.WorkerHeartbeatRequest.watchdog_config) +} + +// .tensorflow.RequestedExitCode exit_code = 3; +inline bool WorkerHeartbeatRequest::_internal_has_exit_code() const { + return this != internal_default_instance() && _impl_.exit_code_ != nullptr; +} +inline bool WorkerHeartbeatRequest::has_exit_code() const { + return _internal_has_exit_code(); +} +inline void WorkerHeartbeatRequest::clear_exit_code() { + if (GetArenaForAllocation() == nullptr && _impl_.exit_code_ != nullptr) { + delete _impl_.exit_code_; + } + _impl_.exit_code_ = nullptr; +} +inline const ::tensorflow::RequestedExitCode& WorkerHeartbeatRequest::_internal_exit_code() const { + const ::tensorflow::RequestedExitCode* p = _impl_.exit_code_; + return p != nullptr ? *p : reinterpret_cast( + ::tensorflow::_RequestedExitCode_default_instance_); +} +inline const ::tensorflow::RequestedExitCode& WorkerHeartbeatRequest::exit_code() const { + // @@protoc_insertion_point(field_get:tensorflow.WorkerHeartbeatRequest.exit_code) + return _internal_exit_code(); +} +inline void WorkerHeartbeatRequest::unsafe_arena_set_allocated_exit_code( + ::tensorflow::RequestedExitCode* exit_code) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.exit_code_); + } + _impl_.exit_code_ = exit_code; + if (exit_code) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.WorkerHeartbeatRequest.exit_code) +} +inline ::tensorflow::RequestedExitCode* WorkerHeartbeatRequest::release_exit_code() { + + ::tensorflow::RequestedExitCode* temp = _impl_.exit_code_; + _impl_.exit_code_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tensorflow::RequestedExitCode* WorkerHeartbeatRequest::unsafe_arena_release_exit_code() { + // @@protoc_insertion_point(field_release:tensorflow.WorkerHeartbeatRequest.exit_code) + + ::tensorflow::RequestedExitCode* temp = _impl_.exit_code_; + _impl_.exit_code_ = nullptr; + return temp; +} +inline ::tensorflow::RequestedExitCode* WorkerHeartbeatRequest::_internal_mutable_exit_code() { + + if (_impl_.exit_code_ == nullptr) { + auto* p = CreateMaybeMessage<::tensorflow::RequestedExitCode>(GetArenaForAllocation()); + _impl_.exit_code_ = p; + } + return _impl_.exit_code_; +} +inline ::tensorflow::RequestedExitCode* WorkerHeartbeatRequest::mutable_exit_code() { + ::tensorflow::RequestedExitCode* _msg = _internal_mutable_exit_code(); + // @@protoc_insertion_point(field_mutable:tensorflow.WorkerHeartbeatRequest.exit_code) + return _msg; +} +inline void WorkerHeartbeatRequest::set_allocated_exit_code(::tensorflow::RequestedExitCode* exit_code) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete _impl_.exit_code_; + } + if (exit_code) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(exit_code); + if (message_arena != submessage_arena) { + exit_code = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, exit_code, submessage_arena); + } + + } else { + + } + _impl_.exit_code_ = exit_code; + // @@protoc_insertion_point(field_set_allocated:tensorflow.WorkerHeartbeatRequest.exit_code) +} + +// ------------------------------------------------------------------- + +// WorkerHeartbeatResponse + +// .tensorflow.WorkerHealth health_status = 1; +inline void WorkerHeartbeatResponse::clear_health_status() { + _impl_.health_status_ = 0; +} +inline ::tensorflow::WorkerHealth WorkerHeartbeatResponse::_internal_health_status() const { + return static_cast< ::tensorflow::WorkerHealth >(_impl_.health_status_); +} +inline ::tensorflow::WorkerHealth WorkerHeartbeatResponse::health_status() const { + // @@protoc_insertion_point(field_get:tensorflow.WorkerHeartbeatResponse.health_status) + return _internal_health_status(); +} +inline void WorkerHeartbeatResponse::_internal_set_health_status(::tensorflow::WorkerHealth value) { + + _impl_.health_status_ = value; +} +inline void WorkerHeartbeatResponse::set_health_status(::tensorflow::WorkerHealth value) { + _internal_set_health_status(value); + // @@protoc_insertion_point(field_set:tensorflow.WorkerHeartbeatResponse.health_status) +} + +// repeated .tensorflow.Event worker_log = 2; +inline int WorkerHeartbeatResponse::_internal_worker_log_size() const { + return _impl_.worker_log_.size(); +} +inline int WorkerHeartbeatResponse::worker_log_size() const { + return _internal_worker_log_size(); +} +inline void WorkerHeartbeatResponse::clear_worker_log() { + _impl_.worker_log_.Clear(); +} +inline ::tensorflow::Event* WorkerHeartbeatResponse::mutable_worker_log(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.WorkerHeartbeatResponse.worker_log) + return _impl_.worker_log_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::Event >* +WorkerHeartbeatResponse::mutable_worker_log() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.WorkerHeartbeatResponse.worker_log) + return &_impl_.worker_log_; +} +inline const ::tensorflow::Event& WorkerHeartbeatResponse::_internal_worker_log(int index) const { + return _impl_.worker_log_.Get(index); +} +inline const ::tensorflow::Event& WorkerHeartbeatResponse::worker_log(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.WorkerHeartbeatResponse.worker_log) + return _internal_worker_log(index); +} +inline ::tensorflow::Event* WorkerHeartbeatResponse::_internal_add_worker_log() { + return _impl_.worker_log_.Add(); +} +inline ::tensorflow::Event* WorkerHeartbeatResponse::add_worker_log() { + ::tensorflow::Event* _add = _internal_add_worker_log(); + // @@protoc_insertion_point(field_add:tensorflow.WorkerHeartbeatResponse.worker_log) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::Event >& +WorkerHeartbeatResponse::worker_log() const { + // @@protoc_insertion_point(field_list:tensorflow.WorkerHeartbeatResponse.worker_log) + return _impl_.worker_log_; +} + +// string hostname = 3; +inline void WorkerHeartbeatResponse::clear_hostname() { + _impl_.hostname_.ClearToEmpty(); +} +inline const std::string& WorkerHeartbeatResponse::hostname() const { + // @@protoc_insertion_point(field_get:tensorflow.WorkerHeartbeatResponse.hostname) + return _internal_hostname(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void WorkerHeartbeatResponse::set_hostname(ArgT0&& arg0, ArgT... args) { + + _impl_.hostname_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tensorflow.WorkerHeartbeatResponse.hostname) +} +inline std::string* WorkerHeartbeatResponse::mutable_hostname() { + std::string* _s = _internal_mutable_hostname(); + // @@protoc_insertion_point(field_mutable:tensorflow.WorkerHeartbeatResponse.hostname) + return _s; +} +inline const std::string& WorkerHeartbeatResponse::_internal_hostname() const { + return _impl_.hostname_.Get(); +} +inline void WorkerHeartbeatResponse::_internal_set_hostname(const std::string& value) { + + _impl_.hostname_.Set(value, GetArenaForAllocation()); +} +inline std::string* WorkerHeartbeatResponse::_internal_mutable_hostname() { + + return _impl_.hostname_.Mutable(GetArenaForAllocation()); +} +inline std::string* WorkerHeartbeatResponse::release_hostname() { + // @@protoc_insertion_point(field_release:tensorflow.WorkerHeartbeatResponse.hostname) + return _impl_.hostname_.Release(); +} +inline void WorkerHeartbeatResponse::set_allocated_hostname(std::string* hostname) { + if (hostname != nullptr) { + + } else { + + } + _impl_.hostname_.SetAllocated(hostname, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.hostname_.IsDefault()) { + _impl_.hostname_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tensorflow.WorkerHeartbeatResponse.hostname) +} + +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + + +// @@protoc_insertion_point(namespace_scope) + +} // namespace tensorflow + +PROTOBUF_NAMESPACE_OPEN + +template <> struct is_proto_enum< ::tensorflow::LogMessage_Level> : ::std::true_type {}; +template <> +inline const EnumDescriptor* GetEnumDescriptor< ::tensorflow::LogMessage_Level>() { + return ::tensorflow::LogMessage_Level_descriptor(); +} +template <> struct is_proto_enum< ::tensorflow::SessionLog_SessionStatus> : ::std::true_type {}; +template <> +inline const EnumDescriptor* GetEnumDescriptor< ::tensorflow::SessionLog_SessionStatus>() { + return ::tensorflow::SessionLog_SessionStatus_descriptor(); +} +template <> struct is_proto_enum< ::tensorflow::WorkerHealth> : ::std::true_type {}; +template <> +inline const EnumDescriptor* GetEnumDescriptor< ::tensorflow::WorkerHealth>() { + return ::tensorflow::WorkerHealth_descriptor(); +} +template <> struct is_proto_enum< ::tensorflow::WorkerShutdownMode> : ::std::true_type {}; +template <> +inline const EnumDescriptor* GetEnumDescriptor< ::tensorflow::WorkerShutdownMode>() { + return ::tensorflow::WorkerShutdownMode_descriptor(); +} + +PROTOBUF_NAMESPACE_CLOSE + +// @@protoc_insertion_point(global_scope) + +#include +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2futil_2fevent_2eproto diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/util/event.proto b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/util/event.proto new file mode 100644 index 0000000000000000000000000000000000000000..441b5afb1e75e80a23c2929edc61fea233adc994 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/util/event.proto @@ -0,0 +1,141 @@ +syntax = "proto3"; + +package tensorflow; + +import "tensorflow/core/framework/summary.proto"; + +option cc_enable_arenas = true; +option java_outer_classname = "EventProtos"; +option java_multiple_files = true; +option java_package = "org.tensorflow.util"; +option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/util/event_go_proto"; + +// Protocol buffer representing an event that happened during +// the execution of a Brain model. +message Event { + // Timestamp of the event. + double wall_time = 1; + + // Global step of the event. + int64 step = 2; + + oneof what { + // An event file was started, with the specified version. + // This is use to identify the contents of the record IO files + // easily. Current version is "brain.Event:2". All versions + // start with "brain.Event:". + string file_version = 3; + // An encoded version of a GraphDef. + bytes graph_def = 4; + // A summary was generated. + Summary summary = 5; + // The user output a log message. This was theoretically used by the defunct + // tensorboard_logging module, which has since been removed; this field is + // now deprecated and should not be used. + LogMessage log_message = 6 [deprecated = true]; + // The state of the session which can be used for restarting after crashes. + SessionLog session_log = 7; + // The metadata returned by running a session.run() call. + TaggedRunMetadata tagged_run_metadata = 8; + // An encoded version of a MetaGraphDef. + bytes meta_graph_def = 9; + } + + // Information of the source that writes the events, this is only logged in + // the very first event along with the `file_version` field. + SourceMetadata source_metadata = 10; +} + +// Holds the information of the source that writes the events. +message SourceMetadata { + // Low level name of the summary writer, such as + // `tensorflow.core.util.events_writer`. + string writer = 1; +} + +// Protocol buffer used for logging messages to the events file. +// +// This was theoretically used by the defunct tensorboard_logging module, which +// has been removed; this message is now deprecated and should not be used. +message LogMessage { + option deprecated = true; + enum Level { + option deprecated = true; + UNKNOWN = 0; + // Note: The logging level 10 cannot be named DEBUG. Some software + // projects compile their C/C++ code with -DDEBUG in debug builds. So the + // C++ code generated from this file should not have an identifier named + // DEBUG. + DEBUGGING = 10; + INFO = 20; + WARN = 30; + ERROR = 40; + FATAL = 50; + } + Level level = 1; + string message = 2; +} + +// Protocol buffer used for logging session state. +message SessionLog { + enum SessionStatus { + STATUS_UNSPECIFIED = 0; + START = 1; + STOP = 2; + CHECKPOINT = 3; + } + + SessionStatus status = 1; + // This checkpoint_path contains both the path and filename. + string checkpoint_path = 2; + string msg = 3; +} + +// For logging the metadata output for a single session.run() call. +message TaggedRunMetadata { + // Tag name associated with this metadata. + string tag = 1; + // Byte-encoded version of the `RunMetadata` proto in order to allow lazy + // deserialization. + bytes run_metadata = 2; +} + +// Worker heartbeat messages. Support for these operations is currently +// internal and expected to change. + +// Current health status of a worker. +enum WorkerHealth { + OK = 0; // By default a worker is healthy. + RECEIVED_SHUTDOWN_SIGNAL = 1; + INTERNAL_ERROR = 2; + SHUTTING_DOWN = 3; // Worker has been instructed to shutdown after a timeout. +} + +// Indicates the behavior of the worker when an internal error or shutdown +// signal is received. +enum WorkerShutdownMode { + DEFAULT = 0; + NOT_CONFIGURED = 1; + WAIT_FOR_COORDINATOR = 2; + SHUTDOWN_AFTER_TIMEOUT = 3; +} + +message WatchdogConfig { + int64 timeout_ms = 1; +} + +message RequestedExitCode { + int32 exit_code = 1; +} + +message WorkerHeartbeatRequest { + WorkerShutdownMode shutdown_mode = 1; + WatchdogConfig watchdog_config = 2; + RequestedExitCode exit_code = 3; +} + +message WorkerHeartbeatResponse { + WorkerHealth health_status = 1; + repeated Event worker_log = 2; + string hostname = 3; +} diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/util/events_writer.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/util/events_writer.h new file mode 100644 index 0000000000000000000000000000000000000000..8a934e8cc39e291f31e839fa1a9db8c90355d597 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/util/events_writer.h @@ -0,0 +1,103 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_UTIL_EVENTS_WRITER_H_ +#define TENSORFLOW_CORE_UTIL_EVENTS_WRITER_H_ + +#include +#include + +#include "tensorflow/core/lib/core/status.h" +#include "tensorflow/core/lib/io/record_writer.h" +#include "tensorflow/core/platform/env.h" +#include "tensorflow/core/platform/macros.h" +#include "tensorflow/core/platform/types.h" +#include "tensorflow/core/util/event.pb.h" + +namespace tensorflow { + +class EventsWriter { + public: +#ifndef SWIG + // Prefix of version string present in the first entry of every event file. + static constexpr const char* kVersionPrefix = "brain.Event:"; + static constexpr const int kCurrentVersion = 2; + static constexpr const char* kWriterSourceMetadata = + "tensorflow.core.util.events_writer"; +#endif + + // Events files typically have a name of the form + // '/some/file/path/my.file.out.events.[timestamp].[hostname][suffix]' + // To create and EventWriter, the user should provide file_prefix = + // '/some/file/path/my.file' + // The EventsWriter will append '.out.events.[timestamp].[hostname][suffix]' + // to the ultimate filename once Init() is called. + // Note that it is not recommended to simultaneously have two + // EventWriters writing to the same file_prefix. + explicit EventsWriter(const std::string& file_prefix); + ~EventsWriter(); + + // Sets the event file filename and opens file for writing. If not called by + // user, will be invoked automatically by a call to FileName() or Write*(). + // Returns false if the file could not be opened. Idempotent: if file exists + // and is open this is a no-op. If on the other hand the file was opened, + // but has since disappeared (e.g. deleted by another process), this will open + // a new file with a new timestamp in its filename. + Status Init(); + Status InitWithSuffix(const std::string& suffix); + + // Returns the filename for the current events file: + // filename_ = [file_prefix_].out.events.[timestamp].[hostname][suffix] + std::string FileName(); + + // Append "event" to the file. The "tensorflow::" part is for swig happiness. + void WriteEvent(const tensorflow::Event& event); + + // Append "event_str", a serialized Event, to the file. + // Note that this function does NOT check that de-serializing event_str + // results in a valid Event proto. The tensorflow:: bit makes SWIG happy. + void WriteSerializedEvent(tensorflow::StringPiece event_str); + + // EventWriter automatically flushes and closes on destruction, but + // these two methods are provided for users who want to write to disk sooner + // and/or check for success. + // Flush() pushes outstanding events to disk. Returns false if the + // events file could not be created, or if the file exists but could not + // be written too. + // Close() calls Flush() and then closes the current events file. + // Returns true only if both the flush and the closure were successful. + Status Flush(); + Status Close(); + + private: + Status FileStillExists(); // OK if event_file_path_ exists. + Status InitIfNeeded(); + + Env* env_; + const std::string file_prefix_; + std::string file_suffix_; + std::string filename_; + std::unique_ptr recordio_file_; + std::unique_ptr recordio_writer_; + int num_outstanding_events_; +#ifndef SWIG + EventsWriter(const EventsWriter&) = delete; + void operator=(const EventsWriter&) = delete; +#endif +}; + +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_UTIL_EVENTS_WRITER_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/util/example_proto_fast_parsing.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/util/example_proto_fast_parsing.h new file mode 100644 index 0000000000000000000000000000000000000000..db924c748db10469d9e4f98fca14641caf1c59c9 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/util/example_proto_fast_parsing.h @@ -0,0 +1,170 @@ +/* Copyright 2016 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_UTIL_EXAMPLE_PROTO_FAST_PARSING_H_ +#define TENSORFLOW_CORE_UTIL_EXAMPLE_PROTO_FAST_PARSING_H_ + +#include +#include +#include +#include + +#include "tensorflow/core/example/example.pb.h" +#include "tensorflow/core/framework/allocator.h" +#include "tensorflow/core/framework/graph.pb.h" +#include "tensorflow/core/framework/op_kernel.h" +#include "tensorflow/core/framework/partial_tensor_shape.h" +#include "tensorflow/core/framework/tensor.h" +#include "tensorflow/core/framework/types.h" +#include "tensorflow/core/lib/gtl/array_slice.h" +#include "tensorflow/core/platform/types.h" +#include "tensorflow/core/util/sparse/sparse_tensor.h" + +namespace tensorflow { +namespace example { + +// FastParseExampleConfig defines how to parse features in Example. +// Each sub-config is responsible for one feature identified with feature_name. +// FastParseExampleConfig can't have two sub-configs with the same feature_name. +// dtype identifies the type of output vector and the kind of Feature expected +// in Example. +struct FastParseExampleConfig { + struct Dense { + Dense(StringPiece feature_name, DataType dtype, PartialTensorShape shape, + Tensor default_value, bool variable_length, + std::size_t elements_per_stride) + : feature_name(feature_name), // TODO(mrry): Switch to preallocated + // tstring when this is available. + dtype(dtype), + shape(std::move(shape)), + default_value(std::move(default_value)), + variable_length(variable_length), + elements_per_stride(elements_per_stride) {} + Dense() = default; + + tstring feature_name; + DataType dtype; + // These 2 fields correspond exactly to dense_shapes and dense_defaults in + // ParseExample op. + // Documentation is available in: tensorflow/core/ops/parsing_ops.cc + PartialTensorShape shape; + Tensor default_value; + bool variable_length; + std::size_t elements_per_stride; + }; + + struct Sparse { + Sparse(StringPiece feature_name, DataType dtype) + : feature_name(feature_name), // TODO(mrry): Switch to preallocated + // tstring when this is available. + dtype(dtype) {} + Sparse() = default; + + tstring feature_name; + DataType dtype; + }; + + struct Ragged { + Ragged(StringPiece feature_name, DataType dtype, DataType splits_dtype) + : feature_name(feature_name), // TODO(mrry): Switch to preallocated + // tstring when this is available. + dtype(dtype), + splits_dtype(splits_dtype) {} + Ragged() = default; + + tstring feature_name; + DataType dtype; + DataType splits_dtype; + }; + + std::vector dense; + std::vector sparse; + std::vector ragged; + + // If `true`, `Result::feature_stats` will contain one + // `PerExampleFeatureStats` for each serialized example in the input. + bool collect_feature_stats = false; +}; + +// Statistics about the features in each example passed to +// `FastParse[Single]Example()`. +// +// TODO(b/111553342): The gathered statistics currently have two limitations: +// * Feature names that appear more than once will be counted multiple times. +// * The feature values count only represents the counts for features that were +// requested in the `FastParseExampleConfig`. +// These could be addressed with additional work at runtime. +struct PerExampleFeatureStats { + // The number of feature names in an example. + size_t features_count = 0; + + // The sum of the number of values in each feature that is parsed. + size_t feature_values_count = 0; +}; + +// This is exactly the output of TF's ParseExample Op. +// Documentation is available in: tensorflow/core/ops/parsing_ops.cc +struct Result { + std::vector sparse_indices; + std::vector sparse_values; + std::vector sparse_shapes; + std::vector dense_values; + std::vector ragged_values; + std::vector ragged_splits; + std::vector ragged_outer_splits; // For SequenceExamples + + // This vector will be populated with one element per example if + // `FastParseExampleConfig::collect_feature_stats` is set to `true`. + std::vector feature_stats; +}; + +// Parses a batch of serialized Example protos and converts them into result +// according to given config. +// Given example names have to either be empty or the same size as serialized. +// example_names are used only for error messages. +Status FastParseExample(const FastParseExampleConfig& config, + gtl::ArraySlice serialized, + gtl::ArraySlice example_names, + thread::ThreadPool* thread_pool, Result* result); + +// TODO(mrry): Move the hash table construction into the config object. +typedef FastParseExampleConfig FastParseSingleExampleConfig; + +Status FastParseSingleExample(const FastParseSingleExampleConfig& config, + StringPiece serialized, Result* result); + +// Parses a batch of serialized SequenceExample protos and converts them into +// result according to given config. +// Given example names have to either be empty or the same size as serialized. +// example_names are used only for error messages. +// (If batch=true, then this parses a single SequenceExample.) +Status FastParseSequenceExample( + const example::FastParseExampleConfig& context_config, + const example::FastParseExampleConfig& sequence_config, + gtl::ArraySlice serialized, gtl::ArraySlice example_names, + thread::ThreadPool* thread_pool, example::Result* context_result, + example::Result* sequence_result, + std::vector* dense_feature_lengths, bool is_batch = true); + +// This function parses serialized Example and populates given example. +// It uses the same specialized parser as FastParseExample which is efficient. +// But then constructs Example which is relatively slow. +// It is exported here as a convenient API to test parser part separately. +bool TestFastParse(const string& serialized, Example* example); + +} // namespace example +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_UTIL_EXAMPLE_PROTO_FAST_PARSING_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/util/example_proto_helper.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/util/example_proto_helper.h new file mode 100644 index 0000000000000000000000000000000000000000..030dfc396ff5b87825fdabc3794fcc0b6e6bbdfb --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/util/example_proto_helper.h @@ -0,0 +1,367 @@ +/* Copyright 2016 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_UTIL_EXAMPLE_PROTO_HELPER_H_ +#define TENSORFLOW_CORE_UTIL_EXAMPLE_PROTO_HELPER_H_ + +#include +#include +#include + +#include "tensorflow/core/example/example.pb.h" +#include "tensorflow/core/example/feature.pb.h" +#include "tensorflow/core/framework/allocator.h" +#include "tensorflow/core/framework/graph.pb.h" +#include "tensorflow/core/framework/partial_tensor_shape.h" +#include "tensorflow/core/framework/tensor.h" +#include "tensorflow/core/framework/types.h" +#include "tensorflow/core/lib/core/errors.h" +#include "tensorflow/core/platform/types.h" +#include "tensorflow/core/util/sparse/sparse_tensor.h" + +// This is a set of helper methods that will make it possible to share +// tensorflow::Example proto Tensor conversion code inside the ExampleParserOp +// OpKernel as well as in external code. +namespace tensorflow { + +// "Dense" feature configuration. +struct FixedLenFeature { + string key; + DataType dtype; + TensorShape shape; + Tensor default_value; + string values_output_tensor_name; +}; + +// "Sparse" feature configuration. +struct VarLenFeature { + string key; + DataType dtype; + string values_output_tensor_name; + string indices_output_tensor_name; + string shapes_output_tensor_name; +}; + +// Given a single tensorflow::Example, with an optional example name +// at a particular index within a batch, and dense and sparse feature +// configurations from fixed_len_features, var_len_features, this method +// updates the dense value tensor and the sparse values temporary vector +// of tensors. The indexing of the output vectors correspond 1:1 to the +// indexing of the feature configuration vectors. +// +// The fixed_len_features and var_len_features maps are assume to be +// have disjoint key fields from the Feature map in the tensorflow.Example +// proto. +// +// For each sparse feature, the sparse values temporary vector holds a +// tensor for each Example. Each tensor is either empty or filled, depending +// on if the sparse feature value is set for the Example. This +// temporary structure is needed because we need to know the total number +// of filled elements in the batch to get the proper final sparse tensor +// shapes allocated. After the entire batch is processed, +// GetSparseTensorShape can be used to calculate the final shapes and +// CopyIntoSparseTensor can be used to copy from the temporary vector +// into the final allocated tensors. +Status SingleExampleProtoToTensors( + const Example& example, const string& name, int batch_index, + const std::vector& fixed_len_features, + const std::vector& var_len_features, + std::vector* output_dense_values_tensor, + std::vector>* output_sparse_values_tmp); + +// The shape of the indices and values tensors associated with a SparseTensor +// are dependent on the contents of the batch. +struct VarLenFeatureBatchShapes { + TensorShape indices_shape; + TensorShape values_shape; + int max_num_features; +}; + +// Get the shape of the sparse values and indices tensors for the batch, +// given how many of the tensors in the temporary sparse values vector +// are actually filled. +Status GetSparseTensorShapes(const VarLenFeature& var_len_feature, + const std::vector& sparse_values_tmp, + int batch_size, + VarLenFeatureBatchShapes* output_shapes); + +// A method to convert a batch of tensorflow::Example protos into output +// tensors. This method is useful if there already is a batch of deserialized +// Example protos in memory (such as a serving use-case) and we do not wish +// to incur an extraneous serialize/deserialize. It is intended +// as an outside of OpKernel compatible replacement for the functionality of +// ExampleParserOp. In a serving setting, this method could be used to produce +// a feed_dict of Tensors that could bypass the ExampleParserOp. +// +// Note that unlike SingleExampleProtoToTensors, output tensors are +// allocated using a provided Allocator within this method. +Status BatchExampleProtoToTensors( + const std::vector& examples, + const std::vector& names, + const std::vector& fixed_len_features, + const std::vector& var_len_features, Allocator* allocator, + std::vector* output_dense_values_tensor, + std::vector* output_sparse_indices_tensor, + std::vector* output_sparse_values_tensor, + std::vector* output_sparse_shapes_tensor); + +// Check that the given dtype is one that is compatible with +// tensorflow::Example protocol buffer feature values. +Status CheckValidType(const DataType& dtype); + +// Check that the provided Feature proto message's oneof value +// matches that of the provided dtype. +Status CheckTypesMatch(const Feature& feature, const DataType& dtype, + bool* match); + +// For a single Example, copy a dense feature value into an output +// dense value tensor Out at the provided out_index offset. +Status FeatureDenseCopy(std::size_t out_index, const string& name, + const string& key, const DataType& dtype, + const TensorShape& shape, const Feature& feature, + Tensor* out); + +// Copy the value a provided Tensor into an output dense_value tensor Out +// at the provided out_index offset. +void RowDenseCopy(const std::size_t& out_index, const DataType& dtype, + const Tensor& in, Tensor* out); + +// For a single Example, and given sparse feature return a temporary output +// Tensor suitable for being collected in the temporary sparse value vector. +Tensor FeatureSparseCopy(std::size_t batch, const string& key, + const DataType& dtype, const Feature& feature); + +// Copy a temporary Tensor into the final sparse indices and values +// tensor at a given batch index and element offset. This method +// assumes that the indices/values Tensors have been properly allocated +// for the batch. +int64_t CopyIntoSparseTensor(const Tensor& in, int batch, int64_t offset, + Tensor* indices, Tensor* values); + +// Check that each dense_shape has known rank and inner dimensions; and +// update variable_length (whether the outer dimension is None) and +// elements_per_stride for each denes_shape. +Status GetDenseShapes(const std::vector& dense_shapes, + std::vector* variable_length, + std::vector* elements_per_stride); + +// Parses the attributes passed to ParseExample. +// REQUIRES: Init must be called after construction. +struct ParseExampleAttrs { + public: + template + Status Init(ContextType* ctx, int op_version = 1) { + TF_RETURN_IF_ERROR(ctx->GetAttr("sparse_types", &sparse_types)); + TF_RETURN_IF_ERROR(ctx->GetAttr("Tdense", &dense_types)); + TF_RETURN_IF_ERROR(ctx->GetAttr("dense_shapes", &dense_shapes)); + TF_RETURN_IF_ERROR( + GetDenseShapes(dense_shapes, &variable_length, &elements_per_stride)); + switch (op_version) { + case 1: + TF_RETURN_IF_ERROR(ctx->GetAttr("Nsparse", &num_sparse)); + TF_RETURN_IF_ERROR(ctx->GetAttr("Ndense", &num_dense)); + break; + case 2: + TF_RETURN_IF_ERROR( + ctx->GetAttr("ragged_value_types", &ragged_value_types)); + TF_RETURN_IF_ERROR(ctx->GetAttr("num_sparse", &num_sparse)); + TF_RETURN_IF_ERROR( + ctx->GetAttr("ragged_split_types", &ragged_split_types)); + break; + default: + return errors::InvalidArgument("Unexpected op_version", op_version); + } + return FinishInit(op_version); + } + + int64_t num_sparse; + int64_t num_dense; + int64_t num_ragged; + std::vector sparse_types; + std::vector dense_types; + std::vector ragged_value_types; + std::vector ragged_split_types; + std::vector dense_shapes; + std::vector variable_length; + std::vector elements_per_stride; + + private: + Status FinishInit(int op_version); // for context-independent parts of Init. +}; + +// Parses the attributes passed to ParseSingleExample. +// REQUIRES: Init must be called after construction. +struct ParseSingleExampleAttrs { + public: + template + Status Init(ContextType* ctx) { + TF_RETURN_IF_ERROR(ctx->GetAttr("sparse_keys", &sparse_keys)); + TF_RETURN_IF_ERROR(ctx->GetAttr("sparse_types", &sparse_types)); + TF_RETURN_IF_ERROR(ctx->GetAttr("dense_keys", &dense_keys)); + TF_RETURN_IF_ERROR(ctx->GetAttr("Tdense", &dense_types)); + TF_RETURN_IF_ERROR(ctx->GetAttr("dense_shapes", &dense_shapes)); + + int num_sparse; + TF_RETURN_IF_ERROR(ctx->GetAttr("num_sparse", &num_sparse)); + if (num_sparse != sparse_keys.size() || num_sparse != sparse_types.size()) { + return errors::InvalidArgument( + "num_sparse (", num_sparse, ") must match the size of sparse_keys (", + sparse_keys.size(), ") and sparse_types (", sparse_types.size(), ")"); + } + + TF_RETURN_IF_ERROR( + GetDenseShapes(dense_shapes, &variable_length, &elements_per_stride)); + return FinishInit(); + } + + std::vector sparse_keys; + std::vector sparse_types; + std::vector dense_keys; + std::vector dense_types; + std::vector dense_shapes; + std::vector variable_length; + std::vector elements_per_stride; + + private: + Status FinishInit(); // for context-independent parts of Init. +}; + +// Parses the attributes passed to ParseSequenceExample. +// REQUIRES: Init must be called after construction. +struct ParseSequenceExampleAttrs { + public: + template + Status Init(ContextType* ctx, int op_version = 1) { + switch (op_version) { + case 1: { + std::vector missing_empty_vector; + TF_RETURN_IF_ERROR(ctx->GetAttr( + "feature_list_dense_missing_assumed_empty", &missing_empty_vector)); + for (const string& feature : missing_empty_vector) { + feature_list_dense_missing_assumed_empty.insert(feature); + } + } + TF_RETURN_IF_ERROR( + ctx->GetAttr("context_sparse_keys", &context_sparse_keys)); + TF_RETURN_IF_ERROR( + ctx->GetAttr("context_dense_keys", &context_dense_keys)); + TF_RETURN_IF_ERROR(ctx->GetAttr("feature_list_sparse_keys", + &feature_list_sparse_keys)); + TF_RETURN_IF_ERROR( + ctx->GetAttr("feature_list_dense_keys", &feature_list_dense_keys)); + TF_RETURN_IF_ERROR(ctx->GetAttr("Ncontext_dense", &num_context_dense)); + break; + case 2: + TF_RETURN_IF_ERROR(ctx->GetAttr("context_ragged_value_types", + &context_ragged_value_types)); + TF_RETURN_IF_ERROR(ctx->GetAttr("context_ragged_split_types", + &context_ragged_split_types)); + TF_RETURN_IF_ERROR(ctx->GetAttr("feature_list_ragged_value_types", + &feature_list_ragged_value_types)); + TF_RETURN_IF_ERROR(ctx->GetAttr("feature_list_ragged_split_types", + &feature_list_ragged_split_types)); + break; + default: + return errors::InvalidArgument("Unexpected op_version", op_version); + } + TF_RETURN_IF_ERROR( + ctx->GetAttr("context_sparse_types", &context_sparse_types)); + TF_RETURN_IF_ERROR( + ctx->GetAttr("Nfeature_list_dense", &num_feature_list_dense)); + TF_RETURN_IF_ERROR(ctx->GetAttr("Ncontext_sparse", &num_context_sparse)); + TF_RETURN_IF_ERROR(ctx->GetAttr("Tcontext_dense", &context_dense_types)); + TF_RETURN_IF_ERROR( + ctx->GetAttr("feature_list_sparse_types", &feature_list_sparse_types)); + TF_RETURN_IF_ERROR( + ctx->GetAttr("feature_list_dense_types", &feature_list_dense_types)); + TF_RETURN_IF_ERROR( + ctx->GetAttr("Nfeature_list_sparse", &num_feature_list_sparse)); + TF_RETURN_IF_ERROR( + ctx->GetAttr("context_dense_shapes", &context_dense_shapes)); + TF_RETURN_IF_ERROR( + ctx->GetAttr("feature_list_dense_shapes", &feature_list_dense_shapes)); + return FinishInit(op_version); + } + + std::unordered_set feature_list_dense_missing_assumed_empty; + int64_t num_context_sparse; + int64_t num_context_dense; + int64_t num_context_ragged; + int64_t num_feature_list_sparse; + int64_t num_feature_list_dense; + int64_t num_feature_list_ragged; + std::vector context_sparse_keys; + std::vector context_dense_keys; + std::vector feature_list_sparse_keys; + std::vector feature_list_dense_keys; + std::vector context_sparse_types; + std::vector context_dense_types; + std::vector context_dense_shapes; + std::vector feature_list_sparse_types; + std::vector feature_list_dense_types; + std::vector feature_list_dense_shapes; + std::vector context_ragged_value_types; + std::vector context_ragged_split_types; + std::vector feature_list_ragged_value_types; + std::vector feature_list_ragged_split_types; + + private: + Status FinishInit(int op_version); // for context-independent parts of Init. +}; + +// Parses the attributes passed to ParseSingleSequenceExample. +// REQUIRES: Init must be called after construction. +struct ParseSingleSequenceExampleAttrs { + public: + template + Status Init(ContextType* ctx) { + TF_RETURN_IF_ERROR( + ctx->GetAttr("context_sparse_types", &context_sparse_types)); + TF_RETURN_IF_ERROR(ctx->GetAttr("Ncontext_dense", &num_context_dense)); + TF_RETURN_IF_ERROR( + ctx->GetAttr("Nfeature_list_dense", &num_feature_list_dense)); + TF_RETURN_IF_ERROR(ctx->GetAttr("Ncontext_sparse", &num_context_sparse)); + TF_RETURN_IF_ERROR(ctx->GetAttr("Tcontext_dense", &context_dense_types)); + TF_RETURN_IF_ERROR( + ctx->GetAttr("feature_list_sparse_types", &feature_list_sparse_types)); + TF_RETURN_IF_ERROR( + ctx->GetAttr("feature_list_dense_types", &feature_list_dense_types)); + TF_RETURN_IF_ERROR( + ctx->GetAttr("Nfeature_list_sparse", &num_feature_list_sparse)); + TF_RETURN_IF_ERROR( + ctx->GetAttr("context_dense_shapes", &context_dense_shapes)); + TF_RETURN_IF_ERROR( + ctx->GetAttr("feature_list_dense_shapes", &feature_list_dense_shapes)); + return FinishInit(); + } + + int64_t num_context_sparse; + int64_t num_context_dense; + int64_t num_feature_list_sparse; + int64_t num_feature_list_dense; + std::vector context_sparse_types; + std::vector context_dense_types; + std::vector context_dense_shapes; + std::vector feature_list_sparse_types; + std::vector feature_list_dense_types; + std::vector feature_list_dense_shapes; + + private: + Status FinishInit(); // for context-independent parts of Init. +}; + +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_UTIL_EXAMPLE_PROTO_HELPER_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/util/exec_on_stall.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/util/exec_on_stall.h new file mode 100644 index 0000000000000000000000000000000000000000..d4a6c552dfbe088226f6d406030b85d19ffde04b --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/util/exec_on_stall.h @@ -0,0 +1,89 @@ +/* Copyright 2018 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_UTIL_EXEC_ON_STALL_H_ +#define TENSORFLOW_CORE_UTIL_EXEC_ON_STALL_H_ + +#include + +#include "tensorflow/core/platform/env.h" +#include "tensorflow/core/platform/mutex.h" + +namespace tensorflow { + +// An object that executes a particular function only if it +// is not deleted within the allotted number of seconds. +// +// This can be useful in diagnosing deadlocks, stalls and memory leaks +// without logging too aggressively. +class ExecuteOnStall { + public: + // delay_secs: If the object still exists after this many seconds, + // execute f. + // f: The function to be executed, for example a detailed log of the + // the state of an object to which this is attached. + // poll_microseconds: The spawned thread will wake and test whether + // the destructor has been invoked this frequently. + ExecuteOnStall(int delay_secs, std::function f, + int32_t poll_microseconds = 100) + : disabled_(false), + joined_(false), + env_(Env::Default()), + f_(f), + poll_microseconds_(poll_microseconds) { + deadline_ = env_->NowMicros() + 1000000 * delay_secs; + env_->SchedClosure([this]() { + while (env_->NowMicros() < deadline_) { + { + mutex_lock l(mu_); + if (disabled_) { + break; + } + } + env_->SleepForMicroseconds(poll_microseconds_); + } + { + mutex_lock l(mu_); + if (!disabled_) { + f_(); + } + joined_ = true; + cond_var_.notify_all(); + } + }); + } + + ~ExecuteOnStall() { + // Wait for spawned thread to terminate. + mutex_lock l(mu_); + disabled_ = true; + if (!joined_) { + cond_var_.wait(l); + } + } + + private: + mutex mu_; + condition_variable cond_var_; + bool disabled_ TF_GUARDED_BY(mu_); + bool joined_ TF_GUARDED_BY(mu_); + Env* env_; + std::function f_; + int64_t deadline_; + int32 poll_microseconds_; +}; + +} // namespace tensorflow +#endif // TENSORFLOW_CORE_UTIL_EXEC_ON_STALL_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/util/gpu_cuda_alias.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/util/gpu_cuda_alias.h new file mode 100644 index 0000000000000000000000000000000000000000..0a15d15e04a62fd8d986902d580de4bff594a0c6 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/util/gpu_cuda_alias.h @@ -0,0 +1,60 @@ +/* Copyright 2017 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_UTIL_GPU_CUDA_ALIAS_H_ +#define TENSORFLOW_CORE_UTIL_GPU_CUDA_ALIAS_H_ + +// Several forwarding macros are defined in this file to serve for backward +// compatibility usage as we migrating from CUDA prefixed function to GPU +// prefixed functions. Both Cuda and ROCm can unify under the new GPU prefix +// naming scheme. In the migration period, we provide equivalent CUDA* and GPU* +// function. Over time, all CUDA* functions will be deprecated. + +namespace tensorflow { + +// CREATE_CUDA_HOST_FUNCTION_ALIAS forward the host function to its CUDA Alias. +#ifndef TENSORFLOW_USE_ROCM +#define CREATE_CUDA_HOST_FUNCTION_ALIAS(func, cuda_alias) \ + template \ + auto cuda_alias(Args&&... args) \ + ->decltype(func(std::forward(args)...)) { \ + return func(std::forward(args)...); \ + } +#else +#define CREATE_CUDA_HOST_FUNCTION_ALIAS(func, cuda_alias) +#endif + +// CREATE_CUDA_DEVICE_FUNCTION_ALIAS forward the device function to its CUDA +// Alias. +#ifndef TENSORFLOW_USE_ROCM +#define CREATE_CUDA_DEVICE_FUNCTION_ALIAS(func, cuda_alias) \ + template \ + __device__ auto cuda_alias(Args&&... args) \ + ->decltype(func(std::forward(args)...)) { \ + return func(std::forward(args)...); \ + } +#else +#define CREATE_CUDA_DEVICE_FUNCTION_ALIAS(func, cuda_alias) +#endif + +// CREATE_CUDA_TYPE_ALIAS forward the type to its CUDA Alias. +#ifndef TENSORFLOW_USE_ROCM +#define CREATE_CUDA_TYPE_ALIAS(type, cuda_alias) using cuda_alias = type; +#else +#define CREATE_CUDA_TYPE_ALIAS(type, cuda_alias) +#endif +} // namespace tensorflow + +#endif // TENSORFLOW_CORE_UTIL_GPU_CUDA_ALIAS_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/util/gpu_device_functions.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/util/gpu_device_functions.h new file mode 100644 index 0000000000000000000000000000000000000000..a6925459e7357042df414fae1b406870610e139b --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/util/gpu_device_functions.h @@ -0,0 +1,1002 @@ +/* Copyright 2017 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_UTIL_GPU_DEVICE_FUNCTIONS_H_ +#define TENSORFLOW_CORE_UTIL_GPU_DEVICE_FUNCTIONS_H_ + +/** + * Wrappers and helpers for CUDA device code. + * + * Wraps the warp-cooperative intrinsics introduced in CUDA 9 to provide + * backwards compatibility, see go/volta-porting for details. + * Provides atomic operations on types that aren't natively supported. + * Defines a number of macros and types providing a shared interface + * to either CUDA or ROCm APIs, depending on the build. + */ + +#if GOOGLE_CUDA || TENSORFLOW_USE_ROCM + +#include +#include + +#include "unsupported/Eigen/CXX11/Tensor" // from @eigen_archive +#if GOOGLE_CUDA +#include "third_party/gpus/cuda/include/cuda.h" +#else +#include "rocm/include/hip/hip_complex.h" +#endif + +#include "tensorflow/core/platform/types.h" +#include "tensorflow/core/util/gpu_cuda_alias.h" + +#if GOOGLE_CUDA +using gpuStream_t = cudaStream_t; +using gpuEvent_t = cudaEvent_t; +#define gpuEventRecord cudaEventRecord +#define gpuEventSynchronize cudaEventSynchronize +#define gpuEventDestroy cudaEventDestroy +#define gpuEventCreate cudaEventCreate +#define gpuEventCreateWithFlags cudaEventCreateWithFlags +#define gpuEventDisableTiming cudaEventDisableTiming +#define gpuDeviceSynchronize cudaDeviceSynchronize +#define gpuFree cudaFree +#elif TENSORFLOW_USE_ROCM +using gpuStream_t = hipStream_t; +using gpuEvent_t = hipEvent_t; +using cudaError = int; +using cudaError_t = int; +#define cudaSuccess 0 +#define cudaGetLastError hipGetLastError +#define gpuEventRecord hipEventRecord +#define gpuEventDestroy hipEventDestroy +#define gpuEventSynchronize hipEventSynchronize +#define gpuEventCreate hipEventCreate +#define gpuEventCreateWithFlags hipEventCreateWithFlags +#define gpuEventDisableTiming hipEventDisableTiming +#define gpuDeviceSynchronize hipDeviceSynchronize +#define gpuFree hipFree +static std::string cudaGetErrorString(int err) { return std::to_string(err); } +#endif + +#define TF_RETURN_IF_CUDA_ERROR(result) \ + do { \ + cudaError_t error(result); \ + if (!SE_PREDICT_TRUE(error == cudaSuccess)) { \ + return errors::Internal("Cuda call failed with ", \ + cudaGetErrorString(error)); \ + } \ + } while (0) + +#define TF_OP_REQUIRES_CUDA_SUCCESS(context, result) \ + do { \ + cudaError_t error(result); \ + if (!SE_PREDICT_TRUE(error == cudaSuccess)) { \ + context->SetStatus(errors::Internal("Cuda call failed with", \ + cudaGetErrorString(error))); \ + return; \ + } \ + } while (0) + +namespace tensorflow { +// According to HIP developer guide at +// https://github.com/ROCm-Developer-Tools/HIP/blob/master/docs/markdown/hip_kernel_language.md#assert +// assert is not supported by HIP. While we are waiting for assert support in +// hip kernels, the assert call should be macroed to NOP so that it does not +// block us from creating a debug build +#if TENSORFLOW_USE_ROCM +#undef assert +#define assert(x) \ + {} +#endif + +namespace detail { + +// Helper for range-based for loop using 'delta' increments. +// Usage: see GpuGridRange?() functions below. +template +class GpuGridRange { + struct Iterator { + __device__ Iterator(T index, T delta) : index_(index), delta_(delta) {} + __device__ T operator*() const { return index_; } + __device__ Iterator& operator++() { + index_ += delta_; + return *this; + } + __device__ bool operator!=(const Iterator& other) const { + bool greater = index_ > other.index_; + bool less = index_ < other.index_; + // Anything past an end iterator (delta_ == 0) is equal. + // In range-based for loops, this optimizes to 'return less'. + if (!other.delta_) { + return less; + } + if (!delta_) { + return greater; + } + return less || greater; + } + + private: + T index_; + const T delta_; + }; + + public: + __device__ GpuGridRange(T begin, T delta, T end) + : begin_(begin), delta_(delta), end_(end) {} + + __device__ Iterator begin() const { return Iterator{begin_, delta_}; } + __device__ Iterator end() const { return Iterator{end_, 0}; } + + private: + T begin_; + T delta_; + T end_; +}; + +#ifndef TENSORFLOW_USE_ROCM +template +using CudaGridRange = GpuGridRange; +#endif +} // namespace detail + +// Helper to visit indices in the range 0 <= i < count, using the x-coordinate +// of the global thread index. That is, each index i is visited by all threads +// with the same x-coordinate. +// Usage: for(int i : GpuGridRangeX(count)) { visit(i); } +template +__device__ detail::GpuGridRange GpuGridRangeX(T count) { + return detail::GpuGridRange( + /*begin=*/blockIdx.x * blockDim.x + threadIdx.x, + /*delta=*/gridDim.x * blockDim.x, /*end=*/count); +} +CREATE_CUDA_DEVICE_FUNCTION_ALIAS(GpuGridRangeX, CudaGridRangeX); + +// Helper to visit indices in the range 0 <= i < count using the y-coordinate. +// Usage: for(int i : GpuGridRangeY(count)) { visit(i); } +template +__device__ detail::GpuGridRange GpuGridRangeY(T count) { + return detail::GpuGridRange( + /*begin=*/blockIdx.y * blockDim.y + threadIdx.y, + /*delta=*/gridDim.y * blockDim.y, /*end=*/count); +} +CREATE_CUDA_DEVICE_FUNCTION_ALIAS(GpuGridRangeY, CudaGridRangeY); + +// Helper to visit indices in the range 0 <= i < count using the z-coordinate. +// Usage: for(int i : GpuGridRangeZ(count)) { visit(i); } +template +__device__ detail::GpuGridRange GpuGridRangeZ(T count) { + return detail::GpuGridRange( + /*begin=*/blockIdx.z * blockDim.z + threadIdx.z, + /*delta=*/gridDim.z * blockDim.z, /*end=*/count); +} +CREATE_CUDA_DEVICE_FUNCTION_ALIAS(GpuGridRangeZ, CudaGridRangeZ); + +// Mask for all 32 threads in a warp. +__device__ const unsigned kCudaWarpAll = 0xffffffff; +// ROCM TODO add ROCM implementation +// Mask for all 64 threads in a wavefront. +__device__ const unsigned kGpuWarpAll = 0xffffffff; + +// Returns the warp lane ID of the calling thread +__device__ inline unsigned GpuLaneId() { + unsigned int lane_id; +#if GOOGLE_CUDA +#if __clang__ + return __nvvm_read_ptx_sreg_laneid(); +#else // __clang__ + asm("mov.u32 %0, %%laneid;" : "=r"(lane_id)); +#endif // __clang__ +#elif TENSORFLOW_USE_ROCM + lane_id = __lane_id(); +#endif + return lane_id; +} +CREATE_CUDA_DEVICE_FUNCTION_ALIAS(GpuLaneId, CudaLaneId); + +namespace detail { +// Returns true if mask is a valid parameter for __shfl*sync to return a well +// defined value, assuming the calling lane will read from src_lane as part of +// the shuffle operation. +// +// Specifically, returns true iff mask has the calling lane bit and the src_lane +// bit set, and the src_lane calls this function with the same mask value +// (required for the two threads to wait for each other). +// +// On Volta, for some invalid masks, this function hangs or returns false +// positives, because the implementation shuffles with the same mask that +// we are validating. Run on Pascal if you suspect that the mask is incorrect. +__device__ inline bool GpuValidateShuffleSyncMask(unsigned mask, + unsigned src_lane) { + unsigned src_dst_mask = 1u << GpuLaneId() | 1u << src_lane; +#if GOOGLE_CUDA + unsigned src_lane_mask = __shfl_sync(mask, mask, src_lane); +#else // TENSORFLOW_USE_ROCM + unsigned src_lane_mask = + __shfl(static_cast(mask), static_cast(src_lane)); +#endif + return (src_dst_mask & ~mask) == 0 && src_lane_mask == mask; +} +CREATE_CUDA_DEVICE_FUNCTION_ALIAS(GpuValidateShuffleSyncMask, + CudaValidateShuffleSyncMask); + +// Returns the actual source lane for shuffle. +__device__ inline unsigned GpuShuffleGetSrcLane(int src_lane, int width) { + int lane_id = GpuLaneId(); + int lane_base = lane_id & ~width + 1; + int lane_offset = src_lane & width - 1; + return lane_base + lane_offset; +} +CREATE_CUDA_DEVICE_FUNCTION_ALIAS(GpuShuffleGetSrcLane, CudaShuffleGetSrcLane); + +// Returns the source lane for shuffle up. +__device__ inline unsigned GpuShuffleUpGetSrcLane(unsigned delta, int width) { + unsigned lane_id = GpuLaneId(); + if ((lane_id & width - 1) < delta) { + return lane_id; + } + return lane_id - delta; +} +CREATE_CUDA_DEVICE_FUNCTION_ALIAS(GpuShuffleUpGetSrcLane, + CudaShuffleUpGetSrcLane); + +// Returns the source lane for shuffle down. +__device__ inline unsigned GpuShuffleDownGetSrcLane(unsigned delta, int width) { + unsigned lane_id = GpuLaneId(); + if ((lane_id & width - 1) + delta >= width) { + return lane_id; + } + return lane_id + delta; +} +CREATE_CUDA_DEVICE_FUNCTION_ALIAS(GpuShuffleDownGetSrcLane, + CudaShuffleDownGetSrcLane); + +// Returns the source lane for shuffle xor. +__device__ inline unsigned GpuShuffleXorGetSrcLane(int lane_mask, int width) { + int lane_id = GpuLaneId(); + int src_lane = lane_id ^ lane_mask; + if (src_lane > (lane_id | width - 1)) { + return lane_id; + } + return src_lane; +} +CREATE_CUDA_DEVICE_FUNCTION_ALIAS(GpuShuffleXorGetSrcLane, + CudaShuffleXorGetSrcLane); +} // namespace detail + +// For all *_sync wrappers below, it is illegal to synchronize threads from +// different program locations, because that is not supported before sm_70. +// In other words, all threads in 'mask' must call the functions in convergence. +// Code that requires sm_70 (and CUDA 9) may use the intrinsic directly. +// +// It is also illegal to shuffle with a mask that produces an undefined result +// for any of the threads. Specifically, all source threads of the shuffle +// must have their corresponding bit in 'mask' set. + +// Wrapper for __syncwarp. No-op for CUDA 8 and earlier. +__device__ inline void GpuSyncWarp(unsigned mask = kCudaWarpAll) { + assert(mask & 1u << GpuLaneId()); +#if GOOGLE_CUDA + __syncwarp(mask); +#endif +} +CREATE_CUDA_DEVICE_FUNCTION_ALIAS(GpuSyncWarp, CudaSyncWarp); + +// Wrapper for __ballot_sync. All threads in 'mask' must call this function in +// convergence, see comment above for details. +__device__ inline unsigned GpuBallotSync(unsigned mask, int pred) { + assert(mask & 1u << GpuLaneId()); +#if GOOGLE_CUDA + return __ballot_sync(mask, pred); +#else // TENSORFLOW_USE_ROCM + return __ballot(pred) & mask; // Apply mask to match __ballot_sync's spec. +#endif +} +CREATE_CUDA_DEVICE_FUNCTION_ALIAS(GpuBallotSync, CudaBallotSync); + +// Wrapper for __any_sync. All threads in 'mask' must call this function in +// convergence, see comment above for details. +__device__ inline int GpuAnySync(unsigned mask, int pred) { + assert(mask & 1u << GpuLaneId()); +#if GOOGLE_CUDA + return __any_sync(mask, pred); +#else // TENSORFLOW_USE_ROCM + return __any(pred); +#endif +} +CREATE_CUDA_DEVICE_FUNCTION_ALIAS(GpuAnySync, CudaAnySync); + +// Wrapper for __all_sync. All threads in 'mask' must call this function in +// convergence, see comment above for details. +__device__ inline int GpuAllSync(unsigned mask, int pred) { + assert(mask & 1u << GpuLaneId()); +#if GOOGLE_CUDA + return __all_sync(mask, pred); +#else // TENSORFLOW_USE_ROCM + return __all(pred); +#endif +} +CREATE_CUDA_DEVICE_FUNCTION_ALIAS(GpuAllSync, CudaAllSync); + +// Wrapper for __shfl_sync. All threads in 'mask' must call this function in +// convergence, see comment above for details. +template +__device__ T GpuShuffleSync(unsigned mask, T value, int src_lane, + int width = warpSize) { + assert(!(width & width - 1)); + assert(detail::GpuValidateShuffleSyncMask( + mask, detail::GpuShuffleGetSrcLane(src_lane, width))); +#if GOOGLE_CUDA + return __shfl_sync(mask, value, src_lane, width); +#else // TENSORFLOW_USE_ROCM + return __shfl(value, src_lane, width); +#endif +} + +// Variant of the (undocumented) version from the CUDA SDK, but using unsigned +// instead of float for lo and hi (which is incorrect with ftz, for example). +// See b/69446944. +__device__ inline double GpuShuffleSync(unsigned mask, double value, + int src_lane, int width = warpSize) { +#if GOOGLE_CUDA + auto tmp = __double_as_longlong(value); + auto lo = static_cast(tmp); + auto hi = static_cast(tmp >> 32); + hi = GpuShuffleSync(mask, hi, src_lane, width); + lo = GpuShuffleSync(mask, lo, src_lane, width); + return __longlong_as_double(static_cast(hi) << 32 | lo); +#elif TENSORFLOW_USE_ROCM + auto tmp = static_cast(value); + auto lo = static_cast(tmp); + auto hi = static_cast(tmp >> 32); + hi = __shfl(static_cast(hi), src_lane, width); + lo = __shfl(static_cast(lo), src_lane, width); + return static_cast(static_cast(hi) << 32 | + static_cast(lo)); +#endif +} +CREATE_CUDA_DEVICE_FUNCTION_ALIAS(GpuShuffleSync, CudaShuffleSync); + +// Wrapper for __shfl_up_sync. All threads in 'mask' must call this function in +// convergence, see comment above for details. +template +__device__ inline T GpuShuffleUpSync(unsigned mask, T value, unsigned delta, + int width = warpSize) { + assert(!(width & width - 1)); + assert(detail::GpuValidateShuffleSyncMask( + mask, detail::GpuShuffleUpGetSrcLane(delta, width))); +#if GOOGLE_CUDA + return __shfl_up_sync(mask, value, delta, width); +#else // TENSORFLOW_USE_ROCM + return __shfl_up(value, delta, width); +#endif +} + +// Variant of the (undocumented) version from the CUDA SDK, but using unsigned +// instead of float for lo and hi (which is incorrect with ftz, for example). +// See b/69446944. +__device__ inline double GpuShuffleUpSync(unsigned mask, double value, + unsigned delta, + int width = warpSize) { +#if GOOGLE_CUDA + auto tmp = __double_as_longlong(value); + auto lo = static_cast(tmp); + auto hi = static_cast(tmp >> 32); + hi = GpuShuffleUpSync(mask, hi, delta, width); + lo = GpuShuffleUpSync(mask, lo, delta, width); + return __longlong_as_double(static_cast(hi) << 32 | lo); +#elif TENSORFLOW_USE_ROCM + auto tmp = static_cast(value); + auto lo = static_cast(tmp); + auto hi = static_cast(tmp >> 32); + hi = __shfl_up(static_cast(hi), delta, width); + lo = __shfl_up(static_cast(lo), delta, width); + return static_cast(static_cast(hi) << 32 | + static_cast(lo)); +#endif +} +CREATE_CUDA_DEVICE_FUNCTION_ALIAS(GpuShuffleUpSync, CudaShuffleUpSync); + +// Wrapper for __shfl_down_sync. All threads in 'mask' must call this function +// in convergence, see comment above for details. +template +__device__ inline T GpuShuffleDownSync(unsigned mask, T value, unsigned delta, + int width = warpSize) { + assert(!(width & width - 1)); + assert(detail::GpuValidateShuffleSyncMask( + mask, detail::GpuShuffleDownGetSrcLane(delta, width))); +#if GOOGLE_CUDA + return __shfl_down_sync(mask, value, delta, width); +#else // TENSORFLOW_USE_ROCM + return __shfl_down(value, delta, width); +#endif +} + +// Variant of the (undocumented) version from the CUDA SDK, but using unsigned +// instead of float for lo and hi (which is incorrect with ftz, for example). +// See b/69446944. +__device__ inline double GpuShuffleDownSync(unsigned mask, double value, + unsigned delta, + int width = warpSize) { +#if GOOGLE_CUDA + auto tmp = __double_as_longlong(value); + auto lo = static_cast(tmp); + auto hi = static_cast(tmp >> 32); + hi = GpuShuffleDownSync(mask, hi, delta, width); + lo = GpuShuffleDownSync(mask, lo, delta, width); + return __longlong_as_double(static_cast(hi) << 32 | lo); +#elif TENSORFLOW_USE_ROCM + auto tmp = static_cast(value); + auto lo = static_cast(tmp); + auto hi = static_cast(tmp >> 32); + hi = __shfl_down(static_cast(hi), delta, width); + lo = __shfl_down(static_cast(lo), delta, width); + return static_cast(static_cast(hi) << 32 | + static_cast(lo)); +#endif +} +CREATE_CUDA_DEVICE_FUNCTION_ALIAS(GpuShuffleDownSync, CudaShuffleDownSync); + +// Wrapper for __shfl_xor_sync. All threads in 'mask' must call this function in +// convergence, see comment above for details. +template +__device__ T GpuShuffleXorSync(unsigned mask, T value, int lane_mask, + int width = warpSize) { + assert(!(width & width - 1)); + assert(detail::GpuValidateShuffleSyncMask( + mask, detail::GpuShuffleXorGetSrcLane(lane_mask, width))); +#if GOOGLE_CUDA + return __shfl_xor_sync(mask, value, lane_mask, width); +#elif TENSORFLOW_USE_ROCM + // ROCM TODO: check if HIP should be changed to cope with more types + return __shfl_xor(static_cast(value), lane_mask, width); +#endif +} + +#if TENSORFLOW_USE_ROCM +__device__ inline Eigen::half GpuShuffleXorSync(unsigned mask, + Eigen::half value, + int lane_mask, + int width = warpSize) { + assert(!(width & width - 1)); + assert(detail::GpuValidateShuffleSyncMask( + mask, detail::GpuShuffleXorGetSrcLane(lane_mask, width))); + // TODO(rocm): This doesn't preserve NaN payload and flushes denorms to zero, + // maybe this should be implemented differently? + return static_cast( + __shfl_xor(static_cast(value), lane_mask, width)); +} +#endif + +// Variant of the (undocumented) version from the CUDA SDK, but using unsigned +// instead of float for lo and hi (which is incorrect with ftz, for example). +// See b/69446944. +__device__ inline double GpuShuffleXorSync(unsigned mask, double value, + int lane_mask, + int width = warpSize) { +#if GOOGLE_CUDA + auto tmp = __double_as_longlong(value); + auto lo = static_cast(tmp); + auto hi = static_cast(tmp >> 32); + hi = GpuShuffleXorSync(mask, hi, lane_mask, width); + lo = GpuShuffleXorSync(mask, lo, lane_mask, width); + return __longlong_as_double(static_cast(hi) << 32 | lo); +#elif TENSORFLOW_USE_ROCM + auto tmp = static_cast(value); + auto lo = static_cast(tmp); + auto hi = static_cast(tmp >> 32); + hi = __shfl_xor(static_cast(hi), lane_mask, width); + lo = __shfl_xor(static_cast(lo), lane_mask, width); + return static_cast(static_cast(hi) << 32 | + static_cast(lo)); +#endif +} +CREATE_CUDA_DEVICE_FUNCTION_ALIAS(GpuShuffleXorSync, CudaShuffleXorSync); + +// Wrapper for __ldg. +template +__host__ __device__ T GpuLdg(const T* address) { +#if __CUDA_ARCH__ >= 350 + return __ldg(address); +#else + return *address; +#endif +} + +__host__ __device__ inline bool GpuLdg(const bool* address) { + return GpuLdg(reinterpret_cast(address)) != 0; +} + +__host__ __device__ inline std::complex GpuLdg( + const std::complex* address) { +#if __CUDA_ARCH__ >= 350 + float2 mem = __ldg(reinterpret_cast(address)); + return std::complex(mem.x, mem.y); +#else + return *address; +#endif +} + +__host__ __device__ inline std::complex GpuLdg( + const std::complex* address) { +#if __CUDA_ARCH__ >= 350 + double2 mem = __ldg(reinterpret_cast(address)); + return std::complex(mem.x, mem.y); +#else + return *address; +#endif +} +CREATE_CUDA_DEVICE_FUNCTION_ALIAS(GpuLdg, CudaLdg); + +// Zeroes count elements starting at ptr using all threads of a 1-D grid. +// Note: this function does not synchronize, and therefore the memory range is +// not guaranteed to be zero until the next kernel launch. +template +__global__ void SetZero(const int count, T* __restrict__ ptr) { + // Check that the grid is one dimensional and index doesn't overflow. + assert(blockDim.y == 1); + assert(blockDim.z == 1); + assert(blockDim.x * gridDim.x / blockDim.x == gridDim.x); + for (int i : GpuGridRangeX(count)) { + ptr[i] = T(0); + } +} + +// Helper to set all tensor entries to a specific value. +template +__global__ void SetToValue(const int count, T* __restrict__ ptr, Tvalue value) { + // Check that the grid is one dimensional and index doesn't overflow. + assert(blockDim.y == 1); + assert(blockDim.z == 1); + assert(blockDim.x * gridDim.x / blockDim.x == gridDim.x); + for (int i : GpuGridRangeX(count)) { + ptr[i] = static_cast(value); + } +} + +namespace detail { +// Helper function for atomic accumulation implemented as CAS. +template +__device__ T GpuAtomicCasHelper(T* ptr, F accumulate) { + T old = *ptr; + T assumed; + do { + assumed = old; + old = atomicCAS(ptr, assumed, accumulate(assumed)); + } while (assumed != old); + return old; +} +CREATE_CUDA_DEVICE_FUNCTION_ALIAS(GpuAtomicCasHelper, CudaAtomicCasHelper); + +// Overload for floating point (using integer comparison to handle NaN +// correctly). +template +__device__ float GpuAtomicCasHelper(float* ptr, F accumulate) { + return __int_as_float( + GpuAtomicCasHelper(reinterpret_cast(ptr), [accumulate](int32 a) { + return __float_as_int(accumulate(__int_as_float(a))); + })); +} +template +__device__ double GpuAtomicCasHelper(double* ptr, F accumulate) { +#if TENSORFLOW_USE_ROCM + // FIXME: remove the workaround below once bug is fixed. + // HIP has a bug in the implementation of __longlong_as_double + // So workaround it by using reinterpret_cast. + uint64_t result = + GpuAtomicCasHelper(reinterpret_cast(ptr), + [accumulate](tensorflow::uint64 a) { + return __double_as_longlong( + accumulate(*(reinterpret_cast(&a)))); + }); + return *(reinterpret_cast(&result)); +#else + return __longlong_as_double(GpuAtomicCasHelper( + reinterpret_cast(ptr), + [accumulate](tensorflow::uint64 a) { + return __double_as_longlong(accumulate(__longlong_as_double(a))); + })); +#endif +} + +// Overload of above function for half. Note that we don't have +// atomicCAS() for anything less than 32 bits, so we need to include the +// other 16 bits in the operation. +// +// This version is going to be very slow +// under high concurrency, since most threads will be spinning on failing +// their compare-and-swap tests. (The fact that we get false sharing on the +// neighboring fp16 makes this even worse.) If you are doing a large reduction, +// you are much better off with doing the intermediate steps in fp32 and then +// switching to fp16 as late as you can in the calculations. +// +// Note: Assumes little endian. +template +__device__ Eigen::half GpuAtomicCasHelper(Eigen::half* ptr, F accumulate) { +#if defined(__BYTE_ORDER__) && defined(__ORDER_LITTLE_ENDIAN__) + static_assert(__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__, "Not little endian"); +#endif + intptr_t intptr = reinterpret_cast(ptr); + assert(!(intptr & 0x1)); // should be 2-aligned. + if (intptr & 0x2) { + // The half is in the second part of the uint32 (upper 16 bits). + uint32* address = reinterpret_cast(intptr - 2); + uint32 result = GpuAtomicCasHelper(address, [accumulate](uint32 arg) { + unsigned short high = static_cast(arg >> 16); + Eigen::half acc = accumulate(Eigen::numext::bit_cast(high)); + return (static_cast(Eigen::numext::bit_cast(acc)) << 16) | + (arg & 0xffff); + }); + return Eigen::numext::bit_cast( + static_cast(result >> 16)); + } else { + // The half is in the first part of the uint32 (lower 16 bits). + uint32* address = reinterpret_cast(intptr); + uint32 result = GpuAtomicCasHelper(address, [accumulate](uint32 arg) { + unsigned short low = static_cast(arg & 0xffff); + Eigen::half acc = accumulate(Eigen::numext::bit_cast(low)); + return (arg & 0xffff0000) | + static_cast(Eigen::numext::bit_cast(acc)); + }); + return Eigen::numext::bit_cast( + static_cast(result & 0xffff)); + } +} + +template +__device__ Eigen::bfloat16 GpuAtomicCasHelper(Eigen::bfloat16* ptr, + F accumulate) { + Eigen::half ret = detail::GpuAtomicCasHelper( + reinterpret_cast(ptr), [accumulate](Eigen::half a) { + Eigen::bfloat16 acc = + accumulate(Eigen::numext::bit_cast(a)); + return Eigen::numext::bit_cast(acc); + }); + return Eigen::numext::bit_cast(ret); +} + +template +__device__ long long GpuAtomicCasHelper(long long* ptr, F accumulate) { + return static_cast( + GpuAtomicCasHelper(reinterpret_cast(ptr), + [accumulate](unsigned long long a) { + return static_cast( + accumulate(static_cast(a))); + })); +} + +template +using ToTypeIfConvertible = + typename std::enable_if::value, To>::type; + +template +struct CudaSupportedTypeImpl { + using type = T; +}; + +template <> +struct CudaSupportedTypeImpl { + using type = unsigned long long; +}; + +template <> +struct CudaSupportedTypeImpl { + using type = + typename std::conditional::type; +}; + +template <> +struct CudaSupportedTypeImpl { + // This cast should be safe since module-2 addition should work fine. However, + // signed overflow is not handled correctly since it's undefined behavior. + using type = typename CudaSupportedTypeImpl::type; +}; + +template +using CudaSupportedType = typename CudaSupportedTypeImpl::type; + +template +__device__ CudaSupportedType* ToCudaSupportedPtr(T* ptr) { + return reinterpret_cast*>(ptr); +} + +} // namespace detail + +// CUDA provides atomic ops, but not for all types. We provide wrappers +// for some ops and provide implementation for all reasonable types. + +template +__device__ detail::ToTypeIfConvertible GpuAtomicAdd(T* ptr, U value) { + return atomicAdd(detail::ToCudaSupportedPtr(ptr), value); +} + +__device__ inline Eigen::half GpuAtomicAdd(Eigen::half* ptr, + Eigen::half value) { + return detail::GpuAtomicCasHelper( + ptr, [value](Eigen::half a) { return a + value; }); +} + +__device__ inline Eigen::bfloat16 GpuAtomicAdd(Eigen::bfloat16* ptr, + Eigen::bfloat16 value) { + return detail::GpuAtomicCasHelper( + ptr, [value](Eigen::bfloat16 a) { return a + value; }); +} + +#if (__CUDA_ARCH__ < 600) || TENSORFLOW_USE_ROCM +__device__ inline double GpuAtomicAdd(double* ptr, double value) { + return detail::GpuAtomicCasHelper(ptr, + [value](double a) { return a + value; }); +} +#endif + +// GpuAtomicAdd +// Specializations of GpuAtomicAdd for complex types, which GpuAtomicAdd does +// not support. We treat a std::complex* as a T* (the C++ standard section +// 26.4.4 allows this explicitly) and atomic add the real and imaginary +// components individually. The operation as a whole is not atomic, but we can +// safely treat the components independently for the purpose of accumulating. + +#if GOOGLE_CUDA || TENSORFLOW_USE_ROCM +__device__ inline std::complex GpuAtomicAdd(std::complex* ptr, + std::complex value) { + auto ptr_scalar = reinterpret_cast(ptr); + return std::complex(GpuAtomicAdd(ptr_scalar, value.real()), + GpuAtomicAdd(ptr_scalar + 1, value.imag())); +} + +__device__ inline std::complex GpuAtomicAdd( + std::complex* ptr, std::complex value) { + auto ptr_scalar = reinterpret_cast(ptr); + return std::complex(GpuAtomicAdd(ptr_scalar, value.real()), + GpuAtomicAdd(ptr_scalar + 1, value.imag())); +} +#endif +CREATE_CUDA_DEVICE_FUNCTION_ALIAS(GpuAtomicAdd, CudaAtomicAdd); + +// GpuAtomicSub +template +__device__ detail::ToTypeIfConvertible GpuAtomicSub(T* ptr, U value) { + return atomicSub(ptr, value); +} + +// Specializations of substraction which add the negative value. +__device__ inline float GpuAtomicSub(float* ptr, float value) { + return GpuAtomicAdd(ptr, -value); +} + +__device__ inline double GpuAtomicSub(double* ptr, double value) { + return GpuAtomicAdd(ptr, -value); +} + +__device__ inline int64_t GpuAtomicSub(int64_t* ptr, int64_t value) { + return GpuAtomicAdd(ptr, -value); +} + +__device__ inline tensorflow::uint64 GpuAtomicSub(tensorflow::uint64* ptr, + tensorflow::uint64 value) { + return GpuAtomicAdd(ptr, -static_cast(value)); +} + +__device__ inline Eigen::half GpuAtomicSub(Eigen::half* ptr, + Eigen::half value) { + return detail::GpuAtomicCasHelper( + ptr, [value](Eigen::half a) { return a - value; }); +} + +__device__ inline Eigen::bfloat16 GpuAtomicSub(Eigen::bfloat16* ptr, + Eigen::bfloat16 value) { + return detail::GpuAtomicCasHelper( + ptr, [value](Eigen::bfloat16 a) { return a - value; }); +} + +CREATE_CUDA_DEVICE_FUNCTION_ALIAS(GpuAtomicSub, CudaAtomicSub); + +// GpuAtomicMax +template +__device__ detail::ToTypeIfConvertible GpuAtomicMax(T* ptr, U value) { + return atomicMax(detail::ToCudaSupportedPtr(ptr), value); +} + +#if TENSORFLOW_USE_ROCM + +/* + * CUDA runtime headers have the following defined + * __device__ int max(int, int) + * __device__ float max(float, float) + * __device__ double max(double, double) + * + * and many others, where as HIP runtime headers only have the "int" version + * + * Therefore need to special case ROCm version to call the correct underlying + * routines for float and double types. + * + */ + +__device__ inline float GpuAtomicMax(float* ptr, float value) { + return detail::GpuAtomicCasHelper( + ptr, [value](float a) { return fmaxf(a, value); }); +} + +__device__ inline double GpuAtomicMax(double* ptr, double value) { + return detail::GpuAtomicCasHelper( + ptr, [value](double a) { return fmax(a, value); }); +} + +#else + +__device__ inline float GpuAtomicMax(float* ptr, float value) { + return detail::GpuAtomicCasHelper(ptr, + [value](float a) { return max(a, value); }); +} + +__device__ inline double GpuAtomicMax(double* ptr, double value) { + return detail::GpuAtomicCasHelper( + ptr, [value](double a) { return max(a, value); }); +} + +#endif + +__device__ inline Eigen::half GpuAtomicMax(Eigen::half* ptr, + Eigen::half value) { + return detail::GpuAtomicCasHelper( + ptr, [value](Eigen::half a) { return max(a, value); }); +} + +__device__ inline Eigen::bfloat16 GpuAtomicMax(Eigen::bfloat16* ptr, + Eigen::bfloat16 value) { + return detail::GpuAtomicCasHelper( + ptr, [value](Eigen::bfloat16 a) { return max(a, value); }); +} + +#if TENSORFLOW_USE_ROCM || (__CUDA_ARCH__ < 320) +__device__ inline tensorflow::uint64 GpuAtomicMax(tensorflow::uint64* ptr, + tensorflow::uint64 value) { + return detail::GpuAtomicCasHelper( + detail::ToCudaSupportedPtr(ptr), + [value](tensorflow::uint64 a) { return max(a, value); }); +} + +__device__ inline int64_t GpuAtomicMax(int64_t* ptr, int64_t value) { + return detail::GpuAtomicCasHelper( + detail::ToCudaSupportedPtr(ptr), + [value](int64_t a) { return max(a, value); }); +} +#endif +CREATE_CUDA_DEVICE_FUNCTION_ALIAS(GpuAtomicMax, CudaAtomicMax); + +// GpuAtomicMin +template +__device__ detail::ToTypeIfConvertible GpuAtomicMin(T* ptr, U value) { + return atomicMin(detail::ToCudaSupportedPtr(ptr), value); +} + +#if TENSORFLOW_USE_ROCM + +/* + * CUDA runtime headers have the following defined + * __device__ int min(int, int) + * __device__ float min(float, float) + * __device__ double min(double, double) + * + * and many others, where as HIP runtime headers only have the "int" version + * + * Therefore need to special case ROCm version to call the correct underlying + * routines for float and double types. + * + */ + +__device__ inline float GpuAtomicMin(float* ptr, float value) { + return detail::GpuAtomicCasHelper( + ptr, [value](float a) { return fminf(a, value); }); +} + +__device__ inline double GpuAtomicMin(double* ptr, double value) { + return detail::GpuAtomicCasHelper( + ptr, [value](double a) { return fmin(a, value); }); +} + +#else + +__device__ inline float GpuAtomicMin(float* ptr, float value) { + return detail::GpuAtomicCasHelper(ptr, + [value](float a) { return min(a, value); }); +} + +__device__ inline double GpuAtomicMin(double* ptr, double value) { + return detail::GpuAtomicCasHelper( + ptr, [value](double a) { return min(a, value); }); +} + +#endif + +__device__ inline Eigen::half GpuAtomicMin(Eigen::half* ptr, + Eigen::half value) { + return detail::GpuAtomicCasHelper( + ptr, [value](Eigen::half a) { return min(a, value); }); +} + +__device__ inline Eigen::bfloat16 GpuAtomicMin(Eigen::bfloat16* ptr, + Eigen::bfloat16 value) { + return detail::GpuAtomicCasHelper( + ptr, [value](Eigen::bfloat16 a) { return min(a, value); }); +} + +#if TENSORFLOW_USE_ROCM || (__CUDA_ARCH__ < 320) +__device__ inline tensorflow::uint64 GpuAtomicMin(tensorflow::uint64* ptr, + tensorflow::uint64 value) { + return detail::GpuAtomicCasHelper( + detail::ToCudaSupportedPtr(ptr), + [value](tensorflow::uint64 a) { return min(a, value); }); +} + +__device__ inline int64_t GpuAtomicMin(int64_t* ptr, int64_t value) { + return detail::GpuAtomicCasHelper( + detail::ToCudaSupportedPtr(ptr), + [value](int64_t a) { return min(a, value); }); +} +#endif +CREATE_CUDA_DEVICE_FUNCTION_ALIAS(GpuAtomicMin, CudaAtomicMin); + +// GpuAtomicMul +template +__device__ detail::ToTypeIfConvertible GpuAtomicMul(T* ptr, U value) { + return detail::GpuAtomicCasHelper(ptr, [value](T a) { return a * value; }); +} +CREATE_CUDA_DEVICE_FUNCTION_ALIAS(GpuAtomicMul, CudaAtomicMul); + +// GpuAtomicDiv +template +__device__ detail::ToTypeIfConvertible GpuAtomicDiv(T* ptr, U value) { + return detail::GpuAtomicCasHelper(ptr, [value](T a) { return a / value; }); +} +CREATE_CUDA_DEVICE_FUNCTION_ALIAS(GpuAtomicDiv, CudaAtomicDiv); + +// Import all specialized std::complex device operators in namespace tensorflow. +#if GOOGLE_CUDA && defined(EIGEN_USING_STD_COMPLEX_OPERATORS) +EIGEN_USING_STD_COMPLEX_OPERATORS +#endif // GOOGLE_CUDA + +namespace functor { +// Import all specialized std::complex device operators in namespace functor. +#if GOOGLE_CUDA && defined(EIGEN_USING_STD_COMPLEX_OPERATORS) +EIGEN_USING_STD_COMPLEX_OPERATORS +#endif // GOOGLE_CUDA + +// ROCm hcc(clang) has severe difficulties dealing with std::complex directly +// due to a header issue. This template assists in casting std::complex into the +// corresponding internal ROCm types. +template +struct MapComplexToHipComplex { + typedef T TM; +}; + +#if TENSORFLOW_USE_ROCM +template <> +struct MapComplexToHipComplex > { + typedef hipFloatComplex TM; +}; + +template <> +struct MapComplexToHipComplex > { + typedef hipDoubleComplex TM; +}; +#endif +}; // namespace functor + +} // namespace tensorflow + +#endif // GOOGLE_CUDA || TENSORFLOW_USE_ROCM +#endif // TENSORFLOW_CORE_UTIL_GPU_DEVICE_FUNCTIONS_H_ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/util/gpu_kernel_helper.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/util/gpu_kernel_helper.h new file mode 100644 index 0000000000000000000000000000000000000000..ae9894cccde6d9d40e37a62785e67331afcff5dd --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/tensorflow/include/tensorflow/core/util/gpu_kernel_helper.h @@ -0,0 +1,524 @@ +/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef TENSORFLOW_CORE_UTIL_GPU_KERNEL_HELPER_H_ +#define TENSORFLOW_CORE_UTIL_GPU_KERNEL_HELPER_H_ + +#if GOOGLE_CUDA || TENSORFLOW_USE_ROCM + +#include + +#if GOOGLE_CUDA +#include "third_party/gpus/cuda/include/cuda_fp16.h" +#endif +#include "tensorflow/core/util/gpu_cuda_alias.h" +#include "tensorflow/core/util/gpu_device_functions.h" +#include "tensorflow/core/util/gpu_launch_config.h" + +#if GOOGLE_CUDA +#define TF_RED_WARPSIZE 32 +#elif TENSORFLOW_USE_ROCM +#define TF_RED_WARPSIZE 64 +#endif + +// Deprecated, use 'for(int i : GpuGridRangeX(n))' instead. +#define GPU_1D_KERNEL_LOOP(i, n) \ + for (int i : ::tensorflow::GpuGridRangeX(n)) +#define CUDA_1D_KERNEL_LOOP(i, n) \ + for (int i : ::tensorflow::GpuGridRangeX(n)) + +// Deprecated, use 'for(int i : GpuGridRange?(n))' instead. +#define GPU_AXIS_KERNEL_LOOP(i, n, axis) \ + for (int i : ::tensorflow::GpuGridRange##axis(n)) +#define CUDA_AXIS_KERNEL_LOOP(i, n, axis) \ + for (int i : ::tensorflow::GpuGridRange##axis(n)) + +#if GOOGLE_CUDA +#define gpuSuccess cudaSuccess +using gpuStream_t = cudaStream_t; +using gpuError_t = cudaError_t; +#elif TENSORFLOW_USE_ROCM +#define gpuSuccess hipSuccess +using gpuStream_t = hipStream_t; +using gpuError_t = hipError_t; +#endif + +// macro wrapper to declare dynamic shared memory +#if GOOGLE_CUDA + +#define GPU_DYNAMIC_SHARED_MEM_DECL(ALIGN, TYPE, NAME) \ + extern __shared__ __align__(ALIGN) \ + TYPE NAME[] + +#elif TENSORFLOW_USE_ROCM + +#define GPU_DYNAMIC_SHARED_MEM_DECL(ALIGN, TYPE, NAME) \ + HIP_DYNAMIC_SHARED(TYPE, NAME) + +#endif + +namespace tensorflow { + +#if GOOGLE_CUDA +// cudaGetErrorString is available to both host and device +__host__ __device__ inline const char* GpuGetErrorString(cudaError_t error) { + return cudaGetErrorString(error); +} +#elif TENSORFLOW_USE_ROCM +// hipGetErrorString is available on host side only +inline const char* GpuGetErrorString(hipError_t error) { + return hipGetErrorString(error); +} +#endif + +// Returns a raw reference to the current cuda stream. Required by a +// number of kernel calls (for which StreamInterface* does not work), +// i.e. CUB and certain cublas primitives. +inline gpuStream_t GetGpuStream(OpKernelContext* context) { + void* opaque_stream = CHECK_NOTNULL(context->op_device_context() + ->stream() + ->platform_specific_handle() + .stream); + return reinterpret_cast(opaque_stream); +} + +// Launches a GPU kernel through cudaLaunchKernel in CUDA environment, or +// hipLaunchKernel in ROCm environment with the given arguments. +// +// The kernel parameters 'Ts' must be constructible from the arguments 'Args'. +template +Status GpuLaunchKernel(void (*function)(Ts...), dim3 grid_dim, dim3 block_dim, + size_t shared_memory_size_bytes, gpuStream_t stream, + Args... arguments) { + static_assert(detail::NoneIsReference(), + "Kernels with reference arguments have undefined behaviour."); + if (grid_dim.x * grid_dim.y * grid_dim.z > 0 && + block_dim.x * block_dim.y * block_dim.z > 0) { +#if GOOGLE_CUDA + auto func_ptr = absl::bit_cast(function); + // Cast arguments and forward them as an array of pointers. + auto args_tuple = std::tuple(arguments...); + auto arg_ptrs = detail::GetArrayOfElementPointers(&args_tuple); + auto result = + cudaLaunchKernel(func_ptr, grid_dim, block_dim, arg_ptrs.data(), + shared_memory_size_bytes, stream); + if (result != cudaSuccess) { + return errors::Internal(cudaGetErrorString(result)); + } +#elif TENSORFLOW_USE_ROCM + hipLaunchKernelGGL(function, grid_dim, block_dim, shared_memory_size_bytes, + stream, std::forward(arguments)...); + TF_RETURN_IF_CUDA_ERROR(hipGetLastError()); +#endif + } + return OkStatus(); +} + +// Perfect forwarding to make CudaLaunchKernel available to both ROCm and CUDA +// builds +template +auto CudaLaunchKernel(Args&&... args) + -> decltype(GpuLaunchKernel(std::forward(args)...)) { + return GpuLaunchKernel(std::forward(args)...); +} + +__host__ __device__ inline tensorflow::bfloat16 GpuLdg( + const tensorflow::bfloat16* address) { + return Eigen::numext::bit_cast( + GpuLdg(reinterpret_cast(address))); +} +// Already aliased in gpu_device_functions.h + +template +__host__ __device__ inline T ldg(const T* ptr) { + return GpuLdg(ptr); +} + +template +__host__ __device__ inline const T& tf_min(const T& x, const T& y) { + return x < y ? x : y; +} + +template +__host__ __device__ inline const T& tf_max(const T& x, const T& y) { + return x < y ? y : x; +} + +// Overloads of the above functions for float and double. +__host__ __device__ inline float tf_min(float x, float y) { + return fminf(x, y); +} +__host__ __device__ inline double tf_min(double x, double y) { + return fmin(x, y); +} +__host__ __device__ inline float tf_max(float x, float y) { + return fmaxf(x, y); +} +__host__ __device__ inline double tf_max(double x, double y) { + return fmax(x, y); +} + +#ifdef _MSC_VER +#if _MSC_VER >= 1930 +using std::max; +using std::min; +__host__ __device__ inline int tf_min(int x, int y) { return min(x, y); } +__host__ __device__ inline int tf_max(int x, int y) { return max(x, y); } +#endif +#endif + +// ROCM TODO re-enable them after adding fp16 support logic +#if GOOGLE_CUDA +__device__ inline Eigen::half GpuShuffleSync(unsigned mask, Eigen::half value, + int src_lane, + int width = warpSize) { + return Eigen::half( + GpuShuffleSync(mask, static_cast(value), src_lane, width)); +} +// Aliased in gpu_device_functions.h + +__device__ EIGEN_ALWAYS_INLINE Eigen::half GpuShuffleUpSync( + unsigned mask, Eigen::half value, int delta, int width = warpSize) { + return Eigen::half( + GpuShuffleUpSync(mask, static_cast(value), delta, width)); +} +// Aliased in gpu_device_functions.h + +__device__ EIGEN_ALWAYS_INLINE Eigen::half GpuShuffleDownSync( + unsigned mask, Eigen::half value, int delta, int width = warpSize) { + return Eigen::half( + GpuShuffleDownSync(mask, static_cast(value), delta, width)); +} +// Aliased in gpu_device_functions.h + +__device__ EIGEN_ALWAYS_INLINE Eigen::half GpuShuffleXorSync( + unsigned mask, Eigen::half value, int lane_mask, int width = warpSize) { + return Eigen::half( + GpuShuffleXorSync(mask, static_cast(value), lane_mask, width)); +} +// Aliased in gpu_device_functions.h +#endif + +#ifdef __CUDA_ARCH__ +#define UNROLL_ON_DEVICE _Pragma("unroll") +#else +#define UNROLL_ON_DEVICE +#endif + +// Represents an aligned array of N elements of T. Data pointers can be +// reinterpreted as this type to generate vectorized loads/stores in a kernel. +template +class alignas(alignof(T) * N) AlignedVector { + public: + typedef T value_type; + static constexpr const int kSize = N; + + AlignedVector() = default; + + // Uniform initialization. + __host__ __device__ explicit AlignedVector(value_type uniform) { + UNROLL_ON_DEVICE for (int i = 0; i < kSize; ++i) { values_[i] = uniform; } + } + // Uniform initialization with explicit conversion. + // Note: This is required for T=Eigen::half because it only supports explicit + // conversions from other types and its template constructor is too relaxed + // to be able to use std::is_constructible. + template ::value, + int>::type = 0> + __host__ __device__ explicit AlignedVector(U uniform_u) { + value_type uniform(uniform_u); + UNROLL_ON_DEVICE for (int i = 0; i < kSize; ++i) { values_[i] = uniform; } + } + // Implicit conversion. + template ::value, int>::type = 0> + __host__ __device__ AlignedVector(const AlignedVector& other) { + UNROLL_ON_DEVICE for (int i = 0; i < kSize; ++i) { values_[i] = other[i]; } + } + // Explicit conversion. + template ::value && + std::is_constructible::value, + int>::type = 0> + __host__ __device__ explicit AlignedVector(const AlignedVector& other) { + UNROLL_ON_DEVICE for (int i = 0; i < kSize; ++i) { + values_[i] = T(other[i]); + } + } + + __host__ __device__ value_type& operator[](int i) { return values_[i]; } + __host__ __device__ const value_type& operator[](int i) const { + return values_[i]; + } + +#define DEFINE_BINARY_UPDATE_OPERATOR(op) \ + __host__ __device__ AlignedVector& operator op(const AlignedVector& rhs) { \ + UNROLL_ON_DEVICE for (int i = 0; i < kSize; ++i) { values_[i] op rhs[i]; } \ + return *this; \ + } + DEFINE_BINARY_UPDATE_OPERATOR(+=) + DEFINE_BINARY_UPDATE_OPERATOR(-=) + DEFINE_BINARY_UPDATE_OPERATOR(*=) + DEFINE_BINARY_UPDATE_OPERATOR(/=) +#undef DEFINE_BINARY_UPDATE_OPERATOR + +#define DEFINE_BINARY_OPERATOR(op) \ + friend __host__ __device__ AlignedVector operator op( \ + const AlignedVector& lhs, const AlignedVector& rhs) { \ + AlignedVector ret; \ + UNROLL_ON_DEVICE for (int i = 0; i < kSize; ++i) { \ + ret[i] = lhs[i] op rhs[i]; \ + } \ + return ret; \ + } + DEFINE_BINARY_OPERATOR(+) + DEFINE_BINARY_OPERATOR(-) + DEFINE_BINARY_OPERATOR(*) + DEFINE_BINARY_OPERATOR(/) +#undef DEFINE_BINARY_OPERATOR + +#define DEFINE_BINARY_FUNCTION(func) \ + friend __host__ __device__ AlignedVector func(const AlignedVector& lhs, \ + const AlignedVector& rhs) { \ + AlignedVector ret; \ + UNROLL_ON_DEVICE for (int i = 0; i < kSize; ++i) { \ + ret[i] = func(lhs[i], rhs[i]); \ + } \ + return ret; \ + } + DEFINE_BINARY_FUNCTION(min) + DEFINE_BINARY_FUNCTION(max) +#undef DEFINE_BINARY_FUNCTION + + private: + value_type values_[N]; +}; + +#undef UNROLL_ON_DEVICE + +// Returns the maximum power-of-two alignment (in units of elements, not bytes) +// of a stride or pointer value. +inline int64_t alignment_of(int64_t element_stride) { + // A zero/nullptr value means that the stride/pointer is not used, so it + // effectively has infinite alignment. + constexpr int64_t kMaxAlignment = 512; + if (element_stride == 0) return kMaxAlignment; + return element_stride & -element_stride; +} + +template +inline int64_t alignment_of(T* ptr) { + const intptr_t ptr_val = reinterpret_cast(ptr); + // Pointers should always be aligned to sizeof(T) bytes. + DCHECK_EQ(ptr_val % sizeof(T), 0); + // Note that we want the alignment in elements, not bytes. + return alignment_of(ptr_val / sizeof(T)); +} + +template +int64_t MinAlignmentOf(Args... args) { + return std::min({alignment_of(args)...}); +} + +namespace detail { + +template class Functor> +struct DispatchToVectorizedHelper { + template + Status operator()(int64_t max_vec_size, Args&&... args) const { + if (max_vec_size >= VecSize) { + return Functor()(std::forward(args)...); + } + return DispatchToVectorizedHelper()( + max_vec_size, std::forward(args)...); + } +}; +template